:root {
  --paper: #f1e8d7;
  --paper-light: #fbf7ee;
  --paper-deep: #d9cdb8;
  --ink: #211e19;
  --ink-soft: #514b42;
  --celestial-teal: #0b5a55;
  --teal-light: #b9d6cc;
  --saffron: #dfa927;
  --saffron-light: #f4df9c;
  --dusk: #17243a;
  --coral: #d45f3f;
  --line: rgba(33, 30, 25, 0.28);
  --radius-large: 36px;
  --radius-medium: 22px;
  --shadow: 0 28px 80px rgba(54, 43, 23, 0.13);
  --display: "Thonburi", "Sukhumvit Set", "Leelawadee UI", sans-serif;
  --body: "Sukhumvit Set", "Thonburi", "Leelawadee UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

html,
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
}

body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(circle at 14% 8%, rgba(255, 255, 255, 0.62), transparent 27%),
    radial-gradient(circle at 88% 28%, rgba(223, 169, 39, 0.09), transparent 22%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  content: "";
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--saffron);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  transform: translateY(-150%);
  border-radius: 999px;
  background: var(--ink);
  color: white;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 15;
  width: min(1180px, calc(100% - 40px));
  min-height: 64px;
  padding: 9px 10px 9px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
  border: 1px solid rgba(33, 30, 25, 0.22);
  border-radius: 999px;
  background: rgba(241, 232, 215, 0.72);
  box-shadow: 0 12px 38px rgba(33, 30, 25, 0.08);
  backdrop-filter: blur(18px);
  transition: background 220ms ease, top 220ms ease, box-shadow 220ms ease;
}

.site-header.is-scrolled {
  top: 10px;
  background: rgba(251, 247, 238, 0.96);
  box-shadow: 0 16px 44px rgba(33, 30, 25, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  text-decoration: none;
}

.brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.brand-mark .brand-orbit {
  position: absolute;
  inset: 5px -5px;
  transform: rotate(-24deg);
  border: 1px solid currentColor;
  border-radius: 50%;
}

.brand-signal {
  position: absolute;
  top: 4px;
  right: 2px;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--paper-light);
  border-radius: 50%;
  background: var(--saffron);
  box-shadow: 0 0 0 1px currentColor;
}

.brand-mark b {
  font-size: 17px;
  line-height: 1;
}

.brand-type {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--display);
  line-height: 1;
}

.brand-type strong {
  font-size: 19px;
}

.brand-type em {
  font-size: 15px;
  font-weight: 400;
}

.brand-credit {
  display: block;
  max-width: 470px;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 8.5px;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-footer .brand-credit {
  color: var(--teal-light);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  text-decoration: none;
}

.site-nav > a:not(.nav-action) {
  position: relative;
}

.site-nav > a:not(.nav-action)::after {
  position: absolute;
  right: 0;
  bottom: 7px;
  left: 0;
  height: 1px;
  transform: scaleX(0);
  transform-origin: right;
  background: currentColor;
  content: "";
  transition: transform 180ms ease;
}

.site-nav > a:not(.nav-action):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-action {
  gap: 16px;
  padding: 0 9px 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper-light);
  white-space: nowrap;
}

.nav-action span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--saffron);
  color: var(--ink);
}

main {
  display: block;
}

.hero {
  min-height: 100svh;
  padding: 112px 24px 46px;
  display: grid;
  place-items: center;
}

.hero-frame {
  position: relative;
  width: min(1340px, 100%);
  min-height: 750px;
  padding: clamp(48px, 6vw, 92px) clamp(28px, 6vw, 88px) 150px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.72fr);
  align-items: center;
  gap: clamp(40px, 7vw, 112px);
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
  background:
    linear-gradient(110deg, rgba(255,255,255,.44), transparent 52%),
    var(--paper-light);
}

.hero-frame::before,
.hero-frame::after {
  position: absolute;
  border: 1px solid rgba(33, 30, 25, 0.16);
  border-radius: 50%;
  content: "";
}

.hero-frame::before {
  width: 280px;
  height: 280px;
  top: -190px;
  left: 34%;
}

.hero-frame::after {
  width: 120px;
  height: 120px;
  top: -80px;
  left: calc(34% + 80px);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 34px;
  height: 1px;
  display: inline-block;
  background: currentColor;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.035em;
}

h1 {
  margin: 0;
  max-width: 750px;
  font-size: clamp(58px, 7.2vw, 108px);
  line-height: 0.94;
}

h1 em,
h2 em {
  position: relative;
  color: var(--celestial-teal);
  font-style: normal;
  font-weight: 400;
}

h1 em::after {
  position: absolute;
  right: -14px;
  bottom: 1px;
  left: -8px;
  height: 10px;
  z-index: -1;
  transform: rotate(-1.5deg);
  border-radius: 50%;
  background: var(--saffron-light);
  content: "";
}

.hero-intro {
  max-width: 580px;
  margin: 28px 0 38px;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.4vw, 19px);
}

.hero-intro strong {
  color: var(--ink);
  font-weight: 600;
}

.teacher-editorial {
  width: min(620px, 100%);
  margin: 0 0 32px;
}

.teacher-editorial figcaption {
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.teacher-editorial figcaption span {
  color: var(--celestial-teal);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.teacher-editorial figcaption strong {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 500;
}

.teacher-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.teacher-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 6px 0 rgba(33, 30, 25, .08);
  animation: teacher-arrive 520ms cubic-bezier(.2, .72, .2, 1) both;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.teacher-card--doctor { animation-delay: 80ms; }

.teacher-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(15, 57, 54, .88));
  content: "";
  pointer-events: none;
}

.teacher-card--lead::before,
.teacher-card--doctor::before {
  position: absolute;
  top: 10px;
  z-index: 2;
  width: 28px;
  height: 5px;
  border-radius: 99px;
  content: "";
}

.teacher-card--lead::before {
  right: 10px;
  background: var(--saffron);
}

.teacher-card--doctor::before {
  left: 10px;
  background: var(--teal-light);
}

.teacher-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.teacher-card--lead img { object-position: 48% 35%; }
.teacher-card--doctor img { object-position: 67% 36%; }

.teacher-card p {
  position: absolute;
  right: 12px;
  bottom: 9px;
  left: 12px;
  z-index: 3;
  margin: 0;
  color: var(--paper-light);
  line-height: 1.1;
}

.teacher-card p strong,
.teacher-card p span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-card p strong {
  font-family: var(--display);
  font-size: 15px;
}

.teacher-card p span {
  margin-top: 3px;
  color: rgba(255, 251, 244, .8);
  font-size: 9px;
}

.teacher-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 0 rgba(33, 30, 25, .07);
}

.teacher-card:active { transform: scale(.985); }

@keyframes teacher-arrive {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.prediction-form {
  max-width: 710px;
}

.mode-switch {
  width: fit-content;
  margin: 0 0 22px;
  padding: 4px;
  display: flex;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
}

.mode-switch button {
  min-height: 44px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
}

.mode-switch button[aria-pressed="true"] {
  background: var(--celestial-teal);
  color: var(--paper-light);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 18px;
}

.field {
  position: relative;
}

.field label {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-size: 12px;
}

.field input {
  width: 100%;
  height: 58px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(20px, 2vw, 28px);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input::placeholder {
  color: rgba(33, 30, 25, 0.32);
}

.field input:focus {
  border-color: var(--celestial-teal);
  box-shadow: 0 3px 0 -1px var(--celestial-teal);
}

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

.field-divider {
  padding-bottom: 13px;
  color: var(--saffron);
  font-size: 20px;
}

.form-hint {
  margin: 11px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.form-actions {
  min-height: 68px;
  margin-top: 25px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}

.primary-button {
  min-width: 228px;
  padding: 6px 7px 6px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper-light);
  box-shadow: 0 8px 0 rgba(33, 30, 25, 0.12);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 11px 0 rgba(33, 30, 25, 0.1);
}

.primary-button:active {
  transform: scale(0.98);
  box-shadow: 0 4px 0 rgba(33, 30, 25, 0.12);
}

.primary-button > i {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--saffron);
  color: var(--ink);
  font-style: normal;
  font-size: 19px;
}

.primary-button[disabled] {
  cursor: wait;
  opacity: 0.68;
}

.form-status {
  max-width: 300px;
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--coral);
  font-size: 13px;
  line-height: 1.45;
}

.house-calculation {
  margin: 14px 0 0;
  color: var(--celestial-teal);
  font-family: var(--display);
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 700;
}

.prediction-grid--house {
  grid-template-columns: minmax(0, 1fr);
}

.hero-orbit {
  position: relative;
  width: min(100%, 470px);
  aspect-ratio: 1;
  justify-self: center;
}

.hero-orbit::before {
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(223, 169, 39, 0.12), transparent 64%);
  content: "";
}

.orbit-caption {
  position: absolute;
  top: 3%;
  right: 6%;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.3;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.orbit-one {
  width: 92%;
  height: 38%;
  transform: translate(-50%, -50%) rotate(-28deg);
}

.orbit-two {
  width: 76%;
  height: 76%;
  transform: translate(-50%, -50%) rotate(18deg);
}

.orbit-three {
  width: 49%;
  height: 92%;
  transform: translate(-50%, -50%) rotate(53deg);
}

.planet {
  position: absolute;
  top: 50%;
  left: 0;
  display: block;
  border-radius: 50%;
}

.planet-saffron {
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  background: var(--saffron);
  box-shadow: 0 0 0 7px var(--paper-light);
}

.planet-ink {
  width: 17px;
  height: 17px;
  top: 91%;
  left: 50%;
  background: var(--ink);
}

.planet-teal {
  width: 27px;
  height: 27px;
  top: 14%;
  left: 50%;
  background: var(--celestial-teal);
  box-shadow: 0 0 0 5px var(--paper-light);
}

.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 128px;
  height: 128px;
  padding: 18px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper-light);
  box-shadow: 0 0 0 10px rgba(241, 232, 215, 0.72);
}

.orbit-center strong {
  font-family: var(--display);
  font-size: 50px;
  line-height: 0.72;
}

.orbit-center small {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.star {
  position: absolute;
  color: var(--coral);
}

.star-one {
  top: 20%;
  left: 7%;
  font-size: 24px;
}

.star-two {
  right: 3%;
  bottom: 17%;
  font-size: 31px;
}

.coordinate {
  position: absolute;
  bottom: 2%;
  left: 9%;
  font-size: 9px;
  letter-spacing: 0.12em;
  line-height: 1.4;
}

.proof-strip {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 112px;
  padding: 18px clamp(28px, 6vw, 88px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  border-top: 1px solid var(--ink);
  background: var(--celestial-teal);
  color: var(--paper-light);
}

.proof-strip p {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.proof-strip p + p {
  border-left: 1px solid rgba(255,255,255,.35);
}

.proof-strip strong {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

.proof-strip span {
  font-size: 11px;
  line-height: 1.4;
}

.section-marker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.section-marker span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.section-marker p {
  margin: 0;
}

.results {
  position: relative;
  width: min(1292px, calc(100% - 48px));
  margin: 54px auto 110px;
  padding: clamp(32px, 5vw, 70px);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-large);
  background: var(--paper-light);
  box-shadow: var(--shadow);
}

.results[hidden] {
  display: none;
}

.results-heading {
  margin-top: 28px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.results-heading h2,
.science-heading h2,
.privacy h2,
.final-cta h2 {
  margin: 0;
  font-size: clamp(48px, 6.4vw, 92px);
  line-height: 0.98;
}

.eyebrow-dark {
  margin-bottom: 16px;
  color: var(--celestial-teal);
}

.secondary-button {
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
}

.secondary-button:hover {
  background: var(--ink);
  color: var(--paper-light);
}

.result-tabs {
  margin: 48px 0 0;
  padding: 6px;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
}

.result-tab {
  min-width: 130px;
  min-height: 44px;
  padding: 7px 20px;
  flex: 1 0 auto;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.result-tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper-light);
}

.result-panel {
  padding-top: 35px;
}

.result-summary {
  display: grid;
  grid-template-columns: minmax(180px, .5fr) 1.5fr;
  gap: 30px;
  align-items: start;
}

.analyzed-name {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 600;
  line-height: 1.15;
}

.character-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.character-chip {
  min-width: 58px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  text-align: center;
}

.character-chip strong {
  display: block;
  font-size: 18px;
}

.character-chip small {
  display: block;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.45;
}

.prediction-grid {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.prediction-card {
  position: relative;
  min-height: 390px;
  padding: clamp(24px, 3vw, 38px);
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--radius-medium);
  animation: card-arrive 540ms both cubic-bezier(.2,.75,.2,1);
}

.prediction-card:nth-child(1) {
  grid-column: span 7;
  background: var(--celestial-teal);
  color: var(--paper-light);
}

.prediction-card:nth-child(2) {
  grid-column: span 5;
  background: var(--saffron-light);
  animation-delay: 80ms;
}

.prediction-card:nth-child(3) {
  grid-column: 3 / span 8;
  background: var(--dusk);
  color: var(--paper-light);
  animation-delay: 160ms;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
}

.card-number {
  margin: 28px 0 18px;
  display: flex;
  align-items: end;
  gap: 17px;
}

.card-number strong {
  font-family: var(--display);
  font-size: clamp(74px, 9vw, 128px);
  font-weight: 400;
  line-height: .8;
}

.card-number h3 {
  margin: 0 0 7px;
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1.2;
}

.card-meaning {
  margin: 0;
  font-size: 17px;
  line-height: 1.8;
}

.prediction-card::after {
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 170px;
  height: 170px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .18;
  content: "";
}

.warning-banner {
  margin-top: 28px;
  padding: 14px 18px;
  border: 1px solid var(--coral);
  border-radius: 14px;
  color: #8a351f;
  background: #f8dfd4;
}

.science-intro {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 120px 0 70px;
}

.science-heading {
  margin-top: 50px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 80px;
  align-items: end;
}

.science-heading p {
  max-width: 530px;
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 18px;
}

.science-chapter {
  position: relative;
  min-height: 660px;
  padding: clamp(48px, 8vw, 120px) max(24px, calc((100vw - 1180px) / 2));
  display: grid;
  grid-template-columns: 100px minmax(300px, 0.75fr) minmax(340px, 1.25fr);
  gap: clamp(30px, 6vw, 90px);
  align-items: center;
  overflow: hidden;
  border-top: 1px solid var(--ink);
}

.chapter-teal {
  background: var(--celestial-teal);
  color: var(--paper-light);
}

.chapter-paper {
  background: var(--paper);
}

.chapter-dusk {
  background: var(--dusk);
  color: var(--paper-light);
}

.chapter-number {
  align-self: start;
  font-family: var(--display);
  font-size: 42px;
  line-height: 1;
}

.chapter-number span {
  display: block;
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: .15em;
}

.chapter-kicker {
  margin: 0 0 15px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .11em;
}

.chapter-copy h3 {
  margin: 0 0 30px;
  font-size: clamp(54px, 7vw, 96px);
  line-height: 1;
}

.chapter-copy > p:not(.chapter-kicker) {
  max-width: 560px;
  margin: 0;
  font-size: 17px;
}

.chapter-note {
  margin-top: 40px;
  display: inline-block;
  padding-top: 10px;
  border-top: 1px solid currentColor;
  font-size: 9px;
  letter-spacing: .2em;
}

.chapter-art {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
}

.art-numerology {
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 50%;
}

.art-numerology::before,
.art-numerology::after {
  position: absolute;
  width: 105%;
  height: 38%;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 50%;
  content: "";
}

.art-numerology::before { transform: rotate(28deg); }
.art-numerology::after { transform: rotate(-28deg); }

.big-glyph {
  z-index: 1;
  font-family: var(--display);
  font-size: clamp(100px, 16vw, 220px);
  line-height: 1;
}

.art-numerology > span {
  position: absolute;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--saffron);
  color: var(--ink);
  font-size: 10px;
}

.art-numerology > span:nth-of-type(1) { top: 8%; left: 18%; }
.art-numerology > span:nth-of-type(2) { right: 3%; bottom: 31%; }
.art-numerology > span:nth-of-type(3) { bottom: 4%; left: 31%; }

.sense-ring {
  position: relative;
  width: min(430px, 90%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.sense-ring::before,
.sense-ring::after {
  position: absolute;
  inset: 15%;
  border: 1px dashed var(--line);
  border-radius: 50%;
  content: "";
}

.sense-ring::after { inset: 31%; }

.sense-ring b {
  font-family: var(--display);
  font-size: 110px;
  font-weight: 400;
}

.sense-ring i {
  position: absolute;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper-light);
  font-style: normal;
  font-size: 11px;
}

.sense-ring i:nth-child(1) { top: -20px; }
.sense-ring i:nth-child(2) { top: 20%; right: 0; }
.sense-ring i:nth-child(3) { right: 8%; bottom: 8%; }
.sense-ring i:nth-child(4) { bottom: -20px; }
.sense-ring i:nth-child(5) { bottom: 8%; left: 8%; }
.sense-ring i:nth-child(6) { top: 20%; left: 0; }

.eclipse {
  position: relative;
  width: min(380px, 80%);
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.36);
  border-radius: 50%;
  background: var(--saffron);
  box-shadow: 0 0 70px rgba(223, 169, 39, .18);
}

.eclipse span {
  position: absolute;
  inset: -3% -3% 3% 3%;
  border-radius: 50%;
  background: var(--dusk);
}

.art-shadow p {
  position: absolute;
  right: 2%;
  bottom: 2%;
  margin: 0;
  font-size: 9px;
  letter-spacing: .19em;
  line-height: 1.55;
}

.privacy {
  width: min(1180px, calc(100% - 48px));
  margin: 120px auto;
  padding: clamp(34px, 6vw, 80px);
  display: grid;
  grid-template-columns: 150px 1fr .65fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  border: 1px solid var(--ink);
  border-radius: var(--radius-large);
  background: var(--paper-light);
}

.privacy-seal {
  width: 140px;
  height: 140px;
  padding: 18px;
  display: grid;
  place-items: center;
  transform: rotate(-7deg);
  border: 1px solid var(--celestial-teal);
  border-radius: 50%;
  color: var(--celestial-teal);
}

.privacy-seal span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .2em;
}

.privacy-seal b {
  font-size: 28px;
}

.privacy-copy h2 {
  font-size: clamp(42px, 5vw, 72px);
}

.privacy-copy > p:last-child {
  max-width: 620px;
  margin: 28px 0 0;
  color: var(--ink-soft);
}

.privacy-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.privacy-list li {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--ink);
}

.privacy-list span {
  color: var(--celestial-teal);
  font-family: var(--display);
  font-size: 12px;
}

.final-cta {
  min-height: 680px;
  padding: 90px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--celestial-teal);
  color: var(--paper-light);
}

.cta-orbit {
  position: relative;
  width: 88px;
  height: 88px;
  margin-bottom: 35px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.cta-orbit i {
  position: absolute;
  width: 150px;
  height: 48px;
  transform: rotate(-22deg);
  border: 1px solid currentColor;
  border-radius: 50%;
}

.cta-orbit b {
  font-family: var(--display);
  font-size: 32px;
}

.final-cta > p {
  margin: 0 0 20px;
  color: var(--teal-light);
  font-size: 14px;
}

.final-cta h2 em {
  color: var(--saffron);
}

.primary-button-light {
  margin-top: 40px;
  background: var(--paper-light);
  color: var(--ink);
}

.site-footer {
  min-height: 210px;
  padding: 50px max(24px, calc((100vw - 1180px) / 2));
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 30px;
  border-top: 1px solid rgba(255,255,255,.2);
  background: var(--celestial-teal);
  color: var(--paper-light);
}

.offline-page {
  min-height: 100svh;
  padding: clamp(24px, 6vw, 72px);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 85% 10%, rgba(223, 169, 39, .16), transparent 26%),
    var(--paper);
}

.offline-card {
  width: min(760px, 100%);
  padding: clamp(34px, 8vw, 84px);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-large);
  background: var(--paper-light);
  box-shadow: var(--shadow);
}

.offline-card .brand { margin-bottom: 64px; }
.offline-card h1 { margin-bottom: 26px; }
.offline-card h1 em { color: var(--celestial-teal); }
.offline-card > p:not(.eyebrow) { max-width: 58ch; margin: 0 0 34px; color: var(--ink-soft); }
.offline-card .primary-button { width: fit-content; }

@media (display-mode: standalone) {
  body { min-height: 100svh; }
  .site-header { top: max(10px, env(safe-area-inset-top)); }
  .site-footer { padding-bottom: max(50px, env(safe-area-inset-bottom)); }
}

.site-footer > p {
  margin: 0;
  color: var(--teal-light);
  font-size: 11px;
  line-height: 1.6;
}

.footer-meta {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  font-size: 9px;
  letter-spacing: .14em;
}

.footer-meta a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

@keyframes card-arrive {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.recent-history {
  width: min(1260px, calc(100% - 48px));
  margin: 24px auto 70px;
  padding: clamp(24px, 4vw, 46px);
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--radius-large);
  background: var(--paper-light);
  box-shadow: var(--shadow);
}

.history-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.history-heading .eyebrow { margin-bottom: 8px; }

.history-heading h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.history-clear,
.history-action {
  min-height: 44px;
  border: 1px solid var(--ink);
  cursor: pointer;
  font: inherit;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.history-clear {
  padding: 8px 16px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
}

.history-clear[data-confirm="true"] {
  border-color: var(--coral);
  background: var(--coral);
  color: white;
}

.history-track {
  margin-top: 24px;
  padding: 0 0 10px;
  display: grid;
  grid-auto-columns: minmax(270px, 82%);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
}

.history-card {
  min-width: 0;
  padding: 18px;
  scroll-snap-align: start;
  border: 1px solid var(--ink);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(223, 169, 39, .18), transparent 32%),
    var(--paper);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.history-card:active { transform: scale(.985); }

.history-card-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.history-card-heading strong {
  min-width: 0;
  overflow: hidden;
  font-family: var(--display);
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-card-heading span {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-size: 9px;
}

.history-numbers {
  margin: 18px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.history-numbers--house {
  grid-template-columns: minmax(0, 1fr);
}

.history-numbers p {
  min-width: 0;
  margin: 0;
  padding: 9px 6px;
  text-align: center;
  border-radius: 12px;
  background: rgba(15, 57, 54, .08);
}

.history-numbers span,
.history-numbers strong { display: block; }
.history-numbers span { color: var(--ink-soft); font-size: 8px; }
.history-numbers strong { margin-top: 3px; font-family: var(--display); font-size: 22px; }

.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.history-action {
  padding: 7px 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 10px;
}

.history-action:first-child {
  background: var(--ink);
  color: var(--paper-light);
}

.history-action:hover,
.history-action:focus-visible { transform: translateY(-1px); }
.history-action:active { transform: scale(.97); }

.history-note {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
}

@media (max-width: 1040px) {
  .hero-frame {
    min-height: 860px;
    grid-template-columns: 1fr .65fr;
    gap: 28px;
  }

  .hero-orbit { opacity: .9; transform: scale(.82); }

  .science-chapter {
    grid-template-columns: 70px 1fr;
  }

  .chapter-art {
    grid-column: 2;
    min-height: 360px;
  }

  .privacy {
    grid-template-columns: 120px 1fr;
  }

  .privacy-seal { width: 110px; height: 110px; }
  .privacy-list { grid-column: 2; }

  .teacher-card { aspect-ratio: 4 / 3; }
}

@media (max-width: 760px) {
  .site-header {
    top: 10px;
    width: calc(100% - 20px);
  }

  .site-nav > a:not(.nav-action) { display: none; }
  .brand-navigation .brand-credit { display: none; }
  .nav-action { padding-left: 13px; }
  .hero { padding: 90px 10px 30px; }

  .hero-frame {
    min-height: auto;
    padding: 55px 24px 360px;
    display: block;
    border-radius: 26px;
  }

  .hero-orbit {
    position: absolute;
    right: -55px;
    bottom: 115px;
    width: 350px;
    opacity: .58;
  }

  .proof-strip { padding: 15px 20px; }
  .proof-strip strong { font-size: 26px; }
  .proof-strip p { gap: 8px; }
  .results { width: calc(100% - 20px); padding: 30px 20px; }
  .results-heading { align-items: flex-start; flex-direction: column; }
  .result-summary { grid-template-columns: 1fr; }
  .prediction-card:nth-child(n) { grid-column: 1 / -1; }
  .science-intro { width: calc(100% - 40px); padding-top: 80px; }
  .science-heading { grid-template-columns: 1fr; gap: 28px; }
  .science-chapter { grid-template-columns: 1fr; gap: 26px; }
  .chapter-number, .chapter-copy, .chapter-art { grid-column: 1; }
  .chapter-art { min-height: 340px; }
  .privacy { width: calc(100% - 20px); grid-template-columns: 1fr; }
  .privacy-seal { display: none; }
  .privacy-list { grid-column: 1; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .site-footer > p { grid-column: 1 / -1; grid-row: 2; }
  .recent-history { width: calc(100% - 20px); margin: 20px auto 50px; border-radius: 26px; }
}

@media (max-width: 900px) {
  .brand-navigation .brand-credit { display: none; }
}

@media (max-width: 640px) {
  .site-nav { gap: 5px; }
  .nav-action { font-size: 11px !important; }
  .hero-frame { padding-top: 46px; }
  h1 { font-size: clamp(50px, 15vw, 72px); }
  .hero-intro { margin: 22px 0 18px; }

  .teacher-editorial { margin-bottom: 26px; }
  .teacher-editorial figcaption { margin-bottom: 8px; }
  .teacher-editorial figcaption strong { display: none; }
  .teacher-pair { gap: 7px; }
  .teacher-card {
    min-height: 0;
    height: clamp(94px, 32vw, 124px);
    aspect-ratio: auto;
    border-radius: 14px;
    box-shadow: 0 4px 0 rgba(33, 30, 25, .08);
  }
  .teacher-card p { right: 9px; bottom: 8px; left: 9px; }
  .teacher-card p strong { font-size: 13px; }
  .teacher-card p span { font-size: 8px; }

  .field-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .field-divider { display: none; }
  .house-field-row {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: end;
    gap: 10px;
  }
  .house-slash {
    padding-bottom: 8px;
    display: block;
    font-size: 28px;
  }
  .mode-switch { width: 100%; }
  .mode-switch button { flex: 1; padding-inline: 10px; }
  .field input { height: 50px; }
  .form-actions { align-items: stretch; flex-direction: column; gap: 12px; }
  .primary-button { width: 100%; }
  .proof-strip span { font-size: 9px; }
  .proof-strip strong { font-size: 21px; }
  .proof-strip p + p { padding-left: 6px; }
  .results { margin-top: 20px; }
  .results-heading h2, .science-heading h2, .privacy h2, .final-cta h2 { font-size: 44px; }
  .result-tabs { margin-top: 30px; }
  .prediction-grid { display: block; }
  .prediction-card { min-height: 0; margin-top: 12px; }
  .card-number strong { font-size: 80px; }
  .science-chapter { min-height: 0; padding-top: 64px; padding-bottom: 64px; }
  .chapter-copy h3 { font-size: 54px; }
  .chapter-copy > p:not(.chapter-kicker) { font-size: 15px; }
  .chapter-art { min-height: 300px; }
  .privacy { margin: 70px auto; padding: 34px 24px; }
  .final-cta { min-height: 590px; }
  .site-footer { grid-template-columns: 1fr; align-items: start; }
  .site-footer > p { grid-column: 1; grid-row: auto; }
  .footer-meta { justify-content: flex-start; }
  .recent-history { padding: 24px 18px; }
  .history-heading { align-items: flex-start; }
  .history-heading h2 { font-size: 34px; }
  .history-clear { max-width: 150px; }
  .history-track { margin-right: -18px; padding-right: 18px; }
}

@media (min-width: 768px) {
  .history-track {
    grid-auto-flow: initial;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .teacher-card { transform: none !important; }
  .history-card,
  .history-action { transform: none !important; }
}
