/* Short Commerce portal, v2. Tokens come verbatim from docs/design/branding_visuals. */
@import "./tokens/colors.css?v=2";
@import "./tokens/typography.css";
@import "./tokens/spacing.css";
@import "./tokens/shape.css";

:root {
  --bar-h: 64px;
  --staffbar-h: 52px;
  --page-max: 1320px;
  --page-pad: clamp(20px, 4.5vw, 72px);
  --measure: 68ch;
  --positive: var(--accent-ink);
  --negative: var(--danger);
  --hairline: var(--border);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
  --drawer-w: 400px;
  --warn: #E0B25A;
  color-scheme: dark;
}
[data-theme="light"] { color-scheme: light; --warn: #8A5A00; }

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scrollbar-color: var(--border-strong) transparent;
}
body { margin: 0; min-height: 100vh; background: var(--bg); overflow-x: clip; }
::selection { background: var(--accent); color: var(--on-accent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
a { color: var(--accent-ink); text-decoration: none; transition: color var(--duration-fast) var(--ease); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
[x-cloak], [hidden] { display: none !important; }
.v2-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px; height: 15px; }

/* ---------- Controls ---------- */
.v2-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-accent); color: var(--text);
  font-weight: 600; font-size: 14px; letter-spacing: -0.005em; white-space: nowrap;
  transition: color var(--duration-fast) var(--ease), border-color var(--duration-fast) var(--ease), background var(--duration-fast) var(--ease);
}
.v2-pill:hover { color: var(--accent-hover); border-color: var(--accent); }
.v2-pill--solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.v2-pill--solid:hover { background: var(--accent-hover); color: var(--on-accent); }
.v2-pill--quiet { border-color: var(--border-strong); color: var(--text-2); }
.v2-pill--quiet:hover { border-color: var(--text-3); color: var(--text); }
.v2-pill--sm { height: 32px; padding: 0 13px; font-size: 13px; }
.v2-pill--danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.v2-pill--danger-solid:hover { background: color-mix(in srgb, var(--danger) 85%, #fff); border-color: transparent; color: #fff; }
.v2-pill[disabled] { opacity: .45; cursor: not-allowed; }
.v2-iconbtn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: var(--text-3); transition: color var(--duration-fast) var(--ease), background var(--duration-fast) var(--ease);
}
.v2-iconbtn:hover { color: var(--text); background: var(--surface-2); }
.v2-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--accent); color: var(--on-accent);
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.v2-count--quiet { background: var(--surface-raised); color: var(--text-2); }
.v2-status {
  display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px;
  border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
  border: 1px solid var(--border-strong); color: var(--text-2);
}
.v2-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.v2-status--published { color: var(--accent-ink); border-color: var(--border-accent); }
.v2-status--draft { color: var(--text-2); }
.v2-status--incomplete { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.v2-status--waiting { color: var(--text-3); border-style: dashed; }
.v2-input, .v2-textarea {
  width: 100%; background: var(--bg-deep); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font: inherit; font-size: 15px; line-height: 1.5; padding: 12px 14px;
  transition: border-color var(--duration-fast) var(--ease);
}
.v2-textarea { resize: vertical; min-height: 96px; }
.v2-input::placeholder, .v2-textarea::placeholder { color: var(--text-3); }
.v2-input:focus, .v2-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
[data-theme="light"] .v2-input, [data-theme="light"] .v2-textarea { background: #fff; }

/* ---------- App bar ---------- */
.v2-bar {
  position: sticky; top: 0; z-index: 30; height: var(--bar-h);
  display: flex; align-items: center; gap: 20px; padding: 0 var(--page-pad);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.v2-brand { display: inline-flex; align-items: center; flex: none; }
.v2-brand img { height: 18px; width: auto; display: block; }
.v2-brand .on-light { display: none; }
[data-theme="light"] .v2-brand .on-dark { display: none; }
[data-theme="light"] .v2-brand .on-light { display: block; }
.v2-bar-sep { width: 1px; height: 22px; background: var(--border-strong); flex: none; }
.v2-bar-title { min-width: 0; display: flex; align-items: baseline; gap: 12px; white-space: nowrap; overflow: hidden; }
.v2-bar-title strong { color: var(--text); font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.v2-bar-title span { color: var(--text-3); font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.v2-bar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.v2-back { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--text-3); font-size: 14px; font-weight: 500; }
.v2-back:hover { color: var(--text); }

/* Staff tabs (admin only) and the user menu, shared by every v2 screen. */
.v2-tabs { display: flex; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.v2-tabs a { height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: var(--radius-pill); color: var(--text-3); font-size: 14px; font-weight: 600; white-space: nowrap; }
.v2-tabs a:hover { color: var(--text); }
.v2-tabs a[aria-current="page"] { color: var(--text); background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--border-strong); }
[data-theme="light"] .v2-tabs a[aria-current="page"] { background: #fff; }
.v2-usermenu { position: relative; }
.v2-avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-left: 4px; border-radius: 50%; background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.v2-avatar:hover, .v2-avatar[aria-expanded="true"] { box-shadow: inset 0 0 0 1px var(--text-3); }
.v2-usermenu-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; width: 240px; padding: 8px;
  border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-card);
}
.v2-usermenu-pop .who { margin: 0 0 6px; padding: 8px 10px 12px; border-bottom: 1px solid var(--hairline); display: grid; gap: 2px; }
.v2-usermenu-pop .who b { color: var(--text); font-size: 14px; font-weight: 700; }
.v2-usermenu-pop .who span { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.v2-usermenu-pop a, .v2-usermenu-pop button { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 10px; border-radius: 8px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.v2-usermenu-pop a:hover, .v2-usermenu-pop button:hover { background: var(--surface-2); color: var(--text); }
.v2-theme-pick { display: grid; gap: 8px; margin: 0 0 6px; padding: 4px 10px 12px; border-bottom: 1px solid var(--hairline); }
.v2-theme-pick > span { font-size: 12px; font-weight: 600; color: var(--text-3); }
.v2-theme-pick .v2-segment { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v2-usermenu-pop .v2-theme-pick button {
  width: auto; height: 28px; padding: 0 8px; justify-content: center; border-radius: var(--radius-pill);
  color: var(--text-3); font-size: 13px; font-weight: 600;
}
.v2-usermenu-pop .v2-theme-pick button:hover { background: none; color: var(--text); }
.v2-usermenu-pop .v2-theme-pick button[aria-checked="true"] { background: var(--surface-raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
[data-theme="light"] .v2-usermenu-pop .v2-theme-pick button[aria-checked="true"] { background: #fff; }
/* The checked pill's own box-shadow otherwise wins the tie against :focus-visible and hides the ring. */
.v2-usermenu-pop .v2-theme-pick button:focus-visible { box-shadow: var(--focus); }

.v2-staffbar {
  position: sticky; top: var(--bar-h); z-index: 29; min-height: var(--staffbar-h);
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; padding: 10px var(--page-pad);
  background: var(--surface); border-bottom: 1px solid var(--hairline);
}
.v2-staffbar-note { color: var(--text-3); font-size: 13px; }
.v2-staffbar-note strong { color: var(--text-2); font-weight: 600; }
.v2-staffbar .v2-bar-actions { gap: 8px; }
.v2-segment { display: inline-flex; padding: 3px; border-radius: var(--radius-pill); background: var(--bg-deep); border: 1px solid var(--hairline); }
.v2-segment a { height: 28px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: var(--radius-pill); color: var(--text-3); font-size: 13px; font-weight: 600; }
.v2-segment a:hover { color: var(--text); }
.v2-segment a[aria-current="page"] { background: var(--surface-raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
[data-theme="light"] .v2-segment a[aria-current="page"] { background: #fff; }

.v2-notice {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  margin: 0 auto; max-width: var(--page-max); padding: 14px 20px; border-radius: var(--radius-md);
  border: 1px solid var(--border-strong); color: var(--text-2); font-size: 14px;
}
.v2-notice--danger { border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.v2-notice strong { color: var(--text); }
.v2-notices { display: grid; gap: 10px; padding: 20px var(--page-pad) 0; }

/* ---------- Deck ---------- */
/* The hero glow bleeds to the viewport edge; clip it at the deck column so the page never scrolls sideways. */
.v2-deck { position: relative; overflow-x: clip; }
.v2-page {
  max-width: var(--page-max); margin: 0 auto;
  padding: clamp(36px, 5vh, 64px) var(--page-pad) 160px;
  min-height: calc(100vh - var(--bar-h));
  scroll-margin-top: calc(var(--bar-h) + var(--staffbar-h) + 12px);
  /* Ledger figures size against the page column, which shrinks by the index column's width. */
  container-type: inline-size;
}
.v2-js .v2-deck--paged .v2-page:not(.is-active) { display: none; }
.v2-page.is-entering-next { animation: v2-turn-next var(--duration) var(--ease) both; }
.v2-page.is-entering-prev { animation: v2-turn-prev var(--duration) var(--ease) both; }
@keyframes v2-turn-next { from { opacity: 0; transform: translateX(32px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes v2-turn-prev { from { opacity: 0; transform: translateX(-32px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@media (prefers-reduced-motion: reduce) { .v2-page.is-entering-next, .v2-page.is-entering-prev { animation: none; } }

.v2-page-head { display: flex; align-items: flex-start; gap: 24px; margin-bottom: clamp(28px, 4vh, 48px); }
.v2-page-no { font-size: 15px; font-weight: 800; color: var(--accent-ink); font-variant-numeric: tabular-nums; padding-top: 14px; min-width: 2.2ch; }
.v2-page-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 3.6vw, 52px); line-height: 1; letter-spacing: -0.03em; color: var(--text); text-wrap: balance; }
.v2-page-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; padding-top: 6px; }
.v2-internal { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: var(--radius-pill); border: 1px dashed var(--border-strong); color: var(--text-3); font-size: 12px; font-weight: 600; }

/* Page 01: the week and its steering metric */
.v2-page--hero { position: relative; isolation: isolate; }
.v2-page--hero::before {
  content: ""; position: absolute; inset: calc(-1 * var(--bar-h)) calc(50% - 50vw) auto calc(50% - 50vw); height: 720px;
  background: var(--bg-glow-tr); pointer-events: none; z-index: -1;
}
.v2-hero-title { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px 28px; margin-bottom: clamp(32px, 5vh, 56px); }
.v2-hero-title h1 { margin: 0; font-weight: 800; font-size: clamp(64px, 8vw, 112px); line-height: .9; letter-spacing: -0.035em; color: var(--text); }
.v2-hero-title p { margin: 0 0 10px; font-family: var(--font-sub); font-size: clamp(18px, 1.6vw, 22px); color: var(--text-3); line-height: 1.35; }
.v2-hero-title p b { display: block; font-family: var(--font-sans); font-weight: 700; color: var(--text); font-size: 15px; letter-spacing: 0; margin-bottom: 2px; }

.v2-steer { display: grid; grid-template-columns: minmax(280px, 5fr) 7fr; gap: 24px clamp(24px, 4vw, 64px); align-items: end; }
.v2-steer-figure dt { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.v2-steer-value { padding-bottom: .14em; font-weight: 800; font-size: clamp(96px, 12vw, 176px); line-height: .82; letter-spacing: -0.045em; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.v2-steer-delta { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font-size: 16px; color: var(--text-3); }
.v2-delta { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.v2-delta .icon { width: 14px; height: 14px; stroke-width: 2; }
.v2-delta--up { color: var(--positive); }
.v2-delta--down {
  color: var(--negative); padding: 1px 7px 1px 5px; border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--negative) 13%, transparent);
}
.v2-delta--flat { color: var(--text-3); }
.v2-steer-target { margin-top: 8px; font-size: 14px; color: var(--text-3); }

.v2-trend { width: 100%; height: auto; overflow: visible; display: block; }
.v2-trend .grid { stroke: var(--hairline); stroke-width: 1; }
.v2-trend .area { fill: url(#v2-trend-fill); }
.v2-trend .line { fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.v2-trend .last-seg { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.v2-trend .dot { fill: var(--bg); stroke: var(--text-3); stroke-width: 2; }
.v2-trend .dot-now { fill: var(--accent); stroke: none; filter: drop-shadow(0 0 10px var(--glow-strong)); }
.v2-trend .tick { fill: var(--text-3); font-size: 12px; font-weight: 600; font-family: var(--font-sans); }
.v2-trend .tick-now { fill: var(--text); }
.v2-trend .val { fill: var(--text-3); font-size: 12px; font-weight: 600; font-family: var(--font-sans); font-variant-numeric: tabular-nums; }
.v2-trend .val-now { fill: var(--accent-ink); font-size: 14px; font-weight: 800; }
.v2-trend .target { stroke: var(--danger); stroke-dasharray: 4 5; stroke-width: 1.5; }
.v2-trend-caption { margin-top: 6px; font-size: 13px; color: var(--text-3); text-align: right; }

.v2-quote {
  overflow-wrap: anywhere;
  margin: clamp(36px, 6vh, 64px) 0 0; max-width: 30ch;
  font-style: italic; font-weight: 700; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.22; letter-spacing: -0.015em;
  color: var(--text); text-wrap: balance;
}

.v2-ledger {
  display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  margin: clamp(36px, 5vh, 56px) 0 0 -24px; border-top: 1px solid var(--hairline);
  clip-path: inset(0 0 0 24px);
}
.v2-ledger > div { padding: 22px 24px 24px; border-bottom: 1px solid var(--hairline); box-shadow: -1px 0 0 var(--hairline); min-width: 0; }
.v2-ledger dt { font-size: 13px; font-weight: 600; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.v2-ledger dt b { color: var(--text); font-weight: 700; }
.v2-ledger dd { margin: 10px 0 0; }
.v2-ledger .v { display: block; white-space: nowrap; font-size: clamp(26px, 3.2cqi, 36px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; color: var(--text); font-variant-numeric: tabular-nums; }
.v2-ledger .d { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-top: 10px; font-size: 13px; color: var(--text-3); }
.v2-ledger .v.is-neg { color: var(--negative); }

.v2-reading { margin-top: clamp(40px, 6vh, 72px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: var(--measure); }
.v2-reading-label { font-size: 13px; font-weight: 600; color: var(--text-3); }
.v2-reading > .v2-pill { justify-self: start; }

/* ---------- Prose ---------- */
.v2-prose { font-size: 18px; line-height: 1.62; color: var(--text-2); max-width: var(--measure); overflow-wrap: anywhere; }
.v2-prose > :first-child { margin-top: 0; }
.v2-prose > :last-child { margin-bottom: 0; }
.v2-prose p { margin: 0 0 1em; }
.v2-prose strong { color: var(--text); }
.v2-prose ul, .v2-prose ol { margin: 0 0 1em; padding-left: 1.2em; }
.v2-prose li { margin: .35em 0; }
.v2-prose li::marker { color: var(--accent-ink); }
.v2-prose--sm { font-size: 16px; line-height: 1.6; }

.v2-editable { position: relative; }
.v2-edit-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; margin-bottom: 12px;
  border-radius: var(--radius-pill); border: 1px solid var(--border-strong); color: var(--text-3); font-size: 13px; font-weight: 600;
}
.v2-edit-btn:hover { color: var(--text); border-color: var(--text-3); }
.v2-editor { display: grid; gap: 10px; max-width: var(--measure); }
.v2-editor .v2-textarea { min-height: 220px; font-size: 16px; }
.v2-editor-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.v2-editor-row .v2-input { flex: 1 1 220px; height: 40px; padding: 0 14px; font-size: 14px; }
.v2-editor-hint { font-size: 12px; color: var(--text-3); }

/* ---------- KPI dashboard ---------- */
.v2-kpis { --cols: 4; margin-top: 0; }
.v2-kpis .v { font-size: clamp(26px, 3.4cqi, 42px); }
.v2-kpis .prev { color: var(--text-3); }
.v2-sub { margin: clamp(48px, 7vh, 80px) 0 18px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.v2-sub small { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; color: var(--text-3); font-family: var(--font-sub); letter-spacing: 0; }

/* ---------- Tables ---------- */
.v2-table-wrap { max-width: 100%; overflow-x: auto; border-top: 1px solid var(--border-strong); scrollbar-width: thin; }
.v2-table-wrap[role="region"]:focus-visible { border-radius: 2px; }
/* A table that scrolls sideways shows a soft edge where more columns wait. On the bare page only the tint layer shows, so it carries the cue. */
.v2-table-wrap[role="region"] {
  background:
    linear-gradient(to left, var(--bg) 40%, transparent) right / 28px 100% no-repeat local,
    linear-gradient(to left, color-mix(in srgb, var(--text) 30%, transparent), transparent) right / 22px 100% no-repeat scroll;
}
.v2-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.v2-table th { text-align: right; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 12px 14px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.v2-table td { text-align: right; padding: 13px 14px; border-bottom: 1px solid var(--hairline); color: var(--text); white-space: nowrap; vertical-align: top; }
.v2-table th:first-child, .v2-table td:first-child { text-align: left; padding-left: 0; white-space: normal; }
.v2-table td:first-child { color: var(--text); font-weight: 600; min-width: 14ch; max-width: 34ch; overflow-wrap: break-word; }
.v2-table td .dl { display: block; margin-top: 3px; font-size: 12px; font-weight: 700; }
.v2-table tbody tr { transition: background var(--duration-fast) var(--ease); }
.v2-table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.v2-table .up { color: var(--positive); font-weight: 700; }
.v2-table .down { color: var(--negative); font-weight: 700; }
.v2-table .none { color: var(--text-3); }
.v2-table-title { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--text); }
.v2-page--store_performance .v2-table-block + .v2-table-block { margin-top: 56px; }
.v2-js .v2-table-fold:not(.is-all) tr.is-extra { display: none; }
.v2-fold-toggle {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; height: 32px;
  color: var(--text-2); font-size: 13px; font-weight: 600;
}
.v2-fold-toggle:hover { color: var(--text); }
.v2-fold-toggle .icon { transform: rotate(90deg); transition: transform var(--duration-fast) var(--ease); }
.v2-table-fold.is-all .v2-fold-toggle .icon { transform: rotate(-90deg); }
/* ---------- Next steps / deliveries: numbered actions on one rail ---------- */
.v2-actions { position: relative; max-width: 880px; }
.v2-actions ul, .v2-actions ol { list-style: none; margin: 0; padding: 0; counter-reset: step; position: relative; }
.v2-actions ul::before, .v2-actions ol::before {
  content: ""; position: absolute; left: 16px; top: 10px; bottom: 10px; width: 1px;
  background: linear-gradient(var(--border-strong), transparent);
}
.v2-actions li {
  counter-increment: step; position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr);
  padding: 12px 0 14px; font-size: 16px; line-height: 1.5; color: var(--text);
  border-bottom: 1px solid var(--hairline); margin: 0;
}
.v2-actions li::before {
  content: counter(step, decimal-leading-zero); position: relative; z-index: 1; align-self: start;
  display: inline-grid; place-items: center; width: 32px; height: 32px; margin-top: -4px; border-radius: 50%;
  background: var(--bg); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--border-strong);
  font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.v2-actions li:last-child { border-bottom: 0; }
.v2-actions p { max-width: var(--measure); font-size: 15px; color: var(--text-3); margin: 0 0 12px; font-family: var(--font-sub); }

/* ---------- Platforms ---------- */
.v2-platform { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 36px 0 48px; border-top: 1px solid var(--border-strong); }
.v2-platform + .v2-platform { margin-top: 8px; }
.v2-platform-name { display: flex; align-items: baseline; gap: 14px; margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.v2-platform-name small { font-size: 14px; font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.v2-platform-intro { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; min-width: 0; }
.v2-platform-region { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; padding-top: 24px; border-top: 1px solid var(--hairline); }
.v2-region-name { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.v2-platform--empty { display: block; padding: 24px 0; color: var(--text-3); }

.v2-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; margin-top: 12px; }
.v2-chart { margin: 0; padding: 22px 22px 16px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--hairline); }
.v2-chart figcaption { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.v2-chart .rpt-chart { position: relative; height: 240px; }
.v2-chart .rpt-chart svg, .v2-chart .rpt-chart img { width: 100%; height: 100%; }
.v2-chart-note { margin: 10px 0 0; font-size: 12px; color: var(--text-3); }

/* ---------- Strongest ads: the creative wall ---------- */
.v2-wall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.v2-wall--five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.v2-wall--five .v2-poster-roas b { font-size: clamp(32px, 3.2vw, 48px); }
.v2-poster { position: relative; display: flex; flex-direction: column; height: 100%; min-width: 0; }
.v2-poster-frame {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--hairline);
}
.v2-poster-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v2-poster-frame::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, color-mix(in srgb, var(--sc-black) 88%, transparent)); pointer-events: none; }
.v2-poster-frame.has-media::before { content: ""; position: absolute; inset: 0 0 70%; z-index: 1; background: linear-gradient(color-mix(in srgb, var(--sc-black) 55%, transparent), transparent); pointer-events: none; }
.v2-poster-format { position: absolute; top: 14px; right: 14px; z-index: 2; height: 26px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 13px; background: color-mix(in srgb, var(--sc-black) 55%, transparent); color: #fff; font-size: 12px; font-weight: 600; backdrop-filter: blur(6px); }
.v2-poster-concept { position: absolute; inset: 56px 22px auto; z-index: 1; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font-size: clamp(20px, 1.9vw, 28px); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; color: var(--text-3); overflow-wrap: anywhere; }
.v2-poster-frame.has-media .v2-poster-concept { display: none; }
.v2-poster-roas { position: absolute; left: 20px; right: 20px; bottom: 16px; z-index: 2; color: #fff; }
.v2-poster-roas b { display: block; font-size: clamp(44px, 4.6vw, 68px); font-weight: 800; letter-spacing: -0.04em; line-height: .9; font-variant-numeric: tabular-nums; }
.v2-poster-roas span { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.72); }
.v2-poster-name { margin: 14px 0 0; min-height: 2.7em; font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.v2-poster-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 12px 0 0; font-size: 13px; }
.v2-poster-stats div { display: grid; gap: 2px; }
.v2-poster-stats dt { color: var(--text-3); font-weight: 600; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.v2-poster-stats dd { margin: 0; color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.v2-poster-raw { margin: 4px 0 0; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; line-height: 1.4; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-poster-link { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.v2-poster-link:hover { color: var(--text); }

.v2-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
.v2-strip .v2-poster-frame { aspect-ratio: 4 / 5; border-radius: var(--radius-md); }
.v2-strip .v2-poster-concept { inset: 16px 14px auto; font-size: 14px; -webkit-line-clamp: 3; }
.v2-strip .v2-poster-roas { left: 14px; bottom: 12px; }
.v2-strip .v2-poster-roas b { font-size: 30px; }
.v2-strip .v2-poster-format { display: none; }
.v2-strip .v2-poster-name { font-size: 13px; margin-top: 10px; }
.v2-strip .v2-poster-stats { font-size: 12px; }

/* ---------- Launches ---------- */
.v2-launch-stat { display: flex; flex-wrap: wrap; gap: 24px 64px; margin-bottom: clamp(40px, 6vh, 64px); }
.v2-launch-stat div { display: grid; gap: 6px; }
.v2-launch-stat b { font-size: clamp(88px, 10vw, 150px); font-weight: 800; line-height: .82; letter-spacing: -0.05em; color: var(--text); font-variant-numeric: tabular-nums; }
.v2-launch-stat span { font-size: 16px; font-weight: 600; color: var(--text-2); }
.v2-launch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px clamp(28px, 4vw, 64px); }
.v2-launch-grid:has(> :only-child) { max-width: 640px; }
.v2-launch-quiet { margin: 8px 0 0; padding-top: 14px; border-top: 1px solid var(--hairline); max-width: 640px; }
.v2-launch-platform:has(.v2-names) + .v2-launch-quiet { margin-top: 0; border-top: 0; }
.v2-launch-quiet b { font-family: var(--font-sans); font-weight: 700; color: var(--text); margin-right: 4px; }
.v2-launch-col h3 { margin: 0 0 16px; padding-top: 18px; border-top: 1px solid var(--border-strong); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.v2-names { list-style: none; margin: 0 0 22px; padding: 0; }
.v2-names-label { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--text-3); }
.v2-launch-platform .v2-wall + .v2-names-label { margin-top: 56px; }
.v2-launch-platform .v2-names { margin-bottom: 0; }
.v2-names li { padding: 10px 0; border-bottom: 1px solid var(--hairline); font-size: 15px; font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.v2-empty { font-size: 16px; color: var(--text-3); font-family: var(--font-sub); }

/* ---------- Closing: meeting agenda ---------- */
.v2-close { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px clamp(32px, 5vw, 80px); align-items: start; }
.v2-agenda { padding: 28px 28px 24px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border-accent); }
.v2-agenda h3 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.v2-agenda > p { margin: 6px 0 20px; font-family: var(--font-sub); color: var(--text-3); font-size: 15px; }
.v2-agenda ol { list-style: none; margin: 0; padding: 0; counter-reset: q; }
.v2-agenda li { counter-increment: q; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px; padding: 14px 0; border-top: 1px solid var(--hairline); }
.v2-agenda li::before { content: counter(q) "."; font-weight: 800; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.v2-agenda li p { margin: 0; color: var(--text); font-size: 15px; line-height: 1.5; }
.v2-agenda li small { display: block; margin-top: 4px; color: var(--text-3); font-size: 12px; }
.v2-agenda li small a { font-weight: 600; }
.v2-signoff { margin-top: clamp(64px, 10vh, 120px); padding-top: 28px; border-top: 1px solid var(--hairline); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--text-3); font-size: 13px; }
.v2-signoff b { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }

/* ---------- Rail ---------- */
.v2-rail {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 4px; padding: 6px; max-width: calc(100vw - 32px);
  border-radius: var(--radius-pill); background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
[data-theme="light"] .v2-rail { box-shadow: 0 16px 40px rgba(10,10,10,.14); }
.v2-rail-step { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--text-2); }
.v2-rail-step:hover:not([disabled]) { background: var(--surface-raised); color: var(--text); }
.v2-rail-step[disabled] { opacity: .3; cursor: default; }
.v2-rail-ticks { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.v2-tick {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: var(--radius-pill);
  color: var(--text-3); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
  transition: color var(--duration-fast) var(--ease), background var(--duration) var(--ease);
}
.v2-tick:hover { color: var(--text); }
.v2-tick .t { display: none; font-weight: 600; letter-spacing: -0.005em; }
.v2-tick.is-active { background: var(--accent); color: var(--on-accent); }
.v2-tick.is-active .t { display: inline; }
.v2-tick .dot { position: absolute; top: 7px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: var(--shadow-glow-dot); }
.v2-tick.is-active .dot { background: var(--on-accent); box-shadow: none; }
.v2-tick.is-internal:not(.is-active) { color: var(--text-3); opacity: .7; }
.v2-rail-count { padding: 0 10px 0 6px; font-size: 12px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Comment drawer ---------- */
.v2-drawer-layer { position: fixed; inset: var(--bar-h) 0 0 0; z-index: 50; overflow: hidden; pointer-events: none; }
.v2-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(var(--drawer-w), 100vw); pointer-events: auto;
  display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card); transform: translateX(100%); transition: transform var(--duration) var(--ease), visibility 0s linear var(--duration);
  visibility: hidden;
}
.v2-drawer.is-open { transform: none; visibility: visible; transition: transform var(--duration) var(--ease); }
[data-theme="light"] .v2-drawer { box-shadow: -20px 0 50px rgba(10,10,10,.10); }
.v2-drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 22px 16px; border-bottom: 1px solid var(--hairline); }
.v2-drawer-head h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.015em; color: var(--text); }
.v2-drawer-head p { margin: 4px 0 0; font-size: 13px; color: var(--text-3); }
.v2-drawer-head .v2-iconbtn { margin: -8px -8px 0 auto; }
.v2-drawer-list { flex: 1; overflow-y: auto; padding: 8px 22px; }
.v2-comment { padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.v2-comment header { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--text-3); }
.v2-comment header b { color: var(--text); font-size: 13px; font-weight: 700; }
.v2-comment header button { margin-left: auto; color: var(--text-3); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.v2-comment header button:hover { color: var(--danger); background: var(--surface-2); }
.v2-comment p { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--text-2); white-space: pre-wrap; }
.v2-comment--link { cursor: pointer; margin: 0 -22px; padding-left: 22px; padding-right: 22px; transition: background var(--duration-fast) var(--ease); }
.v2-comment--link:hover { background: var(--surface-2); }
.v2-comment--link.is-here { background: color-mix(in srgb, var(--accent) 6%, transparent); box-shadow: inset 2px 0 0 var(--accent); }
.v2-comment--link.is-here:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.v2-comment-page { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: var(--accent-ink); }
.v2-comment-page:hover { color: var(--text); }
.v2-drawer-empty { padding: 28px 0; color: var(--text-3); font-size: 14px; line-height: 1.5; }
.v2-drawer-form-label { font-size: 13px; color: var(--text-3); }
.v2-drawer-form-label b { color: var(--text); font-weight: 700; }
.v2-drawer-form { padding: 16px 22px 22px; border-top: 1px solid var(--hairline); display: grid; gap: 10px; }
.v2-drawer-form .v2-textarea { min-height: 88px; }
.v2-drawer-form .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--text-3); }

/* ---------- Dialog (revisions) ---------- */
.v2-dialog { width: min(760px, calc(100vw - 32px)); max-height: min(86vh, 900px); padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-xl); background: var(--surface); color: var(--text-2); box-shadow: var(--shadow-card); }
.v2-dialog::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
.v2-dialog-inner { padding: 26px 28px 28px; }
.v2-confirm { width: min(520px, calc(100vw - 32px)); }
.v2-confirm h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: var(--text); overflow-wrap: anywhere; }
.v2-confirm p { margin: 12px 0 0; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.v2-confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 28px; }
.v2-confirm .v2-confirm-warn {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--text);
}
.v2-confirm-warn .icon { margin-top: 3px; color: var(--danger); }

/* ---------- Portal ---------- */
.v2-portal { max-width: var(--page-max); margin: 0 auto; padding: clamp(40px, 6vh, 72px) var(--page-pad) 96px; }
.v2-portal-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; margin-bottom: clamp(24px, 4vh, 36px); }
.v2-portal-head h1 { margin: 0; font-size: clamp(32px, 3.6vw, 48px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--text); }
.v2-portal-head p { margin: 0 0 4px; font-family: var(--font-sub); font-size: 16px; color: var(--text-3); }

.v2-latest {
  position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) auto; align-items: end; gap: 20px clamp(24px, 3vw, 48px);
  padding: clamp(20px, 2.6vw, 32px); border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border-accent);
  color: inherit; transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.v2-latest:hover { border-color: var(--accent); color: inherit; }
.v2-latest:hover .v2-pill { color: var(--on-accent); background: var(--accent-hover); }
.v2-latest-week { font-size: clamp(36px, 4vw, 56px); font-weight: 800; line-height: .95; letter-spacing: -0.035em; color: var(--text); }
.v2-latest-period { margin-top: 8px; font-family: var(--font-sub); font-size: 16px; color: var(--text-3); }
.v2-latest-meta { margin-top: 6px; font-size: 13px; color: var(--text-3); }
.v2-latest-fig dt { font-size: 13px; font-weight: 700; color: var(--text); }
.v2-latest-fig dd { margin: 6px 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.v2-latest-fig b { font-size: clamp(32px, 3.2vw, 44px); font-weight: 800; line-height: .95; letter-spacing: -0.03em; color: var(--accent-ink); font-variant-numeric: tabular-nums; }

.v2-archive { margin-top: clamp(32px, 5vh, 56px); }
.v2-archive h2 { margin: 0 0 4px; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
.v2-year { margin-top: 12px; border-bottom: 1px solid var(--hairline); }
.v2-year > summary {
  display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; list-style: none; color: var(--text-3);
}
.v2-year > summary::-webkit-details-marker { display: none; }
.v2-year > summary:hover { color: var(--text); }
.v2-year > summary .icon { margin-left: auto; transition: transform var(--duration-fast) var(--ease); }
.v2-year[open] > summary .icon { transform: rotate(90deg); }
.v2-year h3 { margin: 0; font-size: 16px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.v2-year-count { font-size: 13px; }
.v2-year[open] { border-bottom: 0; }
.v2-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-strong); }
.v2-row {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) 160px 130px 40px; align-items: center; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--hairline); color: var(--text-2); font-size: 14px;
  transition: background var(--duration-fast) var(--ease);
}
a.v2-row:hover { color: var(--text-2); background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.v2-row .go { transition: transform var(--duration) var(--ease), color var(--duration-fast) var(--ease); }
a.v2-row:hover .go { transform: translateX(4px); }
.v2-row .wk { font-weight: 700; font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.v2-row .per { color: var(--text-3); }
.v2-row .fig { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; text-align: right; }
.v2-row .go { color: var(--text-3); justify-self: end; }
.v2-rows-head { display: grid; grid-template-columns: 120px minmax(0, 1fr) 160px 130px 40px; gap: 16px; padding: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.v2-rows-head span:nth-child(3) { text-align: right; }
a.v2-row:hover .go { color: var(--accent-ink); }

/* Buyer review list */
.v2-deadline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding: 18px 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--hairline); margin-bottom: 28px; }
.v2-deadline b { color: var(--text); font-size: 16px; font-weight: 700; }
.v2-deadline span { color: var(--text-3); font-size: 15px; }
.v2-deadline .clock { margin-left: auto; display: inline-flex; align-items: baseline; gap: 8px; }
.v2-deadline .clock strong { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.v2-deadline .progress { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--text-3); }
.v2-deadline .progress b { font-size: 13px; color: var(--text); }
.v2-queue { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-strong); }
.v2-queue li { display: grid; grid-template-columns: minmax(160px, 1.2fr) 190px minmax(0, 2fr) auto; align-items: center; gap: 16px 24px; padding: 20px 0; border-bottom: 1px solid var(--hairline); }
.v2-queue .client { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.v2-queue .client small { display: block; margin-top: 3px; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--text-3); }
.v2-queue .facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--text-3); }
.v2-queue .facts b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.v2-queue .facts .warn { color: var(--danger); font-weight: 600; }
.v2-queue .act { justify-self: end; }
.v2-queue .v2-status { justify-self: start; white-space: nowrap; }
.v2-queue li.is-done .client { color: var(--text-3); }
.v2-more { margin-top: 44px; }
.v2-more h2 { margin: 0 0 14px; font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -0.015em; }
.v2-chips { display: flex; flex-wrap: wrap; gap: 8px; }


/* ---------- Page index column (left) ---------- */
.v2-layout { --side-w: 288px; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); align-items: start; }
.v2-layout .v2-page { padding-bottom: 96px; }
.v2-side {
  position: sticky; top: var(--chrome-h, var(--bar-h)); max-height: calc(100vh - var(--chrome-h, var(--bar-h)));
  order: -1; display: flex; flex-direction: column; gap: 18px; padding: 36px 16px 24px 24px;
  border-right: 1px solid var(--hairline); overflow-y: auto; overscroll-behavior: contain;
}
.v2-side-back { align-self: flex-start; padding: 0 12px 14px; margin: 0 -12px; font-size: 13px; }
.v2-side-list { list-style: none; margin: 0; padding: 0; position: relative; }
.v2-side-list::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 26px; width: 1px; background: var(--border-strong); }
.v2-side-item {
  position: relative; width: 100%; display: grid; grid-template-columns: 23px 30px minmax(0, 1fr) auto; align-items: center; gap: 0 4px;
  min-height: 48px; padding: 9px 10px 9px 0; border-radius: var(--radius-sm); text-align: left;
  color: var(--text-3); font-size: 14px; font-weight: 600; line-height: 1.25;
  transition: color var(--duration-fast) var(--ease), background var(--duration) var(--ease);
}
.v2-side-item:hover { color: var(--text); }
.v2-side-item .node {
  position: relative; z-index: 1; justify-self: center; width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 0 0 2px var(--border-strong); transform: scale(.7);
  transition: transform var(--duration) var(--ease), background var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.v2-side-item.is-past .node { background: var(--text-3); box-shadow: none; }
.v2-side-item.is-active .node { transform: none; background: var(--accent); box-shadow: var(--shadow-glow-dot); }
.v2-side-item .n { font-size: 12px; font-weight: 800; color: var(--text-3); }
.v2-side-item .t small { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.v2-side-item.is-active { color: var(--text); background: var(--surface); }
.v2-side-item.is-active .n { color: var(--accent-ink); }
[data-theme="light"] .v2-side-item.is-active { background: #fff; box-shadow: 0 0 0 1px var(--border); }
.v2-side-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.v2-side-foot .v2-rail-step { box-shadow: inset 0 0 0 1px var(--border-strong); }
.v2-side-foot .v2-rail-count { padding: 0; font-size: 13px; }
.v2-side-hint { margin: 0; font-size: 12px; line-height: 1.4; color: var(--text-3); }
.v2-rail--fallback { display: none; }
@media (max-width: 1100px) {
  .v2-layout { display: block; }
  .v2-side { display: none; }
  .v2-rail--fallback { display: flex; }
  .v2-layout .v2-page { padding-bottom: 160px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .v2-steer { grid-template-columns: minmax(0, 1fr); }
  .v2-ledger, .v2-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-wall--five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-close { grid-template-columns: minmax(0, 1fr); }
  .v2-latest { grid-template-columns: minmax(0, 1fr) auto; }
  .v2-latest-fig { grid-column: 1 / -1; grid-row: 2; }
  .v2-queue li { grid-template-columns: minmax(0, 1fr) auto; }
  .v2-queue .facts { grid-column: 1 / -1; }
  .v2-queue .v2-status { justify-self: start; }
}
@media (max-width: 860px) {
  :root { --bar-h: 56px; }
  /* Three rows of staff controls would pin a quarter of a phone screen; let them scroll away. */
  .v2-staffbar { position: static; }
  .v2-layout .v2-page { padding-bottom: 56px; }
  .v2-launch-stat { gap: 20px 32px; }
  .v2-signoff { flex-direction: column; align-items: flex-start; gap: 6px; }
  .v2-back { min-width: 40px; min-height: 40px; justify-content: center; }
  /* The trend SVG scales to ~half size on a phone; lift its labels back to a readable 10-12px. */
  .v2-trend .tick, .v2-trend .val { font-size: 20px; }
  .v2-trend .val-now { font-size: 24px; }
  .v2-pill--sm, .v2-edit-btn, .v2-fold-toggle { min-height: 40px; }
  .v2-js .v2-deck--paged .v2-page:not(.is-active) { display: block; }
  .v2-page { min-height: 0; padding-bottom: 48px; border-bottom: 1px solid var(--hairline); }
  .v2-rail { display: none; }
  .v2-bar { gap: 10px; }
  .v2-bar-actions { gap: 0; }
  .v2-bar-title span, .v2-hide-sm { display: none; }
  .v2-brand img { height: 15px; }
  .v2-bar .v2-pill { padding: 0 10px; }
  .v2-bar-sep { display: none; }
  .v2-wall { grid-template-columns: minmax(0, 1fr); }
  .v2-wall .v2-poster-frame { aspect-ratio: 16 / 11; }
  .v2-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-page-head { flex-wrap: wrap; gap: 12px; }
  .v2-page-no { padding-top: 6px; }
  .v2-page-tools { margin-left: 0; width: 100%; padding-top: 0; }
  .v2-actions li { grid-template-columns: 46px minmax(0, 1fr); font-size: 15px; }
  .v2-row { grid-template-columns: 90px minmax(0, 1fr) auto; }
  .v2-row .per { display: none; }
  .v2-rows-head { display: none; }
  .v2-row .fig { grid-column: 2; grid-row: 1; text-align: left; }
  .v2-latest { grid-template-columns: minmax(0, 1fr); }
  .v2-latest .v2-pill { justify-self: start; }
  .v2-deadline .clock { margin-left: 0; }
  .v2-queue .act { grid-column: 1 / -1; justify-self: start; }
  .v2-drawer-layer { inset: 0; }
}
@media (max-width: 520px) {
  .v2-ledger, .v2-kpis { grid-template-columns: minmax(0, 1fr); }
  .v2-staffbar .v2-bar-actions { margin-left: 0; }
}

/* ---------- Print: light, every page, one per sheet ---------- */
@media print {
  :root, [data-theme="dark"], [data-theme="light"] {
    --bg: #FFFFFF; --bg-deep: #F4F4F2; --surface: #FFFFFF; --surface-2: #F4F4F2; --surface-raised: #FFFFFF;
    --border: rgba(10,10,10,0.10); --border-strong: rgba(10,10,10,0.22); --border-accent: rgba(3,98,76,0.35);
    --text: #0A0A0A; --text-2: #2A2F2C; --text-3: #5F6A63; --text-muted: #7A847D;
    --accent-ink: #03624C; --positive: #03624C; color-scheme: light;
  }
  @page { size: A4 landscape; margin: 14mm; }
  html { color-scheme: light !important; }
  html, body { background: #fff !important; }
  .v2-steer { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) !important; gap: 12px 40px; }
  .v2-hero-title { margin-bottom: 20px; }
  .v2-hero-title h1 { font-size: 64px; }
  .v2-steer-value { font-size: 112px; }
  .v2-quote { margin-top: 20px; font-size: 22px; max-width: 44ch; }
  .v2-ledger, .v2-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; margin-top: 20px; }
  .v2-reading { margin-top: 20px; }
  .v2-prose { font-size: 12pt; line-height: 1.5; }
  .v2-page-head { margin-bottom: 18px; }
  .v2-page-title { font-size: 36px; }
  .v2-wall { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  .v2-wall--five { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .v2-wall .v2-poster-frame { aspect-ratio: 4 / 5 !important; }
  .v2-strip { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .v2-close { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr) !important; }
  .v2-signoff { margin-top: 32px; }
  .v2-reading-label, .v2-sub, .v2-table-title, .v2-region-name { break-after: avoid; }
  .v2-bar, .v2-staffbar, .v2-rail, .v2-drawer, .v2-notices, .v2-edit-btn, .v2-page-tools, .no-print, .v2-dialog { display: none !important; }
  .v2-deck .v2-page, .v2-js .v2-deck--paged .v2-page:not(.is-active) { display: block !important; animation: none !important; }
  .v2-page { min-height: 0; padding: 0; max-width: none; break-before: page; }
  .v2-layout { display: block !important; }
  .v2-page:first-child { break-before: auto; }
  .v2-page--hero::before { display: none; }
  .v2-trend .dot-now { filter: none; }
  .v2-poster-frame, .v2-table tr, .v2-ledger > div, .v2-actions li { break-inside: avoid; }
  .v2-table-fold tr.is-extra { display: table-row !important; }
  .v2-delta--down { background: none; padding: 0; }
  .v2-chart { break-inside: avoid; }
}
