:root {
  color-scheme: dark;
  --void: #050811;
  --abyss: #080d18;
  --depth-0: #0c1321;
  --depth-1: #111b2b;
  --depth-2: #18253a;
  --depth-3: #202f49;
  --surface-glass: rgba(16, 25, 43, .78);
  --surface-deep: rgba(8, 14, 27, .9);
  --surface-rule: rgba(172, 206, 228, .16);
  --surface-rule-strong: rgba(149, 239, 238, .4);
  --text: #eff7ff;
  --text-soft: #c5d2e2;
  --muted: #91a4ba;
  --quiet: #71839c;
  --cyan: #8ef2eb;
  --blue: #77aaff;
  --violet: #ae92ff;
  --magenta: #d782dc;
  --gold: #e5c47d;
  --ember: #f09b85;
  --serif: Georgia, "Times New Roman", serif;
  --display: "Segoe UI Variable Display", "Aptos Display", "Segoe UI", Arial, sans-serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
  --mono: "Cascadia Code", Consolas, monospace;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 36px;
  --space-6: 52px;
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --page-edge: clamp(19px, 4.7vw, 88px);
  --focus: #c4fff0;
  --shadow-deep: 0 34px 100px rgba(0, 0, 0, .5);
  --shadow-glass: 0 24px 60px rgba(0, 0, 0, .4), inset 0 1px rgba(255, 255, 255, .12);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--void); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(ellipse at 72% 18%, rgba(36, 69, 129, .24), transparent 42rem),
    radial-gradient(ellipse at 15% 31%, rgba(80, 43, 121, .19), transparent 40rem),
    radial-gradient(ellipse at 52% 93%, rgba(10, 75, 88, .15), transparent 48rem),
    linear-gradient(138deg, #080d18, var(--void) 54%, #080c18);
  color: var(--text);
  font: 15px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, textarea, input { font: inherit; }
button { color: inherit; }
a { color: var(--cyan); }
button:focus-visible, a:focus-visible, textarea:focus-visible, input:focus-visible, summary:focus-visible, pre:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
  box-shadow: 0 0 0 7px rgba(142, 242, 235, .16), 0 0 28px rgba(142, 242, 235, .24);
}
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 30;
  top: 12px;
  left: 12px;
  padding: 11px 16px;
  transform: translateY(-160%);
  border: 1px solid var(--focus);
  border-radius: var(--radius-s);
  background: var(--depth-0);
  color: var(--text);
}
.skip-link:focus { transform: translateY(0); }
.ambient-field { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; transition: opacity .8s ease; }
.ambient-field::before, .ambient-field::after { position: absolute; inset: 0; content: ""; }
.ambient-field::before {
  background: radial-gradient(ellipse at 50% 38%, rgba(64, 117, 157, .14), transparent 45%),
    radial-gradient(ellipse at 85% 56%, rgba(119, 71, 158, .12), transparent 38%);
  filter: blur(34px);
}
.ambient-field::after {
  opacity: .14;
  background-image: linear-gradient(117deg, transparent 49.8%, rgba(136, 203, 231, .09) 50%, transparent 50.2%),
    linear-gradient(63deg, transparent 49.8%, rgba(174, 146, 255, .06) 50%, transparent 50.2%);
  background-size: 130px 130px, 173px 173px;
  mask-image: radial-gradient(ellipse at 60% 44%, #000 0%, transparent 70%);
}
.ambient-grid {
  position: absolute;
  inset: -20% -15%;
  opacity: .22;
  background-image: linear-gradient(rgba(149, 188, 221, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(149, 188, 221, .06) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 72%);
  transform: perspective(850px) rotateX(66deg) rotateZ(-17deg) scale(1.35);
  transform-origin: center 42%;
}
.ambient-geometry {
  position: absolute;
  top: -19vw;
  right: -14vw;
  width: min(1120px, 88vw);
  height: auto;
  overflow: visible;
  fill: none;
  stroke: rgba(123, 188, 230, .18);
  stroke-width: .62;
  transform-origin: 50% 50%;
  animation: field-turn 190s linear infinite;
}
.ambient-geometry .ambient-node { fill: var(--cyan); stroke: none; }
html.is-document-hidden .ambient-field *, html.is-document-hidden .ambient-geometry { animation-play-state: paused !important; }
body[data-phase="reading"] .ambient-field, body[data-phase="advanced"] .ambient-field { opacity: .27; }
body[data-phase="selection"] .ambient-field, body[data-phase="ready"] .ambient-field { opacity: .92; }

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: max(9px, env(safe-area-inset-top)) var(--page-edge) 9px;
  border-bottom: 1px solid rgba(174, 203, 230, .14);
  background: linear-gradient(100deg, rgba(6, 10, 19, .91), rgba(16, 22, 41, .67), rgba(7, 10, 20, .83));
  box-shadow: 0 12px 34px rgba(0, 0, 0, .22), inset 0 -1px rgba(206, 246, 255, .04);
  backdrop-filter: blur(18px) saturate(135%);
}
.brand { display: inline-flex; min-height: 44px; align-items: center; gap: 13px; color: var(--text); text-decoration: none; }
.brand-mark {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(142, 242, 235, .72);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 24%, rgba(206, 255, 249, .22), rgba(91, 109, 190, .07) 48%, rgba(3, 9, 19, .25));
  box-shadow: inset 0 0 18px rgba(103, 211, 214, .16), 0 0 24px rgba(82, 190, 213, .13);
}
.brand-mark span { position: absolute; display: block; width: 15px; height: 1px; background: var(--cyan); }
.brand-mark span:nth-child(2) { transform: rotate(60deg); }
.brand-mark span:nth-child(3) { transform: rotate(-60deg); }
.brand-name { font: 700 11px/1 var(--display); letter-spacing: .19em; }
.brand-divider { margin: 0 7px; color: #7383a2; font-weight: 400; }
.brand-light { color: #9babc2; font-weight: 450; letter-spacing: .16em; }
.privacy-note { display: inline-flex; min-height: 44px; align-items: center; gap: 9px; margin: 0; color: var(--text-soft); font-size: 11px; letter-spacing: .06em; }
.privacy-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px rgba(142, 242, 235, .72); }
.language-switch { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 3px; padding: 3px; border: 1px solid rgba(169, 219, 234, .34); border-radius: 999px; background: linear-gradient(135deg, rgba(52, 78, 113, .32), rgba(8, 15, 33, .78)); box-shadow: inset 0 1px rgba(255,255,255,.12), 0 10px 25px rgba(0,0,0,.2); backdrop-filter: blur(15px) saturate(130%); direction: ltr; }
.language-switch button { min-width: 68px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: #bacddd; cursor: pointer; font: 650 12px/1 var(--sans); transition: color .18s ease, background-color .18s ease, box-shadow .18s ease; }
.language-switch button[lang="fa"] { font-family: Tahoma, "Segoe UI", Arial, sans-serif; font-size: 13px; }
.language-switch button:hover { color: #f4fbff; background: rgba(183, 228, 244, .12); }
.language-switch button.is-active { background: linear-gradient(135deg, rgba(163, 249, 234, .94), rgba(157, 187, 252, .91)); color: #0b1829; box-shadow: 0 3px 14px rgba(110, 212, 231, .28), inset 0 1px rgba(255,255,255,.52); }
.language-switch button.is-active:hover { background: linear-gradient(135deg, #bcfff0, #b4caff); color: #071321; }
.page-shell { position: relative; z-index: 1; width: min(calc(100% - (2 * var(--page-edge))), 1680px); margin: 0 auto; }

.reading-path { margin: 22px 0 0; }
.reading-path-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.reading-step { position: relative; display: flex; min-width: 0; align-items: center; gap: 10px; padding: 7px 16px 7px 0; color: #647690; font: 600 10px/1.4 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.reading-step::after { position: absolute; top: 50%; right: 17px; left: 52px; height: 1px; background: linear-gradient(90deg, rgba(123, 170, 204, .3), rgba(123, 170, 204, .04)); content: ""; }
.reading-step span { color: #8190a8; font: 11px var(--mono); }
.reading-step b { position: relative; z-index: 1; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.reading-step[aria-current="step"] { color: #effcff; }
.reading-step[aria-current="step"] span { color: var(--cyan); }
.reading-step[aria-current="step"]::after { background: linear-gradient(90deg, rgba(142, 242, 235, .76), rgba(108, 139, 242, .15)); box-shadow: 0 0 9px rgba(142, 242, 235, .32); }

.intro {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(16px, 2.3vw, 38px);
  min-height: clamp(560px, calc(100svh - 112px), 880px);
  padding: 12px 0 62px;
}
.intro-copy-wrap { position: relative; z-index: 1; max-width: 700px; padding: 15px 0 18px; }
.eyebrow, .step-label { margin: 0; color: var(--gold); font: 700 10px/1.55 var(--display); letter-spacing: .17em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: #9deae7; }
.signal-orb { position: relative; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #b4fff3; box-shadow: 0 0 16px rgba(142, 242, 235, .8); }
.signal-orb::after { position: absolute; inset: -5px; border: 1px solid rgba(142, 242, 235, .34); border-radius: 50%; content: ""; }
.intro h1 { max-width: 790px; margin: 27px 0 21px; color: #f5fbff; font: 600 clamp(50px, 6vw, 94px)/.96 var(--display); letter-spacing: -.077em; text-wrap: balance; }
.intro h1 span { display: inline-block; color: transparent; background: linear-gradient(100deg, #f7ffff 0%, #9ff7eb 27%, #9eb6ff 68%, #dca6ef 100%); background-clip: text; -webkit-background-clip: text; }
.intro-copy { max-width: 510px; margin: 0; color: #c4d4e4; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.75; }
.intro-cta { margin-top: 27px; }
.intro-boundary { display: flex; align-items: center; gap: 9px; margin: 19px 0 0; color: #8f9eb2; font-size: 11px; letter-spacing: .035em; }
.intro-boundary span { color: var(--gold); font-size: 15px; }
.hero-readout { display: flex; flex-wrap: wrap; gap: 10px 25px; margin-top: 36px; padding-top: 17px; border-top: 1px solid rgba(166, 194, 221, .18); color: #cad9e8; font: 500 10px/1.4 var(--mono); }
.hero-readout span { display: grid; gap: 5px; }
.hero-readout small { color: #7086a3; font: 700 8px/1 var(--display); letter-spacing: .15em; }
.hero-instrument {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: clamp(440px, 46vw, 690px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  perspective: 1050px;
}
.instrument-glass {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(86%, 610px);
  aspect-ratio: 1;
  border: 1px solid rgba(182, 241, 255, .29);
  border-radius: 48% 52% 49% 51%;
  background: radial-gradient(ellipse at 34% 22%, rgba(217, 255, 255, .25), transparent 26%),
    radial-gradient(ellipse at 50% 52%, rgba(107, 92, 196, .15), transparent 60%),
    linear-gradient(140deg, rgba(88, 156, 186, .12), rgba(24, 28, 65, .06) 44%, rgba(141, 102, 180, .11));
  box-shadow: inset 18px 12px 38px rgba(222, 255, 255, .08), inset -28px -22px 55px rgba(76, 91, 186, .13), 0 35px 100px rgba(33, 63, 139, .15);
  transform: translate(-50%, -50%) rotateX(9deg) rotateZ(-8deg);
  animation: glass-breath 11s ease-in-out infinite;
  backdrop-filter: blur(4px) saturate(138%);
}
.instrument-glass::before, .instrument-glass::after { position: absolute; inset: 7%; border: 1px solid rgba(159, 212, 242, .2); border-radius: 50%; content: ""; transform: rotateX(67deg) rotateZ(27deg); }
.instrument-glass::after { inset: 14%; border-color: rgba(216, 185, 255, .2); transform: rotateX(68deg) rotateZ(-31deg); }
.instrument-caption { position: absolute; z-index: 2; top: 3%; right: 5%; left: 5%; display: flex; justify-content: space-between; gap: 10px; color: #8299b5; font: 9px var(--mono); letter-spacing: .12em; }
.instrument-caption span:first-child { display: flex; align-items: center; gap: 8px; }
.instrument-caption i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px rgba(142, 242, 235, .82); }
.instrument-diagram { position: relative; z-index: 1; display: block; width: min(100%, 560px); height: auto; overflow: visible; filter: drop-shadow(0 14px 32px rgba(60, 111, 183, .17)); }
.instrument-aura { opacity: .95; }
.instrument-orbits { stroke-width: .8; }
.instrument-orbits circle:first-child { stroke-opacity: .75; stroke-width: 1.25; }
.instrument-orbits circle:nth-child(2) { stroke-opacity: .7; }
.instrument-orbits ellipse { stroke-opacity: .76; }
.instrument-orbits path { stroke-opacity: .32; }
.instrument-artifacts { filter: drop-shadow(0 5px 9px rgba(0, 0, 0, .4)); }
.instrument-artifacts rect:first-child { stroke: rgba(202, 255, 248, .68); stroke-width: .9; }
.instrument-artifacts rect:nth-child(2) { stroke: rgba(202, 255, 248, .32); }
.instrument-points circle { filter: drop-shadow(0 0 4px rgba(142, 242, 235, .75)); }
.instrument-core { filter: drop-shadow(0 0 18px rgba(104, 225, 231, .38)); }
.instrument-omega { fill: #efffff; font: 35px var(--serif); }
.instrument-equation { position: relative; z-index: 1; margin-top: -14px; color: #e8f3fb; font: 600 23px/1.25 var(--display); letter-spacing: .035em; text-shadow: 0 0 24px rgba(116, 188, 232, .28); }
.instrument-equation span { color: var(--cyan); }
.instrument-equation sup { color: var(--violet); font-size: .64em; }
.instrument-note { position: relative; z-index: 1; margin: 7px 0 0; color: #869ab4; font: 9px var(--mono); letter-spacing: .045em; text-align: center; }
.instrument-base { display: flex; height: 20px; align-items: center; justify-content: center; gap: 7px; margin-top: 5px; }
.instrument-base span { width: 36px; height: 1px; background: linear-gradient(90deg, transparent, rgba(142, 242, 235, .65), transparent); }
.instrument-base span:nth-child(2) { width: 76px; background: linear-gradient(90deg, transparent, rgba(174, 146, 255, .68), transparent); }

.setup-panel, .selection-panel {
  position: relative;
  margin: 0 0 65px;
  padding: clamp(25px, 4vw, 62px);
  overflow: hidden;
  border: 1px solid rgba(166, 207, 231, .2);
  border-radius: var(--radius-l);
  background: radial-gradient(ellipse at 88% 4%, rgba(114, 111, 186, .15), transparent 38%),
    linear-gradient(140deg, rgba(19, 30, 51, .91), rgba(8, 14, 28, .94) 67%, rgba(13, 18, 38, .91));
  box-shadow: var(--shadow-deep), var(--shadow-glass);
  backdrop-filter: blur(14px) saturate(126%);
}
.setup-panel::before, .selection-panel::before { position: absolute; top: 0; left: 7%; width: 50%; height: 1px; background: linear-gradient(90deg, transparent, rgba(142, 242, 235, .9), rgba(174, 146, 255, .2), transparent); box-shadow: 0 0 14px rgba(142, 242, 235, .35); content: ""; }
.setup-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: 32px; }
.setup-heading h2, .selection-topline h2, .reading-header h2 { margin: 11px 0 0; color: var(--text); font: 560 clamp(27px, 3vw, 43px)/1.12 var(--display); letter-spacing: -.045em; }
.step-label span { padding: 0 4px; color: #6789a9; }
.optional-label { padding: 7px 11px; border: 1px solid rgba(157, 201, 226, .26); border-radius: 30px; background: rgba(97, 129, 171, .08); color: #9bacbf; font: 700 8px var(--display); letter-spacing: .12em; white-space: nowrap; }
.setup-grid { display: grid; grid-template-columns: minmax(250px, .78fr) minmax(0, 1.45fr); gap: clamp(27px, 4vw, 70px); }
.question-block { min-width: 0; }
.field-label { display: flex; min-height: 44px; align-items: center; gap: 11px; margin-bottom: 10px; color: #dce9f6; font: 600 12px var(--display); letter-spacing: .035em; }
.field-marker { display: inline-grid; width: 26px; height: 26px; place-items: center; border: 1px solid rgba(142, 242, 235, .4); border-radius: 50%; background: rgba(142, 242, 235, .06); color: var(--cyan); font: 10px var(--mono); box-shadow: inset 0 0 12px rgba(142, 242, 235, .1); }
textarea { display: block; width: 100%; min-height: 150px; resize: vertical; padding: 17px; border: 1px solid rgba(150, 203, 231, .26); border-radius: var(--radius-m); background: linear-gradient(145deg, rgba(8, 15, 29, .94), rgba(14, 20, 37, .75)); color: var(--text); line-height: 1.65; box-shadow: inset 0 1px 16px rgba(114, 153, 198, .08), 0 12px 26px rgba(0, 0, 0, .12); }
textarea:focus-visible { border-color: rgba(142, 242, 235, .76); }
textarea::placeholder { color: #788aa2; }
.field-foot { display: flex; justify-content: space-between; gap: 10px; margin: 10px 2px 0; color: #91a1b5; font-size: 10px; }
.privacy-caption { display: flex; align-items: center; gap: 8px; margin: 22px 0 0; color: #8293a9; font-size: 10px; }
.privacy-caption .privacy-dot { width: 5px; height: 5px; box-shadow: none; }
.spread-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.spread-hint { margin: 0; color: #8394ac; font-size: 10px; text-align: right; }
.spread-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.spread-option {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 164px;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 15px;
  padding: 17px 16px 19px;
  overflow: hidden;
  border: 1px solid rgba(152, 193, 222, .2);
  border-radius: var(--radius-m);
  background: radial-gradient(ellipse at 80% 4%, rgba(132, 126, 206, .14), transparent 45%), linear-gradient(145deg, rgba(29, 43, 69, .74), rgba(11, 19, 36, .9));
  box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 16px 27px rgba(0, 0, 0, .18);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.spread-option::before { position: absolute; right: -28px; bottom: -49px; width: 145px; height: 145px; border: 1px solid rgba(139, 202, 236, .15); border-radius: 50%; box-shadow: 0 0 32px rgba(90, 119, 198, .08), inset 0 0 25px rgba(136, 110, 206, .08); content: ""; }
.spread-option.is-active { border-color: rgba(142, 242, 235, .72); background: radial-gradient(ellipse at 15% 5%, rgba(116, 218, 223, .22), transparent 52%), linear-gradient(140deg, rgba(31, 68, 84, .88), rgba(20, 25, 56, .94)); box-shadow: inset 0 0 0 1px rgba(142, 242, 235, .12), inset 0 12px 27px rgba(189, 250, 255, .06), 0 16px 38px rgba(50, 134, 164, .19); }
.spread-option.is-active::after { position: absolute; top: 0; right: 17px; left: 17px; height: 1px; background: linear-gradient(90deg, transparent, #d2ffff, var(--cyan), transparent); box-shadow: 0 0 11px rgba(142, 242, 235, .75); content: ""; }
.spread-option-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.spread-option-copy { position: relative; z-index: 1; display: block; padding-right: 18px; }
.spread-option strong { display: block; color: #f0f7ff; font: 650 13px/1.4 var(--display); }
.spread-option small { display: block; margin-top: 5px; color: #a8b8ca; font-size: 10px; line-height: 1.5; }
.spread-count { color: #e8ce92; font: 9px var(--mono); letter-spacing: .08em; white-space: nowrap; }
.spread-select-mark { position: absolute; right: 15px; bottom: 16px; width: 12px; height: 12px; border: 1px solid rgba(155, 194, 215, .56); border-radius: 50%; box-shadow: inset 0 0 7px rgba(142, 242, 235, .12); }
.spread-option.is-active .spread-select-mark { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 14px rgba(142, 242, 235, .8), inset 0 0 0 3px #163e4c; }
.spread-symbol { position: relative; display: flex; width: 52px; height: 45px; align-items: center; justify-content: center; filter: drop-shadow(0 5px 9px rgba(0, 0, 0, .4)); }
.spread-symbol i { display: block; width: 11px; height: 19px; border: 1px solid rgba(145, 240, 232, .72); border-radius: 4px; background: linear-gradient(145deg, rgba(102, 220, 221, .26), rgba(24, 38, 74, .82)); box-shadow: inset 1px 1px rgba(255, 255, 255, .2), 0 0 13px rgba(81, 177, 201, .12); }
.one-symbol i { width: 18px; height: 29px; border-color: var(--gold); }
.three-symbol { gap: 4px; }
.three-symbol i:nth-child(2) { transform: translateY(-6px); }
.cross-symbol i { position: absolute; width: 11px; height: 17px; }
.cross-symbol i:nth-child(1) { transform: translate(-12px, 0); }
.cross-symbol i:nth-child(2) { transform: translate(2px, 0); }
.cross-symbol i:nth-child(3) { transform: translate(-5px, -12px); }
.cross-symbol i:nth-child(4) { transform: translate(-5px, 12px); }
.cross-symbol i:nth-child(5) { transform: translate(15px, 0) rotate(90deg); }

.research-mode { margin-top: 25px; padding-top: 14px; border-top: 1px solid var(--surface-rule); }
.research-mode summary, .source-detail summary, .reproducibility-detail summary { display: flex; min-height: 46px; align-items: center; gap: 12px; color: #cbd9e8; font-size: 11px; cursor: pointer; list-style: none; }
.research-mode summary::-webkit-details-marker, .source-detail summary::-webkit-details-marker, .reproducibility-detail summary::-webkit-details-marker { display: none; }
.research-mode summary::after, .source-detail summary::after, .reproducibility-detail summary::after { margin-left: auto; color: var(--cyan); font: 20px var(--display); content: "+"; }
.research-mode[open] summary::after, .source-detail[open] summary::after, .reproducibility-detail[open] summary::after { content: "−"; }
.research-mode summary span, .reproducibility-detail summary span { color: #8293aa; font-size: 10px; }
.research-setting { padding: 8px 0 2px; }
.toggle-line { display: flex; min-height: 50px; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; }
.toggle-line strong, .toggle-line small { display: block; }
.toggle-line strong { color: #dbe8f5; font-size: 12px; font-weight: 550; }
.toggle-line small, .setting-note { margin-top: 3px; color: #91a2b8; font-size: 10px; }
.toggle-line input { width: 20px; height: 20px; accent-color: var(--cyan); }
.seed-row { display: grid; grid-template-columns: 145px minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 11px; }
.seed-row label { color: #cbd9e8; font-size: 11px; }
.seed-row input { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid rgba(150, 203, 231, .27); border-radius: var(--radius-s); background: var(--abyss); color: var(--text); }
.setting-note { margin-bottom: 0; }
.setup-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 29px; padding-top: 23px; border-top: 1px solid var(--surface-rule); }
.setup-assurance { color: #99abc0; font-size: 10px; }
.assurance-glyph { margin-right: 7px; color: var(--cyan); font-size: 17px; }
.button { position: relative; display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 13px; padding: 0 21px; overflow: hidden; border: 1px solid transparent; border-radius: 999px; text-decoration: none; cursor: pointer; transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease; }
.button:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.button-primary { border-color: rgba(197, 255, 248, .74); background: linear-gradient(108deg, #bafdf0 0%, #7cdae7 36%, #9da9ff 76%, #c0a1e8 100%); color: #0d1524; font: 700 12px var(--display); letter-spacing: .045em; box-shadow: 0 10px 28px rgba(53, 153, 173, .25), inset 0 1px rgba(255, 255, 255, .7); }
.button-primary::before { position: absolute; top: -50%; bottom: -50%; left: -40%; width: 25%; transform: rotate(24deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .47), transparent); content: ""; transition: left .45s ease; }
.button-primary:disabled { opacity: .48; cursor: not-allowed; filter: saturate(.6); }
.button-primary > span { position: relative; z-index: 1; font-size: 17px; }
.button-primary > * { position: relative; z-index: 1; }
.intro-cta { min-height: 58px; gap: 16px; padding: 0 24px; box-shadow: 0 13px 39px rgba(51, 173, 184, .27), inset 0 1px rgba(255, 255, 255, .82); }
.intro-cta .cta-glyph { font-size: 20px; }
.intro-cta .cta-arrow { font-size: 20px; }
.button-quiet { border-color: rgba(156, 193, 218, .28); background: linear-gradient(140deg, rgba(33, 47, 73, .78), rgba(12, 19, 35, .88)); color: #cbd9e8; font-size: 11px; box-shadow: inset 0 1px rgba(255, 255, 255, .06); }
.button-small { min-height: 41px; padding: 0 14px; border-color: rgba(142, 242, 235, .42); background: linear-gradient(135deg, rgba(36, 66, 82, .8), rgba(18, 27, 49, .9)); color: #a9f8f0; font-size: 11px; box-shadow: inset 0 1px rgba(255, 255, 255, .08); }
.inline-error { margin: 14px 0 0; padding: 12px 14px; border: 1px solid rgba(240, 155, 133, .58); border-radius: var(--radius-s); background: rgba(86, 39, 45, .4); color: #ffc5b4; font-size: 12px; }

.selection-panel { margin-top: 28px; }
.selection-panel::after { position: absolute; z-index: 0; right: -15%; bottom: -27%; width: 70%; aspect-ratio: 1; border: 1px solid rgba(125, 169, 222, .11); border-radius: 50%; box-shadow: 0 0 0 38px rgba(113, 127, 205, .025), 0 0 0 82px rgba(113, 127, 205, .018); content: ""; pointer-events: none; }
.selection-topline { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.selection-topline h2 { font-size: clamp(26px, 3vw, 42px); }
.section-copy { margin: 9px 0 0; color: #9dadc1; font-size: 12px; }
.section-copy strong { color: var(--gold); font-weight: 650; }
.selection-progress { display: grid; min-width: 94px; grid-template-columns: auto auto auto; align-items: baseline; justify-content: center; color: var(--cyan); font: 580 34px/1 var(--display); text-shadow: 0 0 23px rgba(142, 242, 235, .28); }
.progress-divider { padding: 0 6px; color: #7488a2; font-size: 21px; }
.selection-progress small { grid-column: 1 / span 3; margin-top: 8px; color: #9bacbf; font: 700 8px var(--display); letter-spacing: .15em; text-align: center; text-transform: uppercase; }
.selection-instrument-note { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; margin: 0 0 17px; padding: 12px 15px; border: 1px solid rgba(142, 242, 235, .16); border-radius: var(--radius-s); background: linear-gradient(95deg, rgba(23, 67, 81, .39), rgba(25, 33, 69, .22), transparent); box-shadow: inset 0 1px rgba(255, 255, 255, .05); }
.selection-instrument-note > span { color: var(--cyan); font-size: 19px; }
.selection-instrument-note p { flex: 1; margin: 0; color: #c2d1e2; font-size: 10px; }
.keyboard-hint { display: block; margin-top: 5px; color: #a6e9ea; font: 9px/1.4 var(--mono); }
.instrument-note-math { color: #8293ad; font: 9px var(--mono); letter-spacing: .1em; white-space: nowrap; }
.card-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 12px 9px;
  padding: 22px clamp(10px, 2vw, 28px) 26px;
  perspective: 1250px;
  transform-style: preserve-3d;
  border: 1px solid rgba(147, 183, 214, .15);
  border-radius: var(--radius-m);
  background: radial-gradient(ellipse at 50% 42%, rgba(47, 74, 119, .22), transparent 70%), linear-gradient(165deg, rgba(5, 10, 20, .84), rgba(11, 17, 33, .62));
  box-shadow: inset 0 1px rgba(230, 255, 255, .07), inset 0 -24px 46px rgba(44, 72, 122, .06), 0 23px 48px rgba(0, 0, 0, .19);
}
.card-grid::before { position: absolute; inset: 12px; border: 1px solid rgba(148, 183, 218, .08); border-radius: 12px; content: ""; pointer-events: none; }
.hidden-card {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 58px;
  aspect-ratio: 5 / 8;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(135, 224, 224, .54);
  border-radius: 8px;
  background: linear-gradient(148deg, #182a43, #10182b 60%, #302748);
  box-shadow: inset 1px 1px rgba(228, 255, 255, .25), inset -2px -3px 10px rgba(103, 106, 187, .18), 0 9px 15px rgba(0, 0, 0, .39);
  cursor: pointer;
  transform: translateY(1px) rotateZ(var(--card-rest-angle, 0deg));
  transition: border-color .2s ease, box-shadow .2s ease, filter .2s ease;
  transform-style: preserve-3d;
}
.hidden-card:nth-child(7n + 1) { --card-rest-angle: -1.2deg; }
.hidden-card:nth-child(7n + 3) { --card-rest-angle: .8deg; }
.hidden-card:nth-child(7n + 5) { --card-rest-angle: -0.5deg; }
.hidden-card svg { position: relative; z-index: 1; display: block; width: 100%; height: 100%; filter: saturate(1.08); pointer-events: none; }
.hidden-card::before { position: absolute; z-index: 2; inset: 0; background: linear-gradient(122deg, rgba(235, 255, 255, .2), transparent 18%, transparent 72%, rgba(214, 177, 255, .13)); content: ""; opacity: .42; pointer-events: none; }
.hidden-card[aria-pressed="true"] { border-color: #ffe2a0; box-shadow: 0 0 0 2px rgba(229, 196, 125, .78), 0 0 27px rgba(229, 196, 125, .42), 0 21px 32px rgba(0, 0, 0, .55); filter: brightness(1.18); }
.hidden-card[aria-pressed="true"]::after { position: absolute; z-index: 3; top: 5px; right: 5px; display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid rgba(255, 255, 255, .78); border-radius: 50%; background: linear-gradient(135deg, #fff1c9, var(--gold)); color: #172033; content: attr(data-pick); font: 750 10px var(--display); box-shadow: 0 2px 10px rgba(0, 0, 0, .4); pointer-events: none; }
.selection-footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 5px -2px 0; padding-top: 19px; border-top: 1px solid var(--surface-rule); }
.selection-status { margin: 0; color: #c0d0e0; font-size: 11px; }

.reading-panel { padding: 28px 0 0; }
.reading-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 16px 0 34px; }
.reading-header h2 { font-size: clamp(34px, 4.4vw, 62px); }
.reading-question { max-width: 740px; margin: 11px 0 0; color: #c3d3e3; font: italic 15px/1.6 var(--serif); overflow-wrap: anywhere; }
.reading-question-label { display: inline-block; margin-inline-end: .65em; color: #9ce6dc; font: 700 11px/1.4 var(--sans); letter-spacing: .09em; text-transform: uppercase; }
.reading-geometry-caption { margin: 4px 0 19px; color: #879bb4; font: 9px var(--mono); letter-spacing: .035em; }
.reading-cards { position: relative; display: grid; max-width: 1260px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: clamp(14px, 2vw, 32px); margin: 0 auto 34px; perspective: 1500px; }
.reading-cards.is-single { max-width: 500px; grid-template-columns: minmax(0, 1fr); }
.reading-cards.is-celtic { max-width: 1480px; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(148px, auto)); align-items: stretch; gap: 9px; }
.reading-relations { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.reading-relations line { stroke: url(#relation-filament); stroke-width: 1.15; stroke-dasharray: 4 8; stroke-linecap: round; opacity: .52; filter: drop-shadow(0 0 4px rgba(121, 221, 239, .5)); animation: relation-flow 13s linear infinite; }
.reading-card { --card-accent: var(--cyan); position: relative; z-index: 1; min-width: 0; padding: 12px; border: 1px solid rgba(167, 207, 232, .24); border-radius: var(--radius-m); background: radial-gradient(ellipse at 20% 0%, rgba(151, 224, 245, .12), transparent 42%), linear-gradient(148deg, rgba(28, 40, 65, .94), rgba(9, 15, 29, .97) 62%, rgba(34, 27, 60, .88)); box-shadow: 0 22px 42px rgba(0, 0, 0, .35), inset 0 1px rgba(255, 255, 255, .11), inset 0 -18px 32px rgba(75, 91, 156, .08); transform-origin: center 75%; animation: reveal-in .72s cubic-bezier(.18, .84, .18, 1) both; backdrop-filter: blur(9px) saturate(120%); }
.reading-card[data-suit="wands"] { --card-accent: #f0ae87; }
.reading-card[data-suit="cups"] { --card-accent: #8ef2eb; }
.reading-card[data-suit="swords"] { --card-accent: #9bbcf8; }
.reading-card[data-suit="pentacles"] { --card-accent: #e6cf8f; }
.reading-card[data-suit="major"] { --card-accent: #e7c47b; }
.reading-cards.is-celtic .reading-card { grid-column: var(--grid-column); grid-row: var(--grid-row); justify-self: center; width: min(100%, 174px); padding: 8px; }
.card-position { display: flex; min-height: 32px; align-items: center; justify-content: space-between; gap: 5px; padding: 0 3px 8px; color: var(--card-accent); font: 750 9px/1.4 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.orientation-pill { padding: 3px 7px; border: 1px solid rgba(142, 242, 235, .37); border-radius: 20px; background: rgba(142, 242, 235, .07); color: #a9f6ed; font: 650 8px var(--display); letter-spacing: .05em; white-space: nowrap; }
.orientation-pill.reversed { border-color: rgba(240, 155, 133, .52); background: rgba(119, 57, 58, .19); color: #ffb49b; }
.face-frame { position: relative; max-width: 100%; margin: 0 auto; padding: 5px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--card-accent) 76%, transparent); border-radius: 9px; background: linear-gradient(145deg, rgba(201, 255, 255, .16), rgba(8, 13, 25, .92) 25%, rgba(21, 20, 41, .9)); box-shadow: inset 0 1px rgba(255, 255, 255, .22), 0 0 31px color-mix(in srgb, var(--card-accent) 13%, transparent), 0 17px 27px rgba(0, 0, 0, .3); }
.reading-cards:not(.is-celtic) .face-frame { max-width: 370px; }
.reading-cards.is-single .face-frame { max-width: 425px; padding: 7px; }
.reading-cards.is-celtic .face-frame { padding: 3px; }
.card-art { display: block; width: 100%; height: auto; aspect-ratio: 220 / 300; }
.face-frame.is-reversed .card-scene-symbol { transform: rotate(180deg); transform-origin: 110px 117px; }
.reading-card h3 { margin: 12px 3px 5px; color: #f2f7ff; font: 560 clamp(16px, 1.5vw, 21px)/1.28 var(--display); letter-spacing: -.025em; text-align: center; }
.reading-cards.is-single .reading-card h3 { margin-top: 15px; font-size: 23px; }
.reading-cards.is-celtic .reading-card h3 { margin: 8px 1px 4px; font-size: 15px; }
.interpretation-card { position: relative; margin: 27px 0; padding: clamp(24px, 4vw, 58px); overflow: hidden; border: 1px solid rgba(168, 197, 223, .19); border-radius: var(--radius-l); background: radial-gradient(ellipse at 3% 1%, rgba(122, 91, 159, .13), transparent 43%), linear-gradient(142deg, rgba(16, 24, 42, .94), rgba(8, 14, 28, .97) 66%, rgba(17, 25, 38, .95)); box-shadow: 0 25px 70px rgba(0, 0, 0, .29), inset 0 1px rgba(255, 255, 255, .08); }
.interpretation-card::before { position: absolute; top: 0; left: 6%; width: 40%; height: 1px; background: linear-gradient(90deg, transparent, rgba(229, 196, 125, .8), rgba(174, 146, 255, .36), transparent); content: ""; }
.interpretation-heading { display: flex; align-items: center; gap: 12px; }
.small-ornament { color: var(--gold); font: 22px var(--display); text-shadow: 0 0 15px rgba(229, 196, 125, .35); }
.reading-overview h3, .reading-card-section > h3, .reading-themes h3 { margin: 28px 0 10px; color: #eaf3fd; font: 520 26px/1.25 var(--display); letter-spacing: -.035em; }
.reading-analysis h3 { margin: 0 0 10px; color: #eaf3fd; font: 520 23px/1.25 var(--display); letter-spacing: -.035em; }
.interpretation-summary { max-width: 890px; margin: 18px 0 10px; color: #e3edf6; font: 400 clamp(17px, 1.5vw, 21px)/1.76 var(--serif); }
.interpretation-summary p { margin: 0 0 15px; }
.orientation-summary { margin: 0 0 21px; color: #9cadc1; font-size: 11px; line-height: 1.6; }
.reading-card-section > h3 { margin-top: 44px; }
.reading-card-section .reading-cards { margin-bottom: 25px; }
.reading-analysis { margin: 15px 0 19px; padding: 16px 18px; border: 1px solid rgba(142, 242, 235, .18); border-left: 2px solid rgba(142, 242, 235, .62); border-radius: 0 var(--radius-s) var(--radius-s) 0; background: linear-gradient(105deg, rgba(20, 48, 60, .34), rgba(10, 18, 34, .22)); }
.reading-analysis-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0; }
.reading-analysis-fact { min-width: 0; }
.reading-analysis-fact dt { color: #9cacc0; font: 700 8px var(--display); letter-spacing: .12em; text-transform: uppercase; }
.reading-analysis-fact dd { margin: 4px 0 0; color: #e9d59e; font: 500 13px/1.45 var(--display); overflow-wrap: anywhere; }
.reading-analysis-prose { margin-top: 9px; color: #d3e1ec; font: 400 13px/1.6 var(--serif); }
.reading-analysis-prose p { margin: 0 0 7px; }
.reading-analysis-prose p:last-child { margin-bottom: 0; }
.reading-analysis-note { margin: 7px 0 0; color: #aab9ca; font-size: 11px; line-height: 1.55; }
.interpretation-entries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.interpretation-entry { min-width: 0; padding: 16px 17px; border: 1px solid rgba(148, 192, 223, .17); border-left: 2px solid rgba(142, 242, 235, .66); border-radius: 0 var(--radius-s) var(--radius-s) 0; background: linear-gradient(112deg, rgba(18, 31, 48, .72), rgba(8, 15, 29, .53)); box-shadow: inset 0 1px rgba(255, 255, 255, .035); }
.interpretation-entry > summary { display: flex; min-height: 44px; align-items: center; flex-wrap: wrap; gap: 5px 9px; color: #e7f1fa; cursor: pointer; list-style: none; }
.interpretation-entry > summary::-webkit-details-marker { display: none; }
.entry-heading { display: flex; min-height: 31px; align-items: center; flex-wrap: wrap; gap: 5px 9px; margin-bottom: 11px; }
.entry-position { color: #a7eeea; font: 750 9px var(--display); letter-spacing: .1em; text-transform: uppercase; }
.entry-card-name { color: #f4e9ce; font: 500 18px/1.3 var(--display); }
.entry-orientation { padding: 3px 7px; border: 1px solid rgba(142, 242, 235, .32); border-radius: 14px; color: #a9f1ea; font: 650 8px var(--display); }
.entry-orientation.is-reversed { border-color: rgba(240, 155, 133, .43); color: #ffc0a9; }
.entry-meaning { margin: 0 0 15px; }
.entry-meaning h4 { margin: 0 0 6px; color: var(--gold); font: 750 9px var(--display); letter-spacing: .1em; text-transform: uppercase; }
.entry-meaning p { margin: 0; color: #c4d3e2; font-size: 12px; line-height: 1.7; }
.entry-source { margin: 13px 0 0; color: #8293aa; font-size: 10px; line-height: 1.55; }
.reading-themes ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.reading-themes li { padding: 7px 11px; border: 1px solid rgba(142, 242, 235, .25); border-radius: 20px; background: linear-gradient(135deg, rgba(42, 91, 94, .27), rgba(54, 48, 91, .24)); color: #d5e8ed; font-size: 10px; }
.reading-reflection { margin-top: 27px; padding: 19px 22px 21px; border: 1px solid rgba(229, 196, 125, .22); border-left: 2px solid var(--gold); border-radius: 0 var(--radius-m) var(--radius-m) 0; background: linear-gradient(95deg, rgba(99, 76, 45, .22), rgba(41, 34, 51, .08) 68%, transparent); box-shadow: inset 12px 0 24px rgba(229, 196, 125, .035); }
.reading-reflection .step-label { margin-bottom: 8px; color: var(--gold); }
.reading-reflection p:last-child { margin: 0; color: #f0e8d8; font: 17px/1.7 var(--serif); }
.source-detail { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--surface-rule); }
.source-detail p { margin: 12px 0 7px; color: #9aaec2; font-size: 11px; }
.source-detail a { color: #9cece8; font-size: 11px; }

.math-summary { margin: 27px 0 28px; padding: clamp(21px, 3vw, 35px); border: 1px solid rgba(130, 183, 220, .27); border-radius: var(--radius-m); background: radial-gradient(ellipse at 90% 0%, rgba(95, 115, 189, .15), transparent 42%), linear-gradient(138deg, rgba(16, 27, 46, .93), rgba(8, 14, 27, .96)); box-shadow: 0 21px 53px rgba(0, 0, 0, .22), inset 0 1px rgba(255, 255, 255, .075); }
.math-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.math-heading h3 { margin: 6px 0 0; color: var(--text); font: 520 27px/1.25 var(--display); letter-spacing: -.035em; }
.math-mark { color: var(--cyan); font: 34px var(--serif); text-shadow: 0 0 17px rgba(142, 242, 235, .32); }
.math-observations { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 21px; }
.math-observation { min-width: 0; padding: 14px; border: 1px solid rgba(153, 188, 221, .2); border-radius: var(--radius-s); background: linear-gradient(145deg, rgba(14, 25, 43, .89), rgba(8, 14, 27, .88)); box-shadow: inset 0 1px rgba(255, 255, 255, .06); }
.math-observation .label { display: block; color: #9cacc0; font: 700 8px var(--display); letter-spacing: .12em; text-transform: uppercase; }
.math-observation .value { display: block; margin-top: 8px; color: #e9d59e; font: 550 18px/1.4 var(--display); overflow-wrap: anywhere; }
.math-observation .detail { display: block; margin-top: 6px; color: #a2b0c2; font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.math-disclaimer { margin: 15px 0 0; color: #9eacbe; font-size: 10px; line-height: 1.6; }
.advanced-entry { margin-top: 31px; border-top: 1px solid var(--surface-rule); border-bottom: 1px solid var(--surface-rule); }
.advanced-button { display: flex; width: 100%; min-height: 82px; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 8px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.advanced-button strong, .advanced-button small { display: block; }
.advanced-button strong { color: #edf6ff; font: 520 22px/1.3 var(--display); }
.advanced-button small { margin-top: 5px; color: #94a6bc; font-size: 10px; }
.advanced-arrow { color: var(--cyan); font-size: 25px; text-shadow: 0 0 16px rgba(142, 242, 235, .32); transition: transform .2s ease; }
.advanced-button[aria-expanded="true"] .advanced-arrow { transform: rotate(45deg); }
.advanced-panel { padding: 27px 0 9px; border-bottom: 1px solid var(--surface-rule); }
.advanced-panel h3 { margin: 0; color: #edf6ff; font: 540 28px/1.25 var(--display); letter-spacing: -.035em; }
.advanced-panel h4 { margin: 0; color: #e6d19b; font: 550 17px/1.35 var(--display); }
.advanced-intro { margin: 8px 0 20px; color: #b7c7d8; font-size: 11px; line-height: 1.65; }
.advanced-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.analysis-card { min-width: 0; padding: 19px; border: 1px solid rgba(158, 192, 221, .2); border-radius: var(--radius-m); background: radial-gradient(ellipse at 100% 0, rgba(117, 110, 183, .13), transparent 46%), linear-gradient(145deg, rgba(21, 33, 54, .91), rgba(8, 15, 29, .95)); box-shadow: inset 0 1px rgba(255, 255, 255, .07), 0 16px 30px rgba(0, 0, 0, .14); }
.analysis-card p { margin: 9px 0 0; color: #c3d0de; font-size: 11px; line-height: 1.65; }
.analysis-metric { display: block; margin-top: 9px; color: #ead69f; font: 550 21px/1.4 var(--display); }
.analysis-note { color: #9eafc2 !important; font-size: 10px !important; }
.analysis-facts { display: grid; gap: 8px; margin: 14px 0 0; padding-left: 19px; color: #cad6e3; font-size: 11px; line-height: 1.6; }
.analysis-facts li::marker { color: var(--cyan); }
.analysis-result { padding: 11px 13px; border: 1px solid rgba(142, 242, 235, .27); border-radius: var(--radius-s); background: linear-gradient(110deg, rgba(25, 73, 76, .31), rgba(43, 44, 83, .23)); color: #ecf9fb !important; font-size: 11px !important; overflow-wrap: anywhere; }
.research-documentation { margin: 14px 0 0; color: #9eafc2; font-size: 10px; line-height: 1.6; }
.research-documentation a { color: #a7f4ec; }
.reading-analysis-details { margin-top: 16px; padding: 15px; border: 1px solid rgba(156, 191, 217, .2); border-radius: var(--radius-m); background: linear-gradient(135deg, rgba(13, 22, 39, .91), rgba(8, 14, 28, .94)); }
.reading-analysis-details > summary { display: flex; min-height: 46px; align-items: center; color: #e8d59e; cursor: pointer; font-size: 12px; font-weight: 650; }
.analysis-table-scroll { max-width: 100%; margin-top: 13px; overflow-x: auto; overscroll-behavior-inline: contain; border-radius: var(--radius-s); }
.analysis-table-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.analysis-table { width: 100%; min-width: 560px; border-collapse: collapse; color: #c5d2e0; font-size: 10px; line-height: 1.55; }
.analysis-table caption { padding: 5px 0 9px; color: #eff7ff; font-size: 11px; font-weight: 700; text-align: left; }
.analysis-table th, .analysis-table td { padding: 8px 9px; border: 1px solid rgba(155, 192, 218, .18); text-align: left; vertical-align: top; }
.analysis-table th { background: linear-gradient(120deg, rgba(43, 63, 90, .87), rgba(37, 42, 82, .72)); color: #dfebf7; font-weight: 650; }
.analysis-table td { overflow-wrap: anywhere; }
.method-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.method-tags span { padding: 5px 8px; border: 1px solid var(--surface-rule); border-radius: 16px; color: #c7d5e3; font-size: 9px; }
.reproducibility-detail { margin: 29px 0 23px; padding: 14px 16px; border: 1px solid rgba(150, 190, 218, .2); border-radius: var(--radius-m); background: linear-gradient(130deg, rgba(12, 21, 37, .9), rgba(9, 14, 27, .91)); }
.record-actions { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin: 11px 0; }
.record-actions p { margin: 0; color: #9eafc2; font-size: 10px; }
.reproducibility-detail pre { max-height: 320px; overflow: auto; margin: 0; padding: 13px; border: 1px solid rgba(148, 184, 208, .2); border-radius: var(--radius-s); background: #060b15; color: #c4d9dd; font: 10px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.site-footer { display: flex; flex-direction: column; gap: 15px; margin: 55px auto 0; padding: 21px 0 max(30px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(161, 187, 217, .15); color: #8e9fb5; font-size: 10px; }
.site-footer p { margin: 0; }
.site-footer a { color: #a3efe9; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-information { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.public-information { min-width: 0; padding: 0 12px 11px; border: 1px solid rgba(161, 187, 217, .15); border-radius: var(--radius-s); background: rgba(11, 18, 32, .45); }
.public-information summary { display: flex; min-height: 42px; align-items: center; color: #cbd9e8; cursor: pointer; font-size: 12px; list-style-position: inside; }
.public-information summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.public-information[open] summary { border-bottom: 1px solid var(--surface-rule); }
.public-information-content { color: #9eafc2; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.public-information-content p { margin: 10px 0 0; }
.product-source-groups { display: grid; gap: 9px; margin-top: 12px; }
.product-source-group h4 { margin: 0 0 5px; color: #cbd9e8; font-size: 11px; }
.product-source-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.product-source-list li { min-width: 0; }
.product-source-list strong, .product-source-list span { display: block; }
.product-source-list strong { color: #d8e4ef; font-size: 11px; font-weight: 600; }
.product-source-list a { font-size: 11px; overflow-wrap: anywhere; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

@keyframes field-turn { to { transform: rotate(360deg); } }
@keyframes glass-breath { 0%, 100% { opacity: .82; transform: translate(-50%, -50%) rotateX(9deg) rotateZ(-8deg) scale(.985); } 50% { opacity: 1; transform: translate(-50%, -50%) rotateX(7deg) rotateZ(-5deg) scale(1.018); } }
@keyframes reveal-in { from { opacity: 0; transform: translateY(30px) translateZ(-34px) rotateX(12deg) scale(.94); filter: brightness(.72) blur(2px); } to { opacity: 1; transform: translateY(0) translateZ(0) rotateX(0) scale(1); filter: brightness(1) blur(0); } }
@keyframes relation-flow { to { stroke-dashoffset: -72; } }

@media (hover: hover) and (pointer: fine) {
  .spread-option:hover { transform: translateY(-4px) rotateX(1deg); border-color: rgba(150, 239, 235, .56); box-shadow: inset 0 1px rgba(255, 255, 255, .12), 0 20px 34px rgba(0, 0, 0, .3); }
  .button-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(53, 153, 173, .33), inset 0 1px rgba(255, 255, 255, .8); }
  .button-primary:hover:not(:disabled)::before { left: 130%; }
  .button-quiet:hover, .button-small:hover { border-color: rgba(142, 242, 235, .67); color: #efffff; }
  .hidden-card:hover { border-color: var(--cyan); box-shadow: 0 0 22px rgba(83, 222, 226, .42), 0 18px 28px rgba(0, 0, 0, .55), inset 1px 1px rgba(255, 255, 255, .4); filter: brightness(1.2); }
  .reading-card:hover { transform: translateY(-3px) translateZ(9px); box-shadow: 0 27px 51px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .14); }
}

@media (max-width: 1040px) {
  :root { --page-edge: clamp(21px, 4vw, 46px); }
  .intro { grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr); gap: 9px; min-height: 550px; }
  .intro h1 { font-size: clamp(47px, 6.5vw, 72px); }
  .hero-instrument { min-height: 440px; }
  .instrument-diagram { width: min(108%, 510px); }
  .setup-grid { grid-template-columns: minmax(215px, .8fr) minmax(0, 1.25fr); gap: 24px; }
  .spread-options { grid-template-columns: 1fr; gap: 9px; }
  .spread-option { min-height: 86px; flex-direction: row; align-items: center; padding: 10px 13px; }
  .spread-option-top { width: 92px; flex: 0 0 92px; }
  .spread-option-copy { flex: 1; }
  .card-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --page-edge: max(17px, env(safe-area-inset-left)); }
  .topbar { min-height: 64px; padding-right: max(17px, env(safe-area-inset-right)); }
  .brand-name { font-size: 10px; letter-spacing: .15em; }
  .brand-light { letter-spacing: .1em; }
  .privacy-note { font-size: 10px; }
  .reading-path { margin-top: 12px; }
  .reading-step { display: grid; grid-template-rows: auto auto; justify-items: start; gap: 4px; padding: 8px 3px; font-size: 8px; }
  .reading-step::after { top: 16px; right: -1px; left: 29px; }
  .reading-step b { max-width: 100%; font-size: 8px; }
  .intro { grid-template-columns: 1fr; gap: 0; min-height: auto; padding: 10px 0 43px; }
  .hero-instrument { order: -1; width: min(100%, 490px); min-height: 300px; justify-self: center; }
  .instrument-glass { width: min(83%, 365px); }
  .instrument-diagram { width: min(90%, 340px); }
  .instrument-caption { top: 3%; right: 7%; left: 7%; font-size: 8px; }
  .instrument-equation { margin-top: -13px; font-size: 18px; }
  .instrument-note { font-size: 8px; }
  .instrument-base { height: 11px; }
  .intro-copy-wrap { order: 0; padding: 0 1px; }
  .intro h1 { margin: 13px 0 13px; font-size: clamp(43px, 11.2vw, 70px); }
  .intro-copy { max-width: 580px; font-size: 14px; }
  .intro-cta { min-height: 53px; margin-top: 18px; }
  .intro-boundary { margin-top: 13px; }
  .hero-readout { gap: 8px 19px; margin-top: 20px; padding-top: 13px; }
  .hero-readout span { font-size: 9px; }
  .setup-panel, .selection-panel { margin-bottom: 41px; padding: 25px 19px; border-radius: var(--radius-m); backdrop-filter: blur(8px); }
  .setup-heading { margin-bottom: 22px; }
  .setup-heading h2 { font-size: 28px; }
  .optional-label { max-width: 130px; font-size: 8px; text-align: center; white-space: normal; }
  .setup-grid { grid-template-columns: 1fr; gap: 25px; }
  textarea { min-height: 122px; }
  .privacy-caption { margin-top: 14px; }
  .spread-heading { align-items: flex-start; }
  .spread-hint { max-width: 180px; }
  .spread-options { gap: 8px; }
  .spread-option { min-height: 88px; padding: 10px 12px; }
  .spread-option-top { width: 78px; flex-basis: 78px; }
  .spread-option strong { font-size: 12px; }
  .spread-option small { font-size: 10px; }
  .setup-actions { align-items: stretch; flex-direction: column; margin-top: 19px; }
  .setup-assurance { order: 2; text-align: center; }
  .setup-actions .button { width: 100%; }
  .seed-row { grid-template-columns: 1fr; gap: 7px; }
  .selection-panel { padding: 23px 15px; }
  .selection-topline { align-items: flex-start; gap: 12px; }
  .selection-topline h2 { max-width: 360px; font-size: 27px; }
  .section-copy { max-width: 430px; font-size: 11px; }
  .selection-progress { min-width: 63px; font-size: 27px; }
  .selection-instrument-note { align-items: flex-start; }
  .selection-instrument-note p { font-size: 10px; }
  .instrument-note-math { display: none; }
  .card-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 9px 7px; padding: 15px 10px 20px; }
  .hidden-card { min-height: 51px; border-radius: 7px; }
  .selection-footer { align-items: stretch; flex-direction: column; padding-top: 16px; }
  .selection-status { min-height: 22px; }
  .selection-footer .button { width: 100%; }
  .reading-header { align-items: flex-start; gap: 11px; margin-top: 12px; }
  .reading-header h2 { max-width: 470px; font-size: 36px; }
  .reading-header .button { flex: 0 0 auto; padding: 0 14px; font-size: 10px; }
  .reading-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .reading-cards.is-three { max-width: 520px; grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .reading-cards.is-three .face-frame { max-width: 226px; }
  .reading-cards.is-single { max-width: 410px; grid-template-columns: minmax(0, 1fr); }
  .reading-cards.is-single .reading-card { padding: 13px; }
  .reading-cards.is-celtic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; gap: 12px; }
  .reading-cards.is-celtic .reading-card { grid-column: auto !important; grid-row: auto !important; justify-self: stretch; width: auto; padding: 8px; }
  .reading-card { padding: 8px; }
  .reading-card h3 { font-size: 16px; }
  .reading-cards.is-celtic .reading-card h3 { font-size: 15px; }
  .reading-cards.is-celtic .card-position { min-height: 37px; flex-wrap: wrap; font-size: 8px; letter-spacing: .06em; }
  .reading-cards.is-celtic .face-frame { max-width: 100%; }
  .reading-geometry-caption { font-size: 8px; }
  .interpretation-card { padding: 24px 19px; border-radius: var(--radius-m); }
  .reading-overview h3, .reading-card-section > h3, .reading-themes h3 { font-size: 24px; }
  .interpretation-summary { font-size: 17px; line-height: 1.62; }
  .interpretation-entries { grid-template-columns: 1fr; }
  .reading-card-section > h3 { margin-top: 24px; margin-bottom: 15px; }
  .reading-card-section .reading-cards { margin-bottom: 13px; }
  .interpretation-entry { padding: 11px 12px; }
  .entry-heading { min-height: 27px; margin-bottom: 8px; }
  .entry-meaning { margin-bottom: 8px; }
  .entry-meaning h4 { margin-bottom: 4px; }
  .entry-meaning p { line-height: 1.58; }
  .entry-source { margin-top: 8px; }
  .reading-analysis { margin: 12px 0 16px; padding: 13px 14px; }
  .reading-analysis h3 { font-size: 22px; }
  .reading-card-section > h3 { margin-top: 24px; margin-bottom: 15px; }
  .reading-card-section .reading-cards { margin-bottom: 13px; }
  .interpretation-entry { padding: 11px 12px; }
  .entry-heading { min-height: 27px; margin-bottom: 8px; }
  .entry-meaning { margin-bottom: 8px; }
  .entry-meaning h4 { margin-bottom: 4px; }
  .entry-meaning p { line-height: 1.58; }
  .entry-source { margin-top: 8px; }
  .math-summary { padding: 21px 16px; }
  .math-observations { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .math-observation { padding: 11px; }
  .advanced-grid { grid-template-columns: 1fr; }
  .site-footer { gap: 9px; margin-top: 38px; }
  .footer-information { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 560px) {
  .reading-header { display: block; }
  .reading-actions { margin-top: 12px; justify-content: flex-start; }
  .privacy-note { display: none; }
  .language-switch button { min-width: 64px; padding-inline: 9px; }
  .card-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 6px; padding: 14px 8px 18px; }
  .reading-cards.is-celtic { gap: 9px; }
  .reading-cards.is-celtic .reading-card { padding: 7px; }
  .reading-cards.is-celtic .card-position { min-height: 42px; }
  .analysis-table-scroll { overflow: visible; }
  .analysis-table { display: block; width: 100%; min-width: 0; }
  .analysis-table caption { display: block; }
  .analysis-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .analysis-table tbody { display: grid; gap: 9px; }
  .analysis-table tr { display: grid; min-width: 0; padding: 6px 10px; border: 1px solid rgba(155, 192, 218, .21); border-radius: var(--radius-s); background: linear-gradient(137deg, rgba(20, 34, 54, .9), rgba(8, 14, 28, .95)); }
  .analysis-table td { display: grid; min-width: 0; grid-template-columns: minmax(91px, .38fr) minmax(0, 1fr); gap: 10px; padding: 8px 0; border: 0; border-bottom: 1px solid rgba(155, 192, 218, .1); }
  .analysis-table td:last-child { border-bottom: 0; }
  .analysis-table td::before { color: #a7bed1; content: attr(data-label); font: 700 8px/1.5 var(--display); letter-spacing: .055em; text-transform: uppercase; }
  .analysis-table td { color: #d0dce9; }
}

@media (max-width: 420px) {
  :root { --page-edge: max(15px, env(safe-area-inset-left)); }
  .topbar { min-height: 61px; padding-right: max(15px, env(safe-area-inset-right)); }
  .brand { gap: 9px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 9px; letter-spacing: .13em; }
  .brand-light { display: none; }
  .privacy-note { gap: 6px; font-size: 9px; }
  .reading-step b { font-size: 7px; }
  .reading-step { font-size: 8px; }
  .hero-instrument { min-height: 273px; }
  .instrument-glass { width: min(82%, 310px); }
  .instrument-diagram { width: min(88%, 300px); }
  .instrument-caption { right: 4%; left: 4%; font-size: 7px; }
  .instrument-equation { margin-top: -13px; font-size: 16px; }
  .instrument-note { margin-top: 2px; font-size: 7px; }
  .intro h1 { font-size: clamp(41px, 11.5vw, 53px); }
  .intro-copy { font-size: 13px; }
  .hero-readout { gap: 9px 14px; margin-top: 17px; }
  .hero-readout span { font-size: 8px; }
  .setup-panel { padding: 21px 15px; }
  .setup-heading h2 { max-width: 270px; font-size: 25px; }
  .optional-label { max-width: 102px; padding: 6px; font-size: 7px; }
  .spread-heading { display: block; }
  .spread-hint { margin-top: 5px; text-align: left; }
  .spread-option { min-height: 82px; padding: 9px 10px; }
  .spread-option-top { width: 68px; flex-basis: 68px; }
  .spread-option-copy { padding-right: 12px; }
  .selection-topline h2 { max-width: 258px; font-size: 23px; }
  .selection-progress { min-width: 47px; font-size: 23px; }
  .selection-panel { padding: 20px 12px; }
  .card-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 6px; padding: 12px 7px 16px; }
  .hidden-card { min-height: 48px; }
  .reading-header { gap: 8px; }
  .reading-header h2 { max-width: 255px; font-size: 30px; }
  .reading-header .button { min-height: 44px; padding: 0 10px; }
  .reading-cards.is-celtic { gap: 7px; }
  .reading-cards.is-celtic .reading-card { padding: 6px; }
  .reading-cards.is-celtic .card-position { min-height: 43px; }
  .reading-cards.is-celtic .reading-card h3 { font-size: 13px; }
  .math-observation { padding: 10px 9px; }
  .math-observation .value { font-size: 15px; }
  .analysis-table td { grid-template-columns: minmax(78px, .34fr) minmax(0, 1fr); gap: 8px; }
  .record-actions { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ambient-geometry, .instrument-glass, .reading-relations line { animation: none !important; }
  .reading-card { animation: none !important; transform: none !important; filter: none !important; }
}

@media (prefers-contrast: more) {
  :root { --surface-rule: rgba(216, 234, 245, .46); --muted: #c1cfde; --quiet: #aebbd0; }
  .spread-option, .math-observation, .analysis-card, .interpretation-entry, .hidden-card { border-color: rgba(216, 234, 245, .54); }
}

@media (forced-colors: active) {
  .ambient-field, .instrument-glass { display: none; }
  .spread-option, .button, .reading-card, .math-observation, .analysis-card { border: 1px solid CanvasText; }
  .spread-option.is-active, .hidden-card[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: 2px; }
  :focus-visible { outline: 2px solid Highlight; box-shadow: none; }
}
