/* Standard content page.
 *
 * Was max-width:820px. On a large screen that left most of the display empty,
 * which is the main reason the app read as cheap. It now runs to the shared
 * --content width and centres, so the layout uses the room it has without
 * lines becoming unreadably long. */

/* Use the whole screen.
 *
 * A max-width cap left a large empty gutter on wide displays, which is what
 * made the app look unfinished. Content now fills the space beside the
 * sidebar. Long text still needs a readable measure, so that limit is put on
 * PROSE (see .sub below) rather than on the whole layout — the panels,
 * tables and controls should use every pixel available. */
.page{
  width:100%;
  margin:0;
  /* Side margin scales with the window. A fixed 48px is generous on a
     laptop and invisible on a 27in display, where content then reads as
     running edge to edge. clamp keeps the gap proportionate at any size. */
  padding:var(--s-6) var(--s-7) var(--s-8);              /* fallback */
  padding:var(--s-6) clamp(20px, 3.5vw, 88px) var(--s-8);
}

.page > h1{margin:0 0 var(--s-1)}
.page > p,.page > .sub{margin:0 0 var(--s-5);max-width:74ch}

/* Section header, used above groups of cards. */
.sect{
  font-size:var(--t-tiny);letter-spacing:.09em;text-transform:uppercase;
  color:var(--faint);font-weight:700;margin:var(--s-6) 0 var(--s-3);
}

/* Placeholder pages.
 *
 * Scoped to .page deliberately: nav.js also puts a class of "soon" on menu
 * items for features that aren't built yet, and an unscoped rule here turned
 * every one of those menu links into a 64px-padded block. Page-level styles
 * must not reach into the sidebar. */
.page > .soon,
.page .soon-block{
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), transparent),
    var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:var(--s-8) var(--s-6);
  text-align:center;margin-top:var(--s-5);
  box-shadow:var(--shadow);
}
.page > .soon h2,.page .soon-block h2{margin:0 0 var(--s-2);font-size:var(--t-h2)}
.soon-p{max-width:46ch;margin:0 auto;color:var(--muted)}
/* .badge is scoped for the same reason. */
.page .badge{
  display:inline-block;margin-top:var(--s-4);font-size:12px;
  padding:6px 14px;border-radius:20px;
  background:var(--rose-dim);color:var(--rose-2);font-weight:640;
  border:1px solid rgba(255,77,109,.28);
}

/* Cards side by side once there is room, instead of one long column. */
.grid-2{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:var(--s-4)}
.grid-3{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:var(--s-4)}

@media(max-width:900px){
  .page{padding:var(--s-5) var(--s-4) var(--s-7)}
}

/* ── screens list (My Automations) ──────────────────────────────────────
   The page is a two-column grid, so this card must be told to span both.
   Without that it dropped into the right-hand column, and capping its width
   then centred it inside that column — which is why it appeared small and
   pushed to one side instead of matching the panels above. */
#screensCard{
  grid-column:1 / -1;   /* the page is a two-column grid; span both */
  width:100%;
  margin:var(--s-6) 0 0;
}

#screenList{display:grid;gap:var(--s-2);margin-top:var(--s-3)}

.screen-row{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:var(--s-4);          /* the copy button needs clear air beside the URL */
  padding:var(--s-2) var(--s-3);
  background:var(--panel-2);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
}

.screen-n{
  font-size:12.5px;font-weight:640;color:var(--text-2);
  white-space:nowrap;display:inline-flex;align-items:center;gap:7px;
}
.screen-n::before{
  content:attr(data-n);
  display:grid;place-items:center;
  width:21px;height:21px;border-radius:6px;
  background:linear-gradient(180deg,var(--rose-2),var(--rose));
  color:#180509;font-size:11.5px;font-weight:800;
}

.screen-url{
  min-width:0;
  font-family:var(--mono);font-size:11.5px;color:var(--text-2);
  background:var(--ink);
  border:1px solid var(--line);
  border-radius:6px;
  padding:6px 10px;
  overflow-x:auto;white-space:nowrap;
}
.screen-url::-webkit-scrollbar{height:4px}
.screen-url::-webkit-scrollbar-thumb{background:var(--panel-3);border-radius:2px}

.screen-row .ghost{margin-top:0;white-space:nowrap;padding:6px 14px;font-size:12px;
                   margin-left:var(--s-1)}

@media(max-width:760px){
  .screen-row{grid-template-columns:1fr auto}
  .screen-url{grid-column:1 / -1;order:3}
}
