@import 'tokens.css';
/* Cutcheck signed-in app shell: sidebar, top bar, account menu and the shell's own pages (dashboard, New Short,
   Projects, Billing, Settings). Buttons, fields, pills and plan cards come from site.css, which app.html loads first.
   The editor owns everything inside .ed-root (editor.css, editor lane). */

body { min-height: 100vh; }
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }

/* ---- sidebar ---- */
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-5);
  padding: var(--space-4) var(--space-3); border-right: 1px solid var(--border); background: var(--bg); }
.side-mark { padding: var(--space-1) var(--space-2); }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: var(--space-3); min-height: 40px; padding: 0 var(--space-3); border-radius: var(--radius-s);
  color: var(--text-2); text-decoration: none; font-weight: 500; }
.side-nav a svg { width: 18px; height: 18px; flex: none; }
.side-nav a:hover { background: var(--surface-2); color: var(--text-1); }
.side-nav a[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* ---- top bar and account menu ---- */
.col { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--space-3); min-height: 56px; padding: 0 var(--space-6);
  background: var(--bg); border-bottom: 1px solid var(--border); }
.menu-btn, .top-mark { display: none; }
.acct { position: relative; margin-left: auto; }
.acct-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--border-strong); border-radius: 50%;
  background: var(--surface-2); color: var(--text-1); font-weight: 700; cursor: pointer; overflow: hidden; }
.acct-btn:focus-visible { border-radius: 50%; }
.acct-btn img { width: 100%; height: 100%; object-fit: cover; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 250px; padding: var(--space-1); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.menu-head { padding: var(--space-2) var(--space-3) var(--space-3); border-bottom: 1px solid var(--border); margin-bottom: var(--space-1); }
.menu-head .who { font-weight: 600; overflow-wrap: anywhere; }
.menu-label { padding: var(--space-2) var(--space-3) var(--space-1); font-size: var(--text-xs); font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.menu [role="menuitem"], .menu [role="menuitemradio"] { display: flex; align-items: center; gap: var(--space-2); width: 100%; min-height: 36px;
  padding: 0 var(--space-3); border: 0; border-radius: var(--radius-s); background: none; color: var(--text-1); text-align: left; text-decoration: none; cursor: pointer; font: inherit; }
.menu [role="menuitem"]:hover, .menu [role="menuitemradio"]:hover, .menu [role="menuitem"]:focus, .menu [role="menuitemradio"]:focus { background: var(--surface-2); }
.menu [role="menuitemradio"]::before { content: ""; width: 14px; height: 8px; flex: none; margin-top: -4px; transform: rotate(-45deg); }
.menu [role="menuitemradio"][aria-checked="true"]::before { border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); }
.menu [role="separator"] { height: 1px; margin: var(--space-1) 0; background: var(--border); }

/* ---- main column ---- */
.main { flex: 1; padding: var(--space-6); outline: none; }
.main > * { max-width: 1080px; }
.main.view-editor > * { max-width: none; }
.boot { padding: var(--space-6) 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); }
.page-head h1 { font-size: var(--text-xl); }
.page-head p { color: var(--text-2); margin-top: var(--space-1); }
h1[tabindex="-1"]:focus { outline: none; }
.card { padding: var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); }
.card + .card, .card + section, section + section { margin-top: var(--space-5); }
.card-h { font-size: var(--text-l); margin-bottom: var(--space-3); }
.section-h { font-size: var(--text-l); margin: var(--space-6) 0 var(--space-3); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-top: var(--space-4); }
.msg:empty { display: none; }
.msg { margin-top: var(--space-4); }
.center-note { max-width: 520px; display: grid; gap: var(--space-3); }

/* ---- dashboard ---- */
.quick .url-form { margin-top: 0; max-width: none; }
.quick .url-row { box-shadow: none; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin: var(--space-6) 0 var(--space-3); }
.row-head h2 { font-size: var(--text-l); }

/* ---- New Short ---- */
.form { display: grid; gap: var(--space-5); }
.or { display: flex; align-items: center; gap: var(--space-3); color: var(--text-2); font-size: var(--text-s); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.drop { display: grid; justify-items: center; gap: var(--space-1); padding: var(--space-5) var(--space-4); text-align: center; cursor: pointer;
  border: 1px dashed var(--text-3); border-radius: var(--radius); background: var(--surface-2); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop:has(input:focus-visible) { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; }
.drop b { font-weight: 600; }
/* the chosen files, in the order they're joined; buttons wrap under the name on narrow screens */
.files { list-style: none; display: grid; gap: var(--space-2); margin: var(--space-1) 0 var(--space-2); padding: 0; }
.file { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-3); border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: var(--surface); }
.file .pos { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: var(--surface-2); font-weight: 600; font-size: var(--text-s); }
.file .grow { flex: 1 1 200px; min-width: 0; display: grid; gap: 2px; }
.file .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .fstat { color: var(--text-2); }
.file .fstat:empty { display: none; }
.file .bar { margin-top: var(--space-1); }
.file-btns { display: flex; flex-wrap: wrap; gap: var(--space-2); }
/* a long video: one pass, or find several moments (two radio cards); in scan mode the count is a number box */
.ns-mode { display: grid; gap: var(--space-2); }
.ns-mode .opt { align-items: flex-start; padding: var(--space-3) var(--space-4); }
.ns-mode .opt input { margin-top: 3px; flex: none; }
.ns-mode .opt > span { display: grid; gap: 2px; min-width: 0; }
.ns-mode .hint { color: var(--text-2); }  /* on the chosen card's accent tint, --text-3 is under 4.5:1 in dark */
.ns-num { max-width: 8rem; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.progress { list-style: none; display: grid; gap: var(--space-2); }
.progress li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 2px var(--space-3); align-items: center; padding: var(--space-3); border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); color: var(--text-2); }
.progress li::before { content: ""; grid-row: span 2; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-strong); }
.progress li.active { color: var(--text-1); border-color: var(--accent); }
.progress li.active::before { border-color: var(--accent); border-top-color: transparent; animation: spin 1s linear infinite; }
.progress li.done { color: var(--text-1); }
.progress li.done::before { border-color: var(--ok); background: var(--ok); }
.progress li.fail { color: var(--danger); border-color: var(--danger); }
.progress li.fail::before { border-color: var(--danger); }
.progress small { grid-column: 2; font-size: var(--text-s); color: var(--text-2); }
.progress .bar { grid-column: 2; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.bar.full i { background: var(--warn); }

/* ---- Projects ---- */
.pgrid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-4); }
.pcard { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); overflow: hidden; }
.pcard:hover { border-color: var(--border-strong); }
.pcard:has(.plink:focus-visible) { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; }
.pthumb { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.pthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pthumb .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); }
.pthumb .noimg svg { width: 28px; height: 28px; }
.dur { position: absolute; right: 6px; bottom: 6px; padding: 0 6px; border-radius: 4px; background: var(--surface); color: var(--text-1); font-size: var(--text-xs); font-weight: 600; font-family: var(--mono); }
.pbody { display: grid; gap: 6px; padding: var(--space-3) var(--space-4) var(--space-4); align-content: start; min-width: 0; }
.ptitle { font-size: var(--text); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plink { color: var(--text-1); text-decoration: none; }
.plink::after { content: ""; position: absolute; inset: 0; }
.plink:focus-visible { outline: none; }
.pmeta { color: var(--text-2); font-size: var(--text-s); display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); align-items: center; }
.pstage { color: var(--text-2); font-size: var(--text-s); }
.pbar { height: 6px; }  /* a Short being made (projects.js progress) */
.perr { color: var(--danger); font-size: var(--text-s); }
.pcard .btn { position: relative; z-index: 1; justify-self: start; }
.sk { background: var(--surface-2); border-radius: var(--radius-s); animation: pulse 1.4s ease-in-out infinite; }
.pcard.skeleton .pthumb { animation: pulse 1.4s ease-in-out infinite; }
.sk-line { height: 12px; }
@keyframes pulse { 50% { opacity: 0.55; } }
.empty { display: grid; justify-items: start; gap: var(--space-3); padding: var(--space-6); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-l); }
.empty h2 { font-size: var(--text-l); }
.empty p { color: var(--text-2); max-width: 52ch; }

/* ---- Billing ---- */
.b-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.b-name { font-size: var(--text-xl); font-weight: 700; }
#b-plan-body { display: grid; gap: var(--space-2); }
.usage { display: grid; gap: var(--space-2); margin-top: var(--space-2); max-width: 460px; }
#b-note .note { margin-bottom: var(--space-4); }

/* ---- Settings ---- */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; font-weight: 600; margin-bottom: var(--space-2); }
.opts { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.opt { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-4); border: 1px solid var(--border-strong); border-radius: var(--radius-s); cursor: pointer; background: var(--surface); }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt:has(input:focus-visible) { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; }
.opt input { accent-color: var(--accent); margin: 0; }
.opt input:focus-visible { outline: none; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2) var(--space-5); }
.kv dt { color: var(--text-2); }
.kv dd { overflow-wrap: anywhere; }

/* ---- editor route: the shell's header, then the editor owns .ed-root ---- */
.ed-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-bottom: var(--space-4); }
.ed-head h1 { font-size: var(--text-xl); min-width: 0; overflow-wrap: anywhere; }
.ed-head .back { color: var(--text-2); text-decoration: none; font-weight: 500; font-size: var(--text-s); }
.ed-head .back:hover { color: var(--text-1); }
.ed-root { min-height: 60vh; }

/* ---- small screens: top bar with a menu; the sidebar becomes a drop-down panel ---- */
@media (max-width: 900px) {
  .shell { display: block; }
  .top { padding: 0 var(--space-3); }
  .menu-btn { display: inline-flex; padding: 0 var(--space-2); }
  .top-mark { display: inline-flex; }
  .side { display: none; position: fixed; top: 56px; left: 0; right: 0; bottom: auto; height: auto; max-height: calc(100vh - 56px); z-index: 25;
    border-right: 0; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); padding: var(--space-3); }
  .side.open { display: flex; }
  .side-mark { display: none; }
  .main { padding: var(--space-5) var(--space-4); }
  .main.view-editor { padding: var(--space-3) 0 0; }
  .main.view-editor .ed-head { padding: 0 var(--space-4); }
  .row2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pgrid { grid-template-columns: 1fr; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); overflow: hidden; }
  .pcard { flex-direction: row; border: 0; border-radius: 0; border-bottom: 1px solid var(--border); overflow: visible; }
  .pgrid > .pcard:last-child { border-bottom: 0; }
  .pthumb { width: 112px; flex: none; align-self: flex-start; margin: var(--space-3) 0 var(--space-3) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-s); overflow: hidden; }
  .pbody { padding: var(--space-3); }
  .pcard:has(.plink:focus-visible) { outline-offset: -2px; }
  .card { padding: var(--space-4); }
}

/* ======================================================================================================================
   Stripe-style app (owner, 22 Nov 2026; mock-ups "App · Projects / Billing / Plans / Settings" on the design canvas):
   white page, slim sidebar, thin dividers, compact 14px type, list rows instead of cards, label-left rows in Settings.
   Colours are still the tokens, so dark mode keeps working.
   ==================================================================================================================== */
:root:not([data-theme="dark"]) .shell, :root:not([data-theme="dark"]) .side, :root:not([data-theme="dark"]) .top { background: var(--surface); }
:root:not([data-theme="dark"]) body:has(.shell) { background: var(--surface); }
.shell { font-size: 14px; }
.side { gap: var(--space-4); padding: var(--space-4) var(--space-3); }
.side-nav a { min-height: 34px; padding: 0 var(--space-2); gap: 10px; font-size: 14px; border-radius: 7px; }
.side-nav a svg { width: 16px; height: 16px; }
.side-foot { margin-top: auto; }
.side-plan { display: grid; gap: 6px; padding: var(--space-3); border: 1px solid var(--border); border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: var(--text-xs); }
.side-plan:hover { border-color: var(--border-strong); }
.side-plan .sp-top { display: flex; justify-content: space-between; gap: var(--space-2); }
.side-plan b { color: var(--text-1); font-weight: 600; }
.side-plan .bar { height: 4px; border: 0; }
.top { min-height: 56px; }
.main { padding: var(--space-6) var(--space-6) var(--space-7); }
.main > * { max-width: 1120px; }
.page-head { margin-bottom: var(--space-5); }
.page-head h1 { font-size: 26px; letter-spacing: -0.02em; }
.page-head p { font-size: 14px; }
.btn { font-size: 14px; }
.main .btn-primary, .main .btn { border-radius: 7px; }

/* boxes: one border, inner rows split by thin lines */
.box { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.box + .box, .box + section, section + .box { margin-top: var(--space-5); }
.box-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 18px 20px; }
.box-top { padding: 16px 20px; display: grid; gap: 3px; }
.box-h { font-size: 16px; font-weight: 700; }
.pad { padding: 18px 20px; }
.pad-x { padding: 0 20px; }
.pad-x:not(:empty) { padding-bottom: 18px; }
.b-name { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); border-top: 1px solid var(--border); }
.stat { display: grid; gap: 8px; align-content: start; padding: 18px 20px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat-k { color: var(--text-2); font-size: 13px; }
.stat-v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-v span { font-size: 14px; color: var(--text-2); font-weight: 500; }
.stats .usage { margin-top: 0; max-width: none; }
.stat .bar { height: 6px; border: 0; }
#b-plan-body { display: block; }

/* Plans page */
.banner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); padding: 14px 18px; margin-bottom: var(--space-4);
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.banner:empty { display: none; }
#b-msg:not(:empty) { margin-bottom: var(--space-4); }
.view-plans .plans { gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.view-plans .plan { border-radius: 12px; padding: 22px; gap: var(--space-4); }
.view-plans .plan.is-current { box-shadow: 0 0 0 3px var(--accent-soft); }
.view-plans .plan .amt { font-size: 34px; }
.view-plans .plan ul { padding-top: var(--space-4); border-top: 1px solid var(--border); order: 3; font-size: 13px; color: var(--text-2); }
.view-plans .plan .plan-cta { order: 2; margin-top: 0; padding-top: 0; }
.view-plans .plan .plan-cta .pill { width: 100%; justify-content: center; padding: 8px; border-radius: 7px; font-size: 14px; }
.view-plans .plan .plan-cta .pill::before { display: none; }
.faq { margin-top: var(--space-6); }
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 0 var(--space-6); margin-top: var(--space-2); color: var(--text-2); }
.faq-grid p { padding: 12px 0; border-top: 1px solid var(--border); }
.faq-grid b { color: var(--text-1); }

/* Projects: rows, like a table */
.ptabs { display: flex; gap: var(--space-5); border-bottom: 1px solid var(--border); margin-bottom: 0; }
.ptab { height: 40px; padding: 0; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-2); font: 500 14px var(--font); cursor: pointer; }
.ptab:hover { color: var(--text-1); }
.ptab[aria-pressed="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
#p-list[data-filter="progress"] .pcard:not([data-state="analysing"]):not([data-state="rendering"]),
#p-list[data-filter="ready"] .pcard:not([data-state="ready"]):not([data-state="rendered"]),
#p-list[data-filter="attention"] .pcard:not([data-state="failed"]) { display: none; }
.pgrid { grid-template-columns: 1fr; gap: 0; }
.pcard { flex-direction: row; align-items: flex-start; gap: var(--space-4); padding: 12px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; overflow: visible; background: none; }
.pcard:hover { background: var(--surface-2); }
.pthumb { width: 96px; flex: none; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.pthumb .noimg svg { width: 18px; height: 18px; }
.dur { right: 3px; bottom: 3px; padding: 0 4px; font-size: 10px; }
.pbody { padding: 0; gap: 4px; flex: 1; }
.ptitle { font-size: 14px; -webkit-line-clamp: 1; }
.pcard:has(.plink:focus-visible) { outline-offset: -2px; }
.pcard .pbar { max-width: 320px; height: 4px; border: 0; }
.pcard.skeleton .pthumb { height: 54px; }
.view-dashboard .pgrid, #p-list .pgrid { border-top: 0; }

/* Settings rows */
.set-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--space-4); align-items: center; padding: 16px 20px; border-top: 1px solid var(--border); }
.set-label { font-weight: 600; }
.set-k .muted { font-size: 13px; }
.set-v { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); }
.set-v .opt { min-height: 38px; padding: 0 var(--space-3); border-radius: 7px; }
.wrap-any { overflow-wrap: anywhere; }
.actions.end { justify-content: flex-end; }
@media (max-width: 640px) {
  .set-v { justify-content: flex-start; }
  .stat { border-right: 0; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: 0; }
  .pthumb { width: 72px; margin: 0; }
  .pgrid { border: 0; border-radius: 0; background: none; }
  .ptabs { gap: var(--space-4); overflow-x: auto; }
}

/* ======================================================================================================================
   v2 (owner, 22 Nov 2026, design canvas "App screens v2"): the app looks like the home page. Same wordmark and display
   face, pill buttons in the accent colour, rounded icons, the punchline gradient only on Pro and Max. Tokens throughout.
   ==================================================================================================================== */
:root:not([data-theme="dark"]) .side { background: var(--bg); }
.side-mark, .top-mark { font-family: var(--d-display); font-weight: 800; letter-spacing: -0.03em; font-size: 20px; }
.side-nav a { font-weight: 500; }
.side-nav a svg { width: 17px; height: 17px; }
.shell .btn, .shell .main .btn, .shell .main .btn-primary { border-radius: 999px; }
.shell .btn-primary { box-shadow: 0 1px 2px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .12); }
.shell .btn svg { flex: none; }
.page-head h1 { font-family: var(--d-display); font-weight: 800; font-size: 32px; letter-spacing: -0.04em; line-height: 1.1; }
.ed-head h1 { font-family: var(--d-display); font-weight: 800; letter-spacing: -0.03em; }
.shell .input { border-radius: 12px; }

/* Plans (board "Plans · B"): three tall cards in a row, the button at the bottom, a note under them */
.view-plans .plans { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--space-4); max-width: 980px; margin: var(--space-6) auto 0; }
.view-plans .plan { position: relative; min-height: 520px; padding: 34px 28px 28px; border-radius: 16px; gap: 20px; }
.view-plans .plan:not(.is-current) { background: var(--bg); }
.view-plans .plan .amt { font-size: 40px; }
.view-plans .plan ul { order: 0; padding-top: 0; border-top: 0; }
.view-plans .plan .plan-cta { order: 0; margin-top: auto; }
.view-plans .plan .plan-cta .btn { min-height: 44px; }
.view-plans .plan .plan-cta .pill { width: 100%; justify-content: center; padding: 11px; border-radius: 999px; font-size: 14px; }
.plans-foot { max-width: 980px; margin: var(--space-6) auto 0; text-align: center; color: var(--text-2); font-size: 13px; }
#b-period { display: flex; justify-content: center; }
#b-period .period { margin: 0; }

/* Projects with nothing in it yet (board "Empty · A") */
.first { display: grid; gap: var(--space-4); }
.first-box { display: grid; justify-items: center; gap: var(--space-3); padding: 56px var(--space-5); text-align: center; border: 1.5px dashed var(--border-strong); border-radius: 20px; background: var(--bg); }
.first-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.first-icon svg { width: 26px; height: 26px; }
.first-box h2 { font-family: var(--d-display); font-weight: 800; font-size: 24px; letter-spacing: -0.03em; }
.first-box p { color: var(--text-2); max-width: 46ch; }
.first-form { display: flex; gap: var(--space-2); width: 100%; max-width: 520px; }
.first-form .input { flex: 1; min-width: 0; border-radius: 999px; }
.first-form .btn { flex: none; min-height: 44px; }
.first-box .field-msg:empty { display: none; }
.tips { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--space-4); }
.tips li { display: grid; gap: 6px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.tips svg { width: 20px; height: 20px; color: var(--accent); }
.tips span { color: var(--text-2); font-size: 13px; }

/* New Short (board "New Short · A"): one centred card */
.view-new .page-head { max-width: 620px; margin-left: auto; margin-right: auto; }
.ns-card { max-width: 620px; margin: 0 auto; padding: 32px; border-radius: 16px; gap: 22px; box-shadow: var(--shadow); }
.ns-foot { max-width: 620px; margin: var(--space-4) auto 0; text-align: center; }
.ns-tabs { justify-self: start; display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.ns-tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font: 600 14px var(--font); cursor: pointer; }
.ns-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text-1); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.ns-count { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.ns-count label { position: relative; }
.ns-count input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ns-count span { display: grid; place-items: center; min-height: 44px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); font-weight: 600; }
.ns-count input:checked + span { border: 1.5px solid var(--accent); background: var(--accent-soft); color: var(--accent); }
.ns-count input:focus-visible + span { outline: var(--focus-width) solid var(--focus); outline-offset: 2px; }
.ns-more summary { cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 14px; }
.ns-more[open] summary { margin-bottom: var(--space-3); }
.ns-card .est .hint { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--text-1); }
.ns-go { width: 100%; min-height: 48px; font-size: 15px; font-weight: 700; }
@media (max-width: 640px) {
  .ns-card { padding: var(--space-5) var(--space-4); }
  .first-box { padding: var(--space-6) var(--space-4); }
  .first-form { flex-direction: column; }
}
.view-plans .plan h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }

/* Scan page (/app/scans/:id, scans.js): the progress block, then the moments ranked best first */
.view-scan .ed-head { margin-bottom: var(--space-2); }
.view-scan .page-head { max-width: 760px; align-items: flex-start; }
.sc-prog { display: grid; gap: var(--space-2); max-width: 760px; }
.sc-stage { font-weight: 600; overflow-wrap: anywhere; }
.sc-bar { height: 6px; border: 0; max-width: 480px; }
.sc-note:empty, #sc-note:empty { display: none; }
.sc-list { max-width: 760px; }
.sc-list .row-head { flex-wrap: wrap; }
.moments { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.moment { display: grid; gap: 4px; padding: 14px 16px; border-bottom: 1px solid var(--border); min-width: 0; }
.moment:last-child { border-bottom: 0; }
.moment:focus { outline: none; }
.moment:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: -2px; }
.m-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); }
.m-time { font-family: var(--mono); font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.m-score { display: inline-flex; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: var(--text-xs); font-weight: 600; color: var(--text-1); }
.m-title { font-size: 15px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.m-why { color: var(--text-2); overflow-wrap: anywhere; }
.m-act { margin-top: var(--space-2); }
.m-act .btn[aria-disabled="true"] { opacity: 0.7; cursor: progress; }
.m-making { color: var(--text-1); font-weight: 600; font-size: var(--text-s); }

/* ---------- Schedule and Results (schedule.js): preview pages, sample data. Boards "Schedule · A–D", "Extras · E–I" ---------- */
.main.view-schedule > *, .main.view-queue > *, .main.view-fix > *, .main.view-times > *, .main.view-captions > *, .main.view-autopilot > *, .main.view-accounts > *, .main.view-results > * { max-width: 1280px; }
.sc-preview { margin: 0 0 var(--space-4); padding: var(--space-3) var(--space-4); border-radius: var(--radius); background: var(--accent-soft); color: var(--text-1); font-size: var(--text-s); }
.sc-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.sc-tabs { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: var(--space-5); border-bottom: 1px solid var(--border); }
.sc-tabs a { padding: 10px 12px; color: var(--text-2); text-decoration: none; font-size: var(--text-s); font-weight: 600; border-radius: var(--radius-s) var(--radius-s) 0 0; display: inline-flex; gap: 6px; align-items: center; }
.sc-tabs a:hover { color: var(--text-1); }
.sc-tabs a[aria-current=page] { color: var(--text-1); box-shadow: inset 0 -2px 0 var(--accent); }
.sc-dot { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
:root[data-theme="dark"] .sc-dot { color: #1c1c1c; }
.sc-tile { flex: none; width: var(--s); height: var(--s); border-radius: calc(var(--s) / 4); color: #fff; font: 800 calc(var(--s) * .45)/1 var(--font); display: inline-flex; align-items: center; justify-content: center; }
.sc-tiles { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.sc-thumb { flex: none; width: 30px; height: 52px; border-radius: 6px; background: linear-gradient(160deg, #3a4a7a, #1b1a18 70%); }
.sc-sample { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.sc-grow { flex: 1; min-width: 0; }
.sc-grow > b, .sc-grow > span { display: block; }
.sc-grow > span { font-size: var(--text-s); color: var(--text-2); }
.sc-label { margin: 0; font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.sc-ok { color: var(--ok); font-size: var(--text-xs); font-weight: 600; }
.sc-warn { color: var(--warn); }
span.sc-warn { font-size: var(--text-xs); font-weight: 600; }
.sc-note { margin: var(--space-3) 0; }
.sc-lock { margin: var(--space-3) 0 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius); background: var(--surface-2); color: var(--text-2); font-size: var(--text-s); }
.sc-pro { font-size: 11px; font-weight: 800; }
.sc-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); margin: 0; padding: 10px 16px; border-radius: 999px; background: var(--text-1); color: var(--bg); font-size: var(--text-s); opacity: 0; pointer-events: none; transition: .2s; z-index: 60; max-width: calc(100vw - 32px); }
.sc-toast.on { opacity: 1; transform: translate(-50%, 0); }
/* accounts strip */
.sc-accts { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.sc-acct { flex: 1 1 180px; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: inherit; }
.sc-acct > div { flex: 1; min-width: 0; }
.sc-acct > div b, .sc-acct > div span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-acct > div span { font-size: var(--text-xs); color: var(--text-2); }
.sc-acct > div .sc-ok, .sc-acct > div .sc-warn { color: var(--ok); font-weight: 600; }
.sc-acct > div .sc-warn { color: var(--warn); }
.sc-more { flex: 0 1 auto; background: var(--surface-2); }
.sc-more b { color: var(--accent); font-size: var(--text-s); }
/* calendar */
.sc-weekbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin: var(--space-4) 0 var(--space-3); }
.sc-pad > .sc-weekbar:first-child, .sc-col > .sc-weekbar:first-child { margin-top: 0; }
.sc-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.sc-seg .sc-chip { border: 0; box-shadow: none; background: transparent; height: 28px; }
.sc-seg .sc-chip[aria-pressed=true] { background: var(--surface); color: var(--text-1); box-shadow: var(--shadow); }
.sc-chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 0; box-shadow: inset 0 0 0 1px var(--border); background: var(--surface); color: var(--text-1); font: 600 var(--text-s) var(--font); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.sc-chip[aria-pressed=true] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.sc-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.sc-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-2); }
.sc-day { min-height: 380px; display: flex; flex-direction: column; gap: var(--space-2); padding: 10px 8px; border-radius: var(--radius-l); background: var(--surface-2); margin: 0 !important; }
.sc-day h3 { margin: 0 2px 4px; font-size: var(--text-s); }
.sc-day h3 span { color: var(--text-2); font-weight: 500; }
.sc-today { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.sc-today h3 span { color: var(--accent); }
.sc-post { display: flex; gap: 8px; padding: 8px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: inherit; text-align: left; font: inherit; cursor: pointer; }
.sc-post:hover { border-color: var(--border-strong); }
.sc-post-b { min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: var(--text-xs); color: var(--text-2); }
.sc-post-b b { color: var(--text-1); font-size: var(--text-s); line-height: 1.25; }
.sc-post .pill { align-self: flex-start; }
.sc-fail { background: var(--danger-soft); }
.sc-add { margin-top: auto; height: 30px; border-radius: 8px; border: 1px dashed var(--border-strong); background: transparent; color: var(--text-2); font: var(--text-xs) var(--font); cursor: pointer; }
.sc-add:hover { color: var(--accent); border-color: var(--accent); }
/* rows (queue, results, fix) */
.sc-group { padding: 0; overflow: hidden; }
.sc-group > .sc-label { padding: 14px 18px 10px; }
.sc-gh { margin: 0; padding: 14px 18px; }
.sc-row { display: flex; align-items: center; gap: var(--space-4); padding: 12px 18px; border-top: 1px solid var(--border); }
.sc-when { width: 150px; font-size: var(--text-s); color: var(--text-2); }
.sc-act { width: 170px; display: flex; justify-content: flex-end; }
.sc-fhead { display: flex; align-items: center; gap: var(--space-3); padding: 16px 18px; }
.sc-fhead .sc-grow b { display: block; }
.sc-fhead .hint { display: block; margin: 0; }
/* dialog */
.main > .sc-modal { max-width: none; }
.sc-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: var(--space-4); background: rgba(14, 19, 48, .5); }
.sc-modal[hidden] { display: none; }
.sc-dialog { width: min(1040px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: flex; gap: var(--space-5); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.sc-phone { flex: none; width: 220px; aspect-ratio: 9 / 16; align-self: flex-start; border-radius: 22px; background: #22283a linear-gradient(160deg, #3a4a7a, #1b1a18 70%); display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.sc-phone span { color: #fff; font-size: var(--text-xs); opacity: .8; }
.sc-dbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.sc-dhead { display: flex; gap: var(--space-3); align-items: flex-start; }
.sc-dhead > div { flex: 1; }
.sc-dhead h2 { margin: 0; font-size: var(--text-xl); }
.sc-dhead .hint { margin: 2px 0 0; }
.sc-dbody > .sc-sample { align-self: flex-start; }
.sc-ptabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
.sc-ptab { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--radius-l); border: 1px solid var(--border); background: var(--surface); color: inherit; text-align: left; font: inherit; cursor: pointer; }
.sc-ptab > span > b, .sc-ptab > span > span { display: block; }
.sc-ptab > span > span { font-size: var(--text-xs); color: var(--text-2); }
.sc-ptab[aria-pressed=true] { border: 1.5px solid var(--accent); background: var(--accent-soft); }
.sc-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.sc-2 { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-4); }
.sc-3 .field, .sc-2 .field { margin: 0; }
.sc-dbody textarea { width: 100%; resize: vertical; }
.sc-opts { display: flex; flex-direction: column; gap: var(--space-2); }
.sc-opts .hint { margin: 0; font-size: var(--text-xs); }
.sc-swrow { display: flex; justify-content: space-between; align-items: center; font-size: var(--text-s); }
.sc-switch { flex: none; width: 40px; height: 24px; padding: 0; border: 0; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; }
.sc-switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: left .15s; }
.sc-switch[aria-checked=true] { background: var(--accent); }
.sc-switch[aria-checked=true] i { left: 19px; }
.sc-dfoot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.sc-dfoot .hint { flex: 1; margin: 0; }
/* accounts */
.sc-cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--space-3); }
.sc-cgrid .card { margin: 0; }
.sc-ccard { display: flex; flex-direction: column; gap: var(--space-2); min-height: 250px; padding: var(--space-4); }
.sc-ccard p { margin: 0; font-size: var(--text-s); }
.sc-ccard .pill { align-self: flex-start; }
.sc-chead { display: flex; align-items: center; gap: 10px; }
.sc-chead b { flex: 1; }
.sc-bottom { margin-top: auto; }
/* best times */
.sc-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.sc-split > .card { margin: 0; }
.sc-col { display: flex; flex-direction: column; gap: var(--space-3); }
.sc-heat { display: flex; flex-direction: column; gap: 4px; }
.sc-hrow { display: flex; align-items: center; gap: 4px; }
.sc-hrow > span { width: 36px; font-size: var(--text-xs); color: var(--text-2); }
.sc-hrow i { flex: 1; height: 26px; border-radius: 5px; background: var(--accent); }
.sc-hours em { flex: 1; text-align: center; font-style: normal; font-size: 11px; color: var(--text-3); }
.sc-slot { display: flex; align-items: center; gap: var(--space-3); padding: 12px 14px; border-radius: var(--radius-l); border: 1px solid var(--border); background: var(--surface); color: inherit; text-align: left; font: inherit; cursor: pointer; }
.sc-best { border: 1.5px solid var(--accent); background: var(--accent-soft); }
/* results */
.sc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-5); }
.sc-stats .card { margin: 0; }
.sc-stat { display: flex; flex-direction: column; gap: 4px; padding: var(--space-4); }
.sc-stat b { font-size: 28px; letter-spacing: -.03em; }
.sc-bars { display: flex; align-items: flex-end; gap: 4px; height: 44px; }
.sc-bars i { width: 14px; border-radius: 3px 3px 0 0; }
:root[data-theme="dark"] .sc-bars i[title=TikTok], :root[data-theme="dark"] .sc-key i { outline: 1px solid var(--border-strong); }
.sc-num { width: 84px; text-align: right; font-variant-numeric: tabular-nums; }
.sc-num b, .sc-num span { display: block; }
.sc-num span { font-size: var(--text-xs); color: var(--text-2); }
.sc-key { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-xs); color: var(--text-2); }
.sc-key i { width: 10px; height: 10px; border-radius: 3px; }
/* captions */
.sc-capbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: 14px 16px; border-radius: var(--radius-l); background: var(--surface-2); margin-bottom: var(--space-4); }
.sc-capbar .hint { margin: 0; }
.sc-capgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-3); }
.sc-capgrid .card { margin: 0; }
.sc-capcard { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); }
.sc-capcard textarea { width: 100%; resize: vertical; font-size: var(--text-s); }
.sc-warnbox { border-color: var(--warn); }
.sc-meter { display: flex; align-items: center; gap: 10px; font-size: var(--text-xs); color: var(--text-2); }
.sc-meter span { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.sc-meter i { display: block; height: 100%; background: var(--accent); }
.sc-meter em { font-style: normal; font-variant-numeric: tabular-nums; }
.sc-meter.over i { background: var(--danger); }
.sc-meter.over em { color: var(--danger); }
.sc-capcard .hint { margin: 0; font-size: var(--text-xs); }
/* auto-pilot */
.sc-rules { display: flex; flex-direction: column; gap: var(--space-5); }
.sc-rule { display: flex; gap: var(--space-3); }
.sc-rule .hint { margin: 6px 0 0; font-size: var(--text-xs); }
.sc-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: var(--text-s); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.sc-slots { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-2); }
.sc-slots > div { display: flex; flex-direction: column; gap: 6px; padding: 10px 6px; border-radius: var(--radius); background: var(--surface-2); }
.sc-slots b { font-size: var(--text-xs); color: var(--text-2); }
.sc-slots span { font-size: var(--text-xs); font-weight: 600; padding: 4px 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); }
.sc-slots .sc-add { margin-top: 0; height: 26px; }
.sc-up { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.sc-up .hint { margin: 0; }
.sc-col > .btn { align-self: flex-start; }
@media (max-width: 1000px) {
  .sc-week { grid-template-columns: 1fr; }
  .sc-day { min-height: 0; }
  .sc-split, .sc-2 { grid-template-columns: 1fr; }
  .sc-phone { display: none; }
  .sc-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .sc-row { flex-wrap: wrap; }
  .sc-when, .sc-act { width: auto; }
  .sc-ptabs, .sc-3, .sc-stats { grid-template-columns: 1fr 1fr; }
  .sc-bars, .sc-num:last-of-type { display: none; }
}

/* ======================================================================================================================
   Polish (owner, 22 Nov 2026: "a lot of things are off… make it look good"): content in a centred column, the profile at
   the bottom of the sidebar, no top bar on desktop, wordmark without the scissors.
   ==================================================================================================================== */
/* centred column: each page sets its width; the padding grows so the column stays in the middle */
.main { --w: 1080px; padding-left: max(var(--space-6), calc((100% - var(--w)) / 2)); padding-right: max(var(--space-6), calc((100% - var(--w)) / 2)); }
.main > * { max-width: none; }
.main.view-billing, .main.view-settings { --w: 860px; }
.main.view-plans { --w: 1040px; }
.main.view-schedule, .main.view-queue, .main.view-fix, .main.view-times, .main.view-captions, .main.view-autopilot, .main.view-accounts, .main.view-results { --w: 1240px; }
.main.view-editor { --w: 100%; }
.main.view-schedule > *, .main.view-queue > *, .main.view-fix > *, .main.view-times > *, .main.view-captions > *, .main.view-autopilot > *, .main.view-accounts > *, .main.view-results > * { max-width: none; }
.main .page-head { align-items: flex-end; }
/* desktop: the sidebar carries the wordmark and the profile, so the top bar has nothing left to show */
@media (min-width: 901px) { .top { display: none; } }
.side-mark { padding: var(--space-2) var(--space-2) var(--space-1); font-size: 22px; }
.side-nav { gap: 1px; }
.side-nav a { min-height: 36px; padding: 0 10px; border-radius: 9px; }
/* the profile row */
.side .acct { margin: 0; padding-top: var(--space-3); border-top: 1px solid var(--border); }
.acct-av { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; overflow: hidden;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 14px; }
.acct-av img { width: 100%; height: 100%; object-fit: cover; }
.top .acct-btn { width: 36px; height: 36px; border: 0; background: none; }
.top .acct-text, .top .acct-chev { display: none; }
.side .acct-btn { display: flex; align-items: center; gap: 10px; width: 100%; height: auto; padding: 8px; border: 0; border-radius: 10px; background: none; text-align: left; font: inherit; color: var(--text-1); }
.side .acct-btn:hover, .side .acct-btn[aria-expanded="true"] { background: var(--surface-2); }
.side .acct-btn:focus-visible { border-radius: 10px; }
.acct-text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.acct-text b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-text span { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-chev { width: 16px; height: 16px; flex: none; color: var(--text-3); }
.side .menu { top: auto; bottom: calc(100% + 6px); left: 0; right: 0; min-width: 0; }
.side-foot { display: grid; gap: var(--space-3); }
/* Billing: a clear plan header, a full-width usage meter, the facts as quiet lines, actions at the foot */
.view-billing .page-head { margin-bottom: var(--space-4); }
.view-billing .card { padding: 28px; border-radius: 16px; }
.view-billing .card-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin-bottom: var(--space-3); }
.view-billing .b-name { font-family: var(--d-display); font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin: 0; }
.view-billing .usage { max-width: none; margin: var(--space-4) 0 var(--space-3); padding: var(--space-4); border-radius: 12px; background: var(--surface-2); }
.view-billing .usage .bar { width: 100%; max-width: none; height: 8px; margin: 10px 0 8px; border-radius: 999px; }
.view-billing .usage .bar i { border-radius: 999px; }
.view-billing .usage p { margin: 0; }
.view-billing #b-plan-body > .muted { margin: 4px 0; font-size: 14px; }
.view-billing .actions { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--border); }

/* platform icons: the logo on a light tile, so every brand colour reads the same way in light and dark */
.sc-logo { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); color: var(--text-1); }
.sc-logo svg { width: 62%; height: 62%; }
.sc-logo img { width: 62%; height: auto; }
.sc-logo.sc-snap { background: #FFFC00; box-shadow: none; }

/* ---- editor route, full window (owner, 22 Nov 2026): the editor's own bar has ← Projects and the title. While the editor
   is still loading (or failed), the shell's head stays, so there's always a way back. ---- */
body.ed-full .shell { grid-template-columns: minmax(0, 1fr); }
body.ed-full .side, body.ed-full .top { display: none; }
body.ed-full .main.view-editor { padding: 0; }
body.ed-full .main.view-editor:has(.cce-k) .ed-head { display: none; }
body.ed-full .main.view-editor:has(.cce-k) { max-width: none; }
body.ed-full .main.view-editor .ed-head { padding: var(--space-3) var(--space-4) 0; }
