/* ============================================================
   KAVUM - design tokens (mirrors Flutter app palette)
   ============================================================ */
:root {
  /* surfaces */
  --bg:              #F0F7FF;
  --bg-alt:          #EFF6FF;
  --surface:         #FFFFFF;
  --surface-hi:      #F8FBFF;

  /* ink */
  --ink:             #1E293B;
  --ink-2:           #334155;
  --ink-muted:       #475569;

  /* borders */
  --border:          #CBD5E1;
  --border-soft:     #DBEAFE;

  /* brand */
  --primary:         #1D4ED8;
  --primary-dk:      #1E3A8A;
  --primary-lt:      #3B82F6;
  --primary-bg:      #DBEAFE;
  --primary-bg-hi:   #EFF6FF;
  --on-primary-bg:   #1E3A8A;
  --secondary:       #0891B2;
  --secondary-bg:    #E0F2FE;

  /* status */
  --success:         #059669;
  --success-bg:      #D1FAE5;
  --danger:          #DC2626;

  /* hero gradient */
  --hero-a:          #1E3A8A;
  --hero-b:          #1D4ED8;

  /* glass / translucent components */
  --header-bg:       rgba(255, 255, 255, 0.82);
  --header-border:   var(--border-soft);
  --glass-card-bg:   rgba(255, 255, 255, 0.96);
  --glass-badge-bg:  rgba(255, 255, 255, 0.92);
  --glass-border:    rgba(255, 255, 255, 0.4);

  /* pro card */
  --pro-grad-a:      var(--primary-dk);
  --pro-grad-b:      var(--primary);
  --badge-bg:        #ffffff;
  --badge-color:     var(--primary-dk);
  --badge-shadow:    0 2px 8px rgba(30, 58, 138, 0.12);

  /* alt section */
  --alt-section-bg:  var(--bg-alt);

  /* shadows */
  --shadow-sm:       0 1px 3px rgba(30,58,138,.06), 0 2px 8px rgba(30,58,138,.05);
  --shadow-md:       0 4px 16px rgba(30,58,138,.09), 0 1px 4px rgba(30,58,138,.06);
  --shadow-lg:       0 20px 56px rgba(30,58,138,.16);
  --shadow-hero:     0 32px 80px rgba(30,58,138,.28);
  --shadow-primary:  0 8px 24px rgba(29, 78, 216, 0.28);
  --shadow-step-num: 0 6px 18px rgba(29, 78, 216, 0.28);

  /* geometry */
  --radius-xl:       28px;
  --radius-lg:       20px;
  --radius-md:       14px;
  --radius-sm:       8px;
  --radius-pill:     999px;

  /* typography */
  --font-display:    "Fraunces", Georgia, serif;
  --font-body:       "Plus Jakarta Sans", system-ui, sans-serif;

  /* motion */
  --ease:            cubic-bezier(.4, 0, .2, 1);
}

/* ── DARK (AMOLED + lava orange - mirrors Flutter dark theme) ── */
:root[data-theme="dark"] {
  --bg:              #000000;
  --bg-alt:          #080808;
  --surface:         #0D0D0D;
  --surface-hi:      #141414;

  --ink:             #F8FAFC;
  --ink-2:           #CBD5E1;
  --ink-muted:       #94A3B8;

  --border:          #2A2A2A;
  --border-soft:     #1F1F1F;

  --primary:         #FF4500;
  --primary-dk:      #FF4500;
  --primary-lt:      #FF7043;
  --primary-bg:      #2D0A00;
  --primary-bg-hi:   #1A0800;
  --on-primary-bg:   #FFD0B0;
  --secondary:       #FF7043;
  --secondary-bg:    #1A0800;

  --success:         #34D399;
  --success-bg:      #022C22;

  --hero-a:          #0A0200;
  --hero-b:          #2A0800;

  --header-bg:       rgba(13, 13, 13, 0.88);
  --header-border:   var(--border);
  --glass-card-bg:   rgba(20, 20, 20, 0.96);
  --glass-badge-bg:  rgba(20, 20, 20, 0.92);
  --glass-border:    rgba(255, 255, 255, 0.08);

  --pro-grad-a:      #1A0500;
  --pro-grad-b:      var(--primary);
  --badge-bg:        var(--primary);
  --badge-color:     #ffffff;
  --badge-shadow:    0 4px 12px rgba(255, 69, 0, 0.4);

  --alt-section-bg:  var(--surface);

  --shadow-sm:       0 1px 3px rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.3);
  --shadow-md:       0 4px 16px rgba(0,0,0,.55), 0 1px 4px rgba(0,0,0,.4);
  --shadow-lg:       0 20px 56px rgba(0,0,0,.7);
  --shadow-hero:     0 32px 80px rgba(0,0,0,.8);
  --shadow-primary:  0 8px 24px rgba(255, 69, 0, 0.32);
  --shadow-step-num: 0 6px 18px rgba(255, 69, 0, 0.3);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* smooth theme transitions */
  transition: background-color 240ms var(--ease), color 240ms var(--ease);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }

/* ── LAYOUT WRAPPERS ── */
.wrap,
.page-shell {
  width: min(1160px, 100% - 40px);
  margin-inline: auto;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.02;
  letter-spacing: -.04em;
  color: var(--ink);
}

h1 { font-size: clamp(2.6rem, 5.5vw, 5rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3.4rem); }
h3 { font-size: 1.12rem; font-family: var(--font-body); letter-spacing: -.01em; font-weight: 700; }

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

.eyebrow {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--success);
}
.eyebrow--ink { color: var(--primary); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: .93rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
  white-space: nowrap;
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn--primary:hover { filter: brightness(1.08); }

.btn--white {
  background: #fff;
  color: var(--primary-dk);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.btn--white:hover { background: #f5f9ff; }

.btn--ghost-white {
  background: rgba(255,255,255,.14);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.32);
  backdrop-filter: blur(8px);
}
.btn--ghost-white:hover { background: rgba(255,255,255,.22); }

.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border-soft);
}
.btn--outline:hover { background: var(--primary-bg-hi); }

.btn--sm   { height: 40px; padding: 0 18px; font-size: .85rem; }
.btn--full { width: 100%; }

/* ── THEME TOGGLE ── */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-soft);
  background: var(--surface);
  color: var(--ink-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}
.theme-toggle:hover {
  background: var(--primary-bg-hi);
  color: var(--primary);
  border-color: var(--primary-bg);
}

/* show sun in dark (click → go light), moon in light (click → go dark) */
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 100;
  width: min(1160px, 100% - 40px);
  margin: 16px auto 0;
  padding: 8px 10px 8px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--header-border);
  border-radius: var(--radius-pill);
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  transition: background 240ms var(--ease), border-color 240ms var(--ease);
}

/* legal pages: header sits inside .page-shell */
.page-shell .site-header {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand__icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: var(--shadow-sm);
}

/* theme-adaptive brand icon */
.brand__icon--dark  { display: none; }
.brand__icon--light { display: block; }
:root[data-theme="dark"] .brand__icon--light { display: none; }
:root[data-theme="dark"] .brand__icon--dark  { display: block; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--ink);
}

.site-nav {
  display: flex;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.site-nav a {
  padding: .48rem .82rem;
  border-radius: var(--radius-pill);
  font-size: .87rem;
  font-weight: 600;
  color: var(--ink-muted);
  transition: color 140ms, background 140ms;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--on-primary-bg);
  background: var(--primary-bg-hi);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 100%);
  margin-top: 20px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  transition: background 240ms var(--ease);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,255,255,.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255,255,255,.04) 0%, transparent 50%);
  pointer-events: none;
}

.hero__inner {
  padding: 72px 0 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero__copy .eyebrow { color: rgba(255,255,255,.7); }
.hero__copy h1 { color: #fff; margin-top: .6rem; max-width: 12ch; }
.hero__copy .hero__lede {
  color: rgba(255,255,255,.72);
  margin-top: 1.2rem;
  max-width: 54ch;
  font-size: 1.05rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2rem;
}

.trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.6rem;
}
.trust-pills li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: .42rem .82rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.82);
  font-size: .8rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

/* ── prescription mockup ── */
.hero__visual {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rx-card {
  background: var(--glass-card-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  padding: 20px;
  box-shadow: var(--shadow-hero);
  transition: background 240ms var(--ease);
}

.rx-card__bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: .33rem .72rem;
  border-radius: var(--radius-pill);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .07em;
}
.pill--accent { background: var(--primary-bg); color: var(--on-primary-bg); }
.pill--muted  { background: var(--bg-alt); color: var(--ink-muted); }

.rx-sheet {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg);
  border: 1px solid var(--border-soft);
  transition: background 240ms var(--ease);
}

.rx-sheet__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 12px;
}
.rx-sheet__head img    { width: 40px; }
.rx-sheet__head strong { display: block; font-size: .93rem; color: var(--ink); }
.rx-sheet__head span   { display: block; font-size: .76rem; color: var(--ink-muted); margin-top: 1px; }

.rx-sheet__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border-soft);
  font-size: .86rem;
}
.rx-sheet__row span   { color: var(--ink-muted); }
.rx-sheet__row strong { color: var(--ink); }

.rx-symbol {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 12px;
  line-height: 1;
}

.rx-meds {
  margin: 5px 0 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.rx-meds li {
  font-size: .83rem;
  color: var(--ink-2);
  padding: 5px 0;
  border-bottom: 1px solid var(--border-soft);
}

.rx-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 11px;
  font-size: .81rem;
  color: var(--ink-muted);
}
.rx-sig { color: var(--success); font-weight: 600; }

.hero-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 17px;
  background: var(--glass-badge-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  align-self: flex-start;
  margin-left: 28px;
  transition: background 240ms var(--ease);
}
.hero-badge svg    { color: var(--success); flex-shrink: 0; }
.hero-badge strong { display: block; font-size: .9rem; color: var(--ink); font-weight: 700; }
.hero-badge span   { display: block; font-size: .79rem; color: var(--ink-muted); margin-top: 1px; }

/* ============================================================
   SECTION SHARED
   ============================================================ */
.section { padding: 80px 0; }

.section--alt { position: relative; }
.section--alt::before {
  content: "";
  position: absolute;
  inset: 0 -20px;
  background: var(--alt-section-bg);
  border-radius: 48px;
  z-index: -1;
  transition: background 240ms var(--ease);
}

.section-head {
  margin-bottom: 48px;
  display: grid;
  gap: 12px;
  max-width: 640px;
}
.section-head h2 { line-height: 1.06; }
.section-head__sub {
  font-size: 1.05rem;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* ============================================================
   FEATURE GRID
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), background 240ms var(--ease), border-color 240ms var(--ease);
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

:root[data-theme="dark"] .feature-card { border-color: var(--border); }

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-bg);
  color: var(--on-primary-bg);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  transition: background 240ms var(--ease);
}

.feature-card h3 { margin-bottom: 8px; }
.feature-card p  { font-size: .94rem; }

/* ============================================================
   STEPS / WORKFLOW
   ============================================================ */
.steps { display: grid; gap: 12px; }

.step {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
  align-items: start;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  transition: background 240ms var(--ease), border-color 240ms var(--ease);
}

:root[data-theme="dark"] .step {
  border-color: var(--border);
  background: var(--surface-hi);
}

.step__num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dk), var(--primary));
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-step-num);
  transition: background 240ms var(--ease), box-shadow 240ms var(--ease);
}

.step h3 { margin-bottom: 6px; }
.step p  { font-size: .94rem; }

/* ============================================================
   PRICING
   ============================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.pricing-card {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: background 240ms var(--ease), border-color 240ms var(--ease);
}

:root[data-theme="dark"] .pricing-card { border-color: var(--border); }

.pricing-card--pro {
  background: linear-gradient(160deg, var(--pro-grad-a) 0%, var(--pro-grad-b) 100%);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}

:root[data-theme="dark"] .pricing-card--pro {
  border-color: rgba(255, 69, 0, 0.3);
}

.pricing-card--pro h3,
.pricing-card--pro .price-amount,
.pricing-card--pro .price-period,
.pricing-card--pro .price-billed,
.pricing-card--pro .feat { color: rgba(255,255,255,.9); }
.pricing-card--pro .feat--yes::before { background-color: rgba(255,255,255,.18); }
.pricing-card--pro .feat--no { opacity: .42; }
.pricing-card--pro .pricing-card__head p { color: rgba(255,255,255,.65); }

.pricing-card__badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  padding: .28rem .9rem;
  border-radius: var(--radius-pill);
  background: var(--badge-bg);
  color: var(--badge-color);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: var(--badge-shadow);
  white-space: nowrap;
  transition: background 240ms var(--ease), color 240ms var(--ease);
}

.pricing-card__head h3 {
  font-family: var(--font-body);
  font-size: 1.08rem;
  letter-spacing: 0;
  color: var(--ink);
  margin-bottom: 4px;
}
.pricing-card__head p { font-size: .87rem; }

.pricing-card__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.price-amount {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--ink);
  line-height: 1;
}
.price-period { font-size: .88rem; color: var(--ink-muted); font-weight: 500; }
.price-billed  { font-size: .81rem; color: var(--ink-muted); margin-top: -12px; }

.pricing-card__features {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.feat {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .87rem;
  color: var(--ink-2);
}

.feat::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.feat--yes {
  position: relative;
}
.feat--yes::before {
  background-color: var(--success-bg);
  /* checkmark via clip-path so it respects CSS variable colour */
}
.feat--yes::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 5px;
  height: 9px;
  border-right: 2.2px solid var(--success);
  border-bottom: 2.2px solid var(--success);
  pointer-events: none;
}

.feat--no { opacity: .45; }
.feat--no::before {
  background-color: var(--bg-alt);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23475569' stroke-width='2.2' stroke-linecap='round'%3E%3Cline x1='5' y1='5' x2='15' y2='15'/%3E%3Cline x1='15' y1='5' x2='5' y2='15'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

.pricing-note {
  text-align: center;
  font-size: .83rem;
  color: var(--ink-muted);
  margin-top: 20px;
}

/* ============================================================
   LEGAL LINKS
   ============================================================ */
.legal-link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.legal-link-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 240ms var(--ease), border-color 240ms var(--ease);
}

:root[data-theme="dark"] .legal-link-card { border-color: var(--border); }

.legal-link-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-bg);
  color: var(--primary);
  display: grid;
  place-items: center;
}

.legal-link-card h3 { margin-top: 4px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 700;
  font-size: .9rem;
  margin-top: 4px;
  transition: gap 160ms var(--ease);
}
.text-link::after { content: "→"; }
.text-link:hover  { gap: 10px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 48px;
  padding: 36px 0 48px;
  transition: border-color 240ms var(--ease);
}

:root[data-theme="dark"] .site-footer { border-color: var(--border); }

.site-footer__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.site-footer__brand p {
  margin-top: 10px;
  font-size: .87rem;
  max-width: 38ch;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: flex-end;
  align-items: center;
  padding-top: 6px;
}
.site-footer__links a {
  font-size: .87rem;
  font-weight: 600;
  color: var(--ink-muted);
  transition: color 140ms;
}
.site-footer__links a:hover { color: var(--primary); }

/* ============================================================
   LEGAL PAGES  (privacy.html / terms.html)
   ============================================================ */
.legal-page { padding: 48px 0 80px; }

.legal-hero { padding: 28px 0 32px; }
.legal-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  margin-top: .5rem;
}
.legal-updated {
  margin-top: .9rem;
  color: var(--ink-muted);
  font-weight: 600;
  font-size: .92rem;
}

.legal-card-list { display: grid; gap: 14px; }

.legal-card {
  padding: 24px 28px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  transition: background 240ms var(--ease), border-color 240ms var(--ease);
}

:root[data-theme="dark"] .legal-card { border-color: var(--border); }

.legal-card h2 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: .6rem;
}
.legal-card p { font-size: .94rem; }

.legal-card--notice {
  background: var(--primary-bg-hi);
  border-color: var(--border-soft);
}

:root[data-theme="dark"] .legal-card--notice {
  background: var(--primary-bg);
  border-color: rgba(255, 69, 0, 0.2);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1020px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
  .pricing-card--pro { order: -1; }
}

@media (max-width: 860px) {
  .hero__inner {
    grid-template-columns: 1fr;
    padding: 52px 0 48px;
  }
  .hero__copy h1 { max-width: none; }
  .hero-badge { margin-left: 0; }
  .feature-grid,
  .legal-link-grid { grid-template-columns: 1fr; }
  .pricing-grid { max-width: none; }
}

@media (max-width: 640px) {
  .wrap,
  .page-shell { width: calc(100% - 28px); }

  .site-header {
    width: calc(100% - 20px);
    top: 10px;
    border-radius: var(--radius-xl);
    flex-wrap: wrap;
    gap: 8px;
  }
  .site-nav { display: none; }

  h1 { font-size: clamp(2.2rem, 9vw, 3rem); }
  h2 { font-size: clamp(1.7rem, 7vw, 2.4rem); }

  .hero { border-radius: var(--radius-xl); }
  .hero__inner { padding: 40px 0 36px; }

  .section { padding: 56px 0; }
  .section--alt::before { inset: 0 -14px; border-radius: 32px; }
  .section-head { margin-bottom: 32px; }

  .step { grid-template-columns: 1fr; }

  .site-footer__inner { flex-direction: column; gap: 20px; }
  .site-footer__links { justify-content: flex-start; }

  .pricing-grid { max-width: 100%; }
}
