/* impeccable-disable cream-palette -- Paper #F2F0E8 is the named ground in
   Resonansia R01, paired with Ink #151515 at accessible contrast. */
/* impeccable-disable overused-font -- Instrument Sans, Newsreader and IBM Plex
   Mono are the reviewed R01 roles. The prototype uses local fallbacks and
   makes no font-provider request. */
:root {
  --paper: #f2f0e8;
  --ink: #151515;
  --pulse: #635bff;
  --sprout: #3f776f;
  --ember: #ff8066;
  --pollen: #f2c14e;
  --fog: #9eddeb;
  --line: rgba(21, 21, 21, 0.19);
  color-scheme: light;
  font-family: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--pulse); outline-offset: 3px; }

.topbar, main, footer { width: min(100%, 760px); margin-inline: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 22px 20px 8px; }
.wordmark { font-size: 13px; font-weight: 800; letter-spacing: 0.16em; text-decoration: none; }
.wordmark { min-height: 44px; display: inline-flex; align-items: center; }
.status, .route-label, .step-label { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase; }
.status { display: inline-flex; width: fit-content; border: 1px solid var(--ink); border-radius: 999px; padding: 7px 10px; line-height: 1; }

main { padding: 18px 20px 48px; }
.hero, .form-panel, .result-panel { min-height: calc(100svh - 176px); display: flex; flex-direction: column; justify-content: center; }
.route-label, .step-label { color: var(--sprout); font-weight: 700; margin: 0 0 18px; }
h1, h2, p { text-wrap: pretty; }
h1 { font-family: Newsreader, Georgia, serif; font-size: clamp(42px, 12vw, 76px); line-height: 0.98; letter-spacing: -0.035em; margin: 0 0 22px; font-weight: 500; }
.lead { font-size: 19px; line-height: 1.52; max-width: 610px; margin: 0 0 26px; }
.ai-note, .privacy-nudge, small, footer { font-size: 12px; line-height: 1.5; color: rgba(21, 21, 21, 0.72); }
.ai-note { max-width: 520px; margin: 18px 0 0; }

.human-loop { display: grid; gap: 8px; margin: 0 0 28px; }
.human-loop span { border-top: 1px solid var(--line); padding: 10px 0 2px; font-size: 15px; }

.primary, .secondary { min-height: 52px; border-radius: 999px; padding: 13px 22px; border: 1px solid var(--ink); cursor: pointer; font-weight: 750; }
.primary { background: var(--ink); color: var(--paper); }
.secondary { background: transparent; color: var(--ink); }
.primary:disabled { opacity: 0.55; cursor: wait; }
.hero > .primary { align-self: flex-start; }

.progress { height: 4px; background: rgba(99, 91, 255, 0.15); margin-bottom: 22px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--pulse); }
.form-panel h1 { font-size: clamp(36px, 10vw, 58px); }
.choice-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.choice-grid { display: grid; gap: 10px; }
.choice { position: relative; display: block; border: 1px solid var(--line); border-radius: 28px; background: rgba(255,255,255,0.28); cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: block; min-height: 58px; padding: 17px 20px; font-size: 17px; }
.choice:has(input:checked) { border-color: var(--pulse); background: rgba(99, 91, 255, 0.08); box-shadow: inset 5px 0 0 var(--pulse); }
.choice:has(input:focus-visible) { outline: 2px solid var(--pulse); outline-offset: 3px; }
.text-field { display: grid; gap: 8px; margin-top: 18px; font-size: 15px; font-weight: 700; }
.text-field textarea, .text-field input { width: 100%; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,0.38); padding: 16px 18px; color: var(--ink); font-size: 17px; }
.text-field textarea { resize: vertical; }
.text-guidance { display: flex; justify-content: space-between; gap: 12px; }
.text-guidance span:first-child { max-width: 560px; }
.text-guidance span:last-child { white-space: nowrap; }
.actions, .result-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 26px; }

.consent { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; margin-top: 20px; font-size: 14px; line-height: 1.46; }
.consent input { width: 24px; height: 24px; margin: 0; accent-color: var(--pulse); }
.consent strong { display: block; font-size: 15px; margin-bottom: 4px; }
.form-error { color: #8d281c; margin-top: 16px; line-height: 1.45; }
.form-error:empty { display: none; }

.opportunity-card { position: relative; overflow: hidden; border: 1px solid var(--ink); border-radius: 30px; padding: 24px; background: rgba(255,255,255,0.38); box-shadow: 10px 10px 0 var(--pollen); }
.opportunity-card::after { content: ""; position: absolute; width: 120px; height: 120px; border: 2px solid var(--pulse); border-radius: 50%; right: -72px; top: 28%; opacity: 0.26; }
.opportunity-card h1 { font-size: clamp(36px, 10vw, 56px); margin-top: 22px; }
.opportunity-card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin: 24px 0 6px; }
.opportunity-card p, .opportunity-card blockquote { font-size: 17px; line-height: 1.5; margin: 0; }
.opportunity-card blockquote { border-radius: 16px; background: rgba(255, 128, 102, 0.12); padding: 14px; }
.opportunity-card .inference { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; margin-top: 24px; color: rgba(21,21,21,0.66); }
.role-row { display: flex; flex-wrap: wrap; gap: 8px; }
.role-row span { border: 1px solid var(--sprout); border-radius: 999px; padding: 8px 11px; font-size: 13px; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 18px 20px 28px; border-top: 1px solid var(--line); }
footer p { margin: 0; max-width: 540px; }
footer a { min-height: 44px; display: inline-flex; align-items: center; }

.portal { width: min(100% - 40px, 980px); margin: 0 auto; padding: 54px 0; }
.portal h1 { max-width: 850px; }
.portal-grid { display: grid; gap: 14px; margin-top: 38px; }
.portal-card { min-height: 150px; border: 1px solid var(--ink); border-radius: 30px; padding: 22px; text-decoration: none; display: flex; flex-direction: column; justify-content: space-between; background: rgba(255,255,255,0.28); }
.portal-card strong { font-family: Newsreader, Georgia, serif; font-size: 30px; font-weight: 500; }
.portal-card span { font-size: 14px; }

.privacy-page { width: min(100% - 40px, 760px); margin: 0 auto; padding: 42px 0 80px; }
.privacy-page h1 { font-size: clamp(42px, 9vw, 70px); }
.privacy-page h2 { margin-top: 34px; }
.privacy-page p, .privacy-page li { font-size: 17px; line-height: 1.62; }

@media (min-width: 700px) {
  .portal-grid { grid-template-columns: repeat(3, 1fr); }
  .hero, .form-panel, .result-panel { min-height: 680px; }
}

@media (prefers-reduced-motion: no-preference) {
  .primary { transition: transform 140ms ease; }
  .primary:hover { transform: translateY(-2px); }
}
