:root {
  --runway: #78D64B;
  --ink: #13180F;
  --paper: #F4F3EC;
  --leaf: #B7ED93;
  --forest: #1E7A43;
  --white: #FFFFFF;
  --graphite: #3A4034;
  --grey: #8A8F84;
  --rule: rgba(19, 24, 15, .16);
  --rule-strong: rgba(19, 24, 15, .42);
  --rule-dark: rgba(255, 255, 255, .18);
  --danger: #B42318;
  --warning: #8A5A00;
  --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-cjk: "PingFang SC", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", "Roboto Mono", "Cascadia Code", Consolas, monospace;
  --panel: #FAFAF6;
  --page: min(1520px, calc(100vw - 64px));
  --shadow-small: 0 14px 40px rgba(19, 24, 15, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-cjk);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -.005em;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--runway); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 1000; transform: translateY(-160%); background: var(--runway); color: var(--ink); padding: 8px 12px; font-weight: 700; text-decoration: none; }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 40; background: rgba(244,243,236,.96); border-bottom: 1px solid var(--rule-strong); backdrop-filter: blur(14px); }
.header-inner { width: var(--page); min-height: 76px; margin: 0 auto; display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 26px; }
.brand { display: inline-flex; align-items: center; border-right: 1px solid var(--rule); padding-right: 26px; }
.brand img { width: 110px; height: auto; }
.product-mark { display: flex; flex-direction: column; line-height: 1.2; }
.product-name { font-size: 15px; font-weight: 750; letter-spacing: -.01em; }
.product-code { margin-top: 5px; color: var(--graphite); font: 10px/1.2 var(--font-mono); letter-spacing: .1em; }
.header-nav { justify-self: end; display: flex; align-items: center; gap: 30px; }
.header-nav a { text-decoration: none; font-size: 13px; font-weight: 650; border-bottom: 3px solid transparent; padding: 27px 0 23px; }
.header-nav a:hover, .header-nav a[aria-current="page"] { border-bottom-color: var(--runway); }

.workbench-hero { position: relative; overflow: hidden; background: var(--ink); color: var(--white); }
.hero-inner { position: relative; z-index: 2; width: var(--page); margin: 0 auto; padding: 88px 0 0; }
.eyebrow, .section-kicker { margin: 0 0 22px; color: var(--runway); font: 700 12px/1.3 var(--font-mono); letter-spacing: .12em; }
.eyebrow::before, .section-kicker::before { content: ""; display: inline-block; width: 28px; height: 3px; margin-right: 12px; vertical-align: 3px; background: var(--runway); }
.workbench-hero h1 { max-width: 980px; margin: 0; color: var(--white); font: 800 clamp(46px, 5.15vw, 80px)/1.01 var(--font-cjk); letter-spacing: -.055em; }
.workbench-hero h1 span { color: var(--runway); }
.hero-lead { max-width: 62ch; margin: 30px 0 56px; color: rgba(255,255,255,.74); font-size: clamp(17px, 1.35vw, 20px); line-height: 1.72; }
.runway { position: absolute; z-index: 1; right: -70px; height: 12px; background: var(--runway); transform: rotate(-54deg); transform-origin: right center; }
.runway-a { width: 620px; top: 72px; }
.runway-b { width: 470px; top: 148px; right: 45px; height: 7px; background: var(--leaf); }
.hero-status { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-top: 1px solid var(--rule-dark); }
.hero-status > div { min-height: 120px; padding: 30px 32px 24px 0; border-right: 1px solid var(--rule-dark); }
.hero-status > div:not(:first-child) { padding-left: 28px; }
.hero-status > div:last-child { border-right: 0; }
.hero-status strong { display: block; color: var(--runway); font: 800 38px/.95 var(--font-display); font-variant-numeric: tabular-nums; }
.hero-status span { display: block; margin-top: 10px; color: rgba(255,255,255,.68); font-size: 13px; }

.task-switcher { background: var(--forest); color: var(--white); }
.task-inner { width: var(--page); margin: 0 auto; display: grid; grid-template-columns: repeat(4,1fr); }
.task-inner button { min-height: 116px; display: grid; grid-template-columns: 42px 1fr; gap: 18px; align-items: center; padding: 24px 28px; background: transparent; color: inherit; border: 0; border-right: 1px solid rgba(255,255,255,.22); text-align: left; cursor: pointer; }
.task-inner button:first-child { border-left: 1px solid rgba(255,255,255,.2); }
.task-inner button:hover { background: rgba(19,24,15,.24); box-shadow: inset 0 -4px var(--runway); }
.task-no { align-self: start; padding-top: 3px; color: var(--leaf); font: 700 13px/1.4 var(--font-mono); }
.task-inner b { display: block; font-size: 16px; letter-spacing: -.015em; }
.task-inner small { display: block; margin-top: 5px; color: rgba(255,255,255,.72); line-height: 1.4; }

.workspace-section { width: var(--page); margin: 0 auto; padding: 112px 0 128px; }
.workspace-heading { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 64px; align-items: end; margin-bottom: 40px; }
.workspace-heading h2, .format-contract h2 { margin: 0; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.08; letter-spacing: -.035em; }
.workspace-heading > p { max-width: 46ch; margin: 0; color: var(--graphite); line-height: 1.8; }
.section-kicker { color: var(--forest); margin-bottom: 14px; }

.workbench { height: min(880px, calc(100dvh - 96px)); min-height: 680px; display: grid; grid-template-columns: minmax(276px, 316px) minmax(500px, 1fr) minmax(286px, 332px); background: var(--white); border: 1px solid var(--rule-strong); border-top: 3px solid var(--ink); box-shadow: var(--shadow-small); }
.library-pane, .reader-pane, .control-pane { min-width: 0; min-height: 0; }
.library-pane, .control-pane { display: flex; flex-direction: column; background: var(--panel); }
.library-pane { border-right: 1px solid var(--rule); }
.control-pane { border-left: 1px solid var(--rule); overflow-y: auto; }
.reader-pane { display: flex; flex-direction: column; background: var(--white); }
.pane-head { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; border-bottom: 1px solid var(--rule); }
.pane-head > div { display: flex; gap: 10px; align-items: baseline; }
.pane-index { color: var(--forest); font: 700 12px var(--font-mono); }
.pane-head h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.result-count { color: var(--graphite); font: 12px var(--font-mono); }

.search-box { margin: 18px 18px 10px; height: 46px; display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; padding: 0 12px; background: var(--white); border: 1px solid var(--rule-strong); }
.search-box:focus-within { border-color: var(--forest); box-shadow: inset 3px 0 var(--runway); }
.search-box svg { width: 18px; fill: none; stroke: var(--graphite); stroke-width: 1.8; stroke-linecap: round; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-box kbd { color: var(--grey); font: 11px var(--font-mono); border: 1px solid var(--rule); padding: 1px 5px; }
.filter-tabs { display: flex; gap: 0; padding: 0 18px 14px; overflow-x: auto; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tabs button { flex: 0 0 auto; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 7px 8px 6px; color: var(--graphite); font-size: 12px; cursor: pointer; }
.filter-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--runway); font-weight: 700; }
.script-list { flex: 1; min-height: 0; overflow-y: auto; border-top: 1px solid var(--rule); }
.script-card { width: 100%; display: block; padding: 19px 20px 18px; background: transparent; border: 0; border-bottom: 1px solid var(--rule); text-align: left; cursor: pointer; }
.script-card:hover { background: var(--paper); }
.script-card[aria-selected="true"] { background: var(--ink); color: var(--white); box-shadow: inset 4px 0 var(--runway); }
.script-card-top { display: flex; justify-content: space-between; gap: 14px; color: var(--forest); font: 700 10px/1.3 var(--font-mono); letter-spacing: .06em; }
.script-card[aria-selected="true"] .script-card-top { color: var(--runway); }
.script-card-title { display: block; margin-top: 9px; font-size: 15px; font-weight: 730; line-height: 1.43; letter-spacing: -.012em; }
.script-card-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 9px; color: var(--grey); font-size: 12px; }
.script-card[aria-selected="true"] .script-card-meta { color: rgba(255,255,255,.62); }
.empty-state { padding: 30px 20px; border-top: 1px solid var(--rule); }
.empty-state p { margin: 4px 0 0; color: var(--graphite); font-size: 13px; }

.reader-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; padding: 30px 36px 25px; border-bottom: 1px solid var(--rule); }
.reader-series { margin: 0 0 6px; color: var(--forest); font: 700 11px/1.4 var(--font-mono); letter-spacing: .08em; }
.reader-head h3 { margin: 0; max-width: none; font-size: clamp(25px,1.85vw,31px); line-height: 1.16; letter-spacing: -.035em; text-wrap: balance; }
.reader-summary { max-width: 62ch; margin: 12px 0 0; color: var(--graphite); font-size: 14px; line-height: 1.7; }
.status-mark { padding: 7px 10px 6px; border: 1px solid currentColor; border-top-width: 3px; color: var(--warning); font: 700 10px var(--font-mono); letter-spacing: .04em; white-space: nowrap; }
.status-mark[data-status="approved"] { color: var(--forest); }
.status-mark[data-status="paused"] { color: var(--danger); }
.script-meta { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); margin: 0; padding: 0 36px; border-bottom: 1px solid var(--rule); }
.script-meta > div { min-width: 0; padding: 12px 12px 12px 0; border-right: 1px solid var(--rule); }
.script-meta > div:not(:first-child) { padding-left: 12px; }
.script-meta > div:last-child { border-right: 0; }
.script-meta dt { color: var(--grey); font-size: 10px; }
.script-meta dd { margin: 3px 0 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font: 600 11px/1.4 var(--font-mono); white-space: nowrap; }
.reader-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 0 36px; min-height: 58px; border-bottom: 1px solid var(--rule); }
.mode-tabs { display: flex; align-self: stretch; overflow-x: auto; }
.mode-tabs button { border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 0 14px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.mode-tabs button:first-child { padding-left: 0; }
.mode-tabs button[aria-selected="true"] { border-bottom-color: var(--runway); font-weight: 700; }
.reader-actions { display: flex; gap: 14px; white-space: nowrap; }
.text-action { border: 0; border-bottom: 1px solid var(--forest); background: transparent; padding: 3px 0; color: var(--forest); font-size: 12px; cursor: pointer; }
.reader-progress { height: 3px; background: rgba(19,24,15,.08); }
.reader-progress span { display: block; width: 0; height: 100%; background: var(--runway); }
.script-content { flex: 1; min-height: 0; overflow-y: auto; padding: 42px clamp(36px, 7.5%, 76px) 64px; scroll-behavior: smooth; line-height: 1.78; }
.script-content > :first-child { margin-top: 0; }
.script-content > p, .script-content > ul, .script-content > ol, .script-content > blockquote { max-width: 68ch; }
.script-content h1 { max-width: 22ch; font-size: 34px; line-height: 1.14; letter-spacing: -.035em; text-wrap: pretty; }
.script-content h2 { margin: 2.4em 0 .8em; padding-top: .45em; border-top: 2px solid var(--ink); font-size: 25px; line-height: 1.2; letter-spacing: -.025em; text-wrap: balance; }
.script-content .heading-suffix { display: inline-block; white-space: nowrap; }
.script-content h3 { margin: 1.8em 0 .55em; font-size: 18px; }
.script-content h4 { margin: 1.5em 0 .45em; font-size: 15px; }
.script-content p, .script-content li { color: var(--graphite); }
.script-content blockquote { margin: 18px 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--runway); color: var(--ink); }
.script-content blockquote p { color: var(--ink); }
.script-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 13px; }
.script-content th, .script-content td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.script-content th { border-top: 2px solid var(--ink); color: var(--ink); }
.script-content pre { overflow-x: auto; padding: 16px; background: var(--ink); color: var(--white); font: 12px/1.6 var(--font-mono); }
.script-content code { font-family: var(--font-mono); font-size: .88em; color: var(--forest); }
.spoken-view { max-width: 31em; margin: 0 auto; font-size: 21px; line-height: 2.02; }
.spoken-view p { margin: 0 0 1.25em; color: var(--ink); }
.outline-list { list-style: none; margin: 0; padding: 0; }
.outline-list li { display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.outline-time { color: var(--forest); font: 700 12px var(--font-mono); }
.outline-list strong { display: block; color: var(--ink); }
.outline-list p { margin: 5px 0 0; font-size: 13px; }
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 34px; }
.review-item { padding: 18px 0; border-top: 2px solid var(--ink); }
.review-item:last-child { grid-column: 1 / -1; }
.review-item h3 { margin: 0 0 8px; }
.review-item p { margin: 0; }
.toast { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--white); padding: 9px 14px; box-shadow: var(--shadow-small); font-size: 13px; }
.reader-pane { position: relative; }

.control-block { padding: 22px; border-bottom: 1px solid var(--rule); }
.control-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.control-block h4 { margin: 0; font-size: 14px; letter-spacing: -.01em; }
.control-title-row > span { color: var(--grey); font: 11px var(--font-mono); }
.readiness label { display: grid; grid-template-columns: 18px 1fr; gap: 9px; margin: 10px 0; color: var(--graphite); font-size: 13px; cursor: pointer; }
.readiness input { width: 16px; height: 16px; accent-color: var(--forest); }
.readiness .system-check { padding-bottom: 10px; border-bottom: 1px solid var(--rule); cursor: default; font-weight: 700; }
.readiness input:disabled { opacity: 1; }
.primary-action { margin: 22px; min-height: 66px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 13px 18px; background: var(--runway); color: var(--ink); border: 1px solid var(--ink); border-top-width: 3px; cursor: pointer; }
.primary-action:hover { background: var(--leaf); }
.primary-action:disabled { opacity: .42; cursor: not-allowed; }
.primary-action span { font-weight: 800; }
.primary-action small { margin-top: 3px; font: 10px var(--font-mono); }
.secondary-action { margin: -10px 22px 22px; min-height: 58px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 11px 17px; background: transparent; color: var(--forest); border: 1px solid var(--forest); cursor: pointer; }
.secondary-action:hover { background: rgba(183,237,147,.22); }
.secondary-action:disabled { color: var(--grey); border-color: var(--rule); opacity: .58; cursor: not-allowed; }
.secondary-action span { font-weight: 800; }
.secondary-action small { margin-top: 3px; font: 10px var(--font-mono); }
.download-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.download-grid a { position: relative; min-height: 62px; display: flex; flex-direction: column; justify-content: center; padding: 10px 28px 10px 12px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); text-decoration: none; }
.download-grid a:not([aria-disabled="true"])::after { content: "↓"; position: absolute; right: 10px; top: 10px; color: var(--forest); font: 700 12px var(--font-mono); }
.download-grid a:not([aria-disabled="true"]):hover { background: var(--leaf); }
.download-grid a[aria-disabled="true"] { color: var(--grey); background: rgba(138,143,132,.08); pointer-events: none; }
.download-grid b { font: 700 12px var(--font-mono); }
.download-grid span { margin-top: 2px; font-size: 11px; }
.format-note { margin: 11px 0 0; color: var(--grey); font-size: 11px; }
.version-block p { color: var(--graphite); font-size: 12px; }
.version-block dl { margin: 14px 0 0; }
.version-block dl div { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 11px; }
.version-block dt { color: var(--grey); }
.version-block dd { margin: 0; overflow-wrap: anywhere; font-family: var(--font-mono); }

.format-contract { width: var(--page); margin: 0 auto 128px; display: grid; grid-template-columns: minmax(300px, .72fr) 1.28fr; gap: 80px; padding-top: 80px; border-top: 2px solid var(--ink); }
.contract-grid { display: grid; grid-template-columns: repeat(2,1fr); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.contract-grid > div { min-height: 174px; padding: 24px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.contract-grid span { color: var(--forest); font: 700 11px var(--font-mono); }
.contract-grid h3 { margin: 10px 0 8px; font: 800 18px var(--font-display); }
.contract-grid p { margin: 0; color: var(--graphite); font-size: 13px; }

body > footer { background: var(--ink); color: var(--white); }
.footer-inner { width: var(--page); min-height: 168px; margin: 0 auto; display: grid; grid-template-columns: 110px 1fr auto; gap: 32px; align-items: center; }
.footer-inner img { width: 92px; }
.footer-inner p { margin: 0; color: rgba(255,255,255,.75); font-size: 13px; }
.footer-inner span { color: var(--runway); font: 10px var(--font-mono); }
.footer-note { text-align: right; }

.prompter-dialog { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; background: var(--ink); }
.prompter-dialog::backdrop { background: var(--ink); }
.prompter-shell { --p-bg: #0A0D08; --p-fg: #FFFFFF; width: 100%; height: 100%; display: grid; grid-template-rows: 72px minmax(0,1fr) 5px auto; background: var(--p-bg); color: var(--p-fg); }
.prompter-shell[data-theme="light"] { --p-bg: #FFFFFF; --p-fg: #13180F; }
.prompter-shell[data-theme="paper"] { --p-bg: #F4F3EC; --p-fg: #13180F; }
.prompter-header { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; padding: 0 24px; border-bottom: 1px solid color-mix(in srgb, var(--p-fg) 18%, transparent); }
.prompter-brand { display: flex; align-items: center; gap: 18px; }
.prompter-brand img { width: 82px; }
.prompter-shell:not([data-theme="dark"]) .prompter-brand img { content: url('/assets/yanz-logo.svg'); }
.prompter-brand span { overflow: hidden; text-overflow: ellipsis; font-size: 13px; white-space: nowrap; }
.prompter-mode-status { padding: 4px 7px; border: 1px solid var(--runway); color: var(--runway); font: 700 9px/1.2 var(--font-mono); letter-spacing: .04em; white-space: nowrap; }
.prompter-timing { display: flex; align-items: baseline; gap: 8px; font: 13px var(--font-mono); }
.prompter-timing strong { margin-left: 10px; color: var(--runway); font-size: 15px; }
.timing-rule { opacity: .45; }
.prompter-head-actions { justify-self: end; display: flex; gap: 10px; }
.prompter-head-actions button, .prompter-controls button, .prompter-controls select { min-height: 36px; background: transparent; color: inherit; border: 1px solid color-mix(in srgb, var(--p-fg) 30%, transparent); padding: 7px 10px; cursor: pointer; }
.prompter-stage { position: relative; min-height: 0; overflow: hidden; }
.prompter-watermark { display: none; }
.prompter-shell[data-mode="preview"] .prompter-watermark { position: absolute; z-index: 4; inset: 50% auto auto 50%; display: block; width: min(88vw, 760px); transform: translate(-50%,-50%) rotate(-12deg); color: rgba(180,35,24,.22); border: 4px solid rgba(180,35,24,.18); padding: 14px 18px; font: 800 clamp(26px,5vw,64px)/1.12 var(--font-cjk); text-align: center; letter-spacing: .04em; pointer-events: none; }
.prompter-shell[data-mode="preview"] .prompter-mode-status { color: #FFB4A8; border-color: #FFB4A8; }
.prompter-shell[data-mode="preview"] .focus-band { border-color: rgba(255,180,168,.45); background: rgba(180,35,24,.035); }
.prompter-scroll { position: absolute; inset: 0; overflow-y: auto; scrollbar-width: none; }
.prompter-scroll::-webkit-scrollbar { display: none; }
.prompter-transform { min-height: 100%; transform-origin: center; }
.prompter-content { width: min(68%, 1120px); max-width: 1120px; margin: 0 auto; padding: 44vh 0 64vh; color: var(--p-fg); font-size: 58px; font-weight: 630; line-height: 1.56; letter-spacing: .012em; text-wrap: pretty; }
.prompter-content p { margin: 0 0 1.4em; }
.prompter-content .prompter-section { margin: 2.4em 0 .8em; color: var(--runway); font: 700 .35em/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.focus-band { position: absolute; z-index: 2; top: 41%; left: 0; right: 0; height: 20%; border-top: 1px solid rgba(120,214,75,.55); border-bottom: 1px solid rgba(120,214,75,.55); background: rgba(120,214,75,.04); pointer-events: none; }
.prompter-countdown { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; background: var(--p-bg); color: var(--runway); font: 800 min(36vw, 360px)/1 var(--font-display); }
.prompter-progress { background: color-mix(in srgb, var(--p-fg) 12%, transparent); }
.prompter-progress span { display: block; width: 0; height: 100%; background: var(--runway); }
.prompter-controls { display: grid; gap: 12px; padding: 12px 18px 16px; border-top: 1px solid color-mix(in srgb, var(--p-fg) 18%, transparent); background: var(--p-bg); }
.prompter-main-controls, .prompter-settings { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; }
.prompter-play { min-width: 132px; background: var(--runway) !important; color: var(--ink) !important; border-color: var(--runway) !important; font-weight: 800; }
.prompter-controls label { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.prompter-controls output { min-width: 28px; color: var(--runway); font-family: var(--font-mono); text-align: right; }
.prompter-controls input[type="range"] { width: 92px; accent-color: var(--runway); }
.prompter-controls select { padding: 5px 8px; }
.prompter-controls button[aria-pressed="true"] { background: var(--runway); color: var(--ink); border-color: var(--runway); }
.prompter-controls button:disabled, .prompter-head-actions button:disabled, .prompter-controls select:disabled, .prompter-controls input:disabled { opacity: .35; cursor: not-allowed; }

.noscript { position: fixed; inset: auto 0 0; z-index: 100; padding: 12px; background: var(--danger); color: #fff; text-align: center; }

@media (max-width: 1180px) {
  :root { --page: min(100% - 40px, 1120px); }
  .header-nav { gap: 18px; }
  .workbench { grid-template-columns: 280px minmax(440px,1fr); grid-template-rows: clamp(720px, calc(100dvh - 96px), 880px) auto; height: auto; min-height: 0; }
  .library-pane, .reader-pane { height: 100%; min-height: 0; }
  .control-pane { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1fr; border-top: 1px solid var(--rule); border-left: 0; overflow: visible; }
  .control-pane > .pane-head { grid-column: 1 / -1; }
  .primary-action { align-self: start; }
  .script-meta { grid-template-columns: repeat(3,1fr); }
  .script-meta > div:nth-child(3) { border-right: 0; }
  .script-meta > div:nth-child(n+4) { border-top: 1px solid var(--rule); }
  .format-contract { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  :root { --page: calc(100% - 32px); }
  .header-inner { min-height: 64px; grid-template-columns: auto 1fr; gap: 14px; }
  .brand { padding-right: 14px; }
  .brand img { width: 88px; }
  .product-name { font-size: 13px; }
  .header-nav { grid-column: 1 / -1; width: calc(100% + 32px); margin-left: -16px; padding: 0 16px; overflow-x: auto; justify-self: stretch; border-top: 1px solid var(--rule); }
  .header-nav a { padding: 11px 0 9px; white-space: nowrap; font-size: 12px; }
  .workbench-hero h1 { font-size: clamp(38px, 9vw, 58px); }
  .hero-inner { padding-top: 54px; }
  .runway-a { right: -210px; opacity: .55; }
  .runway-b { right: -120px; opacity: .5; }
  .hero-status { grid-template-columns: repeat(2,1fr); }
  .hero-status > div:nth-child(2) { border-right: 0; }
  .hero-status > div:nth-child(n+3) { border-top: 1px solid var(--rule-dark); }
  .task-inner { grid-template-columns: repeat(2,1fr); }
  .task-inner button:nth-child(2) { border-right: 0; }
  .task-inner button:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.2); }
  .workspace-section { padding: 70px 0; }
  .workspace-heading { grid-template-columns: 1fr; gap: 18px; }
  .workbench { display: block; height: auto; min-height: 0; }
  .library-pane { border-right: 0; }
  .script-list { max-height: 380px; }
  .reader-pane { height: clamp(820px, calc(100dvh + 120px), 980px); min-height: 720px; border-top: 1px solid var(--ink); }
  .control-pane { display: block; border-top: 1px solid var(--ink); }
  .reader-toolbar { align-items: stretch; flex-direction: column; padding: 0 22px 12px; }
  .mode-tabs { min-height: 50px; }
  .reader-actions { justify-content: flex-end; }
  .reader-head, .script-content { padding-left: 22px; padding-right: 22px; }
  .format-contract { margin-bottom: 80px; gap: 36px; }
  .footer-inner { grid-template-columns: 100px 1fr; padding: 28px 0; }
  .footer-note { grid-column: 1 / -1; text-align: left; }
  .prompter-header { grid-template-columns: 1fr auto; }
  .prompter-brand span { display: none; }
  .prompter-timing { display: none; }
  .prompter-content { width: 86%; font-size: 48px; }
  .prompter-controls { max-height: 32dvh; overflow-y: auto; padding: 9px 12px 11px; gap: 8px; }
  .prompter-main-controls, .prompter-settings { gap: 7px; }
  .prompter-controls input[type="range"] { width: 72px; }
}

@media (max-width: 520px) {
  :root { --page: calc(100% - 24px); }
  .header-nav { width: calc(100% + 24px); margin-left: -12px; padding-right: 12px; padding-left: 12px; }
  .product-code { display: none; }
  .hero-inner { padding-top: 42px; }
  .workbench-hero h1 { font-size: 37px; }
  .hero-lead { margin-bottom: 34px; font-size: 16px; }
  .hero-status > div { min-height: 90px; padding: 20px 12px 16px 0; }
  .hero-status > div:not(:first-child) { padding-left: 16px; }
  .hero-status strong { font-size: 28px; }
  .task-inner { grid-template-columns: 1fr; }
  .task-inner button { min-height: 86px; border-right: 0; border-top: 1px solid rgba(255,255,255,.2); }
  .task-inner button:first-child { border-left: 0; border-top: 0; }
  .workspace-heading h2, .format-contract h2 { font-size: 30px; }
  .reader-head { grid-template-columns: 1fr; }
  .status-mark { justify-self: start; }
  .script-meta { grid-template-columns: repeat(2,1fr); }
  .script-meta > div:nth-child(3) { border-right: 1px solid var(--rule); }
  .script-meta > div:nth-child(2n) { border-right: 0; }
  .script-meta > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .reader-pane { min-height: 680px; }
  .script-content { padding: 28px 18px; }
  .spoken-view { font-size: 18px; }
  .review-grid { grid-template-columns: 1fr; }
  .review-item:last-child { grid-column: auto; }
  .contract-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .prompter-header { padding: 0 12px; }
  .prompter-head-actions button { padding: 6px 8px; font-size: 11px; }
  .prompter-content { width: 92%; font-size: 40px; }
  .prompter-controls { max-height: 30dvh; padding-right: 10px; padding-left: 10px; }
}

@media print {
  .site-header, .workbench-hero, .task-switcher, .workspace-heading, .library-pane, .control-pane, .reader-toolbar, .reader-progress, .format-contract, body > footer { display: none !important; }
  body, .workspace-section, .workbench, .reader-pane { background: #fff; width: auto; height: auto; min-height: 0; margin: 0; padding: 0; border: 0; box-shadow: none; }
  .reader-head { padding: 0 0 14mm; border-bottom: 1px solid #000; }
  .script-meta { padding: 0; grid-template-columns: repeat(3,1fr); }
  .script-content { overflow: visible; padding: 12mm 0 0; }
  @page { size: A4; margin: 16mm; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
