:root {
  color-scheme: light;
  --bg: #eee5d8;
  --surface: #fffaf0;
  --surface-2: #eadcca;
  --ink: #130d07;
  --muted: #4f4032;
  --faint: rgba(19, 13, 7, 0.64);
  --gold: #9a641c;
  --gold-2: #d2963e;
  --gold-dim: rgba(154, 100, 28, 0.34);
  --bd: rgba(89, 55, 22, 0.38);
  --bd-strong: rgba(89, 55, 22, 0.68);
  --danger: #9d3328;
  --success: #26784c;
  --warning: #9a6b10;
  --shadow: rgba(35, 20, 8, 0.12);
}

html[data-theme="dark"],
body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070503;
  --surface: #0d0906;
  --surface-2: #140d09;
  --ink: #fff2d5;
  --muted: #c6b79e;
  --faint: rgba(255, 242, 213, 0.62);
  --gold: #e0ad53;
  --gold-2: #ffd891;
  --gold-dim: rgba(224, 173, 83, 0.3);
  --bd: rgba(224, 173, 83, 0.36);
  --bd-strong: rgba(224, 173, 83, 0.64);
  --danger: #ff8c77;
  --success: #8cd6a6;
  --warning: #e6bd62;
  --shadow: rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 76% 20%, rgba(217, 166, 73, 0.11), transparent 26rem),
    radial-gradient(circle at 18% 84%, rgba(105, 73, 42, 0.12), transparent 28rem),
    var(--bg);
  font-family: "Avenir Next", Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 400;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(201, 147, 66, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 147, 66, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.55;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.34) 0 1px, transparent 1.5px),
    radial-gradient(circle at 76% 32%, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.5px),
    radial-gradient(circle at 52% 68%, rgba(255, 255, 255, 0.28) 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 78%, rgba(255, 255, 255, 0.32) 0 1px, transparent 1.5px);
  background-size: 260px 240px, 310px 290px, 370px 330px, 430px 390px;
  animation: skyDrift 28s linear infinite;
}

body[data-theme="light"]::after {
  opacity: 0.08;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3,
.brand-word {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 300;
  letter-spacing: 0;
}

p {
  line-height: 1.85;
}

.app-shell {
  min-height: 100vh;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 28px;
  padding: 18px 56px;
  border-bottom: 1px solid var(--bd);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px);
}

.nav-logo,
.nav-links a,
.nav-links button,
.nav-cta,
.theme-toggle,
.section-kicker,
.brand-build,
.microcopy,
.console-head,
.field label,
.geo-attribution,
.provider-status,
.service-status,
.compute-log,
.document-meta,
.technical-footer,
.position-grid,
.api-grid,
.badges,
.planet-table,
.house-cusp-table,
.v1-table,
.almuten-check-table {
  font-family: "Avenir Next", Montserrat, system-ui, sans-serif;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.nav-logo {
  width: fit-content;
  border: 0;
  padding: 0;
  color: var(--gold);
  background: transparent;
  font-size: 15px;
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.nav-links a,
.nav-links button {
  position: relative;
  border: 0;
  padding: 8px 0;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  text-decoration: none;
}

.nav-links a::after,
.nav-links button::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.nav-links a:hover,
.nav-links button:hover {
  color: var(--gold);
}

.nav-links a:hover::after,
.nav-links button:hover::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.theme-toggle,
.nav-cta {
  min-height: 42px;
  border: 1px solid var(--bd);
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}

.theme-toggle {
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
}

.theme-toggle__icon {
  color: var(--gold);
}

.nav-cta {
  padding: 0 22px;
  color: #201205;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
}

.screen {
  min-height: 100vh;
  animation: screenIn 280ms ease both;
}

.is-hidden {
  display: none !important;
}

.intro-screen {
  padding-top: 78px;
}

.hero {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  border-bottom: 1px solid var(--bd);
}

.hero-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 74px 56px 82px;
  border-right: 1px solid var(--bd);
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 500;
}

.section-kicker span {
  width: 32px;
  height: 1px;
  background: var(--gold);
}

.brand-mark {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 34px;
}

.brand-word {
  color: color-mix(in srgb, var(--ink) 92%, var(--gold));
  font-size: clamp(72px, 8vw, 126px);
  line-height: 0.88;
}

.brand-build {
  border: 1px solid var(--bd-strong);
  padding: 5px 8px;
  color: var(--gold);
  font-size: 14px;
}

.hero h1 {
  max-width: 700px;
  font-size: clamp(50px, 5.2vw, 88px);
  line-height: 0.96;
}

.hero h1 em,
.content-band h2 em {
  color: var(--gold);
  font-style: italic;
}

.hero-sub {
  max-width: 560px;
  margin-top: 18px;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 2.4vw, 42px);
  font-style: italic;
  line-height: 1.14;
}

.lead {
  max-width: 620px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  margin-top: 44px;
}

.primary-action,
.secondary-action,
.danger-action,
.line-action,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  border: 1px solid var(--bd-strong);
  padding: 0 24px;
  color: var(--ink);
  background: transparent;
  font-family: "Avenir Next", Montserrat, system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0.32em;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 220ms ease, color 220ms ease, background 220ms ease, transform 220ms ease;
}

.primary-action {
  color: #1f1206;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
}

.primary-action:hover,
.secondary-action:hover,
.danger-action:hover,
.ghost-link:hover,
.line-action:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

.primary-action:hover {
  color: #1f1206;
}

.primary-action svg,
.secondary-action svg,
.danger-action svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.line-action {
  min-height: auto;
  border: 0;
  border-bottom: 1px solid var(--gold);
  padding: 0 0 8px;
}

.wide {
  width: 100%;
}

.microcopy {
  max-width: 560px;
  margin-top: 20px;
  color: var(--faint);
  font-size: 14px;
  line-height: 1.8;
}

.hero-visual {
  position: relative;
  min-width: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 52px 42px;
}

.hero-visual::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(217, 166, 73, 0.07) 1px, transparent 1px) 0 0 / 25% 100%,
    linear-gradient(rgba(217, 166, 73, 0.04) 1px, transparent 1px) 0 0 / 100% 25%;
  mask-image: radial-gradient(circle at 50% 50%, #000 0, transparent 74%);
}

.cosmos-stage {
  position: relative;
  width: min(78vw, 610px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.cosmos-glow {
  position: absolute;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 166, 73, 0.36), rgba(217, 166, 73, 0.08) 42%, transparent 70%);
  filter: blur(10px);
  animation: breathe 5s ease-in-out infinite;
}

.orbit {
  position: absolute;
  inset: var(--inset, 5%);
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
}

.orbit-a { --inset: 4%; animation: spin 62s linear infinite; }
.orbit-b { --inset: 16%; animation: spin 48s linear infinite reverse; }
.orbit-c { --inset: 28%; animation: spin 34s linear infinite; }

.sun-core {
  position: absolute;
  width: 88px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 221, 144, 0.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 34%, #ffe2a2, #e29a42 38%, #6e3517 72%, #1c0b04 100%);
  box-shadow: 0 0 48px rgba(217, 166, 73, 0.42);
}

.planet {
  position: absolute;
  display: grid;
  place-items: center;
  width: var(--size, 32px);
  height: var(--size, 32px);
  border: 1px solid var(--bd-strong);
  border-radius: 50%;
  color: var(--gold-2);
  background: rgba(9, 5, 2, 0.72);
  box-shadow: 0 0 24px rgba(217, 166, 73, 0.15);
  font-family: Georgia, "Times New Roman", serif;
  font-size: calc(var(--size, 32px) * 0.58);
  animation: floatPlanet var(--dur, 18s) ease-in-out infinite;
}

body[data-theme="light"] .planet {
  background: rgba(255, 248, 235, 0.8);
}

.planet-sun { --size: 38px; --dur: 16s; transform: translate(160px, -14px); }
.planet-moon { --size: 30px; --dur: 14s; transform: translate(-126px, -68px); animation-delay: -3s; }
.planet-mercury { --size: 22px; --dur: 12s; transform: translate(-58px, 72px); animation-delay: -5s; }
.planet-venus { --size: 26px; --dur: 19s; transform: translate(210px, 90px); animation-delay: -7s; }
.planet-mars { --size: 24px; --dur: 17s; transform: translate(-205px, 112px); animation-delay: -4s; }
.planet-jupiter { --size: 34px; --dur: 22s; transform: translate(34px, -188px); animation-delay: -9s; }

.birth-wheel-preview {
  position: absolute;
  inset: 6%;
  width: 88%;
  height: 88%;
  fill: none;
  stroke: var(--gold-dim);
  stroke-width: 0.8;
  animation: spin 120s linear infinite;
}

.birth-wheel-preview path {
  stroke: rgba(255, 221, 144, 0.32);
}

.visual-caption {
  position: absolute;
  bottom: 17%;
  left: 50%;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--bd);
}

.metric-strip div {
  position: relative;
  min-height: 142px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 42px;
  background: var(--surface);
}

.metric-strip div::after {
  position: absolute;
  top: 16px;
  right: 18px;
  content: attr(data-n);
  color: var(--faint);
  font-size: 14px;
}

.metric-strip strong {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 52px;
  font-weight: 300;
  line-height: 1;
}

.metric-strip span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.content-band,
.tools-band,
.api-band {
  padding: 118px 56px;
  border-bottom: 1px solid var(--bd);
}

.content-band {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr);
  gap: 80px;
  align-items: start;
}

.content-band h2,
.tools-band h2,
.api-band h2 {
  max-width: 760px;
  font-size: clamp(40px, 4.8vw, 70px);
  line-height: 1.08;
}

.content-band p {
  max-width: 560px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 18px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--bd);
}

.feature-grid article,
.tool-cards article {
  min-height: 230px;
  padding: 38px 34px;
  background: var(--surface);
  transition: background 220ms ease, transform 220ms ease;
}

.feature-grid article:hover,
.tool-cards article:hover {
  background: var(--surface-2);
}

.feature-grid b {
  display: block;
  margin-bottom: 20px;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 300;
}

.feature-grid h3,
.tool-cards h3 {
  margin-bottom: 12px;
  font-size: 25px;
}

.feature-grid p,
.tool-cards p {
  color: var(--muted);
  font-size: 16px;
}

.tools-band {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.tool-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 70px;
  background: var(--bd);
}

.tool-cards small {
  display: block;
  margin-bottom: 32px;
  color: var(--gold);
  letter-spacing: 0.2em;
}

.api-band {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: end;
}

.api-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--bd);
}

.api-grid code {
  min-height: 104px;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--gold);
  background: var(--surface);
  font-size: 14px;
  letter-spacing: 0.14em;
}

.form-screen,
.reading-screen,
.loading-screen {
  padding: 126px 56px 70px;
}

.ghost-link {
  min-height: 40px;
  margin-bottom: 48px;
  padding: 0 16px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.54fr);
  gap: 42px;
  margin-bottom: 44px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--bd);
}

.section-head h1 {
  font-size: clamp(46px, 5.4vw, 84px);
  line-height: 0.96;
}

.section-head .lead {
  align-self: end;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 1px;
  align-items: stretch;
  background: var(--bd);
}

.birth-form,
.input-console {
  background: var(--surface);
}

.birth-form {
  display: grid;
  align-content: start;
  gap: 1px;
  padding: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--bd);
}

.field {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 24px 26px;
  background: var(--surface);
}

.field:focus-within {
  background: var(--surface-2);
}

.field label {
  color: var(--gold);
  font-size: 14px;
}

.field input {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid var(--bd);
  padding: 0;
  color: var(--ink);
  background: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 400;
}

.field input:focus {
  border-color: var(--gold);
  outline: 0;
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field input::placeholder {
  color: var(--faint);
}

.field small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
  text-transform: none;
}

.place-suggestion-list {
  display: none;
  border: 1px solid var(--bd);
  background: var(--surface-2);
  overflow: hidden;
}

.place-suggestion-list.is-visible {
  display: grid;
}

.place-suggestion-list button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-bottom: 1px solid var(--bd);
  padding: 11px 12px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.place-suggestion-list button:last-child {
  border-bottom: 0;
}

.place-suggestion-list button:hover,
.place-suggestion-list button:focus-visible {
  background: color-mix(in srgb, var(--gold) 10%, transparent);
}

.place-suggestion-list strong,
.place-suggestion-list span {
  display: block;
}

.place-suggestion-list strong {
  font-size: 15px;
  line-height: 1.35;
}

.place-suggestion-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

.service-status,
.provider-status,
.geo-attribution {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--bd);
  padding: 5px 8px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-2) 76%, transparent);
  font-size: 14px;
  line-height: 1.25;
}

.service-status::before,
.provider-status::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  content: "";
  border: 1px solid currentColor;
  border-radius: 50%;
}

.service-status.is-ready,
.provider-status.is-ready {
  color: var(--success);
}

.service-status.is-warning,
.provider-status.is-warning {
  color: var(--warning);
}

.service-status.is-error {
  color: var(--danger);
}

.field-error,
.form-error {
  min-height: 18px;
  color: var(--danger) !important;
  font-size: 14px;
}

.geo-attribution {
  margin: 24px 26px 0;
}

.form-error {
  padding: 0 26px;
}

.birth-form .primary-action {
  margin: 24px 26px 28px;
}

.input-console {
  position: relative;
  min-height: 100%;
  overflow: hidden;
}

.console-orbit {
  position: relative;
  height: 260px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--bd);
}

.console-orbit::before,
.console-orbit::after {
  position: absolute;
  content: "";
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
}

.console-orbit::before {
  width: 188px;
  height: 188px;
  animation: spin 48s linear infinite;
}

.console-orbit::after {
  width: 118px;
  height: 118px;
  animation: spin 32s linear infinite reverse;
}

.console-orbit span {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1px solid var(--bd-strong);
  border-radius: 50%;
  background: var(--gold);
}

.console-orbit span:nth-child(1) { transform: translate(92px, 0); }
.console-orbit span:nth-child(2) { width: 14px; height: 14px; transform: translate(-58px, -58px); background: transparent; }
.console-orbit span:nth-child(3) { width: 18px; height: 18px; transform: translate(-28px, 72px); background: var(--surface); }

.console-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--bd);
  color: var(--gold);
  font-size: 14px;
}

.input-console dl {
  display: grid;
  margin: 0;
}

.input-console div:not(.console-orbit):not(.console-head) {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--bd);
}

.input-console dt,
.input-console dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.input-console dt {
  color: var(--faint);
}

.input-console dd {
  color: var(--ink);
}

.loading-screen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.7fr);
  gap: 60px;
  align-items: center;
}

.progress-line {
  position: fixed;
  top: 78px;
  left: 0;
  z-index: 42;
  width: 100%;
  height: 1px;
  background: var(--bd);
}

.progress-line span {
  width: 0;
  height: 100%;
  display: block;
  background: var(--gold);
  animation: progressSteps 1200ms steps(4, end) forwards;
}

.loading-copy h1 {
  font-size: clamp(48px, 5.4vw, 84px);
  line-height: 1;
}

.compute-log {
  display: grid;
  gap: 10px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}

.compute-log li {
  opacity: 0;
  animation: logLine 90ms step-end forwards;
}

.compute-log li:nth-child(1) { animation-delay: 120ms; }
.compute-log li:nth-child(2) { animation-delay: 420ms; }
.compute-log li:nth-child(3) { animation-delay: 720ms; }
.compute-log li:nth-child(4) { animation-delay: 960ms; }
.compute-log li:nth-child(5) { animation-delay: 1120ms; color: var(--gold); }

.loading-orbit {
  position: relative;
  width: min(42vw, 430px);
  aspect-ratio: 1;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  animation: spin 40s linear infinite;
}

.loading-orbit::before,
.loading-orbit::after {
  position: absolute;
  inset: 17%;
  content: "";
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
}

.loading-orbit::after {
  inset: 34%;
}

.loading-orbit span {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
}

.loading-orbit span:nth-child(1) { top: 12%; left: 50%; }
.loading-orbit span:nth-child(2) { right: 16%; top: 62%; width: 16px; height: 16px; }
.loading-orbit span:nth-child(3) { left: 18%; bottom: 22%; width: 12px; height: 12px; }

.reading-card {
  border-top: 1px solid var(--bd);
  border-bottom: 1px solid var(--bd);
}

.reading-header {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
  gap: 32px;
  padding: 34px 0;
  border-bottom: 1px solid var(--bd);
}

.reading-header h1 {
  font-size: clamp(44px, 5vw, 74px);
  line-height: 0.98;
}

.document-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--bd);
}

.document-meta div {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px;
  border-right: 1px solid var(--bd);
  border-bottom: 1px solid var(--bd);
}

.document-meta div:nth-child(2n) {
  border-right: 0;
}

.document-meta dt,
.document-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.document-meta dt {
  color: var(--faint);
  font-size: 14px;
}

.document-meta dd {
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0.06em;
  line-height: 1.45;
  text-transform: none;
}

.engine-panel,
.v1-lab,
.reading-focus,
.reading-section,
.save-panel,
.technical-footer {
  border-bottom: 1px solid var(--bd);
  padding: 42px 0;
}

.engine-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
  gap: 34px;
}

.engine-panel h2,
.reading-section h2,
.save-panel h2 {
  font-size: clamp(30px, 3vw, 46px);
}

.position-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--bd);
  font-size: 14px;
}

.position-grid span {
  min-width: 0;
  padding: 13px;
  color: var(--ink);
  background: var(--surface);
  letter-spacing: 0.08em;
  text-transform: none;
  overflow-wrap: anywhere;
}

.house-cusps,
.time-resolution,
.engine-note {
  grid-column: 1 / -1;
}

.house-cusps {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  align-items: start;
  padding-top: 10px;
}

.house-cusps small,
.time-resolution small,
.v1-block small {
  color: var(--muted);
}

.house-cusp-table,
.v1-table,
.almuten-check-table,
.planet-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: none;
}

.house-cusp-table th,
.house-cusp-table td,
.v1-table th,
.v1-table td,
.almuten-check-table th,
.almuten-check-table td,
.planet-table th,
.planet-table td {
  border: 1px solid var(--bd);
  padding: 9px 10px;
  text-align: left;
}

.time-resolution {
  display: grid;
  gap: 8px;
  border: 1px solid var(--bd);
  padding: 18px;
}

.time-resolution span {
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.engine-note {
  color: var(--warning);
  font-size: 14px;
}

.v1-lab {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--bd);
  padding: 1px;
}

.v1-block {
  min-width: 0;
  padding: 32px;
  background: var(--surface);
}

.v1-block-wide {
  grid-column: 1 / -1;
}

.v1-block h2 {
  margin-bottom: 16px;
  font-size: clamp(26px, 3vw, 42px);
}

.v1-block p {
  color: var(--muted);
  font-size: 16px;
}

.lunar-scale,
.phase-axis {
  position: relative;
  height: 2px;
  margin: 24px 0;
  background: var(--bd);
}

.lunar-scale span,
.phase-axis i {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--surface);
  transform: translate(-50%, -50%);
}

.almuten-bars {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.almuten-bars div {
  display: grid;
  grid-template-columns: 96px 1fr 34px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.almuten-bars b {
  height: 2px;
  background: var(--gold);
}

.almuten-bars .is-winner {
  color: var(--gold);
}

.almuten-check {
  overflow-x: auto;
  margin: 18px 0;
}

.reading-focus {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(280px, 0.65fr);
  gap: 42px;
  align-items: center;
}

.map-wrap {
  min-width: 0;
}

.sky-map {
  width: min(100%, 680px);
  display: block;
  margin: 0 auto;
  overflow: visible;
}

.sky-ring,
.sky-sector,
.house-line {
  fill: none;
  stroke: var(--gold-dim);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.sky-ring.outer {
  stroke: var(--bd-strong);
}

.sky-ring.inner {
  stroke: color-mix(in srgb, var(--gold) 42%, transparent);
}

.sky-active-sector {
  fill: rgba(217, 166, 73, 0.08);
  stroke: rgba(217, 166, 73, 0.22);
}

.sky-glyph {
  fill: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  text-anchor: middle;
  dominant-baseline: middle;
}

.sky-glyph.is-active {
  fill: var(--gold);
}

.house-label {
  fill: var(--faint);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-anchor: middle;
  dominant-baseline: middle;
}

.aspect-line {
  fill: none;
  stroke: rgba(201, 147, 66, 0.28);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.aspect-line.major {
  stroke: rgba(217, 166, 73, 0.5);
}

.planet-point {
  cursor: pointer;
}

.planet-point circle {
  fill: var(--surface);
  stroke: var(--gold);
  stroke-width: 1;
  filter: drop-shadow(0 0 8px rgba(217, 166, 73, 0.28));
}

.planet-point text {
  fill: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  text-anchor: middle;
  dominant-baseline: middle;
}

.planet-point:hover circle,
.planet-point:focus circle {
  fill: var(--gold);
}

.planet-point:hover text,
.planet-point:focus text {
  fill: #201205;
}

.sky-core {
  fill: var(--gold);
}

.birth-moment-label {
  fill: var(--gold);
  font-size: 15px;
  letter-spacing: 0.24em;
  text-anchor: middle;
  text-transform: uppercase;
}

.badges {
  display: grid;
  gap: 1px;
  background: var(--bd);
}

.badges span {
  padding: 18px 20px;
  color: var(--ink);
  background: var(--surface);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: none;
}

.reading-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.35fr) minmax(0, 0.65fr);
  gap: 44px;
}

.section-body {
  color: var(--muted);
}

.section-body p + p {
  margin-top: 14px;
}

.element-bars {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.element-row {
  display: grid;
  grid-template-columns: 110px 1fr 82px;
  align-items: center;
  gap: 14px;
  color: var(--muted);
}

.element-row .bar {
  height: 2px;
  background: var(--bd);
}

.element-row i {
  display: block;
  height: 100%;
  background: var(--gold);
}

.element-row strong {
  color: var(--ink);
  font-weight: 400;
}

.dominant-label {
  color: var(--gold);
}

.save-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.65fr);
  gap: 34px;
  align-items: start;
}

.save-panel p {
  margin-top: 14px;
  color: var(--muted);
}

.save-actions {
  display: grid;
  gap: 10px;
}

.secondary-action,
.danger-action {
  width: 100%;
}

.danger-action {
  border-color: color-mix(in srgb, var(--danger) 58%, transparent);
  color: var(--danger);
}

.copy-status {
  grid-column: 1 / -1;
  color: var(--gold) !important;
}

.technical-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--faint);
  font-size: 14px;
}

.technical-footer span {
  border: 1px solid var(--bd);
  padding: 7px 10px;
}

@keyframes skyDrift {
  to { background-position: 260px 240px, -310px 290px, 370px -330px, -430px -390px; }
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes breathe {
  50% { transform: scale(1.05); opacity: 0.82; }
}

@keyframes floatPlanet {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -16px; }
}

@keyframes progressSteps {
  25% { width: 34%; }
  50% { width: 62%; }
  75% { width: 84%; }
  100% { width: 100%; }
}

@keyframes logLine {
  to { opacity: 1; }
}

@media (max-width: 1020px) {
  .top-nav {
    grid-template-columns: 1fr auto;
    padding: 16px 24px;
  }

  .nav-links {
    display: none;
  }

  .hero,
  .content-band,
  .api-band,
  .loading-screen,
  .reading-focus,
  .reading-section,
  .save-panel,
  .engine-panel {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    border-right: 0;
    border-bottom: 1px solid var(--bd);
  }

  .metric-strip,
  .tool-cards,
  .v1-lab {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-layout {
    grid-template-columns: 1fr;
  }

  .house-cusps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .top-nav {
    min-height: 68px;
    gap: 12px;
  }

  .nav-logo {
    font-size: 13px;
  }

  .nav-cta,
  .theme-toggle__text {
    display: none;
  }

  .intro-screen {
    padding-top: 68px;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy,
  .hero-visual,
  .content-band,
  .tools-band,
  .api-band,
  .form-screen,
  .reading-screen,
  .loading-screen {
    padding-left: 22px;
    padding-right: 22px;
  }

  .brand-word {
    font-size: 58px;
  }

  .hero h1,
  .section-head h1,
  .loading-copy h1 {
    font-size: 44px;
  }

  .hero-sub {
    font-size: 27px;
  }

  .cosmos-stage {
    width: min(96vw, 390px);
  }

  .metric-strip,
  .feature-grid,
  .tool-cards,
  .api-grid,
  .field-row,
  .position-grid,
  .document-meta,
  .v1-lab {
    grid-template-columns: 1fr;
  }

  .section-head {
    grid-template-columns: 1fr;
  }

  .reading-header {
    grid-template-columns: 1fr;
  }

  .reading-focus {
    grid-template-columns: 1fr;
  }

  .element-row {
    grid-template-columns: 82px 1fr 60px;
  }
}
