:root {
  color-scheme: light;
  --ink: #111217;
  --muted: #636975;
  --line: #dfe3e9;
  --soft: #f3f5f8;
  --paper: #ffffff;
  --accent: #0071ef;
  --accent-dark: #005fc9;
  --warning: #fff8e7;
  --warning-line: #f1d28b;
  --radius: 20px;
  --shadow: 0 18px 55px rgba(17, 18, 23, 0.1);
}

* { box-sizing: border-box; }

html { background: var(--ink); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Poppins", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 113, 239, 0.08), transparent 26rem),
    #f7f8fa;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  width: min(100%, 1040px);
  margin: 0 auto;
  min-height: 74px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-small {
  width: 92px;
  height: 50px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.tool-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
}

.main {
  width: min(100% - 28px, 960px);
  margin: auto;
  padding: 28px 0 54px;
}

.landing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.68fr);
  background: var(--ink);
  color: white;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(17, 18, 23, 0.24);
}

.landing-copy { padding: clamp(32px, 6vw, 72px); }

.landing-logo-wrap {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px;
  position: relative;
  background:
    linear-gradient(140deg, rgba(0,113,239,.2), transparent 58%),
    #090a0d;
}

.landing-logo-wrap::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 22px;
}

.brand-hero { width: min(100%, 330px); height: auto; position: relative; z-index: 1; }
.brand-mobile { display: none; width: 138px; height: 76px; object-fit: contain; object-position: left center; margin-bottom: 19px; }

.eyebrow {
  margin: 0 0 15px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

.landing h1 {
  max-width: 680px;
  margin-bottom: 12px;
  font-size: clamp(2.35rem, 7vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.product-name {
  margin: 0 0 26px;
  color: rgba(255,255,255,.64);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.lead {
  max-width: 680px;
  color: rgba(255,255,255,.82);
  font-size: 1.04rem;
  line-height: 1.65;
}

.support {
  max-width: 680px;
  margin: 18px 0 22px;
  color: rgba(255,255,255,.65);
  line-height: 1.58;
}

.dimensions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 30px;
}

.dimensions span {
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px;
  color: rgba(255,255,255,.75);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .04em;
}

.btn {
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  padding: 14px 22px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .option:focus-visible, input:focus-visible { outline: 3px solid rgba(0,113,239,.35); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: white; box-shadow: 0 10px 26px rgba(0,113,239,.28); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: white; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn-full { width: 100%; }

.fine-print {
  max-width: 620px;
  margin: 16px 0 0;
  color: rgba(255,255,255,.48);
  font-size: .78rem;
  line-height: 1.55;
}

.progress-wrap {
  width: min(100%, 760px);
  margin: 0 auto 18px;
}

.stage-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.stage-segment { height: 4px; border-radius: 999px; background: #d8dce3; overflow: hidden; }
.stage-segment.active { background: var(--accent); }
.stage-labels { display: flex; justify-content: space-between; margin-top: 9px; color: #8a909b; font-size: .69rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.stage-labels strong { color: var(--ink); font-weight: 700; }

.card {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(24px, 6vw, 48px);
  background: var(--paper);
  border: 1px solid rgba(17,18,23,.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-name {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.question-title {
  margin-bottom: 10px;
  font-size: clamp(1.55rem, 5vw, 2.25rem);
  line-height: 1.17;
  letter-spacing: -.035em;
}

.question-help { color: var(--muted); line-height: 1.6; margin-bottom: 26px; }

.options { display: grid; gap: 11px; }

.option {
  width: 100%;
  min-height: 58px;
  padding: 15px 17px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  line-height: 1.42;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.option:hover { border-color: #aeb6c2; transform: translateY(-1px); }
.option.selected { border-color: var(--accent); background: #eef6ff; }
.option-dot { width: 20px; height: 20px; flex: 0 0 20px; border: 1.5px solid #aeb4be; border-radius: 50%; display: grid; place-items: center; }
.option.selected .option-dot { border-color: var(--accent); }
.option.selected .option-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

.nav-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; }
.back { border: 0; background: transparent; color: var(--muted); padding: 12px 3px; cursor: pointer; font-weight: 600; }
.back:hover { color: var(--ink); }

.number-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field label { display: block; margin-bottom: 8px; font-size: .86rem; color: var(--muted); font-weight: 600; }
.field input {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px 15px;
  color: var(--ink);
  background: white;
}
.checkbox-row { display: flex; align-items: center; gap: 10px; margin-top: 18px; color: var(--muted); cursor: pointer; }
.checkbox-row input { width: 20px; height: 20px; accent-color: var(--accent); }
.error { min-height: 21px; margin: 10px 0 0; color: #b42318; font-size: .83rem; }

.recovery-list { display: grid; gap: 18px; }
.recovery-row { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.recovery-row:last-child { border-bottom: 0; padding-bottom: 0; }
.recovery-label { margin-bottom: 10px; font-weight: 650; }
.recovery-choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.mini-option { min-height: 46px; border: 1px solid var(--line); border-radius: 11px; background: white; padding: 8px; cursor: pointer; font-size: .78rem; color: #4f5560; }
.mini-option.selected { border-color: var(--accent); background: #eef6ff; color: var(--ink); font-weight: 600; }

.processing { text-align: center; padding-block: 62px; }
.processing-mark { width: 58px; height: 58px; margin: 0 auto 26px; border: 4px solid #dce9f8; border-top-color: var(--accent); border-radius: 50%; animation: spin .85s linear infinite; }
.processing p { margin: 0; color: var(--muted); font-size: 1.02rem; }
@keyframes spin { to { transform: rotate(360deg); } }

.result-card { padding-top: 34px; }
.result-brand { width: 180px; height: 96px; object-fit: contain; object-position: left center; margin-bottom: 20px; }
.result-kicker { color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.result-title { font-size: clamp(2rem, 7vw, 3.7rem); line-height: 1.04; letter-spacing: -.052em; margin: 11px 0 13px; }
.result-subtitle { color: var(--accent-dark); font-weight: 700; font-size: 1.05rem; line-height: 1.45; }
.result-section { margin-top: 28px; padding-top: 25px; border-top: 1px solid var(--line); }
.result-section h3 { margin-bottom: 10px; font-size: .83rem; letter-spacing: .08em; text-transform: uppercase; }
.result-section p, .result-section li { color: #4e5561; line-height: 1.65; }
.result-section ul { margin: 0; padding-left: 20px; }
.not-means { padding: 20px; border: 1px solid var(--warning-line); border-radius: 15px; background: var(--warning); }
.not-means h3 { color: #6a4b08; }
.confidence { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid #b7d7fb; border-radius: 999px; background: #eef6ff; font-size: .82rem; font-weight: 700; color: #064f9c; }
.decision { padding: 22px; border-radius: 16px; color: white; background: var(--ink); }
.decision h3 { color: #7db8ff; }
.decision p { color: rgba(255,255,255,.86); margin-bottom: 0; }

.capture, .forja-bridge { margin-top: 30px; padding: 25px; border-radius: 17px; background: var(--soft); }
.capture h3, .forja-bridge h3 { font-size: 1.25rem; margin-bottom: 8px; }
.capture p, .forja-bridge p { color: var(--muted); line-height: 1.55; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 18px; }
.form-grid .btn { grid-column: 1 / -1; }
.form-note { margin: 10px 0 0 !important; font-size: .76rem; }
.success { padding: 13px 15px; margin-top: 14px; background: #eaf8ef; border: 1px solid #b9e3c7; border-radius: 12px; color: #176032; font-size: .86rem; }
.restart { display: block; margin: 24px auto 0; }

@media (max-width: 760px) {
  .topbar { min-height: 64px; padding-inline: 15px; }
  .brand-small { width: 76px; height: 42px; }
  .tool-label { font-size: .67rem; }
  .main { width: min(100% - 20px, 700px); padding-top: 12px; }
  .landing { display: block; border-radius: 22px; }
  .landing-copy { padding: 30px 23px 34px; }
  .landing-logo-wrap { display: none; }
  .brand-mobile { display: block; }
  .landing .eyebrow { display: none; }
  .landing h1 { font-size: clamp(2.45rem, 13vw, 4rem); }
  .stage-labels span { display: none; }
  .stage-labels strong { display: block; }
  .card { padding: 25px 19px; border-radius: 18px; }
  .recovery-choices { grid-template-columns: 1fr 1fr; }
  .number-grid, .form-grid { grid-template-columns: 1fr; }
  .result-brand { width: 150px; height: 82px; }
  .capture, .forja-bridge { padding: 21px 17px; }
}

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