/* Brocare Studio app: page layouts (from the approved mockups' page styles) and app-only pieces
   (boot, sign-in, coming-soon pages, skeleton shapes, helpers that replace inline style attributes).
   Requires tokens.css and studio.css. */

/* ===== Boot and helpers ===== */
.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot-mark, .auth-mark { display: flex; align-items: center; gap: var(--space-3); color: var(--text-muted); font: 600 var(--fs-small)/1 var(--font-display); }
.boot-mark img { height: 26px; width: auto; opacity: .9; }
.boot-mark span, .auth-mark span { padding-inline-start: var(--space-3); border-inline-start: 1px solid var(--line); }
.boot-note { color: var(--text-muted); margin-top: var(--space-4); }
.page-host { display: contents; }
.icon.up { transform: rotate(180deg); }
.dim { color: var(--text-dim); }
.pre { white-space: pre-line; }
[hidden] { display: none !important; }
.is-hidden { display: none; }
.main:focus, #main:focus { outline: none; }
.notice { display: flex; gap: var(--space-2); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--surface-inset); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-muted); font-size: var(--fs-small); }
.notice .icon { color: var(--ice-400); margin-top: 1px; }
.btn-danger { border-color: var(--white); }
.kbd-on-fill { background: var(--navy-950-a35); color: var(--pale-200); border-color: transparent; }
.kbd-pair { display: flex; gap: 4px; }
.linkish { all: unset; cursor: pointer; border-radius: 4px; }
.linkish:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 2px; }
.linkish b { color: var(--text-strong); text-decoration: underline; text-decoration-color: var(--line-control); text-underline-offset: .22em; }
.thumb img.art { width: 100%; height: 100%; object-fit: cover; }
.card-text { color: var(--text-muted); font-size: var(--fs-small); }
.side-foot { gap: var(--space-2); }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-out { flex: none; }
.nav-item .soon-tag { margin-inline-start: auto; color: var(--text-dim); font-size: var(--fs-label); font-weight: 500; opacity: .8; }
.nav-item .count + .soon-tag, .nav-item .live-dot + .soon-tag { display: none; }
.co-btn span { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; }

/* Dialog content (replaces the mockups' inline styles) */
.dlg-form { display: grid; gap: var(--space-4); }
.dlg-title, .sheet-title { font-size: var(--fs-h2); line-height: var(--lh-h2); }
.sheet-title { margin-bottom: var(--space-1); }
.dlg-text, .sheet-sub { color: var(--text-muted); }
.sheet-sub { margin-bottom: var(--space-4); }
.dlg-actions { display: flex; gap: var(--space-3); justify-content: flex-end; flex-wrap: wrap; }
.dlg-actions.start { justify-content: flex-start; margin-top: var(--space-5); }
.fs { border: 0; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.fs legend { margin-bottom: var(--space-2); }
.seg-wrap { flex-wrap: wrap; overflow: visible; border-radius: var(--radius-lg); }
.seg [role="radio"][aria-checked="true"] { background: var(--surface-raised); color: var(--text-strong); box-shadow: inset 0 0 0 1px var(--line-accent), 0 4px 12px -6px var(--shadow-a80); }
.field-error { font-size: var(--fs-small); color: var(--white); display: flex; gap: var(--space-2); align-items: center; }
.co-mark { width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--royal-600-a25); color: var(--ice-400); flex: none; }
.co-row[aria-checked="false"] .co-mark { background: var(--surface-inset); color: var(--mist-300); }
.opt-row { min-height: 52px; }
.opt-row .end .icon, .co-row .end .icon { color: var(--ice-400); }
.sheet .rows { gap: var(--space-2); }

/* Seg links (anchors inside a segmented control: format views, period) */
.seg .seg-link { position: relative; min-height: 36px; padding: 0 var(--space-4); border-radius: var(--radius-full); color: var(--text-muted); font-weight: 500; font-size: var(--fs-small);
  white-space: nowrap; display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none; }
.seg .seg-link[aria-selected="true"], .seg .seg-link[aria-pressed="true"] { background: var(--surface-raised); color: var(--text-strong); box-shadow: inset 0 0 0 1px var(--line-accent), 0 4px 12px -6px var(--shadow-a80); }
.seg .seg-link .n { color: var(--text-dim); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .seg .seg-link:hover { color: var(--text-strong); } }

/* Skeleton shapes. Under 300 ms nothing shows: the skeleton fades in after that. */
.sk-delay { animation: sk-in 1ms linear 300ms both; }
@keyframes sk-in { from { opacity: 0; } to { opacity: 1; } }
.sk-h1 { display: block; width: min(420px, 70%); height: 36px; margin-bottom: var(--space-3); }
.sk-lede { display: block; width: min(560px, 90%); height: 16px; }
.sk-h2 { display: block; width: 40%; height: 20px; margin-bottom: var(--space-4); }
.sk-block { display: block; width: 100%; height: 180px; border-radius: var(--radius-md); }
.sk-row { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-2) 0; }
.sk-thumb { width: 44px; aspect-ratio: 4 / 5; flex: none; }
.sk-lines { display: grid; gap: 6px; flex: 1; }
.sk-l1 { display: block; height: 14px; width: 70%; } .sk-l2 { display: block; height: 12px; width: 45%; }
.sk-lane { display: block; height: 40px; margin-bottom: var(--space-2); border-radius: var(--radius-md); }
.sk-q { display: block; height: 72px; border-radius: var(--radius-md); }
.sk-device { display: block; width: min(350px, 100%); aspect-ratio: 9 / 16; border-radius: 36px; margin-inline: auto; }
.sk-frame { display: block; width: 100%; aspect-ratio: 4 / 5; border-radius: 0; }
.error-state .glyph { background: var(--surface-inset); color: var(--white); box-shadow: inset 0 0 0 1px var(--line-control); }

/* ===== Sign-in ===== */
.auth-root { min-height: 100dvh; }
.auth { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: var(--space-5); padding: var(--space-6) var(--gutter-end) calc(var(--space-6) + env(safe-area-inset-bottom)) var(--gutter); }
.auth-card { width: min(420px, calc(100vw - 32px)); padding: var(--space-7) var(--space-6) var(--space-6); display: grid; gap: var(--space-4); }
.auth-mark { margin-bottom: var(--space-3); }
.auth-mark img { height: 32px; width: auto; }
.auth-title { font-size: var(--fs-title); line-height: var(--lh-title); letter-spacing: var(--track-heading); }
.auth-lede { color: var(--text-muted); }
.auth-note { display: flex; gap: var(--space-2); align-items: center; padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface-inset); color: var(--text-muted); font-size: var(--fs-small); }
.auth-form { display: grid; gap: var(--space-4); margin-top: var(--space-2); }
.auth-form .btn { margin-top: var(--space-2); }
.auth-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-2); }
.auth-foot { color: var(--text-dim); font-size: var(--fs-small); text-align: center; }
@media (max-width: 767px) { .auth-card { padding: var(--space-6) var(--space-5) var(--space-5); } .auth-title { font-size: 1.625rem; } }

/* ===== Home ===== */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.home-grid .col { display: grid; gap: var(--space-5); align-content: start; }
.needs-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-4); flex-wrap: wrap; }
.needs-foot .meta { color: var(--text-dim); font-size: var(--fs-small); }
.row-more { padding: var(--space-3); color: var(--text-dim); font-size: var(--fs-small); box-shadow: 0 -1px 0 var(--line-soft); }
@media (min-width: 768px) { .live-card .lane { grid-template-columns: 112px minmax(0, 1fr) auto; min-height: 40px; } }
.lane .name { white-space: nowrap; }
.live-foot { display: flex; justify-content: space-between; align-items: center; margin-top: var(--space-4); color: var(--text-dim); font-size: var(--fs-small); gap: var(--space-3); flex-wrap: wrap; }
.co-list { display: grid; }
.co { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-2); margin-inline: calc(-1 * var(--space-2)); border-radius: var(--radius-md); }
.co + .co { box-shadow: 0 -1px 0 var(--line-soft); }
.co:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .co:hover { background: var(--surface-hover); } }
.co .mark { width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--royal-600-a25); color: var(--ice-400); }
.co b { color: var(--text-strong); font-weight: 600; display: block; }
.co small { color: var(--text-dim); font-size: var(--fs-small); }
.week .day .slot { text-decoration: none; }
.week .slot-more { color: var(--text-dim); font-size: var(--fs-label); padding-inline-start: 5px; }
.stat .dim-v { font-size: var(--fs-stat-sm); color: var(--text-dim); }
.park-rows .park-row, .park-list .park-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: var(--space-3); }
.park-list .park-row { grid-template-columns: auto minmax(0, 1fr) auto; padding: var(--space-3) var(--space-5); }
.park-rows .park-row + .park-row, .park-list .park-row + .park-row { box-shadow: 0 -1px 0 var(--line-soft); }
.park-row .t b { display: block; color: var(--text-strong); font-weight: 600; }
.park-row .t small { display: block; color: var(--text-dim); font-size: var(--fs-small); }
.park-row .end { display: flex; gap: var(--space-2); align-items: center; }
.park-ic { width: 32px; height: 32px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--surface-inset); color: var(--text-dim); box-shadow: inset 0 0 0 1px var(--line-soft); }
.park-list { margin: 0 !important; }
@media (max-width: 1099px) { .home-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  body[data-page="home"] .page-head .actions { display: none; }
  .week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .day { min-height: 76px; padding: 6px 4px; }
  .day .slot > span:not(.when), .day .slot .when span { font-size: 0; }
  .day .slot .when { justify-content: center; }
  .day .d { flex-direction: column; align-items: center; gap: 2px; }
  .needs-foot .btn { width: 100%; }
  .day .slot { justify-content: center; padding: 4px 0; }
  .park-rows .park-row, .park-list .park-row { grid-template-columns: minmax(0, 1fr); }
  .park-list .park-row { padding: var(--space-3) var(--space-4); }
  .park-list .park-ic { display: none; }
}

/* ===== Conductor ===== */
.run-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); margin-bottom: var(--space-5); }
.summary .stat .v { font-size: var(--fs-stat-sm); }
.lane-table { display: grid; }
.lane-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 124px 64px 56px; align-items: center; gap: var(--space-4); min-height: 60px; border-top: 1px solid var(--line-soft); }
.lane-row:first-child { border-top: 0; }
.lane-row.head { min-height: 32px; color: var(--text-dim); font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; }
.lane-row .name { display: flex; gap: var(--space-3); align-items: center; color: var(--text-strong); font-weight: 600; }
.lane-row .name .ic { width: 32px; height: 32px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--royal-600-a25); color: var(--ice-400); flex: none; }
.lane-row .name .ic .icon { width: 18px; height: 18px; }
.lane-row.idle .name .ic { background: var(--surface-inset); color: var(--text-dim); box-shadow: inset 0 0 0 1px var(--line-soft); }
.lane-row .prog { display: grid; gap: 6px; min-width: 0; }
.lane-row .prog small { color: var(--text-dim); font-size: var(--fs-small); line-height: 1.35; }
.lane-row .prog small b { color: var(--text-muted); font-weight: 500; }
.lane-row .n { text-align: end; color: var(--text-muted); font-size: var(--fs-small); font-variant-numeric: tabular-nums; display: flex; justify-content: flex-end; }
.lane-row .toggle { cursor: pointer; padding: 0; }
.lane-row .toggle:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 2px; }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-height: 452px; overflow: auto; overscroll-behavior: contain; }
.log li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--line-soft); font-size: var(--fs-small); color: var(--text-muted); }
.log li:first-child { border-top: 0; }
.log .log-ic { color: var(--text-dim); padding-top: 2px; }
.log li.needs-line .log-ic { color: var(--white); }
.log b { color: var(--text-strong); font-weight: 600; }
.history td .pill { height: 24px; }
.history tr[aria-current="true"] td { background: var(--surface-hover); }
@media (max-width: 1099px) { .run-grid { grid-template-columns: minmax(0, 1fr); } .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .lane-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--space-2) var(--space-3); padding: var(--space-3) 0; }
  .lane-row.head { display: none; }
  .lane-row .prog { grid-column: 1 / -1; grid-row: 2; }
  .lane-row > .n:nth-of-type(4) { display: none; }
  .summary { gap: var(--space-4); }
  .history thead { display: none; }
  .history tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line-soft); }
  table.t.history td { border: 0; padding: 0; }
  .history td:nth-child(n+3):not(:last-child) { display: none; }
  .history td:last-child { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .history td:nth-child(2) { color: var(--text-dim); }
  body[data-page="conductor"] .page-head .actions { width: 100%; }
  body[data-page="conductor"] .page-head .actions .btn { flex: 1; }
}

/* ===== Review ===== */
.rv { display: grid; grid-template-columns: 280px minmax(0, 1fr) 340px; gap: var(--space-5); align-items: start; }
.queue { position: sticky; top: calc(var(--topbar-h) + var(--space-5)); display: grid; gap: var(--space-2); }
.queue h2 { font-size: var(--fs-h3); margin-bottom: var(--space-1); display: flex; justify-content: space-between; align-items: center; }
.queue-list { display: grid; gap: var(--space-2); }
.q { all: unset; box-sizing: border-box; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3); align-items: center; padding: var(--space-2); border-radius: var(--radius-md);
  background: var(--surface-inset); box-shadow: inset 0 0 0 1px var(--line-soft); cursor: pointer; transition: background-color var(--dur-press) ease, box-shadow var(--dur-press) ease; }
.q:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 2px; }
.q[aria-current="true"] { background: var(--surface-selected); box-shadow: inset 0 0 0 1px var(--line-accent); }
.q .q-t { min-width: 0; }
.q b { display: block; color: var(--text-strong); font-weight: 600; font-size: var(--fs-small); line-height: 1.3; }
.q small { display: flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: var(--fs-label); }
.q.is-approved small { color: var(--ice-400); }
.q.is-approved .thumb { box-shadow: inset 0 0 0 2px var(--ice-400); }
.q.is-killed { opacity: .5; }
@media (hover: hover) and (pointer: fine) { .q:hover { background: var(--surface-hover); } }
.shortcuts { margin-top: var(--space-3); padding: var(--space-3); border-radius: var(--radius-md); outline: 1px dashed var(--line); outline-offset: -1px; color: var(--text-dim); font-size: var(--fs-label); display: grid; gap: 6px; }
.shortcuts > span { display: flex; justify-content: space-between; align-items: center; }
.stage { display: grid; gap: var(--space-4); justify-items: center; min-width: 0; }
.stage-top { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.stage .device { max-width: 350px; }
.screen { position: relative; }
.screen-loading { aspect-ratio: 4 / 5; }
.decision { width: 100%; display: flex; gap: var(--space-3); justify-content: center; align-items: center; flex-wrap: wrap; }
.decision .btn-primary { min-width: 180px; }
.details { display: grid; gap: var(--space-4); min-width: 0; }
.details .card { padding: var(--space-4); display: grid; gap: var(--space-4); }
.piece-title { font-size: 1.5rem; line-height: 1.15; letter-spacing: var(--track-heading); margin-top: calc(-1 * var(--space-1)); }
.piece-sub { color: var(--text-muted); margin-top: calc(-1 * var(--space-3)); font-size: var(--fs-small); }
.facts { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.block { display: grid; gap: var(--space-2); }
.block h2, .block h3 { font: 600 var(--fs-small)/1.3 var(--font-body); color: var(--text-dim); }
.block p { color: var(--text-body); font-size: var(--fs-small); line-height: 1.55; }
.block .hook { font: 600 var(--fs-read)/1.4 var(--font-display); color: var(--text-strong); }
.note-block { padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface-inset); box-shadow: inset 0 0 0 1px var(--line-soft); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: flex; gap: var(--space-2); align-items: flex-start; color: var(--text-muted); font-size: var(--fs-small); }
.checks li .icon { width: 16px; height: 16px; color: var(--ice-400); stroke-width: 2.25; margin-top: 2px; }
.checks li.miss { color: var(--text-dim); }
.checks li.miss .icon { color: var(--white); }
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-small); overflow-wrap: anywhere; }
.slide-list { margin: 0; padding-inline-start: 1.2em; display: grid; gap: var(--space-2); font-size: var(--fs-small); color: var(--text-body); }
.slide-list small { display: block; color: var(--text-dim); }
.slide-list b { font-weight: 500; }
.state-line { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.strip { display: none; }
.dock { display: none; }
details.acc { border-top: 1px solid var(--line-soft); }
details.acc > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 48px; cursor: pointer; color: var(--text-strong); font-weight: 600; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc[open] > summary .icon { transform: rotate(90deg); }
details.acc > summary .icon { transition: transform var(--dur-fast) var(--ease-out); color: var(--text-dim); }
details.acc > div { padding-bottom: var(--space-4); display: grid; gap: var(--space-4); }
.device.approved-flash { animation: approved 520ms var(--ease-out); }
@keyframes approved { 30% { box-shadow: inset 0 0 0 2px var(--ice-400), 0 40px 90px -30px var(--ice-400-a60); } }
.stamp { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; z-index: 3; }
.stamp span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: var(--radius-full); background: var(--ice-400); color: var(--navy-950); font: 700 15px/1 var(--font-body);
  transform: scale(.9); box-shadow: 0 12px 30px -10px var(--ice-400-a80); }
.stamp.show { opacity: 1; transition: opacity var(--dur-fast) ease; }
.stamp.show span { transform: scale(1); transition: transform var(--dur-base) var(--ease-press); }
@media (max-width: 1099px) {
  .rv { grid-template-columns: minmax(0, 1fr) 320px; }
  .decision .btn-primary { order: -1; flex-basis: 100%; }
  .queue { display: none; }
  .strip { display: flex; grid-column: 1 / -1; }
}
.strip { gap: var(--space-2); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
.strip::-webkit-scrollbar { display: none; }
.strip .q { flex: 0 0 auto; width: 228px; scroll-snap-align: start; }
@media (max-width: 767px) {
  body[data-page="review"] .tabbar { display: none; }
  .rv { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .strip .q { width: 200px; }
  .stage .device { padding: 0; background: none; box-shadow: none; max-width: 100%; }
  .stage .screen { border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--line-soft); }
  .decision { display: none; }
  .stage-top .seg { width: 100%; }
  .stage-top .seg button { flex: 1; justify-content: center; }
  .details > .card { background: transparent; box-shadow: none; padding: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
  body[data-page="review"] .view { padding-bottom: calc(132px + env(safe-area-inset-bottom)); }
  .dock { display: grid; position: fixed; inset: auto 0 0; z-index: var(--z-nav); grid-template-columns: 52px 52px minmax(0, 1fr); gap: var(--space-2); align-items: center;
    padding: var(--space-3) max(16px, env(safe-area-inset-right)) calc(var(--space-3) + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: var(--navy-900-a94); border-top: 1px solid var(--line-soft); backdrop-filter: blur(var(--blur-glass)); -webkit-backdrop-filter: blur(var(--blur-glass)); }
  .dock .btn-icon { --h: 52px; width: 52px; }
  body[data-page="review"] .toasts { bottom: calc(100px + env(safe-area-inset-bottom)); }
  .desk-only { display: none; }
}

/* Preview frame details (inside .screen: platform chrome) */
.slide .slide-copy { display: grid; gap: 12px; }
.slide.fill { height: 100%; }
.slide.still { height: 100%; justify-content: center; gap: 18px; }
.slide.still h4 { font-size: clamp(22px, 8.6cqi, 34px); }
.slide.img { padding: 0; }
.slide.img img, .media-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-media.square { aspect-ratio: 1; }
.ig-caption .cap-more, .li-see { all: unset; cursor: pointer; color: var(--platform-mute); }
.ig-caption .cap-rest { display: block; white-space: pre-line; margin-top: 4px; }
.li-see { color: var(--platform-mute-li); }
.li-body .dim-li { color: var(--platform-mute-li); }
.li-doc .page .slides { height: 100%; }
.li-reel .reel { border-radius: 0; }
.reel .bar span { width: 100%; transform: scaleX(0); transform-origin: left; }
.reel .reel-poster, .reel .reel-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel .reel-poster { opacity: .55; }
.reel.has-video .meta { pointer-events: none; }
.reel .reel-note { position: absolute; top: 10px; inset-inline: 10px; text-align: center; font: 500 11px/1.3 var(--font-body); color: var(--white-a75, rgba(255,255,255,.75)); }
.reel .caption-burn { z-index: 1; }
.reel .play { z-index: 2; cursor: pointer; }
.reel.tt-photo .slides { position: absolute; inset: 0; }
.reel.tt-photo .slide { padding-bottom: 28%; }
.reel.tt-photo .rail, .reel.tt-photo .meta, .reel.tt-photo .slide-count { z-index: 2; }
.screen .slides:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }

/* ===== Library ===== */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: space-between; }
.toolbar .left { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; min-width: 0; }
.toolbar .search .input { min-width: 280px; }
.filters { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.filters .btn.is-set { border-color: var(--line-accent); background: var(--surface-selected); color: var(--text-strong); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: var(--space-5) var(--space-4); align-items: start; }
.item { all: unset; box-sizing: border-box; display: grid; gap: var(--space-3); cursor: pointer; min-width: 0; border-radius: var(--radius-lg); }
.item:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: 4px; }
.media { position: relative; border-radius: var(--radius-md); overflow: hidden; container-type: inline-size; box-shadow: inset 0 0 0 1px var(--white-a08); aspect-ratio: 4 / 5;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); background: var(--navy-950); }
.detail-media .media.true-ratio.v { aspect-ratio: 9 / 16; } .detail-media .media.true-ratio.s { aspect-ratio: 1; }
.media .kind { position: absolute; top: 8px; inset-inline-end: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-950-a70); color: var(--white); z-index: 1; }
.media .kind .icon { width: 14px; height: 14px; }
.media .slide { position: absolute; inset: 0; padding: 12%; justify-content: flex-end; }
.media .slide h4 { font-size: clamp(14px, 11cqi, 26px); display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.media .slide.reel-art { justify-content: center; text-align: center;
  background: radial-gradient(90% 60% at 30% 25%, var(--ice-400-a28), transparent 60%), radial-gradient(80% 70% at 80% 80%, var(--royal-600-a60), transparent 70%), var(--navy-950); }
.media .dur { position: absolute; inset: auto auto 8px 8px; padding: 3px 8px; border-radius: var(--radius-full); background: var(--navy-950-a70); color: var(--white); font: 600 11px/1.2 var(--font-body); font-variant-numeric: tabular-nums; display: flex; gap: 4px; align-items: center; z-index: 1; }
.media .dur .icon { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.stack { position: relative; padding: 0 10px 10px 0; }
.stack::before, .stack::after { content: ""; position: absolute; border-radius: var(--radius-md); background: var(--navy-700); box-shadow: inset 0 0 0 1px var(--line-soft); }
.stack::before { inset: 10px 0 0 10px; opacity: .55; }
.stack::after { inset: 5px 5px 5px 5px; opacity: .85; }
.stack .media { z-index: 1; }
.item .info { display: grid; gap: 4px; min-width: 0; justify-items: start; }
.item .info > b, .item .info .meta { justify-self: stretch; }
.item .info b { color: var(--text-strong); font-weight: 600; line-height: 1.3; text-wrap: pretty; }
.item .info .meta { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); color: var(--text-dim); font-size: var(--fs-small); }
.item .info .plats { display: flex; gap: 6px; color: var(--text-dim); }
.item .info .plats .icon { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) { .item:hover .media { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line-accent), var(--elev-hover); } }
.sk { display: grid; gap: var(--space-3); }
.sk .m { aspect-ratio: 4 / 5; border-radius: var(--radius-md); }
.sk .l1 { height: 14px; width: 80%; } .sk .l2 { height: 12px; width: 50%; }
.detail-media { max-width: 260px; margin: 0 auto var(--space-5); }
.detail-media .stack { padding: 0; } .detail-media .stack::before, .detail-media .stack::after { display: none; }
.sheet .facts { margin-bottom: var(--space-4); }
.sheet .block { margin-top: var(--space-4); }
.clamp { max-height: 12em; overflow: auto; }
.more-row { display: flex; justify-content: center; margin-top: var(--space-6); }
@media (max-width: 767px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-3); }
  .toolbar .search, .toolbar .left { width: 100%; }
  .toolbar .search .input { min-width: 0; }
  .format-seg { width: 100%; }
}

/* ===== Results ===== */
.leads { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--space-6); align-items: center; }
.leads .big { display: grid; gap: var(--space-2); }
.leads .stat-k { font: 500 var(--fs-small)/1.3 var(--font-body); color: var(--text-muted); }
.leads .big > .v { font: 700 4rem/1 var(--font-display); color: var(--text-strong); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.leads .big p { color: var(--text-muted); max-width: 44ch; }
.leads .kpis { display: flex; gap: var(--space-6); margin-top: var(--space-4); flex-wrap: wrap; }
.v-sm { font-size: var(--fs-stat-sm) !important; }
.src { display: grid; gap: var(--space-3); }
.src-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) 32px; gap: var(--space-3); align-items: center; font-size: var(--fs-small); color: var(--text-muted); }
.src-row .lbl { display: flex; gap: var(--space-2); align-items: center; }
.src-row .lbl .icon { width: 16px; height: 16px; color: var(--text-dim); }
.src-row .bar-track { display: block; }
.src-row .bar { display: block; height: 12px; border-radius: 3px; background: var(--viz-series); width: var(--w, 0%); min-width: 2px; }
.src-row .n { text-align: end; color: var(--text-strong); font-weight: 600; }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.chart-host { min-height: 260px; }
.chart-note { color: var(--text-dim); font-size: var(--fs-small); margin-top: var(--space-3); }
.chart-note.shared { margin-top: calc(-1 * var(--space-3)); }
.chart-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-3); }
.legend b { color: var(--text-strong); }
.dim-col { color: var(--text-dim) !important; }
.outlier { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.outlier .glyph { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--royal-600-a25); color: var(--ice-400); }
.outlier b { color: var(--text-strong); }
.outlier p { color: var(--text-muted); margin-top: var(--space-1); }
@media (max-width: 1099px) { .charts { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  .leads { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .leads .big > .v { font-size: 3.25rem; }
  .src-row { grid-template-columns: 150px minmax(0, 1fr) 28px; }
  body[data-page="results"] .page-head .seg { width: 100%; }
  body[data-page="results"] .page-head .seg .seg-link { flex: 1; justify-content: center; }
  .pieces td:nth-child(2), .pieces th:nth-child(2), .pieces td:nth-child(n+5), .pieces th:nth-child(n+5) { display: none; }
}

/* ===== Coming soon pages ===== */
.soon-card { padding: var(--space-6); }
.soon-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.soon-mark { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--royal-600-a25); color: var(--ice-400); box-shadow: inset 0 0 0 1px var(--line-accent); }
.soon-body { display: grid; gap: var(--space-3); max-width: 64ch; }
.soon-body h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
.soon-note { color: var(--text-muted); }
.soon-sub { font: 600 var(--fs-small)/1.3 var(--font-body); color: var(--text-dim); margin-top: var(--space-2); }
.soon-list li { font-size: var(--fs-body); color: var(--text-body); }
.soon-list li .icon { color: var(--text-dim); }
.soon-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.soon-ic { width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--royal-600-a25); color: var(--ice-400); }
@media (max-width: 767px) {
  .soon-grid { grid-template-columns: minmax(0, 1fr); }
  .soon-card { padding: var(--space-5) var(--space-4); }
  .soon-links { grid-template-columns: minmax(0, 1fr); }
}

/* ===== Same-document page transitions (View Transitions API; plain swap without it) ===== */
::view-transition-old(main) { animation: vt-out var(--dur-exit) var(--ease-out) both; }
::view-transition-new(main) { animation: vt-in var(--dur-page) var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) {
  .sk-delay { animation: none; }
  .stamp.show span { transition: none; transform: none; }
  .device.approved-flash { animation: none; }
}

/* Phone top bar: the company button stays short; on Review it gives way to "1 of 4 waiting" */
@media (max-width: 767px) {
  .co-btn span { max-width: 13ch; }
  body[data-page="review"] .co-btn { display: none; }
  .top .crumb.show-phone { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
.log time { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.log.timed li { grid-template-columns: 52px minmax(0, 1fr); }
.lane-row .always { color: var(--text-dim); font-size: var(--fs-label); }
.history tr[aria-current="true"] { background: var(--surface-hover); }
.history tr[aria-current="true"] td { background: transparent; }
/* Reel caption preview: the play button sits below the burned caption, never on it */
.reel[data-reel] .caption-burn { inset: 22% 8% auto; }
.reel[data-reel] .play { inset: auto 0 26% 0; margin: 0 auto; }
/* Studio fix 2026-11-05: drafts in progress (written, not made yet) beside Review, the empty calendar note,
   slide bodies in the details list */
.card.wip { margin-top: var(--space-5); }
.card.wip h2 { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-2); }
.card.wip .out-rows .row, .acc.wip .out-rows .row { padding-inline: 0; }
.acc.wip { margin-top: var(--space-4); }
.cal-none .empty { padding-block: var(--space-5); }
.slide-list .pre { display: block; white-space: pre-line; color: var(--text-body); }
