/* Numerology & Biorhythms website.
   Four themes mirror the app (src/theme/Colors.ts): light = Aura, midnight = Deep Ocean,
   emerald = Forest, amethyst = Charcoal. Everything colours through the tokens below. */

@font-face { font-family: Manrope; src: url(/fonts/manrope-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Manrope; src: url(/fonts/manrope-600.woff2) format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: Manrope; src: url(/fonts/manrope-800.woff2) format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Noto Serif'; src: url(/fonts/notoserif-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Noto Serif'; src: url(/fonts/notoserif-400i.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root, [data-theme='light'] {
  --bg: #f8f9fe;
  --bg-top: radial-gradient(1200px 600px at 85% -10%, rgba(199, 125, 255, .22), transparent 60%), radial-gradient(900px 500px at 0% 0%, rgba(254, 214, 232, .55), transparent 60%);
  --surface: #ffffff;
  --surface-2: #f3e8ff;
  --surface-3: #faf7ff;
  --text: #1e293b;
  --title: #141b2d;
  --muted: #5d6779;
  --border: #ebe6f5;
  --accent: #7b2cbf;
  --accent-2: #9d4edd;
  --gold: #9a6a00;
  --on-accent: #ffffff;
  --cta: linear-gradient(135deg, #5a189a 0%, #7b2cbf 45%, #9d4edd 100%);
  --on-cta: #ffffff;
  --glow: rgba(157, 78, 221, .28);
  --shadow: 0 1px 2px rgba(30, 41, 59, .04), 0 12px 32px -12px rgba(91, 33, 182, .18);
  --stars: none;
  --bezel: #121521;
  --store-bg: #0f1220;
  --store-fg: #ffffff;
  color-scheme: light;
}
[data-theme='midnight'] {
  --bg: #081c5b;
  --bg-top: linear-gradient(180deg, #1a4cab 0%, #07318d 520px, #081c5b 1100px);
  --surface: rgba(10, 18, 48, .45);
  --surface-2: rgba(138, 201, 255, .14);
  --surface-3: rgba(255, 255, 255, .05);
  --text: #edf3ff;
  --title: #ffffff;
  --muted: rgba(237, 243, 255, .74);
  --border: rgba(138, 201, 255, .22);
  --accent: #8ac9ff;
  --accent-2: #5ab0ff;
  --gold: #f6d06a;
  --on-accent: #070f2b;
  --cta: linear-gradient(135deg, #f9dc85 0%, #f6d06a 50%, #e2b44a 100%);
  --on-cta: #070f2b;
  --glow: rgba(90, 176, 255, .35);
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .55);
  --stars: radial-gradient(1.2px 1.2px at 12% 18%, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 72% 8%, #fff7 50%, transparent 51%), radial-gradient(1.4px 1.4px at 38% 42%, #fff6 50%, transparent 51%), radial-gradient(1px 1px at 88% 34%, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 22% 66%, #fff5 50%, transparent 51%), radial-gradient(1.3px 1.3px at 60% 72%, #fff6 50%, transparent 51%);
  --bezel: #02081c;
  --store-bg: rgba(2, 8, 28, .7);
  --store-fg: #ffffff;
  color-scheme: dark;
}
[data-theme='emerald'] {
  --bg: #173836;
  --bg-top: linear-gradient(180deg, #2e4f4a 0%, #3e6b63 380px, #173836 1000px);
  --surface: #102b2a;
  --surface-2: rgba(230, 199, 90, .14);
  --surface-3: rgba(255, 255, 255, .05);
  --text: #e9f1ee;
  --title: #ffffff;
  --muted: rgba(233, 241, 238, .74);
  --border: rgba(79, 127, 116, .45);
  --accent: #e6c75a;
  --accent-2: #f0d97a;
  --gold: #e6c75a;
  --on-accent: #173836;
  --cta: linear-gradient(135deg, #f0d77a 0%, #e6c75a 50%, #c9a53c 100%);
  --on-cta: #173836;
  --glow: rgba(79, 127, 116, .6);
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .5);
  --stars: none;
  --bezel: #071514;
  --store-bg: rgba(7, 21, 20, .75);
  --store-fg: #ffffff;
  color-scheme: dark;
}
[data-theme='amethyst'] {
  --bg: #1e1b1d;
  --bg-top: linear-gradient(180deg, #3a3336 0%, #2c2528 420px, #1e1b1d 1000px);
  --surface: #2c2528;
  --surface-2: rgba(232, 183, 90, .14);
  --surface-3: rgba(255, 255, 255, .04);
  --text: #f4eee9;
  --title: #ffffff;
  --muted: #c2b7b0;
  --border: #433a3e;
  --accent: #e8b75a;
  --accent-2: #f6d28c;
  --gold: #e8b75a;
  --on-accent: #1e1b1d;
  --cta: linear-gradient(135deg, #f2cb7c 0%, #e8b75a 50%, #cf9a3c 100%);
  --on-cta: #1e1b1d;
  --glow: rgba(232, 183, 90, .35);
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
  --stars: none;
  --bezel: #0d0b0c;
  --store-bg: rgba(13, 11, 12, .75);
  --store-fg: #ffffff;
  color-scheme: dark;
}

/* ── base ── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; font: 400 1.0625rem/1.65 Manrope, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text); background: var(--stars), var(--bg-top), var(--bg); background-repeat: no-repeat;
  background-size: 100% 1400px, 100% 1400px, auto; min-height: 100vh;
  transition: background-color .35s ease, color .35s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { color: var(--title); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-weight: 800; font-size: clamp(2.2rem, 4.6vw + .6rem, 4rem); }
h2 { font-weight: 800; font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem); }
h3 { font-weight: 700; font-size: 1.25rem; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 40px); }
.muted { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); }
[data-theme='midnight'] .card { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: .78rem; color: var(--gold); margin-bottom: 14px; }
.lead { font-size: clamp(1.05rem, .4vw + 1rem, 1.25rem); color: var(--muted); max-width: 60ch; }
.link { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.link svg { width: 18px; height: 18px; }
.link:hover { text-decoration: underline; }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.btn-cta { background: var(--cta); color: var(--on-cta); box-shadow: 0 10px 24px -10px var(--glow); }
.btn-cta:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .92rem; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }
.store { display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 18px 8px 14px; border-radius: 14px; background: var(--store-bg); color: var(--store-fg); text-decoration: none; border: 1px solid rgba(255, 255, 255, .14); transition: transform .2s ease, box-shadow .2s ease; }
.store:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .45); }
.store-ic svg { width: 26px; height: 26px; display: block; }
.store-tx { display: flex; flex-direction: column; line-height: 1.1; }
.store-tx small { font-size: .7rem; opacity: .85; }
.store-tx b { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; }
.store-sm { min-height: 46px; padding: 6px 14px 6px 10px; }
.store-sm .store-tx b { font-size: 1rem; }
.store-lg { min-height: 60px; padding: 10px 24px 10px 18px; }

/* ── header ── */
.site-header { position: sticky; top: 0; z-index: 40; backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.bar { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--title); text-decoration: none; font-weight: 800; letter-spacing: -.01em; }
.logo img { border-radius: 10px; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 10px; }
.nav a:hover { background: var(--surface-2); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.theme-switch { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border); }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform .2s ease; }
.swatch:hover { transform: scale(1.1); }
.swatch[aria-pressed='true'] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.sw-light { background: linear-gradient(135deg, #fef6fa, #e9d5ff 55%, #9d4edd); }
.sw-midnight { background: linear-gradient(135deg, #1a4cab, #081c5b 60%, #f6d06a 61%); }
.sw-emerald { background: linear-gradient(135deg, #3e6b63, #173836 60%, #e6c75a 61%); }
.sw-amethyst { background: linear-gradient(135deg, #3a3336, #1e1b1d 60%, #e8b75a 61%); }
.lang { position: relative; }
.lang summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 700; font-size: .88rem; padding: 8px 10px; border-radius: 10px; min-height: 40px; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { background: var(--surface-2); }
.lang svg { width: 20px; height: 20px; }
.lang ul { position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; min-width: 170px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
[data-theme]:not([data-theme='light']) .lang ul { background: color-mix(in srgb, var(--bg) 92%, #000); }
.lang a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.lang a:hover, .lang a[aria-current] { background: var(--surface-2); color: var(--accent); }
.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; border-radius: 12px; cursor: pointer; }
.menu-btn svg { width: 24px; height: 24px; }

/* ── hero ── */
.hero { padding: clamp(36px, 6vw, 88px) 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 em { font-family: 'Noto Serif', Georgia, serif; font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -.01em; }
[data-theme='light'] .hero h1 em { background: linear-gradient(90deg, #7b2cbf, #c77dff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chips { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.chips li { display: inline-flex; align-items: center; gap: 6px; }
.chips svg, .ticks svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.hero-calc { margin-top: 34px; max-width: 520px; }
.calc-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.hero-visual { position: relative; display: grid; place-items: center; min-height: 560px; }
.orbit { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.orbit i { position: absolute; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent); }
.orbit i:nth-child(1) { width: 340px; height: 340px; }
.orbit i:nth-child(2) { width: 470px; height: 470px; opacity: .7; }
.orbit i:nth-child(3) { width: 600px; height: 600px; opacity: .4; }
.orbit::before { content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 70%); filter: blur(10px); }
@media (prefers-reduced-motion: no-preference) {
  .orbit i:nth-child(odd) { animation: spin 90s linear infinite; }
  .orbit i:nth-child(2) { animation: spin 120s linear infinite reverse; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── phone mockup ── */
.phone { position: relative; width: min(300px, 72vw); aspect-ratio: 1080 / 2340; padding: 9px; border-radius: 46px; background: var(--bezel); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .08) inset, 0 40px 80px -30px rgba(10, 10, 40, .55), 0 0 60px -20px var(--glow); flex: none; }
.phone::after { content: ''; position: absolute; top: 20px; left: 50%; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: #05060a; box-shadow: 0 0 0 2px rgba(255, 255, 255, .05); }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 38px; overflow: hidden; background: var(--bg); }
.phone .shot { width: 100%; height: 100%; object-fit: cover; object-position: top; display: none; }
.phone.is-fixed .shot, [data-theme='light'] .phone .shot[data-t='light'], [data-theme='midnight'] .phone .shot[data-t='midnight'], [data-theme='emerald'] .phone .shot[data-t='emerald'], [data-theme='amethyst'] .phone .shot[data-t='amethyst'] { display: block; }
.phone-hero { width: min(330px, 78vw); position: relative; z-index: 1; }
.phone-sm { width: 200px; border-radius: 34px; padding: 7px; }
.phone-sm .phone-screen { border-radius: 28px; }
.phone-sm::after { top: 15px; width: 10px; height: 10px; margin-left: -5px; }

/* ── calculator ── */
.calc { padding: 20px; display: grid; gap: 14px; }
.calc-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.calc-compact { grid-template-columns: 1fr auto; align-items: end; }
.calc-compact .calc-error, .calc-compact .calc-result { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; font-weight: 700; font-size: .85rem; color: var(--muted); }
.field input { font: inherit; font-weight: 600; color: var(--text); min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface-3); width: 100%; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.calc-error { color: #e05a5a; font-weight: 700; margin: 0; }
[data-theme]:not([data-theme='light']) .calc-error { color: #ff9a9a; }
.calc-result { display: flex; align-items: center; gap: 18px; padding: 14px; border-radius: 18px; background: var(--surface-2); animation: pop .35s ease; }
.calc-num { flex: none; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font: 600 2.1rem/1 'Noto Serif', Georgia, serif; color: var(--accent); background: radial-gradient(circle, var(--surface) 55%, transparent 56%), conic-gradient(from 0deg, var(--accent), var(--gold), var(--accent)); }
.calc-meta { display: grid; gap: 2px; }
.calc-label { font-weight: 700; color: var(--title); }
.calc-master { font-size: .82rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; }
.calc-link { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.calc-link svg { width: 18px; height: 18px; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ── sections ── */
.section { padding: clamp(56px, 8vw, 110px) 0 0; }
.section-title { text-align: center; max-width: 22ch; margin-inline: auto; }
.section-sub { text-align: center; color: var(--muted); max-width: 60ch; margin: 0 auto 40px; font-size: 1.1rem; }
.features { display: grid; gap: clamp(48px, 7vw, 96px); margin-top: 56px; }
.feature { display: grid; grid-template-columns: 1fr auto; gap: clamp(32px, 6vw, 96px); align-items: center; }
.feature.is-rev { grid-template-columns: auto 1fr; }
.feature.is-rev .feature-copy { order: 2; }
.feature-copy { max-width: 520px; justify-self: end; }
.feature.is-rev .feature-copy { justify-self: start; }
.feature-copy h3 { font-size: clamp(1.5rem, 1.4vw + 1rem, 2rem); font-weight: 800; }
.feature-copy p { color: var(--muted); font-size: 1.1rem; }
.feature-ic { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--surface-2); color: var(--accent); margin-bottom: 18px; }
.feature-ic svg { width: 26px; height: 26px; }
.feature .phone { width: min(280px, 70vw); }

.theme-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.theme-card { background: none; border: 0; padding: 14px 10px 12px; border-radius: 28px; cursor: pointer; display: grid; justify-items: center; gap: 14px; transition: background .2s ease, transform .2s ease; }
.theme-card:hover { background: var(--surface-3); transform: translateY(-4px); }
.theme-card[aria-pressed='true'] { background: var(--surface-2); }
.theme-card .phone { width: 100%; max-width: 230px; border-radius: 38px; }
.theme-card .phone-screen { border-radius: 31px; }
.theme-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--title); }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }

.pricing { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; padding: clamp(28px, 4vw, 48px); align-items: center; }
.pricing p { color: var(--muted); font-size: 1.08rem; margin: 0; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-weight: 700; color: var(--title); }
.ticks li { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 14px; background: var(--surface-2); }

.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.lib-card { position: relative; padding: 24px 24px 22px; text-decoration: none; color: var(--text); transition: transform .2s ease, border-color .2s ease; }
.lib-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.lib-card h3 { margin-bottom: 8px; padding-right: 28px; }
.lib-card p { color: var(--muted); margin: 0; font-size: .97rem; }
.lib-card .more { position: absolute; top: 22px; right: 20px; color: var(--accent); }
.lib-card .more svg { width: 22px; height: 22px; }

.faq { display: grid; gap: 12px; margin-top: 32px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 0 22px; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; font-weight: 700; color: var(--title); font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 22px; height: 22px; flex: none; transition: transform .2s ease; color: var(--accent); }
.faq details[open] summary svg { transform: rotate(90deg); }
.faq p { color: var(--muted); padding-bottom: 18px; margin: 0; }

.final-cta { padding-bottom: 20px; }
.final { text-align: center; padding: clamp(36px, 6vw, 72px) 24px; background: var(--surface); position: relative; overflow: hidden; }
.final::before { content: ''; position: absolute; inset: -40% 20% auto; height: 340px; background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none; }
.final > * { position: relative; }
.final p { color: var(--muted); font-size: 1.1rem; }
.final .stores { justify-content: center; }

/* ── content pages ── */
.content { padding: 24px 0 20px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 28px; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: '/'; margin-right: 6px; opacity: .5; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.page-head { max-width: 820px; margin-bottom: 32px; }
.page-head h1 { font-size: clamp(2rem, 3vw + 1rem, 3.1rem); }
.hub-calc { max-width: 820px; margin-bottom: 44px; }
.num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.num-card { display: flex; gap: 16px; padding: 18px; text-decoration: none; color: var(--text); align-items: flex-start; transition: transform .2s ease, border-color .2s ease; }
.num-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.num-big { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font: 600 1.5rem/1 'Noto Serif', Georgia, serif; color: var(--accent); background: var(--surface-2); }
.num-big.is-master { color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }
.num-tx { display: grid; gap: 4px; }
.num-tx b { color: var(--title); }
.num-tx span { color: var(--muted); font-size: .93rem; line-height: 1.5; }
.matrix-wrap { overflow-x: auto; margin: 0 -4px 12px; padding: 4px; }
.matrix { border-collapse: separate; border-spacing: 6px; min-width: 640px; margin-inline: auto; }
.matrix th { font: 600 1.05rem 'Noto Serif', Georgia, serif; color: var(--accent); width: 54px; height: 44px; }
.matrix td a { display: grid; place-items: center; width: 54px; height: 44px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 700; font-size: .85rem; transition: background .15s ease, color .15s ease; }
.matrix td a:hover { background: var(--accent); color: var(--on-accent); }
.lib-section { padding: 26px 28px; margin-bottom: 18px; }
.lib-section h2 a { color: var(--title); text-decoration: none; }
.lib-section h2 a:hover { color: var(--accent); }
.lib-section p { color: var(--muted); }
.num-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.num-chip { min-width: 46px; height: 46px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 14px; background: var(--surface-2); color: var(--accent); text-decoration: none; font: 600 1.05rem 'Noto Serif', Georgia, serif; border: 1px solid transparent; transition: background .15s ease, color .15s ease; }
.num-chip.wide { font: 700 .92rem Manrope, sans-serif; }
.num-chip.is-master { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.num-chip:hover, .num-chip[aria-current] { background: var(--accent); color: var(--on-accent); }

.reading { max-width: 820px; }
.reading-head { display: flex; gap: 28px; align-items: center; margin-bottom: 32px; }
.reading-head h1 { font-size: clamp(2rem, 2.6vw + 1rem, 3rem); margin-bottom: 10px; }
.reading-head .eyebrow { margin-bottom: 8px; }
.medallion { flex: none; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, var(--surface) 58%, transparent 59%), conic-gradient(from 210deg, var(--accent), var(--gold), var(--accent-2), var(--accent)); box-shadow: 0 0 60px -10px var(--glow); }
.medallion span { font: 600 3.4rem/1 'Noto Serif', Georgia, serif; color: var(--accent); }
.medallion.is-master span { color: var(--gold); }
.medallion.pair { display: flex; gap: 6px; justify-content: center; align-items: center; }
.medallion.pair span { font-size: 2.3rem; }
.medallion.pair i { font-style: normal; color: var(--muted); font-weight: 700; }
.toc { padding: 18px 22px; margin-bottom: 28px; }
.toc b { color: var(--title); }
.toc ul { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--surface-2); text-decoration: none; font-weight: 700; font-size: .9rem; }
.prose { font-size: 1.1rem; line-height: 1.75; }
.prose section { margin-bottom: 36px; }
.prose h2 { font-size: 1.6rem; margin-top: 8px; }
.prose h3 { font-size: 1.15rem; margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose p:first-of-type::first-letter { font: 600 3.2em/.85 'Noto Serif', Georgia, serif; float: left; padding: 6px 10px 0 0; color: var(--accent); }
.app-cta { display: flex; gap: 28px; align-items: center; padding: 28px; margin: 40px 0; overflow: hidden; }
.app-cta h2 { font-size: 1.5rem; margin-bottom: 8px; }
.app-cta p { color: var(--muted); font-size: 1rem; margin: 0; }
.app-cta .stores { margin-top: 18px; }
.app-cta .phone { margin: -10px 0 -120px; align-self: flex-start; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 40px 0; }
.pager a { padding: 18px 20px; text-decoration: none; font-weight: 700; color: var(--title); }
.pager a:hover { border-color: var(--accent); }
.pager a[rel='next'] { text-align: right; }
.related { margin: 32px 0; }
.related h2 { font-size: 1.25rem; }
.pair-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.pair-links a { display: inline-flex; align-items: center; gap: 6px; padding: 14px 18px; text-decoration: none; font-weight: 700; }
.pair-links svg { width: 18px; height: 18px; }
.notfound { text-align: center; padding: 120px 0; }

/* ── footer ── */
.site-footer { margin-top: clamp(64px, 8vw, 110px); padding: 56px 0 28px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 85%, #000 0%); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid p { margin-top: 12px; max-width: 34ch; }
.foot-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 14px; }
.foot-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.foot-links a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; display: inline-block; padding: 4px 0; }
.foot-links a:hover { color: var(--accent); }
.foot-bottom { margin-top: 40px; font-size: .88rem; }

/* ── responsive ── */
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; place-items: center; }
  .nav.is-open { display: grid; position: absolute; top: 68px; left: 0; right: 0; margin: 0; padding: 12px 20px 18px; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .nav.is-open a { padding: 12px; font-size: 1.05rem; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 0; padding: 20px 0 10px; }
  .orbit i:nth-child(3) { display: none; }
  .feature, .feature.is-rev { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .feature.is-rev .feature-copy { order: 0; }
  .feature-copy, .feature.is-rev .feature-copy { justify-self: center; }
  .theme-gallery { grid-template-columns: repeat(2, 1fr); }
  .pricing { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .app-cta .phone { display: none; }
}
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .logo span { display: none; }
  .bar { gap: 8px; }
  .theme-switch { gap: 4px; padding: 4px; }
  .swatch { width: 24px; height: 24px; }
  .calc-compact { grid-template-columns: 1fr; }
  .stores { justify-content: flex-start; }
  .reading-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .medallion { width: 96px; height: 96px; }
  .medallion span { font-size: 2.5rem; }
  .medallion.pair span { font-size: 1.7rem; }
  .pager { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .theme-gallery { gap: 10px; }
  .app-cta { padding: 22px; }
}

/* ── reading layout with sticky app panel ── */
.layout { display: grid; grid-template-columns: minmax(0, 820px) 300px; gap: 56px; justify-content: space-between; }
.side { position: sticky; top: 96px; align-self: start; }
.side-card { padding: 22px; display: grid; justify-items: center; text-align: center; gap: 4px; }
.side-card h2 { font-size: 1.2rem; margin: 14px 0 4px; }
.side-card p { color: var(--muted); font-size: .93rem; line-height: 1.55; margin: 0; }
.side-card .stores { justify-content: center; margin-top: 16px; }
.phone-side { width: 170px; border-radius: 30px; padding: 6px; }
.phone-side .phone-screen { border-radius: 25px; }
.phone-side::after { top: 13px; width: 9px; height: 9px; margin-left: -4.5px; }
@media (min-width: 1101px) { .layout .prose .app-cta, .layout > .reading > .app-cta { display: none; } }
@media (max-width: 1100px) { .layout { grid-template-columns: minmax(0, 1fr); } .side { display: none; } }

/* compact header on phones: keep "Get the app" visible */
@media (max-width: 600px) {
  .get-app { min-height: 36px; padding: 0 12px; font-size: .82rem; white-space: nowrap; }
  .lang summary span { display: none; }
  .lang summary { padding: 8px 6px; }
  .swatch { width: 22px; height: 22px; }
  .menu-btn { width: 36px; }
}
@media (max-width: 360px) { .theme-switch { display: none; } }
