:root {
  --ink: #151812;
  --ink-soft: #282d24;
  --paper: #f5f4ee;
  --paper-deep: #ecebe3;
  --card: #fffefa;
  --line: #dcded4;
  --line-dark: #bdc2b4;
  --muted: #687062;
  --muted-light: #92998d;
  --acid: #d7ff64;
  --acid-dark: #b9e338;
  --blue: #4257d6;
  --red: #c84b3f;
  --red-soft: #fff0ed;
  --amber: #9b6817;
  --amber-soft: #fff7df;
  --green: #397b4a;
  --green-soft: #ebf8ee;
  --shadow: 0 24px 60px rgba(23, 28, 19, .08);
  --shadow-small: 0 8px 24px rgba(23, 28, 19, .07);
  --radius: 18px;
  --radius-small: 11px;
  --topbar: 76px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
svg { display: block; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: .94rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-decoration: none;
}
.brand--light { color: #f7f8f2; }
.brand-dot { color: var(--acid-dark); }
.brand-mark, .boot-logo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 24px;
}
.brand-mark i, .brand-mark b, .boot-logo i, .boot-logo b {
  display: block;
  background: currentColor;
  border-radius: 2px;
}
.brand-mark i, .boot-logo i { width: 4px; height: 14px; }
.brand-mark b, .boot-logo b { width: 18px; height: 4px; position: relative; }
.brand-mark b::before, .brand-mark b::after, .boot-logo b::before, .boot-logo b::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 4px;
  height: 12px;
  border-radius: 2px;
  background: currentColor;
}
.brand-mark b::before, .boot-logo b::before { left: -1px; }
.brand-mark b::after, .boot-logo b::after { right: -1px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.eyebrow--light { color: rgba(255, 255, 255, .55); }

.button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 750;
  font-size: .88rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .choice-card:has(input:focus-visible), .multi-option:has(input:focus-visible) {
  outline: 3px solid rgba(66, 87, 214, .22);
  outline-offset: 2px;
}
.button:disabled { cursor: not-allowed; opacity: .52; }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.button--primary { background: var(--ink); color: #fff; }
.button--primary:hover:not(:disabled) { background: #292e25; }
.button--secondary { border-color: var(--line-dark); background: transparent; }
.button--secondary:hover:not(:disabled) { background: #fff; }
.button--ghost { border-color: var(--line); background: rgba(255, 255, 255, .52); }
.button--ghost:hover:not(:disabled) { border-color: var(--line-dark); background: #fff; }
.button--small { min-height: 38px; padding: 0 15px; font-size: .78rem; }
.button--wide { width: 100%; }
.button--danger { background: var(--red); color: #fff; }
.button.is-loading { pointer-events: none; }
.button.is-loading::before { content: ""; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Login */
.login-page { min-height: 100vh; background: #111410; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(400px, 1.08fr) minmax(430px, .92fr); }
.login-story {
  position: relative;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #f5f6ef;
  background:
    radial-gradient(circle at 76% 26%, rgba(215, 255, 100, .12), transparent 32%),
    linear-gradient(145deg, #171b15 0%, #0d0f0c 72%);
}
.login-story::before {
  content: "";
  position: absolute;
  width: min(48vw, 680px);
  aspect-ratio: 1;
  right: -20%;
  top: 10%;
  border: 1px solid rgba(215, 255, 100, .18);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(215,255,100,.025), 0 0 0 140px rgba(215,255,100,.018);
  pointer-events: none;
}
.login-story::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .25;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 80%, transparent);
}
.login-story > * { position: relative; z-index: 1; }
.story-copy { max-width: 690px; padding: 8vh 0; }
.story-copy h1 { margin: 0; font-size: clamp(3.5rem, 7vw, 7.2rem); line-height: .89; letter-spacing: -.075em; font-weight: 820; }
.story-copy p:last-child { max-width: 590px; margin: 34px 0 0; color: rgba(255,255,255,.6); font-size: clamp(1rem, 1.4vw, 1.2rem); line-height: 1.65; }
.story-metrics { display: flex; gap: clamp(28px, 5vw, 70px); border-top: 1px solid rgba(255,255,255,.11); padding-top: 24px; }
.story-metrics div { display: flex; flex-direction: column; gap: 5px; }
.story-metrics strong { color: var(--acid); font-size: 1.45rem; letter-spacing: -.04em; }
.story-metrics span { color: rgba(255,255,255,.43); font-size: .72rem; letter-spacing: .04em; }
.login-panel { min-height: 100vh; padding: 46px clamp(26px, 6vw, 100px); display: flex; flex-direction: column; justify-content: center; background: var(--paper); }
.login-card { width: min(100%, 470px); margin: auto; }
.login-card__head { display: flex; align-items: center; gap: 8px; color: var(--green); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.status-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--acid-dark); box-shadow: 0 0 0 5px rgba(185, 227, 56, .15); }
.login-card h2 { margin: 20px 0 10px; font-size: clamp(2.1rem, 4vw, 3.25rem); line-height: 1; letter-spacing: -.055em; }
.login-intro { margin: 0 0 34px; color: var(--muted); font-size: .95rem; line-height: 1.65; }
.field-label { display: block; margin: 0 0 9px; font-size: .78rem; font-weight: 750; }
.password-field { position: relative; }
.password-field input, .modal input {
  width: 100%;
  height: 56px;
  padding: 0 58px 0 17px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-small);
  background: var(--card);
  color: var(--ink);
  font-size: 1rem;
  transition: border-color .15s, box-shadow .15s;
}
.password-field input:focus, .modal input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(66,87,214,.08); outline: none; }
.password-toggle { position: absolute; right: 7px; top: 7px; width: 42px; height: 42px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.password-toggle:hover { background: var(--paper-deep); color: var(--ink); }
.password-toggle svg { width: 22px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.7; }
.form-error { min-height: 22px; margin: 8px 0 10px; color: var(--red); font-size: .8rem; }
.privacy-note { display: flex; gap: 12px; margin-top: 28px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-small); background: rgba(255,255,255,.45); }
.privacy-note svg { flex: 0 0 19px; width: 19px; height: 19px; fill: none; stroke: var(--green); stroke-width: 1.8; }
.privacy-note p { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.privacy-note strong { color: var(--ink-soft); }
.login-foot { width: min(100%, 470px); margin: 28px auto 0; color: var(--muted-light); font-size: .7rem; line-height: 1.45; }

/* App frame */
.app-page { min-height: 100vh; }
.topbar { position: fixed; z-index: 50; inset: 0 0 auto 0; height: var(--topbar); padding: 0 27px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; background: rgba(245,244,238,.92); backdrop-filter: blur(18px); }
.topbar__right { display: flex; align-items: center; gap: 16px; }
.save-status { min-width: 150px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--muted); font-size: .72rem; }
.save-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-light); }
.save-status.is-saving .save-dot { background: var(--amber); animation: pulse 1s ease infinite; }
.save-status.is-saved .save-dot { background: var(--green); }
.save-status.is-error .save-dot { background: var(--red); }
@keyframes pulse { 50% { opacity: .35; } }
.workspace { min-height: 100vh; padding-top: var(--topbar); display: grid; grid-template-columns: 290px minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 35; top: var(--topbar); bottom: 0; left: 0; width: 290px; padding: 31px 22px 24px; border-right: 1px solid var(--line); background: #eeede6; display: flex; flex-direction: column; overflow-y: auto; }
.sidebar__intro { padding: 0 10px 22px; }
.sidebar__intro h2 { margin: 0 0 7px; font-size: 1.25rem; letter-spacing: -.035em; }
.sidebar__intro p { margin: 0; color: var(--muted); font-size: .74rem; }
.section-nav { display: flex; flex-direction: column; gap: 3px; }
.section-link { width: 100%; min-height: 43px; border: 0; border-radius: 10px; padding: 5px 10px; display: grid; grid-template-columns: 26px 1fr 18px; align-items: center; gap: 8px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; }
.section-link:hover { background: rgba(255,255,255,.62); color: var(--ink); }
.section-link.is-active { background: var(--ink); color: #fff; }
.section-link__number { font-size: .65rem; font-weight: 800; opacity: .55; }
.section-link__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; font-weight: 700; }
.section-link__state { width: 16px; height: 16px; border: 1px solid currentColor; border-radius: 50%; opacity: .38; display: grid; place-items: center; }
.section-link__state svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.section-link.is-complete .section-link__state { background: var(--green); border-color: var(--green); color: #fff; opacity: 1; }
.section-link.is-active.is-complete .section-link__state { background: var(--acid); border-color: var(--acid); color: var(--ink); }
.sidebar__privacy { margin: auto 8px 0; padding-top: 22px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .68rem; line-height: 1.4; }
.sidebar__privacy svg { width: 17px; height: 17px; fill: none; stroke: var(--green); stroke-width: 1.8; }
.main-content { grid-column: 2; width: min(100%, 1020px); margin: 0 auto; padding: 58px clamp(32px, 6vw, 80px) 50px; }
.step-heading { margin-bottom: 35px; display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.step-heading h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -.06em; }
.step-heading p:last-child { max-width: 670px; margin: 13px 0 0; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.completion-ring { position: relative; flex: 0 0 58px; width: 58px; height: 58px; display: grid; place-items: center; }
.completion-ring svg { position: absolute; inset: 0; width: 100%; transform: rotate(-90deg); }
.completion-ring circle { fill: none; stroke-width: 3; }
.completion-ring__track { stroke: var(--line); }
.completion-ring__value { stroke: var(--ink); stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: 113.1; transition: stroke-dashoffset .3s ease; }
.completion-ring span { font-size: .68rem; font-weight: 800; }
.questions { display: flex; flex-direction: column; gap: 15px; }

/* Question cards */
.question-card { position: relative; padding: 24px clamp(20px, 3vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: 0 3px 14px rgba(23,28,19,.025); transition: border-color .18s, box-shadow .18s; }
.question-card:focus-within { border-color: #bdc1b8; box-shadow: var(--shadow-small); }
.question-card.has-error { border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,75,63,.08); }
.question-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.question-label { margin: 0; font-size: .98rem; line-height: 1.45; font-weight: 740; letter-spacing: -.012em; }
.required-mark { color: var(--red); margin-left: 4px; }
.prefilled-badge { flex: 0 0 auto; padding: 4px 8px; border: 1px solid #cbd8a5; border-radius: 999px; color: #637534; background: #f6ffe0; font-size: .6rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.question-help { margin: 7px 0 0; max-width: 760px; color: var(--muted); font-size: .75rem; line-height: 1.55; }
.question-control { margin-top: 17px; }
.question-error { margin: 9px 0 0; color: var(--red); font-size: .72rem; font-weight: 650; }
.group-heading { margin: 31px 0 3px; padding: 0 4px; }
.group-heading:first-child { margin-top: 0; }
.group-heading h2 { margin: 0; font-size: 1.26rem; letter-spacing: -.035em; }
.group-heading p { margin: 7px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.info-card { padding: 21px 23px; border: 1px solid var(--line); border-radius: var(--radius); background: #f0f1eb; }
.info-card--accent { background: #eff8d6; border-color: #d4e7a4; }
.info-card--warning { background: var(--amber-soft); border-color: #ead8a7; }
.info-card h3 { margin: 0 0 7px; font-size: .88rem; }
.info-card p { margin: 0; color: var(--muted); font-size: .77rem; line-height: 1.6; }

.text-input, .textarea-input, .select-input, .number-wrap input, .repeater-table input, .repeater-table select, .schedule-table input, .schedule-table select {
  width: 100%;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.text-input, .select-input, .number-wrap input { height: 48px; padding: 0 14px; }
.textarea-input { min-height: 112px; padding: 13px 14px; resize: vertical; line-height: 1.5; }
.text-input:focus, .textarea-input:focus, .select-input:focus, .number-wrap input:focus, .repeater-table input:focus, .repeater-table select:focus, .schedule-table input:focus, .schedule-table select:focus {
  border-color: var(--blue); box-shadow: 0 0 0 4px rgba(66,87,214,.07); outline: none;
}
.number-wrap { position: relative; max-width: 310px; }
.number-wrap input { padding-right: 74px; }
.number-unit { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .72rem; pointer-events: none; }
.select-input { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 20px, calc(100% - 12px) 20px; background-size: 5px 5px; background-repeat: no-repeat; }

.single-checkbox { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.single-checkbox input, .multi-option input { position: absolute; opacity: 0; pointer-events: none; }
.check-box { flex: 0 0 22px; width: 22px; height: 22px; border: 1.5px solid var(--line-dark); border-radius: 6px; background: #fff; display: grid; place-items: center; transition: .15s; }
.check-box svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.6; opacity: 0; }
.single-checkbox input:checked + .check-box, .multi-option input:checked + .check-box { background: var(--ink); border-color: var(--ink); }
.single-checkbox input:checked + .check-box svg, .multi-option input:checked + .check-box svg { opacity: 1; }
.single-checkbox__text { color: var(--ink-soft); font-size: .86rem; line-height: 1.5; }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.choice-grid.is-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-card { position: relative; min-height: 56px; padding: 12px 42px 12px 14px; border: 1px solid var(--line); border-radius: 11px; display: flex; flex-direction: column; justify-content: center; cursor: pointer; background: #fff; transition: border-color .15s, background .15s, transform .15s; }
.choice-card:hover { border-color: var(--line-dark); transform: translateY(-1px); }
.choice-card:has(input:checked) { border-color: var(--ink); background: #f4f7e9; box-shadow: inset 0 0 0 1px var(--ink); }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card__dot { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; border: 1.5px solid var(--line-dark); border-radius: 50%; background: #fff; }
.choice-card input:checked ~ .choice-card__dot { border: 5px solid var(--ink); }
.choice-card__label { font-size: .8rem; font-weight: 700; line-height: 1.35; }
.choice-card__help { margin-top: 3px; color: var(--muted); font-size: .67rem; line-height: 1.35; }
.multi-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.multi-option { position: relative; min-height: 41px; padding: 9px 13px 9px 39px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; background: #fff; cursor: pointer; transition: .15s; }
.multi-option:hover { border-color: var(--line-dark); }
.multi-option:has(input:checked) { border-color: var(--ink-soft); background: #f4f7e9; }
.multi-option .check-box { position: absolute; left: 10px; width: 19px; height: 19px; border-radius: 5px; }
.multi-option span:last-child { font-size: .76rem; font-weight: 650; }

.scale-control { display: grid; grid-template-columns: 1fr 54px; gap: 15px; align-items: center; }
.scale-slider { width: 100%; accent-color: var(--ink); }
.scale-value { height: 40px; border: 1px solid var(--line); border-radius: 9px; display: grid; place-items: center; background: #fff; font-size: .82rem; font-weight: 800; }
.scale-value.is-empty { color: var(--muted-light); }
.scale-labels { grid-column: 1 / -1; display: flex; justify-content: space-between; margin-top: -9px; color: var(--muted); font-size: .64rem; }
.clear-answer { grid-column: 1 / -1; justify-self: start; border: 0; padding: 0; background: none; color: var(--muted); font-size: .68rem; text-decoration: underline; cursor: pointer; }

.matrix-scroll, .repeater-scroll, .schedule-scroll { overflow-x: auto; padding: 2px; margin: -2px; }
.matrix-table, .repeater-table, .schedule-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .74rem; }
.matrix-table th, .matrix-table td { border-bottom: 1px solid var(--line); padding: 10px 7px; text-align: center; }
.matrix-table thead th { color: var(--muted); font-size: .62rem; font-weight: 750; white-space: nowrap; }
.matrix-table th:first-child { position: sticky; left: 0; z-index: 1; min-width: 180px; background: var(--card); text-align: left; }
.matrix-table tbody th { font-weight: 650; }
.matrix-radio { position: relative; display: inline-grid; place-items: center; width: 26px; height: 26px; cursor: pointer; }
.matrix-radio input { position: absolute; opacity: 0; }
.matrix-radio span { width: 17px; height: 17px; border: 1.5px solid var(--line-dark); border-radius: 50%; background: #fff; }
.matrix-radio input:checked + span { border: 5px solid var(--ink); }

.repeater-empty { margin: 0 0 12px; color: var(--muted); font-size: .75rem; }
.repeater-table { min-width: 720px; }
.repeater-table th { padding: 0 6px 8px; color: var(--muted); font-size: .62rem; text-align: left; }
.repeater-table td { padding: 4px 6px 7px; vertical-align: top; }
.repeater-table th:first-child, .repeater-table td:first-child { padding-left: 0; }
.repeater-table input, .repeater-table select { min-width: 120px; height: 40px; padding: 0 10px; font-size: .72rem; }
.row-remove { width: 36px; height: 36px; margin-top: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.row-remove:hover { border-color: #e3aaa4; color: var(--red); background: var(--red-soft); }
.add-row { min-height: 38px; border: 1px dashed var(--line-dark); border-radius: 9px; padding: 0 13px; background: transparent; color: var(--ink-soft); font-size: .72rem; font-weight: 750; cursor: pointer; }
.add-row:hover { border-style: solid; background: var(--paper); }

.schedule-weeks { display: flex; gap: 8px; margin-bottom: 12px; }
.schedule-week-tab { min-height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .73rem; font-weight: 750; cursor: pointer; }
.schedule-week-tab.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.schedule-table { min-width: 1050px; }
.schedule-table th { padding: 8px 5px; color: var(--muted); font-size: .61rem; text-align: left; white-space: nowrap; }
.schedule-table td { padding: 5px; border-top: 1px solid var(--line); }
.schedule-table td:first-child { position: sticky; left: 0; z-index: 2; min-width: 95px; background: var(--card); font-weight: 750; }
.schedule-table input, .schedule-table select { height: 38px; min-width: 92px; padding: 0 8px; font-size: .68rem; }
.schedule-table .schedule-text { min-width: 145px; }

.step-actions { position: sticky; z-index: 15; bottom: 16px; margin-top: 30px; padding: 11px; border: 1px solid rgba(189,194,180,.75); border-radius: 999px; display: flex; align-items: center; gap: 9px; background: rgba(245,244,238,.91); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.step-actions #save-button { margin-left: auto; }
.step-actions #next-button, .step-actions #submit-button { margin-left: auto; }

.review-card { margin-top: 18px; padding: 25px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.review-card h2 { margin: 0 0 8px; font-size: 1.4rem; }
.review-card > p { margin: 0 0 20px; color: rgba(255,255,255,.58); font-size: .78rem; line-height: 1.55; }
.review-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.review-row { width: 100%; min-height: 48px; padding: 9px 11px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(255,255,255,.035); color: #fff; text-align: left; cursor: pointer; }
.review-row:hover { background: rgba(255,255,255,.075); }
.review-row span { font-size: .72rem; font-weight: 700; }
.review-row small { color: rgba(255,255,255,.46); font-size: .64rem; }
.review-row.is-missing small { color: #ffca93; }
.review-warning { margin-top: 15px; padding: 13px; border-radius: 9px; background: rgba(255,190,100,.12); color: #ffd49b; font-size: .72rem; line-height: 1.5; }
.data-actions { margin-top: 15px; display: flex; align-items: center; gap: 10px; }
.delete-data-link { border: 0; padding: 0; background: none; color: rgba(255,255,255,.45); font-size: .68rem; text-decoration: underline; cursor: pointer; }
.delete-data-link:hover { color: #ffb0a8; }

.safety-banner { position: fixed; z-index: 65; left: 50%; top: 86px; width: min(760px, calc(100% - 32px)); transform: translateX(-50%); padding: 14px 18px; border: 1px solid #e4ba74; border-radius: 13px; display: flex; align-items: flex-start; gap: 15px; background: #fff2d5; box-shadow: var(--shadow); color: #6f4912; }
.safety-banner div { display: flex; flex-direction: column; gap: 3px; font-size: .74rem; line-height: 1.45; }
.safety-banner button { margin-left: auto; border: 0; background: none; color: inherit; font-size: 1.2rem; cursor: pointer; }

.boot-screen { position: fixed; z-index: 100; inset: 0; display: grid; place-content: center; justify-items: center; gap: 17px; background: var(--paper); }
.boot-logo { color: var(--ink); transform: scale(1.35); animation: boot 1.2s ease infinite; }
.boot-screen p { color: var(--muted); font-size: .76rem; }
@keyframes boot { 50% { opacity: .35; transform: scale(1.25); } }

.toast-region { position: fixed; z-index: 90; right: 22px; bottom: 22px; width: min(360px, calc(100% - 44px)); display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast { padding: 13px 15px; border-radius: 11px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: .74rem; line-height: 1.4; animation: toast-in .2s ease; }
.toast.is-error { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.modal { width: min(480px, calc(100% - 28px)); padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); color: var(--ink); box-shadow: 0 30px 100px rgba(0,0,0,.25); }
.modal::backdrop { background: rgba(13,15,12,.62); backdrop-filter: blur(5px); }
.modal h2 { margin: 0 0 11px; font-size: 1.8rem; letter-spacing: -.05em; }
.modal > p:not(.eyebrow) { margin: 0 0 22px; color: var(--muted); font-size: .82rem; line-height: 1.6; }
.modal .button + .button { margin-top: 9px; }
.success-icon { width: 52px; height: 52px; margin-bottom: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--acid); }
.success-icon svg { width: 27px; height: 27px; fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.modal-alert { margin: -7px 0 17px; padding: 12px; border-radius: 9px; background: var(--amber-soft); color: var(--amber); font-size: .72rem; line-height: 1.45; }
.modal--danger input { margin-bottom: 14px; padding-right: 14px; }

.mobile-only { display: none; }

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-story { min-height: 48vh; padding: 32px; }
  .story-copy { padding: 8vh 0 6vh; }
  .story-copy h1 { font-size: clamp(3.2rem, 12vw, 6rem); }
  .login-panel { min-height: 52vh; padding: 55px 28px 34px; }
  .workspace { grid-template-columns: 1fr; }
  .main-content { grid-column: 1; }
  .sidebar { transform: translateX(-102%); transition: transform .23s ease; box-shadow: 20px 0 50px rgba(0,0,0,.12); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; z-index: 30; inset: var(--topbar) 0 0; border: 0; background: rgba(15,18,14,.45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sidebar.is-open + .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .mobile-only { display: inline-flex; }
  .icon-button { width: 40px; height: 40px; border: 0; border-radius: 9px; align-items: center; justify-content: center; background: transparent; cursor: pointer; }
  .icon-button:hover { background: var(--paper-deep); }
  .icon-button svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .mobile-progress { position: fixed; z-index: 25; top: var(--topbar); left: 0; right: 0; height: 54px; padding: 10px 20px 9px; border-bottom: 1px solid var(--line); flex-direction: column; gap: 7px; background: rgba(245,244,238,.96); }
  .mobile-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .66rem; }
  .mobile-progress strong { color: var(--ink); }
  .progress-track { height: 3px; border-radius: 999px; background: var(--line); overflow: hidden; }
  .progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--ink); transition: width .3s; }
  .main-content { padding-top: 87px; }
}

@media (max-width: 700px) {
  :root { --topbar: 66px; --radius: 15px; }
  .topbar { padding: 0 14px; }
  .topbar .brand { font-size: .78rem; }
  .topbar__right { gap: 6px; }
  .save-status { min-width: 0; }
  .save-status span:last-child { display: none; }
  .topbar .button--small { min-height: 36px; padding: 0 11px; font-size: .68rem; }
  .main-content { padding: 83px 15px 28px; }
  .step-heading { margin-bottom: 24px; }
  .step-heading h1 { font-size: 2.15rem; }
  .step-heading p:last-child { font-size: .8rem; }
  .completion-ring { display: none; }
  .questions { gap: 11px; }
  .question-card { padding: 20px 17px; }
  .question-label { font-size: .91rem; }
  .question-head { flex-direction: column-reverse; gap: 8px; }
  .choice-grid, .choice-grid.is-compact { grid-template-columns: 1fr; }
  .choice-card { min-height: 53px; }
  .number-wrap { max-width: none; }
  .matrix-table th:first-child { min-width: 145px; }
  .review-grid { grid-template-columns: 1fr; }
  .step-actions { bottom: 8px; margin: 24px -6px 0; padding: 8px; }
  .step-actions .button { min-height: 44px; padding: 0 15px; font-size: .76rem; }
  .desktop-only { display: none !important; }
  .login-story { min-height: 470px; padding: 25px 22px; }
  .story-copy { padding: 70px 0 45px; }
  .story-copy h1 { font-size: clamp(3.25rem, 17vw, 4.5rem); }
  .story-copy p:last-child { margin-top: 23px; font-size: .9rem; }
  .story-metrics { gap: 19px; justify-content: space-between; }
  .story-metrics strong { font-size: 1.15rem; }
  .story-metrics span { font-size: .58rem; }
  .login-panel { padding: 45px 20px 28px; }
  .login-card h2 { font-size: 2.2rem; }
  .modal { padding: 27px 21px; }
}

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