/* Shared presentation for astrology calculation pages, following Thai Astro. */
.astro-page-shell {
  --astro-line: rgb(var(--c-tint) / .14);
  --astro-soft: rgb(var(--c-tint) / .045);
  --astro-muted: rgb(var(--c-on-bg-dim));
  width: min(1240px, 100%);
  margin-inline: auto;
  padding: 18px clamp(16px, 3vw, 32px) 18px;
  font-family: var(--font-sans);
}

.astro-page-shell :is(h1, h2, h3, p) { margin-top: 0; }
.astro-system-content { display: flex; flex-direction: column; gap: 18px; }

.astro-system-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, .65fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  min-height: 210px;
  margin-bottom: 18px;
  padding: clamp(16px, 2vw, 26px);
  overflow: hidden;
  border: 1px solid var(--astro-line);
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 88% 14%, rgb(var(--c-glow) / .2), transparent 42%),
    radial-gradient(ellipse at 0% 100%, rgb(var(--c-accent) / .13), transparent 45%),
    linear-gradient(130deg, rgb(var(--c-surface) / .74), rgb(var(--c-bg) / .2));
  box-shadow: 0 22px 60px rgb(var(--c-shadow) / .16), inset 0 1px 0 rgb(var(--c-tint) / .08);
}

.astro-system-hero__copy { position: relative; z-index: 1; max-width: 820px; }
.astro-system-eyebrow {
  display: block;
  margin: 0 0 13px;
  color: rgb(var(--c-accent));
  font-size: var(--type-label);
  font-weight: 800;
  letter-spacing: .13em;
}
.astro-system-hero h1 {
  margin: 0;
  color: rgb(var(--c-on-bg));
  font-size: clamp(max(var(--type-caption), calc(var(--app-font-scale, 1) * 32px)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 4.1vw)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 48px)));
  font-weight: 800;
  line-height: 1.17;
  letter-spacing: -.035em;
}
.astro-system-hero h1 span { color: rgb(var(--c-accent)); }
.astro-system-hero__lead {
  max-width: 650px;
  margin: 14px 0 20px;
  color: var(--astro-muted);
  font-size: max(var(--type-caption), calc(var(--app-font-scale, 1) * 16px));
  line-height: 1.75;
}
.astro-system-points { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.astro-system-points li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 11px;
  border: 1px solid var(--astro-line);
  border-radius: 999px;
  background: rgb(var(--c-tint) / .045);
  color: var(--astro-muted);
  font-size: var(--type-caption);
  font-weight: 650;
}
.astro-system-points .material-symbols-outlined { color: rgb(var(--c-accent)); font-size: calc(var(--app-font-scale, 1) * 16px); }

.astro-system-visual {
  position: relative;
  display: grid;
  min-height: 170px;
  place-items: center;
  overflow: visible;
}
.astro-system-orbit {
  position: relative;
  display: grid;
  width: min(62%, 190px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgb(var(--c-accent) / .34);
  border-radius: 50%;
  box-shadow: 0 0 55px rgb(var(--c-glow) / .12), inset 0 0 34px rgb(var(--c-accent) / .06);
}
.astro-system-orbit::before, .astro-system-orbit::after {
  position: absolute;
  border: 1px solid rgb(var(--c-tint) / .14);
  border-radius: 50%;
  content: "";
}
.astro-system-orbit::before { inset: 15%; }
.astro-system-orbit::after { inset: 34%; border-color: rgb(var(--c-glow) / .3); }
.astro-system-orbit__axis {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49.7%, rgb(var(--c-tint) / .12) 50%, transparent 50.3%),
    linear-gradient(0deg, transparent 49.7%, rgb(var(--c-tint) / .12) 50%, transparent 50.3%);
}
.astro-system-orbit__core {
  z-index: 1;
  display: grid;
  width: 54px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgb(var(--c-accent) / .36);
  border-radius: 50%;
  background: linear-gradient(145deg, rgb(var(--c-accent) / .22), var(--ui-glass-content-fill));
  color: rgb(var(--c-glow));
  box-shadow: 0 0 26px rgb(var(--c-glow) / .18);
}
.astro-system-orbit__core .material-symbols-outlined { font-size: calc(var(--app-font-scale, 1) * 27px); }
.astro-system-orbit__node {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid rgb(var(--c-tint) / .17);
  border-radius: 50%;
  background: var(--ui-glass-content-fill);
  color: rgb(var(--c-accent));
  font-size: var(--type-caption);
  font-weight: 800;
  box-shadow: 0 6px 16px #0002;
}
.astro-system-orbit__node--top { top: -4px; left: calc(50% - 14px); }
.astro-system-orbit__node--right { top: calc(50% - 14px); right: -4px; }
.astro-system-orbit__node--bottom { bottom: -4px; left: calc(50% - 14px); }
.astro-system-orbit__node--left { top: calc(50% - 14px); left: -4px; }
.astro-system-visual__caption {
  position: absolute;
  right: 14px;
  bottom: 13px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--astro-muted);
  font-size: var(--type-caption);
}
.astro-system-visual__caption strong { color: rgb(var(--c-on-bg)); font-size: var(--type-caption); }

.astro-sample-svg { display: block; width: min(100%, 420px); height: auto; max-height: 228px; overflow: visible; }
.astro-system-visual .astro-sample-svg { width: min(100%, 230px); }
.astro-sample-kicker { fill: rgb(var(--c-accent)); font: 800 calc(var(--app-font-scale, 1) * 9px)/1 var(--font-sans); letter-spacing: 1.4px; }
.astro-sample-note { fill: rgb(var(--c-on-bg-dim)); font: 600 calc(var(--app-font-scale, 1) * 9px)/1 var(--font-sans); }
.astro-sample-channel { fill: none; stroke: rgb(var(--c-tint) / .28); stroke-width: 5; stroke-linecap: round; }
.astro-sample-channel--active { stroke: rgb(var(--c-accent) / .88); stroke-width: 3; filter: drop-shadow(0 0 4px rgb(var(--c-accent) / .3)); }
.astro-bodygraph-aura { fill: url(#hdAura); }
.astro-bodygraph-channel { fill: none; stroke: rgb(var(--c-tint) / .28); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.astro-bodygraph-channel--active { stroke: rgb(var(--c-accent) / .82); stroke-width: 2.8; filter: drop-shadow(0 0 4px rgb(var(--c-accent) / .42)); }
.astro-bodygraph-center { fill: rgb(var(--c-surface) / .96); stroke: rgb(var(--c-tint) / .6); stroke-width: 1.7; filter: drop-shadow(0 4px 8px rgb(var(--c-shadow) / .28)); }
.astro-bodygraph-center--defined { fill: rgb(var(--c-accent) / .22); stroke: rgb(var(--c-accent) / .88); }
.astro-bodygraph-center--cool { fill: rgb(var(--c-glow) / .19); stroke: rgb(var(--c-glow) / .75); }
.astro-bodygraph-gates circle { fill: rgb(var(--c-on-bg) / .82); stroke: rgb(var(--c-bg) / .7); stroke-width: 1; }
.hd-bodygraph-stage {
  width: 100%;
  margin-inline: auto;
  padding: 12px;
  border: 1px solid rgb(var(--c-tint) / .2);
  border-radius: 20px;
  background: linear-gradient(145deg, rgb(var(--c-surface-2) / .58), rgb(var(--c-surface) / .42));
  box-shadow: inset 0 1px 0 rgb(var(--c-on-bg) / .045);
}
.hd-bodygraph-stage #hdModeToggle {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 4px;
  border: 1px solid rgb(var(--c-on-bg) / .1);
  border-radius: 999px;
  background: rgb(var(--c-bg) / .28);
}
.hd-bodygraph-stage .hd-mode-btn {
  min-height: 40px;
  border-radius: 999px;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}
.hd-bodygraph-stage .hd-mode-btn[aria-pressed="true"] {
  background: rgb(var(--c-accent) / .13);
}
.hd-bodygraph-stage .hd-mode-btn[aria-pressed="false"]:hover {
  background: rgb(var(--c-on-bg) / .06);
}
.hd-bodygraph-stage .hd-mode-btn:focus-visible {
  outline: 2px solid rgb(var(--c-accent));
  outline-offset: 2px;
}
.hd-bodygraph-host {
  width: min(100%, 34vh, 240px);
  margin-inline: auto;
  padding: 4px;
}
.hd-bodygraph-host > svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.hd-transit-chart-surface {
  width: 100%;
  padding: 12px;
  border: 1px solid rgb(var(--c-surface-hi) / .72);
  border-radius: 16px;
  background: linear-gradient(145deg, rgb(var(--c-surface-2) / .22), var(--ui-glass-content-fill));
  backdrop-filter: blur(var(--ui-glass-regular-blur));
  -webkit-backdrop-filter: blur(var(--ui-glass-regular-blur));
  box-shadow: inset 0 1px 0 rgb(var(--c-tint) / .1), 0 8px 22px -16px rgb(var(--c-shadow) / .7);
}
.hd-transit-chart-surface [data-hd-union-graph] > svg {
  display: block;
  width: min(100%, 420px);
  height: auto;
  margin-inline: auto;
  overflow: visible;
}
#hdTransitUnionPanel .hd-bodygraph-host { width: 100%; }
.hd-bodygraph-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  max-width: 620px;
  margin-inline: auto;
}
.hd-bodygraph-legend.hidden { display: none; }
.hd-bodygraph-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  color: rgb(var(--c-on-bg-dim));
}
.hd-bodygraph-swatch {
  display: inline-block;
  flex: 0 0 auto;
  width: 16px;
  height: 4px;
  border-radius: 999px;
}
.hd-bodygraph-swatch--personality { background: rgb(var(--c-on-bg)); }
.hd-bodygraph-swatch--design { background: #ff7664; }
.hd-bodygraph-swatch--both { background: #e5b95c; }
.hd-bodygraph-swatch--undefined { background: rgb(var(--c-on-bg-dim) / .34); }
@media (max-width: 480px) {
  .hd-bodygraph-stage { padding: 10px; border-radius: 16px; }
  .hd-bodygraph-host { width: 100%; padding: 6px 0; }
  .hd-transit-chart-surface { padding: 8px; border-radius: 12px; }
  .hd-bodygraph-host .astro-bodygraph-gate-label { font-size: max(var(--type-caption), calc(var(--app-font-scale, 1) * 11px)); }
  .hd-bodygraph-legend { justify-content: flex-start; gap: 4px 12px; }
  .hd-bodygraph-legend__item { font-size: var(--type-caption); }
}
.astro-vedic-chart-frame { fill: rgb(var(--c-surface) / .92); stroke: rgb(var(--c-accent) / .66); stroke-width: 1.5; }
.astro-vedic-chart-orbit { fill: none; stroke: rgb(var(--c-accent) / .3); stroke-width: .8; }
.astro-vedic-chart-lines { fill: rgb(var(--c-accent) / .025); stroke: rgb(var(--c-accent) / .74); stroke-width: 1.35; stroke-linejoin: round; }
.astro-vedic-chart-center { fill: rgb(var(--c-accent) / .18); stroke: rgb(var(--c-accent) / .72); stroke-width: 1; }
.astro-vedic-chart-houses { fill: rgb(var(--c-on-bg-dim)); font: 650 calc(var(--app-font-scale, 1) * 14px)/1 var(--font-sans); text-anchor: middle; dominant-baseline: middle; }
.astro-vedic-chart-planets circle { fill: rgb(var(--c-accent)); filter: drop-shadow(0 0 5px rgb(var(--c-accent) / .48)); }
.astro-matrix-ring { fill: rgb(var(--c-accent) / .035); stroke: rgb(var(--c-accent) / .78); stroke-width: 1.5; }
.astro-matrix-inner { fill: none; stroke: rgb(var(--c-tint) / .42); stroke-width: 1; stroke-dasharray: 4 5; }
.astro-matrix-spoke { fill: none; stroke: rgb(var(--c-tint) / .24); stroke-width: 1; }
.astro-matrix-core { fill: rgb(var(--c-surface) / .96); stroke: rgb(var(--c-accent) / .9); stroke-width: 2; }
.astro-matrix-center-label { fill: rgb(var(--c-accent)); font: 850 calc(var(--app-font-scale, 1) * 18px)/1 var(--font-sans); text-anchor: middle; }
.astro-matrix-node circle { fill: rgb(var(--c-surface) / .96); stroke: rgb(var(--c-accent) / .7); stroke-width: 1.4; }
.astro-matrix-node text { fill: rgb(var(--c-on-bg)); font: 800 calc(var(--app-font-scale, 1) * 10px)/1 var(--font-sans); text-anchor: middle; dominant-baseline: middle; }
.astro-matrix-node--small circle { fill: rgb(var(--c-surface-2) / .96); stroke: rgb(var(--c-tint) / .45); }
.astro-matrix-node--small text { font-size: calc(var(--app-font-scale, 1) * 8px); }
.astro-lifegraph-grid { fill: none; stroke: rgb(var(--c-tint) / .15); stroke-width: 1; }
.astro-lifegraph-area { fill: rgb(var(--c-accent) / .12); }
.astro-lifegraph-line { fill: none; stroke: rgb(var(--c-accent)); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 3px 5px rgb(var(--c-accent) / .3)); }
.astro-lifegraph-point circle { fill: rgb(var(--c-surface)); stroke: rgb(var(--c-accent)); stroke-width: 2; }
.astro-lifegraph-axis { fill: rgb(var(--c-on-bg-dim)); font: 700 calc(var(--app-font-scale, 1) * 9px)/1 var(--font-sans); text-anchor: middle; }

.astro-system-form {
  padding: clamp(18px, 3vw, 34px) !important;
  border: 1px solid var(--astro-line);
  border-radius: 24px !important;
  background:
    linear-gradient(145deg, rgb(var(--c-glow) / .07), transparent 42%),
    linear-gradient(320deg, rgb(var(--c-accent) / .055), transparent 58%),
    rgb(var(--c-surface) / .68) !important;
  box-shadow: 0 18px 44px rgb(var(--c-shadow) / .12), inset 0 1px 0 rgb(var(--c-tint) / .08);
}
.astro-system-form__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--astro-line);
}
.astro-system-form__heading .astro-system-eyebrow { margin: 0 0 3px; font-size: var(--type-label); }
.astro-system-form__heading h2 { margin: 0; color: rgb(var(--c-on-bg)); font-size: var(--type-title); font-weight: 780; line-height: 1.3; }
.astro-system-form__heading p:last-child { margin: 3px 0 0; color: var(--astro-muted); font-size: var(--type-label); line-height: 1.6; }
.astro-system-form__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid var(--astro-line);
  border-radius: 999px;
  color: var(--astro-muted);
  font-size: var(--type-caption);
  white-space: nowrap;
}
.astro-system-form__tag .material-symbols-outlined { color: rgb(var(--c-accent)); font-size: calc(var(--app-font-scale, 1) * 16px); }
.astro-system-form #birthProfileBar {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--astro-line);
  border-radius: 14px;
  background: var(--astro-soft);
}
.astro-system-form #birthProfileBar > div { gap: 8px; flex-wrap: wrap; }
.astro-system-form #birthProfileBar .profile-person-chip { min-height: 44px; padding: 6px 12px; border-radius: 999px; font-size: var(--type-caption); }
.astro-system-form #birthProfileBar a { margin-left: auto; color: rgb(var(--c-accent)); font-size: var(--type-caption); font-weight: 750; }
.astro-system-form :is(#birthDate, #birthTime, [data-pp="q"], [data-pp="detail"] input, [data-pp="detail"] select) {
  min-height: 50px;
  border-color: var(--astro-line);
  border-radius: 13px;
  background-color: rgb(var(--c-bg) / .28);
  font-size: var(--type-body);
}
.astro-system-form :is(#birthDate, #birthTime, [data-pp="q"], [data-pp="detail"] input, [data-pp="detail"] select):focus {
  border-color: rgb(var(--c-accent) / .72);
  box-shadow: 0 0 0 3px rgb(var(--c-accent) / .12);
}
.astro-system-form label { color: var(--astro-muted); font-size: var(--type-label); font-weight: 700; }
.astro-system-form > .astro-system-content p,
.astro-system-form > p {
  margin: 9px 0;
  padding: 10px 13px;
  border-left: 1px solid rgb(var(--c-accent) / .35);
  border-radius: 0 11px 11px 0;
  background: var(--astro-soft);
  color: var(--astro-muted);
  font-size: var(--type-label);
  line-height: 1.65;
}
.astro-system-form .birth-gender-group { gap: 9px; }
.astro-system-form .birth-gender-group .suit-btn { min-width: 104px; min-height: 44px; border-radius: 13px; font-size: var(--type-label); }
.astro-system-form #genderGroup { display: inline-flex; width: min(100%, 280px); flex-wrap: nowrap; gap: 4px; padding: 4px; border: 1px solid rgb(var(--c-tint) / .17); border-radius: 14px; background: rgb(var(--c-bg) / .22); }
.astro-system-form #genderGroup .suit-btn { flex: 1; min-height: 44px; padding: 7px 14px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--astro-muted); font-size: var(--type-label); }
.astro-system-form #genderGroup .suit-btn.active { border-color: rgb(var(--c-accent) / .75); background: linear-gradient(135deg, rgb(var(--c-accent)), color-mix(in srgb, rgb(var(--c-accent)) 78%, rgb(var(--c-glow)))); color: rgb(var(--c-bg)) !important; box-shadow: 0 5px 13px rgb(var(--c-accent) / .18), inset 0 1px 0 rgb(var(--c-tint) / .24); }
.astro-system-form #genderGroup .suit-btn:not(.active):hover { border-color: rgb(var(--c-accent) / .25); background: rgb(var(--c-accent) / .07); color: rgb(var(--c-on-bg)); }
.astro-system-form [data-place-picker="birthPlace"] { margin-top: 8px; }
.astro-system-form [data-pp="q"] { padding-right: 92px !important; }
.astro-system-form [data-pp="map"], .astro-system-form [data-pp="clear"] { width: 44px; height: 44px; border-radius: 11px; background: rgb(var(--c-bg) / .18); }
.astro-system-form [data-pp="detail"] { gap: 10px; margin-top: 12px; }
.astro-system-form [data-pp="detail"] label span { margin-bottom: 5px; font-size: var(--type-caption); }
.astro-system-form [data-pp="note"] { margin-top: 8px; color: var(--astro-muted); font-size: var(--type-label); line-height: 1.55; }
.astro-system-form #computeBtn { margin-top: 22px; }
.astro-system-form :is(button, a, input, select):focus-visible { outline: 3px solid rgb(var(--c-accent)); outline-offset: 3px; }

.astro-system-ai-intro { padding: 4px 2px 0; }
.astro-system-ai-intro .astro-system-eyebrow { margin-bottom: 5px; font-size: var(--type-label); }
.astro-system-ai-intro h2 { margin: 0 0 4px; color: rgb(var(--c-on-bg)); font-size: clamp(max(var(--type-caption), calc(var(--app-font-scale, 1) * 22px)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 2.7vw)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 30px))); font-weight: 800; }
.astro-system-ai-intro p:last-child { margin: 0; color: var(--astro-muted); font-size: var(--type-label); line-height: 1.65; }
.astro-system-results { scroll-margin-top: 92px; }
.astro-system-results .glass-panel { border-color: var(--astro-line); border-radius: 21px; }
.astro-system-results :is(h2, h3) { color: rgb(var(--c-on-bg)); }
.astro-system-results :is(p, small) { line-height: 1.65; }
.astro-system-ai { padding: clamp(17px, 2.4vw, 28px) !important; border: 1px solid var(--astro-line); border-radius: 21px !important; background: linear-gradient(140deg, rgb(var(--c-glow) / .07), rgb(var(--c-accent) / .035)), rgb(var(--c-surface) / .7) !important; }

/* Vedic dasha tree: give the disclosure arrow its own column and keep dates
   below the planet name, so long Thai labels never run into the marker. */
.astro-page-shell--vedic .vedic-dasha-node { margin: 0 0 9px 5px; padding-left: 14px; border-left: 1px solid var(--astro-line); }
.astro-page-shell--vedic #vedicDashaTree > .vedic-dasha-node { margin-left: 0; padding-left: 0; border-left: 0; }
.astro-page-shell--vedic .vedic-dasha-children { padding-top: 5px; }
.astro-page-shell--vedic .vedic-dasha-row {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 11px;
  width: 100%; min-width: 0; margin-bottom: 5px; padding: 11px 13px;
  border: 1px solid var(--astro-line); border-radius: 12px;
  background: rgb(var(--c-bg) / .22); color: rgb(var(--c-on-bg));
}
.astro-page-shell--vedic .vedic-dasha-summary { cursor: pointer; list-style: none; }
.astro-page-shell--vedic .vedic-dasha-summary::-webkit-details-marker { display: none; }
.astro-page-shell--vedic .vedic-dasha-summary::marker { content: ''; }
.astro-page-shell--vedic .vedic-dasha-summary:hover { border-color: rgb(var(--c-accent) / .38); background: rgb(var(--c-accent) / .06); }
.astro-page-shell--vedic .vedic-dasha-summary:focus-visible { outline: 3px solid rgb(var(--c-accent)); outline-offset: 2px; }
.astro-page-shell--vedic .vedic-dasha-row.is-current { border-color: rgb(var(--c-accent) / .4); background: rgb(var(--c-accent) / .11); }
.astro-page-shell--vedic .vedic-dasha-chevron { display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; border-radius: 6px; background: rgb(var(--c-tint) / .08); }
.astro-page-shell--vedic .vedic-dasha-chevron::before { content: ''; width: 7px; height: 7px; border-right: 2px solid rgb(var(--c-accent)); border-bottom: 2px solid rgb(var(--c-accent)); transform: rotate(-45deg); transition: transform .16s ease; }
.astro-page-shell--vedic .vedic-dasha-node[open] > .vedic-dasha-summary .vedic-dasha-chevron::before { transform: rotate(45deg); }
.astro-page-shell--vedic .vedic-dasha-leaf-mark { display: grid; place-items: center; width: 22px; color: rgb(var(--c-accent)); font-size: max(var(--type-caption), calc(var(--app-font-scale, 1) * 18px)); line-height: 22px; }
.astro-page-shell--vedic .vedic-dasha-copy { display: block; min-width: 0; }
.astro-page-shell--vedic .vedic-dasha-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 11px; }
.astro-page-shell--vedic .vedic-dasha-title { color: rgb(var(--c-on-bg)); font-size: var(--type-label); font-weight: 750; line-height: 1.45; }
.astro-page-shell--vedic .vedic-dasha-row.is-current .vedic-dasha-title { color: rgb(var(--c-accent)); }
.astro-page-shell--vedic :is(.vedic-dasha-duration, .vedic-dasha-code) { color: var(--astro-muted); font-size: var(--type-label); font-weight: 400; line-height: 1.45; }
.astro-page-shell--vedic .vedic-dasha-dates { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 7px; margin-top: 4px; color: rgb(var(--c-on-bg) / .82); font-size: var(--type-label); line-height: 1.45; }
.astro-page-shell--vedic .vedic-dasha-date-arrow { color: rgb(var(--c-accent) / .75); font-weight: 800; }
.astro-page-shell--vedic .vedic-dasha-age { display: inline; margin-top: 0; color: var(--astro-muted); font-size: var(--type-label); line-height: 1.45; }

@media (max-width: 820px) {
  .astro-system-form__heading { grid-template-columns: minmax(0, 1fr); }
  .astro-system-form__tag { grid-column: 1; justify-self: start; }
}
@media (max-width: 620px) {
  .astro-page-shell { padding: 14px 14px 18px; }
  .astro-system-content { gap: 14px; }
  .astro-system-hero { grid-template-columns: minmax(0, 1fr); gap: 4px; min-height: 0; margin-bottom: 14px; padding: 21px 17px 14px; border-radius: 21px; }
  .astro-system-hero h1 { font-size: clamp(max(var(--type-caption), calc(var(--app-font-scale, 1) * 31px)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 9vw)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 40px))); }
  .astro-system-hero__lead { margin: 12px 0 15px; font-size: var(--type-lead); }
  .astro-system-points { gap: 6px; }
  .astro-system-points li { min-height: 34px; padding: 6px 9px; font-size: var(--type-caption); }
  .astro-system-visual { min-height: 160px; border: 0; background: transparent; }
  .astro-system-orbit { width: 132px; }
  .astro-system-visual__caption { right: 0; bottom: 0; left: 0; }
  .astro-sample-svg { max-height: 210px; }
  .astro-system-form { padding: 17px 14px !important; border-radius: 19px !important; }
  .astro-system-form__heading { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 17px; padding-bottom: 15px; }
  .astro-system-form__heading h2 { font-size: var(--type-title); }
  .astro-system-form__heading p:last-child { font-size: var(--type-label); }
  .astro-system-form__tag { grid-column: 1; padding: 6px 9px; }
  .astro-system-form #birthProfileBar { padding: 9px; }
  .astro-system-form #birthProfileBar > div { gap: 5px; }
  .astro-system-form #birthProfileBar a { margin-left: 0; }
  .astro-system-form :is(#birthDate, #birthTime, [data-pp="q"], [data-pp="detail"] input, [data-pp="detail"] select) { min-height: 48px; }
  .astro-system-form #computeBtn { min-height: 50px; }
  .astro-page-shell--vedic .vedic-dasha-node { margin-left: 2px; padding-left: 9px; }
  .astro-page-shell--vedic .vedic-dasha-row { gap: 8px; padding: 10px; }
  .astro-page-shell--vedic .vedic-dasha-dates { display: grid; gap: 0; }
  .astro-page-shell--vedic .vedic-dasha-date-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .astro-system-form #computeBtn { transition: none; }
  .astro-page-shell--vedic .vedic-dasha-chevron::before { transition: none; }
}

/* Task introductions leave the shared glass surface to the working form. */
.astro-system-hero.astro-system-hero--task {
  display: block;
  min-height: 0;
  padding: 0;
  margin-bottom: 10px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
}
.astro-vedic-chart { max-height: none; }
.astro-system-hero--task .astro-system-hero__copy { max-width: 75ch; }
.astro-system-hero--task h1 { font-size: var(--type-headline-mobile); line-height: 1.35; letter-spacing: -.02em; text-wrap: balance; }
.astro-system-hero--task .astro-system-hero__lead { margin: 8px 0 12px; font-size: var(--type-body); line-height: 1.65; }
.astro-system-hero--task .astro-system-points { gap: 6px 18px; }
.astro-system-hero--task .astro-system-points li { min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; }
@media (min-width: 768px) { .astro-system-hero--task h1 { font-size: var(--type-headline); } }

@media (max-width: 620px) {
  .astro-system-hero.astro-system-hero--task { margin-bottom: 15px; }
  .astro-system-hero--task .astro-system-hero__lead { margin: 5px 0 8px; line-height: 1.55; }
  .astro-system-hero--task .astro-system-points { gap: 4px 12px; }
  .astro-system-form__heading { margin-bottom: 12px; padding-bottom: 11px; }
  .astro-system-form__heading p:last-child { display: none; }
  .astro-system-form__tag { padding: 5px 8px; }
  .astro-system-form #birthProfileBar { margin-bottom: 10px; padding: 7px 8px; }
  .astro-system-form #birthProfileBar > div { gap: 5px; }
  .astro-system-form #birthProfileBar .profile-person-chip { min-height: 44px; padding-inline: 9px; }
}

@media (max-width: 760px) {
  .astro-system-hero { grid-template-columns: 1fr; gap: 8px; min-height: 0; margin-bottom: 16px; padding: 20px 20px 14px; border-radius: 23px; }
  .astro-system-hero h1 { font-size: clamp(max(var(--type-caption), calc(var(--app-font-scale, 1) * 29px)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 8vw)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 38px))); }
  .astro-system-hero__lead { margin: 11px 0 15px; font-size: max(var(--type-caption), calc(var(--app-font-scale, 1) * 14px)); }
  .astro-system-points { gap: 6px; }
  .astro-system-points li { min-height: 32px; padding: 5px 9px; }
  .astro-system-visual { min-height: clamp(180px, 48vw, 210px); }
  .astro-system-visual .astro-sample-svg { width: min(48vw, 190px); }
  .astro-page-shell--vedic .birth-data-form__date-time { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .astro-page-shell--vedic .astro-system-form :is(#birthDate, #birthTime) { min-width: 0; padding-inline: 8px; font-size: var(--type-caption); }
}

@media (max-width: 480px) {
  .astro-system-hero { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 12px; padding: 12px 14px; border-radius: 18px; }
  .astro-system-hero__copy { display: contents; }
  .astro-system-eyebrow { grid-column: 1 / -1; margin-bottom: 5px; letter-spacing: .06em; }
  .astro-system-hero h1 { grid-column: 1; font-size: var(--type-headline-mobile); line-height: 1.2; letter-spacing: -.02em; }
  .astro-system-hero__lead { grid-column: 1; margin: 6px 0 0; font-size: var(--type-caption); line-height: 1.45; }
  .astro-system-points { display: none; }
  .astro-system-visual { grid-column: 2; grid-row: 2 / span 2; width: min(18vw, 80px); height: min(18vw, 80px); min-height: 0; }
  .astro-system-visual .astro-sample-svg { width: 100%; max-height: 100%; }
  .astro-system-visual__caption { display: none; }
  .astro-system-orbit { width: 100%; }
}

/* Human Design results start with a short summary; technical readings stay available
   in native disclosures so the Bodygraph is not buried beneath a wall of tables. */
.astro-page-shell--humandesign #hd_body .hd-key-summary { margin-bottom: 16px; }
.astro-page-shell--humandesign #hd_body .hd-key-summary__heading { margin: 0 0 10px; }
.astro-page-shell--humandesign #hd_body .hd-key-summary__heading h2 {
  margin: 0 0 3px;
  color: rgb(var(--c-on-bg));
  font-size: var(--type-title);
  font-weight: 780;
  line-height: 1.35;
}
.astro-page-shell--humandesign #hd_body .hd-key-summary__heading p {
  margin: 0;
  color: rgb(var(--c-on-bg-dim));
  font-size: var(--type-label);
  line-height: 1.55;
}
.astro-page-shell--humandesign #hd_body .hd-key-summary .glass-chip { min-height: 76px; }
.astro-page-shell--humandesign #hd_body .hd-key-summary .glass-chip > div:first-child {
  color: rgb(var(--c-on-bg-dim));
  font-size: var(--type-supporting);
  line-height: 1.4;
}
.astro-page-shell--humandesign #hd_body .hd-key-summary .glass-chip > div:nth-child(2) {
  color: rgb(var(--c-accent));
  font-size: var(--type-title);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.astro-page-shell--humandesign #hd_body .hd-result-details {
  overflow: hidden;
  padding: 0 !important;
  border-radius: 16px;
}
.astro-page-shell--humandesign #hd_body .hd-result-details__summary {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  color: rgb(var(--c-on-bg));
  cursor: pointer;
  list-style: none;
}
.astro-page-shell--humandesign #hd_body .hd-result-details__summary::-webkit-details-marker { display: none; }
.astro-page-shell--humandesign #hd_body .hd-result-details__summary:hover { background: rgb(var(--c-tint) / .045); }
.astro-page-shell--humandesign #hd_body .hd-result-details__summary:focus-visible {
  outline: 3px solid rgb(var(--c-accent));
  outline-offset: -3px;
}
.astro-page-shell--humandesign #hd_body .hd-result-details__title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  font-size: var(--type-title);
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.astro-page-shell--humandesign #hd_body .hd-result-details__title .material-symbols-outlined {
  flex: 0 0 auto;
  color: rgb(var(--c-accent));
  font-size: calc(var(--app-font-scale, 1) * 21px);
}
.astro-page-shell--humandesign #hd_body .hd-result-details__action {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 5px 9px;
  border: 1px solid rgb(var(--c-accent) / .28);
  border-radius: 999px;
  color: rgb(var(--c-accent));
  font-size: var(--type-supporting);
  line-height: 1.35;
  white-space: nowrap;
}
.astro-page-shell--humandesign #hd_body .hd-result-details__action-close { display: none; }
.astro-page-shell--humandesign #hd_body .hd-result-details[open] .hd-result-details__action-open { display: none; }
.astro-page-shell--humandesign #hd_body .hd-result-details[open] .hd-result-details__action-close { display: inline; }
.astro-page-shell--humandesign #hd_body .hd-result-details__chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
.astro-page-shell--humandesign #hd_body .hd-result-details[open] .hd-result-details__chevron { transform: rotate(225deg) translateY(-1px); }
.astro-page-shell--humandesign #hd_body .hd-result-details[open] .hd-result-details__summary {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--astro-line);
}
.astro-page-shell--humandesign #hd_body .hd-result-details__body { padding: 0 18px 18px; }
.astro-page-shell--humandesign #hd_body .hd-result-details__note {
  margin: 14px 0 0;
  color: rgb(var(--c-on-bg-dim));
  font-size: var(--type-supporting);
  line-height: 1.65;
}
.astro-page-shell--humandesign #hd_body .hd-result-details__body [class~="text-[10px]"],
.astro-page-shell--humandesign #hd_body .hd-result-details__body [class~="text-[11px]"] {
  font-size: var(--type-supporting) !important;
  line-height: 1.5;
}
.astro-page-shell--humandesign #hd_body > section.glass-panel > p.font-caption {
  color: rgb(var(--c-on-bg-dim));
  font-size: var(--type-supporting) !important;
  line-height: 1.65;
}
.astro-page-shell--humandesign .hd-bodygraph-host { width: min(100%, 420px); }
.astro-page-shell--humandesign .hd-bodygraph-legend__item {
  min-height: 36px;
  font-size: var(--type-supporting);
  line-height: 1.45;
}

/* One birth-data surface across every science. Page-specific notes and help remain
   in place, while the actual input flow shares the Vedic calculator's rhythm. */
body .astro-system-hero.astro-system-hero--science {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, .65fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  min-height: 210px;
  margin-bottom: 18px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid rgb(var(--c-tint) / .15);
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 88% 14%, rgb(var(--c-glow) / .2), transparent 42%),
    radial-gradient(ellipse at 0% 100%, rgb(var(--c-accent) / .13), transparent 45%),
    linear-gradient(130deg, rgb(var(--c-surface) / .78), rgb(var(--c-bg) / .28));
  box-shadow: 0 22px 60px rgb(var(--c-shadow) / .16), inset 0 1px 0 rgb(var(--c-tint) / .08);
}
body .astro-system-hero--science .astro-system-hero__copy { max-width: 820px; }
body .astro-system-hero--science .astro-system-visual { min-height: 180px; }
body .astro-system-hero.astro-system-hero--science h1 { margin: 0; color: rgb(var(--c-on-bg)); font-size: clamp(max(var(--type-caption), calc(var(--app-font-scale, 1) * 32px)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 4.1vw)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 48px))); font-weight: 800; line-height: 1.17; letter-spacing: -.035em; }
body .astro-system-hero.astro-system-hero--science h1 span { color: rgb(var(--c-accent)); }
body .astro-system-hero.astro-system-hero--science .astro-system-hero__lead { max-width: 650px; margin: 14px 0 20px; color: rgb(var(--c-on-bg-dim)); font-size: max(var(--type-caption), calc(var(--app-font-scale, 1) * 16px)); line-height: 1.75; }
body .astro-system-hero.astro-system-hero--science .astro-system-points { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
body .astro-system-hero.astro-system-hero--science .astro-system-points li { display: inline-flex; min-height: 36px; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid rgb(var(--c-tint) / .14); border-radius: 999px; background: rgb(var(--c-tint) / .045); color: rgb(var(--c-on-bg-dim)); font-size: var(--type-caption); font-weight: 650; }
body .astro-system-hero.astro-system-hero--science .astro-system-eyebrow { margin: 0 0 13px; color: rgb(var(--c-accent)); font-size: var(--type-label); font-weight: 800; letter-spacing: .13em; }
body .astro-form-unified.astro-form-unified {
  padding: clamp(20px, 3vw, 34px) !important;
  border: 1px solid rgb(var(--c-tint) / .15) !important;
  border-radius: 26px !important;
  background:
    radial-gradient(ellipse at 100% 0%, rgb(var(--c-glow) / .12), transparent 34%),
    linear-gradient(145deg, rgb(var(--c-surface) / .88), rgb(var(--c-bg) / .48)) !important;
  box-shadow: 0 22px 58px rgb(var(--c-shadow) / .2), inset 0 1px 0 rgb(var(--c-tint) / .1) !important;
}
body .astro-form-unified .astro-system-form__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 23px;
  padding-bottom: 19px;
  border-bottom: 1px solid rgb(var(--c-tint) / .14);
}
body .astro-form-unified .astro-system-form__heading h2 { margin: 0; color: rgb(var(--c-on-bg)); font-size: var(--type-title); font-weight: 780; line-height: 1.35; }
body .astro-form-unified .astro-system-form__heading p:last-child { margin: 4px 0 0; color: rgb(var(--c-on-bg-dim)); font-size: var(--type-label); line-height: 1.6; }
body .astro-form-unified .astro-system-eyebrow { margin: 0 0 3px; font-size: var(--type-caption); letter-spacing: .08em; }
body .astro-form-unified .astro-system-form__tag { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 11px; border: 1px solid rgb(var(--c-accent) / .22); border-radius: 999px; background: rgb(var(--c-accent) / .07); color: rgb(var(--c-on-bg-dim)); font-size: var(--type-caption); }
body .astro-form-unified .astro-system-form__tag .material-symbols-outlined { color: rgb(var(--c-accent)); }
body .astro-form-unified .birth-data-form__date-time { gap: 12px; margin-bottom: 12px; }
body .astro-form-unified .birth-data-form__field label,
body .astro-form-unified .birth-data-form > label { display: block; margin-bottom: 7px; color: rgb(var(--c-on-bg-dim)); font-size: var(--type-label); font-weight: 700; }
body .astro-form-unified :is(#birthDate, #birthTime, [data-pp="q"], [data-pp="detail"] input, [data-pp="detail"] select) {
  min-height: 50px;
  border: 1px solid rgb(var(--c-tint) / .18);
  border-radius: 13px;
  background-color: rgb(var(--c-bg) / .42);
  color: rgb(var(--c-on-bg));
  font-size: var(--type-body);
}
body .astro-form-unified .birth-data-form__switch-row,
body .astro-form-unified .birth-data-form__solar { padding: 11px 13px; border: 1px solid rgb(var(--c-tint) / .12); border-radius: 14px; background: rgb(var(--c-tint) / .035); }
body .astro-form-unified .birth-data-form__gender { margin-top: 16px; }
body .astro-form-unified #genderGroup { display: inline-flex; width: min(100%, 320px); flex-wrap: nowrap; gap: 5px; padding: 5px; border: 1px solid rgb(var(--c-tint) / .15); border-radius: 15px; background: rgb(var(--c-bg) / .32); }
body .astro-form-unified #genderGroup .suit-btn { flex: 1; min-height: 46px; border-radius: 11px; }
body .astro-form-unified [data-place-picker="birthPlace"] { margin-top: 7px; }
body .astro-form-unified .birth-data-form__note { margin: 10px 0; padding: 10px 13px; border: 1px solid rgb(var(--c-tint) / .12); border-radius: 12px; background: rgb(var(--c-tint) / .035); line-height: 1.65; }
body .astro-form-unified .birth-data-form__submit { margin-top: 22px; }
body .astro-form-unified .birth-data-form__submit button { min-height: 54px; border-radius: 15px; font-size: var(--type-body); font-weight: 750; }
/* Legacy science-specific helper cards now sit below the shared input flow. */
body .astro-form-unified:is(.bazi-input-card, .thaksa-panel, .sn-panel) { display: block; }
body .astro-form-unified .bazi-form-main,
body .astro-form-unified .thaksa-form-layout,
body .astro-form-unified .sn-form-layout { display: block; }
body .astro-form-unified :is(.bazi-form-aside, .thaksa-form-aside, .sn-form-aside) { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; margin-top: 18px; }
body .astro-form-unified :is(.bazi-aside-note, .thaksa-form-aside > div, .sn-form-aside-block) { padding: 14px 16px; border: 1px solid rgb(var(--c-tint) / .12); border-radius: 15px; background: rgb(var(--c-bg) / .28); }

@media (min-width: 761px) {
  body .thai-astro-page .astro-system-hero.astro-system-hero--science { grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); }
  body .thai-astro-page .astro-system-visual { min-width: 320px; }
  body .thai-astro-page .thai-astro-visual { width: 100%; }
}

@media (max-width: 620px) {
  body .astro-system-hero.astro-system-hero--science { grid-template-columns: minmax(0, 1fr); gap: 6px; min-height: 0; margin-bottom: 14px; padding: 20px 17px 15px; border-radius: 22px; }
  body .astro-system-hero--science .astro-system-hero__copy { max-width: none; }
  body .astro-system-hero--science .astro-system-visual { min-height: 150px; }
  body .astro-system-hero.astro-system-hero--science h1 { font-size: clamp(max(var(--type-caption), calc(var(--app-font-scale, 1) * 31px)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 9vw)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 40px))); }
  body .astro-system-hero.astro-system-hero--science .astro-system-hero__lead { margin: 12px 0 15px; font-size: var(--type-lead); }
  body .astro-system-hero.astro-system-hero--science .astro-system-points li { min-height: 34px; padding: 6px 9px; }
  body .astro-form-unified.astro-form-unified { padding: 18px 14px !important; border-radius: 21px !important; }
  body .astro-form-unified .astro-system-form__heading { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 16px; padding-bottom: 14px; }
  body .astro-form-unified .astro-system-form__heading h2 { font-size: var(--type-title); }
  body .astro-form-unified .astro-system-form__heading p:last-child { font-size: var(--type-caption); }
  body .astro-form-unified .astro-system-form__tag { grid-column: 1; justify-self: start; min-height: 32px; padding: 5px 9px; }
  body .astro-form-unified .birth-data-form__date-time { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body .astro-form-unified :is(#birthDate, #birthTime) { min-width: 0; padding-inline: 8px; font-size: var(--type-caption); }
  body .astro-form-unified #birthProfileBar { margin-bottom: 10px; padding: 8px; }
  body .astro-form-unified #birthProfileBar a { margin-left: 0; }
  body .astro-form-unified .birth-data-form__submit button { min-height: 52px; }
}

@media (max-width: 760px) {
  /* Keep science art compact in a side slot until the narrow mobile layout. */
  body .astro-system-hero.astro-system-hero--science .astro-system-visual {
    grid-column: 2;
    grid-row: 2 / span 2;
    width: min(24vw, 104px);
    height: min(24vw, 104px);
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }
  body .thai-astro-page .astro-system-visual { align-self: start; }
  body .thai-astro-page .thai-astro-visual {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  body .thai-astro-page .thai-astro-orbit { width: min(78px, 82%); }
  body .sevennine-page .astro-system-hero.astro-system-hero--science .astro-system-visual {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 145px;
    overflow: visible;
  }
  body .sevennine-page .sn-hero-art { min-height: 145px; }
  body .sevennine-page .sn-sample-table { width: min(100%, 270px); max-width: 270px; }
}

@media (max-width: 620px) {
  /* On phones, keep the complete introduction and feature points at full width,
     then put a restrained, recognizable illustration underneath. */
  body .astro-system-hero.astro-system-hero--science .astro-system-hero__copy {
    display: block;
    width: 100%;
    max-width: none;
  }
  body .astro-system-hero.astro-system-hero--science .astro-system-points { display: flex; }
  body .astro-system-hero.astro-system-hero--science .astro-system-visual {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    height: 118px;
    min-height: 118px;
    margin-top: 8px;
    overflow: hidden;
  }
  body .astro-system-hero.astro-system-hero--science .astro-system-visual .astro-sample-svg {
    width: min(100%, 142px);
    max-height: 108px;
  }
  body .thai-astro-page .thai-astro-visual { height: 118px; min-height: 0; }
  body .thai-astro-page .thai-astro-orbit { width: 94px; }
  body .sevennine-page .astro-system-hero.astro-system-hero--science .astro-system-visual {
    height: 205px;
    min-height: 205px;
    margin-top: 10px;
    place-items: start center;
  }
  body .sevennine-page .sn-hero-art { height: 205px; min-height: 205px; place-items: start center; }
  body .sevennine-page .astro-system-hero.astro-system-hero--science {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  body .sevennine-page .astro-system-hero.astro-system-hero--science .astro-system-hero__copy,
  body .sevennine-page .astro-system-hero.astro-system-hero--science .astro-system-visual { flex: 0 0 auto; }
}

@media (max-width: 620px) {
  .astro-page-shell--humandesign #hd_body .hd-key-summary { margin-bottom: 14px; }
  .astro-page-shell--humandesign #hd_body .hd-key-summary .glass-chip { min-height: 72px; }
  .astro-page-shell--humandesign #hd_body .hd-result-details__summary { align-items: flex-start; gap: 8px; padding: 10px 12px; }
  .astro-page-shell--humandesign #hd_body .hd-result-details__title { gap: 7px; }
  .astro-page-shell--humandesign #hd_body .hd-result-details__action { gap: 7px; padding-inline: 8px; }
  .astro-page-shell--humandesign #hd_body .hd-result-details__body { padding: 0 13px 14px; }
  .astro-page-shell--humandesign .hd-bodygraph-legend { justify-content: flex-start; gap: 5px 12px; }
}

/* Keep the shared calculator introduction within the first desktop viewport. */
@media (min-width: 761px) {
  body .astro-system-hero.astro-system-hero--science {
    grid-template-columns: minmax(0, 1.55fr) minmax(170px, .55fr);
    gap: clamp(16px, 2vw, 28px);
    min-height: 0;
    margin-bottom: 14px;
    padding: 16px clamp(20px, 2.4vw, 32px);
    border-radius: 22px;
  }
  body .astro-system-hero--science .astro-system-hero__copy { max-width: none; }
  body .astro-system-hero.astro-system-hero--science h1 {
    max-width: none;
    font-size: clamp(max(var(--type-caption), calc(var(--app-font-scale, 1) * 30px)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 3vw)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 38px)));
    line-height: 1.12;
  }
  body .astro-system-hero.astro-system-hero--science h1 br { display: none; }
  body .astro-system-hero.astro-system-hero--science h1 br + span { margin-inline-start: .2em; }
  body .astro-system-hero.astro-system-hero--science .astro-system-eyebrow { margin-bottom: 7px; }
  body .astro-system-hero.astro-system-hero--science .astro-system-hero__lead {
    max-width: 72ch;
    margin: 7px 0 10px;
    font-size: max(var(--type-caption), calc(var(--app-font-scale, 1) * 14px));
    line-height: 1.55;
  }
  body .astro-system-hero.astro-system-hero--science .astro-system-points { gap: 6px; }
  body .astro-system-hero.astro-system-hero--science .astro-system-points li {
    min-height: 30px;
    padding: 4px 9px;
  }
  body .astro-system-hero--science .astro-system-visual {
    width: 100%;
    min-width: 0;
    min-height: 112px;
    overflow: visible;
  }
  body .astro-system-hero--science .astro-system-visual .astro-sample-svg { width: min(100%, 150px); max-height: 118px; }
}

/* Canonical hero geometry shared by all nine astrology calculators. Keep each
   route's copy and visual slot, while giving the slot the same measured space. */
body main.bazi-shell,
body main.thaksa-page,
body main.sevennine-page {
  width: min(100%, 1240px);
  max-width: 1240px;
  margin-inline: auto;
  padding-top: 106px;
  padding-inline: clamp(16px, 3vw, 32px);
}
body .astro-system-hero.astro-system-hero--science {
  grid-template-columns: minmax(0, 1.55fr) minmax(170px, .55fr);
  gap: clamp(16px, 2vw, 28px);
  align-items: center;
  min-height: 0;
  margin: 0 0 14px;
  padding: 16px clamp(20px, 2.4vw, 32px);
  border-radius: 22px;
}
body .astro-system-hero.astro-system-hero--science .astro-system-hero__copy { max-width: none; }
body .astro-system-hero.astro-system-hero--science h1 {
  max-width: none;
  font-size: clamp(max(var(--type-caption), calc(var(--app-font-scale, 1) * 30px)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 3vw)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 38px)));
  line-height: 1.12;
}
body .astro-system-hero.astro-system-hero--science h1 br { display: none; }
body .astro-system-hero.astro-system-hero--science h1 br + span { margin-inline-start: .2em; }
body .astro-system-hero.astro-system-hero--science .astro-system-eyebrow { margin-bottom: 7px; }
body .astro-system-hero.astro-system-hero--science .astro-system-hero__lead {
  max-width: 72ch;
  margin: 7px 0 10px;
  font-size: max(var(--type-caption), calc(var(--app-font-scale, 1) * 14px));
  line-height: 1.55;
}
body .astro-system-hero.astro-system-hero--science .astro-system-points { gap: 6px; }
body .astro-system-hero.astro-system-hero--science .astro-system-points li { min-height: 30px; padding: 4px 9px; }
body .astro-system-hero.astro-system-hero--science .astro-system-visual {
  grid-column: auto;
  grid-row: auto;
  width: 100%;
  height: 132px;
  min-width: 0;
  min-height: 132px;
  margin: 0;
  overflow: hidden;
}
body .astro-system-hero.astro-system-hero--science .astro-system-visual .astro-sample-svg {
  width: min(100%, 150px);
  max-height: 122px;
}
body .astro-system-hero.astro-system-hero--science .astro-system-visual :is(.thai-astro-orbit, .bazi-element-wheel, .thaksa-orbit) {
  width: min(100%, 126px);
  max-height: 100%;
}
@media (max-width: 760px) {
  body main.bazi-shell,
  body main.thaksa-page,
  body main.sevennine-page { padding-inline: 14px; }
  body .astro-system-hero.astro-system-hero--science {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 17px 16px 14px;
  }
  body .astro-system-hero.astro-system-hero--science h1 {
    font-size: clamp(max(var(--type-caption), calc(var(--app-font-scale, 1) * 29px)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 8vw)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 38px)));
  }
  body .astro-system-hero.astro-system-hero--science .astro-system-hero__lead {
    margin: 8px 0 10px;
    font-size: var(--type-caption);
    line-height: 1.5;
  }
  body .astro-system-hero.astro-system-hero--science .astro-system-visual {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    height: 118px;
    min-height: 118px;
    margin-top: 2px;
  }
  body .astro-system-hero.astro-system-hero--science .astro-system-visual .astro-sample-svg { max-height: 108px; }
}
@media (max-width: 620px) {
  body .astro-system-hero.astro-system-hero--science { padding: 15px 14px 12px; border-radius: 19px; }
  body .astro-system-hero.astro-system-hero--science .astro-system-points { gap: 5px; }
  body .astro-system-hero.astro-system-hero--science .astro-system-points li { min-height: 29px; padding: 4px 8px; }
  body .astro-system-hero.astro-system-hero--science .astro-system-visual { height: 108px; min-height: 108px; }
}

/* All calculator routes share the Vedic shell's 1240px outer measure and
   32px desktop / 14px phone inset. Put that measure on each page shell so the
   form and hero stay aligned regardless of Base's route-specific main width. */
body main:has(.astro-page-shell),
body main:has(.thai-astro-page),
body main.bazi-shell,
body main.thaksa-page,
body main.sevennine-page {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-inline: auto;
  padding: 88px 0 0;
}
body .astro-page-shell,
body .thai-astro-page,
body main.bazi-shell,
body main.thaksa-page,
body main.sevennine-page {
  box-sizing: border-box;
  width: min(1240px, 100%);
  max-width: 1240px;
  margin-inline: auto;
  padding: 18px 32px;
}
body main.bazi-shell,
body main.thaksa-page,
body main.sevennine-page { padding-top: 106px; }

/* Keep decorative labels inside their illustration's available column. */
body .astro-page-shell--western .astro-system-visual { min-width: 0; }
body .astro-page-shell--western .astro-system-orbit { width: min(100%, 138px); }
body .bazi-shell .astro-system-visual { overflow: visible; }
body .bazi-shell .astro-system-visual { height: 168px; min-height: 168px; }
body .bazi-shell .astro-system-hero.astro-system-hero--science .astro-system-visual { overflow: visible; }
body .bazi-shell .astro-system-hero.astro-system-hero--science .astro-system-visual .bazi-element-wheel { width: min(100%, 148px); }
body .bazi-shell .bazi-element-wheel { transform: translateY(-14px); }
body .bazi-shell .bazi-element-node { width: 52px; gap: 3px; font-size: var(--type-caption); line-height: 1.2; }
body .bazi-shell .bazi-wheel-core small { max-width: 100%; font-size: calc(var(--type-caption) * .76); line-height: 1.2; letter-spacing: .04em; white-space: normal; }
@media (min-width: 761px) {
  body .bazi-shell .bazi-wheel-core { box-sizing: border-box; width: 38%; min-height: 0; aspect-ratio: 1; }
  body .bazi-shell .bazi-wheel-core strong { font-size: max(var(--type-caption), calc(var(--app-font-scale, 1) * 24px)); line-height: 1; white-space: nowrap; }
  body .bazi-shell .bazi-wheel-core small { margin-top: 3px; font-size: calc(var(--app-font-scale, 1) * 8px); line-height: 1; letter-spacing: .02em; white-space: nowrap; }
  body .bazi-shell .bazi-element-node { width: 42px; }
  body .bazi-shell .bazi-element-node--fire { right: -4%; }
  body .bazi-shell .bazi-element-node--water { left: -4%; }
}
body .thai-astro-page .thai-astro-visual { overflow: visible; }
body .thai-astro-page .thai-astro-orbit { width: min(100%, 106px); }
body .thai-astro-page .thai-astro-orbit__node { width: 24px; height: 24px; }

/* Keep the Thai hero's bordered artwork panel and its caption inside the
   space reserved for it; shared compact science-art sizing clips this panel. */
body .thai-astro-page .astro-system-visual {
  height: auto;
  min-height: 220px;
  overflow: visible;
}
body .thai-astro-page .thai-astro-visual { min-height: 220px; }
@media (max-width: 760px) {
  body .thai-astro-page .astro-system-visual { min-height: 164px; }
  body .thai-astro-page .thai-astro-visual { min-height: 164px; }
}
@media (max-width: 620px) {
  body .thai-astro-page .astro-system-visual { min-height: 150px; }
  body .thai-astro-page .thai-astro-visual { min-height: 150px; }
  body .thai-astro-page .thai-astro-visual__caption { display: flex; }
}
@media (max-width: 760px) {
  body .astro-page-shell,
  body .thai-astro-page,
  body main.bazi-shell,
  body main.thaksa-page,
  body main.sevennine-page { padding: 14px 14px 18px; }
  body main.bazi-shell,
  body main.thaksa-page,
  body main.sevennine-page { padding-top: 102px; }
  body .bazi-shell .astro-system-visual { height: 154px; min-height: 154px; }
  body .bazi-shell .astro-system-hero.astro-system-hero--science .astro-system-visual .bazi-element-wheel { width: min(100%, 148px); }
  body .bazi-shell .bazi-element-node { width: 42px; font-size: max(var(--type-caption), 13px); }
  body .bazi-shell .bazi-hero { padding-bottom: 28px; }
  body .bazi-shell .bazi-hero .bazi-element-wheel { transform: translateY(-22px); }
}

/* Reassert Thai artwork sizing after the final shared compact-hero rules. */
body .thai-astro-page .astro-system-hero.astro-system-hero--science .astro-system-visual {
  height: auto;
  min-height: 220px;
  overflow: visible;
}
@media (max-width: 760px) {
  body .thai-astro-page .astro-system-hero.astro-system-hero--science .astro-system-visual { min-height: 164px; }
}
@media (max-width: 620px) {
  body .thai-astro-page .astro-system-hero.astro-system-hero--science .astro-system-visual { min-height: 148px; }
  body .thai-astro-page .thai-astro-visual {
    box-sizing: border-box;
    display: flex;
    height: auto;
    min-height: 148px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 6px 8px;
  }
  body .thai-astro-page .astro-system-hero.astro-system-hero--science .astro-system-visual .thai-astro-orbit { width: clamp(76px, 23vw, 88px); }
  body .thai-astro-page .thai-astro-visual__caption {
    position: static;
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 8px;
    margin: 0;
    text-align: center;
    line-height: 1.35;
  }
}
@media (max-width: 480px) {
  body .thai-astro-page .astro-system-hero.astro-system-hero--science .astro-system-points { display: none; }
}

/* Keep the Thai orbit in the same desktop visual slot as the other sciences.
   The orbit itself remains fully visible; the taller 148px phone treatment is
   retained for the stacked layout. */
@media (min-width: 761px) {
  body .thai-astro-page .astro-system-hero.astro-system-hero--science .astro-system-visual {
    height: 132px;
    min-height: 132px;
  }
  body .thai-astro-page .thai-astro-visual { min-height: 132px; }
}

/* The legacy Bazi shell has its own grid rhythm. Let it use the shared hero to
   form gap rather than stacking the hero margin on top of the grid gap. */
body .bazi-page { gap: 14px; }
body .bazi-page .bazi-hero { margin-bottom: 0; }
@media (max-width: 760px) {
  body .bazi-shell .bazi-hero { padding-bottom: 17px; }
}

/* Phone calculator heroes: keep the page title and complete explanatory copy,
   then reserve a short, recognizable slot for the illustration. Feature chips
   repeat information already present in the description and return at wider
   sizes. The Thai chart keeps its established captioned diagram treatment. */
@media (max-width: 620px) {
  body .astro-system-hero.astro-system-hero--science {
    gap: 4px;
    margin-bottom: 10px;
    padding: 13px 14px 11px;
    border-radius: 18px;
  }
  body .astro-system-hero.astro-system-hero--science h1 {
    font-size: clamp(max(var(--type-caption), calc(var(--app-font-scale, 1) * 27px)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 7.2vw)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 32px)));
    line-height: 1.14;
  }
  body .astro-system-hero.astro-system-hero--science .astro-system-eyebrow { margin-bottom: 5px; }
  body .astro-system-hero.astro-system-hero--science .astro-system-hero__lead {
    margin: 6px 0 0;
    font-size: max(var(--type-caption), calc(var(--app-font-scale, 1) * 13px));
    line-height: 1.45;
  }
  body .astro-system-hero.astro-system-hero--science .astro-system-points { gap: 4px; }
  body .astro-system-hero.astro-system-hero--science .astro-system-points li {
    min-height: 27px;
    gap: 4px;
    padding: 3px 7px;
    font-size: var(--type-caption);
  }
  body .astro-system-hero.astro-system-hero--science .astro-system-visual {
    height: 72px;
    min-height: 72px;
    margin-top: 3px;
  }
  body .astro-system-hero.astro-system-hero--science .astro-system-orbit { width: 68px; }
  body .astro-system-hero.astro-system-hero--science .astro-system-visual .astro-sample-svg { max-height: 64px; }
  body .astro-system-hero.astro-system-hero--science .astro-system-visual :is(.thai-astro-orbit, .bazi-element-wheel, .thaksa-orbit) {
    width: min(100%, 76px);
    max-height: 64px;
  }
  body .bazi-shell .astro-system-hero.astro-system-hero--science .astro-system-visual { height: 110px; min-height: 110px; overflow: visible; }
  body .bazi-shell .astro-system-hero.astro-system-hero--science .astro-system-visual .bazi-element-wheel {
    width: 110px;
    transform: none;
  }
  body .thaksa-page .astro-system-hero.astro-system-hero--science .astro-system-visual { height: 88px; min-height: 88px; overflow: visible; }
  body .thaksa-page .astro-system-hero.astro-system-hero--science .thaksa-hero-art { height: 88px; min-height: 88px; }
  body .thaksa-page .astro-system-hero.astro-system-hero--science .thaksa-orbit { width: 80px; }
  body .sevennine-page .astro-system-hero.astro-system-hero--science .astro-system-visual,
  body .sevennine-page .sn-hero-art {
    height: 181px;
    min-height: 181px;
  }
  body .sevennine-page .sn-sample-table { width: min(100%, 230px); max-width: 230px; padding: 6px; }
  body .sevennine-page .sn-sample-table-head { margin-bottom: 2px; }
  body .sevennine-page .sn-sample-grid { gap: 0; }
  body .sevennine-page .sn-sample-row { gap: 1px; }
  body .sevennine-page .sn-sample-cell { min-height: 10px; line-height: 1; }
  body .thai-astro-page .astro-system-hero.astro-system-hero--science { gap: 3px; }
  body .thai-astro-page .astro-system-hero.astro-system-hero--science .astro-system-hero__lead { margin-top: 6px; }
}
@media (max-width: 480px) {
  body .astro-system-hero.astro-system-hero--science { padding: 12px 13px 10px; }
  body .astro-system-hero.astro-system-hero--science h1 {
    font-size: clamp(max(var(--type-caption), calc(var(--app-font-scale, 1) * 26px)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 7vw)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 30px)));
  }
  body .astro-system-hero.astro-system-hero--science .astro-system-visual { height: 68px; min-height: 68px; }
  body .astro-system-hero.astro-system-hero--science .astro-system-orbit { width: 68px; }
  body .astro-system-hero.astro-system-hero--science .astro-system-visual .astro-sample-svg { max-height: 58px; }
  body .sevennine-page .astro-system-hero.astro-system-hero--science .astro-system-visual,
  body .sevennine-page .sn-hero-art { height: 181px; min-height: 181px; }
  body .thai-astro-page .astro-system-hero.astro-system-hero--science .astro-system-visual,
  body .thai-astro-page .thai-astro-visual { min-height: 148px; }
}

/* Keep the complete copy and feature chips available while moving the motif
   alongside the heading, so mobile heroes do not become an art-first stack. */
@media (max-width: 620px) {
  body .astro-system-hero.astro-system-hero--science:not(.thai-astro-hero):not(.bazi-hero) {
    grid-template-columns: minmax(0, 1fr) 82px;
    grid-template-rows: auto auto auto auto;
    column-gap: 8px;
    row-gap: 6px;
    align-items: center;
  }
  body .astro-system-hero.astro-system-hero--science:not(.thai-astro-hero):not(.bazi-hero) .astro-system-hero__copy { display: contents; }
  body .astro-system-hero.astro-system-hero--science:not(.thai-astro-hero):not(.bazi-hero) .astro-system-eyebrow { grid-column: 1; grid-row: 1; }
  body .astro-system-hero.astro-system-hero--science:not(.thai-astro-hero):not(.bazi-hero) h1 { grid-column: 1 / -1; grid-row: 2; }
  body .astro-system-hero.astro-system-hero--science:not(.thai-astro-hero):not(.bazi-hero) .astro-system-hero__lead { grid-column: 1 / -1; grid-row: 3; }
  body .astro-system-hero.astro-system-hero--science:not(.thai-astro-hero):not(.bazi-hero) .astro-system-points { grid-column: 1 / -1; grid-row: 4; }
  body .astro-system-hero.astro-system-hero--science:not(.thai-astro-hero):not(.bazi-hero) .astro-system-visual {
    grid-column: 2;
    grid-row: 1;
    width: 82px;
    height: 82px;
    min-height: 82px;
    margin: 0;
    overflow: visible;
  }
  body .astro-system-hero.astro-system-hero--science:not(.thai-astro-hero):not(.bazi-hero) .astro-system-visual :is(.astro-system-orbit, .thaksa-orbit) { width: min(100%, 76px); }
  body .astro-system-hero.astro-system-hero--science:not(.thai-astro-hero):not(.bazi-hero) .astro-system-visual .astro-sample-svg { max-height: 76px; }
  body .astro-system-hero.astro-system-hero--science.bazi-hero { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  body .astro-system-hero.astro-system-hero--science.bazi-hero .astro-system-hero__copy { display: block; }
  body .astro-system-hero.astro-system-hero--science.bazi-hero h1 { grid-column: auto; grid-row: auto; }
  body .astro-system-hero.astro-system-hero--science.bazi-hero .astro-system-visual { grid-column: 1; grid-row: auto; width: 100%; height: 120px; min-height: 120px; }
  body .astro-system-hero.astro-system-hero--science.bazi-hero .astro-system-visual .bazi-element-wheel { width: 120px; }
  body .astro-system-hero.thaksa-hero { grid-template-columns: minmax(0, 1fr) 88px; }
  body .astro-system-hero.thaksa-hero .astro-system-visual,
  body .astro-system-hero.thaksa-hero .thaksa-hero-art { width: 88px; height: 88px; min-height: 88px; }
  body .astro-system-hero.thaksa-hero .thaksa-orbit { width: 80px; }
  body .astro-system-hero.sn-hero { grid-template-columns: minmax(0, 1fr) 100px; }
  body .astro-system-hero.sn-hero .astro-system-visual,
  body .astro-system-hero.sn-hero .sn-hero-art { width: 100px; height: 100px; min-height: 100px; overflow: visible; }
  body .astro-system-hero.sn-hero .sn-hero-art { position: relative; display: block; }
  body .astro-system-hero.sn-hero .sn-sample-table {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 170px;
    padding: 6px;
    transform: translate(-50%, -50%) scale(.54);
    transform-origin: center;
  }
  body .astro-system-hero.sn-hero .sn-sample-table-head { margin-bottom: 2px; }
  body .astro-system-hero.sn-hero .sn-sample-grid { gap: 0; }
  body .astro-system-hero.sn-hero .sn-sample-row { gap: 1px; }
  body .astro-system-hero.sn-hero .sn-sample-cell { min-height: 10px; line-height: 1; }
}
@media (max-width: 480px) {
  body .astro-system-hero.astro-system-hero--science:not(.thai-astro-hero):not(.bazi-hero) { grid-template-columns: minmax(0, 1fr) 82px; }
  body .astro-system-hero.astro-system-hero--science:not(.thai-astro-hero):not(.bazi-hero) .astro-system-visual { width: 82px; height: 82px; min-height: 82px; }
  body .astro-system-hero.astro-system-hero--science.bazi-hero { grid-template-columns: minmax(0, 1fr); }
  body .astro-system-hero.astro-system-hero--science.bazi-hero .astro-system-visual { width: 100%; height: 120px; min-height: 120px; }
  body .astro-system-hero.astro-system-hero--science.bazi-hero .bazi-element-wheel { width: 120px; }
  body .astro-system-hero.astro-system-hero--science.bazi-hero .bazi-element-node--water { left: -8px; }
  body .astro-system-hero.astro-system-hero--science.bazi-hero .bazi-element-node--fire { right: -8px; }
  body .astro-system-hero.astro-system-hero--science.thaksa-hero { grid-template-columns: minmax(0, 1fr) 88px; }
  body .astro-system-hero.astro-system-hero--science.thaksa-hero .astro-system-visual,
  body .astro-system-hero.astro-system-hero--science.thaksa-hero .thaksa-hero-art { width: 88px; height: 88px; min-height: 88px; }
  body .astro-system-hero.astro-system-hero--science.sn-hero { grid-template-columns: minmax(0, 1fr) 100px; }
  body .astro-system-hero.astro-system-hero--science.sn-hero .astro-system-visual,
  body .astro-system-hero.astro-system-hero--science.sn-hero .sn-hero-art { width: 100px; height: 100px; min-height: 100px; }
  body .astro-system-hero.astro-system-hero--science.sn-hero { grid-template-columns: minmax(0, 1fr) 100px; }
  body .astro-system-hero.astro-system-hero--science.sn-hero .astro-system-visual,
  body .astro-system-hero.astro-system-hero--science.sn-hero .sn-hero-art { width: 100px; height: 100px; min-height: 100px; }
}

/* Final compact, single-column phone treatment shared by all science heroes. */
@media (max-width: 620px) {
  body .astro-system-hero.astro-system-hero--science:not(.thai-astro-hero) {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    margin-bottom: 10px;
    padding: 13px 14px 11px;
    border-radius: 18px;
  }
  body .astro-system-hero.astro-system-hero--science:not(.thai-astro-hero) .astro-system-hero__copy { display: block; }
  body .astro-system-hero.astro-system-hero--science:not(.thai-astro-hero) :is(.astro-system-eyebrow, h1, .astro-system-hero__lead, .astro-system-points) { grid-column: 1; grid-row: auto; }
  body .astro-system-hero.astro-system-hero--science h1,
  body .thai-astro-page .astro-system-hero.astro-system-hero--science h1 {
    margin: 0;
    font-size: clamp(max(var(--type-caption), calc(var(--app-font-scale, 1) * 24px)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 6.4vw)), max(var(--type-caption), calc(var(--app-font-scale, 1) * 28px)));
    line-height: 1.14;
  }
  body .astro-system-hero.astro-system-hero--science .astro-system-eyebrow { margin-bottom: 5px; }
  body .astro-system-hero.astro-system-hero--science .astro-system-hero__lead { margin: 6px 0 0; font-size: max(var(--type-caption), calc(var(--app-font-scale, 1) * 13px)); line-height: 1.45; }
  body .astro-system-hero.astro-system-hero--science .astro-system-points { display: flex; gap: 4px; margin-top: 7px; }
  body .astro-system-hero.astro-system-hero--science .astro-system-points li { min-height: 27px; gap: 4px; padding: 3px 7px; font-size: var(--type-caption); }
  body .astro-system-hero.astro-system-hero--science .astro-system-visual { grid-column: 1; grid-row: auto; width: 100%; height: 72px; min-height: 72px; margin: 3px 0 0; overflow: visible; }
  body .astro-system-hero.astro-system-hero--science .astro-system-orbit { width: 68px; }
  body .astro-system-hero.astro-system-hero--science .astro-system-visual .astro-sample-svg { max-height: 64px; }
  body .astro-system-hero.astro-system-hero--science.bazi-hero .astro-system-visual { height: 148px; min-height: 148px; }
  body .astro-system-hero.astro-system-hero--science.bazi-hero .bazi-element-wheel { width: 148px !important; height: auto !important; max-height: none !important; aspect-ratio: 1; scale: .72 !important; transform-origin: center; }
  body .astro-system-hero.astro-system-hero--science.bazi-hero .bazi-element-node--water { left: 0; }
  body .astro-system-hero.astro-system-hero--science.bazi-hero .bazi-element-node--fire { right: 0; }
  body .astro-system-hero.astro-system-hero--science.thaksa-hero .astro-system-visual,
  body .astro-system-hero.astro-system-hero--science.thaksa-hero .thaksa-hero-art { height: 88px !important; min-height: 88px !important; }
  body .astro-system-hero.astro-system-hero--science.thaksa-hero .thaksa-orbit { width: 80px; }
  body .astro-system-hero.astro-system-hero--science.sn-hero .astro-system-visual,
  body .astro-system-hero.astro-system-hero--science.sn-hero .sn-hero-art { height: 100px !important; min-height: 100px !important; }
  body .astro-system-hero.astro-system-hero--science.sn-hero .sn-hero-art { position: relative; display: block; }
  body .astro-system-hero.astro-system-hero--science.sn-hero .sn-sample-table { position: absolute; top: 50%; left: 50%; width: 170px; padding: 6px; transform: translate(-50%, -50%) scale(.54); transform-origin: center; }
  body .astro-system-hero.astro-system-hero--science.sn-hero .sn-sample-table-head { margin-bottom: 2px; }
  body .astro-system-hero.astro-system-hero--science.sn-hero .sn-sample-grid { gap: 0; }
  body .astro-system-hero.astro-system-hero--science.sn-hero .sn-sample-row { gap: 1px; }
  body .astro-system-hero.astro-system-hero--science.sn-hero .sn-sample-cell { min-height: 10px; line-height: 1; }
}
@media (max-width: 480px) {
  body .astro-system-hero.astro-system-hero--science:not(.thai-astro-hero) { padding: 12px 13px 10px; }
  body .astro-system-hero.astro-system-hero--science:not(.thai-astro-hero) .astro-system-visual { height: 82px; min-height: 82px; }
  body .astro-system-hero.astro-system-hero--science.bazi-hero .astro-system-visual { height: 148px; min-height: 148px; }
  body .astro-system-hero.astro-system-hero--science.thaksa-hero .astro-system-visual,
  body .astro-system-hero.astro-system-hero--science.thaksa-hero .thaksa-hero-art { height: 88px !important; min-height: 88px !important; }
  body .astro-system-hero.astro-system-hero--science.sn-hero .astro-system-visual,
  body .astro-system-hero.astro-system-hero--science.sn-hero .sn-hero-art { height: 100px !important; min-height: 100px !important; }
}

/* Mobile science heroes keep their copy and capability chips without reserving
   a grid cell for decorative artwork. Desktop showcase artwork is unchanged. */
@media (max-width: 620px) {
  body .astro-system-hero.astro-system-hero--science .astro-system-visual {
    display: none !important;
  }
}

/* Mobile calculator introductions: remove the secondary kicker and render the
   three capability labels as one calm, wrapping line of supporting information. */
@media (max-width: 620px) {
  body .astro-system-hero.astro-system-hero--science .astro-system-eyebrow { display: none; }
  body .astro-system-hero.astro-system-hero--science .astro-system-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0 6px;
    margin-top: 5px;
  }
  body .astro-system-hero.astro-system-hero--science .astro-system-points li {
    display: inline-flex;
    min-height: 0;
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    font-size: var(--type-caption);
    line-height: 1.45;
  }
  body .astro-system-hero.astro-system-hero--science .astro-system-points li .material-symbols-outlined { display: none; }
  body .astro-system-hero.astro-system-hero--science .astro-system-points li + li::before {
    content: '·';
    margin-inline-end: 6px;
    color: var(--c-text-secondary);
  }
}
