@font-face { font-family: Umiak; src: url("/fonts/Umiak-Black.woff2") format("woff2"); font-display: swap; font-weight: 900; }
@font-face { font-family: Host; src: url("/fonts/HostGrotesk-Regular.woff2") format("woff2"); font-display: swap; font-weight: 400; }
@font-face { font-family: Host; src: url("/fonts/HostGrotesk-SemiBold.woff2") format("woff2"); font-display: swap; font-weight: 650; }

:root {
  --ink: #11100e;
  --paper: #f5f1e8;
  --white: #fffdf8;
  --acid: #d7ff3f;
  --orange: #f36f38;
  --blue: #1557ff;
  --muted: #6d695f;
  --line: #cfc8ba;
  --shadow: 6px 6px 0 var(--ink);
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Host, Arial, sans-serif; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.skip-link { position: fixed; z-index: 20; left: 1rem; top: -5rem; background: var(--acid); padding: .8rem 1rem; font-weight: 700; }
.skip-link:focus { top: 1rem; }
.site-header { min-height: 72px; padding: 0 clamp(1rem, 4vw, 4rem); display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--ink); background: var(--white); }
.wordmark { font-family: Umiak, sans-serif; font-size: 1.25rem; text-decoration: none; letter-spacing: -.02em; }
.site-header nav { display: flex; gap: 1.25rem; font-size: .92rem; font-weight: 650; }

main > section { padding: clamp(3rem, 7vw, 6rem) max(1rem, calc((100vw - 1180px) / 2)); }
.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: clamp(2rem, 6vw, 5rem); align-items: end; min-height: 610px; background: var(--ink); color: var(--white); }
.eyebrow { margin: 0 0 .75rem; font-size: .76rem; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { font-family: Umiak, sans-serif; line-height: .95; letter-spacing: -.035em; margin: 0; }
h1 { max-width: 900px; font-size: clamp(3.5rem, 8vw, 7.8rem); }
h2 { font-size: clamp(2.4rem, 5vw, 4.7rem); }
h3 { font-size: clamp(1.55rem, 2.5vw, 2.4rem); }
.hero-promise { max-width: 760px; margin: 1.5rem 0 0; font-size: clamp(1.15rem, 2vw, 1.55rem); color: #e4ded1; }
.hero-actions, .artifact-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: .8rem 1.1rem; border: 2px solid var(--ink); border-radius: var(--radius); font-weight: 650; text-decoration: none; cursor: pointer; }
.hero .button { border-color: var(--white); }
.button.primary { background: var(--acid); color: var(--ink); }
.button.secondary { background: var(--white); color: var(--ink); }
.button:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 currentColor; }
.ungated { color: #cfc8ba; font-size: .9rem; }
.promise-card { background: var(--acid); color: var(--ink); border: 2px solid var(--white); box-shadow: 8px 8px 0 var(--orange); padding: 1.5rem; }
.promise-card dl { margin: 0; display: grid; gap: 1rem; }
.promise-card div { border-bottom: 1px solid rgba(17,16,14,.3); padding-bottom: .8rem; }
.promise-card div:last-child { border: 0; padding: 0; }
.promise-card dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 650; }
.promise-card dd { margin: .25rem 0 0; }

.privacy-strip { min-height: auto; padding-top: 1rem; padding-bottom: 1rem; display: flex; flex-wrap: wrap; gap: .5rem 1rem; background: var(--orange); border-block: 2px solid var(--ink); }
.formula-note { display: grid; grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr); gap: 2rem; align-items: start; background: var(--acid); border-bottom: 2px solid var(--ink); }
.formula-note ol { margin: 0; padding-left: 1.4rem; }
.formula-note li { margin-bottom: .7rem; }
.worked-example { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; background: var(--white); border-bottom: 2px solid var(--ink); }
.worked-example > div > p { max-width: 700px; }
.example-card { padding: 1.4rem; border: 2px solid var(--ink); background: var(--acid); box-shadow: var(--shadow); }
.example-card dl { margin: 0; display: grid; gap: .7rem; }
.example-card div { border-bottom: 1px solid rgba(17,16,14,.3); padding-bottom: .55rem; }
.example-card dt { font-size: .75rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.example-card dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.workspace, .results { background: var(--paper); }
.section-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin-bottom: 2rem; }
.section-heading p:not(.eyebrow) { max-width: 680px; color: var(--muted); }
.workspace-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.text-button { border: 0; border-bottom: 2px solid var(--ink); background: transparent; padding: .3rem 0; font-weight: 650; cursor: pointer; }
.rows { display: grid; gap: 1.4rem; }
.record { border: 2px solid var(--ink); background: var(--white); box-shadow: var(--shadow); }
.record-header { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; border-bottom: 2px solid var(--ink); background: var(--acid); }
.record-header strong { font-family: Umiak, sans-serif; font-size: 1.35rem; }
.remove-record { border: 0; background: transparent; text-decoration: underline; cursor: pointer; font-weight: 650; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1.2rem; }
.field { display: grid; gap: .4rem; align-content: start; }
.field.wide { grid-column: 1 / -1; }
.field span { font-size: .82rem; font-weight: 650; }
.field em { color: var(--orange); font-style: normal; }
input, select, textarea { width: 100%; min-height: 48px; border: 1.5px solid var(--ink); border-radius: 0; background: var(--white); color: var(--ink); padding: .72rem; }
textarea { min-height: 100px; resize: vertical; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border: 3px solid #b00020; }
.validation-summary { margin: 1.5rem 0; border: 2px solid #b00020; background: #fff1f2; padding: 1rem; }
.run-controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.save-choice { display: flex; gap: .65rem; align-items: center; }
.save-choice input, .handoff input { width: 20px; min-height: 20px; }

.results { padding-top: 5rem; border-top: 2px solid var(--ink); }
.version { font-family: monospace; font-size: .8rem; }
.result-lead { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 2px solid var(--ink); box-shadow: var(--shadow); }
.result-lead div { min-height: 150px; display: grid; align-content: space-between; padding: 1.2rem; background: var(--acid); }
.result-lead div + div { border-left: 2px solid var(--ink); background: var(--orange); }
.result-lead span { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 650; }
.result-lead strong { font-family: Umiak, sans-serif; font-size: clamp(2rem, 4vw, 4rem); line-height: .95; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.metric { min-height: 120px; border: 1.5px solid var(--ink); padding: 1rem; background: var(--white); display: grid; align-content: space-between; }
.metric span { color: var(--muted); font-size: .84rem; }
.metric strong { font-family: Umiak, sans-serif; font-size: 1.8rem; }
.decision-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 2rem 0; }
.decision-grid article { min-height: 190px; border: 2px solid var(--ink); background: var(--white); padding: 1.2rem; }
.decision-grid article p:last-child { font-size: 1.15rem; }
.decision-grid .next-action { background: var(--blue); color: var(--white); }
.evidence-map { margin: 2rem 0; padding: 1.2rem; border: 2px solid var(--ink); background: var(--white); }
.map-plot { position: relative; min-height: 360px; margin-top: 1rem; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink); background: linear-gradient(90deg, rgba(215,255,63,.15), rgba(243,111,56,.16)); }
.map-card { position: absolute; max-width: 180px; padding: .45rem .6rem; border: 1.5px solid var(--ink); background: var(--acid); font-size: .78rem; font-weight: 650; transform: translate(-50%, 50%); box-shadow: 2px 2px 0 var(--ink); }
.axis { position: absolute; font-size: .75rem; font-weight: 650; }
.axis-x { right: .5rem; bottom: .35rem; }
.axis-y { left: .45rem; top: .5rem; writing-mode: vertical-rl; transform: rotate(180deg); }
.table-shell { overflow: auto; border: 2px solid var(--ink); background: var(--white); }
table { width: 100%; min-width: 880px; border-collapse: collapse; font-size: .9rem; }
th, td { padding: .75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); max-width: 320px; overflow-wrap: anywhere; }
th { position: sticky; top: 0; background: var(--ink); color: var(--white); }
.status-pill { display: inline-block; padding: .25rem .5rem; background: var(--acid); border: 1px solid var(--ink); font-weight: 650; white-space: nowrap; }
.limitations { margin: 1.5rem 0; padding: 1rem 1.2rem; border-left: 6px solid var(--orange); background: var(--white); }
.limitations h3 { font-size: 1.3rem; }
.limitations ul { margin-bottom: 0; }
.feedback { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0; padding: 1rem 1.2rem; border: 1.5px solid var(--ink); background: var(--white); }
.feedback h3, .feedback [data-feedback-status] { grid-column: 1 / -1; }
.feedback label { display: grid; gap: .35rem; font-weight: 650; }
.feedback select { min-height: 44px; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.delta, .facilitator, .handoff, .paid-route { margin-top: 2rem; padding: clamp(1.3rem, 3vw, 2rem); border: 2px solid var(--ink); background: var(--white); }
.delta ul { padding-left: 1.2rem; }
.facilitator { background: var(--acid); }
.facilitator ul { columns: 2; }
.handoff { display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; align-items: center; }
.handoff > div { grid-row: span 2; }
.handoff label { max-width: 320px; display: flex; gap: .6rem; align-items: start; }
.paid-route { background: var(--ink); color: var(--white); }
.paid-route p { max-width: 760px; }
.method { background: var(--white); border-top: 2px solid var(--ink); }
.method > p, .method details { max-width: 800px; }
.method h2 { max-width: 900px; margin-bottom: 1.5rem; }
.method details { border-block: 1px solid var(--ink); padding: 1rem 0; margin: 1.5rem 0; }
.method summary { cursor: pointer; font-weight: 650; }
.method li { margin-bottom: .4rem; }
footer { padding: 2rem max(1rem, calc((100vw - 1180px) / 2)); display: flex; justify-content: space-between; gap: 1rem; background: var(--ink); color: var(--white); }
.toast { position: fixed; z-index: 30; right: 1rem; bottom: 1rem; max-width: 360px; background: var(--acid); color: var(--ink); border: 2px solid var(--ink); box-shadow: var(--shadow); padding: .8rem 1rem; transform: translateY(160%); transition: transform .2s ease; }
.toast.show { transform: translateY(0); }

body.embed .site-header, body.embed footer, body.embed .method { display: none; }
body.embed .hero { min-height: 500px; }
body.embed main > section { padding-inline: clamp(1rem, 4vw, 3rem); }

@media (max-width: 800px) {
  .site-header nav a:last-child { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .worked-example { grid-template-columns: 1fr; }
  .formula-note { grid-template-columns: 1fr; }
  h1 { font-size: clamp(3.1rem, 15vw, 5.8rem); }
  .section-heading, .run-controls { align-items: stretch; flex-direction: column; }
  .field-grid, .result-lead, .decision-grid { grid-template-columns: 1fr; }
  .result-lead div + div { border-left: 0; border-top: 2px solid var(--ink); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .handoff { grid-template-columns: 1fr; }
  .handoff > div { grid-row: auto; }
  .facilitator ul { columns: 1; }
  .feedback { grid-template-columns: 1fr; }
  .feedback h3, .feedback [data-feedback-status] { grid-column: auto; }
}

@media (max-width: 520px) {
  .site-header { min-height: 60px; }
  .site-header nav { font-size: .8rem; }
  main > section { padding-block: 3rem; }
  .privacy-strip { padding-block: 1rem; }
  .field-grid { padding: .8rem; }
  .metric-grid { grid-template-columns: 1fr; }
  .hero-actions .button, .artifact-actions .button, .run-controls .button { width: 100%; }
  footer { flex-direction: column; }
}

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

@media print {
  .site-header, .hero, .privacy-strip, .workspace, .artifact-actions, .facilitator, .handoff, .paid-route, .method, footer, .toast { display: none !important; }
  body { background: white; color: black; }
  .results { display: block !important; padding: 0; border: 0; }
  .result-lead, .metric, .decision-grid article, .table-shell, .limitations { box-shadow: none; break-inside: avoid; }
  .table-shell { overflow: visible; }
  table { min-width: 0; font-size: 8pt; }
  th { position: static; }
}
