:root {
  color-scheme: dark;
  --bg: #050712;
  --panel: rgba(14, 19, 42, .9);
  --panel-soft: rgba(23, 30, 61, .6);
  --line: rgba(174, 190, 246, .17);
  --line-gold: rgba(232, 187, 90, .34);
  --text: #f7f4ec;
  --muted: #b4bdd4;
  --faint: #7f8aa9;
  --gold: #e6b95a;
  --gold-light: #fff0ac;
  --blue: #8fa7ff;
  --danger: #ff9aa4;
  --success: #8fdcbf;
  --radius-xl: 30px;
  --radius-lg: 21px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }
html { background: #02030a; scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 5%, rgba(65, 83, 166, .25), transparent 36rem),
    radial-gradient(circle at 87% 28%, rgba(165, 112, 34, .14), transparent 31rem),
    linear-gradient(180deg, #070a19, var(--bg) 48%, #02030a);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

.cosmic-backdrop {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  overflow: hidden;
}
.cosmic-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .15;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.6) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(143,166,255,.45) 0 1px, transparent 1.4px);
  background-position: 0 0, 37px 21px;
  background-size: 91px 91px, 137px 137px;
  mask-image: linear-gradient(#000, transparent 78%);
}
.cosmic-backdrop span {
  position: absolute;
  width: 820px;
  height: 820px;
  left: 50%;
  top: -540px;
  translate: -50% 0;
  border: 1px solid rgba(230, 186, 91, .1);
  border-radius: 50%;
}
.cosmic-backdrop span + span { width: 1080px; height: 1080px; top: -670px; }

.side-cover { display: none; }

.top-controls {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding-top: calc(14px + var(--safe-top));
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.astro-link, .language-control {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 9, 23, .8);
  box-shadow: 0 13px 36px rgba(0,0,0,.23);
  backdrop-filter: blur(18px);
}
.astro-link {
  padding: 0 16px;
  color: #e7eafe;
  text-decoration: none;
  font-size: .77rem;
  font-weight: 800;
}
.astro-link span:first-child { color: var(--gold); }
.language-control { padding: 4px 5px 4px 13px; color: var(--gold); }
.language-control label { color: var(--muted); font-size: .72rem; font-weight: 800; }
.language-count {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232,187,90,.35);
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(232,187,90,.08);
  font: 800 .65rem/1 Inter, sans-serif;
}
.language-control select {
  width: auto;
  min-width: 170px;
  min-height: 35px;
  border: 0;
  border-radius: 999px;
  padding: 0 29px 0 12px;
  color: #f7f4ec;
  background: rgba(255,255,255,.07);
}
.language-control select option {
  color: #111827;
  -webkit-text-fill-color: #111827;
  background-color: #fffdf7;
}
.language-control select option:checked {
  color: #080b18;
  -webkit-text-fill-color: #080b18;
  background-color: #e6c46e;
}

.local-open-warning {
  width: min(1120px, calc(100% - 40px));
  margin: 14px auto 0;
  position: relative;
  z-index: 3;
  display: grid;
  gap: 2px;
  padding: 15px 18px;
  border: 1px solid rgba(255,195,96,.5);
  border-radius: 16px;
  color: #fff1c2;
  background: rgba(70,42,6,.94);
  box-shadow: 0 15px 42px rgba(0,0,0,.34);
  font-size: .8rem;
}
.local-open-warning span { color: #ecdcb7; }

.shell, footer { width: min(1120px, calc(100% - 40px)); margin-left: auto; margin-right: auto; }
.top-controls, .shell, footer { position: relative; z-index: 1; }
.shell { margin-top: 20px; }
.hero {
  min-height: 500px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(270px, .7fr);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 38px;
  padding: 52px clamp(28px, 5vw, 62px);
  background:
    radial-gradient(circle at 78% 50%, rgba(226, 176, 64, .17), transparent 21rem),
    radial-gradient(circle at 10% 0%, rgba(92, 110, 211, .26), transparent 27rem),
    linear-gradient(135deg, rgba(21, 28, 64, .97), rgba(6, 9, 24, .98));
  box-shadow: 0 28px 90px rgba(0,0,0,.46);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(255,255,255,.04), transparent 36%),
    repeating-linear-gradient(135deg, transparent 0 42px, rgba(255,255,255,.012) 42px 43px);
}
.brand {
  position: absolute;
  top: 28px;
  left: clamp(28px, 5vw, 62px);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { width: 46px; height: 46px; }
.brand div { display: grid; line-height: 1; }
.brand strong { font-size: .83rem; letter-spacing: .19em; }
.brand span { margin-top: 6px; color: var(--gold); font-size: .66rem; letter-spacing: .34em; }
.hero-copy { position: relative; z-index: 2; max-width: 680px; padding-top: 58px; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: .69rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 760px;
  margin: 0;
  font: 500 clamp(2.65rem, 5.2vw, 5.2rem)/.98 Georgia, "Times New Roman", serif;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.hero-accent {
  max-width: 680px;
  margin: 23px 0 0;
  color: var(--gold-light);
  font: 500 clamp(1.05rem, 2vw, 1.36rem)/1.38 Georgia, serif;
}
.hero-text { max-width: 680px; margin: 14px 0 0; color: var(--muted); }
.hero-actions {
  margin-top: 25px;
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.hero-actions button {
  position: relative;
  z-index: 2;
  min-height: 68px;
  border-radius: 17px;
  color: var(--text);
  cursor: pointer;
}
.hero-primary {
  max-width: 470px;
  flex: 1 1 390px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  border: 1px solid rgba(239,199,105,.5);
  padding: 10px 15px 10px 11px;
  text-align: left;
  background: linear-gradient(135deg, rgba(132,92,21,.45), rgba(33,26,22,.78));
  box-shadow: 0 13px 35px rgba(0,0,0,.24), inset 0 1px rgba(255,239,178,.14);
}
.hero-primary:hover { border-color: rgba(255,222,139,.8); translate: 0 -1px; }
.hero-primary > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.hero-primary strong { font: 500 1.03rem/1.2 Georgia,serif; }
.hero-primary small { overflow: hidden; color: #c9c0ae; font-size: .66rem; white-space: nowrap; text-overflow: ellipsis; }
.hero-primary i { color: var(--gold-light); font-size: 1.2rem; font-style: normal; }
.hero-action-mark {
  width: 52px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,226,156,.25);
  border-radius: 13px;
  color: var(--gold-light);
  background: rgba(5,7,18,.42);
  font: 700 .78rem/1 Georgia,serif;
}
.hero-secondary {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  padding: 0 17px;
  background: rgba(7,10,25,.62);
}
.hero-secondary span { color: var(--blue); }
.hero-secondary strong { font-size: .75rem; }
.hero-symbol {
  width: min(340px, 100%);
  aspect-ratio: 1;
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  justify-self: end;
}
.hero-symbol::before, .hero-symbol::after {
  content: "";
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(231, 188, 91, .38);
  border-radius: 50%;
  transform: rotate(-23deg) scaleY(.51);
}
.hero-symbol::after { inset: 1%; border-color: rgba(142, 166, 255, .27); transform: rotate(43deg) scaleY(.7); }
.hero-seven {
  color: transparent;
  background: linear-gradient(145deg, #fff3b8, #d5a646 54%, #82501a);
  background-clip: text;
  -webkit-background-clip: text;
  font: 500 clamp(10rem, 18vw, 14rem)/.8 Georgia, serif;
  filter: drop-shadow(0 0 25px rgba(231,187,89,.22));
}
.hero-symbol i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-light); box-shadow: 0 0 18px var(--gold); }
.hero-symbol i:nth-child(2) { top: 23%; right: 10%; }
.hero-symbol i:nth-child(3) { left: 19%; bottom: 17%; background: var(--blue); }
.hero-symbol i:nth-child(4) { top: 11%; left: 34%; width: 5px; height: 5px; }

.panel {
  margin-top: 22px;
  padding: clamp(25px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(140deg, rgba(255,255,255,.025), transparent 36%), var(--panel);
  box-shadow: 0 20px 65px rgba(0,0,0,.29);
  backdrop-filter: blur(16px);
}
.section-heading h2, .subhead, .astro-gateway h2 {
  margin: 0;
  font: 500 clamp(1.7rem, 3vw, 2.45rem)/1.12 Georgia, serif;
}
.section-heading > p:last-child:not(.eyebrow) { max-width: 780px; margin: 9px 0 0; color: var(--muted); }

.tool-panel { padding-bottom: 28px; }
.tool-tabs { margin-top: 25px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
.tool-tab {
  min-height: 126px;
  position: relative;
  display: grid;
  align-content: center;
  gap: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  color: var(--text);
  text-align: left;
  background: rgba(7,10,26,.67);
  cursor: pointer;
  transition: .2s ease;
}
.tool-tab:hover { border-color: rgba(232,187,90,.38); translate: 0 -1px; }
.tool-tab.active { border-color: var(--line-gold); background: linear-gradient(145deg,rgba(103,73,26,.25),rgba(12,17,40,.9)); box-shadow: inset 0 1px rgba(255,238,172,.08); }
.tab-number { position: absolute; right: 15px; top: 7px; color: rgba(241,202,112,.1); font: 500 3.3rem/1 Georgia,serif; }
.tool-tab strong { position: relative; font: 500 1.2rem Georgia,serif; }
.tool-tab small { position: relative; max-width: 260px; color: var(--muted); font-size: .74rem; }
.tool-view { scroll-margin-top: 12px; }

.form-grid { margin-top: 27px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.form-grid .span-two { grid-column: 1 / -1; }
label { min-width: 0; display: flex; flex-direction: column; gap: 8px; color: #e8eaf3; font-size: .82rem; font-weight: 780; }
label em, legend em { color: var(--faint); font-style: normal; font-size: .68rem; font-weight: 600; }
label small { color: var(--faint); font-weight: 500; }
input, select {
  width: 100%;
  min-height: 53px;
  border: 1px solid rgba(181,195,248,.19);
  border-radius: 14px;
  outline: 0;
  padding: 0 15px;
  color: var(--text);
  background: rgba(2,4,14,.61);
  transition: .18s ease;
}
input:focus, select:focus { border-color: rgba(230,186,90,.68); box-shadow: 0 0 0 4px rgba(230,186,90,.1); }
input::placeholder { color: #6f7895; }

.primary-button, .secondary-button {
  min-height: 54px;
  border: 0;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 0 24px;
  text-decoration: none;
  font-weight: 880;
  cursor: pointer;
}
.primary-button {
  width: 100%;
  margin-top: 21px;
  color: #181005;
  background: linear-gradient(135deg,#f1cd77,#c98b30);
  box-shadow: 0 15px 35px rgba(184,119,32,.19);
}
.primary-button:disabled { opacity: .55; cursor: wait; }
.secondary-button { flex: 0 0 auto; border: 1px solid rgba(151,174,255,.34); color: #eef0ff; background: rgba(89,110,196,.18); }
.method-note {
  margin-top: 20px;
  padding: 15px 17px;
  display: flex;
  gap: 12px;
  border: 1px solid var(--line-gold);
  border-radius: 15px;
  background: rgba(105,75,25,.1);
}
.method-note span { color: var(--gold); font: 500 1.3rem Georgia,serif; }
.method-note p { margin: 0; color: #d8d5c7; font-size: .79rem; }
.form-status { margin-top: 15px; padding: 13px 15px; border-radius: 13px; font-size: .8rem; }
.form-status.error { border: 1px solid rgba(255,154,164,.3); color: #ffd1d6; background: rgba(128,27,43,.18); }
.form-status.loading { border: 1px solid var(--line); color: var(--muted); background: rgba(16,22,47,.58); }

.relation-inputs { margin-top: 27px; display: grid; grid-template-columns: 1fr 54px 1fr; align-items: center; gap: 12px; }
fieldset { min-width: 0; margin: 0; padding: 21px; display: grid; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(7,10,26,.55); }
legend { padding: 0 8px; display: flex; align-items: center; gap: 9px; font: 500 1rem Georgia,serif; }
legend span { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--line-gold); border-radius: 50%; color: var(--gold-light); }
.relation-mark { display: grid; place-items: center; }
.relation-mark span { width: 45px; height: 45px; display: grid; place-items: center; border: 1px solid var(--line-gold); border-radius: 50%; color: var(--gold); font: 500 1.4rem Georgia,serif; }
.compact-grid { margin-top: 20px; }

.results { scroll-margin-top: 14px; }
.result-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  background:
    radial-gradient(circle at 86% 50%, rgba(225,176,68,.16), transparent 18rem),
    linear-gradient(135deg,rgba(25,32,70,.96),rgba(9,13,32,.95));
}
.result-hero h2 { margin: 0; font: 500 clamp(2rem,4.2vw,3.6rem)/1.02 Georgia,serif; letter-spacing: -.025em; }
.relation-hero h2 span { color: var(--gold); }
.result-hero p:not(.eyebrow) { max-width: 760px; margin: 13px 0 0; color: #d5dae9; }
.result-meta { margin-top: 17px; display: flex; flex-wrap: wrap; gap: 7px; }
.result-meta span { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .69rem; }
.score-orbit {
  width: 182px;
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid rgba(232,188,93,.49);
  border-radius: 50%;
  background: radial-gradient(circle,rgba(233,188,86,.2),transparent 65%),rgba(4,7,19,.68);
  box-shadow: inset 0 0 0 11px rgba(226,184,92,.035),0 0 56px rgba(210,153,51,.13);
}
.score-orbit::after { content: ""; position: absolute; inset: 15px; border: 1px solid rgba(142,165,255,.17); border-radius: 50%; }
.score-orbit strong { position: relative; z-index: 1; color: var(--gold-light); font: 500 4.25rem/.9 Georgia,serif; }
.score-orbit small, .score-orbit span { position: relative; z-index: 1; max-width: 130px; color: var(--muted); font-size: .65rem; }

.number-grid { margin-top: 25px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.mini-number-grid { margin-top: 25px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.number-card {
  min-width: 0;
  position: relative;
  overflow: hidden;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg,rgba(40,50,100,.36),rgba(7,10,27,.68));
}
.number-card::after { content: attr(data-number); position: absolute; right: -8px; bottom: -47px; color: rgba(232,194,106,.05); font: 500 12rem/1 Georgia,serif; }
.number-card-head { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.number-card-head > strong { width: 58px; height: 58px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line-gold); border-radius: 17px; color: var(--gold-light); background: rgba(229,185,90,.08); font: 500 1.9rem Georgia,serif; }
.number-card-head span { color: var(--gold); font-size: .66rem; font-weight: 850; text-transform: uppercase; }
.number-card h3 { margin: 2px 0 0; font: 500 1.3rem Georgia,serif; }
.number-card p { position: relative; z-index: 1; margin: 13px 0 0; color: var(--muted); font-size: .79rem; }
.number-card p b { display: block; margin-bottom: 2px; color: #efede5; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; }
.number-card p.action { padding: 10px 12px; border-left: 2px solid var(--gold); background: rgba(230,184,90,.07); color: #e6deca; }
.number-card > i { position: relative; z-index: 1; margin: 10px 7px 0 0; padding: 3px 8px; display: inline-flex; border-radius: 999px; color: var(--gold-light); background: rgba(227,182,87,.13); font-size: .62rem; font-style: normal; }
.number-card > i.debt { color: #ffd4c0; background: rgba(197,91,56,.15); }

.insight-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.insight-grid article { padding: 15px 17px; border: 1px solid rgba(144,165,242,.19); border-radius: 14px; color: #d9deed; background: rgba(26,34,72,.45); font-size: .79rem; }
.insight-grid article::before { content: "◇"; margin-right: 8px; color: var(--gold); }

.cycle-triptych { margin-top: 25px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.cycle-triptych article { padding: 21px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(8,11,29,.66); }
.cycle-triptych span { color: var(--gold); font-size: .68rem; font-weight: 850; text-transform: uppercase; }
.cycle-triptych strong { display: block; margin-top: 7px; color: var(--gold-light); font: 500 3.2rem/1 Georgia,serif; }
.cycle-triptych p { margin: 10px 0 0; color: var(--muted); font-size: .8rem; }
.subhead { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); font-size: clamp(1.35rem,2.5vw,1.85rem); }
.timeline { margin-top: 17px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.timeline article { position: relative; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: rgba(8,11,29,.65); }
.timeline article.active { border-color: var(--line-gold); background: linear-gradient(145deg,rgba(101,72,28,.22),rgba(11,15,36,.8)); }
.timeline span { color: var(--faint); font-size: .65rem; font-weight: 850; text-transform: uppercase; }
.timeline strong { display: block; margin-top: 6px; color: var(--gold-light); font: 500 2.35rem/1 Georgia,serif; }
.timeline small { color: #d4d8e5; font-size: .7rem; }
.timeline p { margin: 8px 0 0; color: var(--muted); font-size: .73rem; }
.timeline i { display: inline-flex; margin-top: 8px; padding: 3px 7px; border-radius: 999px; color: var(--gold-light); background: rgba(228,184,92,.15); font-size: .6rem; font-style: normal; }
.challenges strong { color: var(--blue); }
.pattern-grid { margin-top: 17px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.pattern-grid article { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(10,14,34,.62); }
.pattern-grid span { color: var(--faint); font-size: .66rem; font-weight: 850; text-transform: uppercase; }
.pattern-grid strong { display: block; margin-top: 9px; color: var(--gold-light); font: 500 1.6rem Georgia,serif; }

.transparency { padding-top: 0; padding-bottom: 0; }
.transparency summary { min-height: 96px; display: flex; align-items: center; gap: 15px; cursor: pointer; list-style: none; }
.transparency summary::-webkit-details-marker { display: none; }
.transparency summary > span { color: var(--gold); font: 500 2rem Georgia,serif; }
.transparency summary div { display: grid; }
.transparency summary strong { font: 500 1.2rem Georgia,serif; }
.transparency summary small { color: var(--muted); }
.calc-body { padding: 23px 0 30px; border-top: 1px solid var(--line); }
.calc-body > p { margin: 0; color: var(--muted); }
.calc-body > p b { margin-right: 8px; color: var(--gold); }
.calc-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.calc-grid code { padding: 14px; border: 1px solid var(--line); border-radius: 13px; color: #e4e7f2; white-space: normal; word-break: break-word; background: rgba(7,10,26,.6); }
.calc-grid code b { display: block; margin-bottom: 5px; color: var(--faint); font-family: Inter,sans-serif; font-size: .64rem; text-transform: uppercase; }
.letter-map { margin-top: 14px; display: grid; grid-template-columns: repeat(9,minmax(0,1fr)); gap: 6px; }
.letter-map span { min-width: 0; padding: 9px 4px; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); text-align: center; font-size: .6rem; word-break: break-all; }
.letter-map b { color: var(--gold-light); font: 500 1.15rem Georgia,serif; }

.matrix-head, .matrix-row { display: grid; grid-template-columns: minmax(130px,1.15fr) .55fr .55fr minmax(160px,1fr) minmax(105px,.8fr); align-items: center; gap: 10px; }
.matrix-head { margin-top: 25px; padding: 0 14px 8px; color: var(--faint); font-size: .65rem; font-weight: 850; text-transform: uppercase; }
.matrix-head span:nth-child(4) { grid-column: 4 / -1; }
.matrix { display: grid; gap: 7px; }
.matrix-row { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(8,11,29,.62); }
.matrix-row > strong { font: 500 .95rem Georgia,serif; }
.matrix-row > span { color: var(--gold-light); font-weight: 850; }
.matrix-row > b { color: #edf0ff; text-align: right; }
.matrix-row > small { color: var(--faint); font-size: .62rem; }
.score-line { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.07); }
.score-line i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#617bda,var(--gold)); box-shadow: 0 0 11px rgba(227,183,88,.24); }
.score-line i.band-tension { width: 25%; }
.score-line i.band-developing { width: 50%; }
.score-line i.band-supportive { width: 75%; }
.score-line i.band-resonance { width: 100%; }
.evidence-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.evidence { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(10,14,34,.62); }
.evidence > span { color: var(--faint); font-size: .65rem; font-weight: 850; text-transform: uppercase; }
.evidence div { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 6px; }
.evidence b { padding: 4px 8px; border-radius: 999px; color: #dfe4f8; background: rgba(126,148,224,.14); font-size: .65rem; }
.evidence.match b { color: #d8fff0; background: rgba(81,176,136,.14); }
.evidence.tension b { color: #ffd7d9; background: rgba(196,79,91,.14); }
.model-note { margin: 17px 0 0; padding-top: 15px; border-top: 1px solid var(--line); color: var(--faint); font-size: .7rem; }

.premium-report {
  position: relative;
  overflow: hidden;
  border-color: rgba(232,187,90,.28);
  background:
    radial-gradient(circle at 88% 4%,rgba(230,185,90,.15),transparent 24rem),
    linear-gradient(145deg,rgba(25,31,67,.96),rgba(8,11,28,.98) 63%);
  box-shadow: 0 30px 90px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.025);
}
.premium-report::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  top: -225px;
  right: -105px;
  border: 1px solid rgba(232,187,90,.17);
  border-radius: 50%;
  box-shadow: 0 0 0 54px rgba(143,167,255,.025),0 0 0 105px rgba(232,187,90,.018);
  pointer-events: none;
}
.premium-report-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0,1fr) 150px;
  align-items: center;
  gap: 35px;
}
.premium-report-header > div:first-child { max-width: 790px; }
.report-range {
  display: inline-flex;
  margin-top: 8px;
  padding: 5px 10px;
  border: 1px solid rgba(232,187,90,.24);
  border-radius: 999px;
  color: var(--gold-light);
  background: rgba(232,187,90,.08);
  font-size: .65rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.premium-report-header h2 {
  max-width: 730px;
  margin: 13px 0 0;
  font: 500 clamp(2rem,4vw,3.25rem)/1.05 Georgia,serif;
  letter-spacing: -.025em;
}
.premium-report-header > div > p:last-child {
  max-width: 760px;
  margin: 15px 0 0;
  color: #d7dcec;
  font-size: .93rem;
}
.report-seal {
  width: 142px;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  border: 1px solid rgba(232,187,90,.4);
  border-radius: 50%;
  background: radial-gradient(circle,rgba(232,187,90,.17),rgba(12,16,37,.84) 68%);
  box-shadow: 0 0 0 9px rgba(232,187,90,.035),0 0 45px rgba(232,187,90,.12);
}
.report-seal small { color: var(--faint); font-size: .59rem; font-weight: 900; letter-spacing: .17em; }
.report-seal strong { color: var(--gold-light); font: 500 3.35rem/.9 Georgia,serif; }
.report-seal span { color: var(--muted); font-size: .68rem; }
.premium-report-details { position: relative; z-index: 1; margin-top: 28px; border-top: 1px solid rgba(232,187,90,.18); }
.premium-report-details > summary {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  cursor: pointer;
  list-style: none;
  color: var(--gold-light);
  font-weight: 850;
}
.premium-report-details > summary::-webkit-details-marker { display: none; }
.premium-report-details > summary i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232,187,90,.3);
  border-radius: 50%;
  font-style: normal;
  transition: rotate .25s ease;
}
.premium-report-details[open] > summary i { rotate: 180deg; }
.summary-close { display: none; }
.premium-report-details[open] .summary-open { display: none; }
.premium-report-details[open] .summary-close { display: inline; }
.premium-report-body { padding: 6px 0 8px; }
.report-prose {
  max-width: 870px;
  margin: 0 auto;
  padding: clamp(22px,4vw,42px) 0;
}
.report-prose p {
  margin: 0;
  color: #d8ddea;
  font: 400 clamp(.92rem,1.5vw,1.04rem)/1.82 Georgia,serif;
}
.report-prose p + p { margin-top: 21px; }
.report-prose .report-lens {
  margin-bottom: 27px;
  padding: 18px 21px;
  border-left: 2px solid var(--gold);
  color: var(--gold-light);
  background: linear-gradient(90deg,rgba(232,187,90,.1),transparent);
  font-family: Inter,sans-serif;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.65;
}
.report-section {
  margin-top: 18px;
  padding: clamp(23px,4vw,34px);
  border: 1px solid rgba(150,168,235,.16);
  border-radius: 22px;
  background: rgba(5,8,23,.48);
}
.report-section-title { display: flex; align-items: flex-start; gap: 16px; }
.report-section-title > span {
  min-width: 33px;
  padding-top: 4px;
  color: var(--gold);
  font: 500 .8rem Georgia,serif;
}
.report-section-title small {
  color: var(--faint);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.report-section-title h3 { margin: 3px 0 0; font: 500 clamp(1.25rem,2.5vw,1.8rem)/1.22 Georgia,serif; }
.report-signal-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.report-signal {
  padding: 19px;
  border: 1px solid rgba(151,171,242,.17);
  border-radius: 16px;
  background: rgba(16,22,49,.62);
}
.report-signal.strength { border-color: rgba(105,199,159,.2); }
.report-signal.attention { border-color: rgba(232,187,90,.21); }
.report-signal > div { display: flex; justify-content: space-between; gap: 12px; }
.report-signal span { color: #e6e9f4; font-weight: 850; font-size: .77rem; }
.report-signal b { color: var(--gold-light); font-size: .75rem; }
.report-signal small { display: block; margin-top: 4px; color: var(--faint); font-size: .66rem; }
.report-signal p { margin: 12px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.67; }
.timing-report > p { margin: 20px 0 0 49px; color: #d3d9ea; font-size: .84rem; line-height: 1.72; }
.report-actions { margin: 23px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; list-style: none; }
.report-actions li {
  min-height: 105px;
  padding: 17px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid rgba(151,171,242,.14);
  border-radius: 15px;
  background: rgba(17,23,51,.56);
}
.report-actions li > span {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232,187,90,.28);
  border-radius: 50%;
  color: var(--gold);
  font: 500 .76rem Georgia,serif;
}
.report-actions p { margin: 2px 0 0; color: #d5daea; font-size: .77rem; line-height: 1.62; }
.premium-report blockquote {
  max-width: 850px;
  margin: clamp(30px,5vw,54px) auto 0;
  padding: 0;
  border: 0;
  color: #fff0c0;
  text-align: center;
  font: 500 clamp(1.25rem,2.6vw,1.8rem)/1.48 Georgia,serif;
}
.report-safety {
  margin: 35px 0 0;
  padding: 17px 19px;
  border: 1px solid rgba(232,187,90,.16);
  border-radius: 14px;
  color: #d5d1c5;
  background: rgba(90,63,21,.08);
  font-size: .72rem;
}
.report-method { margin: 16px 0 0; color: var(--faint); text-align: center; font-size: .65rem; }

.component-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.component-grid article { display: grid; grid-template-columns: minmax(160px,1fr) minmax(100px,.8fr) 42px 78px; align-items: center; gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(8,11,29,.62); }
.component-grid span { color: #dfe3f2; font-size: .75rem; }
.component-grid b { text-align: right; }
.component-grid small { color: var(--faint); font-size: .61rem; }
.date-window { margin-top: 17px; display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 7px; }
.date-window article { position: relative; padding: 14px 9px; border: 1px solid var(--line); border-radius: 13px; text-align: center; background: rgba(8,11,29,.64); }
.date-window article.selected { border-color: rgba(142,166,255,.47); }
.date-window article.best { border-color: var(--line-gold); background: linear-gradient(145deg,rgba(101,72,28,.22),rgba(11,15,36,.8)); }
.date-window span { display: block; color: var(--faint); font-size: .65rem; }
.date-window strong { display: block; margin-top: 5px; color: var(--gold-light); font: 500 2rem/1 Georgia,serif; }
.date-window small { color: #d6dbec; font-size: .63rem; }
.date-window p { margin: 7px 0 0; color: var(--muted); font-size: .62rem; }
.date-window i { display: inline-flex; margin-top: 7px; padding: 2px 5px; border-radius: 999px; color: var(--gold-light); background: rgba(228,184,92,.15); font-size: .55rem; font-style: normal; }

.product-note { display: flex; align-items: flex-start; gap: 14px; background: rgba(18,25,57,.57); }
.product-note > span { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(151,173,255,.3); border-radius: 50%; color: var(--blue); font-family: Georgia,serif; }
.product-note strong { font: 500 1.05rem Georgia,serif; }
.product-note p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; }
.astro-gateway {
  margin-top: 22px;
  padding: clamp(25px,4vw,41px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  border: 1px solid rgba(130,150,233,.25);
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at 88% 50%,rgba(90,115,225,.22),transparent 19rem),linear-gradient(135deg,rgba(24,31,72,.85),rgba(8,11,29,.91));
}
.astro-gateway p:not(.eyebrow) { max-width: 730px; margin: 8px 0 0; color: var(--muted); }
footer {
  margin-top: 36px;
  padding: 24px 0 calc(26px + var(--safe-bottom));
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: .69rem;
}
footer strong { color: #c9cdda; letter-spacing: .12em; }

@media (min-width: 1510px) {
  .side-cover {
    width: clamp(150px, calc((100vw - 1160px) / 2 - 18px), 290px);
    position: fixed;
    top: 84px;
    bottom: 24px;
    z-index: 0;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(232,187,90,.18);
    border-radius: 27px;
    background-image:
      linear-gradient(180deg,rgba(2,5,13,.09),rgba(2,4,12,.42)),
      url("./assets/numbers-cover-clean.webp");
    background-size: auto 100%;
    box-shadow: inset 0 0 54px rgba(1,3,9,.55),0 24px 80px rgba(0,0,0,.34);
    opacity: .8;
    pointer-events: none;
  }
  .side-cover-left {
    left: 12px;
    background-position: 30% center;
    mask-image: linear-gradient(to right,#000 65%,transparent 100%),linear-gradient(to bottom,transparent,#000 8%,#000 91%,transparent);
    mask-composite: intersect;
  }
  .side-cover-right {
    right: 12px;
    background-position: 73% center;
    mask-image: linear-gradient(to left,#000 65%,transparent 100%),linear-gradient(to bottom,transparent,#000 8%,#000 91%,transparent);
    mask-composite: intersect;
  }
  .cover-caption { position: absolute; left: 15px; right: 15px; bottom: 22px; display: none; gap: 3px; text-align: center; text-shadow: 0 2px 12px #000; }
  .cover-caption b { color: var(--gold-light); font: 500 1rem Georgia,serif; letter-spacing: .22em; }
  .cover-caption span { color: #e4d9bc; font-size: .53rem; font-weight: 900; letter-spacing: .12em; }
}

@media (max-width: 900px) {
  .hero { min-height: 450px; grid-template-columns: 1fr .45fr; }
  .hero-symbol { width: 250px; }
  .tool-tabs { grid-template-columns: 1fr; }
  .tool-tab { min-height: 96px; }
  .relation-inputs { grid-template-columns: 1fr; }
  .relation-mark { margin: -2px 0; }
  .relation-mark span { width: 38px; height: 38px; }
  .mini-number-grid, .cycle-triptych { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .date-window { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .component-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .top-controls { width: calc(100% - 24px); padding-top: calc(10px + var(--safe-top)); }
  .astro-link { padding: 0 12px; }
  .astro-link span:last-child { max-width: 88px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .language-control label { display: none; }
  .language-count { min-width: 24px; height: 24px; }
  .language-control select { min-width: 0; max-width: 142px; }
  .local-open-warning { width: calc(100% - 24px); }
  .shell, footer { width: calc(100% - 24px); }
  .shell { margin-top: 12px; }
  .hero { min-height: 570px; padding: 26px 22px 31px; grid-template-columns: 1fr; align-content: end; border-radius: 29px; }
  .brand { top: 22px; left: 22px; }
  .hero-copy { padding-top: 120px; }
  .hero h1 { max-width: 95%; font-size: clamp(2.5rem,12vw,3.65rem); }
  .hero-text { max-width: 90%; font-size: .88rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-primary { max-width: none; flex: 0 0 auto; }
  .hero-secondary { min-height: 49px !important; justify-content: center; }
  .hero-symbol { position: absolute; top: 48px; right: -40px; width: 245px; opacity: .62; }
  .panel { margin-top: 14px; padding: 23px 19px; border-radius: 23px; }
  .tool-panel { padding-bottom: 20px; }
  .form-grid, .number-grid, .insight-grid, .pattern-grid, .evidence-grid { grid-template-columns: 1fr; }
  .form-grid .span-two { grid-column: auto; }
  input, select { min-height: 54px; font-size: 16px; }
  fieldset { padding: 17px; }
  .result-hero { grid-template-columns: 1fr; }
  .score-orbit { width: 158px; justify-self: center; }
  .premium-report-header { grid-template-columns: 1fr; gap: 22px; }
  .report-seal { width: 124px; justify-self: center; }
  .report-signal-grid, .report-actions { grid-template-columns: 1fr; }
  .report-prose { padding-top: 26px; }
  .report-section { padding: 21px 17px; }
  .timing-report > p { margin-left: 0; }
  .mini-number-grid .number-card { min-height: 0; }
  .matrix-head { display: none; }
  .matrix-row { grid-template-columns: 1fr auto auto; }
  .matrix-row > strong { grid-column: 1 / -1; }
  .matrix-row .score-line { grid-column: 1 / 2; }
  .date-window { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .calc-grid { grid-template-columns: 1fr; }
  .letter-map { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .astro-gateway { flex-direction: column; align-items: stretch; }
  .secondary-button { width: 100%; }
  footer { flex-direction: column; }
}

@media (max-width: 420px) {
  .top-controls { gap: 6px; }
  .astro-link { font-size: .68rem; }
  .language-control { padding-left: 9px; }
  .language-count { display: none; }
  .language-control select { max-width: 118px; }
  .hero { min-height: 600px; }
  .timeline { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .001ms !important; }
}

/* v0.4.4 Production Candidate: confirmed calculation spelling and categorical output */
.confirmation-row {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line-gold);
  border-radius: 14px;
  background: rgba(105,75,25,.09);
}
.confirmation-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  min-height: 20px;
  margin-top: 2px;
  accent-color: var(--gold);
}
.confirmation-row span { display: grid; gap: 4px; }
.confirmation-row b { color: #f1ead8; font-size: .78rem; }
.confirmation-row small, .chaldean-scope { color: var(--faint); font-size: .68rem; }
.y-options {
  padding: 14px 15px;
  border: 1px solid rgba(151,174,255,.2);
  border-radius: 14px;
  background: rgba(17,23,50,.52);
}
.y-options > strong { display: block; color: #eef0fb; font-size: .78rem; }
.y-options > small { display: block; margin-top: 4px; color: var(--faint); font-size: .68rem; }
.y-options > div { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.y-options label {
  flex-direction: row;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6,9,24,.55);
}
.y-options input { width: 17px; min-height: 17px; padding: 0; accent-color: var(--gold); }
.method-lock {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--line-gold);
  border-radius: 14px;
  background: rgba(105,75,25,.09);
}
.method-lock > span { color: var(--faint); font-size: .67rem; text-transform: uppercase; }
.method-lock > strong { color: var(--gold-light); font: 500 1rem Georgia,serif; }
.method-lock > small { color: var(--muted); font-size: .68rem; }
.score-orbit.categorical strong { font-size: 3.2rem; }
.score-orbit.categorical span { max-width: 145px; text-align: center; color: #ede5d2; }
.chaldean-core-grid article { min-height: 115px; }
.result-warnings p { margin: 7px 0 0; }
.report-seal span { max-width: 105px; text-align: center; line-height: 1.15; }
.matrix-row > b { min-width: 105px; color: #edf0ff; font-size: .68rem; text-align: right; }

@media (max-width: 720px) {
  .confirmation-row { grid-column: auto; }
  .matrix-row > b { text-align: left; }
}

.offline-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.offline-card { width: min(620px,100%); padding: 34px; border: 1px solid var(--line); border-radius: 22px; background: rgba(10,14,34,.96); text-align: center; box-shadow: var(--shadow); }
.offline-card img { width: 92px; height: 92px; }
.offline-card h1 { margin: 18px 0 10px; font: 500 2rem/1.08 Georgia,serif; }
.offline-card p { color: var(--muted); line-height: 1.65; }
.offline-card a { display: inline-flex; margin-top: 18px; padding: 12px 18px; border-radius: 999px; background: var(--gold); color: #111526; font-weight: 900; text-decoration: none; }

.hero-app-badge { position: absolute; top: 34px; right: 38px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding: 14px 18px; border-radius: 18px; border: 1px solid rgba(120,145,255,.18); background: linear-gradient(180deg, rgba(9,15,44,.82), rgba(13,20,58,.56)); box-shadow: 0 18px 44px rgba(0,0,0,.26); text-align: right; }
.hero-app-badge strong { color: #f3f6ff; font-size: 1rem; letter-spacing: .04em; }
.hero-app-badge span { color: var(--gold); font-size: .72rem; letter-spacing: .18em; }
.number-card .extended { margin-top: 12px; color: #d8ddf0; line-height: 1.58; font-size: .97rem; }
.chaldean-prose-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; }
.chaldean-prose-grid article { padding: 20px; border-radius: 22px; background: linear-gradient(180deg, rgba(18,26,72,.72), rgba(14,21,59,.44)); border: 1px solid rgba(255,255,255,.08); }
.chaldean-prose-grid h3 { margin: 0 0 10px; color: #efe6cf; font: 600 1rem/1.3 Inter,sans-serif; }
.chaldean-prose-grid p { margin: 0; color: #d5dbee; line-height: 1.6; }
.score-orbit.categorical strong { font-size: 3.8rem; }
.report-seal strong { font: 600 3.1rem/.95 Georgia,serif; color: var(--gold-light); }
@media (max-width: 980px) { .hero-app-badge { position: static; align-self: flex-start; margin-top: 8px; text-align: left; align-items: flex-start; } .chaldean-prose-grid { grid-template-columns: 1fr; } }

/* Mobile Safari/Android input zoom protection through tablet width. */
@media (max-width: 768px) {
  input, select, textarea { font-size: 16px; }
}
