/* ============================================================================
 * Likita — stylesheet
 * Grounded in the Ilerada brand kit: Indigo / Paper / Teal / Amber, with one
 * dedicated emergency clay used ONLY for go-to-hospital states, so red always
 * means exactly one thing. Inter for UI, Source Serif 4 for display moments.
 * No framework, no build step.
 * ========================================================================== */

:root {
  /* Brand */
  --indigo: #2C4A7C;
  --indigo-dark: #1F3457;
  --indigo-soft: #34568E;
  --paper: #F8F7F2;
  --paper-warm: #F2EFE6;
  --teal: #5FB3B1;
  --teal-deep: #3F8F8D;
  --amber: #F2B679;
  --amber-deep: #C8853F;
  --ink: #1A1F2E;
  --ink-soft: #4B5563;
  --rule: rgba(44, 74, 124, 0.12);
  --rule-strong: rgba(44, 74, 124, 0.22);

  /* The one emergency colour — reserved, never decorative */
  --clay: #B23A2E;
  --clay-dark: #8E2C22;
  --clay-tint: #FBEDEA;

  /* Outcome tints */
  --urgent-tint: #FDF3E6;
  --routine-tint: #EAF5F4;
  --selfcare-tint: #ECF3EE;
  --selfcare: #4F9D6B;

  --font-ui: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Source Serif 4', 'Charter', Georgia, serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.05), 0 4px 14px rgba(15,23,42,.05);
  --shadow-md: 0 8px 24px rgba(31,52,87,.10), 0 18px 50px rgba(31,52,87,.07);
  --shadow-lg: 0 24px 70px rgba(20,32,60,.20);

  --ease: cubic-bezier(.2,.7,.2,1);
  --fast: 180ms;
  --mid: 320ms;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 4%, rgba(95,179,177,.10), transparent 30rem),
    radial-gradient(circle at 92% 0%, rgba(242,182,121,.12), transparent 26rem),
    linear-gradient(180deg, #FBFAF6 0%, var(--paper) 45%, var(--paper-warm) 100%);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: 940px; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--indigo); }
button { font-family: inherit; cursor: pointer; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

/* ── Top bar ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(248,247,242,.82);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--rule);
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  color: #fff8ec; flex-shrink: 0;
  background:
    radial-gradient(circle at 32% 22%, rgba(248,201,148,.55), transparent 42%),
    linear-gradient(150deg, var(--indigo), var(--indigo-soft) 60%, var(--indigo-dark));
  box-shadow: 0 8px 22px rgba(44,74,124,.22), inset 0 1px 0 rgba(255,255,255,.18);
}
.brand__mark svg { width: 21px; height: 21px; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; color: var(--indigo); letter-spacing: -.02em; line-height: 1; }
.brand__by { display: block; font-size: .62rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-top: 2px; }

/* Language pills */
.lang { display: inline-flex; gap: 3px; padding: 4px; background: rgba(255,255,255,.6); border: 1px solid var(--rule); border-radius: var(--r-pill); }
.lang__btn {
  border: 0; background: transparent; color: var(--ink-soft);
  font-size: .68rem; font-weight: 800; letter-spacing: .06em;
  padding: .42rem .6rem; border-radius: var(--r-pill); transition: all var(--fast) var(--ease);
}
.lang__btn[aria-pressed="true"] { background: var(--indigo); color: var(--paper); box-shadow: 0 4px 12px rgba(44,74,124,.22); }
.lang__btn:hover:not([aria-pressed="true"]) { color: var(--indigo); }

/* ── Screens ─────────────────────────────────────────────── */
.screen { padding: 2.5rem 0 4rem; animation: rise var(--mid) var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Hero ────────────────────────────────────────────────── */
.hero { padding-top: 3rem; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal-deep);
}
.hero__eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--amber); display: inline-block; }
.hero h1 {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.025em;
  font-size: clamp(2rem, 5.5vw, 3.3rem); line-height: 1.04; color: var(--indigo-dark);
  margin: 1rem 0; max-width: 16ch;
}
.hero__sub { font-size: clamp(1rem, 2.2vw, 1.12rem); color: var(--ink-soft); max-width: 56ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  border: 1px solid transparent; border-radius: var(--r-pill);
  padding: .85rem 1.35rem; font-size: .95rem; font-weight: 600; text-decoration: none;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), background var(--fast) var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--indigo); color: var(--paper); box-shadow: 0 10px 26px rgba(44,74,124,.22); }
.btn--primary:hover { background: var(--indigo-dark); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--indigo); border-color: var(--rule-strong); }
.btn--ghost:hover { background: rgba(44,74,124,.05); border-color: var(--indigo); }
.btn--amber { background: var(--amber); color: var(--indigo-dark); }
.btn--amber:hover { background: #f6c896; transform: translateY(-2px); }

/* trust row under hero */
.trust-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r-md);
  overflow: hidden; margin-top: 2.75rem;
}
.trust-row__cell { background: rgba(255,255,255,.55); padding: 1.1rem 1.25rem; }
.trust-row__cell strong { display: block; font-family: var(--font-display); font-size: 1rem; color: var(--indigo); margin-bottom: .15rem; }
.trust-row__cell span { font-size: .82rem; color: var(--ink-soft); }
@media (max-width: 620px) { .trust-row { grid-template-columns: 1fr; } }

/* ── Chooser grid ────────────────────────────────────────── */
.section-head { margin-bottom: 1.5rem; }
.section-head h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 4vw, 2rem); color: var(--indigo-dark); letter-spacing: -.02em; }
.section-head p { color: var(--ink-soft); margin-top: .35rem; }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: .9rem; }
.choice {
  text-align: left; background: rgba(255,255,255,.7); border: 1px solid var(--rule);
  border-radius: var(--r-md); padding: 1.25rem; display: flex; gap: .9rem; align-items: flex-start;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.choice:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--rule-strong); }
.choice__icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--routine-tint); color: var(--teal-deep);
}
.choice__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.choice__title { font-weight: 700; font-size: 1.02rem; color: var(--indigo-dark); }
.choice__cat { display: inline-block; font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-deep); margin-bottom: .35rem; }
.choice__blurb { font-size: .85rem; color: var(--ink-soft); margin-top: .3rem; line-height: 1.45; }

/* ── Question flow — care path signature ─────────────────── */
.flow { display: grid; grid-template-columns: 56px 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 560px) { .flow { grid-template-columns: 1fr; } .flow__spine { display: none; } }

.flow__spine { position: sticky; top: 92px; display: flex; flex-direction: column; align-items: center; gap: 0; }
.flow__spine-track { width: 4px; flex: 1; background: var(--rule); border-radius: 4px; min-height: 200px; position: relative; overflow: hidden; }
.flow__spine-fill {
  position: absolute; top: 0; left: 0; right: 0; height: var(--progress, 0%);
  background: linear-gradient(180deg, var(--teal), var(--indigo)); border-radius: 4px;
  transition: height var(--mid) var(--ease);
}
.flow__spine-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--indigo); box-shadow: 0 0 0 5px rgba(44,74,124,.12); margin-bottom: 8px; }

.flow__card {
  background: rgba(255,255,255,.78); border: 1px solid var(--rule); border-radius: var(--r-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow-sm); max-width: 640px;
}
.flow__meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.flow__progress-label { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-deep); }
.flow__topic { font-size: .82rem; color: var(--ink-soft); font-weight: 600; }
.flow__q { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 3.4vw, 1.7rem); color: var(--indigo-dark); letter-spacing: -.015em; line-height: 1.2; }
.flow__lead { font-size: .88rem; color: var(--ink-soft); margin: .85rem 0 1.5rem; }
.flow__answers { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 420px) { .flow__answers { grid-template-columns: 1fr; } }
.answer {
  border: 1.5px solid var(--rule-strong); background: #fff; color: var(--indigo-dark);
  border-radius: var(--r-md); padding: 1.1rem; font-size: 1.05rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  transition: all var(--fast) var(--ease);
}
.answer:hover { border-color: var(--indigo); background: var(--routine-tint); transform: translateY(-2px); }
.answer--yes:hover { border-color: var(--amber-deep); background: var(--urgent-tint); }
.flow__back {
  margin-top: 1.5rem; border: 0; background: transparent; color: var(--ink-soft);
  font-size: .88rem; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; padding: .4rem 0;
}
.flow__back:hover { color: var(--indigo); }
.flow__back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ── Result ──────────────────────────────────────────────── */
.result { max-width: 680px; }
.result__banner {
  border-radius: var(--r-lg); padding: clamp(1.5rem, 4vw, 2.25rem); color: #fff;
  box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.result__banner::after {
  content: ''; position: absolute; inset: auto -3rem -3rem auto; width: 12rem; height: 12rem;
  border-radius: 50%; background: rgba(255,255,255,.08);
}
.result__tier { display: inline-flex; align-items: center; gap: .5rem; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .92; }
.result__label { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 4.5vw, 2.3rem); letter-spacing: -.02em; margin: .5rem 0 .75rem; line-height: 1.08; }
.result__lead { font-size: 1.02rem; opacity: .95; max-width: 50ch; }
.result__action { margin-top: 1.1rem; font-weight: 600; font-size: .98rem; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); border-radius: var(--r-md); padding: 1rem 1.15rem; }

.banner--emergency { background: linear-gradient(140deg, var(--clay-dark), var(--clay)); }
.banner--urgent    { background: linear-gradient(140deg, #b9772b, var(--amber-deep)); }
.banner--routine   { background: linear-gradient(140deg, var(--teal-deep), var(--teal)); }
.banner--selfcare  { background: linear-gradient(140deg, #3d7d54, var(--selfcare)); }

.result__nums {
  margin-top: 1rem; border: 1.5px solid var(--clay); background: var(--clay-tint); color: var(--clay-dark);
  border-radius: var(--r-md); padding: 1rem 1.15rem; font-weight: 600; font-size: .92rem;
}
.result__nums strong { display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .35rem; }

.result__block { margin-top: 1.75rem; }
.result__block h3 { font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--indigo); margin-bottom: .8rem; display: flex; align-items: center; gap: .5rem; }
.result__block h3 svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.result__list { list-style: none; display: grid; gap: .6rem; }
.result__list li { position: relative; padding-left: 1.6rem; font-size: .95rem; color: var(--ink); line-height: 1.5; }
.result__list li::before { content: ''; position: absolute; left: .2rem; top: .55em; width: .55rem; height: .55rem; border-radius: 50%; background: var(--teal); }
.result__list--warn li::before { background: var(--clay); }

.result__reading { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.75rem; }
.read-link {
  display: inline-flex; align-items: center; gap: .45rem; text-decoration: none;
  background: rgba(255,255,255,.7); border: 1px solid var(--rule-strong); border-radius: var(--r-pill);
  padding: .55rem 1rem; font-size: .85rem; font-weight: 600; color: var(--indigo);
  transition: all var(--fast) var(--ease);
}
.read-link:hover { background: var(--routine-tint); border-color: var(--indigo); }
.read-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }

.result__again { margin-top: 2rem; display: flex; gap: .75rem; flex-wrap: wrap; }

/* awaiting-review notice */
.review-note {
  margin-top: 1.5rem; border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--amber-deep); background: var(--urgent-tint);
  border-radius: var(--r-md); padding: .9rem 1.1rem; font-size: .82rem; color: var(--ink);
}
.review-note strong { color: var(--amber-deep); }

/* ── Danger panel ────────────────────────────────────────── */
.danger {
  background: linear-gradient(140deg, var(--clay-dark), var(--clay)); color: #fff;
  border-radius: var(--r-lg); padding: clamp(1.5rem, 4vw, 2.25rem); box-shadow: var(--shadow-md);
}
.danger h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 4vw, 1.9rem); margin-bottom: 1.25rem; display: flex; gap: .65rem; align-items: center; }
.danger h2 svg { width: 30px; height: 30px; fill: none; stroke: #ffd9a8; stroke-width: 2; flex-shrink: 0; }
.danger ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .7rem 1.5rem; }
.danger li { position: relative; padding-left: 1.5rem; line-height: 1.45; }
.danger li::before { content: ''; position: absolute; left: 0; top: .5em; width: .6rem; height: .6rem; border-radius: 50%; background: #ffd9a8; box-shadow: 0 0 0 4px rgba(255,217,168,.22); }
.danger__nums { margin-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.22); padding-top: 1.1rem; font-size: .92rem; }
.danger__nums strong { color: #ffd9a8; }

/* ── Disclaimer + privacy ────────────────────────────────── */
.notes { margin-top: 2.5rem; display: grid; gap: 1rem; }
.note {
  display: flex; gap: .8rem; align-items: flex-start;
  background: rgba(255,255,255,.55); border: 1px solid var(--rule);
  border-radius: var(--r-md); padding: 1.1rem 1.25rem;
}
.note svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--teal-deep); stroke-width: 1.8; margin-top: 2px; }
.note strong { display: block; font-size: .9rem; color: var(--indigo-dark); margin-bottom: .2rem; }
.note p { font-size: .85rem; color: var(--ink-soft); }

/* ── Footer ──────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--rule); margin-top: 3.5rem; padding: 2rem 0 3rem; }
.foot__inner { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.foot a { color: var(--indigo); font-weight: 600; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot__note { font-size: .82rem; color: var(--ink-soft); }
.foot__links { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .85rem; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
