/* Prayer Times site — one stylesheet for every page.
   Colours follow the app's default "Dawn" theme plus the green of the app icon. */

@font-face { font-family: "Tajawal"; font-weight: 400; font-display: swap; src: url("/assets/fonts/tajawal-regular.woff2") format("woff2"); }
@font-face { font-family: "Tajawal"; font-weight: 500; font-display: swap; src: url("/assets/fonts/tajawal-medium.woff2") format("woff2"); }
@font-face { font-family: "Tajawal"; font-weight: 700; font-display: swap; src: url("/assets/fonts/tajawal-bold.woff2") format("woff2"); }
@font-face { font-family: "Tajawal"; font-weight: 800; font-display: swap; src: url("/assets/fonts/tajawal-extrabold.woff2") format("woff2"); }

:root {
  --bg: #f5f7f9;
  --bg-alt: #eaf1f4;
  --surface: #ffffff;
  --surface-2: #f0f4f7;
  --border: #dbe4ea;
  --ink: #102030;
  --ink-2: #3e5162;
  --ink-3: #5d6f7e;
  --navy: #1b3a5c;
  --teal: #1b6280;
  --teal-soft: #e1f0f4;
  --green: #1b5e20;
  --green-soft: #e8f5e9;
  --dawn: #f2c39a;
  --gold: #a8741f;
  --red: #c62828;
  --night-0: #081424;
  --night-1: #0f2440;
  --night-2: #1b3a5c;
  --on-dark: #eef4f8;
  --on-dark-2: #b9cad8;
  --link: #1b6280;
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --shadow-1: 0 1px 2px rgb(16 32 48 / .06), 0 2px 8px rgb(16 32 48 / .05);
  --shadow-2: 0 4px 12px rgb(16 32 48 / .08), 0 16px 40px rgb(16 32 48 / .10);
  --shadow-3: 0 10px 30px rgb(8 20 36 / .25), 0 40px 80px rgb(8 20 36 / .30);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
  --font: "Tajawal", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1320;
    --bg-alt: #0e1a2b;
    --surface: #122033;
    --surface-2: #17283e;
    --border: #22364f;
    --ink: #e8eff5;
    --ink-2: #b6c5d2;
    --ink-3: #8ea2b3;
    --teal: #8ed0e0;
    --teal-soft: #163a4c;
    --green: #81c784;
    --green-soft: #183320;
    --gold: #e3c27a;
    --red: #ef9a9a;
    --link: #8ed0e0;
    --shadow-1: 0 1px 2px rgb(0 0 0 / .3);
    --shadow-2: 0 8px 30px rgb(0 0 0 / .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body, html[lang="fr"] body { line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--dawn); outline-offset: 3px; border-radius: 6px; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--surface); color: var(--ink); padding: 8px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), backdrop-filter .3s;
}
.site-header.solid, .page-legal .site-header {
  background: rgb(15 36 64 / .88);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 rgb(255 255 255 / .06);
}
.site-header .container { display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.1rem; white-space: nowrap; }
.site-header .brand { min-width: 0; flex: 0 1 auto; }
.brand img { flex: none; }
.brand-name { overflow: hidden; text-overflow: ellipsis; }
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 2px 8px rgb(0 0 0 / .3); }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { color: var(--on-dark-2); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem; transition: color .2s, background-color .2s; }
.nav a:hover { color: #fff; background: rgb(255 255 255 / .08); }
.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.lang-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid rgb(255 255 255 / .2); border-radius: 999px; }
.lang-switch a { color: var(--on-dark-2); text-decoration: none; font-size: .85rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.lang-switch a[aria-current="true"] { background: rgb(255 255 255 / .16); color: #fff; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: .95rem; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.btn-dawn { background: linear-gradient(135deg, #f6d2ad, #e9a879); color: #2a1a0c; box-shadow: 0 4px 14px rgb(233 168 121 / .35); }
.btn-dawn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgb(233 168 121 / .5); }
.menu-btn { display: none; background: transparent; border: 0; color: #fff; padding: 8px; cursor: pointer; border-radius: 10px; }
.menu-btn svg { width: 26px; height: 26px; }

@media (max-width: 960px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px;
    background: rgb(15 36 64 / .97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .25s var(--ease);
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 12px 8px; border-radius: 10px; font-size: 1.05rem; }
  .menu-btn { display: inline-flex; }
  .header-actions { margin-inline-start: auto; }
  .header-actions .btn { display: none; }
}
@media (max-width: 400px) {
  .site-header .container { gap: 10px; }
  .brand { gap: 8px; font-size: 1rem; }
  .brand img { width: 34px; height: 34px; }
  .header-actions { gap: 4px; }
  .lang-switch a { padding: 2px 7px; }
  .menu-btn { padding: 6px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--on-dark);
  padding: calc(var(--header-h) + clamp(32px, 6vw, 72px)) 0 clamp(56px, 8vw, 110px);
  background:
    radial-gradient(1200px 500px at 50% 112%, rgb(242 195 154 / .55), transparent 60%),
    radial-gradient(700px 300px at 15% 100%, rgb(27 98 128 / .45), transparent 70%),
    linear-gradient(180deg, var(--night-0) 0%, var(--night-1) 45%, var(--night-2) 78%, #3c5b73 100%);
}
.stars, .stars::before, .stars::after {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 8% 14%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 38%, #fff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 35% 9%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 48% 26%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 63% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 77% 33%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 91% 8%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 84% 52%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 4% 56%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 56% 47%, #fff 50%, transparent 51%);
}
.stars { opacity: .7; animation: twinkle 6s ease-in-out infinite; }
.stars::before { content: ""; transform: translate(4%, 7%) scale(1.1); opacity: .6; animation: twinkle 9s ease-in-out infinite reverse; }
.stars::after { content: ""; transform: translate(-6%, 3%) scale(.9); opacity: .5; animation: twinkle 12s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .35; } 50% { opacity: .95; } }

.crescent {
  position: absolute; width: 110px; height: 110px; top: calc(var(--header-h) + 28px); inset-inline-end: 7%;
  border-radius: 50%; box-shadow: -22px 10px 0 0 #fbe8c8; transform: rotate(-20deg);
  filter: drop-shadow(0 0 24px rgb(251 232 200 / .45)); opacity: .9;
}
html[dir="rtl"] .crescent { inset-inline-end: auto; inset-inline-start: 7%; }

.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(24px, 5vw, 64px); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--dawn); font-weight: 700; font-size: .95rem; margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
.hero h1 { font-size: clamp(2.4rem, 1.4rem + 4.4vw, 4.2rem); font-weight: 800; line-height: 1.12; margin-bottom: 18px; }
.hero h1 .accent { background: linear-gradient(90deg, #f8dcbc, #e9a879); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: var(--on-dark-2); max-width: 36em; margin-bottom: 28px; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; min-width: 190px; padding: 10px 20px;
  border-radius: 14px; background: #000; color: #fff; text-decoration: none; border: 1px solid rgb(255 255 255 / .22);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.store:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgb(0 0 0 / .35); }
.store svg { width: 28px; height: 28px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.15; }
.store small { font-size: .72rem; opacity: .85; }
.store b { white-space: nowrap; font-size: 1.15rem; font-weight: 700; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }

.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 26px 0 0; padding: 0; list-style: none; color: var(--on-dark-2); font-size: .95rem; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: #9fe0b0; flex: none; }

/* Phone mock-up */
.phone-wrap { position: relative; justify-self: center; width: min(320px, 80vw); }
.phone {
  position: relative; border-radius: 48px; padding: 10px; background: #070b12;
  box-shadow: 0 0 0 2px #2a3442, var(--shadow-3);
}
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; translate: -50% 0; width: 32%; height: 24px; border-radius: 20px; background: #070b12; z-index: 2; }
.phone img { border-radius: 38px; aspect-ratio: 430 / 932; object-fit: cover; width: 100%; background: #1b3a5c; }
.phone.sm { border-radius: 38px; padding: 8px; }
.phone.sm::before { top: 15px; height: 18px; }
.phone.sm img { border-radius: 30px; }

.chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 16px; background: rgb(255 255 255 / .94); color: #102030;
  box-shadow: 0 12px 30px rgb(0 0 0 / .28); font-size: .88rem; line-height: 1.35;
  animation: float 8s ease-in-out infinite;
}
.chip b { display: block; font-size: 1rem; }
.chip .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--green); color: #fff; }
.chip .ico svg { width: 20px; height: 20px; }
.chip-notif { top: 14%; inset-inline-start: -28%; max-width: 250px; }
.chip-notif .ico { background: none; }
.chip-notif .ico img { width: 36px; height: 36px; border-radius: 10px; }
.chip-qibla { bottom: 18%; inset-inline-end: -22%; animation-delay: -3s; animation-duration: 9s; }
.chip-qibla .ico { background: #1b3a5c; }
.chip-next { bottom: 4%; inset-inline-start: -18%; animation-delay: -5s; animation-duration: 7.5s; }
.chip-next .ico { background: var(--red); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: start; }
  .phone-wrap { margin-top: 24px; width: min(270px, 70vw); }
  .chip-notif { inset-inline-start: -20%; top: 8%; }
  .chip-qibla { inset-inline-end: -16%; }
  .chip-next { inset-inline-start: -14%; }
  .crescent { display: none; }
}
@media (max-width: 420px) {
  .store { min-width: 0; flex: 1 1 150px; padding: 10px 14px; }
  .chip { font-size: .78rem; padding: 8px 10px; }
  .chip .ico { width: 30px; height: 30px; }
  .chip-notif { max-width: 200px; }
}

/* ---------- Stats ---------- */
.stats {
  position: relative; z-index: 2; margin-top: -48px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-2);
}
.stat { padding: 22px 12px; text-align: center; }
.stat + .stat { border-inline-start: 1px solid var(--border); }
.stat b { display: block; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); font-weight: 800; color: var(--teal); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-3); font-size: .92rem; }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd) { border-inline-start: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .stat:last-child { grid-column: 1 / -1; }
}

/* ---------- Sections ---------- */
section { padding: clamp(64px, 9vw, 120px) 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: linear-gradient(180deg, var(--night-1), var(--night-2)); color: var(--on-dark); position: relative; overflow: hidden; }
.section-dark .muted, .section-dark .feat p { color: var(--on-dark-2); }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .eyebrow { color: var(--teal); }
.section-dark .section-head .eyebrow { color: var(--dawn); }
.muted { color: var(--ink-2); }

.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(32px, 6vw, 80px); }
.split.flip > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }
.media { display: flex; justify-content: center; gap: 18px; }
.media .phone-wrap { width: min(280px, 72vw); }
.media.pair .phone-wrap { width: min(240px, 42vw); }
.media.pair .phone-wrap:nth-child(2) { margin-top: 48px; }

.feats { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 18px; }
.feat { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.feat .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); }
.section-dark .feat .ico { background: rgb(255 255 255 / .08); color: var(--dawn); }
.feat .ico svg { width: 22px; height: 22px; }
.feat h3 { font-size: 1.05rem; margin: 2px 0 2px; }
.feat p { margin: 0; color: var(--ink-2); font-size: .97rem; }

/* Cards grid */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 24px;
  box-shadow: var(--shadow-1); transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.card .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); margin-bottom: 14px; }
.card .ico svg { width: 22px; height: 22px; }
.card p { color: var(--ink-2); margin: 0; font-size: .97rem; }
.card.wide { grid-column: span 2; }
@media (max-width: 600px) { .card.wide { grid-column: auto; } }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pill { padding: 3px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .85rem; color: var(--ink-2); }
.pill.on { background: var(--green-soft); color: var(--green); border-color: transparent; font-weight: 700; }

/* Books */
.books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
@media (max-width: 600px) { .books { grid-template-columns: 1fr; } }
.book { background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .12); border-radius: var(--r-sm); padding: 14px 16px; }
.book b { display: block; color: #fff; }
.book span { color: var(--on-dark-2); font-size: .88rem; }

/* Themes gallery */
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 2.4vw, 28px); align-items: start; }
.themes figure { margin: 0; text-align: center; }
.themes figure:nth-child(even) { margin-top: 40px; }
.themes figcaption { margin-top: 12px; font-weight: 700; color: var(--ink-2); font-size: .95rem; }
@media (max-width: 760px) {
  .themes { grid-template-columns: repeat(4, 62%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .themes::-webkit-scrollbar { display: none; }
  .themes figure { scroll-snap-align: center; }
  .themes figure:nth-child(even) { margin-top: 0; }
}

/* Language tiles */
.langs { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.lang-tile { min-width: 170px; padding: 18px 24px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); text-align: center; box-shadow: var(--shadow-1); }
.lang-tile b { display: block; font-size: 1.5rem; color: var(--teal); }
.lang-tile span { color: var(--ink-3); font-size: .9rem; }

/* FAQ */
.faq { max-width: 820px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-weight: 700; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--teal-soft); color: var(--teal); font-size: 1.3rem; font-weight: 400; transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); margin: 0 0 18px; }

/* Verse + download */
.verse { text-align: center; padding-bottom: 32px; }
.verse q { quotes: none; display: block; font-size: clamp(1.5rem, 1.1rem + 2vw, 2.4rem); font-weight: 700; color: #f8dcbc; line-height: 1.8; }
.verse cite { display: block; color: var(--on-dark-2); font-style: normal; font-size: .95rem; margin-top: 6px; }
.download {
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
  padding: clamp(24px, 4vw, 40px); border-radius: var(--r-lg); background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .12);
}
.download .app-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 8px 24px rgb(0 0 0 / .35); }
.download h2 { margin-bottom: 6px; }
.download p { color: var(--on-dark-2); margin-bottom: 18px; }
@media (max-width: 760px) { .download { grid-template-columns: 1fr; text-align: center; justify-items: center; } .download .stores { justify-content: center; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--night-0); color: var(--on-dark-2); padding: 56px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--on-dark-2); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .brand { margin-bottom: 12px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / .1); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .88rem; }

/* ---------- Legal pages ---------- */
.legal-hero { background: linear-gradient(180deg, var(--night-1), var(--night-2)); color: var(--on-dark); padding: calc(var(--header-h) + 48px) 0 48px; }
.legal-hero h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); font-weight: 800; margin-bottom: 8px; }
.legal-hero p { color: var(--on-dark-2); margin: 0; }
.legal-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 48px; padding: 48px 0 80px; align-items: start; }
@media (max-width: 900px) { .legal-wrap { grid-template-columns: 1fr; gap: 24px; } }
.toc { position: sticky; top: calc(var(--header-h) + 20px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 18px; font-size: .92rem; }
@media (max-width: 900px) { .toc { position: static; } }
.toc b { display: block; margin-bottom: 8px; }
.toc ol { margin: 0; padding-inline-start: 22px; display: grid; gap: 4px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--teal); text-decoration: underline; }
.legal-wrap > * { min-width: 0; }
.legal { max-width: 760px; overflow-wrap: break-word; }
.legal td { overflow-wrap: anywhere; hyphens: auto; }
.legal h2 { font-size: 1.45rem; margin: 40px 0 12px; scroll-margin-top: calc(var(--header-h) + 16px); }
.legal h2 .n { color: var(--teal); font-variant-numeric: tabular-nums; margin-inline-end: 10px; }
.legal h3 { font-size: 1.1rem; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { padding-inline-start: 22px; }
.legal li { margin-bottom: 6px; }
.glance { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 8px; }
@media (max-width: 600px) { .glance { grid-template-columns: 1fr; } }
.glance div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px 16px; }
.glance b { display: block; color: var(--ink); margin-bottom: 2px; }
.glance span { color: var(--ink-2); font-size: .95rem; }
.table-wrap { overflow-x: auto; }
.legal table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 8px 0 16px; }
.legal th, .legal td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--ink-2); }
.legal th { color: var(--ink); background: var(--surface-2); }
.note { background: var(--teal-soft); border-radius: var(--r-sm); padding: 14px 18px; color: var(--ink); }

/* Support page */
.contact-card { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 22px; box-shadow: var(--shadow-1); }
.contact-card .btn { background: var(--teal); color: #fff; }
@media (prefers-color-scheme: dark) { .contact-card .btn { color: #0a1320; } }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: calc(var(--header-h) + 40px) var(--gutter) 60px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
