/* netNumerology /fable/ — one stylesheet, no framework, no web fonts. */

:root {
  color-scheme: light dark;
  --night: #171a36;
  --night-2: #232750;
  --gold: #e3bd6a;
  --paper: #fbf8f1;
  --surface: #ffffff;
  --sunk: #f3eee2;
  --ink: #1e1c2a;
  --ink-2: #4c4960;
  --muted: #6b6880;
  --line: #e2dbc9;
  --accent: #6a3fa0;
  --accent-ink: #ffffff;
  --link: #4b2c86;
  --error: #b3261e;
  --warn-bg: #fff4d6;
  --radius: 10px;
  --wrap: 68rem;
  --measure: 40rem;
  --target-size: 24px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (pointer: coarse) {
  :root {
    --target-size: 44px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12142a;
    --surface: #1b1e3c;
    --sunk: #171a34;
    --ink: #ece9f5;
    --ink-2: #c5c1d8;
    --muted: #9c98b4;
    --line: #2f335c;
    --accent: #b79cf0;
    --accent-ink: #171a36;
    --link: #cbb6ff;
    --error: #ff8a80;
    --warn-bg: #3a3215;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  accent-color: var(--accent);
  font: 1.0625rem/1.65 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding-bottom: 4rem;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.35rem, 3vw, 1.7rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--gold);
  color: var(--night);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

.eyebrow {
  display: block;
  font: 600 0.78rem/1.4 var(--sans);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--ink-2);
  max-width: var(--measure);
}

/* ---- Masthead ---------------------------------------------------- */

.masthead {
  background: var(--night);
  color: #f1eefb;
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
  padding-block: 0.5rem;
}

.brand-mark {
  color: var(--gold);
  flex: none;
}

.brand-name {
  font: 400 1.25rem/1 var(--serif);
  letter-spacing: 0.01em;
  margin: 0;
}

.brand-name b {
  font-weight: 700;
}

.menu > summary {
  display: none;
}

.nav {
  display: flex;
  gap: 0.25rem;
}

.nav a {
  color: #dcd7ee;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.55rem 0.65rem;
  min-block-size: var(--target-size);
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  white-space: nowrap;
}

.nav a:hover {
  background: var(--night-2);
  color: #fff;
}

.nav a[aria-current] {
  color: var(--gold);
  box-shadow: inset 0 -2px 0 var(--gold);
  border-radius: 6px 6px 0 0;
}

@media (min-width: 961px) {
  /* Desktop: the <details> wrapper is inert and the nav is always shown. */
  .menu > .nav {
    display: flex !important;
  }
  .menu:not([open]) > .nav {
    content-visibility: visible;
  }
  .menu::details-content {
    display: contents;
    content-visibility: visible;
  }
}

@media (max-width: 960px) {
  .menu > summary {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    list-style: none;
    cursor: pointer;
    border-radius: 8px;
  }
  .menu > summary::-webkit-details-marker {
    display: none;
  }
  .menu-icon,
  .menu-icon::before,
  .menu-icon::after {
    display: block;
    width: 1.4rem;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
  }
  .menu-icon {
    position: relative;
  }
  .menu-icon::before,
  .menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .menu-icon::before {
    top: -7px;
  }
  .menu-icon::after {
    top: 7px;
  }
  .menu[open] > summary {
    background: var(--night-2);
  }
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 5;
    flex-direction: column;
    gap: 0;
    background: var(--night);
    padding: 0.5rem 1.25rem 1rem;
    border-top: 1px solid var(--night-2);
    box-shadow: 0 12px 24px rgb(0 0 0 / 0.25);
  }
  .nav a {
    padding: 0.85rem 0.25rem;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--night-2);
    border-radius: 0;
  }
  .nav a[aria-current] {
    box-shadow: none;
  }
}

/* ---- Breadcrumbs ------------------------------------------------- */

.crumbs {
  padding-top: 1.1rem;
  font-size: 0.875rem;
}

.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.5rem;
  color: var(--muted);
}

.crumbs li + li::before {
  content: "›";
  margin-right: 0.5rem;
  color: var(--line);
}

.crumbs a {
  color: var(--muted);
}

/* ---- Hero and page heads ----------------------------------------- */

.hero {
  background: radial-gradient(ellipse at 80% -10%, #3a2f73 0%, transparent 55%), var(--night);
  color: #f1eefb;
}

.hero-inner {
  padding-block: clamp(2.5rem, 8vw, 5rem);
}

.hero h1 {
  max-width: 18ch;
  color: #fff;
}

.hero .eyebrow {
  color: var(--gold);
}

.hero .lede {
  color: #cfc9e6;
}

.page-head {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  padding-bottom: 0.5rem;
}

.reading > .page-head {
  padding-inline: 0;
}

.section {
  margin-top: clamp(2rem, 5vw, 3.25rem);
}

.section-title {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
  margin-bottom: 1.1rem;
}

.section-title a {
  color: inherit;
  text-decoration: none;
}

.section-title a:hover {
  text-decoration: underline;
}

.two-col {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

/* ---- Buttons ----------------------------------------------------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: max(2.9rem, var(--target-size));
  padding: 0.55rem 1.2rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.hero .btn.primary {
  background: var(--gold);
  color: var(--night);
}

.btn.primary:hover {
  filter: brightness(1.08);
}

.btn.secondary,
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.hero .btn.ghost {
  border-color: #5b5790;
  color: #fff;
}

.btn.secondary:hover,
.btn.ghost:hover {
  border-color: var(--accent);
}

/* ---- Navigation patterns: zodiac, chips, lists ------------------- */

.zodiac {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
}

.zodiac a {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.7rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.zodiac a:hover {
  border-color: var(--accent);
}

.zodiac .glyph {
  grid-row: span 2;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--accent);
}

.zodiac small {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.78rem;
}

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips a {
  display: inline-flex;
  align-items: center;
  min-height: max(2.5rem, var(--target-size));
  padding: 0.35rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}

.chips a:hover {
  border-color: var(--accent);
  color: var(--link);
}

.hub-group + .hub-group {
  margin-top: 1.75rem;
}

.hub-group h2 {
  font-size: 1.2rem;
  margin-bottom: 0.7rem;
}

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

.guide-list a {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 0.25rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.guide-list a:hover strong {
  text-decoration: underline;
}

.guide-list strong {
  font: 700 1.1rem/1.3 var(--serif);
  color: var(--link);
}

.guide-list span {
  color: var(--ink-2);
  font-size: 0.95rem;
}

.guide-list small {
  color: var(--muted);
  font-size: 0.8rem;
}

.guide-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}

.guide-cards a {
  display: block;
  height: 100%;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}

.guide-cards a:hover {
  border-color: var(--accent);
}

.guide-cards h2 {
  font-size: 1.3rem;
  color: var(--link);
  margin-bottom: 0.4rem;
}

.guide-cards p {
  color: var(--ink-2);
  font-size: 0.98rem;
}

.guide-cards small {
  color: var(--muted);
}

.number-row {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0.4rem;
}

.number-row a {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-height: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 700 1.25rem/1 var(--serif);
  color: var(--link);
  text-decoration: none;
}

.number-row a:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.number-row.large {
  max-width: 40rem;
  gap: 0.6rem;
}

.number-row.large a {
  font-size: clamp(1.3rem, 4vw, 2rem);
}

@media (max-width: 420px) {
  .number-row.large {
    grid-template-columns: repeat(3, 1fr);
  }
}

.note {
  background: var(--sunk);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  max-width: 46rem;
}

.note h2 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.note p:last-child {
  margin-bottom: 0;
}

/* ---- Reading pages ----------------------------------------------- */

.facts {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.facts li {
  font-size: 0.85rem;
  padding: 0.2rem 0.7rem;
  background: var(--sunk);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
}

.facts .glyph {
  color: var(--accent);
}

.reading-body {
  margin-top: 1.5rem;
}

.reading-body.has-index {
  display: grid;
  gap: 1.5rem 3rem;
  align-items: start;
}

@media (min-width: 900px) {
  .reading-body.has-index {
    grid-template-columns: minmax(0, var(--measure)) minmax(13rem, 17rem);
  }
  .reading-body.has-index > .index {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow: auto;
  }
  .reading-body.has-index > .prose {
    grid-column: 1;
    grid-row: 1;
  }
}

.index {
  background: var(--sunk);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
}

.index summary {
  font-weight: 600;
  cursor: pointer;
}

.index ol {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
}

.index li a {
  display: block;
  padding: 0.28rem 0;
  color: var(--ink-2);
  text-decoration: none;
}

.index li a:hover {
  color: var(--link);
  text-decoration: underline;
}

.prose {
  max-width: var(--measure);
  font: 1.125rem/1.75 var(--serif);
  overflow-wrap: anywhere;
}

p,
li {
  text-wrap: pretty;
}

.prose h2 {
  margin-top: 2.2em;
  padding-top: 0.2em;
  font-size: 1.45rem;
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 1.15rem;
}

.prose > :first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose code {
  font-size: 0.9em;
  background: var(--sunk);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.byline {
  margin-top: 2.5em;
  font: italic 1rem var(--serif);
  color: var(--muted);
}

.related,
.reading > .note {
  margin-top: 2.5rem;
}

.related h2 {
  font-size: 1.15rem;
}

.pager {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
}

.pager a {
  display: grid;
  gap: 0.1rem;
  text-decoration: none;
  font: 700 1.05rem/1.3 var(--serif);
}

.pager a:hover {
  text-decoration: underline;
}

.pager small {
  font: 400 0.78rem var(--sans);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.pager [rel="next"] {
  text-align: right;
}

.pager .up {
  text-align: center;
}

@media (max-width: 600px) {
  .pager {
    grid-template-columns: 1fr 1fr;
  }
  .pager .up {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* ---- Calculators (class names shared with the Gemini scripts) ---- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.form-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  align-items: start;
}

.field {
  display: grid;
  align-content: start;
  gap: 0.3rem;
}

.field > label {
  font-weight: 600;
  font-size: 0.95rem;
}

.hint {
  font-size: 0.8rem;
  color: var(--muted);
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  width: 100%;
  min-height: max(2.9rem, var(--target-size));
  padding: 0.5rem 0.7rem;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--muted);
  border-radius: 8px;
}

input:user-invalid,
.user-invalid-fallback {
  border-color: var(--error);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 400;
  min-height: 2.5rem;
}

.checkbox-row input {
  width: 1.15rem;
  height: 1.15rem;
}

.error-msg {
  display: none;
  color: var(--error);
  font-size: 0.85rem;
}

input:user-invalid ~ .error-msg,
.user-invalid-fallback ~ .error-msg {
  display: block;
}

.callout {
  border-left: 4px solid var(--gold);
  background: var(--sunk);
  padding: 0.9rem 1.1rem;
  border-radius: 0 8px 8px 0;
  margin: 1rem 0;
}

.calc-result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.calc-result-head h2 {
  margin: 0;
}

.sign-glyph-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-width: 3.5rem;
  height: 3.5rem;
  padding: 0 0.55rem;
  flex: none;
  border-radius: 12px;
  background: var(--night);
  color: var(--gold);
  font: 700 1.75rem/1 var(--serif);
  font-variant-emoji: text;
}

.phase-box {
  flex: none;
}

.copy-group {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.copy {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.tip {
  font-size: 0.85rem;
  color: var(--muted);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.badge {
  font-size: 0.82rem;
  padding: 0.2rem 0.7rem;
  background: var(--sunk);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.badge.warn {
  background: var(--warn-bg);
}

.stat-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  margin: 1rem 0 1.5rem;
}

.stat-box {
  display: grid;
  align-content: start;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  background: var(--sunk);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  font: 700 1.4rem/1.25 var(--serif);
}

.table-wrapper {
  overflow-x: auto;
  margin: 1rem 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.letter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.letter-chip {
  display: grid;
  justify-items: center;
  min-width: 1.9rem;
  padding: 0.2rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  line-height: 1.15;
}

.letter-chip.vowel {
  border-color: var(--accent);
}

.letter-chip small {
  font-size: 0.7rem;
  color: var(--muted);
}

/* ---- Footer ------------------------------------------------------ */

.colophon {
  background: var(--night);
  color: #cfc9e6;
  padding-block: 2.5rem 1.5rem;
  font-size: 0.95rem;
}

.colophon-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.colophon .brand-name {
  color: #fff;
  margin-bottom: 0.6rem;
}

.colophon .muted {
  color: #a6a0c4;
  max-width: 28rem;
}

.colophon h2 {
  font: 600 0.75rem var(--sans);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.colophon nav a {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target-size);
  padding: 0.35rem 0;
  color: #e6e1f6;
  text-decoration: none;
}

.colophon nav a + a {
  margin-left: 0;
}

.colophon nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.colophon nav a:hover {
  text-decoration: underline;
}

.colophon-meta {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--night-2);
  color: #9892b8;
}

@media print {
  body {
    background: #fff;
    color: #000;
  }
  .masthead,
  .colophon,
  .pager,
  .index,
  .crumbs,
  .copy-group,
  .related,
  .offer,
  .buy-box .btn {
    display: none;
  }
}

/* ---- Sun & Moon filter and compatibility chart -------------------- */

[hidden] {
  display: none !important;
}

.filter-status {
  align-self: end;
  gap: 0.6rem;
}

.filter-status p {
  margin: 0;
}

.compat th[scope="row"] {
  font: 700 1.25rem/1 var(--serif);
  color: var(--ink);
  letter-spacing: 0;
  vertical-align: middle;
}

.compat td {
  min-width: 7rem;
}

.compat td a,
.compat td span {
  display: inline-grid;
  place-items: center;
  min-width: 2.25rem;
  min-height: 2.25rem;
  margin: 0 0.25rem 0.25rem 0;
  border-radius: 8px;
}

.compat td a {
  background: var(--sunk);
  border: 1px solid var(--line);
  font: 700 1.05rem/1 var(--serif);
  text-decoration: none;
}

.compat td a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* Reports */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--night);
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.steps strong,
.steps span {
  display: block;
}
.steps span {
  color: var(--ink-2);
  font-size: 0.95rem;
}
.product-cards {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.product-cards a {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  color: inherit;
  text-decoration: none;
}
.product-cards a:hover {
  border-color: var(--accent);
}
.product-cards h3 {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
  color: var(--link);
}
.product-cards p {
  margin: 0.4rem 0 0;
  color: var(--ink-2);
}
.product-cards .by {
  margin-top: 0.1rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.product-cards .badge {
  align-self: flex-start;
}
.product-cards .price {
  margin-top: auto;
  padding-top: 0.8rem;
}
.price {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
}
.price small {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
}
.buy-box {
  background: var(--sunk);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem 1.3rem;
  margin: 0 0 1.5rem;
}
.buy-box p {
  margin: 0 0 0.6rem;
}
.buy-box .hint {
  margin: 0.7rem 0 0;
}
.tier-overview {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 1rem;
}
.tier-overview > li {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
}
.tier-overview .badge {
  align-self: flex-start;
  margin-bottom: 0.4rem;
}
.tier-overview h3 {
  margin: 0;
  font-size: 1.15rem;
}
.tier-delta {
  margin: 0.25rem 0 0.5rem;
  font-weight: 700;
  color: var(--accent);
}
.tier-overview p {
  margin: 0 0 0.7rem;
  color: var(--ink-2);
}
.tier-overview ul {
  margin: auto 0 0;
  padding-left: 1.1rem;
  color: var(--ink-2);
  font-size: 0.92rem;
}
.tier-overview li li {
  margin-bottom: 0.25rem;
}
.tier-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
.tier-fieldset legend,
.tier-heading {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0 0 0.6rem;
  padding: 0;
}
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.tier-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem 0.65rem;
  align-items: start;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  min-height: 48px;
  cursor: pointer;
}
.tier-card:hover {
  border-color: var(--muted);
}
.tier-card:has(> input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.tier-card:has(> input:focus-visible) {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.tier-card > input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.22rem 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.tier-card > input[type="radio"]:focus-visible {
  outline: none;
}
@supports not (accent-color: var(--accent)) {
  .tier-card > input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    border: 2px solid var(--muted);
    border-radius: 50%;
    background: var(--surface);
  }
  .tier-card > input[type="radio"]:checked {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 10px var(--accent);
  }
}
.tier-static {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: default;
}
.tier-static:hover {
  border-color: var(--line);
}
.tier-pay {
  margin-top: auto;
  align-self: flex-start;
}
.tier-static .tier-items {
  margin-bottom: 0.55rem;
}
.tier-body {
  display: grid;
  gap: 0.35rem;
  min-inline-size: 0;
}
.tier-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}
.tier-price {
  margin-inline-start: auto;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}
.tier-summary {
  display: block;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink-2);
}
.tier-items {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.15rem;
  font-size: 0.84rem;
  color: var(--muted);
}
.tier-item::before {
  content: "✓ ";
  color: var(--accent);
  font-weight: 700;
}
.form-intro {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-2);
}

.offer {
  margin: 2rem 0;
}
.offer .btn {
  margin-right: 0.9rem;
}
.offer-more {
  white-space: nowrap;
}

/* Home Sun finder, dynamic order form, and site search */
.sun-finder {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
}

.sun-finder-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.65rem;
}

.sun-finder-controls label {
  font-size: 0.9rem;
  font-weight: 600;
}

.sun-finder-controls select {
  width: auto;
  min-width: 0;
  min-height: max(2.6rem, var(--target-size));
  padding: 0.4rem 0.65rem;
}

.sun-finder-controls .btn {
  min-height: max(2.6rem, var(--target-size));
  padding: 0.4rem 0.9rem;
}

.sun-finder-out {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  color: var(--ink-2);
  font-size: 0.96rem;
}

.sun-finder-out .btn {
  min-height: max(2.4rem, var(--target-size));
  padding: 0.35rem 0.85rem;
  font-size: 0.92rem;
}

.cusp-note {
  font-size: 0.88rem;
}

.zodiac li.is-match a {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent);
}

.form-subgrid {
  grid-column: 1 / -1;
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.form-grid > .cta-row {
  grid-column: 1 / -1;
  align-items: center;
  margin-top: 0.25rem;
}

.form-grid > [role="status"] {
  grid-column: 1 / -1;
  margin: 0;
}

.order-fallback {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.45rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.order-fallback[hidden] {
  display: none;
}

.order-fallback p {
  margin: 0;
}

.order-draft {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font: 0.9rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--muted);
  border-radius: 8px;
  resize: vertical;
}

.reading-simple {
  padding-top: 2rem;
}

.search-results:empty {
  border-top: none;
}

.recent-searches {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.recent-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.recent-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.recent-item {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface, #fff);
  overflow: hidden;
  max-width: 100%;
}

.recent-item.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.recent-select {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.1rem;
  min-block-size: var(--target-size);
  padding: 0.45rem 0.75rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.recent-select:hover {
  background: var(--surface-alt, rgba(0, 0, 0, 0.03));
}

.recent-select strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.recent-select span {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.25;
}

.recent-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: var(--target-size);
  min-block-size: var(--target-size);
  padding: 0 0.55rem;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.recent-remove:hover {
  color: inherit;
  background: var(--surface-alt, rgba(0, 0, 0, 0.05));
}

.compat-persons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
}

.compat-person {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}

.compat-person legend {
  font-weight: 700;
  padding: 0 0.4rem;
}

.compat-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  align-items: start;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.compat-fields .checkbox-row {
  min-height: 2rem;
}

.chart-advanced {
  margin: 1rem 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sunk);
  padding: 0.7rem 0.95rem;
}

.chart-advanced > summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.chart-advanced > summary::-webkit-details-marker {
  display: none;
}

.chart-advanced > summary::after {
  content: "Show ▾";
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
}

.chart-advanced[open] > summary::after {
  content: "Hide ▴";
}

.chart-advanced[open] > .compat-compare-grid {
  margin-top: 0.85rem;
}

.compat-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.compat-facts {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
  display: grid;
  align-content: start;
  gap: 0.3rem;
  font-size: 0.94rem;
}

.compat-aspects {
  margin-top: 1.15rem;
}

.compat-aspects h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.compat-aspects ul {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.4rem;
}

@media (hover: hover) {
  .index li a {
    min-block-size: var(--target-size);
    display: flex;
    align-items: center;
  }
}

@media (pointer: coarse) {
  .index li a,
  .crumbs a {
    display: inline-flex;
    align-items: center;
    min-block-size: var(--target-size);
  }
}
