:root {
  color-scheme: light;
  --ink: #10172a;
  --muted: #65708b;
  --paper: #f5f7fb;
  --white: #ffffff;
  --line: #dbe1ec;
  --blue: #2f5cff;
  --blue-dark: #1737b8;
  --blue-soft: #dfe6ff;
  --acid: #d9f06c;
  --coral: #ff8068;
  --red: #c43d35;
  --green: #18734e;
  --shadow: 0 28px 70px rgba(22, 39, 89, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 50; background: white; padding: 10px 14px; }
.skip-link:focus { left: 8px; }
.label { margin: 0 0 8px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px clamp(20px, 5vw, 72px); border-bottom: 1px solid rgba(16,23,42,.08); background: rgba(245,247,251,.9); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--acid); font-size: 12px; }
nav { display: flex; gap: clamp(12px, 2vw, 28px); }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
nav a:hover, nav a:focus { color: var(--blue); }

main { overflow: hidden; }
.hero { min-height: 76vh; display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: clamp(36px, 8vw, 110px); padding: clamp(72px, 10vw, 132px) clamp(24px, 7vw, 108px); background: radial-gradient(circle at 87% 13%, rgba(217,240,108,.72), transparent 27%), linear-gradient(145deg, var(--paper), #eef2ff); }
.eyebrow { margin: 0 0 14px; color: var(--blue); font-size: 12px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 0; max-width: 860px; font-size: clamp(52px, 7.2vw, 104px); line-height: .94; letter-spacing: -.07em; }
h1 span { color: var(--blue); }
.hero-copy > p:not(.eyebrow) { max-width: 700px; margin: 28px 0; color: var(--muted); font-size: clamp(18px, 2vw, 23px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--blue); text-decoration: none; font-weight: 800; }
.button.primary { background: var(--blue); color: white; }
.button.primary:hover, .button.primary:focus { background: var(--blue-dark); }
.button.secondary { background: transparent; color: var(--blue); }
.thesis-card { padding: clamp(28px, 5vw, 48px); border-radius: 24px; background: var(--ink); color: white; box-shadow: var(--shadow); transform: rotate(1.2deg); }
.thesis-card .label { color: rgba(255,255,255,.5); }
blockquote { margin: 24px 0 40px; font-size: clamp(26px, 3vw, 38px); line-height: 1.25; font-weight: 650; }
blockquote strong { color: var(--acid); }
.gate-line { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; font-size: 12px; }
.gate-line span { padding: 6px 9px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; }
.gate-line b { color: var(--coral); }

.section { padding: clamp(72px, 9vw, 124px) clamp(24px, 7vw, 108px); }
.section-heading { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: end; margin-bottom: 48px; }
.section-heading h2 { max-width: 850px; margin: 0; font-size: clamp(40px, 5.3vw, 74px); line-height: 1; letter-spacing: -.055em; }
.section-heading > p, .section-heading > a { max-width: 480px; margin: 0; color: var(--muted); }
.case-tabs, .segment-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.case-tabs button, .segment-controls button { padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--muted); }
.case-tabs button[aria-selected="true"], .segment-controls button.active { border-color: var(--ink); background: var(--ink); color: white; }
.workspace { display: grid; grid-template-columns: .85fr 1.15fr; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--white); box-shadow: var(--shadow); }
.ticket-pane, .draft-pane { padding: clamp(24px, 4vw, 42px); }
.ticket-pane { border-right: 1px solid var(--line); background: #f0f3f9; }
.pane-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.pane-header h3 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.risk, .confidence { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.risk.high { background: #fee1db; color: #8f2e23; }
.risk.medium { background: #fff0bf; color: #775900; }
.risk.low { background: #d8efe5; color: #12563c; }
.confidence { background: var(--blue-soft); color: var(--blue-dark); }
.customer-message { display: flex; gap: 12px; margin: 26px 0; }
.customer-message span { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: white; font-size: 11px; font-weight: 800; }
.customer-message p { margin: 2px 0 0; font-size: 18px; }
.case-facts { display: grid; gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.case-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.case-facts div:last-child { border: 0; }
.case-facts dt { color: var(--muted); }
.case-facts dd { margin: 0; text-align: right; font-weight: 700; }
.draft { margin: 24px 0 16px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfe; font-size: 17px; }
.claim-list { display: grid; gap: 8px; }
.claim { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 10px; }
.claim > span { display: grid; flex: 0 0 auto; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-weight: 800; }
.claim p { display: grid; margin: 0; }
.claim small { color: var(--muted); }
.claim.unsupported { background: #fff0ed; }
.claim.unsupported > span { background: var(--coral); }
.claim.conflict { background: #fff7d8; }
.claim.conflict > span { background: #f0c948; }
.claim.supported { background: #e3f3eb; }
.claim.supported > span { background: #7ad0a6; }
.gate-alert { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin: 18px 0; padding: 18px; border-left: 5px solid var(--coral); background: #fff1ed; }
.gate-alert h4 { margin: 0; font-size: 20px; }
.gate-alert p:not(.label) { margin: 3px 0 0; color: var(--muted); }
.gate-alert > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--coral); font-size: 20px; font-weight: 900; }
.gate-alert.safe { border-color: var(--green); background: #e3f3eb; }
.gate-alert.safe > span { background: #7ad0a6; }
.draft-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.evidence-drawer { margin-top: 16px; padding: 16px; border-radius: 10px; background: var(--blue-soft); }
.evidence-drawer ul { margin: 8px 0 0; padding-left: 20px; }

.friction-section { background: var(--ink); color: white; }
.friction-section .eyebrow { color: var(--acid); }
.friction-section .section-heading > a { color: var(--acid); }
.friction-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; overflow: hidden; border-radius: 18px; background: rgba(255,255,255,.15); }
.friction-flow article { min-height: 260px; padding: 24px; background: #172039; }
.friction-flow article > span { font-size: 12px; color: var(--acid); }
.friction-flow .label { margin-top: 60px; color: rgba(255,255,255,.5); }
.friction-flow h3 { margin: 0 0 10px; font-size: 24px; line-height: 1.1; }
.friction-flow small { color: rgba(255,255,255,.64); }
.friction-flow .focus { background: var(--acid); color: var(--ink); }
.friction-flow .focus > span, .friction-flow .focus .label, .friction-flow .focus small { color: rgba(16,23,42,.7); }

.readout-section { background: white; }
.readout-hero { display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center; padding: clamp(24px, 4vw, 38px); border-radius: 18px 18px 0 0; background: var(--blue); color: white; }
.readout-hero .label { color: rgba(255,255,255,.6); }
.readout-hero h3 { margin: 0; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.04em; }
.readout-hero p:not(.label) { max-width: 780px; margin-bottom: 0; color: rgba(255,255,255,.75); }
.readout-hero > span { padding: 8px 12px; border-radius: 999px; background: var(--acid); color: var(--ink); font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.segment-controls { padding: 18px; margin: 0; border: 1px solid var(--line); border-top: 0; background: #f7f8fc; }
.result-grid { display: grid; grid-template-columns: 1.4fr .6fr; border: 1px solid var(--line); border-top: 0; }
.primary-result, .guardrails { padding: clamp(24px, 4vw, 38px); }
.primary-result { border-right: 1px solid var(--line); }
.metric-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.metric-header h3 { margin: 0; font-size: 24px; }
.metric-header button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--blue); }
.bar-chart { display: grid; gap: 16px; margin: 34px 0; }
.bar-row { display: grid; grid-template-columns: 70px 1fr 68px; align-items: center; gap: 12px; }
.bar-row > span { color: var(--muted); }
.bar-track { height: 26px; overflow: hidden; border-radius: 6px; background: #edf0f6; }
.bar-track i { display: block; height: 100%; width: 65%; background: var(--coral); transition: width .35s ease; }
.bar-row:nth-child(2) .bar-track i { background: var(--blue); }
.bar-row strong { text-align: right; }
.effect { display: flex; align-items: baseline; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.effect strong { font-size: clamp(34px, 5vw, 56px); color: var(--blue); letter-spacing: -.05em; }
.effect p { color: var(--muted); }
.sample { color: var(--muted); font-size: 13px; }
.guardrails > div { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 15px 0; border-top: 1px solid var(--line); }
.guardrails > div span { color: var(--muted); }
.guardrails > div small { grid-column: 1 / -1; color: var(--green); }
.readout-footer { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 22px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 18px 18px; background: #f7f8fc; }
.readout-footer p { max-width: 760px; margin: 0; color: var(--muted); }
.readout-footer a { max-width: 300px; color: var(--blue); font-weight: 800; }
.synthetic-note { color: var(--muted); font-size: 13px; }

footer { display: flex; justify-content: space-between; gap: 24px; padding: 28px clamp(24px, 7vw, 108px); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .hero, .section-heading, .workspace, .result-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .thesis-card { transform: none; }
  .ticket-pane, .primary-result { border-right: 0; border-bottom: 1px solid var(--line); }
  .friction-flow { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  nav { display: none; }
  h1 { font-size: clamp(48px, 16vw, 72px); }
  .friction-flow { grid-template-columns: 1fr; }
  .friction-flow article { min-height: 190px; }
  .friction-flow .label { margin-top: 22px; }
  .readout-hero { grid-template-columns: 1fr; }
  .readout-hero > span { width: fit-content; }
  .metric-header, .effect, .readout-footer, footer { align-items: flex-start; flex-direction: column; }
  .bar-row { grid-template-columns: 58px 1fr 58px; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

