:root {
  color-scheme: light;
  --bg: #f7f4ef;
  --surface: #fffdf9;
  --surface-strong: #ffffff;
  --ink: #25211b;
  --muted: #6e675d;
  --line: #ded7cb;
  --accent: #9f6b32;
  --accent-strong: #6f461d;
  --teal: #236b68;
  --rose: #a24d55;
  --green: #437453;
  --shadow: 0 18px 60px rgba(46, 35, 21, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.dark {
  color-scheme: dark;
  --bg: #171512;
  --surface: #201d19;
  --surface-strong: #28231d;
  --ink: #f4efe6;
  --muted: #bbb1a2;
  --line: #40382d;
  --accent: #d8a15e;
  --accent-strong: #f0c17d;
  --teal: #7bc5bf;
  --rose: #db8a92;
  --green: #8fc49c;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(159, 107, 50, 0.11), transparent 30rem),
    linear-gradient(180deg, var(--bg), var(--surface));
  color: var(--ink);
  min-width: 320px;
}

body.modal-open {
  overflow: hidden;
}

.metrika-pixel {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--teal), white 18%);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 10px;
  z-index: 60;
  transform: translateY(-140%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
  font-weight: 750;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 25%);
  background: color-mix(in srgb, var(--surface), transparent 8%);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 148px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 800;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.nav {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nav button,
.icon-button,
.ghost,
.primary,
.secondary,
.danger {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
}

.nav button.active {
  background: color-mix(in srgb, var(--accent), transparent 84%);
  border-color: color-mix(in srgb, var(--accent), transparent 58%);
}

.nav button[aria-current="page"] {
  color: var(--accent-strong);
}

.icon-button {
  width: 42px;
  padding: 0;
  border-color: var(--line);
  background: var(--surface);
}

.page {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.hero {
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: clamp(22px, 5vw, 56px);
  padding-bottom: 34px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--accent-strong);
  font-weight: 750;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.06;
  margin: 0;
}

h1 {
  font-size: clamp(42px, 8vw, 86px);
  max-width: 780px;
  overflow-wrap: anywhere;
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
}

h3 {
  font-size: 20px;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

main:focus {
  outline: none;
}

.lead {
  font-size: clamp(17px, 2vw, 21px);
  max-width: 760px;
}

.hero-visual {
  min-height: 520px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--surface), transparent 12%), transparent 52%),
    url("assets/hero-numerology.png") center / cover;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--line), transparent 20%);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.primary,
.secondary,
.ghost,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 750;
}

.primary {
  background: var(--ink);
  color: var(--surface);
}

.secondary {
  background: color-mix(in srgb, var(--accent), transparent 84%);
  border-color: color-mix(in srgb, var(--accent), transparent 48%);
}

.ghost {
  border-color: var(--line);
  background: var(--surface);
}

.danger {
  color: #fff;
  background: #a33b3f;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.card,
.wizard,
.report-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(34, 26, 18, 0.06);
}

.panel,
.wizard,
.report-card {
  padding: clamp(18px, 3vw, 28px);
}

.card {
  padding: 18px;
}

.report-metric {
  display: grid;
  gap: 14px;
}

.reading-lead {
  margin: 0;
  padding: 16px 18px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--teal), transparent 91%);
  color: var(--ink);
  font-size: 17px;
}

.reading-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.reading-block {
  min-width: 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--line), transparent 20%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-strong), transparent 8%);
}

.reading-block h3,
.question-box h3 {
  font-size: 17px;
}

.reading-block p {
  margin-bottom: 0;
}

.question-box {
  padding: 16px 18px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--line), transparent 74%);
}

.example-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent), transparent 91%);
  border: 1px solid color-mix(in srgb, var(--accent), transparent 68%);
}

.example-panel h3 {
  font-size: 17px;
}

.example-panel ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.question-box ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.insight {
  min-width: 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.insight h3 {
  font-size: 17px;
}

.insight p {
  margin-bottom: 0;
}

.personalized-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 190px);
  gap: 18px;
  align-items: start;
}

.personalized-head h3 {
  margin-bottom: 10px;
}

.signature-box {
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--teal), transparent 62%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--teal), transparent 91%);
}

.signature-box span,
.personalized-topline span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.signature-box strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 28px;
  letter-spacing: 0;
}

.personalized-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.personalized-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-strong), transparent 8%);
}

.personalized-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.personalized-topline strong {
  color: var(--accent);
  font-size: 24px;
}

.personalized-card p {
  margin-bottom: 0;
}

.personalized-card .soft-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.stack-gap {
  margin-top: 16px;
}

.metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.metric strong {
  color: var(--ink);
  font-size: 34px;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--muted);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.section-head > * {
  min-width: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.step {
  min-height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line), transparent 20%);
}

.step.active {
  background: var(--accent);
}

.form-row {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

label {
  color: var(--ink);
  font-weight: 720;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  min-height: 46px;
  padding: 10px 12px;
}

[aria-invalid="true"] {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rose), transparent 78%);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.hint,
.error {
  font-size: 13px;
  margin: 0;
}

.error {
  color: var(--rose);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal), transparent 86%);
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--teal), transparent 65%);
  font-weight: 680;
  font-size: 13px;
}

.number-badge {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent), transparent 80%);
  border: 1px solid color-mix(in srgb, var(--accent), transparent 45%);
  color: var(--accent-strong);
  font-size: 42px;
  font-weight: 850;
}

.result-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.trace {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
  background: color-mix(in srgb, var(--line), transparent 70%);
  border-radius: 8px;
  padding: 12px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
}

.report-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
}

.toc {
  position: sticky;
  top: 92px;
  align-self: start;
}

.toc button {
  width: 100%;
  justify-content: flex-start;
  margin: 4px 0;
}

.bars {
  display: grid;
  gap: 9px;
}

.bar {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line), transparent 35%);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: var(--w);
  background: linear-gradient(90deg, var(--teal), var(--accent));
}

.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.operator-table {
  margin-top: 14px;
}

.operator-table td:first-child {
  width: 34%;
  color: var(--muted);
  font-weight: 760;
}

.status {
  font-weight: 760;
  color: var(--green);
}

.notice {
  border-left: 4px solid var(--accent);
  padding: 12px 14px;
  background: color-mix(in srgb, var(--accent), transparent 88%);
  border-radius: 0 8px 8px 0;
}

.product-price {
  color: var(--ink);
  font-size: 28px;
  font-weight: 850;
  margin: 10px 0;
}

.feature-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 14px 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.feature-list li::before {
  content: "✓";
  color: var(--green);
  font-weight: 850;
}

.phone-shell {
  width: min(360px, 100%);
  min-height: 620px;
  margin: 0 auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #111;
  box-shadow: var(--shadow);
}

.phone-screen {
  min-height: 590px;
  border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
}

.bot-bar {
  padding: 14px;
  color: #fff;
  background: #2aabee;
  font-weight: 800;
}

.chat {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--line), transparent 55%);
  color: var(--ink);
}

.bubble.me {
  justify-self: end;
  color: #fff;
  background: var(--teal);
}

.toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: grid;
  gap: 8px;
}

.toast {
  max-width: 330px;
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--surface);
  background: var(--ink);
  box-shadow: var(--shadow);
}

.legal-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface), transparent 5%);
  color: var(--muted);
}

.legal-footer > div,
.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.legal-footer strong {
  color: var(--ink);
}

.legal-footer a,
.doc-text a,
.legal-consent-box a {
  color: var(--accent-strong);
  text-underline-offset: 3px;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.doc-page .section-head {
  align-items: start;
}

.doc-text {
  line-height: 1.65;
}

.doc-text h3 {
  margin-top: 22px;
}

.doc-text h3:first-child {
  margin-top: 0;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.legal-consent-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--teal), transparent 58%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--teal), transparent 92%);
}

.legal-consent-box h3 {
  margin: 0;
  font-size: 18px;
}

.legal-consent-box p {
  margin: 0 0 4px;
}

.checkbox-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.45;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1120px) {
  .topbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .brand {
    flex: 1;
  }

  .nav {
    order: 3;
    justify-content: flex-start;
    width: 100%;
    padding-bottom: 2px;
  }

  .hero,
  .grid.two,
  .grid.three,
  .doc-grid,
  .reading-grid,
  .example-panel,
  .personalized-head,
  .personalized-grid,
  .report-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 320px;
  }

  .toc {
    position: static;
  }
}

@media (max-width: 560px) {
  .topbar {
    gap: 10px;
    padding: 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .nav button,
  .icon-button,
  .ghost,
  .primary,
  .secondary,
  .danger {
    min-height: 44px;
    padding: 0 12px;
  }

  .page {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
  }

  .hero {
    gap: 18px;
    padding-bottom: 14px;
  }

  h1 {
    font-size: clamp(40px, 15vw, 64px);
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head {
    display: grid;
    align-items: start;
  }

  .metric {
    display: grid;
    align-items: start;
  }

  .table,
  .table tbody,
  .table tr,
  .table td,
  .table th {
    display: block;
    width: 100%;
  }

  .table tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .table td,
  .table th {
    padding: 6px 0;
    border-bottom: 0;
  }

  .result-hero {
    grid-template-columns: 1fr;
  }

  .legal-footer {
    display: grid;
  }

  .number-badge {
    width: 78px;
    height: 78px;
    font-size: 34px;
  }
}
