/* StarSignal. Layout: deep-twilight header bands carry each page's title and the live sky; content sits below on a pale dusk ground with a reading column and a facts rail. */
:root {
  --bg: #f4f3f9;
  --panel: #ffffff;
  --ink: #1b2142;
  --muted: #5b6084;
  --line: #dcdbe9;
  --gold: #a8681a;
  --gold-soft: #f3e6cf;
  --night: #121833;
  --night-2: #1c2550;
  --night-ink: #f1ecdf;
  --night-muted: #aab0d2;
  --night-line: #2e3768;
  --night-gold: #f0c06d;
  --fire: #c0492a; --earth: #4f7a33; --air: #2f6fa6; --water: #1f7d86;
  --display: "Young Serif", Georgia, "Times New Roman", serif;
  --body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1126; --panel: #151b38; --ink: #ece7da; --muted: #a3a8c8; --line: #283058;
    --gold: #f0c06d; --gold-soft: #2c2a3c;
    --night: #080b1c; --night-2: #121836; --night-line: #252d58;
    --fire: #f08a69; --earth: #a3c47a; --air: #85b6e6; --water: #6fc7cc;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1126; --panel: #151b38; --ink: #ece7da; --muted: #a3a8c8; --line: #283058;
  --gold: #f0c06d; --gold-soft: #2c2a3c;
  --night: #080b1c; --night-2: #121836; --night-line: #252d58;
  --fire: #f08a69; --earth: #a3c47a; --air: #85b6e6; --water: #6fc7cc;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--body); }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--panel); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 16px; }

.inner {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* Header */
header.site { background: var(--night); color: var(--night-ink); border-bottom: 1px solid var(--night-line); }
header.site .inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 1.45rem; color: var(--night-ink); }
.brand b, .foot-brand b { font-weight: 400; color: var(--night-gold); }
.brand-star { fill: var(--night-gold); }
.brand-dot { fill: var(--night-ink); }
header.site nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: .95rem; }
header.site nav a { text-decoration: none; color: var(--night-muted); padding: 4px 0; border-bottom: 2px solid transparent; }
header.site nav a:hover, header.site nav a[aria-current="page"] { color: var(--night-ink); border-bottom-color: var(--night-gold); }

/* Night bands */
.night {
  background-color: var(--night);
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 14%, rgba(255,255,255,.45) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 84% 62%, rgba(255,240,200,.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 78%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 40%, rgba(255,255,255,.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 30%, rgba(255,255,255,.4) 50%, transparent 51%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  color: var(--night-ink);
}
.night a { color: var(--night-ink); text-decoration-color: var(--night-gold); }
.night a:hover { color: var(--night-gold); }
.eyebrow { font-family: var(--mono); font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.night .eyebrow { color: var(--night-muted); }
.lede { font-size: 1.15rem; }

.hero { padding-block: 56px 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 5.4vw, 3.6rem); line-height: 1.08; margin: 0 0 16px; max-width: 16ch; }
.hero .lede { color: var(--night-muted); max-width: 52ch; margin: 0 0 28px; }

.finder label { display: block; font-weight: 600; margin-bottom: 8px; }
.finder-row { display: flex; flex-wrap: wrap; gap: 8px; }
.finder select, .finder button { font: inherit; font-size: 1rem; border-radius: 10px; padding: 10px 14px; }
.finder select { background: var(--night-2); color: var(--night-ink); border: 1px solid var(--night-line); }
.finder button, .button { background: var(--night-gold); color: #1b1608; border: 0; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; border-radius: 10px; padding: 10px 16px; }
.finder button:hover, .button:hover { filter: brightness(1.06); color: #1b1608; }
.finder-out { min-height: 1.6em; margin: 10px 0 0; color: var(--night-gold); }

.tonight { background: rgba(255,255,255,.04); border: 1px solid var(--night-line); border-radius: 20px; padding: 28px; display: grid; justify-items: center; text-align: center; gap: 4px; }
.tonight-title { font-family: var(--display); font-size: 1.5rem; margin: 10px 0 0; }
.tonight-sub { color: var(--night-muted); margin: 0 0 12px; }
.tonight-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 4px; font-size: .95rem; }
.tonight-list .pg { color: var(--night-gold); margin-right: 8px; }
.tonight-link { font-size: .9rem; }
.rx { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; border: 1px solid currentColor; color: var(--fire); border-radius: 5px; padding: 0 5px; vertical-align: 1px; }
.night .rx { color: #f39a7b; }

.moon .moon-dark { fill: #2a3160; }
.moon .moon-lit { fill: #f4ead0; }
.moon { filter: drop-shadow(0 0 18px rgba(244,234,208,.25)); }

/* Bands */
.band { padding-block: 56px; }
.band.alt { background: var(--panel); border-block: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 24px; margin-bottom: 24px; }
.section-head h2, .small-head { font-family: var(--display); font-weight: 400; font-size: 1.8rem; margin: 0; }
.small-head { font-size: 1.3rem; margin-bottom: 16px; }
.section-head p { margin: 0; color: var(--muted); }

.sign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.sign-card { --el: var(--gold); display: flex; flex-direction: column; gap: 2px; padding: 18px 18px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .15s, transform .15s; }
.sign-card:hover { border-color: var(--el); transform: translateY(-2px); color: inherit; }
.sc-glyph { font-size: 1.9rem; line-height: 1.1; color: var(--el, var(--gold)); }
.sc-name { font-family: var(--display); font-size: 1.25rem; }
.sc-dates { font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.sc-mood { font-size: .85rem; margin-top: auto; padding-top: 8px; margin-block-start: auto; padding-top: 8px; border-top: 1px dashed var(--line); font-weight: 600; }
.el-fire { --el: var(--fire); } .el-earth { --el: var(--earth); } .el-air { --el: var(--air); } .el-water { --el: var(--water); }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.steps li { counter-increment: s; display: grid; gap: 6px; }
.steps li::before { content: counter(s); font-family: var(--display); font-size: 2rem; color: var(--gold); line-height: 1; }
.steps b { font-size: 1.05rem; display: block; }

.event-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.event-list li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.event-list time { font-family: var(--mono); font-size: .95rem; font-variant-numeric: tabular-nums; display: grid; }
.event-list time small { color: var(--muted); font-size: .75rem; }
.more { font-weight: 600; }

/* Page heads */
.page-head { padding-block: 40px 0; }
.page-head .inner > :last-child { padding-bottom: 32px; }
.page-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0; }
.ph-row { display: flex; gap: 20px; align-items: center; }
.ph-glyph { font-size: 3.2rem; line-height: 1; color: var(--el); width: 76px; height: 76px; flex: none; display: grid; place-items: center; border: 1px solid var(--night-line); border-radius: 50%; background: rgba(255,255,255,.04); }
.night .el-fire { --el: #f39a7b; } .night .el-earth { --el: #b3d08a; } .night .el-air { --el: #94c2ee; } .night .el-water { --el: #7fd2d6; }
.ph-glyph.big { width: 96px; height: 96px; font-size: 3.8rem; }
.ph-tag { color: var(--night-muted); font-size: 1.12rem; max-width: 60ch; margin: 10px 0 0; }
.chips { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--night-line); border-radius: 999px; padding: 2px 12px; font-size: .85rem; color: var(--night-muted); }
.chip[class*="el-"] { color: var(--el); border-color: var(--el); }

.tabs { display: flex; gap: 4px; overflow-x: auto; margin-top: 28px; scrollbar-width: none; }
.page-head .inner > .tabs:last-child { padding-bottom: 0; }
.tabs a { text-decoration: none; white-space: nowrap; padding: 10px 16px; border-radius: 10px 10px 0 0; color: var(--night-muted); font-weight: 600; font-size: .95rem; }
.tabs a[aria-current="page"] { background: var(--bg); color: var(--ink); }
.tabs a:hover:not([aria-current]) { color: var(--night-ink); }

/* Reading */
.reading-wrap, .profile { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; padding-block: 40px 56px; align-items: start; }
.reading { max-width: 66ch; min-width: 0; }
.reading-title { font-family: var(--display); font-weight: 400; font-size: 2.2rem; margin: 0 0 8px; }
.opener { font-size: 1.15rem; color: var(--muted); margin: 0 0 24px; }
.part { padding-block: 18px; border-top: 1px solid var(--line); }
.part h3 { font-family: var(--mono); font-weight: 500; font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--gold); margin: 0 0 6px; }
.part p { margin: 0 0 8px; }
.part-overall p { font-size: 1.15rem; }
.why-line { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.closer { font-family: var(--display); font-size: 1.3rem; border-top: 1px solid var(--line); padding-top: 24px; margin: 8px 0 12px; }
.next-link a { font-weight: 700; }
.key-dates { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.key-dates li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
.key-dates time { font-family: var(--mono); font-size: .9rem; color: var(--gold); font-variant-numeric: tabular-nums; padding-top: 2px; }
.key-dates p { margin: 2px 0 0; }

.reading-side, .profile-side { display: grid; gap: 16px; min-width: 0; }
.side-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 10px; }
.side-card h3 { font-family: var(--mono); font-weight: 500; font-size: .75rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 6px 0 0; }
.side-card h3:first-child { margin-top: 0; }
.side-card p { margin: 0; font-size: .95rem; }
.side-card a { font-size: .92rem; font-weight: 600; }
.side-card.why .moon { justify-self: start; }
.side-note { color: var(--muted); font-size: .85rem !important; }
.meters, .facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 0; align-items: center; }
.meters dt, .facts dt { color: var(--muted); font-size: .9rem; }
.meters dd, .facts dd { margin: 0; }
.facts dd { font-family: var(--mono); font-size: .86rem; }
.meter { display: inline-flex; gap: 4px; }
.meter i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--gold); }
.meter i.on { background: var(--gold); }
.day-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.day-chips li { background: var(--gold-soft); border-radius: 8px; padding: 4px 10px; font-size: .85rem; display: grid; }
.day-chips li b { font-family: var(--mono); font-size: .8rem; font-weight: 500; }
.day-chips.quiet li { background: transparent; border: 1px dashed var(--line); }

.sign-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.sign-strip a { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px 4px 10px; font-size: .92rem; background: var(--bg); }
.sign-strip a[aria-current="page"] { border-color: var(--gold); background: var(--gold-soft); }

/* Sign profile */
.today-strip { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; margin-top: 28px; padding: 18px 22px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; text-decoration: none; }
.ts-label { grid-column: 1; font-size: .9rem; color: var(--muted); }
.ts-label b { color: var(--ink); }
.ts-text { grid-column: 1; }
.ts-go { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 700; color: var(--gold); white-space: nowrap; }
.profile-main { display: grid; gap: 28px; min-width: 0; max-width: 68ch; }
.profile-main section { display: grid; gap: 10px; }
.profile-main h2 { font-family: var(--display); font-weight: 400; font-size: 1.5rem; margin: 0; }
.profile-main p { margin: 0; }
.profile-main ul { margin: 0; padding-left: 1.2em; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.tags { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { background: var(--gold-soft); border-radius: 6px; padding: 2px 10px; font-size: .88rem; }
.note { font-family: var(--display); font-size: 1.3rem; line-height: 1.5; border-top: 1px solid var(--line); padding-top: 24px; }
.pill-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pill-links a { display: inline-block; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; font-weight: 400; }
.notable { margin: 0; padding-left: 1.1em; font-size: .9rem; display: grid; gap: 4px; }

/* Signs and horoscopes index */
.element-group { margin-bottom: 40px; }
.element-group h2 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; color: var(--el); margin: 0 0 16px; }
.element-group h2 span { font-family: var(--body); font-size: 1rem; color: var(--muted); margin-left: 8px; }
.profile-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.profile-card { display: grid; gap: 10px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.profile-card:hover { border-color: var(--el); color: inherit; }
.pc-top { display: flex; gap: 12px; align-items: center; }
.pc-top b { font-family: var(--display); font-weight: 400; font-size: 1.3rem; display: block; }
.pc-top small { color: var(--muted); }
.pc-tag { color: var(--muted); font-size: .95rem; }
.mood-list { display: grid; gap: 10px; }
.mood-row { display: grid; grid-template-columns: 44px 150px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.mood-row:hover { border-color: var(--el); color: inherit; }
.mr-name b { font-family: var(--display); font-weight: 400; font-size: 1.2rem; display: block; }
.mr-name small { color: var(--muted); font-size: .8rem; }
.mr-text { font-size: .95rem; }
.mr-meters { display: grid; gap: 2px; }
.mr-meters span { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.mr-meters small { color: var(--muted); font-size: .75rem; }
.mr-meters .meter i { width: 9px; height: 9px; }

/* Sky */
.sky-head { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: center; }
.sky-moon { display: flex; gap: 18px; align-items: center; }
.sky-moon p { margin: 0; color: var(--night-muted); }
.sky-moon b { color: var(--night-ink); font-family: var(--display); font-weight: 400; font-size: 1.3rem; }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
table.planets { width: 100%; border-collapse: collapse; min-width: 560px; }
table.planets caption { text-align: left; padding: 16px 20px 4px; font-family: var(--mono); font-size: .75rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
table.planets th, table.planets td { padding: 12px 20px; border-bottom: 1px solid var(--line); text-align: left; }
table.planets thead th { font-size: .8rem; color: var(--muted); font-weight: 600; }
table.planets tbody tr:last-child > * { border-bottom: 0; }
table.planets td a { text-decoration: none; }
table.planets .num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
table.planets .pg { color: var(--gold); display: inline-block; width: 1.6em; }
.table-note { color: var(--muted); max-width: 70ch; }
.sky-events { margin-top: 48px; }
.sky-events h2 { font-family: var(--display); font-weight: 400; font-size: 1.8rem; margin: 0 0 4px; }
.sky-events > p { color: var(--muted); margin: 0 0 18px; }
.event-list .pg, .event-list span { min-width: 0; }

/* Learn */
.learn { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-block: 40px 64px; align-items: start; }
.toc { position: sticky; top: 20px; display: grid; gap: 8px; font-size: .92rem; }
.toc a { text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--gold); }
.learn-body { display: grid; gap: 40px; max-width: 70ch; min-width: 0; }
.learn-body.solo { grid-column: 1 / -1; margin: 0 auto; }
.learn-body h2 { font-family: var(--display); font-weight: 400; font-size: 1.7rem; margin: 0 0 12px; }
.learn-body h3 { font-size: 1.05rem; margin: 0 0 8px; }
.learn-body section { scroll-margin-top: 20px; }
.learn-body ul { padding-left: 1.2em; display: grid; gap: 6px; }
.learn-body li[class*="el-"] b { color: var(--el); }
.house-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.house { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.house .hn { font-family: var(--display); font-size: 1.5rem; color: var(--gold); line-height: 1.2; }
.house p { margin: 4px 0 0; font-size: .92rem; color: var(--muted); }
.fine-print { font-size: .92rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 14px; }

/* Footer */
footer.site { background: var(--night); color: var(--night-muted); padding-block: 36px; margin-top: 0; }
footer.site .inner { display: grid; gap: 14px; }
.foot-brand { font-family: var(--display); font-size: 1.3rem; color: var(--night-ink); display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.foot-brand span:not(.fb-name) { font-family: var(--body); font-size: .9rem; color: var(--night-muted); }
footer.site nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .92rem; }
footer.site nav a { color: var(--night-ink); text-decoration: none; }
footer.site nav a:hover { color: var(--night-gold); }
.fine { font-size: .82rem; margin: 0; max-width: 80ch; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .reading-wrap, .profile, .learn { grid-template-columns: minmax(0, 1fr); }
  .tonight { justify-self: stretch; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 6px 16px; }
  .profile-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mood-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .mood-row .mr-text { grid-column: 1 / -1; }
  .mood-row .mr-meters { grid-row: 1; grid-column: 3; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-block: 36px 44px; }
  .steps, .two-col, .house-grid, .profile-cards { grid-template-columns: minmax(0, 1fr); }
  .event-list li { grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }
  .today-strip { grid-template-columns: minmax(0, 1fr); }
  .ts-go { grid-column: 1; grid-row: auto; }
  .ph-glyph, .ph-glyph.big { width: 60px; height: 60px; font-size: 2.4rem; }
  .sign-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mood-row .mr-meters { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
