:root {
  color-scheme: dark;
  --bg: #0a0a09;
  --bg-soft: #111110;
  --panel: #161614;
  --ink: #e7e5e0;
  --muted: #8f8c86;
  --faint: #5e5b55;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .18);
  --accent: #c9b78f;
  --accent-dim: rgba(201, 183, 143, .1);
  --danger: #d5a29a;
  --max: 1120px;
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
body::before { position: fixed; z-index: -1; inset: 0; background: linear-gradient(100deg, #17100c 0%, #0d0c0b 37%, #0a0a09 72%); content: ""; pointer-events: none; }
a { color: inherit; text-decoration-color: rgba(201, 183, 143, .52); text-decoration-thickness: .08em; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
button, textarea, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap { width: min(100% - 32px, var(--max)); margin: 0 auto; }
.skip-link { position: fixed; z-index: 99; top: 10px; left: 12px; transform: translateY(-160%); padding: 8px 12px; background: var(--accent); color: #17130f; font-weight: 600; text-decoration: none; transition: transform 120ms ease; }
.skip-link:focus { transform: translateY(0); }
.site-header { border-bottom: 1px solid var(--line); background: rgba(10, 10, 9, .84); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.header-wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; padding: 10px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); text-decoration: none; }
.brand-mark { width: 48px; height: 48px; flex: 0 0 auto; }
.brand-name, .header-note, .eyebrow, .character-count, .button, .result-label, .scale, .footer-wrap, .method-note ol { font-family: var(--mono); }
.brand-name { overflow: hidden; font-size: 14px; font-weight: 500; letter-spacing: .06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.header-note { color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }

.main-content { padding: clamp(36px, 6vw, 72px) 0 64px; }
.intro { max-width: 760px; padding-bottom: clamp(32px, 5vw, 54px); border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 11px; color: var(--accent); font-size: 11px; font-weight: 500; letter-spacing: .075em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 500; letter-spacing: -.015em; }
h1 { max-width: 740px; font-size: clamp(32px, 4.1vw, 50px); line-height: 1.08; }
h2 { font-size: clamp(21px, 2.3vw, 29px); line-height: 1.22; }
h3 { font-size: 16px; line-height: 1.35; }
.lede { margin: 21px 0 0; color: var(--ink); font-size: clamp(16px, 1.6vw, 18px); line-height: 1.58; }
.routing-list { display: grid; gap: 9px; max-width: 640px; margin: 15px 0 0; padding: 0; list-style: none; color: var(--ink); font-size: clamp(15px, 1.4vw, 17px); line-height: 1.5; }
.routing-list li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; }
.routing-list li::before { color: var(--accent); content: "→"; }
.intro-note { max-width: 640px; margin: 16px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.evaluation-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 282px); gap: clamp(32px, 6vw, 78px); align-items: start; padding: clamp(32px, 5vw, 54px) 0 8px; }
.form-column { min-width: 0; }
.field-head { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 9px; }
label[for="source-text"] { color: var(--ink); font-size: 16px; font-weight: 500; }
.character-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.character-count.is-over { color: var(--danger); }
textarea { display: block; width: 100%; resize: vertical; min-height: 240px; border: 1px solid var(--line-strong); border-radius: 0; padding: 16px; background: rgba(17, 17, 16, .75); color: var(--ink); font-size: 16px; line-height: 1.56; transition: border-color 120ms ease, background 120ms ease; }
textarea::placeholder { color: var(--faint); }
textarea:hover { border-color: rgba(255, 255, 255, .28); }
textarea:focus { border-color: var(--accent); background: var(--bg-soft); outline: none; }
.field-hint, .processing-note { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.field-error { margin: 8px 0 0; color: var(--danger); font-size: 13px; }
.oversize-panel { margin-top: 14px; border-left: 2px solid var(--danger); padding: 2px 0 2px 14px; color: var(--muted); font-size: 14px; }
.oversize-panel p { margin: 0 0 8px; }
.text-button { border: 0; border-bottom: 1px dashed currentColor; padding: 0; background: transparent; color: var(--accent); font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }
.consent-fieldset { margin: 29px 0 0; border: 0; border-top: 1px solid var(--line); padding: 18px 0 0; }
.consent-fieldset legend { padding: 0 8px 0 0; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.consent-label { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); font-size: 14px; line-height: 1.48; cursor: pointer; }
.consent-label input { width: 16px; height: 16px; flex: 0 0 auto; margin: 3px 0 0; accent-color: var(--accent); }
.captcha-row { margin-top: 22px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; border: 1px solid var(--line-strong); border-radius: 0; padding: 0 15px; background: transparent; color: var(--ink); font-size: 12px; font-weight: 500; letter-spacing: .045em; line-height: 1; text-transform: uppercase; transition: background 120ms ease, border-color 120ms ease, color 120ms ease; }
.button:hover:not(:disabled) { border-color: var(--accent); background: rgba(255, 255, 255, .02); color: var(--accent); }
.button-primary { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.button-quiet { color: var(--muted); }
.request-status { color: var(--muted); font-size: 13px; }
.side-column { display: grid; align-content: start; gap: clamp(26px, 3vw, 36px); min-width: 0; }
.method-note { border-top: 1px solid var(--line); padding-top: 17px; color: var(--muted); }
.method-note h2 { margin-bottom: 14px; font-size: 18px; }
.method-note p:not(.eyebrow) { margin: 0 0 11px; font-size: 12px; line-height: 1.5; }
.method-note p:not(.eyebrow):last-child { margin-bottom: 0; }
.method-note ol { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: methodology; font-size: 12px; line-height: 1.5; }
.method-note li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; }
.method-note li::before { color: var(--accent); content: counter(methodology, decimal-leading-zero); counter-increment: methodology; }

.result-section { margin-top: clamp(50px, 8vw, 92px); padding-top: 27px; border-top: 1px solid var(--line-strong); scroll-margin-top: 22px; }
.section-heading { margin-bottom: 25px; }
.result-shell { border: 1px solid var(--line-strong); background: rgba(17, 17, 16, .72); }
.action-result { padding: 22px; border-bottom: 1px solid var(--line); }
.result-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.action-result h3 { margin-bottom: 7px; font-size: 21px; }
.action-meta { margin: 0 0 9px; color: var(--accent); font-family: var(--mono); font-size: 12px; }
.result-explanation { max-width: 770px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.dimensions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dimension { min-width: 0; padding: 19px 18px 21px; border-right: 1px solid var(--line); }
.dimension:last-child { border-right: 0; }
.dimension h3 { min-height: 68px; font-size: 15px; }
.scale { display: inline-flex; margin: 14px 0 11px; border: 1px solid var(--line-strong); padding: 3px 6px; color: var(--accent); font-size: 10px; letter-spacing: .035em; line-height: 1.2; text-transform: uppercase; }
.dimension p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.52; overflow-wrap: anywhere; }
.synthesis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .55fr); gap: 1px; border-top: 1px solid var(--line); background: var(--line); }
.synthesis > div { padding: 20px 22px; background: rgba(10, 10, 9, .75); }
.synthesis p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.synthesis .diagnosis { color: var(--ink); }
.action-result.action-unavailable { border-bottom: 0; }
.empty-result { padding: 22px; color: var(--muted); }
.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: rgba(10, 10, 9, .8); color: var(--muted); }
.footer-wrap { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 24px 0; font-size: 12px; }
.footer-wrap nav { display: flex; flex-wrap: wrap; gap: 8px 15px; }
.footer-wrap a { text-decoration: none; }
.policy-content { max-width: 760px; min-height: calc(100vh - 184px); }
.policy-copy { margin-top: 35px; border-top: 1px solid var(--line); padding-top: 4px; }
.policy-copy h2 { margin-top: 30px; font-size: 21px; }
.policy-copy p { color: var(--muted); font-size: 16px; }

@media (max-width: 860px) {
  .evaluation-layout { grid-template-columns: 1fr; }
  .method-note { max-width: 620px; }
  .dimensions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dimension { border-bottom: 1px solid var(--line); }
  .dimension:nth-child(even) { border-right: 0; }
  .dimension:nth-last-child(-n + 1) { border-bottom: 0; }
  .dimension h3 { min-height: 0; }
}

@media (max-width: 560px) {
  .wrap { width: min(100% - 24px, var(--max)); }
  .header-wrap { min-height: 60px; }
  .brand-mark { width: 39px; height: 39px; }
  .brand-name { font-size: 12px; }
  .header-note { display: none; }
  .main-content { padding-bottom: 44px; }
  h1 { font-size: 31px; }
  .lede { font-size: 16px; }
  textarea { min-height: 218px; padding: 13px; }
  .dimensions, .synthesis { grid-template-columns: 1fr; }
  .dimension { border-right: 0; }
  .dimension:last-child { border-bottom: 0; }
  .footer-wrap { display: grid; }
}

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