/* AstroQuestion: night-sky astrolabe, with a light mode in the colours of the Lilly 2 study (blue-grey paper,
   denim ink) since 25 October 2026, the default since the same day. data-theme="dark" | "light" on <html>, set before paint. */
:root {
  color-scheme: dark;
  --bg0: #060915;
  --bg1: #0b1129;
  --ink: #ece6d6;
  --ink-2: #c9c3b3;
  --muted: #8f98b3;
  --gold: #d9b76e;
  --gold-2: #f2dca2;
  --gold-3: #9c7b3e;
  --line: rgba(var(--acc-rgb), .18);
  --line-2: rgba(var(--ink-rgb), .10);
  --card: rgba(16, 23, 52, .58);
  --card-2: rgba(22, 31, 68, .72);
  --soft: #74a9ff;
  --hard: #ff6b6b;
  --fire: #ff7a59; --earth: #9ccb7a; --air: #f0d36d; --water: #6aa8f0;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --sym: "Noto Sans Symbols", "Noto Sans Symbols 2", "Apple Symbols", "Segoe UI Symbol", "DejaVu Sans", sans-serif;
  --radius: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* colours as r, g, b, so that each use keeps its own opacity */
  --acc-rgb: 217, 183, 110; --ink-rgb: 236, 230, 214; --ink2-rgb: 201, 195, 179; --deep-rgb: 5, 9, 24;
  --hard-rgb: 255, 107, 107; --soft-rgb: 116, 169, 255; --halo-rgb: 8, 12, 30; --halo-hi-rgb: 20, 28, 64; --halo-a: .72; --halo-hi-a: .9;
  --glow-1: rgba(88, 76, 180, .22); --glow-2: rgba(40, 110, 170, .16); --glow-3: rgba(150, 90, 60, .12);
  --h1-grad: linear-gradient(180deg, #fff9ea, #e7d7ad 70%, #c9a95c);
  --cast-bg: linear-gradient(180deg, rgba(26, 35, 76, .78), rgba(14, 20, 46, .78));
  --shadow: rgba(0, 0, 0, .75); --sheen: rgba(255, 255, 255, .05); --card-shadow: 0 0 0 transparent;
  --pop-bg: #0f1634; --drawer-bg: linear-gradient(180deg, rgba(17, 24, 54, .97), rgba(9, 13, 32, .98)); --scrim: rgba(3, 5, 14, .45);
  --btn-grad: linear-gradient(180deg, #f6e2ac, #d9b76e 55%, #b8944c); --btn-sheen: rgba(255, 255, 255, .6); --on-btn: #1b1407;
  --err: #ffb4a8; --warn: #ffcf8a; --retro: #ff9b8f; --bad-ink: #ffb0a6; --blue-ink: #b9d3ff; --good-ink: #a9dc8c;
  --wheel-glow: rgba(217, 183, 110, .16); --seg-op: .17;
  --disk-0: #18224a; --disk-1: #101833; --disk-2: #0a1024; --core-0: #26315f; --core-1: #121a3a; --core-dot: #fff6dc;
  /* the twelve signs, pastel on the night sky */
  --z-aries: #ff9a8f; --z-taurus: #ffb085; --z-gemini: #ffc97a; --z-cancer: #f7e08a; --z-leo: #dbe78a; --z-virgo: #ade59a;
  --z-libra: #8fe3bf; --z-scorpio: #85dfe0; --z-sagittarius: #8fcaf6; --z-capricorn: #a3b4fa; --z-aquarius: #c0aaf7; --z-pisces: #e2a6ef;
  /* the planets keep the colours written in wheel.js */
}

/* Light: the blue-grey paper and denim ink of the Lilly 2 study, with the current design's depth and sheen. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg0: #dfe4e8;
  --bg1: #eef1f3;
  --ink: #15191c;
  --ink-2: #3a4247;
  --muted: #687177;
  --gold: #3a6ea5;
  --gold-2: #2f5d8e;
  --gold-3: #24496f;
  --line: rgba(var(--acc-rgb), .24);
  --line-2: rgba(var(--ink-rgb), .10);
  --card: rgba(255, 255, 255, .62);
  --card-2: rgba(255, 255, 255, .8);
  --soft: #2f6fc0;
  --hard: #c4392a;
  --fire: #c8402c; --earth: #4a8a2c; --air: #b08a08; --water: #2a6fb0;
  --acc-rgb: 58, 110, 165; --ink-rgb: 21, 25, 28; --ink2-rgb: 58, 66, 71; --deep-rgb: 255, 255, 255;
  --hard-rgb: 196, 57, 42; --soft-rgb: 47, 111, 192; --halo-rgb: 255, 255, 255; --halo-hi-rgb: 236, 242, 248; --halo-a: .28; --halo-hi-a: .55; /* light: the discs let the wheel show through (Yves, 26 October 2026) */
  --glow-1: rgba(58, 110, 165, .14); --glow-2: rgba(120, 160, 190, .16); --glow-3: rgba(200, 160, 100, .10);
  --h1-grad: linear-gradient(180deg, #1f2b38, #2f5d8e 85%, #3a6ea5);
  --cast-bg: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(243, 246, 248, .78));
  --shadow: rgba(30, 45, 60, .28); --sheen: rgba(255, 255, 255, .9); --card-shadow: 0 18px 40px -28px rgba(30, 45, 60, .35);
  --pop-bg: #f7f9fa; --drawer-bg: linear-gradient(180deg, rgba(246, 248, 250, .98), rgba(234, 239, 242, .99)); --scrim: rgba(21, 25, 28, .3);
  --btn-grad: linear-gradient(180deg, #7aa7d6, #3a6ea5 55%, #2c5a8a); --btn-sheen: rgba(255, 255, 255, .45); --on-btn: #fff;
  --err: #b3261e; --warn: #9a5b00; --retro: #c4392a; --bad-ink: #a8321c; --blue-ink: #2f5d8e; --good-ink: #2f7a3d;
  --wheel-glow: rgba(58, 110, 165, .14); --seg-op: .13;
  --disk-0: #ffffff; --disk-1: #f4f6f8; --disk-2: #e6ebef; --core-0: #dbe5ee; --core-1: #f1f4f6; --core-dot: #ffffff;
  /* the twelve signs, in deeper hues that hold on paper */
  --z-aries: #c8322a; --z-taurus: #cf5a1e; --z-gemini: #cc7d10; --z-cancer: #b39009; --z-leo: #8a960d; --z-virgo: #4d952a;
  --z-libra: #1b8f63; --z-scorpio: #128a8a; --z-sagittarius: #1f7ab3; --z-capricorn: #3460b8; --z-aquarius: #5a4fb5; --z-pisces: #8c3ea4;
  /* the planets, as pigments (Lilly 2) */
  --p-sun: #d27515; --p-moon: #7a8894; --p-mercury: #958610; --p-venus: #12877d; --p-mars: #c4392a;
  --p-jupiter: #5a4bbd; --p-saturn: #4c5359; --p-uranus: #3d877b; --p-neptune: #4c71a5; --p-pluto: #885c7c;
  --p-north-node: #7a6a96; --p-fortune: #a8801a;
}
:root[data-theme="light"] #sky { display: none; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  background:
    radial-gradient(1200px 700px at 78% -10%, var(--glow-1), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, var(--glow-2), transparent 60%),
    radial-gradient(800px 800px at 60% 110%, var(--glow-3), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg0) 70%);
  background-attachment: fixed;
  overflow-x: hidden;
}
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.page { position: relative; z-index: 1; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sym { font-family: var(--sym); font-variant-emoji: text; }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar */
.top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1280px; margin: 0 auto; padding: 22px 28px 0;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none !important; }
.brand img, .brand svg { width: 38px; height: 38px; display: block; }
.brand-text { display: flex; flex-direction: column; gap: 6px; }
.brand .name { font: 600 25px/1 var(--serif); letter-spacing: .01em; }
.brand .tagline { font: italic 500 15.5px/1 var(--serif); letter-spacing: .01em; background: var(--h1-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand b { font-weight: 600; color: var(--gold); }
.top-right { display: flex; align-items: center; gap: 18px; }
.view-ctl { width: 232px; }
.view-ctl button { padding: 8px 8px; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0;
  color: var(--gold-2); background: rgba(var(--deep-rgb), .4); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--sheen); transition: background .2s, border-color .2s, box-shadow .2s;
}
.theme-toggle:hover { border-color: rgba(var(--acc-rgb), .55); box-shadow: 0 0 18px -4px rgba(var(--acc-rgb), .55), inset 0 1px 0 var(--sheen); }
.theme-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .to-dark { display: none; }
:root[data-theme="light"] .theme-toggle .to-dark { display: block; }
:root[data-theme="light"] .theme-toggle .to-light { display: none; }

/* ---------- hero */
.hero {
  max-width: 1280px; margin: 0 auto; padding: 28px 28px 10px;
  display: grid; grid-template-columns: minmax(330px, 430px) 1fr; gap: 44px; align-items: stretch;
}

/* ---------- form card */
/* the left panel: the question, or the judgement beside the wheel (Yves, 25 October 2026) */
.panel { display: flex; flex-direction: column; min-width: 0; }
.panel-card {
  flex: 1; display: flex; flex-direction: column;
  position: relative;
  background: var(--cast-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: 0 30px 80px -30px var(--shadow), inset 0 1px 0 var(--sheen);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.cast { flex: 1; display: flex; flex-direction: column; }
.cast-foot { margin-top: auto; padding-top: 4px; }
.panel[data-view="judgement"] .cast, .panel[data-view="question"] .judgement-view { display: none; }
.judgement-view h2 { margin: 0 0 14px; font: 600 26px/1.1 var(--serif); color: var(--gold-2); }
.judgement-view .verdict { font-size: 18.5px; }
.judgement-view .verdict .lead { font-size: 23px; }
.judgement-view .locked { grid-template-columns: auto 1fr; }
.judgement-view .locked .btn-ghost { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 1081px) {
  /* beside the wheel: the panel keeps the wheel's height and the judgement scrolls inside it */
  .judgement-view { position: absolute; inset: 0; overflow-y: auto; padding: 22px 24px 24px; -webkit-overflow-scrolling: touch; }
  /* the question box takes some of the height the wheel gives the panel */
  .q-field { flex: 1 1 auto; display: flex; flex-direction: column; max-height: 230px; }
  .q-field textarea { flex: 1; }
}
.field { margin-bottom: 16px; }
.field > label, .label { display: block; margin-bottom: 7px; font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
input, textarea, select {
  width: 100%; font: inherit; color: var(--ink);
  background: rgba(var(--deep-rgb), .55);
  border: 1px solid rgba(var(--ink-rgb), .14);
  border-radius: 11px; padding: 11px 13px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea { resize: vertical; min-height: 64px; font: 400 19px/1.35 var(--serif); }
input::placeholder, textarea::placeholder { color: rgba(var(--ink2-rgb), .45); }
input:focus, textarea:focus, select:focus { border-color: rgba(var(--acc-rgb), .6); box-shadow: 0 0 0 4px rgba(var(--acc-rgb), .12); background: rgba(var(--deep-rgb), .75); }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.place-wrap { position: relative; }
.place-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; margin: 0; padding: 6px; list-style: none;
  background: var(--pop-bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 60px -20px var(--shadow);
  max-height: 310px; overflow: auto;
}
.place-list li { padding: 9px 11px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.place-list li small { color: var(--muted); white-space: nowrap; }
.place-list li[aria-selected="true"], .place-list li:hover { background: rgba(var(--acc-rgb), .12); }
.place-meta { margin-top: 7px; font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.linkish { background: none; border: 0; padding: 0; color: var(--gold-2); font: inherit; cursor: pointer; }
.linkish:hover { text-decoration: underline; text-underline-offset: 3px; }

.seg-ctl { display: grid; grid-template-columns: 1fr 1fr; background: rgba(var(--deep-rgb), .55); border: 1px solid rgba(var(--ink-rgb), .12); border-radius: 12px; padding: 4px; }
.seg-ctl button { border: 0; background: none; color: var(--ink-2); font: 500 13.5px var(--sans); padding: 9px 8px; border-radius: 9px; cursor: pointer; transition: background .25s, color .25s; }
.seg-ctl button[aria-pressed="true"] { background: linear-gradient(180deg, rgba(var(--acc-rgb), .28), rgba(var(--acc-rgb), .14)); color: var(--gold-2); box-shadow: inset 0 0 0 1px rgba(var(--acc-rgb), .35); }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.row2 > div { min-width: 0; }
/* Safari (iPad, iPhone) draws date and time fields at their own native width, wider than the column */
input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; min-height: calc(1.4em + 24px); text-align: left; }
input::-webkit-date-and-time-value { text-align: left; margin: 0; }
.when-custom[hidden] { display: none; }
details.more { margin: 2px 0 16px; border-top: 1px solid var(--line-2); padding-top: 12px; }
details.more summary { cursor: pointer; list-style: none; color: var(--ink-2); font-size: 13px; letter-spacing: .04em; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+"; display: inline-block; width: 18px; color: var(--gold); }
details.more[open] summary::before { content: "\2212"; }
details.more .inner { padding-top: 14px; display: grid; gap: 12px; }
.mini-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; display: block; }

.btn-cast {
  width: 100%; border: 0; border-radius: 13px; padding: 15px 18px; cursor: pointer;
  font: 600 15px var(--sans); letter-spacing: .06em; color: var(--on-btn);
  background: var(--btn-grad);
  box-shadow: 0 14px 34px -12px rgba(var(--acc-rgb), .55), inset 0 1px 0 var(--btn-sheen);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .15s var(--ease), box-shadow .2s, filter .2s;
}
.btn-cast:hover { filter: brightness(1.05); box-shadow: 0 18px 44px -12px rgba(var(--acc-rgb), .7), inset 0 1px 0 var(--btn-sheen); }
.btn-cast:active { transform: translateY(1px) scale(.995); }
.btn-cast[disabled] { opacity: .7; cursor: progress; }
.btn-cast .spark { font-family: var(--sym); font-size: 17px; }
.example { margin-top: 13px; text-align: center; font-size: 13px; color: var(--muted); }
.error { margin: 12px 0 0; color: var(--err); font-size: 13.5px; }
.error:empty { display: none; }

/* ---------- stage and wheel */
.stage { position: relative; min-width: 0; }
.wheel-box { position: relative; width: min(100%, 760px); margin: 0 auto; aspect-ratio: 1; }
.wheel-box::before {
  content: ""; position: absolute; inset: 6%; border-radius: 50%;
  background: radial-gradient(circle, var(--wheel-glow), transparent 62%);
  filter: blur(30px); z-index: -1;
}
.wheel-svg { width: 100%; height: 100%; display: block; overflow: visible; user-select: none; -webkit-user-select: none; }
.wheel-svg text { fill: var(--ink); }
.wheel-svg .rim { fill: none; stroke: url(#aqGold); stroke: var(--gold); stroke-width: 2; opacity: .7; }
.wheel-svg .rim.faint { stroke-width: 1; opacity: .25; }
.wheel-svg .ring { fill: none; stroke: rgba(var(--acc-rgb), .55); stroke-width: 1.3; }
.wheel-svg .ring.inner { stroke: rgba(var(--ink-rgb), .25); }
.wheel-svg .ring.faint { stroke: rgba(var(--acc-rgb), .12); stroke-dasharray: 2 6; }
.wheel-svg .seg { stroke: none; opacity: var(--seg-op); fill: var(--z); }
.wheel-svg .zsep { stroke: rgba(var(--acc-rgb), .55); stroke-width: 1.2; }
.wheel-svg .tick { stroke: rgba(var(--ink-rgb), .28); stroke-width: 1; }
.wheel-svg .tick.t5 { stroke: rgba(var(--ink-rgb), .5); stroke-width: 1.3; }
.wheel-svg .zsign { font-size: 35px; }
/* one hue per sign, Aries red round to Pisces violet (Yves, 25 October 2026) */
.wheel-svg .aries { --z: var(--z-aries); } .wheel-svg .taurus { --z: var(--z-taurus); } .wheel-svg .gemini { --z: var(--z-gemini); }
.wheel-svg .cancer { --z: var(--z-cancer); } .wheel-svg .leo { --z: var(--z-leo); } .wheel-svg .virgo { --z: var(--z-virgo); }
.wheel-svg .libra { --z: var(--z-libra); } .wheel-svg .scorpio { --z: var(--z-scorpio); } .wheel-svg .sagittarius { --z: var(--z-sagittarius); }
.wheel-svg .capricorn { --z: var(--z-capricorn); } .wheel-svg .aquarius { --z: var(--z-aquarius); } .wheel-svg .pisces { --z: var(--z-pisces); }
.wheel-svg .zsign, .wheel-svg .psign { fill: var(--z); }
.wheel-svg .disk-0 { stop-color: var(--disk-0); } .wheel-svg .disk-1 { stop-color: var(--disk-1); } .wheel-svg .disk-2 { stop-color: var(--disk-2); }
.wheel-svg .core-0 { stop-color: var(--core-0); } .wheel-svg .core-1 { stop-color: var(--core-1); }
.wheel-svg .hband { fill: rgba(var(--deep-rgb), .35); stroke: rgba(var(--ink-rgb), .18); stroke-width: 1; }
.wheel-svg .cline { stroke: rgba(var(--ink-rgb), .32); stroke-width: 1.2; transition: stroke .3s, stroke-width .3s; }
.wheel-svg .cusp.angle .cline { stroke: var(--gold); stroke-width: 2.6; }
.wheel-svg .hnum { font: 500 19px var(--serif); fill: rgba(var(--ink-rgb), .55); }
.wheel-svg .clabel { font: 500 22px var(--sans); font-variant-numeric: tabular-nums; fill: var(--ink-2); transition: fill .3s; cursor: pointer; }
.wheel-svg .clabel .ang { fill: var(--gold); font-weight: 700; letter-spacing: .06em; font-size: 19px; }
.wheel-svg .clabel .sym { font-size: 23px; }
.wheel-svg .cusp .hit { fill: transparent; cursor: pointer; }
.wheel-svg .asp { stroke-width: 2.2; opacity: .72; stroke-linecap: round; transition: opacity .3s, stroke-width .3s; }
.wheel-svg .asp.soft { stroke: var(--soft); }
.wheel-svg .asp.hard { stroke: var(--hard); }
.wheel-svg .asp.separating { stroke-dasharray: 2.2 2.2; opacity: .5; }
.wheel-svg .core-star { fill: url(#aqGold); fill: var(--gold); opacity: .55; }
.wheel-svg .core-dot { fill: var(--core-dot); }
.wheel-svg .w-pivot { display: none; }
.wheel-svg .pl { cursor: pointer; outline: none; transition: opacity .35s; }
.wheel-svg .pl .mark { stroke: var(--c); stroke-width: 2.6; stroke-linecap: round; }
.wheel-svg .pl .dot { fill: var(--c); }
.wheel-svg .pl .lead { stroke: var(--c); stroke-width: 1; opacity: .45; stroke-dasharray: 3 3; }
.no-anim .wheel-svg, .no-anim .wheel-svg * { transition: none !important; } /* while the report reads the wheel's colours */
/* no transition on fill: Safari kept the old colour when the theme changed under a running transition */
.wheel-svg .pl .halo { fill: rgba(var(--halo-rgb), var(--halo-a)); stroke: var(--c); stroke-width: 1.4; stroke-opacity: .55; transition: stroke-width .25s, stroke-opacity .25s; }
.wheel-svg .pl.minor .halo { stroke-opacity: .3; }
.wheel-svg .pglyph { font-size: 37px; fill: var(--c) !important; }
.wheel-svg .pl.minor .pglyph { font-size: 28px; }
.wheel-svg .pdeg { font: 600 22px var(--sans); }
.wheel-svg .psign { font-size: 23px; }
.wheel-svg .pmin { font: 500 17px var(--sans); fill: var(--ink-2) !important; }
.wheel-svg .pretro { font: 600 18px var(--sans); fill: var(--retro) !important; }
.wheel-svg .pl.minor .pdeg { font-size: 18px; }
.wheel-svg .pl.minor .psign { font-size: 19px; }
.wheel-svg .pl.minor .pmin { font-size: 14px; }
.wheel-svg .pl .hit { fill: transparent; }
.wheel-svg .pl:hover .halo, .wheel-svg .pl:focus-visible .halo, .wheel-svg .pl.hover .halo { stroke-width: 3; stroke-opacity: 1; fill: rgba(var(--halo-hi-rgb), var(--halo-hi-a)); }
.wheel-svg .pl.sel .halo { stroke-width: 3.5; stroke-opacity: 1; filter: url(#aqGlow); fill: rgba(var(--halo-hi-rgb), var(--halo-hi-a)); }

/* selection: everything else steps back */
.wheel-svg.has-sel .pl:not(.sel):not(.rel) { opacity: .28; }
.wheel-svg.has-sel .asp { opacity: .08; }
.wheel-svg.has-sel .asp.on { opacity: 1; stroke-width: 3.6; }
.wheel-svg.has-sel .cusp.ruled .clabel { fill: var(--c); }
.wheel-svg.has-sel .cusp.ruled .cline { stroke: var(--c); stroke-width: 2.6; }
.wheel-svg .cusp.sel .clabel { fill: var(--gold-2); }

/* entrance */
.wheel-svg.enter .w-zodiac { transform-box: view-box; transform-origin: 500px 500px; animation: zodIn 1.5s var(--ease) both; }
.wheel-svg.enter .w-houses { animation: fadeIn 1s .5s both; }
.wheel-svg.enter .pl { transform-box: view-box; transform-origin: 500px 500px; animation: plIn .9s var(--ease) both; animation-delay: calc(.65s + var(--i) * 70ms); }
.wheel-svg.enter .asp { stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw 1.3s 1.3s var(--ease) forwards; }
.wheel-svg.enter .asp.separating { animation-name: drawDash; }
.wheel-svg.enter .w-core { transform-box: view-box; transform-origin: 500px 500px; animation: coreIn 1.2s .2s var(--ease) both; }
.wheel-svg.idle .spin { transform-box: view-box; transform-origin: 500px 500px; animation: spin 240s linear infinite; }
@keyframes zodIn { from { transform: rotate(-38deg) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes plIn { from { opacity: 0; transform: rotate(-14deg) scale(.86); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes drawDash { 0% { stroke-dashoffset: 100; } 99% { stroke-dashoffset: 0; stroke-dasharray: 100; } 100% { stroke-dashoffset: 0; stroke-dasharray: 2.2 2.2; } }
@keyframes coreIn { from { transform: scale(.2) rotate(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

.stage-hint { position: absolute; left: 0; right: 0; bottom: 16%; text-align: center; color: var(--muted); font: italic 500 20px var(--serif); pointer-events: none; }
.wheel-tools { display: flex; justify-content: center; gap: 18px; margin-top: 4px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.wheel-tools label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.wheel-tools input { width: auto; accent-color: var(--gold); }
.legend { display: inline-flex; gap: 14px; align-items: center; }
.legend i { display: inline-block; width: 22px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 6px; }
.legend .s i { border-color: var(--soft); }
.legend .h i { border-color: var(--hard); }
.legend .sep i { border-top-style: dotted; border-color: var(--muted); }

/* ---------- reading */
.reading { max-width: 1280px; margin: 0 auto; padding: 18px 28px 60px; }
.reading[hidden] { display: none; }
.summary {
  display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: baseline; justify-content: center;
  padding: 16px 20px; margin: 0 auto 26px; max-width: 1100px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--ink-2); font-size: 14px; text-align: center;
}
.summary .q { flex-basis: 100%; font: italic 500 25px/1.25 var(--serif); color: var(--ink); }
.summary b { color: var(--gold-2); font-weight: 600; }
.warn { max-width: 1100px; margin: -12px auto 20px; color: var(--warn); font-size: 13.5px; text-align: center; }
.warn:empty { display: none; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.card {
  grid-column: span 6; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 var(--sheen), var(--card-shadow);
}
.card.wide { grid-column: span 12; }
.card.third { grid-column: span 4; }
.card h2 { margin: 0 0 14px; font: 600 24px/1.1 var(--serif); color: var(--gold-2); display: flex; align-items: baseline; gap: 10px; }
.card h2 small { font: 400 12.5px var(--sans); color: var(--muted); letter-spacing: .02em; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -6px; padding: 0 6px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
th { text-align: left; font: 500 10.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 0 10px 9px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; transition: background .2s; }
tr.click:hover { background: rgba(var(--acc-rgb), .06); }
tr.on { background: rgba(var(--acc-rgb), .09); }
.pname { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: 500; }
.pname .sym { color: var(--c); font-size: 19px; width: 20px; text-align: center; }
.pos { white-space: nowrap; }
td.score { text-align: right; font-weight: 600; white-space: nowrap; }
th[title] { cursor: help; }
.pos-score { color: var(--good-ink); }
.neg-score { color: var(--bad-ink); }
.pos .sym { margin: 0 1px; }
.chip { display: inline-block; padding: 1px 8px; margin: 1px 4px 1px 0; border-radius: 999px; font-size: 11.5px; line-height: 19px; border: 1px solid rgba(var(--ink-rgb), .16); color: var(--ink-2); white-space: nowrap; }
.chip.good { border-color: rgba(var(--acc-rgb), .5); color: var(--gold-2); background: rgba(var(--acc-rgb), .08); }
.chip.bad { border-color: rgba(var(--hard-rgb), .45); color: var(--bad-ink); background: rgba(var(--hard-rgb), .07); }
.chip.dim { color: var(--muted); }
.chip.blue { border-color: rgba(var(--soft-rgb), .45); color: var(--blue-ink); background: rgba(var(--soft-rgb), .07); }
.muted { color: var(--muted); }
.asp-g { font-family: var(--sym); font-size: 16px; }
.asp-g.soft { color: var(--soft); }
.asp-g.hard { color: var(--hard); }
.asp-g.conj { color: var(--gold-2); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--gold), rgba(var(--acc-rgb), .1)); }
.timeline li { position: relative; padding: 0 0 13px 30px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg1); border: 2px solid var(--gold); }
.timeline li.past::before { border-color: var(--muted); }
.timeline li.end::before { background: var(--gold); }
.timeline .when { color: var(--muted); font-size: 12.5px; }
.cons { margin: 0; padding: 0; list-style: none; }
.cons li { padding: 8px 0 8px 26px; position: relative; border-bottom: 1px solid var(--line-2); }
.cons li:last-child { border-bottom: 0; }
.cons li::before { content: "\2726"; position: absolute; left: 2px; color: var(--gold); font-family: var(--sym); }
.cons.none li::before { content: "\2713"; color: var(--earth); }

/* ---------- judgement */
.locked { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.locked .seal { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(var(--acc-rgb), .5); color: var(--gold); font-size: 24px; background: rgba(var(--acc-rgb), .07); }
.locked p { margin: 0; color: var(--ink-2); }
.btn-ghost { border: 1px solid rgba(var(--acc-rgb), .5); background: rgba(var(--acc-rgb), .08); color: var(--gold-2); padding: 11px 18px; border-radius: 12px; font: 600 13.5px var(--sans); letter-spacing: .04em; cursor: pointer; white-space: nowrap; }
.btn-ghost:hover { background: rgba(var(--acc-rgb), .16); }
.btn-ghost[disabled] { opacity: .55; cursor: not-allowed; }
.verdict { font: 500 21px/1.5 var(--serif); color: var(--ink); max-width: 62em; }
.verdict p { margin: 0 0 14px; }
.verdict .lead { font-size: 27px; font-style: italic; color: var(--gold-2); }
.verdict .note { font: 400 12.5px var(--sans); color: var(--muted); margin-top: 18px; }
.ref {
  --c: var(--gold);
  cursor: pointer; border-radius: 4px; padding: 0 1px;
  background-image: linear-gradient(var(--c), var(--c)); background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: color .3s, background-size .3s, background-color .3s, opacity .3s;
  background-color: transparent;
}
.ref:hover { color: var(--c); }
.verdict.has-sel .ref { opacity: .55; }
.verdict.has-sel .ref.on { opacity: 1; color: var(--c); background-size: 100% 2px; background-color: color-mix(in srgb, var(--c) 14%, transparent); }

/* ---------- drawer */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(440px, 100vw);
  background: var(--drawer-bg);
  border-left: 1px solid var(--line); box-shadow: -40px 0 90px -30px var(--shadow);
  transform: translateX(105%); transition: transform .45s var(--ease);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { position: relative; flex: none; padding: 22px 22px 16px; border-bottom: 1px solid var(--line-2); overflow: hidden; }
.drawer-head::before { content: ""; position: absolute; inset: -60px auto auto -60px; width: 260px; height: 260px; background: radial-gradient(circle, color-mix(in srgb, var(--c) 30%, transparent), transparent 65%); }
.drawer-head .big { position: relative; display: flex; align-items: center; gap: 14px; }
.drawer-head .orb { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; font: 36px/1 var(--sym); color: var(--c); border: 1.5px solid var(--c); background: rgba(var(--deep-rgb), .6); box-shadow: 0 0 30px -6px var(--c); flex: none; }
.drawer-head h3 { margin: 0; font: 600 30px/1 var(--serif); }
.drawer-head .sub { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.drawer-head .chips { position: relative; margin-top: 12px; }
.drawer-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(var(--deep-rgb), .5); color: var(--ink); font-size: 20px; cursor: pointer; }
.drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px 22px 30px; -webkit-overflow-scrolling: touch; }
/* the symbol font sits its glyphs low in the em box (ascent 1.48, descent .57): lift them to the centre of the orb */
.drawer-head .orb > .g { display: block; transform: translateY(-.1em); }
.drawer section { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.drawer section:last-child { border-bottom: 0; }
.drawer h4 { margin: 0 0 9px; font: 500 10.5px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.drawer .line { display: flex; justify-content: space-between; gap: 14px; padding: 4px 0; font-size: 14px; }
.drawer .line span:first-child { color: var(--muted); }
.drawer .line span:last-child { text-align: right; }
.plink { color: var(--c); cursor: pointer; border-bottom: 1px dotted color-mix(in srgb, var(--c) 60%, transparent); white-space: nowrap; }
.plink .sym { margin-right: 3px; }
.asp-list { list-style: none; margin: 0; padding: 0; }
.asp-list li { padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: 13.5px; }
.asp-list li:last-child { border-bottom: 0; }
.asp-list .when { display: block; color: var(--muted); font-size: 12.5px; }
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.on { opacity: 1; pointer-events: auto; }

/* ---------- footer */
footer { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 26px 28px 40px; color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; border-top: 1px solid var(--line-2); }

/* ---------- responsive */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 10px; }
  .intro { order: 2; }
  .stage { order: 1; }
  .card, .card.third { grid-column: span 12; }
}
@media (max-width: 620px) {
  body { font-size: 14.5px; }
  .top { padding: 16px 16px 0; }
  .top { flex-wrap: wrap; row-gap: 12px; }
  .top-right { display: contents; }
  .view-ctl { order: 3; width: 100%; }
  .hero, .reading { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 6px; }
  .panel-card { padding: 18px 16px; }
  .wheel-box { width: calc(100% + 16px); margin-left: -8px; }
  .card { padding: 16px 14px; }
  .locked { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .verdict { font-size: 19px; }
  .drawer { top: auto; width: 100vw; height: 82vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; transform: translateY(105%); }
  .drawer.open { transform: none; }
  .drawer-head { padding-top: 26px; }
  .drawer-head::after { content: ""; position: absolute; top: 9px; left: 50%; width: 42px; height: 4px; margin-left: -21px; border-radius: 3px; background: rgba(var(--ink-rgb), .25); }
  footer { padding: 22px 16px 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.wheel-svg.has-sel .pl.hover { opacity: 1; }

/* ---------- the account (26 October 2026): top right corner, sign-in dialog, judgement states */
.acct { display: flex; align-items: center; gap: 14px; position: relative; }
.top-link { color: var(--ink-2); font: 500 14px var(--sans); }
.top-link:hover { color: var(--gold-2); text-decoration: none; }
.btn-sign {
  border: 1px solid rgba(var(--acc-rgb), .5); background: rgba(var(--acc-rgb), .1); color: var(--gold-2);
  padding: 8px 16px; border-radius: 999px; font: 600 13.5px var(--sans); cursor: pointer; letter-spacing: .02em;
  box-shadow: inset 0 1px 0 var(--sheen); transition: background .2s, box-shadow .2s;
}
.btn-sign:hover { background: rgba(var(--acc-rgb), .18); box-shadow: 0 0 18px -4px rgba(var(--acc-rgb), .55), inset 0 1px 0 var(--sheen); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; padding: 0; display: grid; place-items: center;
  font: 600 19px/1 var(--serif); color: var(--on-btn); background: var(--btn-grad); border: 0;
  box-shadow: 0 6px 18px -8px rgba(var(--acc-rgb), .8), inset 0 1px 0 var(--btn-sheen);
}
.avatar:focus-visible, .btn-sign:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 230px; padding: 6px;
  background: var(--pop-bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px -20px var(--shadow);
}
.menu[hidden] { display: none; }
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; display: flex; flex-direction: column; gap: 2px; }
.menu-head b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.menu-head span { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.menu-head .plan-tag { color: var(--gold-2); margin-top: 4px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px; color: var(--ink); font: 400 14px var(--sans); background: none; border: 0; cursor: pointer; }
.menu a:hover, .menu button:hover { background: rgba(var(--acc-rgb), .1); text-decoration: none; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; max-width: min(520px, calc(100vw - 32px)); transform: translate(-50%, 20px);
  padding: 13px 18px; border-radius: 14px; background: var(--pop-bg); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 24px 60px -18px var(--shadow); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

.sign-dialog {
  width: min(400px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 22px; padding: 30px 28px 24px;
  background: var(--pop-bg); color: var(--ink); box-shadow: 0 40px 100px -30px var(--shadow); text-align: center;
}
.sign-dialog::backdrop { background: var(--scrim); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sign-dialog h2 { margin: 10px 0 6px; font: 600 28px/1.1 var(--serif); }
.sign-sub { margin: 0 0 20px; color: var(--ink-2); font-size: 14px; }
.sign-mark img { display: block; margin: 0 auto; }
.dlg-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--ink-2); font-size: 20px; cursor: pointer; }
.google-slot { display: flex; justify-content: center; min-height: 44px; }
.google-slot[hidden], .or[hidden] { display: none; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--muted); font-size: 12.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.sign-dialog form { text-align: left; display: grid; gap: 4px; }
.sign-dialog form input { margin-bottom: 10px; }
.sign-dialog .btn-cast { margin-top: 4px; }
.sign-alt { margin: 16px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.9; }

.btn-cast.small { width: auto; padding: 11px 18px; font-size: 13.5px; display: inline-flex; }
a.btn-cast, a.btn-ghost { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.locked-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.locked .locked-acts:empty { display: none; }
.judgement-view .locked { grid-template-columns: auto 1fr; }
.judge-go { display: grid; gap: 12px; }
.judge-go .muted { margin: 0; font-size: 13.5px; }
.judge-hint { margin-top: 10px; }
.judge-hint .btn-ghost { width: 100%; }
.judge-hint[hidden] { display: none; }
.reading-wait { text-align: center; padding: 26px 10px; }
.reading-wait p { margin: 6px 0; }
.reading-wait p:first-of-type { font: italic 500 23px var(--serif); color: var(--gold-2); }
.reading-wait .muted { font-size: 13.5px; max-width: 30em; margin: 6px auto 0; }
.orbit { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; border: 1px solid rgba(var(--acc-rgb), .45); position: relative; animation: spin 2.4s linear infinite; }
.orbit span { position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 14px var(--gold); }
.caret { display: inline-block; width: .5em; height: 1em; margin-left: 2px; vertical-align: -.12em; background: var(--gold); opacity: .6; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.j-summary { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line-2); font: 400 13px var(--sans); }
.j-summary dt { color: var(--muted); letter-spacing: .12em; text-transform: uppercase; font-size: 10.5px; padding-top: 2px; }
.j-summary dd { margin: 0; color: var(--ink-2); }
.j-acts { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 18px; }
.j-acts .linkish { font-size: 13px; }
.btn-mini {
  border: 1px solid rgba(var(--acc-rgb), .45); background: rgba(var(--acc-rgb), .07); color: var(--gold-2);
  padding: 4px 12px; border-radius: 999px; font: 500 13px var(--sans); cursor: pointer;
}
.btn-mini.saved { background: rgba(var(--acc-rgb), .16); }
.btn-mini[hidden] { display: none; }

@media (max-width: 620px) {
  /* one row: the brand on the left, the light switch and the account on the right */
  .top { justify-content: flex-start; }
  .theme-toggle { margin-left: auto; }
  .acct { gap: 10px; margin-left: 10px; }
  .acct .top-link { display: none; }
  .btn-sign { padding: 7px 13px; font-size: 13px; }
}
@media (max-width: 400px) {
  .brand { gap: 9px; }
  .brand img { width: 32px; height: 32px; }
  .brand .name { font-size: 22px; }
  .brand .tagline { font-size: 14px; }
}

/* ---------- printing a judgement (Pro): only the sheet, in the light colours */
#print-sheet { display: none; }
@media print {
  body > *:not(#print-sheet) { display: none !important; }
  body { background: #fff !important; color: #15191c; }
  #print-sheet { display: block; font: 11.5pt/1.5 var(--serif); color: #15191c; }
  #print-sheet .ps-who { display: flex; align-items: center; gap: 12px; font: 600 14pt var(--sans); margin-bottom: 18pt; }
  #print-sheet .ps-who img { height: 44pt; }
  #print-sheet .ps-kicker { font: 500 8.5pt var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #2f5d8e; margin: 0; }
  #print-sheet h1 { font: italic 600 22pt/1.2 var(--serif); margin: 4pt 0 6pt; }
  #print-sheet .ps-meta { font: 9.5pt var(--sans); color: #687177; margin: 0 0 12pt; }
  #print-sheet .ps-wheel { display: block; width: 12cm; margin: 0 auto 14pt; }
  #print-sheet .verdict { font-size: 12pt; max-width: none; color: #15191c; }
  #print-sheet .verdict .lead { font-size: 15pt; color: #2f5d8e; }
  #print-sheet .ref { background: none; color: var(--c); }
}
