/* SCRIPTRISK — crisp product design.
   The reference is Apple's marketing language: enormous quiet headlines, 17px
   body, sentence case, generous white space, one accent, pill buttons, alternating
   white / soft-gray bands. No uppercase micro-labels, no letterspaced chrome, no
   glow. Monospace exists for exactly one thing: screenplay text.
   Self-contained: system fonts, vendored libs, works offline. */

:root {
  --bg: #fbfbfd;
  --band: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #494c50;
  --ink-3: #86868b;
  --line: #e8e8ed;
  --line-2: #d2d2d7;
  --green: #0a8f52;
  --green-deep: #067a45;
  --green-tint: #e9f6ef;
  --blocker: #e0342a;
  --high: #e97c00;
  --medium: #b08a00;
  --low: #6e6e73;
  --fyi: #a1a1a6;
  --desk-clearance: #4f46e5;
  --desk-ratings: #9333ea;
  --desk-safety: #d97706;
  --desk-territory: #0284c7;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.hidden { display: none !important; }
button { font-family: inherit; }

h1, h2, h3, h4 { margin: 0 0 14px; letter-spacing: -0.022em; line-height: 1.12; }
h1 { font-size: clamp(38px, 5vw, 60px); font-weight: 750; }
h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 700; }
h3 { font-size: 21px; font-weight: 650; letter-spacing: -0.014em; }
h4 { font-size: 17px; font-weight: 650; }
p { margin: 0 0 16px; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
main { min-height: 60vh; padding: 56px 0 96px; }
.page-head { margin-bottom: 40px; max-width: 760px; }
.page-head .kicker { font-size: 17px; font-weight: 650; color: var(--green-deep); display: block; margin-bottom: 6px; }
.page-head p.lede { font-size: 21px; line-height: 1.5; color: var(--ink-2); }

/* The old chrome class, tamed: sentence-size, no shouting. */
.label, .blk-label {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink-3);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 6px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 500;
  padding: 11px 24px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); }
.btn-secondary { background: transparent; color: var(--green-deep); border-color: var(--green); }
.btn-secondary:hover { background: var(--green-tint); }
.btn-lg { font-size: 19px; padding: 14px 30px; }

/* ---------- header ---------- */
.site-header {
  background: rgba(251, 251, 253, 0.85);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: 0.02em; }
.site-nav { display: flex; gap: 4px; flex: 1; }
.site-nav a { color: var(--ink-2); font-weight: 450; font-size: 15px; padding: 8px 14px; border-radius: 980px; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a.active { color: var(--green-deep); background: var(--green-tint); }
.header-actions { display: flex; gap: 10px; }
.header-actions .btn { font-size: 15px; padding: 8px 18px; }
@media (max-width: 900px) {
  .header-inner { gap: 10px; }
  .site-nav a { padding: 8px 8px; font-size: 14px; }
  .header-actions .btn-secondary { display: none; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--band); border-top: 1px solid var(--line); margin-top: 60px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 48px 24px 20px; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; gap: 24px; } }
.footer-col h4 { font-size: 15px; margin-bottom: 10px; }
.footer-col a { display: block; color: var(--ink-2); padding: 4px 0; font-size: 14.5px; }
.footer-blurb { color: var(--ink-3); font-size: 14.5px; max-width: 40ch; margin-top: 10px; }
.footer-fine { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding-top: 18px; padding-bottom: 26px; }
.footer-fine p { color: var(--ink-3); font-size: 13px; margin: 0; max-width: 80ch; }

/* ---------- cards, toast, severity ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  font-size: 15px;
  padding: 13px 24px;
  z-index: 50;
  max-width: 80vw;
}
.toast.error { background: var(--blocker); }

.sev-chip {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 650;
  padding: 3px 12px;
  border-radius: 980px;
  color: #fff;
}
.sev-chip.sev-BLOCKER { background: var(--blocker); }
.sev-chip.sev-HIGH { background: var(--high); }
.sev-chip.sev-MEDIUM { background: var(--medium); }
.sev-chip.sev-LOW { background: var(--low); }
.sev-chip.sev-FYI { background: var(--fyi); }
.sev-BLOCKER { color: var(--blocker); }
.sev-HIGH { color: var(--high); }
.sev-MEDIUM { color: var(--medium); }
.sev-LOW { color: var(--low); }
.sev-FYI { color: var(--fyi); }

/* ================= HOME ================= */
.hero-band { background: var(--surface); border-bottom: 1px solid var(--line); }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 88px 24px 72px; }
.hero-copy { display: flex; flex-direction: column; align-items: center; }
.hero h1 { font-size: clamp(42px, 5.6vw, 68px); font-weight: 750; max-width: 20ch; margin: 0 auto 20px; }
.hero .sub { font-size: clamp(19px, 2vw, 23px); line-height: 1.45; color: var(--ink-2); max-width: 56ch; margin: 0 auto 30px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--ink-3); }

.hero-visual { display: flex; flex-direction: column; gap: 34px; align-items: center; margin-top: 56px; width: 100%; max-width: 720px; }
.hero-mock { padding: 26px 30px; border-radius: 22px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 16px; width: 100%; text-align: left; }
.hm-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.hm-title { font-size: 15px; font-weight: 650; color: var(--ink-2); }
.hm-score { font-size: 28px; font-weight: 750; color: var(--blocker); }
.hm-score small { font-size: 14px; color: var(--ink-3); font-weight: 500; }
.hm-flag { display: flex; gap: 14px; align-items: flex-start; }
.hm-flag b { font-size: 16px; display: block; letter-spacing: -0.01em; }
.hm-flag p { font-size: 14px; color: var(--ink-2); margin: 2px 0 4px; }
.hm-cite { font-size: 13px; color: var(--green-deep); background: var(--green-tint); border-radius: 8px; padding: 3px 10px; display: inline-block; }
.hm-rejected { opacity: 0.55; }
.hm-rejected b { text-decoration: line-through; text-decoration-color: rgba(224, 52, 42, 0.55); }
.hm-rejected .sev-chip { background: var(--blocker); }

.pipeline-svg { width: 100%; max-width: 640px; height: auto; overflow: visible; }
.pipeline-svg rect { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.25; }
.pipeline-svg text { fill: var(--ink-2); font-family: var(--sans); font-size: 10.5px; font-weight: 600; text-anchor: middle; dominant-baseline: middle; }
.pipeline-svg .accent rect { fill: var(--green); stroke: var(--green-deep); }
.pipeline-svg .accent text { fill: #fff; }
.pipeline-svg g:nth-of-type(2) text { fill: var(--desk-clearance); }
.pipeline-svg g:nth-of-type(3) text { fill: var(--desk-ratings); }
.pipeline-svg g:nth-of-type(4) text { fill: var(--desk-safety); }
.pipeline-svg g:nth-of-type(5) text { fill: var(--desk-territory); }
.flow-line { stroke: var(--green); stroke-width: 2; stroke-dasharray: 6 6; opacity: 0.5; }

.counter-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 72px; padding: 0; background: none; border: 0; box-shadow: none; }
@media (max-width: 860px) { .counter-strip { grid-template-columns: repeat(2, 1fr); } }
.counter-strip div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.counter-strip b { font-size: clamp(36px, 4vw, 52px); font-weight: 750; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.counter-strip span { font-size: 15px; color: var(--ink-2); }

.home-section { margin-top: 110px; }
.home-section .section-title { text-align: center; margin-bottom: 40px; }
.home-section .section-title h2 { margin-bottom: 8px; }
.home-section .section-title a { font-size: 17px; }

.runs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 980px) { .runs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .runs-grid { grid-template-columns: 1fr; } }
.run-card { padding: 24px 26px; display: flex; flex-direction: column; gap: 12px; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.run-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); text-decoration: none; }
a.run-card { color: inherit; }
.run-card .rc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.run-card .rc-title { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.run-card .rc-when { font-size: 13.5px; color: var(--ink-3); }
.run-card .rc-stats { display: flex; gap: 14px; font-size: 14.5px; color: var(--ink-2); flex-wrap: wrap; }
.run-card .rc-stats b { color: var(--ink); font-weight: 650; }
.score-pill { font-size: 14px; font-weight: 650; padding: 4px 13px; border-radius: 980px; color: #fff; background: var(--low); white-space: nowrap; }
.score-pill.good { background: var(--green); }
.score-pill.mid { background: var(--high); }
.score-pill.bad { background: var(--blocker); }
.demo-tag { font-size: 12px; font-weight: 600; color: var(--green-deep); background: var(--green-tint); border-radius: 980px; padding: 3px 11px; }
.runs-empty { padding: 40px; text-align: center; color: var(--ink-3); }

.steps-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 980px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
.step-card { padding: 26px 24px; color: inherit; }
a.step-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
.step-card .step-num {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green-deep);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 12px;
}
.step-card:nth-child(2) .step-num { background: rgba(79, 70, 229, 0.1); color: var(--desk-clearance); }
.step-card:nth-child(3) .step-num { background: rgba(147, 51, 234, 0.1); color: var(--desk-ratings); }
.step-card:nth-child(4) .step-num { background: rgba(217, 119, 6, 0.12); color: var(--desk-safety); }
.step-card:nth-child(5) .step-num { background: rgba(2, 132, 199, 0.1); color: var(--desk-territory); }
.step-card h3 { font-size: 18px; margin-bottom: 6px; }
.step-card p { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); margin: 0; }

.cta-band { margin-top: 110px; padding: 72px 40px; text-align: center; background: #1d1d1f; border-radius: 28px; color: #fff; }
.cta-band h2 { color: #fff; max-width: 24ch; margin: 0 auto 12px; }
.cta-band p { color: rgba(255, 255, 255, 0.72); font-size: 19px; max-width: 52ch; margin: 0 auto 28px; }
.cta-band .btn-primary { background: var(--green); }
.cta-band .btn-primary:hover { background: #0ca75f; }

/* ================= CONTENT PAGES ================= */
.prose { max-width: 760px; }
.prose h2 { margin-top: 48px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 10px; }

.stage-list { display: flex; flex-direction: column; gap: 16px; max-width: 860px; }
.stage { display: flex; gap: 22px; padding: 28px 30px; }
.stage h3 { margin-bottom: 2px; }
.stage p { margin: 8px 0 0; color: var(--ink-2); font-size: 16px; }
.stage .who { font-size: 14px; color: var(--ink-3); }
.stage-icon { flex: none; width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.stage-icon svg { width: 28px; height: 28px; }
.si-green { color: var(--green-deep); background: var(--green-tint); }
.si-indigo { color: var(--desk-clearance); background: rgba(79, 70, 229, 0.09); }
.si-purple { color: var(--desk-ratings); background: rgba(147, 51, 234, 0.09); }
.si-amber { color: var(--desk-safety); background: rgba(217, 119, 6, 0.1); }
.si-sky { color: var(--desk-territory); background: rgba(2, 132, 199, 0.09); }
.stage-body { min-width: 0; }
.stage-example {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--band);
  border-left: 3px solid var(--green);
  border-radius: 10px;
  padding: 13px 17px;
}
.stage-example .eg-label { display: block; font-size: 13px; font-weight: 650; color: var(--ink-3); letter-spacing: 0; text-transform: none; margin-bottom: 4px; }
.sev-line-BLOCKER, .sev-line-REJ { border-left-color: var(--blocker); }
.sev-line-HIGH { border-left-color: var(--high); }
.stage-cta { display: inline-block; margin-top: 14px; font-size: 16px; font-weight: 550; color: var(--green-deep); }
.hiw-pipe { margin: 12px auto 34px; display: block; }
.hiw-actions { margin-top: 72px; }
.hiw-actions h2 { text-align: center; margin-bottom: 30px; }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .action-grid { grid-template-columns: 1fr; } }
.action-card { padding: 28px; color: inherit; display: flex; flex-direction: column; transition: transform 0.18s, box-shadow 0.18s; }
.action-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.action-card .ac-num { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--green); color: #fff; font-weight: 700; margin-bottom: 14px; }
.action-card p { font-size: 15px; color: var(--ink-2); flex: 1; }

.callout { border-left: 4px solid var(--green); background: var(--green-tint); border-radius: 0 14px 14px 0; padding: 22px 26px; margin: 30px 0; max-width: 860px; font-size: 17px; }
.callout b { color: var(--green-deep); }

.faq-list { max-width: 780px; display: flex; flex-direction: column; gap: 14px; }
.faq-list details { padding: 6px 26px; }
.faq-list summary { cursor: pointer; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-list summary::after { content: "+"; color: var(--green); font-size: 24px; font-weight: 400; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { color: var(--ink-2); margin: 0 0 20px; font-size: 16px; }

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 980px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { padding: 28px; }
.contact-card p { font-size: 15px; color: var(--ink-2); }

/* ================= RUN PAGE ================= */
.run-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.run-head h1 { font-size: 32px; margin: 0; }
.chip { font-size: 13px; font-weight: 600; padding: 4px 14px; border-radius: 980px; border: 1px solid var(--line-2); background: var(--surface); }
.chip.live { color: var(--blocker); border-color: rgba(224, 52, 42, 0.35); }
.chip.replay { color: var(--green-deep); border-color: rgba(10, 143, 82, 0.35); }
#elapsed { font-size: 15px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.progress-strip { padding: 22px 26px 20px; margin-bottom: 20px; }
.phases { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.phase { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--ink-3); padding: 6px 14px; border-radius: 980px; transition: all 0.3s; }
.phase .p-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.phase.active { color: var(--green-deep); background: var(--green-tint); }
.phase.active .p-dot { background: var(--green); animation: pulse 1.4s ease-in-out infinite; }
.phase.done { color: var(--ink-2); }
.phase.done .p-dot { background: var(--green); }
.phase-arrow { color: var(--line-2); font-size: 12px; }
@keyframes pulse { 50% { transform: scale(1.55); opacity: 0.7; } }
.pbar-row { display: flex; align-items: center; gap: 14px; }
.pbar { flex: 1; height: 7px; border-radius: 980px; background: var(--band); overflow: hidden; }
.pbar-fill { height: 100%; width: 0%; border-radius: 980px; background: var(--green); transition: width 0.5s ease; position: relative; overflow: hidden; }
.pbar-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent); transform: translateX(-100%); animation: shimmer 1.8s ease-in-out infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.pct { font-size: 15px; font-weight: 650; color: var(--green-deep); min-width: 46px; text-align: right; font-variant-numeric: tabular-nums; }

.panel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .panel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .panel { grid-template-columns: 1fr; } }
.col { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.col-head { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 13px; border-bottom: 1px solid var(--line); }
.col-head .nm { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.col-head .sub { font-size: 13px; color: var(--ink-3); }
.col-head .st { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 550; }
#col-clearance_counsel .col-head { box-shadow: inset 0 3px 0 var(--desk-clearance); }
#col-ratings_board .col-head { box-shadow: inset 0 3px 0 var(--desk-ratings); }
#col-safety_underwriter .col-head { box-shadow: inset 0 3px 0 var(--desk-safety); }
#col-territory_censor .col-head { box-shadow: inset 0 3px 0 var(--desk-territory); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.st.running .pulse { animation: pulse 1.2s ease-in-out infinite; }
.st.queued { color: var(--ink-3); }
.st.running { color: var(--high); }
.st.done { color: var(--green-deep); }

.col-body { flex: 1; min-height: 240px; max-height: 44vh; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.tr { position: relative; padding-left: 22px; font-size: 14px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; animation: tr-in 0.28s ease; }
@keyframes tr-in { from { opacity: 0; transform: translateX(-6px); } }
.tr::before { position: absolute; left: 2px; top: 0; }
.tr em { font-style: normal; font-size: 13px; color: var(--ink-3); }
.t-call { color: var(--ink); }
.t-call::before { content: "→"; color: var(--ink-3); }
.t-out { color: var(--ink-3); padding-left: 34px; font-size: 13px; }
.t-out::before { content: "↳"; left: 16px; }
.t-text { font-style: italic; }
.t-flag { font-weight: 650; }
.t-flag::before { content: "⚑"; }
.t-q { color: var(--high); }
.t-q::before { content: "?"; font-weight: 700; }
.t-done { color: var(--green-deep); font-weight: 600; }
.t-done::before { content: "✓"; }

.pipe-strip { margin-top: 16px; overflow: hidden; }
.pipe-head { padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; color: var(--ink-2); }
.pipe-log { max-height: 190px; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 7px; }
.pipe-log .who { color: var(--green-deep); font-weight: 600; margin-right: 6px; }
.reject-line { color: var(--blocker); }

.done-banner { margin-top: 18px; padding: 20px 26px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-color: rgba(10, 143, 82, 0.35); background: var(--green-tint); }
.done-banner b { font-size: 19px; letter-spacing: -0.01em; }

/* ================= REPORT ================= */
.report-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.rpt-head { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; padding: 36px 40px; margin-bottom: 28px; border-radius: 24px; }
.score { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; width: 150px; height: 150px; border-radius: 50%; flex: none; }
.score::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--ring, var(--green)) calc(var(--scorepct, 0) * 1%), var(--band) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
}
.score b { font-size: 54px; font-weight: 750; letter-spacing: -0.03em; }
.score .of { font-size: 15px; color: var(--ink-3); }
.score.good { --ring: var(--green); }
.score.mid { --ring: var(--high); }
.score.bad { --ring: var(--blocker); }
.score.good b { color: var(--green-deep); }
.score.mid b { color: var(--high); }
.score.bad b { color: var(--blocker); }
.score-meta { display: flex; flex-direction: column; gap: 8px; min-width: 260px; flex: 1; }
.verdict { font-size: 27px; font-weight: 700; letter-spacing: -0.015em; }
.verdict.bad { color: var(--blocker); }
.verdict.mid { color: var(--high); }
.verdict.good { color: var(--green-deep); }
.proj { font-size: 16px; color: var(--ink-2); }
.proj b { color: var(--ink); font-weight: 650; }
.est-note { font-size: 13px; color: var(--ink-3); }
.tally { display: flex; gap: 12px; flex-wrap: wrap; }
.tally > div { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--band); border-radius: 14px; padding: 12px 18px; min-width: 82px; }
.tally b { font-size: 26px; font-weight: 750; }
.tally span { font-size: 12px; font-weight: 550; color: var(--ink-3); }

.section-head { margin: 44px 0 18px; }
.section-head h2 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 4px; }
.section-head .lede { color: var(--ink-2); font-size: 17px; }
.flags { display: flex; flex-direction: column; gap: 16px; }
.flag { position: relative; display: grid; grid-template-columns: 104px 1fr 150px; gap: 22px; padding: 24px 26px 24px 30px; overflow: hidden; }
@media (max-width: 900px) { .flag { grid-template-columns: 1fr; gap: 12px; } }
.flag.rejected { opacity: 0.6; background: var(--band); }
.flag.rejected .finding { text-decoration: line-through; text-decoration-color: rgba(224, 52, 42, 0.5); }
.sev-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.bar-BLOCKER { background: var(--blocker); }
.bar-HIGH { background: var(--high); }
.bar-MEDIUM { background: var(--medium); }
.bar-LOW { background: var(--low); }
.bar-FYI { background: var(--fyi); }
.scenes { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.scenes > span { font-size: 14px; font-weight: 650; color: var(--ink-2); }
.scene-link { font-size: 13px; font-weight: 550; color: var(--green-deep); background: var(--green-tint); border: 0; border-radius: 8px; padding: 3px 10px; cursor: pointer; }
.scene-link:hover { background: #d9efe4; }
.flag-main { min-width: 0; }
.flag-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cat { font-size: 18px; font-weight: 650; text-transform: capitalize; letter-spacing: -0.01em; }
.by { font-size: 13px; font-weight: 550; padding: 2px 11px; border-radius: 980px; text-transform: capitalize; }
.by-clearance_counsel { color: var(--desk-clearance); background: rgba(79, 70, 229, 0.08); }
.by-ratings_board { color: var(--desk-ratings); background: rgba(147, 51, 234, 0.08); }
.by-safety_underwriter { color: #92400e; background: rgba(217, 119, 6, 0.1); }
.by-territory_censor { color: #075985; background: rgba(2, 132, 199, 0.08); }
.finding { margin: 0 0 12px; font-size: 16px; line-height: 1.6; max-width: 76ch; }
.cite-toggle { border: 0; background: none; color: var(--green-deep); font-size: 15px; font-weight: 550; cursor: pointer; padding: 0; }
.cite-toggle:hover { text-decoration: underline; }
.expand { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.cite { background: var(--band); border-left: 3px solid var(--green); border-radius: 10px; padding: 14px 18px; }
.cite q { display: block; font-size: 15px; line-height: 1.6; color: var(--ink-2); quotes: "“" "”"; }
.cite .src { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 13.5px; color: var(--ink-3); }
.cite .via { font-weight: 650; color: var(--green-deep); font-size: 12.5px; }
.remedy { display: flex; gap: 14px; align-items: baseline; background: var(--green-tint); border-radius: 10px; padding: 14px 18px; }
.remedy .act { font-size: 13px; font-weight: 700; color: var(--green-deep); white-space: nowrap; }
.remedy p { margin: 0; font-size: 15px; }
.conf { font-size: 13px; color: var(--ink-3); }
.rejection { font-size: 15px; color: var(--blocker); background: rgba(224, 52, 42, 0.06); border-radius: 10px; padding: 14px 18px; line-height: 1.6; }
.cost { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; font-size: 12.5px; color: var(--ink-3); }
.cost b { font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.plain-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.plain-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 15px 20px; font-size: 15px; color: var(--ink-2); line-height: 1.6; }
.plain-list .who { font-size: 13px; font-weight: 650; color: var(--green-deep); margin-right: 10px; text-transform: capitalize; }

/* prediction */
.pred-card { padding: 30px 34px; display: flex; flex-direction: column; gap: 22px; border-radius: 24px; }
.pred-head { display: flex; gap: 36px; align-items: center; flex-wrap: wrap; }
.pred-ratings { display: flex; align-items: center; gap: 20px; }
.pred-box { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.pred-label { font-size: 13px; font-weight: 550; color: var(--ink-3); text-transform: none; letter-spacing: 0; }
.pred-vs { font-size: 15px; color: var(--ink-3); }
.rating-badge { font-size: 30px; font-weight: 750; padding: 9px 24px; border-radius: 16px; color: #fff; background: var(--low); letter-spacing: -0.01em; }
.rating-badge.r-R, .rating-badge.r-NC-17 { background: var(--blocker); }
.rating-badge.r-PG-13 { background: var(--high); }
.rating-badge.r-PG, .rating-badge.r-G { background: var(--green); }
.rating-badge.target { background: var(--surface); color: var(--green-deep); border: 2px dashed var(--green); }
.pred-meta { flex: 1; min-width: 240px; }
.pred-rationale { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.pred-evidence { margin: 0; font-size: 16px; color: var(--green-deep); font-weight: 600; }
.comps { display: flex; flex-direction: column; gap: 10px; }
.comp-row { display: grid; grid-template-columns: 64px 1fr 150px; gap: 18px; align-items: center; background: var(--band); border-radius: 14px; padding: 13px 18px; }
@media (max-width: 760px) { .comp-row { grid-template-columns: 52px 1fr; } .comp-sim { display: none; } }
.comp-rating { font-size: 14px; font-weight: 700; text-align: center; padding: 5px 0; border-radius: 10px; color: #fff; background: var(--low); }
.comp-rating.r-R, .comp-rating.r-NC-17 { background: var(--blocker); }
.comp-rating.r-PG-13 { background: var(--high); }
.comp-rating.r-PG, .comp-rating.r-G { background: var(--green); }
.comp-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.comp-title { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.comp-quote { font-size: 13.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp-src { font-size: 13px; }
.comp-sim { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.comp-bar { width: 100%; height: 6px; border-radius: 980px; background: var(--line); overflow: hidden; }
.comp-fill { height: 100%; border-radius: 980px; background: var(--green); }
.comp-d { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cuts ol { margin: 8px 0 0; padding-left: 24px; display: flex; flex-direction: column; gap: 10px; }
.cuts li { font-size: 16px; line-height: 1.55; }

/* ================= SCRIPT PAGE ================= */
.scriptview { display: flex; flex-direction: column; gap: 16px; }
.scene-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 20px; padding: 22px 26px; }
@media (max-width: 900px) { .scene-row { grid-template-columns: 1fr; } }
.scene-row.flagged-BLOCKER { border-left: 4px solid var(--blocker); }
.scene-row.flagged-HIGH { border-left: 4px solid var(--high); }
.scene-row.flagged-MEDIUM { border-left: 4px solid var(--medium); }
.scene-row.flagged-LOW { border-left: 4px solid var(--low); }
.scene-row.flagged-FYI { border-left: 4px solid var(--fyi); }
.scene-text { margin: 0; font-family: var(--mono); font-size: 13.5px; line-height: 1.7; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.scene-text .sid { display: block; font-family: var(--sans); font-weight: 650; color: var(--green-deep); margin-bottom: 8px; font-size: 13.5px; }
.gutter { display: flex; flex-direction: column; gap: 10px; }
.gnote { background: var(--band); border-radius: 12px; padding: 14px 17px; cursor: pointer; transition: background 0.15s; }
.gnote:hover { background: var(--line); }
.gnote .gt { display: block; font-size: 13px; font-weight: 650; margin-bottom: 5px; text-transform: capitalize; }
.gnote p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.gn-BLOCKER .gt { color: var(--blocker); }
.gn-HIGH .gt { color: var(--high); }
.gn-MEDIUM .gt { color: var(--medium); }
.gn-LOW .gt { color: var(--low); }
.gn-FYI .gt { color: var(--fyi); }
.hilite { animation: hilite 2.2s ease; }
@keyframes hilite {
  0%, 60% { box-shadow: 0 0 0 3px var(--green), var(--shadow); }
  100% { box-shadow: var(--shadow); }
}

/* ================= WRITER'S ROOM ================= */
.writer-intake { margin-top: 6px; }
.wr-start { padding: 34px 38px; }
.wr-start p { color: var(--ink-2); }
.wr-progress { display: flex; gap: 22px; align-items: center; padding: 34px 38px; }
.wr-progress h3 { margin-bottom: 4px; }
.wr-progress p { margin: 0; color: var(--ink-2); }
.wr-spinner { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--green); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wr-card { padding: 30px 34px; margin-bottom: 22px; border-radius: 24px; }
.wr-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.wr-card-head h3 { margin: 0; font-size: 25px; }
.wr-genre { font-size: 14.5px; color: var(--ink-3); }
.verdict-badge { font-size: 15px; font-weight: 700; padding: 7px 20px; border-radius: 980px; color: #fff; }
.vb-good { background: var(--green); }
.vb-mid { background: var(--high); }
.vb-bad { background: var(--low); }
.wr-verdict-reason { font-size: 18px; line-height: 1.55; letter-spacing: -0.01em; }
.wr-logline { font-size: 19px; font-weight: 600; letter-spacing: -0.012em; }
.wr-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 18px 0; }
@media (max-width: 800px) { .wr-notes { grid-template-columns: 1fr; } }
.wr-note-col h4 { font-size: 16px; }
.wr-note-col.good h4 { color: var(--green-deep); }
.wr-note-col.bad h4 { color: var(--high); }
.wr-note { background: var(--band); border-radius: 12px; padding: 14px 17px; margin-bottom: 10px; }
.wr-note p { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); }
.wr-note-col.good .wr-note { border-left: 3px solid var(--green); }
.wr-note-col.bad .wr-note { border-left: 3px solid var(--high); }
.wr-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.wr-extras { font-size: 15px; color: var(--ink-2); margin-top: 14px; }
.wr-loglines { margin: 4px 0 20px; padding-left: 24px; display: flex; flex-direction: column; gap: 12px; }
.wr-loglines li { font-size: 17px; font-weight: 550; letter-spacing: -0.005em; }
.wr-checks { display: flex; flex-direction: column; gap: 10px; }
.wr-check { display: flex; gap: 15px; align-items: flex-start; background: var(--band); border-radius: 12px; padding: 14px 18px; }
.wr-check b { font-size: 16px; letter-spacing: -0.005em; }
.wr-check p { margin: 2px 0 0; font-size: 14.5px; color: var(--ink-2); }
.wr-check-mark { flex: none; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; margin-top: 1px; }
.st-PASS .wr-check-mark { background: var(--green-tint); color: var(--green-deep); }
.st-WARN .wr-check-mark { background: rgba(233, 124, 0, 0.12); color: var(--high); }
.st-INFO .wr-check-mark { background: var(--line); color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* dimension scores + cost drivers */
.dims { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.dim { display: flex; align-items: baseline; gap: 7px; padding: 6px 14px; border-radius: 980px; }
.dim b { font-size: 19px; font-weight: 750; }
.dim span { font-size: 13.5px; font-weight: 550; }
.drivers-card { padding: 26px 30px; margin-bottom: 28px; border-radius: 24px; }
.drivers-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.drivers-head h3 { margin: 0; }
.drivers-total { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; }
.drivers { display: flex; flex-direction: column; gap: 8px; }
.driver { display: flex; align-items: center; gap: 14px; background: var(--band); border: 0; border-radius: 12px; padding: 12px 16px; font-family: inherit; font-size: 16px; cursor: pointer; text-align: left; }
.driver:hover { background: var(--line); }
.driver-rank { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.driver-name { flex: 1; text-transform: capitalize; font-weight: 550; }
.driver b { font-weight: 700; }
