/* Growth Lab Protocol — Apply · same design system as growthlabprotocol.com */
:root {
  --ink: #07090F; --ink-2: #0B0E16; --ink-3: #10141F; --ink-4: #161B29;
  --line-d: rgba(255,255,255,.08); --line-d2: rgba(255,255,255,.14);
  --text-d: #EEECE6; --muted-d: #8C92A4;
  --ivory: #F4F2EC; --text-l: #0A0C12;
  --accent: #2438F5; --accent-hi: #3B4EFF; --accent-soft: #B3C0FF;
  --green: #39D98A; --red: #FF7A6B;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 14px; --r-lg: 22px;
  --ease: cubic-bezier(.2,.7,.2,1);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--text-d); background: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: #fff; }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
kbd { font-family: var(--mono); font-size: 10px; padding: 2px 6px; border: 1px solid var(--line-d2); border-radius: 5px; }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo__mark { width: 32px; height: 32px; flex: none; }
.logo__mark path, .done-mark path { fill: none; stroke-width: 13; }
.logo__mark .g, .done-mark .g { stroke: var(--text-d); }
.logo__mark .a, .done-mark .a { stroke: var(--accent-soft); }
.logo__word { display: flex; flex-direction: column; line-height: 1; }
.logo__word b { font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.logo__word i { font-style: normal; font-family: var(--mono); font-size: 9px; letter-spacing: .38em; text-transform: uppercase; color: var(--muted-d); margin-top: 4px; }

/* kicker */
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 24px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-d); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(57,217,138,.6); } 70% { box-shadow: 0 0 0 7px rgba(57,217,138,0); } 100% { box-shadow: 0 0 0 0 rgba(57,217,138,0); } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 26px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s; }
.btn .arr { transition: transform .3s var(--ease); } .btn:hover .arr { transform: translateX(4px); }
.btn--accent { background: var(--accent); color: #fff; } .btn--accent:hover { background: var(--accent-hi); }
.btn--accent:disabled { background: var(--ink-4); color: var(--muted-d); cursor: not-allowed; }
.btn--ghost { border-color: var(--line-d2); background: transparent; } .btn--ghost:hover { border-color: var(--text-d); }
.btn--light { background: var(--ivory); color: var(--text-l); } .btn--light:hover { background: #fff; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: minmax(380px, 40%) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 56px; background: var(--ink-2); border-right: 1px solid var(--line-d); }
.side__glow { position: absolute; left: -30%; bottom: -40%; width: 900px; height: 900px; background: radial-gradient(closest-side, rgba(36,56,245,.35), rgba(36,56,245,.06) 60%, transparent 75%); pointer-events: none; }
.side > * { position: relative; }
.side__title { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 5vw, 80px); line-height: .95; letter-spacing: -.025em; margin: 0; }
.side__title em, .q-title em { font-style: italic; color: var(--accent-soft); }
.side__lead { color: var(--muted-d); font-size: 17px; max-width: 460px; margin: 24px 0 0; }
.next { list-style: none; padding: 0; margin: 40px 0 0; max-width: 460px; }
.next li { display: flex; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line-d); }
.next .mono { color: var(--accent-soft); padding-top: 3px; }
.next b { font-weight: 600; } .next p { margin: 2px 0 0; color: var(--muted-d); font-size: 14px; }
.side__foot { display: flex; align-items: center; gap: 14px; }
.side__foot p { margin: 0; color: var(--muted-d); font-size: 14px; } .side__foot b { color: var(--text-d); font-weight: 600; }
.avatars { display: flex; }
.avatars span { width: 40px; height: 40px; border-radius: 50%; background: #E7D9C3; color: #2b2316; font-weight: 700; font-size: 12px; display: grid; place-items: center; border: 2px solid var(--ink-2); }
.avatars span + span { margin-left: -10px; background: var(--accent); color: #fff; }

/* ---------- stage ---------- */
.stage { position: relative; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; padding: 0 clamp(24px, 7vw, 120px); }
.stage__top { display: flex; align-items: center; gap: 20px; height: 96px; }
.stage__top .logo { display: none; }
.progress { flex: 1; height: 2px; background: var(--ink-4); border-radius: 2px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent-soft); transition: width .5s var(--ease); }
.counter { color: var(--muted-d); min-width: 48px; text-align: right; }

.screen { display: none; flex: 1; flex-direction: column; justify-content: center; max-width: 680px; padding: 40px 0 120px; }
.screen.is-active { display: flex; animation: screenIn .55s var(--ease) both; }
.screen.is-back { animation-name: screenInBack; }
@keyframes screenIn { from { opacity: 0; transform: translateY(28px); } }
@keyframes screenInBack { from { opacity: 0; transform: translateY(-28px); } }
.q-num { display: flex; align-items: center; gap: 10px; color: var(--accent-soft); margin-bottom: 18px; }
.q-num .opt { color: var(--muted-d); }
.q-title { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -.02em; margin: 0; }
.q-help { color: var(--muted-d); font-size: 17px; margin: 16px 0 0; max-width: 560px; }
.fitlist { display: grid; gap: 10px; margin: 32px 0 40px; }
.fitlist div { display: flex; gap: 14px; color: var(--text-d); }
.fitlist span { color: var(--accent-soft); font-size: 12px; padding-top: 4px; }
.screen > .btn, .q-actions { margin-top: 36px; }
.screen > .btn { align-self: flex-start; }
.hint { color: #4b5164; margin: 14px 0 0; }

/* inputs */
.q-field { margin-top: 36px; }
.q-input { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-d2); padding: 10px 0 14px; font-size: clamp(22px, 2.2vw, 30px); font-family: var(--sans); transition: border-color .25s; border-radius: 0; }
.q-input::placeholder { color: #3a4052; }
.q-input:focus { outline: none; border-color: var(--accent-soft); }
textarea.q-input { resize: none; min-height: 120px; line-height: 1.4; font-size: clamp(19px, 1.8vw, 24px); }
.q-split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.q-split .q-input, .q-input { min-width: 0; }
.q-err { color: var(--red); font-size: 14px; margin: 12px 0 0; min-height: 22px; }
.q-actions { display: flex; align-items: center; gap: 18px; }
.q-actions .mono { color: #4b5164; }
.q-actions[hidden] { display: none; }

/* options */
.opts { display: grid; gap: 10px; margin-top: 32px; max-width: 520px; }
.opts--grid { grid-template-columns: 1fr 1fr; max-width: 640px; }
.opt-btn { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 15px 18px; border-radius: var(--r); border: 1px solid var(--line-d2); background: rgba(255,255,255,.02); cursor: pointer; font-size: 16px; transition: border-color .2s, background-color .2s, transform .2s var(--ease); }
.opt-btn:hover { border-color: var(--accent-soft); background: rgba(179,192,255,.05); }
.opt-btn .key { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 7px; border: 1px solid var(--line-d2); font-family: var(--mono); font-size: 11px; color: var(--muted-d); transition: all .2s; }
.opt-btn .tick { margin-left: auto; opacity: 0; color: var(--accent-soft); transition: opacity .2s; }
.opt-btn.is-on { border-color: var(--accent-soft); background: rgba(36,56,245,.16); }
.opt-btn.is-on .key { background: var(--accent-soft); color: var(--ink); border-color: var(--accent-soft); }
.opt-btn.is-on .tick { opacity: 1; }
.opt-btn.flash { animation: flash .35s var(--ease) 2; }
@keyframes flash { 50% { background: rgba(36,56,245,.35); } }

/* review */
.review { margin: 32px 0 0; border-top: 1px solid var(--line-d); max-height: 46vh; overflow-y: auto; }
.review div { display: grid; grid-template-columns: 200px 1fr auto; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line-d); align-items: baseline; }
.review dt { color: var(--muted-d); font-size: 13px; }
.review dd { margin: 0; font-size: 15px; word-break: break-word; }
.review button { border: 0; background: none; color: var(--accent-soft); font-size: 13px; cursor: pointer; padding: 0; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 24px; font-size: 14px; color: var(--muted-d); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.form-error { color: var(--red); font-size: 14px; margin: 14px 0 0; } .form-error:empty { display: none; }
.row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.row--center { justify-content: flex-start; }

/* done */
.screen--done { align-items: flex-start; }
.done-mark { width: 76px; height: 76px; margin-bottom: 28px; }
.done-mark .g { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1s var(--ease) .2s forwards; }
.done-mark .a { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .6s var(--ease) 1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* side nav arrows */
.stage__nav { position: fixed; right: 28px; bottom: 28px; display: flex; gap: 6px; }
.stage__nav[hidden] { display: none; }
.navbtn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-d2); background: var(--ink-3); cursor: pointer; transition: border-color .2s; }
.navbtn:hover { border-color: var(--text-d); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: none; }
  .stage__top .logo { display: inline-flex; }
  .stage__top { height: 76px; }
  .logo--sm .logo__word i { display: none; }
}
@media (max-width: 600px) {
  .stage { padding: 0 18px; }
  .screen { justify-content: flex-start; padding: 36px 0 110px; }
  .q-split { grid-template-columns: 1fr; gap: 8px; }
  .opts--grid { grid-template-columns: 1fr; }
  .review div { grid-template-columns: 1fr auto; }
  .review dt { grid-column: 1 / -1; }
  .stage__nav { right: 16px; bottom: 16px; }
  .q-actions .mono { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
