/* Clinic Studio — Direction A, Clinical Editorial. White paper, deep ink, muted teal; dark player sheet. */
:root {
  --paper: #ffffff;
  --paper-2: #f5f4f0;          /* used sparingly: side cards, poster */
  --sea: #e7efec;
  --ink: #172c35;
  --ink-2: #33464e;
  --muted: #55656c;            /* 6.1:1 on white */
  --teal: #246f6b;             /* 5.9:1 on white */
  --teal-ink: #1b5552;
  --rule: #e2e0da;
  --warn: #8a3b12;
  --warn-bg: #fbf1ea;
  --night: #0d1b20;
  --night-2: #15282f;
  --night-text: #f1f5f4;
  --night-muted: #a9bab7;      /* 8.6:1 on --night */
  --night-teal: #7cc7be;
  --serif: "Iowan Old Style", "Charter", "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 10px;
}
html[lang="ar"] {
  --serif: "Al Nile", "Noto Naskh Arabic", "Geeza Pro", "Times New Roman", serif;
  --sans: "SF Arabic", "Geeza Pro", "Noto Sans Arabic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.55 var(--sans);
  overflow-x: hidden;
}
html[lang="ar"] body { line-height: 1.75; }
a { color: var(--teal-ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.sheet :focus-visible { outline-color: var(--night-teal); }
.sr, .sr-sm { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; border-radius: 6px; }
.skip:focus { top: 8px; }
svg { flex: none; }
bdi { unicode-bidi: isolate; }

/* ---------- brand (presenter rail) ---------- */
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.1; }
.wordmark { font: 600 1.45rem/1 var(--serif); letter-spacing: -.01em; }
html[lang="ar"] .wordmark { font-family: "Iowan Old Style", Georgia, serif; }
.brand-sub { font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
html[lang="ar"] .brand-sub { text-transform: none; letter-spacing: 0; font-size: .72rem; }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.persona select {
  font: inherit; font-size: .85rem; color: var(--ink); border: 1px solid var(--rule); border-radius: 999px;
  padding: 7px 12px; background: var(--paper); max-width: 270px;
}
.pill {
  font: inherit; font-size: .85rem; border: 1px solid var(--rule); background: var(--paper); color: var(--ink);
  border-radius: 999px; padding: 7px 13px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; min-height: 36px;
}
.pill:hover { border-color: var(--ink-2); }
.pill[aria-pressed="true"] { background: var(--teal); color: #fff; border-color: var(--teal); }
.pill.subtle { color: var(--muted); }
.pill.light { background: var(--paper); font-size: .9rem; }

/* ---------- typography + primitives ---------- */
main { max-width: 1200px; margin: 0 auto; padding: clamp(20px, 4vw, 48px) clamp(16px, 4vw, 40px); outline: none; }
.display { font: 500 clamp(2.1rem, 5.4vw, 4.2rem)/1.04 var(--serif); letter-spacing: -.02em; margin: .2em 0 .35em; text-wrap: balance; }
.display.sm { font-size: clamp(1.7rem, 3.6vw, 2.7rem); line-height: 1.1; }
html[lang="ar"] .display { line-height: 1.35; letter-spacing: 0; font-weight: 600; }
.h2 { font: 500 1.6rem/1.2 var(--serif); margin: 0 0 16px; }
.h3 { font: 600 1.15rem/1.3 var(--serif); margin: 0 0 8px; }
html[lang="ar"] .h2, html[lang="ar"] .h3 { line-height: 1.5; }
.kicker { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
html[lang="ar"] .kicker { letter-spacing: 0; text-transform: none; font-size: .85rem; }
.kicker.teal { color: var(--teal); }
.kicker.warn { color: var(--warn); }
.kicker.light { color: var(--night-muted); }
.kicker svg { width: 16px; height: 16px; }
.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 60ch; margin: 0 0 18px; }
.meta { color: var(--muted); margin: 0 0 6px; font-size: .95rem; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.meta svg { width: 18px; height: 18px; }
.fine { font-size: .82rem; color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.row.stack { flex-direction: column; align-items: stretch; }
.muted-light { color: var(--night-muted); }
.fine-light { color: var(--night-muted); font-size: .8rem; }
code { font-family: var(--mono); font-size: .85em; background: var(--sea); padding: 1px 6px; border-radius: 4px; }
.btn {
  font: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  min-height: 46px; padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--paper);
  color: var(--ink); text-decoration: none; cursor: pointer; transition: background .18s, transform .18s;
}
.btn:hover { background: var(--sea); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost-light { background: transparent; color: var(--night-text); border-color: var(--night-muted); }
.btn .fine { color: inherit; opacity: .8; font-weight: 400; }
.link { font: inherit; background: none; border: 0; color: var(--teal-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 4px 0; }
.link.light { color: var(--night-teal); }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink); cursor: pointer; padding: 0;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn.play { background: var(--ink); color: #fff; border-color: var(--ink); }
.card { border: 1px solid var(--rule); border-radius: var(--r); padding: 20px; background: var(--paper); }
.card.paper { background: var(--paper-2); border-color: transparent; }
.label-mock {
  font-size: .8rem; color: var(--warn); background: var(--warn-bg); border-inline-start: 3px solid var(--warn);
  padding: 6px 10px; border-radius: 4px; margin: 10px 0;
}
.sheet .label-mock { background: rgba(255,255,255,.06); color: #f3c9a9; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #c0392b; display: inline-block; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- scope chips (hidden until Scope is pressed) ---------- */
.scope-chip {
  display: none; font: 600 .7rem/1 var(--sans); letter-spacing: .02em; text-transform: none;
  padding: 5px 8px; border-radius: 4px; white-space: nowrap; vertical-align: middle;
}
body.scope-on .scope-chip { display: inline-block; }
.k-inc { background: #dcefeb; color: #12403e; }
.k-opt { background: #f8ead3; color: #6a3f06; }
.k-dec { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.sheet .k-dec { background: transparent; color: var(--night-text); box-shadow: inset 0 0 0 1.5px var(--night-muted); }

/* ---------- covers (typographic artwork, no stock imagery) ---------- */
.cover {
  position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; display: grid;
  grid-template-rows: auto 1fr auto auto; padding: 9%; color: #fff; background: var(--ink); isolation: isolate;
}
.cover::after { content: ""; position: absolute; inset: auto -20% -35% auto; width: 75%; aspect-ratio: 1; border-radius: 50%; border: 1px solid currentColor; opacity: .18; z-index: -1; }
.cover-ch { font: 600 .72em/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
html[lang="ar"] .cover-ch { letter-spacing: 0; }
.cover-no { font: 500 3.2em/1 var(--serif); align-self: end; letter-spacing: -.02em; }
.cover-no i { font-style: normal; opacity: .5; padding: 0 .08em; }
.cover-rule { height: 1px; background: currentColor; opacity: .5; margin: .7em 0 .5em; }
.cover-area { font: italic .85em/1.2 var(--serif); }
.cover.h0 { background: var(--ink); } .cover.h0 .cover-no { color: var(--night-teal); }
.cover.h1 { background: var(--sea); color: var(--ink); }
.cover.h2 { background: var(--teal); }
.cover.h3 { background: #efece4; color: var(--ink); }
.cover.h4 { background: #3a4f57; }
.cover.h5 { background: #0f3b3a; } .cover.h5 .cover-no { color: #bfe3dc; }
.cover.xs { width: 48px; font-size: 5px; padding: 7px; border-radius: 6px; }
.cover.sm { width: 64px; font-size: 6.5px; flex: none; }
.cover.lg { width: min(260px, 100%); font-size: 16px; }
.cover.xl { width: min(380px, 100%); font-size: 22px; margin-inline: auto; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.cover.hero { width: 100%; font-size: clamp(16px, 2.6vw, 28px); border-radius: 12px; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding-bottom: 40px; border-bottom: 1px solid var(--rule); }
.hero-art { display: block; transition: transform .22s; }
.hero-art:hover { transform: translateY(-3px); }
.disc-inline { font-size: .9rem; color: var(--ink-2); border-inline-start: 3px solid var(--teal); padding-inline-start: 10px; margin: 12px 0 18px; }
.progress { height: 4px; background: var(--rule); border-radius: 2px; overflow: hidden; max-width: 520px; }
.progress span { display: block; height: 100%; background: var(--teal); transition: width .25s linear; }
.hero-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.left { color: var(--muted); font-variant-numeric: tabular-nums; }
.section { padding-top: 40px; }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.side { display: grid; gap: 16px; }
.ep-list { list-style: none; margin: 0; padding: 0; }
.ep-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.ep-row-link { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; min-width: 0; }
.ep-title { display: block; font: 500 1.08rem/1.3 var(--serif); color: var(--ink); }
html[lang="ar"] .ep-title { line-height: 1.6; }
.ep-row-link:hover .ep-title { text-decoration: underline; text-underline-offset: 3px; }
.ep-row .meta { font-size: .85rem; margin: 2px 0 0; }
.lang-pill { font: 600 .68rem/1 var(--sans); border: 1px solid var(--rule); border-radius: 4px; padding: 4px 6px; color: var(--muted); }
.dur { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .9rem; }
.live-card { text-decoration: none; color: inherit; border-color: var(--ink); transition: background .18s; }
.live-card:hover { background: var(--sea); }
.hub-link { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--rule); text-decoration: none; color: var(--ink); font-family: var(--serif); }
.hub-link svg { width: 16px; height: 16px; color: var(--muted); }

/* ---------- episode + gate ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--muted); margin-bottom: 18px; }
html[dir="rtl"] .back svg { transform: scaleX(-1); }
.ep-head { display: grid; grid-template-columns: 260px 1fr; gap: clamp(20px, 4vw, 44px); align-items: start; }
.gate { margin-top: 32px; border: 1.5px solid var(--warn); border-radius: var(--r); padding: clamp(18px, 3vw, 28px); background: var(--paper); }
.gate .h2 { color: var(--ink); }
.mock { font: .82rem/1.5 var(--mono); background: var(--night); color: var(--night-text); padding: 14px 16px; border-radius: 8px; overflow-x: auto; margin: 16px 0 4px; white-space: pre-wrap; }
.mock em { color: var(--night-muted); font-style: normal; }
.disclosure { margin-top: 28px; border-top: 1px solid var(--rule); padding-top: 14px; max-width: 760px; }
.disclosure summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.disclosure dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 12px 0; }
.disclosure dt { color: var(--muted); }
.disclosure dd { margin: 0; }

/* ---------- search ---------- */
.search-box { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--ink); border-radius: 999px; padding: 6px 18px; max-width: 720px; }
.search-box input { flex: 1; border: 0; font: 1.15rem var(--sans); padding: 10px 0; outline: none; background: transparent; color: var(--ink); min-width: 0; }
.search-box:focus-within { box-shadow: 0 0 0 3px #cfe5e1; }
.hint { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--muted); margin: 16px 0; }
.sr-status { font-weight: 600; margin: 8px 0; }
.empty { padding: 28px 0; color: var(--muted); }

/* ---------- live ---------- */
.lobby { max-width: 640px; margin-top: 18px; display: grid; gap: 12px; }
.audio-only { display: flex; align-items: center; gap: 8px; font: 600 1.05rem var(--sans); color: var(--teal); margin: 0; flex-wrap: wrap; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--teal); }
.room { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-top: 18px; }
.stage { background: var(--night); color: var(--night-text); border-radius: 14px; padding: clamp(18px, 3vw, 30px); display: grid; gap: 18px; }
.stage .audio-only { color: var(--night-teal); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile { background: var(--night-2); border-radius: 12px; padding: 18px 10px; display: grid; justify-items: center; gap: 8px; text-align: center; border: 1px solid transparent; transition: border-color .3s; }
.tile.speaking { border-color: var(--night-teal); }
.tile.me { border-color: #2f5560; }
.tile video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: #000; display: block; }
.tile audio { display: none; }
.tile-sp { font-size: .72rem; color: var(--night-muted); }
.tile-note { font-size: .75rem; color: var(--night-muted); margin: 0; }
.tile-badge { margin: 0; font-size: .75rem; color: var(--night-muted); }
.stage .row { flex-wrap: wrap; }
.avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #24414a; font: 600 1.2rem var(--serif); color: var(--night-text); }
.avatar.sm { width: 32px; height: 32px; font-size: .85rem; background: var(--sea); color: var(--ink); flex: none; }
.tile-name { font-size: .85rem; color: var(--night-muted); }
.eq { display: flex; gap: 3px; height: 14px; align-items: end; opacity: 0; }
.tile.speaking .eq { opacity: 1; }
.eq i { width: 3px; background: var(--night-teal); animation: eq 0.9s infinite ease-in-out; }
.eq i:nth-child(2) { animation-delay: .2s; } .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { 0%,100% { height: 4px; } 50% { height: 14px; } }
.captions { border-top: 1px solid #2a3f46; padding-top: 12px; min-height: 84px; }
.captions p { margin: 0; }
#caption { font: 1.15rem/1.45 var(--serif); }
#caption b { font: 600 .8rem var(--sans); color: var(--night-teal); display: block; margin-bottom: 2px; }
.rec { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; color: #f3c9a9; font-weight: 600; font-size: .9rem; }
.rec svg { color: #e2735a; width: 14px; height: 14px; }
.qa { display: grid; gap: 14px; align-content: start; }
.qa textarea { width: 100%; font: inherit; border: 1.5px solid var(--ink); border-radius: 8px; padding: 10px 12px; resize: vertical; margin-bottom: 10px; }
.qa-list { list-style: none; padding: 0; margin: 0; }
.qa-item { border: 1px solid var(--rule); border-radius: 8px; padding: 12px 14px; }
.qa-item p { margin: 0 0 6px; }
.qa-item.s-pending { border-style: dashed; }
.qa-item.s-answered { border-color: var(--teal); }
.answer { font-family: var(--serif); color: var(--teal-ink); }
.mod { border: 1px solid var(--ink); border-radius: var(--r); padding: 16px; background: var(--paper-2); display: grid; gap: 10px; }
.mod.dim { border-color: var(--rule); }
.mod-q { margin: 0; font-family: var(--serif); }

/* ---------- review ---------- */
.pipeline { display: flex; gap: 0; margin: 22px 0 28px; flex-wrap: wrap; }
.pipeline span { padding: 8px 14px; font-size: .85rem; border: 1px solid var(--rule); margin-inline-end: -1px; color: var(--muted); }
.pipeline span:first-child { border-start-start-radius: 999px; border-end-start-radius: 999px; }
.pipeline span:last-child { border-start-end-radius: 999px; border-end-end-radius: 999px; }
.pipeline .done { background: var(--sea); color: var(--ink); }
.pipeline .now { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.tbl { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: .92rem; }
.tbl th, .tbl td { text-align: start; padding: 10px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tbl thead th { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; border-bottom-color: var(--ink); }
.tbl tr.sub td { color: var(--muted); font-size: .85rem; padding-top: 0; }
.state { font-weight: 600; }
del { color: var(--muted); }
ins { text-decoration: none; background: #dcefeb; padding: 0 4px; border-radius: 3px; }
.actions { display: grid; gap: 12px; }
.approve { display: grid; gap: 10px; }
.approve select { font: inherit; padding: 8px; border-radius: 6px; border: 1px solid var(--rule); margin-inline-start: 8px; }
.refused { color: var(--warn); background: var(--warn-bg); padding: 10px 12px; border-radius: 6px; margin: 0; font-weight: 600; }
.ok { color: var(--teal); font-weight: 600; margin: 0; }
.audit { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .88rem; }
.audit li { border-inline-start: 2px solid var(--rule); padding-inline-start: 10px; }

/* ---------- sponsor ---------- */
.banner { background: var(--sea); padding: 10px 14px; border-radius: 8px; font-size: .9rem; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; margin: 20px 0 10px; }
.kpi { background: var(--paper); padding: 20px; display: grid; gap: 4px; color: var(--muted); font-size: .88rem; }
.kpi-n { font: 500 2rem/1.1 var(--serif); color: var(--ink); }
.kpi.masked { background: repeating-linear-gradient(135deg, #f6f5f1 0 8px, #fff 8px 16px); }
.kpi.masked .kpi-n { font-size: 1.4rem; color: var(--warn); }
.xtab { margin: 28px 0 0; }
.scroll { overflow-x: auto; }
.tbl.num td, .tbl.num tfoot td { text-align: end; font-variant-numeric: tabular-nums; }
.tbl.num tbody th, .tbl.num tfoot th { text-align: start; font-weight: 500; }
.tbl td.sup { color: var(--muted); font-size: .78rem; background: repeating-linear-gradient(135deg, #f6f5f1 0 6px, #fff 6px 12px); }
.tbl .tot { font-weight: 600; }
.tbl tfoot th, .tbl tfoot td { border-top: 1.5px solid var(--ink); border-bottom: 0; }
.export { margin-top: 32px; display: grid; gap: 4px; justify-items: start; }

/* ---------- decisions ---------- */
.decisions { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 18px; }
.decision { border: 1px solid var(--rule); border-radius: var(--r); padding: clamp(16px, 3vw, 24px); }
.decision.first { border: 2px solid var(--ink); }
.dec-head { display: flex; gap: 16px; }
.dec-no { font: 500 2.4rem/1 var(--serif); color: var(--teal); min-width: 1.2em; }
fieldset { border: 0; padding: 0; margin: 14px 0; display: grid; gap: 6px; }
.opt { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 8px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--teal); background: var(--sea); }
.opt input { accent-color: var(--teal); width: 18px; height: 18px; }
.dec-fields { display: grid; grid-template-columns: 1fr 180px; gap: 10px; }
.dec-fields label { display: grid; gap: 4px; font-size: .82rem; color: var(--muted); }
.dec-fields .wide { grid-column: 1 / -1; }
.dec-fields input { font: inherit; color: var(--ink); padding: 9px 10px; border: 1px solid var(--rule); border-radius: 6px; min-height: 42px; }

/* ---------- appendix ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--rule); margin-bottom: 24px; flex-wrap: wrap; }
.tabs button { font: inherit; background: none; border: 0; padding: 12px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.patient-grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.poster { background: var(--paper-2); border-radius: 14px; padding: 28px; text-align: center; display: grid; justify-items: center; gap: 4px; }
.poster-h { font: 600 2rem/1.4 "Al Nile", "Noto Naskh Arabic", "Geeza Pro", serif; margin: 6px 0 0; }
.poster-sub { font: italic 1.1rem var(--serif); margin: 0 0 14px; }
.qr-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 8px; }
.qr { width: 180px; height: 180px; display: block; box-shadow: 0 6px 24px rgba(23,44,53,.12); border-radius: 6px; transition: transform .18s; }
.qr-btn:hover .qr { transform: scale(1.03); }
.phone { border: 10px solid var(--ink); border-radius: 36px; min-height: 600px; background: var(--paper); display: flex; flex-direction: column; overflow: hidden; }
.ph-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--rule); font: 600 1rem var(--serif); }
.ph-bar .link { font: .85rem var(--sans); }
.ph-body { padding: 20px 18px; display: grid; gap: 12px; align-content: start; flex: 1; }
.ph-body.center { place-content: center; }
.ph-body h3 { font: 600 1.3rem/1.4 var(--serif); margin: 0; }
.phone[lang="ar"] .ph-body h3 { font-family: "Al Nile", "Noto Naskh Arabic", "Geeza Pro", serif; }
.ph-body input, .ph-body select { font: 1.3rem var(--sans); padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 8px; letter-spacing: .1em; }
.demo-code { background: var(--sea); padding: 8px 10px; border-radius: 6px; margin: 0; }
.p-card { display: flex; gap: 10px; align-items: center; border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; }
.p-card span:nth-child(2) { flex: 1; }
.p-card .icon-btn { width: 38px; height: 38px; }
.gate-mini { color: var(--warn); background: var(--warn-bg); padding: 10px; border-radius: 8px; font-size: .9rem; margin: 0; }
.gate-mini svg { width: 16px; height: 16px; vertical-align: -3px; }
.ph-reset { margin: 10px auto 16px; font-size: .85rem; }
.stills { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.still { margin: 0; }
.still figcaption { font-size: .9rem; color: var(--ink-2); margin-top: 10px; }
.sb-in, .sc-in { aspect-ratio: 4/3; border-radius: 12px; padding: 24px; display: grid; align-content: end; gap: 10px; position: relative; overflow: hidden; }
.sb-in { background: radial-gradient(120% 90% at 80% 0%, #3b2a1d 0%, #16110d 60%); color: #f3e7d6; }
.sb-k { font: 600 .7rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #d9a56b; }
.sb-t { font: 500 1.8rem/1.1 var(--serif); }
.sb-w { display: flex; gap: 4px; align-items: end; height: 30px; }
.sb-w i { width: 5px; background: #d9a56b; border-radius: 2px; height: 40%; }
.sb-w i:nth-child(2n) { height: 90%; } .sb-w i:nth-child(3n) { height: 60%; }
.sb-p { position: absolute; top: 24px; inset-inline-end: 24px; width: 52px; height: 52px; border-radius: 50%; background: #d9a56b; color: #16110d; display: grid; place-items: center; }
.sc-in { background: #0b2540; color: #fff; align-content: start; }
.sc-live { background: #d7263d; font: 700 .75rem var(--sans); padding: 4px 8px; border-radius: 3px; justify-self: start; letter-spacing: .1em; }
.sc-t { font: 700 1.5rem var(--sans); letter-spacing: -.01em; }
.sc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sc-grid i { aspect-ratio: 16/10; background: linear-gradient(160deg, #1e4f7a, #0f3352); border-radius: 4px; }
.sc-tick { position: absolute; bottom: 0; inset-inline: 0; background: #f2c14e; color: #0b2540; font: 700 .75rem var(--sans); padding: 8px 14px; }

/* ---------- mini-player ---------- */
.mini {
  position: relative; flex: none; margin: 0 8px; height: 70px; background: var(--ink); color: #fff; border-radius: 12px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 4px; align-items: center; padding: 4px 8px;
}
body.sheet-open .mini { display: none; }
.mini-open { display: flex; gap: 12px; align-items: center; background: none; border: 0; color: inherit; text-align: start; cursor: pointer; min-width: 0; padding: 4px; font: inherit; }
.mini-meta { display: grid; min-width: 0; }
.mini-title { font: 500 .98rem/1.3 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { font-size: .78rem; color: var(--night-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-time { font: .8rem var(--mono); color: var(--night-muted); }
.mini .icon-btn { background: transparent; color: #fff; border-color: #34505a; }
.mini .icon-btn.play { background: #fff; color: var(--ink); border-color: #fff; }
.mini-bar { position: absolute; inset-inline: 16px; bottom: 6px; height: 2px; background: #2d4650; border-radius: 2px; overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: var(--night-teal); }

/* ---------- full-screen player sheet (dark) ---------- */
.sheet {
  position: absolute; inset: 42px 0 18px; z-index: 40; overflow-y: auto; color: var(--night-text); border-radius: 20px 20px 0 0; overscroll-behavior: contain;
  background: radial-gradient(90% 60% at 20% 0%, #17404a 0%, var(--night) 55%), var(--night);
  animation: rise .2s ease-out;
}
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.sheet[hidden] { display: none; }
.sheet-inner { max-width: 1100px; margin: 0 auto; padding: 16px clamp(16px, 4vw, 40px) 48px; }
.sheet-top { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; text-align: center; }
.sheet-top .kicker { justify-content: center; }
.icon-btn.ghost { background: transparent; color: var(--night-text); border-color: #34505a; }
.sheet-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(24px, 5vw, 64px); align-items: center; margin-top: 24px; }
.sheet-title { font: 500 clamp(1.7rem, 3.4vw, 2.6rem)/1.12 var(--serif); margin: 4px 0 10px; }
html[lang="ar"] .sheet-title { line-height: 1.45; }
.sheet-speaker { color: var(--night-muted); margin: 0 0 12px; }
.sheet-disc { font-size: .88rem; color: #dbe5e3; border-inline-start: 3px solid var(--night-teal); padding-inline-start: 10px; margin: 0 0 20px; }
.seek input { width: 100%; accent-color: var(--night-teal); height: 28px; }
.seek-times { display: flex; justify-content: space-between; font: .82rem var(--mono); color: var(--night-muted); }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 0; }
.controls .pill { background: transparent; color: var(--night-text); border-color: #34505a; min-width: 64px; justify-content: center; }
.controls .pill svg { width: 18px; height: 18px; }
.icon-btn.big { width: 56px; height: 56px; }
.icon-btn.huge { width: 76px; height: 76px; background: var(--night-text); color: var(--night); border: 0; }
.icon-btn.huge svg { width: 32px; height: 32px; }
.sheet-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: space-between; border-top: 1px solid #284049; padding-top: 14px; }
.sleep { display: inline-flex; gap: 8px; align-items: center; font-size: .9rem; }
.sleep select { font: inherit; background: var(--night-2); color: var(--night-text); border: 1px solid #34505a; border-radius: 999px; padding: 6px 10px; }
.offline { font-size: .8rem; color: var(--night-muted); display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.offline svg { width: 16px; height: 16px; }
.bms h3, .sample-transcript h3 { font: 600 .74rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--night-muted); margin: 0 0 .5rem; }
.bms ul { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; padding: 0; margin: 0; }
.bms p { margin: 0; font-size: .88rem; }

/* ---------- badge + toast ---------- */
.badge {
  margin: 0; font-size: .72rem; color: var(--muted); background: #fff; border: 1px solid var(--rule);
  padding: 4px 10px; border-radius: 999px; display: flex; gap: 6px; align-items: center; width: fit-content;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: #d08a3e; }
.toast {
  position: absolute; left: 50%; top: 104px; transform: translate(-50%, -12px); z-index: 60; width: calc(100% - 24px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: .92rem; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- presentation stage + mobile app ---------- */
body { padding: 0; background: #eaece8; }
.presentation { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.presenter { padding: 32px 24px; border-inline-end: 1px solid #d0d6d0; background: #f5f4f0; }
.presenter-heading { margin-bottom: 24px; }
.presenter-note { color: var(--muted); font: italic 1rem var(--serif); }
.presenter-controls > summary { font-size: .85rem; cursor: pointer; min-height: 44px; }
.presenter .tools { justify-content: start; margin-bottom: 28px; }
.presenter .persona { width: 100%; font-size: .8rem; display: grid; gap: 6px; }
.presenter .persona select { width: 100%; max-width: 100%; border-radius: 8px; min-height: 44px; }
.pill { min-height: 44px; }
#stage-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 28px; }
#stage-modes a { border: 1px solid var(--rule); border-radius: 8px; padding: 10px; min-height: 44px; text-align: center; text-decoration: none; font-size: .8rem; }
#stage-modes a[aria-current] { background: var(--ink); color: #fff; }
.guided-steps { padding-inline-start: 20px; color: var(--muted); font-size: .8rem; }
.guided-steps a { display: block; padding: 10px 0; min-height: 44px; text-decoration: none; }
.guided-steps a[aria-current] { color: var(--ink); font-weight: 700; }
.appendix-link { display: block; font-size: .8rem; padding: 12px 0; }
.demo-stage { display: flex; justify-content: center; align-items: start; gap: 32px; padding: 28px; min-width: 0; }
.phone-wrap { flex: 0 0 390px; width: 390px; }
.device-label { margin: 0 0 12px; text-align: center; color: var(--muted); font: .7rem var(--mono); }
.device { position: relative; isolation: isolate; display: flex; flex-direction: column; width: 390px; height: 844px; border: 8px solid #17272d; border-radius: 48px; overflow: hidden; background: var(--paper); box-shadow: 0 25px 70px #172c3526, 0 0 0 1px #5c696d; }
.status-bar { height: 42px; flex: none; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; position: relative; font: 600 .75rem var(--sans); }
.status-bar > span:last-child { display: flex; align-items: center; gap: 6px; }
.notch { position: absolute; top: 5px; left: 50%; transform: translateX(-50%); width: 104px; height: 25px; background: #17272d; border-radius: 20px; }
.battery { width: 22px; height: 11px; border: 1.5px solid var(--ink); border-radius: 3px; box-shadow: inset 0 0 0 1.5px #fff; background: var(--ink); }
.app-header { display: flex; justify-content: space-between; align-items: center; min-height: 58px; padding: 0 20px; border-bottom: 1px solid var(--rule); }
.app-header a { color: var(--ink); text-decoration: none; }
.app-header .wordmark { font-size: 1.35rem; }
.app-header .avatar { width: 44px; height: 44px; }
.app-content { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.app-content main { padding: 22px 18px 28px; width: 100%; }
.device .display { font-size: 2rem; line-height: 1.13; }
.device .display.sm { font-size: 1.85rem; }
.device .lede { font-size: .95rem; }
.device .hero, .device .two-col, .device .ep-head, .device .room, .device .sheet-grid { grid-template-columns: 1fr; gap: 20px; }
.device .hero { padding-bottom: 24px; }
.device .hero-art { grid-row: 1; width: 100%; }
.device .cover.hero { aspect-ratio: 1.85; font-size: 15px; padding: 18px; }
.device .section { padding-top: 24px; }
.device .h2 { font-size: 1.4rem; }
.device .hero-actions { gap: 10px; }
.device .hero-actions .btn { flex: 1 1 100%; }
.device .ep-row { grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; padding: 14px 0; }
.device .ep-row-link { gap: 10px; }
.device .ep-row .lang-pill, .device .ep-row .dur { display: none; }
.device .ep-title { font-size: 1rem; }
.device .ep-row .meta { font-size: .75rem; }
.device .cover.sm { width: 56px; }
.device .cover.lg { width: 100%; max-width: 240px; margin-inline: auto; }
.device .card { padding: 16px; }
.device .tiles { gap: 6px; }
.device .tile { padding: 14px 5px; }
.device .tile .avatar { width: 48px; height: 48px; }
.device .tile video { aspect-ratio: 1 / 1; }
.device .tile .btn.sm { min-height: 0; padding: 6px 10px; }
.device .search-box { padding-inline: 12px; }
.device .search-box input { font-size: 1rem; }
.device .mock { overflow-wrap: anywhere; }
.device .disclosure dl { grid-template-columns: 1fr; gap: 4px; }
.device .disclosure dd { margin-bottom: 8px; }
.device .link, .device .back, .device summary, .device .hub-link { min-height: 44px; display: inline-flex; align-items: center; }
.device .hub-link { display: flex; }
.device input:not([type=checkbox]), .device select { min-height: 44px; }
.device .scope-chip { white-space: normal; line-height: 1.4; }
.mini-time, .mini > [data-act=skip] { display: none; }
.device .controls .pill span { display: none; }
.device .mini-open { gap: 8px; }
.device .mini-title { font-size: .88rem; }
.device .mini-sub { font-size: .68rem; }
#nav.bottom-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; flex: none; min-height: 62px; padding: 4px 8px 0; overflow: visible; background: #fff; }
#nav.bottom-tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 10px; min-height: 54px; padding: 4px; font-size: .65rem; }
#nav.bottom-tabs a[aria-current=page] { color: var(--teal-ink); background: var(--sea); }
.home-indicator { height: 18px; flex: none; display: grid; place-items: center; }
.home-indicator::after { content: ''; width: 112px; height: 4px; border-radius: 4px; background: var(--ink); }
.device .sheet-inner { padding: 12px 18px 28px; }
.device .sheet-grid { margin-top: 16px; }
.device .cover.xl { width: 200px; font-size: 13px; }
.device .sheet-title { font-size: 1.6rem; }
.device .controls { gap: 4px; }
.device .controls .pill { min-width: 44px; padding: 6px; }
.device .icon-btn.huge { width: 64px; height: 64px; }
.device .icon-btn.big { width: 44px; height: 44px; }
.device .toast { font-size: .8rem; }
.phone-summary { padding: 24px 20px; }
.phone-summary .cover { margin: 18px auto 24px; }
.companion { flex: 1; min-width: 0; max-width: 1000px; border: 1px solid #d0d6d0; border-radius: 18px; background: #fff; max-height: 884px; overflow: auto; }
.companion[hidden] { display: none; }
.companion-header { padding: 20px 24px 12px; border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.companion main { padding: 24px; }
.companion .two-col { grid-template-columns: 1fr; }
.companion .patient-grid { grid-template-columns: 1fr; }
.companion .kpis { grid-template-columns: 1fr 1fr; }
.companion .stills { grid-template-columns: 1fr; }
@media (min-width: 700px) and (max-width: 1150px) {
  .presentation { grid-template-columns: 220px minmax(0, 1fr); }
  .demo-stage { padding: 20px; gap: 20px; }
  .companion-mode .demo-stage { flex-wrap: wrap; }
  .companion { flex-basis: 100%; }
}
@media (max-width: 699px) {
  .presentation { display: block; }
  .presenter { padding: 12px 16px; border-inline-end: 0; border-bottom: 1px solid var(--rule); }
  .presenter-heading { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
  .presenter-heading > .kicker, .presenter-note, .brand-sub { display: none; }
  .presenter .wordmark { font-size: 1.15rem; }
  .presenter-controls > summary { padding-top: 8px; }
  .demo-stage { padding: 0; display: block; }
  .phone-wrap, .device { width: 100%; }
  .phone-wrap { margin: 0; }
  .device-label { display: none; }
  .device { height: 100svh; border: 0; border-radius: 0; box-shadow: none; }
  .companion { max-height: none; border-radius: 0; }
  .companion .dec-fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tile.speaking .eq i { height: 10px; }
}
@media print {
  .presenter, .phone-wrap, .companion-header, .row .btn { display: none !important; }
  .presentation, .demo-stage { display: block; padding: 0; }
  .companion { max-height: none; border: 0; overflow: visible; }
  body { background: #fff; }
}

/* ---------- v2: profile, chips, menus, polls, forms ---------- */
.nbadge { position: absolute; top: 2px; inset-inline-end: calc(50% - 22px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #b3261e; color: #fff; font: 700 .65rem/16px var(--sans); text-align: center; font-style: normal; }
.nbadge.static { position: static; display: inline-block; vertical-align: middle; }
#nav.bottom-tabs a { position: relative; color: var(--ink-2); text-decoration: none; }
.btn.sm { min-height: 44px; padding: 6px 14px; font-size: .85rem; }
.btn.sm svg { width: 16px; height: 16px; }
.icon-btn.sm { width: 44px; height: 44px; flex: none; }
.ep-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.btn[aria-pressed="true"]:not(.ghost-light) { background: var(--sea); border-color: var(--teal); color: var(--teal-ink); }
.btn.ghost-light[aria-pressed="true"] { background: rgba(124,199,190,.2); border-color: var(--night-teal); }
.menu, .inpanel { border: 1px solid var(--rule); border-radius: var(--r); padding: 14px; background: var(--paper-2); margin: 14px 0; display: grid; gap: 8px; }
.menu-item { font: inherit; text-align: start; min-height: 44px; border: 1px solid var(--rule); background: #fff; border-radius: 8px; padding: 8px 12px; cursor: pointer; color: var(--ink); }
.menu-item[aria-pressed="true"] { border-color: var(--teal); background: var(--sea); }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input:not([type=hidden]) { flex: 1 1 140px; min-width: 0; font: inherit; border: 1px solid var(--ink-2); border-radius: 8px; padding: 8px 10px; min-height: 44px; }
.stackf { display: grid; gap: 12px; }
.stackf label, .stackf legend { display: grid; gap: 4px; font-size: .9rem; }
.stackf label.check { display: flex; }
.stackf textarea, .stackf select, .inpanel textarea, .card textarea { font: inherit; width: 100%; border: 1px solid var(--ink-2); border-radius: 8px; padding: 8px 10px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.kv { display: grid; gap: 2px; margin: 0 0 10px; }
.kv dt { color: var(--muted); font-size: .78rem; margin-top: 8px; }
.kv dd { margin: 0; }
.upnext { margin-top: 28px; border-top: 1px solid var(--rule); padding-top: 14px; }
.upnext .ep-row { grid-template-columns: minmax(0, 1fr) auto; }
.rail { list-style: none; display: flex; gap: 12px; overflow-x: auto; padding: 0 0 8px; margin: 0; scroll-snap-type: x proximity; }
.rail-card { display: grid; gap: 6px; width: 150px; flex: none; scroll-snap-align: start; text-decoration: none; color: inherit; }
.rail-card .cover.sm { width: 100%; }
.rail-card .ep-title { font-size: .88rem; line-height: 1.3; }
.filters { display: grid; gap: 8px; margin: 14px 0 6px; }
.chips { display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.chips-l { font-size: .72rem; color: var(--muted); flex: none; min-width: 64px; }
.chip { position: relative; flex: none; font: inherit; font-size: .82rem; min-height: 44px; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--rule); background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"], .chip.radio:has(input:checked) { background: var(--teal); border-color: var(--teal); color: #fff; }
.chip.radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip.radio:has(input:focus-visible) { outline: 2px solid var(--teal); outline-offset: 2px; }
.poll-res { position: relative; display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; margin: 6px 0; overflow: hidden; }
.poll-res > span, .poll-res > b { position: relative; z-index: 1; }
.poll-res i { position: absolute; inset: 0 auto 0 0; background: #cfe5e1; transition: width .4s; z-index: 0; }
.poll-res.mine { border-color: var(--teal); }
#poll { color: var(--ink); background: var(--paper); margin-top: 12px; }
.you-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 8px; }
.avatar.big { width: 64px; height: 64px; background: var(--ink); color: #fff; font-size: 1.3rem; flex: none; }
.vstat { font-weight: 600; margin: 4px 0 10px; }
.vstat.ok { color: var(--teal-ink); }
.vstat.warn { color: var(--warn); }
.you-sec { border-top: 1px solid var(--rule); padding: 16px 0; }
.plain { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; }
.notif { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--rule); }
.notif.unread { font-weight: 600; border-inline-start: 3px solid var(--teal); padding-inline-start: 8px; }
.pl { border: 1px solid var(--rule); border-radius: var(--r); padding: 12px; margin-bottom: 8px; }
.pl-head { display: flex; justify-content: space-between; gap: 8px; }
.pl-ep { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px dashed var(--rule); }
.switch select { font: inherit; border: 1px solid var(--ink-2); border-radius: 8px; padding: 6px 10px; }
.switch input[type=checkbox] { width: 44px; height: 26px; accent-color: var(--teal); }
.ph-mini { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.ph-mini .link { color: var(--night-teal); margin-inline-start: auto; }
.ph-mini .eq { opacity: 1; display: inline-flex; gap: 2px; align-items: end; height: 16px; }
.ph-mini .eq i { width: 3px; height: 10px; background: var(--night-teal); animation: eq .9s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .poll-res i { transition: none; } }

/* ---------- admin back-office (#/admin — companion surface, not the mobile app) ---------- */
.adm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); padding-bottom: 14px; margin-bottom: 18px; }
.adm-head .h2 { margin: 0; }
.adm-body { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 24px; align-items: start; }
.adm-side { display: flex; flex-direction: column; gap: 2px; border-inline-end: 1px solid var(--rule); padding-inline-end: 12px; position: sticky; top: 0; }
.adm-side button { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: start; padding: 9px 12px; border: 0; border-radius: 8px; background: none; font: 600 .92rem var(--sans); color: var(--muted); cursor: pointer; }
.adm-side button:hover { background: var(--paper-2); color: var(--ink); }
.adm-side button[aria-current="true"] { background: var(--ink); color: #fff; }
.adm-main > h2:first-child { margin-top: 0; }
.adm-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.adm-tools input[type="search"] { flex: 1 1 220px; min-width: 0; font: inherit; border: 1px solid var(--ink-2); border-radius: 8px; padding: 8px 12px; min-height: 42px; }
.adm-tools select, .kan-col select, .adm-create input { font: inherit; border: 1px solid var(--ink-2); border-radius: 8px; padding: 8px 10px; min-height: 42px; background: #fff; }
.adm-tools label { display: flex; gap: 8px; align-items: center; }
.adm .kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.chart-grid { display: grid; grid-template-columns: 2.2fr 1fr; gap: 16px; margin-top: 16px; }
.chart-grid + .chart-box { margin-top: 16px; }
.chart-box { margin: 0; border: 1px solid var(--rule); border-radius: var(--r); background: #fff; padding: 12px 14px 14px; min-width: 0; }
.chart-box figcaption { margin-bottom: 8px; }
.chart-cv { position: relative; height: 235px; }
.chart-fallback { max-height: 265px; overflow: auto; }
.kan { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 10px; }
.kan-col { border: 1px dashed var(--rule); border-radius: var(--r); background: var(--paper-2); padding: 10px; min-height: 120px; }
.kan-col h3 { display: flex; justify-content: space-between; font: 600 .72rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 2px 4px 10px; }
.kan-card { background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 10px; margin-bottom: 8px; font-size: .88rem; }
.kan-card strong { display: block; margin-bottom: 2px; }
.kan-card .row { margin: 8px 0 0; gap: 6px; }
.empty-col { color: var(--muted); font-size: .8rem; margin: 4px; }
.adm .icon-btn.sm { width: 32px; height: 32px; font-size: 1rem; }
.btn.star[aria-pressed="true"] { background: #fdf3d7; border-color: #c98a2d; color: #6a3f06; }
.adm-create { margin-top: 16px; }
.st { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.st.s-approved, .st.s-active, .st.s-verified { background: #dcefeb; color: #12403e; }
.st.s-pending, .st.s-inreview, .st.s-upcoming, .st.s-review { background: #f8ead3; color: #6a3f06; }
.st.s-rejected, .st.s-suspended, .st.s-cancelled { background: #f6d9d5; color: #7a1f15; }
.st.s-live, .st.s-new, .st.s-forwarded { background: #e2e8f5; color: #2c3f66; }
.st.s-closed, .st.s-past, .st.s-archived { background: var(--paper-2); color: var(--muted); }
.st.s-verification, .st.s-safety, .st.s-content, .st.s-webinar, .st.s-users, .st.s-editorial, .st.s-export { background: #eceae3; color: var(--ink-2); }
.ae-detail summary { cursor: pointer; color: var(--teal-ink); list-style: none; }
.ae-detail summary::before { content: "▸ "; }
.ae-detail[open] summary::before { content: "▾ "; }
.ae-detail p { margin: 6px 0 0; }
@media (max-width: 980px) {
  .adm-body { grid-template-columns: 1fr; }
  .adm-side { position: static; flex-direction: row; flex-wrap: wrap; border-inline-end: 0; padding-inline-end: 0; }
  .kan { grid-template-columns: 1fr 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) { .kan { grid-template-columns: 1fr; } }

/* ---------- installed PWA: the device is the screen ---------- */
@media (display-mode: standalone) {
  .presenter, .status-bar, .home-indicator, .device-label, .companion { display: none; }
  .presentation { display: block; min-height: 0; }
  .demo-stage { display: block; padding: 0; }
  .phone-wrap, .device { width: 100%; flex: none; }
  .device { height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .app-header { padding-top: env(safe-area-inset-top); min-height: calc(58px + env(safe-area-inset-top)); padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }
  .bottom-tabs { padding-bottom: env(safe-area-inset-bottom); }
  .sheet { inset: 0; border-radius: 0; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}

/* Unified catalogue and persistent video surface (never replaced by a render). */
.format-pill { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; border: 1px solid currentColor; border-radius: 999px; padding: 2px 7px; margin-inline-end: 5px; font: 600 .65rem/1.3 var(--sans); vertical-align: middle; }
.format-pill svg { width: 13px; height: 13px; flex-shrink: 0; }
.ep-row .format-pill { margin-bottom: 5px; }
.rail-card .format-pill { align-self: flex-start; }
.video-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.audio-only-badge { font-size: .75rem; color: var(--teal); }
.sheet .audio-only-badge { color: var(--night-teal); }
.sheet.watching:not([hidden]) { display: flex; flex-direction: column; gap: 16px; padding: 12px 18px 28px; }
.sheet.watching #sheet-content, .sheet.watching .sheet-inner { display: contents; }
.sheet.watching .sheet-top { order: 0; }
.sheet.watching #video-stage { order: 1; flex-shrink: 0; }
.device .sheet.watching .sheet-grid { display: block; order: 2; margin-top: 0; }
#episode-video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 220px; object-fit: contain; background: #081c22; border-radius: 10px; }
.waveform { display: flex; justify-content: center; align-items: center; gap: 5px; height: 36px; margin-top: 10px; color: var(--night-teal); }
.waveform i { display: block; width: 4px; height: 45%; border-radius: 3px; background: currentColor; animation: voice-wave .85s ease-in-out infinite alternate; animation-play-state: paused; }
.waveform i:nth-child(3n) { height: 90%; animation-delay: -.3s; }
.waveform i:nth-child(3n + 1) { height: 65%; animation-delay: -.6s; }
.is-playing .waveform i { animation-play-state: running; }
@keyframes voice-wave { to { transform: scaleY(.35); } }
@media (prefers-reduced-motion: reduce) { .waveform i { animation: none; } }

/* Simulated call-on promotion and moderation queues. */
.stage .tile.called-on { min-height: 230px; width: 100%; margin-bottom: 12px; border: 2px solid var(--teal, #188b85); }
.called-on .tile-badge { position: static; margin-top: 12px; }
.live-chat { margin-top: 24px; }
.qa-list .btn { margin: 4px 4px 4px 0; }
.qa-item.s-rejected { opacity: .7; border-inline-start: 3px solid #a34747; }

/* Round 3 sample transcript, downloads and queue; logical spacing follows RTL. */
/* Dark-surface buttons: the base .btn is paper-on-ink, and `color: inherit` on the sheet's
   near-white text made Download/Up next white-on-white. Every non-primary sheet button gets
   a night surface instead; disabled stays legible (night-muted on night-2). */
.sheet .btn:not(.primary) { background: var(--night-2); color: var(--night-text); border-color: #34505a; }
.sheet .btn:not(.primary):hover { background: #1d343c; }
.sheet .btn:not(.primary):disabled { background: var(--night-2); color: var(--night-muted); border-color: #34505a; opacity: .6; }
.sheet .btn:not(.primary)[aria-pressed="true"] { background: rgba(124,199,190,.18); border-color: var(--night-teal); color: var(--night-teal); }
/* One divider rhythm for the sheet-main sections: Bookmarks / actions / Transcript. */
.sheet-main .bms, .sheet-main .sheet-actions, .sheet-main .sample-transcript { margin-block-start: 1.125rem; padding-block-start: .875rem; border-block-start: 1px solid #284049; }
.sheet-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .75rem; align-items: start; }
.sheet-actions .download-control { margin-block: 0; }
.device .sheet-actions { grid-template-columns: 1fr; }
.transcript-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.transcript-head .btn { min-height: 0; padding: 4px 12px; }
.sample-transcript { padding-block-end: .5rem; }
.sample-transcript li { border-inline-start: 3px solid transparent; }
/* Caption and chapter rows: fixed LTR timecode column + text column, so time never touches
   text ("0:00 Welcome"); grid direction follows dir, so RTL mirrors the columns. */
.sample-transcript .transcript-row > button, .sample-transcript .chapter-row > button {
  display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: .65rem; align-items: start;
  text-align: start; width: 100%; padding: .45rem .65rem; line-height: 1.55;
}
.transcript-row .tc, .chapter-row .tc { font-family: var(--mono); font-size: .82rem; color: var(--night-muted); }
.sample-transcript .caption-active { background: #ffffff18; border-inline-start-color: #65d8c5; }
#episode-caption { padding: .75rem; background: #ffffff12; min-height: 3rem; }
.download-control { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-block: .75rem; }
.download-badge { display: inline-block; font-size: .72rem; padding: .15rem .4rem; border: 1px solid currentColor; border-radius: .3rem; }
.sheet-main .download-control .fine { color: #c5d5d5; }
.queue-item { padding-block: .75rem; border-block-end: 1px solid #88999940; }
.queue-item .row { margin-block-start: .5rem; }
.ph-mini { flex-wrap: wrap; }
.ph-mini progress { width: 100%; accent-color: var(--teal, #0a7773); }
.download-control progress { max-width: 9rem; }

/* Gesture feedback leaves existing button targets and scrolling dimensions intact. */
.gesture-guide { margin: 0; padding-inline-start: 20px; font-size: .78rem; color: var(--muted); }
.gesture-guide li { margin-block: 8px; }
.sheet-top { touch-action: pan-x; }
.sheet-art { touch-action: pan-y; }
.mini { touch-action: pan-x; }

/* Social slice stays within the existing clinical editorial palette. */
.live-now-link { display:block; color:inherit; text-decoration:none; margin-block:1rem; }
.presence-pill { display:flex; align-items:center; flex-wrap:wrap; gap:.45rem; padding:.65rem .9rem; border:1px solid var(--teal, #17685f); border-radius:1.2rem; color:var(--teal, #17685f); font-weight:600; }
.week-card, .speaker-profile, .thanks-option { margin-block:1rem; }
.admin-live { border-inline-start:4px solid var(--teal, #17685f); margin-block-end:1.5rem; }
.aggregate-feed { padding-inline-start:1.2rem; font-size:.85rem; line-height:1.9; }
.engagement-funnel { display:grid; gap:.7rem; list-style:none; padding:0; }
.engagement-funnel li { display:grid; grid-template-columns:minmax(5rem, 1fr) auto; gap:.35rem 1rem; }
.engagement-funnel progress { grid-column:1 / -1; width:100%; height:.55rem; accent-color:var(--teal, #17685f); }
.engagement-funnel .masked { color:var(--muted, #626b68); }
.report-metrics { display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:.8rem 1rem; }
.report-metrics dd { margin:0; font-variant-numeric:tabular-nums; }
.guardrails { border-inline-start:4px solid var(--teal, #17685f); margin-block:1.25rem; }
