/* Minimal, natural: warm paper, ink, sage and clay */
:root {
  --bg: #f5f1e8;
  --bg-2: #ece6d8;
  --card: #faf8f2;
  --line: #ddd5c4;
  --text: #2e2a24;
  --muted: #6f675a;
  --accent: #5f7552;
  --clay: #a8694a;
  --serif: "EB Garamond", Georgia, serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 "Inter", system-ui, sans-serif;
  font-weight: 350;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
b, strong, dt { font-weight: 500; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--clay); }
.wrap { max-width: 820px; margin: 0 auto; padding: 1rem 1.5rem 5rem; }

nav {
  display: flex; flex-wrap: wrap; gap: 1.75rem; align-items: baseline;
  max-width: 820px; margin: 0 auto; padding: 2rem 1.5rem 1rem;
}
nav .brand { font-family: var(--serif); font-size: 1.35rem; color: var(--text); text-decoration: none; margin-right: auto; }
nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
nav a:hover, nav a[aria-current] { color: var(--text); }
nav a[aria-current] { border-bottom: 1px solid var(--text); }
@media (max-width: 560px) { nav { gap: .5rem 1.1rem; } nav .brand { flex-basis: 100%; } }

/* Home */
.hero { padding: 6rem 0 4rem; }
.hero h1 { font-size: clamp(3rem, 8vw, 4.6rem); }
.hero p { color: var(--muted); max-width: 30rem; margin: 0; font-size: 1.1rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); border-top: 1px solid var(--line); }
.tile {
  display: block; padding: 2rem 0; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--line);
}
.tiles .tile:first-child { padding-right: 2rem; }
.tile .icon { display: none; }
.tile h2 { font-size: 1.9rem; margin: 0 0 .3rem; }
.tile h2::after { content: " →"; color: var(--accent); transition: margin .2s; }
.tile:hover h2::after { margin-left: .3rem; }
.tile p { color: var(--muted); margin: 0; }

.hero-img { margin: 2rem 0 3rem; }
.hero-img img { display: block; margin: 0 auto; width: auto; height: auto; max-width: 100%; max-height: 70vh; border-radius: 3px; }

/* Astrology */
.page-head { padding: 3rem 0 1rem; }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 4rem); }
.page-head p { color: var(--muted); max-width: 38rem; }
.jump { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.jump a { text-decoration: none; color: var(--muted); font-size: .95rem; }
.jump a:hover { color: var(--accent); }

section.block { padding-top: 5rem; }
section.block > h2 { font-size: 2.4rem; }
section.block > .lede { color: var(--muted); max-width: 38rem; margin-top: 0; }
h3.sub { font-size: 1.6rem; margin-top: 3rem; }

/* Learning path */
.steps { list-style: none; padding: 0; margin: 2.5rem 0 0; counter-reset: step; }
.steps > li { display: grid; grid-template-columns: 3.5rem 1fr; padding: 2rem 0; border-top: 1px solid var(--line); counter-increment: step; }
.steps > li::before {
  content: counter(step, decimal-leading-zero); grid-row: span 3;
  font-family: var(--serif); font-size: 1.5rem; color: var(--accent); line-height: 1.2;
}
.steps h3 { font-size: 1.6rem; margin-bottom: .3rem; }
.steps p { margin: 0 0 1rem; color: var(--muted); }
.res { list-style: none; padding: 0; margin: 0; }
.res li { padding: .35rem 0; font-size: .95rem; }
.res .kind {
  display: inline-block; min-width: 6.5rem; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--clay);
}
@media (max-width: 560px) {
  .steps > li { grid-template-columns: 1fr; }
  .steps > li::before { grid-row: auto; margin-bottom: .25rem; }
  .res .kind { display: block; min-width: 0; }
}

/* History timeline */
.timeline { list-style: none; padding: 0; margin: 2.5rem 0 0; }
.timeline li { display: grid; grid-template-columns: 10rem 1fr; gap: 1.5rem; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.timeline .when { font-family: var(--serif); font-size: 1.15rem; color: var(--clay); line-height: 1.4; }
.timeline h3 { font-family: inherit; font-size: 1rem; font-weight: 500; margin: 0 0 .2rem; }
.timeline p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 560px) { .timeline li { grid-template-columns: 1fr; gap: .2rem; } }

/* Books */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 2.5rem; margin-top: 1rem; }
.book { display: flex; flex-direction: column; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.book h4 { font-size: 1.45rem; margin: 0; }
.book .by { color: var(--clay); font-size: .85rem; margin: .2rem 0 .6rem; }
.book p { color: var(--muted); font-size: .92rem; margin: 0 0 1rem; flex: 1; }
.book .links, .links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.btn { font-size: .9rem; color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.btn::after { content: " ↗"; }
.btn.library-link::after { content: " →"; }
.btn:hover { color: var(--clay); }

.callout {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; justify-content: space-between;
  margin-top: 2rem; padding: 1.75rem 2rem; background: var(--bg-2); border-radius: 4px;
}
.callout h3 { font-size: 1.5rem; margin: 0; }
.callout p { margin: .2rem 0 0; color: var(--muted); }

.reading { list-style: none; columns: 2 260px; column-gap: 2.5rem; padding: 0; margin-top: 1.25rem; }
.reading li { break-inside: avoid; padding: .6rem 0; border-top: 1px solid var(--line); }
.reading span { display: block; color: var(--muted); font-size: .9rem; }

.motto {
  margin: 2rem 0 0; max-width: 34rem;
  font-family: var(--serif); font-style: italic; font-size: 1.4rem; line-height: 1.45; color: var(--text);
}
.motto i { font-style: normal; color: var(--accent); }

/* Study notes */
.kw { margin: 2rem 0 0; }
.kw > div { display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.kw .g { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; color: var(--accent); }
.kw dt small { color: var(--muted); font-weight: 350; margin-left: .4rem; font-size: .85rem; }
.kw dd { margin: 0; color: var(--muted); font-size: .95rem; }

.table-wrap { overflow-x: auto; margin-top: 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .8rem 1rem .8rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--text); }
td.age { white-space: nowrap; font-family: var(--serif); font-size: 1.1rem; color: var(--clay); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-top: 2rem; }
.stats b { display: block; font-family: var(--serif); font-weight: 500; font-size: 2rem; color: var(--accent); }
.stats span { color: var(--muted); font-size: .9rem; }

/* Image gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.gallery figure { margin: 0; }
.gallery a { display: block; }
.gallery img { display: block; width: 100%; height: auto; border-radius: 3px; background: var(--bg-2); }
.gallery figcaption { font-size: .85rem; color: var(--muted); margin-top: .4rem; }

/* Pan */
.facts { margin: 2rem 0 0; }
.facts > div { display: grid; grid-template-columns: 8rem 1fr; gap: 1.5rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.facts dt { font-family: var(--serif); font-size: 1.15rem; color: var(--clay); }
.facts dd { margin: 0; color: var(--muted); font-size: .95rem; }
.notes { list-style: none; padding: 0; margin: 2rem 0 0; }
.notes li { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.notes h3 { font-size: 1.4rem; margin-bottom: .3rem; }
.notes p { margin: 0; color: var(--muted); }
a.src { white-space: nowrap; font-size: .82rem; color: var(--clay); }
a.src::before { content: "→ "; }
.reading a { font-family: var(--serif); font-size: 1.1rem; }
.hero-img a { display: block; }
@media (max-width: 560px) { .facts > div { grid-template-columns: 1fr; gap: .2rem; } a.src { white-space: normal; } }

footer { max-width: 820px; margin: 0 auto; padding: 2rem 1.5rem 3rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }

/* Pan-head logo in the nav */
nav .brand { align-self: center; line-height: 0; }
nav .brand img { display: block; width: 48px; height: 52px; transition: transform .2s; }
nav .brand:hover img { transform: rotate(-6deg); }

/* Natal chart */
.chart-img img { max-width: min(100%, 460px); }
.chart-hero { margin: 2rem auto 0; max-width: 520px; }
.chart-hero img { display: block; width: 100%; height: auto; }
.place { margin: 2rem 0 0; border-top: 1px solid var(--line); padding-top: 1.4rem; }
.place > h3 { font-size: 1.6rem; margin-bottom: .1rem; }
.place .pos { font-size: .9rem; color: var(--clay); margin: 0 0 1rem; letter-spacing: .02em; }
.place .core { margin: 0 0 1rem; }
.views { margin: 0; }
.views > div { display: grid; grid-template-columns: 9rem 1fr; gap: 1.25rem; padding: .7rem 0; border-top: 1px dashed var(--line); }
.views dt { font-family: var(--serif); font-size: 1.05rem; color: var(--accent); line-height: 1.4; }
.views dd { margin: 0; color: var(--muted); font-size: .95rem; }
.ptable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ptable th, .ptable td { text-align: left; padding: .45rem .6rem .45rem 0; border-top: 1px solid var(--line); vertical-align: top; }
.ptable th { font-weight: 500; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.callout { background: var(--card); border-left: 3px solid var(--clay); padding: 1rem 1.25rem; margin: 1.5rem 0; color: var(--muted); font-size: .95rem; }
.callout b { color: var(--text); }
@media (max-width: 560px) { .views > div { grid-template-columns: 1fr; gap: .1rem; } }

/* Hellenistic chart page */
.hwheel { display: block; width: 100%; height: auto; }
.hwheel text { text-anchor: middle; dominant-baseline: central; }
.hw-sign { font-size: 22px; fill: var(--muted); font-family: "Segoe UI Symbol", "Noto Sans Symbols", "DejaVu Sans", sans-serif; }
.hw-house { font: 400 13px "Inter", sans-serif; fill: var(--muted); }
.hw-planet { font-size: 24px; fill: var(--text); font-family: "Segoe UI Symbol", "Noto Sans Symbols", "DejaVu Sans", sans-serif; }
.hw-night { fill: var(--accent); }
.hw-deg { font: 400 11px "Inter", sans-serif; fill: var(--muted); }
.hw-lot { font: italic 500 15px var(--serif); fill: var(--clay); }
.hw-axis { font: 500 12px "Inter", sans-serif; fill: var(--clay); letter-spacing: .06em; }
.hw-cap { text-align: center; font-size: .85rem; color: var(--muted); margin-top: .5rem; }
.tag { display: inline-block; vertical-align: middle; margin-left: .4rem; padding: .05rem .5rem; border: 1px solid currentColor; border-radius: 2px; font: 400 .68rem/1.6 "Inter", sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.tag.good { color: var(--accent); }
.tag.mixed { color: var(--clay); }
.tag.hard { color: var(--muted); }
.matrix th, .matrix td { text-align: center; }
.matrix tbody th { font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--text); border-bottom-color: var(--line); white-space: nowrap; }
.matrix td.av { color: #b9ae99; font-style: italic; }
