:root {
  --ink: #111312;
  --ink-2: #191c1a;
  --cream: #f2eee5;
  --paper: #faf7f0;
  --muted: #737870;
  --coral: #df4c35;
  --coral-soft: #ef806d;
  --green: #3d9861;
  --acid: #ccf05e;
  --line: rgba(17, 19, 18, .15);
  --line-light: rgba(255, 255, 255, .14);
  --display: "Helvetica Neue", "Arial Nova", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ink); }
body { min-height: 100%; margin: 0; background: var(--ink); color: var(--cream); font-family: var(--display); -webkit-font-smoothing: antialiased; }
button, textarea, input { font: inherit; }
[hidden] { display: none !important; }

.ambient { position: fixed; border-radius: 50%; filter: blur(90px); opacity: .13; pointer-events: none; }
.ambient-a { width: 380px; height: 380px; left: -140px; top: 8%; background: var(--coral); }
.ambient-b { width: 420px; height: 420px; left: 30%; bottom: -260px; background: var(--acid); opacity: .08; }

.topbar { position: fixed; z-index: 20; inset: 0 0 auto; height: 70px; padding: 0 28px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line-light); background: rgba(12,14,13,.82); backdrop-filter: blur(18px); }
.apm-mark { justify-self: start; display: flex; align-items: center; gap: 8px; color: var(--cream); text-decoration: none; }
.apm-mark b { font-size: 23px; letter-spacing: -.06em; }
.apm-mark i { width: 8px; height: 8px; background: var(--coral); border-radius: 50%; }
.topbar-center { display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 9px; letter-spacing: .13em; }
.topbar-center b { color: var(--acid); }
.secure-pill { justify-self: end; display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.66); }
.secure-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 6px rgba(61,152,97,.12); }

.shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .86fr) minmax(620px, 1.14fr); padding-top: 70px; }
.story-panel { position: sticky; top: 70px; height: calc(100vh - 70px); min-height: 690px; padding: 58px 54px 36px; display: grid; grid-template-rows: auto 1fr auto; border-right: 1px solid var(--line-light); overflow: hidden; }
.story-copy { position: relative; z-index: 2; max-width: 520px; }
.eyebrow, .step-label { margin: 0 0 18px; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--acid); }
.eyebrow::before, .step-label::before { content: ""; display: inline-block; width: 32px; height: 1px; margin: 0 11px 3px 0; background: currentColor; }
.story-copy h1 { margin: 0; max-width: 8ch; font-size: clamp(52px, 5.5vw, 84px); line-height: .9; letter-spacing: -.07em; }
.story-copy > p:last-child { margin: 24px 0 0; max-width: 460px; color: rgba(255,255,255,.7); font-size: 17px; line-height: 1.55; }

.signal-map { position: relative; align-self: center; width: min(100%, 570px); margin: 15px auto 0; }
.signal-map svg { width: 100%; overflow: visible; }
.route { fill: none; stroke: url(#line); stroke-width: 2; stroke-dasharray: 7 7; opacity: .65; animation: flow 16s linear infinite; }
.route-b, .route-d { animation-direction: reverse; }
.node { fill: var(--ink); stroke: var(--coral-soft); stroke-width: 2; }
.core { fill: var(--cream); stroke: rgba(255,255,255,.5); stroke-width: 2; }
.signal-map text { fill: var(--ink); text-anchor: middle; font: 700 12px var(--mono); letter-spacing: .08em; }
.signal-map text.core-sub { font-size: 8px; opacity: .65; }
.pulse { transform-origin: 260px 180px; animation: pulse 2.8s ease-out infinite; }
.map-label { position: absolute; font: 9px var(--mono); letter-spacing: .12em; color: rgba(255,255,255,.54); }
.label-a { left: 4%; top: 15%; }.label-b { right: 3%; top: 14%; }.label-c { left: 5%; bottom: 13%; }.label-d { right: 0; bottom: 13%; }
@keyframes flow { to { stroke-dashoffset: -160; } }
@keyframes pulse { 0% { transform: scale(.72); opacity: .8; } 75%,100% { transform: scale(1.45); opacity: 0; } }

.story-footer { display: flex; justify-content: space-between; gap: 20px; padding-top: 18px; border-top: 1px solid var(--line-light); font: 9px var(--mono); letter-spacing: .13em; color: rgba(255,255,255,.48); }

.workspace { min-width: 0; min-height: calc(100vh - 70px); padding: 46px clamp(34px, 5vw, 76px); background: var(--cream); color: var(--ink); display: grid; align-items: center; }
.screen { min-width: 0; width: 100%; max-width: 820px; margin: 0 auto; animation: screen-in .55s cubic-bezier(.16,.8,.2,1) both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(18px); filter: blur(3px); } }
.screen-head h2, .success-screen h2, .error-screen h2 { margin: 0; font-size: clamp(48px, 5vw, 76px); line-height: .92; letter-spacing: -.065em; }
.screen-head h2 span { color: var(--coral); }
.screen-head > p:last-child { max-width: 680px; margin: 20px 0 0; font-size: 19px; line-height: 1.55; color: #4f544e; }

.module-preview { margin: 34px 0 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.module-preview article { min-height: 82px; display: grid; grid-template-columns: 42px 1fr auto; gap: 15px; align-items: center; }
.module-preview article + article { border-top: 1px solid var(--line); }
.module-preview article > span { font: 10px var(--mono); color: var(--coral); }
.module-preview article b { display: block; font-size: 25px; letter-spacing: -.04em; }
.module-preview article small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.module-preview article i { font: 9px var(--mono); text-transform: uppercase; letter-spacing: .08em; font-style: normal; color: var(--muted); }
.intro-callout { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 18px; margin: 0 0 24px; padding: 14px 17px; background: rgba(204,240,94,.28); border-left: 4px solid #9abf2f; }
.intro-callout b { font-size: 22px; }.intro-callout span { font-size: 13px; line-height: 1.45; }

.primary-btn, .secondary-btn, .error-screen a { min-height: 51px; border: 0; padding: 0 19px; display: inline-flex; align-items: center; justify-content: space-between; gap: 34px; cursor: pointer; text-decoration: none; font: 700 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; transition: transform .2s ease, background .2s ease; }
.primary-btn { background: var(--ink); color: var(--cream); }
.primary-btn:hover { background: var(--coral); transform: translateY(-2px); }
.primary-btn:disabled { opacity: .48; cursor: wait; transform: none; }
.secondary-btn { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.secondary-btn:hover { background: #e5dfd4; }

.progress-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.progress-head > div:first-child span, .progress-copy span { display: block; font: 9px var(--mono); letter-spacing: .12em; color: var(--coral); }
.progress-head > div:first-child b { display: block; margin-top: 7px; font-size: 37px; letter-spacing: -.05em; }
.progress-copy { text-align: right; }.progress-copy b { display: block; margin-top: 5px; font-size: 22px; }
.progress-track { height: 3px; margin: 16px 0 19px; background: rgba(17,19,18,.11); overflow: hidden; }
.progress-track i { display: block; height: 100%; width: 33.3%; background: var(--coral); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.module-intro { margin: 0 0 22px; max-width: 700px; color: #5d625c; font-size: 15px; line-height: 1.5; }
.questions { display: grid; gap: 14px; }
.question-card { padding: 18px 18px 17px; border: 1px solid var(--line); background: var(--paper); transition: border-color .2s ease, box-shadow .2s ease; }
.question-card:focus-within { border-color: rgba(223,76,53,.62); box-shadow: 0 10px 30px rgba(17,19,18,.07); }
.question-top { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.question-top span { padding-top: 3px; font: 9px var(--mono); color: var(--coral); }
.question-top h3 { margin: 0; font-size: 18px; line-height: 1.28; letter-spacing: -.025em; }
.options { margin-top: 13px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.option { position: relative; min-width: 0; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option label { min-height: 52px; height: 100%; padding: 9px 8px; display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; border: 1px solid rgba(17,19,18,.13); background: #fff; color: #565b55; font-size: 10px; line-height: 1.25; transition: background .18s ease, color .18s ease, border .18s ease, transform .18s ease; }
.option input:checked + label { background: var(--ink); border-color: var(--ink); color: var(--cream); transform: translateY(-2px); }
.option input:focus-visible + label { outline: 3px solid rgba(223,76,53,.28); outline-offset: 2px; }
.open-answer { margin-top: 16px; padding: 18px; background: #e9e4da; border-left: 4px solid var(--coral); }
.open-answer label { display: block; font-weight: 750; font-size: 16px; line-height: 1.35; }
.open-answer textarea { width: 100%; min-height: 95px; resize: vertical; margin-top: 12px; padding: 12px; border: 1px solid rgba(17,19,18,.2); background: var(--paper); color: var(--ink); line-height: 1.5; }
.form-alert { min-height: 20px; margin-top: 12px; color: #b82f20; font-size: 13px; font-weight: 700; }
.form-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }

.loader { display: grid; place-items: center; gap: 18px; min-height: 300px; color: var(--muted); }
.loader-ring { width: 50px; height: 50px; border: 2px solid rgba(17,19,18,.12); border-top-color: var(--coral); border-radius: 50%; animation: spin .8s linear infinite; }
.loader p { font: 10px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
@keyframes spin { to { transform: rotate(360deg); } }

.success-screen { text-align: left; }
.success-icon { width: 78px; height: 78px; margin-bottom: 25px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--acid); font-size: 34px; box-shadow: 0 0 0 13px rgba(204,240,94,.23); }
.success-screen > p:nth-of-type(2) { max-width: 710px; margin: 22px 0 0; color: #515650; font-size: 18px; line-height: 1.55; }
.success-flow { margin-top: 34px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.success-flow article { min-width: 0; min-height: 125px; padding: 17px 17px 16px 0; display: grid; grid-template-rows: auto 1fr auto; }
.success-flow article + article { border-left: 1px solid var(--line); padding-left: 17px; }
.success-flow span { font: 9px var(--mono); color: var(--coral); }
.success-flow b { align-self: center; font-size: 21px; overflow-wrap: anywhere; }.success-flow small { color: var(--muted); line-height: 1.35; overflow-wrap: anywhere; }
.success-note { margin-top: 20px; padding: 14px 16px; border: 1px solid var(--line); font-size: 13px; }

.error-code { display: inline-block; margin-bottom: 20px; padding: 7px 10px; background: #fde2dc; color: #9f2e20; font: 9px var(--mono); letter-spacing: .12em; }
.error-screen p { max-width: 620px; margin: 22px 0; color: #565b55; font-size: 17px; line-height: 1.55; }
.error-screen a { background: var(--ink); color: var(--cream); width: max-content; }

@media (max-width: 1080px) {
  .shell { grid-template-columns: 360px minmax(0, 1fr); }
  .story-panel { padding: 45px 30px 30px; }
  .story-copy h1 { font-size: 58px; }
  .workspace { padding: 38px 30px; }
  .success-screen h2, .error-screen h2 { font-size: 42px; line-height: .95; }
  .options { grid-template-columns: 1fr; }
  .option label { min-height: 40px; justify-content: flex-start; text-align: left; padding: 10px 12px; }
}

@media (max-width: 760px) {
  .topbar { height: 58px; grid-template-columns: 1fr auto; padding: 0 15px; }
  .topbar-center { display: none; }.secure-pill { font-size: 0; }.secure-pill::after { content: "Privado"; font-size: 8px; }
  .shell { display: block; padding-top: 58px; }
  .story-panel { position: relative; top: 0; height: auto; min-height: 430px; padding: 38px 22px 24px; border-right: 0; border-bottom: 1px solid var(--line-light); }
  .story-copy h1 { max-width: 9ch; font-size: 54px; }.story-copy > p:last-child { font-size: 15px; }
  .signal-map { width: 360px; max-width: 100%; margin-top: -5px; }.story-footer { margin-top: -10px; }
  .workspace { min-height: 650px; padding: 36px 20px 54px; }
  .screen-head h2 { font-size: 48px; }
  .success-screen h2, .error-screen h2 { font-size: 40px; }
  .module-preview article { grid-template-columns: 32px 1fr; }.module-preview article i { display: none; }
  .progress-head > div:first-child b { font-size: 29px; }
  .question-card { padding: 15px 14px; }.question-top { grid-template-columns: 26px 1fr; }.question-top h3 { font-size: 16px; }
  .success-flow { grid-template-columns: 1fr; }.success-flow article { min-height: 92px; }.success-flow article + article { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
