/* ==========================================================================
   OracleSanctum design system — custom CSS, no frameworks.
   Light = ivory + ink violet + gold. Dark = deep violet + bright gold.
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #fbf8f3;
  --bg-2: #f4efe6;
  --surface: #ffffff;
  --surface-2: #f8f4ec;
  --ink: #1d1530;
  --ink-2: #5a5170;
  --ink-3: #8a8299;
  --line: rgba(60, 40, 90, .12);
  --line-2: rgba(60, 40, 90, .22);
  --gold: #a76d10;
  --gold-2: #d4941e;
  --gold-3: #f4b942;
  --gold-soft: rgba(212, 148, 30, .12);
  --violet: #6b46c1;
  --violet-soft: rgba(107, 70, 193, .1);
  --magenta: #b43fd6;
  --green: #2f7a4f;
  --green-soft: rgba(47, 122, 79, .12);
  --red: #c53030;
  --red-soft: rgba(197, 48, 48, .1);
  --on-gold: #2a1a06;
  --shadow-1: 0 1px 2px rgba(29, 21, 48, .06), 0 4px 14px rgba(29, 21, 48, .06);
  --shadow-2: 0 18px 48px rgba(29, 21, 48, .16);
  --nav-bg: rgba(251, 248, 243, .86);
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 24px;
  --nav-h: 64px;
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --maxw: 1180px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #120d1f;
  --bg-2: #181128;
  --surface: #1b1430;
  --surface-2: #231a3b;
  --ink: #f3edff;
  --ink-2: #b9aed3;
  --ink-3: #8478a3;
  --line: rgba(222, 204, 255, .13);
  --line-2: rgba(222, 204, 255, .24);
  --gold: #f0b64a;
  --gold-2: #e6a22d;
  --gold-3: #f7c867;
  --gold-soft: rgba(240, 182, 74, .14);
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, .14);
  --magenta: #d86bf0;
  --green: #5bc98a;
  --green-soft: rgba(91, 201, 138, .14);
  --red: #ff7b7b;
  --red-soft: rgba(255, 123, 123, .12);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
  --shadow-2: 0 18px 48px rgba(0, 0, 0, .55);
  --nav-bg: rgba(18, 13, 31, .86);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}
body.no-scroll { overflow: hidden; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.7rem); font-variation-settings: 'opsz' 144; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--gold-3); color: var(--on-gold); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 760px; }
.container--mid { max-width: 960px; }
main#content { flex: 1 0 auto; padding-top: var(--nav-h); }
.section { padding: clamp(44px, 7vw, 96px) 0; }
.section--tight { padding: clamp(28px, 4vw, 52px) 0; }
.section--tint { background: var(--bg-2); border-block: 1px solid var(--line); }
.stack > * + * { margin-top: var(--gap, 1rem); }
.row { display: flex; gap: var(--gap, 12px); align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--center { justify-content: center; }
.grid { display: grid; gap: var(--gap, 18px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.center { text-align: center; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: .875rem; }
.xs { font-size: .78rem; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-2); max-width: 60ch; }
.center .lead { margin-inline: auto; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-2 { margin-bottom: 1rem; }
.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon--fill { fill: currentColor; stroke: none; }
.section-head { max-width: 720px; margin: 0 0 clamp(24px, 4vw, 44px); }
.section-head.center { margin-inline: auto; }
.kicker { font-size: .82rem; font-weight: 600; color: var(--gold); margin-bottom: .6rem; display: inline-flex; gap: .45rem; align-items: center; }

/* ---------- page progress bar (ajax navigation) ---------- */
.navprog { position: fixed; z-index: 120; left: 0; top: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--gold-3), var(--magenta)); transition: width .25s ease, opacity .3s ease; opacity: 0; pointer-events: none; }
.navprog.on { opacity: 1; }

/* ---------- navbar (fixed, hover dropdowns, nested submenus) ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--nav-h); background: var(--nav-bg); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 14px; }
.brand { flex: none; display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; letter-spacing: -.01em; white-space: nowrap; }
.brand span { white-space: nowrap; }
.brand b { font-weight: 600; color: var(--gold-2); }
.brand img { width: 34px; height: 34px; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.brand:hover img { transform: rotate(12deg); }
.icon-btn { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid transparent; background: transparent; display: grid; place-items: center; color: var(--ink); transition: background .15s, border-color .15s; }
.icon-btn:hover { background: var(--gold-soft); border-color: var(--line); }
.icon-btn .icon { width: 22px; height: 22px; }
#menuButton { color: var(--gold); margin-left: -8px; }
.nav__links { display: none; align-items: center; gap: 2px; margin-left: 14px; }
.nav__right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.nav__right .btn { white-space: nowrap; }
.nl { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 10px; font-weight: 500; font-size: .94rem; color: var(--ink); background: none; border: 0; transition: color .15s, background .15s; }
.nl:hover, .has-dd:hover > .nl, .has-dd:focus-within > .nl, .nl.is-active { color: var(--gold); background: var(--gold-soft); }
.nl .icon { width: 1em; height: 1em; opacity: .7; }
.has-dd { position: relative; }
.dd { position: absolute; top: calc(100% + 6px); left: 0; min-width: 270px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-2); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; z-index: 70; }
.dd::before { content: ''; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.dd--right { left: auto; right: 0; }
.has-dd:hover > .dd, .has-dd:focus-within > .dd, .has-dd.open > .dd { opacity: 1; visibility: visible; transform: none; }
.dd-title { padding: 8px 10px 6px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.dd a, .dd button.dd-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 10px; text-align: left; background: none; border: 0; color: var(--ink); transition: background .12s; }
.dd a:hover, .dd button.dd-item:hover { background: var(--gold-soft); }
.dd .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; flex: none; }
.dd .ic .icon { width: 18px; height: 18px; }
.dd strong { display: block; font-weight: 600; font-size: .94rem; line-height: 1.2; }
.dd small { display: block; color: var(--ink-3); font-size: .8rem; line-height: 1.3; }
.dd hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.dd .danger { color: var(--red); }

[data-theme="dark"] .ico-moon, :root:not([data-theme="dark"]) .ico-sun { display: none; }

/* credit pill (top of every page) */
.pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: .86rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.pill .icon { color: var(--gold-2); width: 1.05em; height: 1.05em; }
.pill small { color: var(--ink-3); font-weight: 500; }
.pill--sub { background: linear-gradient(135deg, var(--gold-3), var(--gold-2)); color: var(--on-gold); border-color: transparent; }
.pill--sub .icon { color: var(--on-gold); }
.pill .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }
.pill__part { display: inline-flex; align-items: center; gap: 8px; }
.pillmenu { padding: 14px; min-width: 290px; }
.pillmenu .line { display: flex; justify-content: space-between; gap: 16px; padding: 7px 2px; font-size: .92rem; border-bottom: 1px dashed var(--line); }
.pillmenu .line:last-of-type { border: 0; }
.pillmenu .line b { font-variant-numeric: tabular-nums; }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--gold-2); object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; color: var(--gold); font-size: .9rem; }

/* overlay + side drill (phones/tablets only) */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(20, 12, 36, .45); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.overlay.on { opacity: 1; visibility: visible; }
.drill { position: fixed; inset: 0 auto 0 0; width: min(86vw, 330px); z-index: 90; background: var(--bg); border-right: 1px solid var(--line); box-shadow: var(--shadow-2); transform: translateX(-102%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
.drill.on { transform: none; }
.drill__top { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.drill__who { flex: 1; min-width: 0; font-size: .95rem; }
.drill__who b { display: block; color: var(--gold); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drill__row { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.drill__row b { flex: 0 1 auto; min-width: 0; }
.drill__login { flex: none; white-space: nowrap; }
.drill__stats { padding: 12px 16px; display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.dl { display: flex; align-items: center; gap: 12px; padding: 13px 16px; width: 100%; background: none; border: 0; text-align: left; font-size: .98rem; font-weight: 500; transition: background .12s, color .12s; }
.dl:hover, .dl.is-active { background: var(--gold-soft); color: var(--gold); }
.dl .icon { color: var(--gold); width: 20px; height: 20px; }
.dl .chev { margin-left: auto; transition: transform .25s; color: var(--ink-3); }
.dl[aria-expanded="true"] .chev { transform: rotate(180deg); }
.dl--cta { margin: 10px 16px; width: auto; border-radius: 12px; background: linear-gradient(135deg, var(--gold-3), var(--gold-2)); color: var(--on-gold); font-weight: 700; justify-content: center; }
.dl--cta .icon { color: var(--on-gold); }
.dl--cta:hover { color: var(--on-gold); filter: brightness(1.05); background: linear-gradient(135deg, var(--gold-3), var(--gold-2)); }
.dsub { display: none; margin: 0 0 6px 28px; border-left: 1px solid var(--line-2); }
.dsub.on { display: block; }
.dsub .dl { padding: 10px 14px; font-size: .92rem; }
.drill__sec { padding: 14px 16px 4px; font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.drill__foot { margin-top: auto; padding: 16px; font-size: .8rem; color: var(--ink-3); border-top: 1px solid var(--line); text-align: center; }

@media (min-width: 1024px) {
  #menuButton, .drill, .overlay { display: none; }
  .nav__links { display: flex; }
  .nav__inner { gap: 18px; }
}
@media (max-width: 1023px) {
  .nav .nav__cta { display: none; }
  .nav__right .has-dd.user { display: none; }
}
@media (max-width: 420px) {
  .brand { font-size: 1.25rem; }
  .brand img { width: 28px; height: 28px; }
  .pill small { display: none; }
}
@media (max-width: 560px) {
  .nav .pill small { display: none; }
}
@media (max-width: 380px) {
  .nav__inner { gap: 6px; }
  .nav__right { gap: 4px; }
  .nav .brand { font-size: 1.1rem; gap: 6px; }
  .nav .brand img { width: 24px; height: 24px; }
  .nav .pill { padding: 0 9px; gap: 6px; }
  .nav .pill__part { gap: 5px; }
}

/* ---------- buttons ---------- */
.btn { --b-bg: var(--surface); --b-ink: var(--ink); --b-line: var(--line-2); display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--b-line); background: var(--b-bg); color: var(--b-ink); font-weight: 600; font-size: .96rem; line-height: 1.1; text-align: center; transition: transform .15s, box-shadow .2s, background .15s, filter .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.btn--gold { --b-bg: linear-gradient(135deg, var(--gold-3), var(--gold-2)); --b-ink: var(--on-gold); --b-line: transparent; box-shadow: 0 8px 22px rgba(184, 125, 27, .26); }
.btn--gold:hover { filter: brightness(1.05); box-shadow: 0 12px 28px rgba(184, 125, 27, .34); }
.btn--ink { --b-bg: var(--ink); --b-ink: var(--bg); --b-line: transparent; }
.btn--ghost { --b-bg: transparent; }
.btn--soft { --b-bg: var(--gold-soft); --b-line: transparent; --b-ink: var(--gold); }
.btn--danger { --b-bg: var(--red-soft); --b-line: transparent; --b-ink: var(--red); }
.btn--lg { min-height: 52px; padding: 13px 28px; font-size: 1.02rem; }
.btn--sm { min-height: 36px; padding: 7px 14px; font-size: .86rem; }
.btn--block { width: 100%; }
.btn .icon { width: 1.1em; height: 1.1em; }
.btn.is-busy::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--gold); font-weight: 600; border-bottom: 1px solid transparent; }
.link:hover { border-bottom-color: currentColor; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow-1); }
.card--flat { box-shadow: none; }
.card--pad-s { padding: 16px; }
.card h3:first-child { margin-top: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--gold-soft); color: var(--gold); white-space: nowrap; }
.badge--green { background: var(--green-soft); color: var(--green); }
.badge--violet { background: var(--violet-soft); color: var(--violet); }
.badge--red { background: var(--red-soft); color: var(--red); }
.badge--ink { background: var(--ink); color: var(--bg); }
.badge .icon { width: 1em; height: 1em; }
.note { padding: 12px 14px; border-radius: var(--r-m); background: var(--gold-soft); border: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); display: flex; gap: 10px; align-items: flex-start; }
.note .icon { color: var(--gold); margin-top: 2px; }
.note--green { background: var(--green-soft); }
.note--red { background: var(--red-soft); }
.divider { height: 1px; background: var(--line); border: 0; margin: 1.5rem 0; }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span, .field > label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field small { display: block; margin-top: 5px; color: var(--ink-3); font-size: .8rem; }
.input, select.input, textarea.input { width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 4px var(--gold-soft); }
.input.err { border-color: var(--red); }
.input::placeholder { color: var(--ink-3); }
.field .err-msg { color: var(--red); font-size: .82rem; margin-top: 5px; }
.pwd { position: relative; }
.pwd .input { padding-right: 46px; }
.pwd button { position: absolute; right: 4px; top: 3px; width: 40px; height: 40px; border: 0; background: none; color: var(--ink-3); border-radius: 10px; display: grid; place-items: center; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--gold-2); flex: none; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; padding: 10px 8px; border-radius: 10px; font-weight: 600; font-size: .92rem; transition: background .15s, color .15s, box-shadow .15s; }
.seg small { font-weight: 500; color: var(--ink-3); font-size: .76rem; }
.seg input:checked + span { background: var(--surface); box-shadow: var(--shadow-1); color: var(--gold); }
.seg input:focus-visible + span { outline: 2px solid var(--gold-2); }
.form-msg { min-height: 1.2em; font-size: .9rem; margin-top: 10px; }
.form-msg.err { color: var(--red); } .form-msg.ok { color: var(--green); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-2); font-size: .92rem; display: flex; gap: 10px; align-items: center; animation: toast-in .3s cubic-bezier(.2, .8, .2, 1); }
.toast--err { background: var(--red); color: #fff; }
.toast--ok { background: var(--green); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- modal / bottom sheet ---------- */
.modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; background: rgba(20, 12, 36, .55); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.modal.on { opacity: 1; visibility: visible; }
.modal__panel { width: min(100%, 560px); max-height: min(88vh, 760px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow-2); transform: translateY(16px) scale(.98); transition: transform .28s cubic-bezier(.2, .8, .2, 1); overflow: hidden; }
.modal.on .modal__panel { transform: none; }
.modal__head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; }
.modal__head h3 { margin: 0; flex: 1; font-size: 1.15rem; }
.modal__body { padding: 4px 18px 18px; overflow-y: auto; overscroll-behavior: contain; }
.modal__foot { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
/* Tablets and phones: every modal comes up from the bottom as a sheet, like the saved charts. About 70% of the screen
   (dvh = what you can really see, so it can never be taller than the screen), a grab bar on top, and it scrolls inside.
   "Scroll for more" (.scue, added by static/js/os.js) shows at the bottom edge while there is more to see. */
@media (min-width: 1000px) { .scue { display: none; } }
@media (max-width: 999px) {
  .modal { align-items: end; padding: 0; }
  .modal__panel { width: min(100%, 640px); max-height: 70vh; max-height: 70dvh; border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(20, 12, 36, .3); padding-bottom: env(safe-area-inset-bottom, 0px); transform: translateY(100%); }
  .modal__panel::before { content: ''; flex: none; width: 42px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 9px auto 0; }
  .modal__head { padding-top: 8px; }
  .rd-lm-body { overflow-y: auto; overscroll-behavior: contain; }
  /* a slim scrollbar that stays on screen */
  .modal__body::-webkit-scrollbar, .rd-lm-body::-webkit-scrollbar, .hx-tbs-p::-webkit-scrollbar, .ax-tbs-p::-webkit-scrollbar, .gx-tbs-p::-webkit-scrollbar,
  .hx-drawer-b::-webkit-scrollbar, .ax-drawer-b::-webkit-scrollbar, .gx-drawer-b::-webkit-scrollbar { width: 6px; }
  .modal__body::-webkit-scrollbar-thumb, .rd-lm-body::-webkit-scrollbar-thumb, .hx-tbs-p::-webkit-scrollbar-thumb, .ax-tbs-p::-webkit-scrollbar-thumb, .gx-tbs-p::-webkit-scrollbar-thumb,
  .hx-drawer-b::-webkit-scrollbar-thumb, .ax-drawer-b::-webkit-scrollbar-thumb, .gx-drawer-b::-webkit-scrollbar-thumb { background: var(--gold-2); border-radius: 6px; }
  .scue { display: block; position: sticky; bottom: 0; height: 0; z-index: 3; pointer-events: none; }
  .scue::before { content: ''; position: absolute; left: -16px; right: -16px; bottom: 0; height: 54px; background: linear-gradient(to top, var(--surface), transparent); opacity: 0; transition: opacity .2s; }
  .scue span { position: absolute; left: 50%; bottom: 10px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 15px; border-radius: 999px; background: var(--gold-2); color: var(--on-gold); font: 700 .74rem/1 var(--font-body); white-space: nowrap; box-shadow: 0 6px 18px rgba(20, 12, 36, .28); opacity: 0; transform: translate(-50%, 8px); transition: opacity .2s, transform .2s; }
  .scue i { width: 7px; height: 7px; margin-top: -3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); animation: scueNudge 1.1s ease-in-out infinite; }
  .scue.on::before { opacity: 1; }
  .scue.on span { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes scueNudge { 50% { transform: translateY(3px) rotate(45deg); } }

/* ---------- slot picker (days strip + hours) ---------- */
.tzbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: .85rem; margin-bottom: 12px; }
.tzbar select { flex: 1; min-width: 180px; min-height: 34px; padding: 4px 30px 4px 10px; font-size: .85rem; }
.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; scrollbar-width: thin; margin: 0 -2px; }
.day { flex: none; scroll-snap-align: start; width: 64px; padding: 10px 0 9px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); text-align: center; line-height: 1.2; transition: all .15s; }
.day small { display: block; font-size: .72rem; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.day b { display: block; font-size: 1.25rem; font-family: var(--font-display); }
.day i { display: block; font-style: normal; font-size: .68rem; color: var(--ink-3); }
.day:hover { border-color: var(--gold-2); }
.day.sel { background: linear-gradient(160deg, var(--gold-3), var(--gold-2)); border-color: transparent; color: var(--on-gold); box-shadow: 0 6px 16px rgba(184, 125, 27, .3); }
.day.sel small, .day.sel i { color: var(--on-gold); opacity: .8; }
.day.none { opacity: .4; }
.hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; min-height: 120px; align-content: start; }
.hour { padding: 12px 6px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-variant-numeric: tabular-nums; transition: all .15s; }
.hour:hover { border-color: var(--gold-2); background: var(--gold-soft); }
.hour.sel { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.hour small { display: block; font-size: .68rem; font-weight: 500; opacity: .7; }
.slot-empty { grid-column: 1 / -1; text-align: center; padding: 28px 10px; color: var(--ink-3); }
.skel { background: linear-gradient(90deg, var(--bg-2), var(--surface-2), var(--bg-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; height: 44px; }
@keyframes sk { to { background-position: -200% 0; } }
.picked { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--green-soft); border: 1px solid var(--line); }
.picked .icon { color: var(--green); width: 22px; height: 22px; }
.picked b { display: block; }

/* ---------- payment method chooser ---------- */
.paymethods { display: grid; gap: 10px; }
.pm { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--surface); text-align: left; width: 100%; transition: border-color .15s, box-shadow .15s, transform .15s; }
.pm:hover { border-color: var(--gold-2); transform: translateY(-1px); }
.pm .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--gold-soft); color: var(--gold); }
.pm b { display: block; }
.pm small { color: var(--ink-3); display: block; line-height: 1.35; }
.pm--fast { border-color: var(--gold-2); background: linear-gradient(135deg, var(--gold-soft), transparent); }
.pm--fast .tag { margin-left: auto; }
.pm[disabled] { opacity: .5; pointer-events: none; }
.summary { padding: 14px 16px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 14px; }
.summary .line { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: .94rem; }
.summary .line.total { border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 9px; font-weight: 700; font-size: 1.05rem; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(36px, 6vw, 84px) 0 clamp(40px, 6vw, 80px); }
.hero__grid { display: grid; gap: 36px; align-items: center; }
.hero h1 { margin-bottom: .45em; text-wrap: balance; }
.hero .lead { margin-bottom: 1.6rem; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__meta { display: flex; gap: 18px 26px; flex-wrap: wrap; margin-top: 26px; color: var(--ink-2); font-size: .9rem; }
.hero__meta span { display: inline-flex; gap: 8px; align-items: center; }
.hero__meta .icon { color: var(--gold-2); }
.wheel-wrap { position: relative; width: min(100%, 520px); margin-inline: auto; aspect-ratio: 1; }
.wheel { width: 100%; height: 100%; color: var(--ink); overflow: visible; }
.wheel .ring { fill: none; stroke: var(--gold-2); stroke-opacity: .55; }
.wheel .spoke { stroke: var(--gold-2); stroke-opacity: .35; }
.wheel .glyph { fill: var(--gold); font: 600 15px var(--font-body); text-anchor: middle; dominant-baseline: central; }
.wheel .hnum { fill: var(--ink-3); font: 500 11px var(--font-body); text-anchor: middle; dominant-baseline: central; }
.wheel .planet { fill: var(--surface); stroke: var(--gold-2); stroke-width: 1.5; }
.wheel .pglyph { fill: var(--ink); font: 600 14px var(--font-body); text-anchor: middle; dominant-baseline: central; }
.wheel .asp { stroke: var(--violet); stroke-opacity: .4; stroke-width: 1; fill: none; }
.wheel .zodiac { transform-origin: 260px 260px; animation: wheel-turn 160s linear infinite; }
@keyframes wheel-turn { to { transform: rotate(360deg); } }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.1fr .9fr; } }

/* ---------- door cards ---------- */
.door { display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); transition: transform .2s, border-color .2s, box-shadow .2s; position: relative; overflow: hidden; }
.door:hover { transform: translateY(-3px); border-color: var(--gold-2); box-shadow: var(--shadow-2); }
.door__art { height: 84px; color: var(--gold-2); }
.door__art svg { height: 100%; width: auto; }
.door h3 { font-size: 1.45rem; margin: 0; }
.door p { color: var(--ink-2); margin: 0; flex: 1; }
.door__price { font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); }
.door--feature { background: var(--surface); color: var(--ink); border-color: var(--gold-2); box-shadow: 0 0 0 1px var(--gold-2), var(--shadow-1); }
.door--feature h3, .door--feature .door__price { color: var(--ink); }
.door--feature p { color: var(--ink-2); }
.door--feature .door__art { color: var(--gold-2); }
.door--feature .toollist a { color: var(--ink); }
.door--feature .toollist a:hover { color: var(--gold); }
[data-theme="dark"] .door--feature { background: var(--surface-2); }
.toollist { display: grid; gap: 4px; margin: 4px 0 0; padding: 0; list-style: none; }
.toollist a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; font-weight: 600; font-size: .94rem; transition: background .12s; }
.toollist a:hover { background: var(--gold-soft); color: var(--gold); }
.toollist .icon { color: var(--gold-2); }
.toollist small { margin-left: auto; color: var(--ink-3); font-weight: 500; }

/* ---------- steps / sequence ---------- */
.steps { counter-reset: s; display: grid; gap: 14px; padding: 0; list-style: none; margin: 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.steps li::before { content: counter(s); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--ink); color: var(--bg); font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.steps b { display: block; margin-bottom: 2px; }
.steps span { color: var(--ink-2); font-size: .94rem; }
@media (min-width: 860px) { .steps--row { grid-template-columns: repeat(3, 1fr); } }

/* ---------- pricing ---------- */
.price-card { display: flex; flex-direction: column; gap: 10px; position: relative; }
.price-card .amt { font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; line-height: 1; }
.price-card .amt small { font-size: 1rem; color: var(--ink-3); font-family: var(--font-body); font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 8px; font-size: .94rem; color: var(--ink-2); flex: 1; }
.price-card li { display: flex; gap: 9px; align-items: flex-start; }
.price-card li .icon { color: var(--green); margin-top: 3px; }
.price-card--best { border-color: var(--gold-2); box-shadow: 0 0 0 1px var(--gold-2), var(--shadow-2); }
.price-card .ribbon { position: absolute; top: -12px; left: 22px; }
.mini-bal { display: flex; gap: 14px; flex-wrap: wrap; }
.mini-bal > div { flex: 1; min-width: 120px; padding: 14px 16px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.mini-bal b { font-family: var(--font-display); font-size: 1.7rem; display: block; line-height: 1.1; }
.mini-bal span { color: var(--ink-3); font-size: .82rem; }

/* ---------- reviews ---------- */
.stars { display: inline-flex; gap: 2px; color: var(--gold-2); }
.stars .icon { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.stars .off { opacity: .25; }
.reviews { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.review { padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; animation: toast-in .35s ease; }
.review p { margin: 0; font-size: .98rem; }
.review footer { margin-top: auto; font-size: .84rem; color: var(--ink-3); }
.review footer b { color: var(--ink); display: block; }
.starpick { position: relative; display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.starpick input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.starpick input:focus-visible + label { outline: 2px solid var(--gold-2); outline-offset: 2px; border-radius: 6px; }
.starpick label { cursor: pointer; color: var(--line-2); font-size: 1.9rem; line-height: 1; transition: color .1s, transform .1s; }
.starpick label:hover, .starpick label:hover ~ label, .starpick input:checked ~ label { color: var(--gold-2); }
.starpick label:hover { transform: scale(1.15); }

/* ---------- case studies / blog cards ---------- */
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.pc { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.pc:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--gold-2); }
.pc__img { aspect-ratio: 16 / 9; background: var(--bg-2); object-fit: cover; width: 100%; }
.pc__ph { aspect-ratio: 16 / 9; display: grid; place-items: center; background: linear-gradient(135deg, var(--violet-soft), var(--gold-soft)); color: var(--gold-2); }
.pc__ph svg { width: 64px; height: 64px; }
.pc__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pc__body h3 { margin: 0; font-size: 1.15rem; line-height: 1.25; }
.pc__body p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.pc__meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 8px; font-size: .8rem; color: var(--ink-3); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: .88rem; font-weight: 600; transition: all .15s; }
.chip:hover { border-color: var(--gold-2); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: .9rem; }
.pager .on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- long-form prose (blog, legal, about) ---------- */
.prose { font-size: 1.06rem; line-height: 1.75; color: var(--ink); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 1.8em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.5em; }
.prose a { color: var(--gold); border-bottom: 1px solid var(--line-2); }
.prose a:hover { border-color: currentColor; }
.prose img { border-radius: 16px; margin: 1.4em auto; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--gold-2); color: var(--ink-2); font-family: var(--font-display); font-size: 1.15em; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose pre, .prose code { font-size: .9em; background: var(--bg-2); border-radius: 8px; }
.prose code { padding: .1em .4em; } .prose pre { padding: 14px; overflow-x: auto; }
.legal h2 { font-size: 1.3rem; margin-top: 1.6em; }
.legal .updated { color: var(--ink-3); font-size: .88rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; color: var(--gold-2); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: .7em 0 0; color: var(--ink-2); }

/* ---------- mentorship / program blocks ---------- */
.facts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.fact { padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.fact b { display: block; font-family: var(--font-display); font-size: 1.7rem; line-height: 1.1; }
.fact span { color: var(--ink-3); font-size: .84rem; }
.outline { display: grid; gap: 8px; }
.outline details { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 12px 16px; }
.outline summary { cursor: pointer; font-weight: 600; }
.outline ol { margin: 10px 0 2px; padding-left: 1.2em; color: var(--ink-2); font-size: .94rem; }
.weekcard { border: 1px solid var(--line); border-radius: 20px; padding: 18px; background: var(--surface); display: grid; gap: 12px; }
.weekcard.now { border-color: var(--gold-2); box-shadow: 0 0 0 1px var(--gold-2); }
.sess { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); font-size: .92rem; }
.sess .n { width: 28px; height: 28px; border-radius: 9px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; font-size: .82rem; flex: none; }
.sess.past { opacity: .55; }
.progress { height: 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-3), var(--magenta)); border-radius: inherit; transition: width .6s ease; }

/* ---------- auth ---------- */
.auth { min-height: calc(100vh - var(--nav-h) - 80px); display: grid; place-items: center; padding-block: 36px; }
.auth .card { width: min(100%, 440px); margin-inline: auto; }
.auth h1 { font-size: 2rem; }

/* ---------- dashboards (user + admin) ---------- */
.dash { display: grid; gap: 20px; padding-block: 24px 60px; }
.dash__nav { display: flex; gap: 6px; overflow-x: auto; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; scrollbar-width: none; }
.dash__nav::-webkit-scrollbar { display: none; }
.dash__nav a { flex: none; display: inline-flex; gap: 8px; align-items: center; padding: 9px 14px; border-radius: 12px; font-weight: 600; font-size: .9rem; color: var(--ink-2); transition: background .15s, color .15s; }
.dash__nav a:hover { color: var(--ink); }
.dash__nav a.on { background: var(--surface); color: var(--gold); box-shadow: var(--shadow-1); }
.dash__nav .icon { width: 1.05em; height: 1.05em; }
.dash__top { display: grid; gap: 14px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.stat { padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.stat > span { font-size: .82rem; color: var(--ink-3); font-weight: 600; display: flex; gap: 7px; align-items: center; }
.stat > span .icon { color: var(--gold-2); }
.stat b { font-family: var(--font-display); font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat small { color: var(--ink-3); font-size: .8rem; }
.stat--gold { background: linear-gradient(135deg, var(--gold-3), var(--gold-2)); border-color: transparent; color: var(--on-gold); }
.stat--gold > span, .stat--gold small, .stat--gold > span .icon { color: var(--on-gold); opacity: .85; }
.stat--gold b { color: var(--on-gold); }
.list { display: grid; gap: 10px; }
.li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap; }
.li > .grow { flex: 1; min-width: 180px; }
.li b { display: block; }
.li small { color: var(--ink-3); }
.empty { text-align: center; padding: 44px 16px; color: var(--ink-3); border: 1.5px dashed var(--line-2); border-radius: 20px; }
.empty .icon { width: 36px; height: 36px; color: var(--gold-2); margin: 0 auto 10px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
table.t th { text-align: left; padding: 11px 14px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); background: var(--bg-2); white-space: nowrap; }
table.t td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.bars { display: grid; gap: 8px; }
.barrow { display: grid; grid-template-columns: minmax(80px, 1.2fr) 3fr auto; gap: 10px; align-items: center; font-size: .88rem; }
.barrow .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barrow .track { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.barrow .track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); }
.barrow b { font-variant-numeric: tabular-nums; }
.chart { width: 100%; height: 240px; display: block; }
.chart .grid { stroke: var(--line); }
.chart text { fill: var(--ink-3); font: 500 10px var(--font-body); }
.live { display: inline-flex; gap: 7px; align-items: center; font-size: .85rem; font-weight: 600; }
.live::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 var(--green); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px transparent; } }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: .86rem; }
.tab.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.hoursrow { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.hoursrow .check { font-weight: 600; color: var(--ink); }
.hoursrow select.input { min-height: 40px; padding-block: 6px; }
.hoursrow.off select { opacity: .4; pointer-events: none; }

/* ---------- footer (warm gradient look from the original footer, built on theme tokens so dark mode works) ---------- */
.footer { --f-end: #ede7db; --f-line: rgba(180, 160, 130, .3); margin-top: 60px; padding: 48px 0 24px; background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 50%, var(--f-end) 100%); border-top: 1px solid var(--f-line); }
[data-theme="dark"] .footer { --f-end: var(--surface); --f-line: var(--line); }
.footer__grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 1.7fr repeat(3, 1fr); } }
.footer__grid > :first-child { max-width: 380px; }
.footer .brand { font-size: 1.875rem; gap: 8px; }
.footer .brand img { width: 48px; height: 48px; }
.footer h4 { font-family: var(--font-body); font-size: .875rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--gold); margin: 0 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--f-line); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.footer li a { display: inline-flex; align-items: center; gap: 8px; padding: 3px 0; font-size: .875rem; color: var(--ink-2); transition: color .15s; }
.footer li a::before { content: '▸'; color: var(--gold); transition: transform .2s; }
.footer li a:hover { color: var(--gold); }
.footer li a:hover::before { transform: translateX(4px); }
.footer__contact { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .875rem; color: var(--ink-2); }
.footer__contact .icon { color: var(--gold); }
.footer__contact a { transition: color .15s; }
.footer__contact a:hover { color: var(--gold); }
.footer .social { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0 0 -6px; }
.footer .social a { display: inline-flex; padding: 6px; color: var(--ink-3); transition: color .2s, transform .2s; }
.footer .social .icon { width: 20px; height: 20px; }
.footer .social a:hover { color: var(--brand, var(--gold)); transform: scale(1.1); }
.footer .social .s-youtube { --brand: #ff0000; }
.footer .social .s-telegram { --brand: #0088cc; }
.footer .social .s-facebook { --brand: #1877f2; }
.footer .social .s-tiktok { --brand: #ff0050; }
.footer__legal { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--f-line); display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; font-size: .84rem; color: var(--ink-3); }
.footer__legal p { margin: 0; max-width: 62ch; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.footer__links a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; font-size: .875rem; color: var(--ink-3); transition: color .15s; }
.footer__links .icon { width: 1em; height: 1em; color: var(--gold); }
.footer__links a:hover { color: var(--gold); text-decoration: underline; }
.footer__legal .footer__copy { align-self: stretch; max-width: none; padding-top: 20px; border-top: 1px solid var(--f-line); font-size: .875rem; color: var(--ink-3); }

/* ---------- ajax page swap ---------- */
#content.swap-out { opacity: .55; transition: opacity .12s; }
#content.swap-in { animation: page-in .28s ease both; }
/* fade only: a transform here (kept by "both") made #content the container of every position:fixed bar inside it, so the tools' fixed buttons sat at the bottom of the page until a refresh */
@keyframes page-in { from { opacity: .4; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .wheel .zodiac { animation: none; }
}
@media print { .nav, .footer, .drill, .overlay, .toasts { display: none !important; } main#content { padding-top: 0; } }

/* ---------- reviews: total beside the heading, see-all button, reviews page ---------- */
.rv-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-bottom: .6rem; }
.rv-head .kicker { margin-bottom: 0; }
.rv-total { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--ink); font-size: .88rem; font-weight: 700; white-space: nowrap; }
.rv-total .icon { width: 15px; height: 15px; fill: var(--gold-2); stroke: none; }
.rv-total small { color: var(--ink-2); font-size: inherit; font-weight: 500; }
.rv-more { display: flex; justify-content: center; margin-top: 24px; }
.rv-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.rv-filter a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: .88rem; font-weight: 600; }
.rv-filter a:hover { color: var(--gold); border-color: var(--gold-2); }
.rv-filter a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.rv-pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 28px; font-size: .9rem; color: var(--ink-3); }

/* ---------- home: sample judgement ---------- */
.reading { max-width: 780px; margin: 0 auto; padding: clamp(20px, 4vw, 36px); border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.reading__head { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.reading__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.reading__q { margin: 0; font-family: var(--font-display); font-size: clamp(1.25rem, 3.4vw, 1.7rem); line-height: 1.35; color: var(--ink); }
.reading__answer { margin: 22px 0 4px; padding: 18px 20px; border-radius: 16px; background: var(--gold-soft); border: 1px solid var(--gold-2); }
.reading__label { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.reading__no { margin: 6px 0 8px; font-family: var(--font-display); font-size: clamp(1.2rem, 3.2vw, 1.5rem); line-height: 1.3; color: var(--ink); }
.reading__answer p:last-child { margin: 0; color: var(--ink-2); line-height: 1.65; }
.reading__part { margin-top: 28px; }
.reading__part h3 { margin: 0 0 10px; font-size: 1.12rem; }
.reading__part p { margin: 0 0 12px; color: var(--ink-2); line-height: 1.75; }
.reading__part p:last-child { margin-bottom: 0; }
.reading__part--verdict p { padding-left: 16px; border-left: 3px solid var(--gold-2); color: var(--ink); }
.reading__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

/* ---------- about ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 108px 1fr; gap: 6px 18px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.timeline time { font-family: var(--font-display); font-weight: 600; color: var(--gold); font-size: 1.02rem; line-height: 1.4; }
.timeline b { display: block; margin-bottom: 2px; }
.timeline p { margin: 0; color: var(--ink-2); font-size: .96rem; line-height: 1.65; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; } }
.sources { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-top: 1rem; }
.sources > div { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.sources b { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.sources small { display: block; color: var(--ink-3); margin-bottom: 6px; }
.sources p { margin: 0; font-size: .92rem; color: var(--ink-2); line-height: 1.6; }

/* ---- chart tools: the "judging" pop-up and tap-to-expand reading sections (static/js/osread.js) ---- */
.rd-lm .modal__panel { width: min(100%, 420px); }
.rd-lm-body { padding: 30px 24px 8px; text-align: center; }
.rd-orbit { position: relative; display: inline-block; width: 64px; height: 64px; border-radius: 50%; border: 1px dashed var(--gold-2); animation: rdspin 6s linear infinite; }
.rd-orbit b { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--gold-2); }
.rd-orbit b:nth-child(1) { top: -5px; left: 27px; }
.rd-orbit b:nth-child(2) { bottom: 6px; left: -4px; background: var(--violet); }
.rd-orbit b:nth-child(3) { bottom: 6px; right: -4px; background: var(--green); }
@keyframes rdspin { to { transform: rotate(360deg); } }
.rd-lm-h { margin: 18px 0 2px; font-size: 1.2rem; }
.rd-lm-t { margin: 10px 0 4px; font-weight: 600; min-height: 1.5em; }
.rd-lm-s { margin: 0; font-size: .85rem; color: var(--ink-3); }
.rd-lm-x { margin: 14px 0 0; text-align: left; }
.rd-lm-foot { padding: 12px 18px 18px; text-align: center; }
@media (prefers-reduced-motion: reduce) { .rd-orbit { animation: none; } }

.rd-bar { display: flex; justify-content: flex-end; padding: 10px clamp(18px, 3vw, 28px) 0; }
.rd-all { background: none; border: 0; padding: 4px 0; color: var(--gold); font: inherit; font-size: .85rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rd-head { margin-bottom: 12px; }
.rd-tog { display: flex; align-items: center; gap: .6em; width: 100%; margin: 0; padding: 0; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rd-tog:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 4px; border-radius: 6px; }
.rd-t { display: flex; align-items: center; gap: inherit; flex: 1; min-width: 0; }
.rd-chev { flex: none; width: .5em; height: .5em; margin: 0 4px 0 auto; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s; }
.rd-sec.is-open > .rd-head .rd-chev { transform: rotate(-135deg); }
.rd-sec.is-closed > .rd-body { display: none; }
.rd-sec.is-closed > .rd-head { margin-bottom: 0; }
.rd-next { display: inline-flex; align-items: center; gap: .55em; margin: 14px 0 2px; padding: .5em 1em; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: .9rem; font-weight: 600; text-align: left; cursor: pointer; }
.rd-next::after { content: ''; flex: none; width: .45em; height: .45em; margin-top: -.2em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.rd-next:hover { border-color: var(--gold-2); }
@media print { .rd-sec.is-closed > .rd-body { display: block !important; } .rd-next, .rd-bar, .rd-chev { display: none !important; } .rd-tog { cursor: default; } }
