:root {
  --bg: #17171A; --surface: #202024; --surface-2: #29292F; --sunk: #101013;
  --line: #2F2F36; --line-2: #40404A;
  --text: #FFFFFF; --muted: #A6A6B0; --faint: #8B8B95;
  --accent: #E8FF52; --accent-bg: #1B1F0B; --accent-line: #414A18;
  --good: #63D69A; --good-bg: #12301F; --good-line: #234C33;
  --warn: #F3823D; --warn-bg: #331F10; --warn-line: #57351B;
  --navy: #0C1B3C;
  --accent-ink: #E8FF52;            /* colour for accent TEXT (readable on the current bg) */
  --topbar-bg: rgba(23,23,26,0.9);
  --btn-hover: #33333B;
  --font-display: "Instrument Sans", "Inter", -apple-system, system-ui, sans-serif;
  --font: "Inter", -apple-system, system-ui, "Helvetica Neue", sans-serif;
  --mono: "Roboto Mono", ui-monospace, Menlo, Consolas, monospace;
}
:root[data-theme="light"] {
  --bg: #F2F2EF; --surface: #FFFFFF; --surface-2: #F0F0EB; --sunk: #ECECE6;
  --line: #E4E4DD; --line-2: #D6D6CE;
  --text: #17170F; --muted: #56564E; --faint: #8A8A80;
  --accent: #E8FF52; --accent-bg: #F2FBBE; --accent-line: #D9EA8E;
  --accent-ink: #4F6100;
  --good: #1E8A4C; --good-bg: #E7F4EC; --good-line: #BADFC7;
  --warn: #C7631A; --warn-bg: #FBEEDD; --warn-line: #EFCFA6;
  --topbar-bg: rgba(242,242,239,0.88);
  --btn-hover: #E9E9E3;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); letter-spacing: -0.011em; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 22px 26px 80px; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 26px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--topbar-bg); backdrop-filter: blur(8px); z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { height: 24px; display: block; border-radius: 3px; }
.glyph { width: 26px; height: 26px; border: 1.5px solid var(--text); border-radius: 6px; display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: 13px; }
.brand .nm { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 100px; padding: 3px 9px; }
.tag { font-weight: 500; }
.tag.client { color: #101010; border-color: var(--accent); background: var(--accent); }

.btn { font-family: var(--font); font-size: 13px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 14px; cursor: pointer; transition: background .14s, border-color .14s, transform .08s; }
.btn:active { transform: scale(0.97); }
.btn:hover { background: var(--btn-hover); border-color: var(--line-2); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #101010; font-weight: 600; }
.btn.primary:hover { background: #D6F03C; border-color: #D6F03C; }
.btn.primary:disabled { background: var(--surface-2); border-color: var(--line-2); color: var(--faint); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 12px; }

h1 { font-family: var(--font-display); font-size: 38px; font-weight: 700; letter-spacing: -0.026em; line-height: 1.05; margin: 0; }
h2 { font-size: 13px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin: 30px 0 14px; }
.chero { padding: 14px 0 22px; }
.ceyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.ctag { font-family: var(--font-display); font-size: clamp(38px, 8.5vw, 66px); font-weight: 700; letter-spacing: -0.03em; line-height: 0.96; color: var(--text); text-wrap: balance; }
.ctag .pop { color: var(--accent-ink); }
.ctagline { font-family: var(--font-display); font-size: clamp(17px, 3vw, 22px); font-weight: 600; letter-spacing: -0.012em; color: var(--muted); margin-top: 12px; }
.ctagline .pop { color: var(--accent-ink); }
.report { font-family: var(--mono); font-size: 12px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 14px; max-height: 300px; overflow: auto; color: var(--text); margin-top: 12px; }
.homestats { display: flex; gap: 12px; margin: 18px 0 4px; flex-wrap: wrap; }
.hstat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; flex: 1; min-width: 150px; }
.hstat .hk { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.hstat .hv { font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: -0.02em; margin-top: 5px; line-height: 1; }
.hstat.alert { border-color: var(--accent-line); }
.hstat.alert .hv { color: var(--accent-ink); }
.sub { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 5px; }
.back { font-family: var(--mono); font-size: 12px; color: var(--muted); display: inline-flex; gap: 6px; margin-bottom: 16px; cursor: pointer; }
.back:hover { color: var(--text); }
.rowflex { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; cursor: pointer; transition: border-color .14s, transform .14s; }
.pcard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.pcard .pn { font-size: 16px; font-weight: 500; }
.pcard .pc { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 3px; }
.pcard .bar { display: flex; height: 7px; border-radius: 100px; overflow: hidden; margin: 16px 0 10px; background: var(--sunk); }
.pcard .bar i { display: block; height: 100%; }
.pcard .foot { display: flex; align-items: center; justify-content: space-between; }
.miniacct { font-family: var(--mono); font-size: 12px; color: var(--muted); }

.gate { font-family: var(--mono); font-size: 11px; letter-spacing: 0.03em; padding: 4px 11px; border-radius: 100px; white-space: nowrap; }
.gate.locked { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.gate.ready { color: var(--good); background: var(--good-bg); border: 1px solid var(--good-line); }

.ledger { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; }
.stat.g { background: var(--good-bg); border-color: var(--good-line); } .stat.w { background: var(--warn-bg); border-color: var(--warn-line); }
.stat .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--faint); }
.stat.g .k { color: var(--good); } .stat.w .k { color: var(--warn); }
.stat .v { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 36px; letter-spacing: -0.02em; margin-top: 6px; line-height: 1; }
.stat.g .v { color: var(--good); } .stat.w .v { color: var(--warn); }

.gatebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.gatebar .acc { font-family: var(--mono); font-size: 13px; color: var(--muted); } .gatebar .acc b { color: var(--text); }

.nudge { display: flex; align-items: center; gap: 12px; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 10px; padding: 12px 16px; margin: 16px 0; color: var(--warn); font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 8px; }
.asset { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; transition: border-color .14s, transform .14s; }
.asset:hover { border-color: var(--line-2); transform: translateY(-2px); }
.asset.flag { border-color: var(--warn-line); }
.thumb { aspect-ratio: 4/3; display: grid; place-items: center; font-family: var(--mono); font-size: 22px; color: #cfd6e6; position: relative; }
.ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: #131316; color: var(--faint); }
.ph svg { width: 24px; height: 24px; opacity: 0.7; }
.ph .phtxt { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.ph.big svg { width: 42px; height: 42px; }
.ph.big .phtxt { font-size: 12px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.asset .info { padding: 11px 13px; }
.asset .an { font-size: 13.5px; }
.asset .av { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 2px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; padding: 4px 9px; border-radius: 100px; margin-top: 9px; }
.pill.approved { color: var(--good); background: var(--good-bg); border: 1px solid var(--good-line); }
.pill.needs { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.pill.pending { color: var(--muted); background: var(--sunk); border: 1px solid var(--line-2); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.filters { display: flex; gap: 8px; margin: 18px 0 4px; flex-wrap: wrap; }
.filters .f { font-family: var(--mono); font-size: 12px; padding: 6px 12px; border-radius: 100px; border: 1px solid var(--line-2); color: var(--muted); cursor: pointer; background: transparent; }
.filters .f.active { color: #17170F; background: var(--accent); border-color: var(--accent); font-weight: 500; }

.overlay { position: fixed; inset: 0; background: rgba(6,8,12,0.72); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 40; }
.modal { background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; width: min(680px, 100%); max-height: 88vh; overflow: auto; }
.modal .big { aspect-ratio: 16/10; display: grid; place-items: center; font-family: var(--mono); font-size: 48px; color: #cfd6e6; background: #121212; border-bottom: 1px solid var(--line); }
.modal .big img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.modal .mbody { padding: 20px 22px; }
.modal .mhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal h3 { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.vhist { margin: 16px 0 0; border-top: 1px solid var(--line); }
.vrow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; }
.vrow .vout { margin-left: auto; color: var(--muted); }
textarea { width: 100%; background: var(--sunk); border: 1px solid var(--line-2); border-radius: 8px; color: var(--text); font-family: var(--font); font-size: 14px; padding: 10px; resize: vertical; min-height: 70px; }
.mactions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.x { cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; background: none; border: none; }
.x:hover { color: var(--text); }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); font-family: var(--mono); font-size: 13px; padding: 11px 18px; border-radius: 100px; z-index: 60; box-shadow: 0 8px 30px rgba(0,0,0,0.4); }
.toast.good { border-color: var(--good-line); color: var(--good); }
.empty { color: var(--faint); font-family: var(--mono); font-size: 13px; padding: 20px 0; }
.welcome { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin: 10px 0 8px; }
.welcome h3 { margin: 0 0 10px; font-size: 17px; font-weight: 500; }
.welcome ol { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.briefbox { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 15px 18px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.briefbox.muted { color: var(--faint); }
.subtle { color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
.inp { width: 100%; background: var(--sunk); border: 1px solid var(--line-2); border-radius: 8px; color: var(--text); font-family: var(--font); font-size: 14px; padding: 10px; }
.folderhead { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.folderhead .fcount { color: var(--faint); background: var(--sunk); border-radius: 100px; padding: 1px 8px; font-size: 11px; }
.pkg { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; background: var(--surface); }
.pkghead { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; }
.pkghead::-webkit-details-marker { display: none; }
.pkgleft { display: flex; align-items: center; gap: 10px; min-width: 0; }
.caret { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--sunk); border: 1px solid var(--line-2); color: var(--muted); font-size: 15px; line-height: 1; transition: transform .15s, background .14s, color .14s; }
.pghead:hover .caret, .pkghead:hover .caret { color: var(--text); background: var(--surface-2); }
.pkg[open] .caret { transform: rotate(90deg); }
.pkgname { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.pkgcount { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.pkgmeta { display: flex; align-items: center; gap: 12px; flex: none; }
.pkgbar { width: 84px; height: 6px; border-radius: 100px; background: var(--sunk); overflow: hidden; }
.pkgbar i { display: block; height: 100%; background: var(--good); }
.pkgnum { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pchip { font-family: var(--mono); font-size: 11px; padding: 3px 10px; border-radius: 100px; background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); white-space: nowrap; }
.pchip.done { background: var(--good-bg); color: var(--good); border-color: var(--good-line); }
.pkg[open] .pkghead { border-bottom: 1px solid var(--line); }
.pkggrid { padding: 16px; }
.pkgtools { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.pkgsearch { flex: 1; max-width: 340px; }
.shottype { font-family: var(--mono); font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.shottype:not(:first-child) { margin-top: 22px; }
.shottype .stcount { color: var(--faint); background: var(--sunk); border-radius: 100px; padding: 1px 8px; }
@media (max-width: 620px) {
  .pkgbar { display: none; }
  .pkgname { font-size: 14px; }
  .pkgsearch { max-width: none; }
  .pkghead { flex-wrap: wrap; row-gap: 10px; }
  .pkgleft { flex: 1 1 100%; }
  .pkgcount { white-space: nowrap; }
  .pkgmeta { flex: 1 1 100%; justify-content: flex-start; flex-wrap: wrap; gap: 10px; }
}
.progress { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 16px 0 4px; }
.progress .ptop { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.progress .pnum { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.pbar { display: flex; height: 10px; border-radius: 100px; overflow: hidden; background: var(--sunk); }
.pbar i { display: block; height: 100%; }
.plegend { display: flex; gap: 16px; margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.plegend span { display: flex; align-items: center; gap: 6px; }
.checklist { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.check { display: flex; align-items: center; gap: 12px; padding: 11px 15px; border-top: 1px solid var(--line); }
.check:first-child { border-top: 0; }
.check .box { width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: 12px; color: var(--good); flex: none; }
.check.done .box { border-color: var(--good-line); background: var(--good-bg); }
.check.done .cname > span:first-child { color: var(--muted); }
.check .cname { flex: 1; min-width: 0; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.check .coutstanding { font-family: var(--mono); font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check .cnum { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.check .ctogo { font-family: var(--mono); font-size: 11px; color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 100px; padding: 2px 9px; white-space: nowrap; flex: none; }
.check .cst { font-family: var(--mono); font-size: 11px; color: var(--warn); flex: none; }
.cksummary { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.ckallgood { font-family: var(--mono); font-size: 13px; color: var(--good); padding: 14px 16px; border: 1px solid var(--good-line); background: var(--good-bg); border-radius: 10px; }
.ckcompleted { margin-top: 12px; }
.ckcompleted > summary { list-style: none; cursor: pointer; font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 4px 0; }
.ckcompleted > summary::-webkit-details-marker { display: none; }
.ckcompleted > summary::before { content: "▸ "; color: var(--faint); }
.ckcompleted[open] > summary::before { content: "▾ "; }
.ckcompleted .check.done { opacity: 0.75; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.compare .pane { background: var(--sunk); }
.compare .cimg { aspect-ratio: 4/3; display: grid; place-items: center; background: #121212; }
.compare .cimg img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.compare .clab { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: center; padding: 7px; }
.vrow.clickable { cursor: pointer; }
.vrow.clickable:hover { color: var(--text); }
.cardfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; }
.dlbtn { background: transparent; border: 1px solid var(--line-2); border-radius: 6px; width: 27px; height: 27px; display: grid; place-items: center; cursor: pointer; color: var(--muted); flex: none; }
.dlbtn:hover { color: var(--text); background: var(--surface-2); }
.dlbtn:disabled { opacity: 0.3; cursor: not-allowed; }
.dlbtn:disabled:hover { background: transparent; color: var(--muted); }
.dlbtn svg { width: 14px; height: 14px; }
.bell { position: relative; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; color: var(--text); }
.bell:hover { background: var(--btn-hover); }
.bell svg { width: 17px; height: 17px; }
.bcount { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; background: var(--accent); color: #17170F; border-radius: 100px; font-family: var(--mono); font-weight: 500; font-size: 10px; place-items: center; display: none; }
.notiflist { display: flex; flex-direction: column; margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.notif { padding: 12px 14px; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.5; }
.notif:first-child { border-top: 0; }
.notif.unread { background: var(--accent-bg); }
.notif .ntime { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.newtag { display: inline-block; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: #17170F; background: var(--accent); border-radius: 3px; padding: 1px 6px; vertical-align: 1px; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--accent-bg); border: 1px solid var(--accent-line); border-radius: 12px; padding: 14px 16px; margin: 6px 0 14px; }
.cta b { font-size: 15px; }
.sect { margin: 22px 0 0; }
.sect > summary { list-style: none; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.sect > summary::-webkit-details-marker { display: none; }
.sect > summary::before { content: "▸"; font-size: 11px; color: var(--faint); transition: transform .15s; }
.sect[open] > summary::before { transform: rotate(90deg); }
.pin { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent); color: #0b0f1c; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 500; box-shadow: 0 2px 6px rgba(0,0,0,0.4); }
.pin span, .pin { }
.pin.tmp { background: var(--warn); }
.big { position: relative; }
.big.pinnable { cursor: crosshair; }
.comments { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.clist { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.cmt { background: var(--sunk); border-radius: 8px; padding: 9px 12px; font-size: 13.5px; line-height: 1.5; }
.cmt .cmeta { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-bottom: 3px; display: flex; align-items: center; gap: 6px; }
.pinnum { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: #0b0f1c; display: inline-grid; place-items: center; font-size: 10px; }
.cadd { display: flex; gap: 8px; }
.cadd .inp { flex: 1; }
.pinhint { margin-top: 8px; }
.pinhint a { color: var(--accent-ink); cursor: pointer; text-decoration: underline; }
@media (max-width: 620px) { .compare { grid-template-columns: 1fr; } }
.spinner-overlay { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(14,14,16,0.45); z-index: 90; }
.spinner-overlay.hidden { display: none; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .spinner { animation-duration: 1.6s; } }
@media (max-width: 620px) { .ledger { grid-template-columns: repeat(2,1fr); } .wrap { padding: 18px 16px 70px; } }

/* ---- Full-screen mobile review ---- */
body.rv-open { overflow: hidden; }
#reviewer { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; }
.rv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.rv-x { background: none; border: none; color: var(--text); font-size: 20px; line-height: 1; padding: 0 4px; cursor: pointer; }
.rv-count { font-variant-numeric: tabular-nums; }
.rv-proj { color: var(--faint); max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.rv-stage { flex: 1; position: relative; background: var(--sunk); display: flex; align-items: center; justify-content: center; overflow: hidden; min-height: 0; user-select: none; }
.rv-stage img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-user-drag: none; }
.rv-noimg { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--faint); font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.rv-noimg svg { width: 46px; height: 46px; }
.rv-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.rv-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }
.rv-dots i.on { background: var(--accent); width: 16px; border-radius: 20px; }
.rvpin { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent); color: #0D0D0D; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,0.4); }
.rvpin.tmp { opacity: 0.7; }
.rv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); font-size: 22px; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.rv-nav.prev { left: 10px; } .rv-nav.next { right: 10px; }
.rv-meta { padding: 13px 16px 0; }
.rv-nm { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.rv-sub { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 3px; }
.rv-hint { font-size: 11px; color: var(--faint); margin-top: 10px; }
.rv-actions { display: flex; flex-direction: column; gap: 9px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); margin-top: 12px; }
.rv-req, .rv-app, .rv-send { width: 100%; height: 50px; border-radius: 13px; font-family: var(--font); font-size: 14.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 1px solid transparent; }
.rv-req { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
.rv-app { background: var(--accent); color: #0D0D0D; }
.rv-req:active, .rv-app:active, .rv-send:active { transform: scale(0.99); }
.rv-sheetwrap { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,0.55); display: flex; align-items: flex-end; }
.rv-sheet { width: 100%; background: var(--surface); border-top: 1px solid var(--line-2); border-radius: 18px 18px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); }
.rv-grab { width: 34px; height: 4px; border-radius: 20px; background: var(--line-2); margin: 0 auto 14px; }
.rv-sheet h4 { margin: 0 0 4px; font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.rv-sh { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.rv-ta { width: 100%; height: 82px; background: var(--sunk); border: 1px solid var(--line-2); border-radius: 10px; color: var(--text); font-family: var(--font); font-size: 14px; padding: 10px; resize: none; }
.rv-send { margin-top: 10px; }
.rv-done { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 6px; }
.rv-check { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #0D0D0D; display: grid; place-items: center; font-size: 30px; margin-bottom: 10px; }
.rv-done h2 { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; text-transform: none; color: var(--text); margin: 0; }
.rv-done p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 16px; max-width: 34ch; }
/* On wider screens the reviewer is genuinely full-screen: the image fills the width, controls stay centered and comfortable */
@media (min-width: 760px) {
  #reviewer { max-width: none; margin: 0; border: none; }
  .rv-top, .rv-meta, .rv-actions { max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; }
  .rv-actions { flex-direction: row; }
  .rv-sheet { max-width: 560px; margin: 0 auto; border-radius: 18px; }
  .rv-sheetwrap { align-items: center; padding: 24px; }
}

/* ---- Reviewer image zoom ---- */
.rv-stage { touch-action: none; }
.rv-stage img { will-change: transform; }
.rv-stage.zoomed { cursor: grab; }
.rv-stage.zoomed .rv-dots, .rv-stage.zoomed .rv-nav, .rv-stage.zoomed .rvpin { display: none; }
.rv-zoom { position: absolute; right: 10px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.rv-zoom button { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); font-size: 19px; line-height: 1; display: grid; place-items: center; cursor: pointer; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.rv-zoom button:active { transform: scale(0.94); }

/* ---- Client accounts (retainer umbrellas) ---- */
.flab { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); margin: 14px 0 6px; }
.acchero { position: relative; }
.acclogo { max-height: 54px; max-width: 180px; object-fit: contain; border-radius: 6px; display: block; margin-bottom: 14px; }
.acclogo.sm { max-height: 40px; max-width: 120px; margin: 0; }
.acclogo.xs { max-height: 26px; max-width: 60px; margin: 0; border-radius: 4px; }
.accdot { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); display: inline-grid; place-items: center; font-family: var(--mono); font-size: 11px; color: var(--muted); }

.accbar { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 8px; }
.astat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px 18px; flex: 1; min-width: 140px; }
.astat .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); }
.astat .v { font-family: var(--font-display); font-weight: 700; font-size: 24px; margin-top: 5px; line-height: 1.05; }
.astat .v.pop { color: var(--accent-ink); }

.month { border: 1px solid var(--line); border-radius: 14px; margin-top: 14px; overflow: hidden; background: var(--surface); }
.month summary { list-style: none; cursor: pointer; }
.month summary::-webkit-details-marker { display: none; }
.mhead { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.mcaret { color: var(--faint); font-size: 11px; transition: transform .15s; }
.month details[open] .mcaret { transform: rotate(90deg); }
.mtitle { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.mmeta { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.mspacer { flex: 1; }
.mchip { font-family: var(--mono); font-size: 10px; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.mchip.live { color: var(--accent-ink); background: var(--accent-bg); border: 1px solid var(--accent-line); }
.mchip.done { color: var(--good); background: var(--good-bg); border: 1px solid var(--good-line); }
.mchip.soon { color: var(--faint); background: var(--surface-2); border: 1px solid var(--line-2); }

.brands { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 2px 16px 18px; }
.brandcard { background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; display: flex; flex-direction: column; gap: 10px; }
.brandcard.attention { border-color: var(--warn-line); }
.btop { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.bname { font-size: 15px; font-weight: 600; }
.bsub { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 2px; }
.bchip { font-family: var(--mono); font-size: 10px; padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
.bchip.done { color: var(--good); background: var(--good-bg); border: 1px solid var(--good-line); }
.bchip.review { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.bchip.prod { color: var(--faint); background: var(--surface-2); border: 1px solid var(--line-2); }
.bbar { height: 7px; border-radius: 20px; background: var(--line); overflow: hidden; display: flex; }
.bbar i { height: 100%; }
.bfoot { display: flex; align-items: center; justify-content: space-between; }
.bcount { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.bbtn { font-size: 12.5px; font-weight: 600; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); cursor: pointer; }
.bbtn.primary { background: var(--accent); border-color: var(--accent); color: #0D0D0D; }
.bbtn:disabled { opacity: 0.45; cursor: default; }

.brows { padding: 2px 8px 4px; }
.brow { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 9px; cursor: pointer; }
.brow:hover { background: var(--surface-2); }
.brow .bn { font-weight: 600; font-size: 14px; min-width: 120px; }
.brow .bmeta { flex: 1; font-family: var(--mono); font-size: 12px; color: var(--muted); }
@media (max-width: 620px) { .brands { grid-template-columns: 1fr; } .brow { flex-wrap: wrap; } .brow .bmeta { flex-basis: 100%; order: 3; } }

/* ---- Prominent back button (brand / account context) ---- */
.backbtn { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 100px; padding: 9px 16px 9px 12px; cursor: pointer; margin-bottom: 18px; transition: background .14s, border-color .14s, transform .08s; }
.backbtn:hover { background: var(--btn-hover); border-color: var(--faint); }
.backbtn:active { transform: scale(0.97); }
.backbtn svg { width: 16px; height: 16px; color: var(--accent-ink); }

/* ---- Change-request reference image ---- */
.refprev { margin: 8px 0 2px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.refthumb { max-width: 120px; max-height: 92px; border-radius: 8px; border: 1px solid var(--line-2); cursor: pointer; display: block; margin-top: 8px; }
.reflink { color: var(--accent-ink); cursor: pointer; font-size: 12px; }
.rv-ref { width: 100%; height: 44px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); font-family: var(--font); font-size: 13px; font-weight: 500; margin-top: 10px; cursor: pointer; }
.rv-ref:active { transform: scale(0.99); }

/* ---- Theme: keep the immersive image reviewer dark in BOTH themes ---- */
/* reviewer now follows the current theme */
/* Light theme: the white "VIDEO CARTEL" logo needs inverting to read on a light bar */
:root[data-theme="light"] .logo { filter: invert(1); }
/* Light theme: dark image stages stay dark; their placeholder text can be a touch dimmer */
:root[data-theme="light"] .modal .big, :root[data-theme="light"] .compare .cimg { color: #9aa0ad; }

/* ---- Grouped product uploads ---- */
.pgroup { margin: 0 0 14px; }
.pghead { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; list-style: none; cursor: pointer; }
.pghead::-webkit-details-marker { display: none; }
.pgroup[open] > .pghead { margin-bottom: 10px; }
.pgroup[open] .caret { transform: rotate(90deg); }
.pghead .pgn { font-weight: 600; font-size: 14px; }
.pghead .fcount { color: var(--faint); background: var(--sunk); border-radius: 100px; padding: 1px 8px; font-size: 11px; font-family: var(--mono); }
.pghead .btn.sm { margin-left: auto; }
.pghead .btn.sm.ghost { margin-left: auto; padding: 6px 9px; }
.pghead .btn.sm.ghost + .btn.sm { margin-left: 0; }
/* Placeholder tiles — show clients where uploads will land, before anything is added */
.phbox { width: 100%; aspect-ratio: 4/3; border: 1.5px dashed var(--line-2); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--faint); font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; background: var(--sunk); cursor: pointer; transition: border-color .14s, color .14s, background .14s; }
.phbox:hover { border-color: var(--accent); color: var(--muted); }
.phbox .phi { font-size: 22px; line-height: 1; opacity: .6; }
/* Drag & drop zone around each upload section */
.dropzone { border-radius: 14px; padding: 4px; transition: background .14s, box-shadow .14s; }
.dropzone.dragover { background: var(--accent-bg); box-shadow: inset 0 0 0 2px var(--accent); }
.dzhint { font-family: var(--mono); font-size: 11.5px; color: var(--faint); margin: 10px 4px 0; }
.dropzone.dragover .dzhint { color: var(--accent-ink); }
/* Folder tile — a whole dropped folder shown as one box in the grid */
.foldertile { display: block; border: none; background: none; padding: 0; margin: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.ft-thumb { aspect-ratio: 4/3; border-radius: 12px; border: 1px solid var(--line-2); background: var(--sunk) center/cover no-repeat; position: relative; transition: border-color .14s, transform .14s; }
.foldertile:hover .ft-thumb { border-color: var(--accent); transform: translateY(-2px); }
.ft-thumb:not(.has-cover)::after { content: "📁"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 36px; opacity: .5; }
.ft-thumb.has-cover { background-color: var(--surface-2); }
.ft-thumb.has-cover::before { content: ""; position: absolute; inset: 0; border-radius: 11px; background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.45) 100%); }
.ft-badge { position: absolute; left: 8px; bottom: 8px; font-family: var(--mono); font-size: 11px; background: rgba(10,10,10,.72); color: #fff; padding: 3px 9px; border-radius: 20px; backdrop-filter: blur(2px); z-index: 1; }
.ft-name { margin-top: 8px; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Folder modal */
.foldermodal .fm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.fm-name { flex: 1; font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.fm-count { font-family: var(--mono); font-size: 12px; color: var(--faint); white-space: nowrap; }
.fm-x { background: transparent; border: none; color: var(--faint); font-size: 16px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.fm-x:hover { color: var(--text); }
/* What's-new banner (client review tab) */
.whatsnew { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; margin: 0 0 14px; padding: 12px 16px; border-radius: 12px; background: var(--accent-bg); border: 1px solid var(--accent-line); color: var(--text); font-size: 14px; cursor: pointer; }
.whatsnew:hover { border-color: var(--accent); }
.whatsnew b { color: var(--accent-ink); }
.wn-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-bg); }
.wn-go { margin-left: auto; color: var(--accent-ink); font-family: var(--mono); }
/* Messages panel (client + studio) */
.msgpanel { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin: 26px 0 0; padding: 4px 16px 14px; }
.msgpanel > summary { list-style: none; cursor: pointer; font-weight: 500; font-size: 14px; padding: 12px 0; display: flex; align-items: center; gap: 8px; }
.msgpanel > summary::-webkit-details-marker { display: none; }
.msgpanel > summary::before { content: "▸"; color: var(--faint); font-size: 11px; transition: transform .15s; }
.msgpanel[open] > summary::before { transform: rotate(90deg); }
.msgpanel-h { font-weight: 500; font-size: 14px; padding: 12px 0 10px; display: flex; align-items: center; gap: 8px; }
.msgn { font-family: var(--mono); font-size: 10px; background: var(--accent); color: #0D0D0D; border-radius: 20px; padding: 1px 7px; }
.msglist { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; padding: 4px 0 12px; }
.msg { max-width: 84%; padding: 9px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; }
.msg .msgmeta { font-family: var(--mono); font-size: 10px; color: var(--faint); margin-bottom: 3px; }
.msg.from-client { align-self: flex-end; background: var(--accent-bg); border: 1px solid var(--accent-line); }
.msg.from-studio { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line-2); }
.msgcompose { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 12px; }
.msgcompose textarea { flex: 1; min-height: 40px; }
/* Studio: deadline control + stats + needs-you-now queue */
.duerow { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; }
.duek { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.duein { width: auto; padding: 7px 10px; font-size: 13px; color-scheme: dark; }
:root[data-theme="light"] .duein { color-scheme: light; }
.duechip { font-family: var(--mono); font-size: 10.5px; padding: 3px 9px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.duechip.soon { background: var(--accent-bg); border-color: var(--accent-line); color: var(--accent-ink); }
.duechip.over { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.sstats { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0 4px; }
.sstat { flex: 1; min-width: 120px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 15px; }
.sstat .k { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.sstat .v { font-family: var(--font-display); font-weight: 700; font-size: 24px; margin-top: 5px; line-height: 1; }
.qcount { font-family: var(--mono); font-size: 12px; background: var(--warn); color: #101010; border-radius: 20px; padding: 1px 9px; vertical-align: 3px; }
.queue { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.qrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; cursor: pointer; transition: border-color .14s, transform .12s; }
.qrow:hover { border-color: var(--line-2); transform: translateY(-1px); }
.qn { font-weight: 600; font-size: 14.5px; display: flex; flex-direction: column; gap: 2px; }
.qn .qc { font-family: var(--mono); font-size: 11px; color: var(--faint); font-weight: 400; }
.qchips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.qchip { font-family: var(--mono); font-size: 10.5px; padding: 3px 9px; border-radius: 20px; white-space: nowrap; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); }
.qchip.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.qchip.msg { background: var(--accent-bg); border-color: var(--accent-line); color: var(--accent-ink); }
.qchip.soon { background: var(--accent-bg); border-color: var(--accent-line); color: var(--accent-ink); }
.qchip.over { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
/* Client deadline line */
.cdue { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.cdue b { color: var(--text); }
/* Concept direction (AI) badge */
.conctag { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: #0D0D0D; background: var(--accent); padding: 1px 7px; border-radius: 20px; margin-left: 2px; }
.asset.conc { border-color: var(--accent-line); }
.concpending { font-family: var(--mono); font-size: 12.5px; color: var(--accent-ink); background: var(--accent-bg); border: 1px solid var(--accent-line); border-radius: 10px; padding: 11px 14px; }
/* Brief guide — collapsible checklist of what to include */
.briefguide { border: 1px solid var(--line); border-radius: 12px; background: var(--sunk); padding: 2px 14px; margin: 0 0 14px; }
.briefguide > summary { list-style: none; cursor: pointer; font-weight: 500; font-size: 13.5px; color: var(--muted); padding: 11px 0; display: flex; align-items: center; gap: 9px; }
.briefguide > summary::-webkit-details-marker { display: none; }
.briefguide > summary::before { content: "▸"; color: var(--faint); font-size: 11px; transition: transform .15s; }
.briefguide[open] > summary::before { transform: rotate(90deg); }
.bgnote { margin: 2px 0 10px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.bgnote b { color: var(--text); font-weight: 600; }
.bgopt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-ink); }
.bglist { margin: 0 0 12px; padding-left: 20px; color: var(--muted); font-size: 13.5px; line-height: 1.75; }
.bglist li { margin: 0 0 3px; }
.bglist b { color: var(--text); font-weight: 600; }
/* Uploaded brief document chip */
.docchip { display: inline-flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 9px 14px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; }
.docchip a { color: var(--text); text-decoration: none; font-size: 13.5px; }
.docchip a:hover { text-decoration: underline; }
.docchip .x { background: transparent; border: none; color: var(--faint); cursor: pointer; font-size: 13px; padding: 2px 4px; border-radius: 6px; }
.docchip .x:hover { color: var(--warn); }
/* Dictate button while recording */
.btn.rec { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.btn.rec:hover { background: var(--warn-bg); }
/* ---- Interactive live guide (client) ---- */
.guidehead { font-family: var(--font-display); font-size: clamp(24px, 4.5vw, 34px); font-weight: 700; letter-spacing: -.02em; margin: 18px 0 14px; }
.guidehead .pop { color: var(--accent); }
.vguide { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px 20px; margin: 0 0 26px; }
.vstep { display: flex; gap: 18px; padding: 16px 0; position: relative; border: none; background: none; text-align: left; width: 100%; }
.vstep:not(:last-child) { border-bottom: 1px solid var(--line); }
.vstep:not(:last-child)::before { content: ""; position: absolute; left: 22px; top: 52px; bottom: -1px; width: 2px; background: var(--line-2); }
.vstep.done:not(:last-child)::before { background: var(--accent); }
.vstep.click { cursor: pointer; }
.vstep.click:hover .vtitle { color: var(--accent); }
.vdot { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-weight: 500; font-size: 16px; border: 2px solid var(--line-2); color: var(--faint); background: var(--sunk); z-index: 1; }
.vstep.done .vdot { background: var(--accent); border-color: var(--accent); color: #0D0D0D; }
.vstep.current .vdot { border-color: var(--accent); color: var(--accent-ink); }
.vbody { padding-top: 5px; }
.vtitle { font-family: var(--font-display); font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vstep.todo .vtitle { color: var(--muted); }
.vdesc { margin-top: 3px; color: var(--faint); font-size: 13.5px; line-height: 1.55; }
.gbadge { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-bg); border: 1px solid var(--accent-line); padding: 2px 8px; border-radius: 20px; }
.vdone { font-family: var(--mono); font-size: 11px; color: var(--good); }
/* Slim strip on the review tab */
.sguide { display: flex; gap: 8px; margin: 14px 0 18px; flex-wrap: wrap; }
.spill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 100px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 500; }
.spill .sp-n { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid var(--line-2); font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.spill.done { border-color: var(--accent-line); background: var(--accent-bg); color: var(--accent-ink); }
.spill.done .sp-n { background: var(--accent); border-color: var(--accent); color: #0D0D0D; }
.spill.current { border-color: var(--accent); color: var(--text); }
.spill.current .sp-n { border-color: var(--accent); color: var(--accent-ink); }
.spill.click { cursor: pointer; }
.spill.click:hover { border-color: var(--accent); color: var(--text); }
.spill[disabled] { cursor: default; opacity: .85; }
.sgprog { margin: 0 0 18px; }
.sgbar { height: 7px; border-radius: 20px; background: var(--sunk); overflow: hidden; display: flex; }
.sgbar i { height: 100%; }
.sglegend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.sglegend .sgpct { color: var(--muted); }
.sglegend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
/* Numbered setup steps on the brief tab (Brief / Product images / References) */
.setupintro { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 16px 0 16px; }
.setupstep { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 20px; margin: 0 0 16px; }
.sshead { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.ssnum { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #0D0D0D; font-family: var(--mono); font-weight: 500; font-size: 14px; display: grid; place-items: center; }
.sstitle { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.setupstep .subtle { margin-top: 0; }
/* Ghost icon buttons: warn variant (delete) */
.btn.ghost.warn { color: var(--faint); }
.btn.ghost.warn:hover { color: var(--warn); border-color: var(--warn-line); }
/* Brief editor with an attached Save button, so it reads as part of the typing area */
.briefedit { position: relative; }
.briefedit textarea { padding-bottom: 46px; min-height: 120px; }
.briefedit .savebrief { position: absolute; right: 10px; bottom: 10px; }
/* Per-file manage controls on client uploads */
.reftile .thumb { position: relative; }
.refx { position: absolute; top: 7px; right: 7px; width: 26px; height: 26px; border-radius: 50%; border: none; cursor: pointer; background: rgba(10,10,10,.72); color: #fff; font-size: 13px; line-height: 1; display: grid; place-items: center; backdrop-filter: blur(2px); transition: background .14s; }
.refx:hover { background: var(--warn); color: #101010; }
.reftile .refacts { display: flex; gap: 12px; margin-top: 5px; }
.lnk { background: none; border: none; padding: 0; cursor: pointer; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.lnk:hover { color: var(--text); text-decoration: underline; }
.lnk.warn { color: var(--faint); }
.lnk.warn:hover { color: var(--warn); }

/* ---- Fullscreen/zoom button on the studio modal image ---- */
.modal .big { position: relative; }
.expandbtn { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 9px; background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.25); color: #fff; display: grid; place-items: center; cursor: pointer; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.expandbtn svg { width: 16px; height: 16px; }
.expandbtn:hover { background: rgba(0,0,0,0.7); }

/* Light theme: make the hero accent read as brand lime (highlight, since lime text is unreadable on white) */
:root[data-theme="light"] .ctag .pop,
:root[data-theme="light"] .ctagline .pop {
  color: #17170F;
  background: var(--accent);
  padding: 0 0.16em;
  border-radius: 5px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Light theme: same lime highlight on the "awaiting" stat numbers */
:root[data-theme="light"] .astat .v.pop,
:root[data-theme="light"] .hstat.alert .hv {
  color: #17170F;
  background: var(--accent);
  display: inline-block;
  padding: 0 0.18em;
  border-radius: 6px;
}
/* Light theme: lime highlight on the guide heading, and solid-lime current dots (a pale ring is invisible on white) */
:root[data-theme="light"] .guidehead .pop {
  color: #17170F;
  background: var(--accent);
  padding: 0 0.16em;
  border-radius: 5px;
}
:root[data-theme="light"] .vstep.current .vdot,
:root[data-theme="light"] .spill.current .sp-n {
  background: var(--accent);
  border-color: var(--accent);
  color: #17170F;
}

/* ---- Reviewer markup / draw ---- */
.rv-draw { position: absolute; left: 10px; bottom: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font); font-size: 12px; font-weight: 600; padding: 8px 13px; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); cursor: pointer; }
.rv-draw.on { background: var(--accent); color: #0D0D0D; border-color: var(--accent); }
.rv-drawbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: rgba(0,0,0,0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.rv-drawbar .dl { flex: 1; color: #fff; font-family: var(--mono); font-size: 11px; }
.rv-drawbar button { font-family: var(--font); font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 9px; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22); color: #fff; cursor: pointer; }
.rv-drawbar button.use { background: var(--accent); color: #0D0D0D; border-color: var(--accent); }
@media (max-width: 560px) { .rv-drawbar .dl { display: none; } .rv-drawbar { gap: 6px; } .rv-drawbar button { padding: 8px 10px; font-size: 12px; } }

/* ---- Tap image to fill the whole screen ---- */
#reviewer.rv-fill .rv-top, #reviewer.rv-fill .rv-meta, #reviewer.rv-fill .rv-actions, #reviewer.rv-fill .rv-draw { display: none !important; }
#reviewer.rv-fill .rv-stage { position: fixed; inset: 0; z-index: 82; background: var(--bg); }
.rv-fillx { position: absolute; top: 12px; right: 12px; z-index: 6; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); font-size: 17px; display: none; place-items: center; cursor: pointer; }
#reviewer.rv-fill .rv-fillx { display: grid; }
