:root {
  --bg: #f7f4ff;
  --paper: #fff;
  --ink: #242036;
  --muted: #665f78;
  --line: #ded6f0;
  --accent: #6d28d9;
  --accent-dark: #4c1d95;
  --accent-2: #d97706;
  --accent-soft: #eee7ff;
  --shadow: 0 18px 45px rgba(59, 41, 99, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  background:
    radial-gradient(circle at top left, rgba(109, 40, 217, .16), transparent 34rem),
    radial-gradient(circle at top right, rgba(217, 119, 6, .12), transparent 29rem),
    var(--bg);
}

a { color: inherit; }

.site-header {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: var(--accent-dark);
  text-decoration: none;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: .01em;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .8rem 1rem;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.site-header nav a:hover { color: var(--accent); }

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto 3rem;
}

.hero {
  max-width: 860px;
  margin: 0 auto;
  padding: 3.2rem 0 1.5rem;
  text-align: center;
}

.eyebrow,
.related-kicker {
  margin: 0 0 .45rem;
  color: var(--accent-2);
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, h3 { margin-top: 0; }
h1 {
  margin-bottom: 0;
  font-size: clamp(2.15rem, 5vw, 4.35rem);
  line-height: 1.02;
}
h2 { line-height: 1.16; }

.lead {
  max-width: 760px;
  margin: 1rem auto 0;
  color: #4b455b;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.panel {
  margin: 1rem 0;
  padding: clamp(1rem, 3vw, 1.7rem);
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.form-panel form {
  display: grid;
  gap: 1rem;
}

.date-parts-field { min-width: 0; }

.date-main-label,
label span {
  display: block;
  margin: 0 0 .45rem;
  font-weight: 800;
}

.date-parts {
  display: grid;
  grid-template-columns: .85fr 1.3fr .85fr;
  gap: .7rem;
}

.date-parts label {
  position: relative;
  min-width: 0;
}

.date-parts label span {
  color: var(--muted);
  font-size: .88rem;
}

.date-parts select {
  width: 100%;
  min-height: 3.2rem;
  padding: .85rem 2.3rem .85rem .9rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(59, 41, 99, .05);
  font: inherit;
  font-weight: 650;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.date-parts label::after {
  content: "▾";
  position: absolute;
  right: .9rem;
  bottom: 1rem;
  color: var(--accent);
  font-size: .8rem;
  pointer-events: none;
}

.date-parts select:focus {
  border-color: rgba(109, 40, 217, .62);
  box-shadow:
    0 0 0 4px rgba(109, 40, 217, .14),
    0 10px 24px rgba(59, 41, 99, .10);
}

.date-parts select option {
  color: var(--ink);
  background: #fff;
}
.date-parts select option:disabled { color: #9ca3af; }

button {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: .95rem 1.4rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 12px 28px rgba(109, 40, 217, .26);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
button:hover { filter: brightness(.96); }

.error {
  margin: .2rem 0 0;
  padding: .85rem 1rem;
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 16px;
}

.result-hero {
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(109, 40, 217, .18), transparent 54%),
    rgba(255, 255, 255, .92);
}

.life-path-number {
  display: grid;
  justify-items: center;
  gap: .35rem;
  width: min(100%, 390px);
  margin: 1.1rem auto;
  padding: 1.15rem 1rem;
  border: 1px solid rgba(109, 40, 217, .23);
  border-radius: 26px;
  background: rgba(250, 248, 255, .9);
}

.life-path-number.master-number {
  border-color: rgba(217, 119, 6, .48);
  background:
    radial-gradient(circle at 50% 0%, rgba(217, 119, 6, .18), transparent 70%),
    rgba(255, 251, 235, .94);
}

.life-path-value {
  color: var(--accent-dark);
  font-size: clamp(4rem, 11vw, 7rem);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.07em;
}

.master-number .life-path-value { color: #a16207; }

.life-path-name {
  font-size: 1.22rem;
  font-weight: 850;
}

.master-note,
.result-short {
  max-width: 680px;
  margin: .75rem auto;
}

.master-note {
  color: #92400e;
  font-weight: 700;
}

.result-short {
  color: var(--accent-dark);
  font-weight: 800;
}

.calculation {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
  margin-top: .9rem;
  padding: .75rem .95rem;
  border-radius: 14px;
  color: var(--muted);
  background: var(--accent-soft);
  font-variant-numeric: tabular-nums;
}

.calculation strong { color: var(--ink); }

.interpretation-grid,
.secondary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.info-card,
.secondary-card {
  padding: 1.1rem;
  background: rgba(255, 255, 255, .84);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(59, 41, 99, .08);
}

.info-card h2,
.secondary-card h3 {
  margin-bottom: .55rem;
  color: var(--accent-dark);
}

.info-card p,
.secondary-card p { margin-bottom: 0; }

.secondary-numbers {
  background:
    linear-gradient(135deg, rgba(109, 40, 217, .07), transparent 55%),
    rgba(255, 255, 255, .9);
}

.secondary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.secondary-label {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 750;
}

.secondary-value {
  margin: .2rem 0;
  color: var(--accent);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.note { max-width: 920px; }
.note p:last-child { margin-bottom: 0; }

.disclaimer {
  border-color: rgba(217, 119, 6, .34);
  background: rgba(255, 251, 235, .85);
}

.related-sites {
  margin-top: 3rem;
  padding: 3rem 1rem 2.5rem;
  color: #fff;
  background:
    radial-gradient(circle at 16% 0%, rgba(217, 119, 6, .30), transparent 33%),
    radial-gradient(circle at 82% 15%, rgba(147, 51, 234, .34), transparent 37%),
    linear-gradient(135deg, #211044, #120924);
}

.related-inner,
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.related-sites h2 { margin-bottom: 1.5rem; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.related-card {
  display: block;
  min-height: 100%;
  padding: 1.15rem;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 20px;
  background: rgba(255, 255, 255, .07);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.related-card:hover,
.related-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 207, 130, .78);
  background: rgba(255, 255, 255, .13);
}

.related-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  margin-bottom: .8rem;
  border: 1px solid rgba(255, 213, 146, .42);
  border-radius: 999px;
  background: rgba(255, 179, 71, .16);
  font-size: 1.2rem;
}

.related-title,
.related-text { display: block; }

.related-title {
  margin-bottom: .4rem;
  font-weight: 850;
}

.related-text {
  color: rgba(255, 255, 255, .76);
  font-size: .93rem;
  line-height: 1.5;
}

.site-footer {
  padding: 1.6rem 1rem 1.9rem;
  color: rgba(255, 255, 255, .76);
  background: #0e071d;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 2rem;
}

.footer-inner strong,
.footer-inner span { display: block; }

.footer-inner strong {
  color: #fff;
  font-size: 1.08rem;
}

.footer-inner span {
  margin-top: .2rem;
  color: rgba(255, 255, 255, .6);
  font-size: .92rem;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .75rem 1rem;
}

.footer-inner nav a,
.footer-note a {
  color: #f6c976;
  text-decoration: none;
}

.footer-inner nav a:hover,
.footer-note a:hover { text-decoration: underline; }

.footer-note {
  grid-column: 1 / -1;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .9rem;
}

.footer-note p { margin: .35rem 0; }

@media (max-width: 900px) {
  .interpretation-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header { align-items: flex-start; }
  .site-header nav { gap: .45rem .8rem; }

  .date-parts,
  .interpretation-grid,
  .secondary-grid,
  .related-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .date-parts select { min-height: 3.35rem; }
  button { width: 100%; }
  .footer-inner nav { justify-content: flex-start; }
}
