:root {
  color-scheme: dark;
  --paper: #fff3df;
  --soft: #e2cfbd;
  --gold: #f3cf91;
  --rule: #80604d;
  --line: #68434b;
  --serif: Georgia, "Times New Roman", serif;
  font: 16px/1.5 system-ui, sans-serif;
  background: #1e101c;
  color: var(--paper);
}
* { box-sizing: border-box }
body { margin: 0; min-width: 0; background: radial-gradient(ellipse at 80% 0, #492032 0%, transparent 43rem), #20121d }
button, a, summary { -webkit-tap-highlight-color: transparent }
button { font: inherit; color: inherit; cursor: pointer }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #ffdf95; outline-offset: 3px }
[hidden], .embedded .mast { display: none !important }
a { color: var(--gold); text-underline-offset: .18em }
.mast, footer { display: flex; align-items: center; gap: .75rem }
.mast { padding: .8rem max(4vw,calc((100vw - 1040px)/2)); background: #351323; border-bottom: 1px solid var(--rule) }
.mast a:first-child, footer a { font: bold 1.02rem var(--serif); letter-spacing: .1em; text-decoration: none }
.mast span, footer span { color: var(--soft); font-size: .76rem }
.mast .to-today { margin-left: auto; font-size: .81rem; text-decoration: none }
main { margin: 0 auto; width: min(100%,1080px); padding: clamp(.65rem,2.7vw,2.15rem) }
.hero, .panel { border: 1px solid var(--rule); border-radius: 18px }
.hero {
  display: grid; grid-template-columns: 1.04fr 1fr; align-items: center;
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(1.15rem,4.3vw,3.15rem);
  background-color: #431726;
  background-image: linear-gradient(95deg,#351221fa 1%,#481828eb 41%,#50142969 74%,#4510214a), url("art/atlas.webp"), linear-gradient(110deg,#301323,#6e2135);
  background-size: cover; background-position: center;
  box-shadow: inset 0 0 0 3px #e4ba7220, 0 .6rem 2rem #13091255;
}
.hero::after { content: ''; position: absolute; pointer-events: none; z-index: -1; inset: 6px; border: 1px solid #f1c88729; border-radius: 13px }
.source-line, .section-heading, .stepper, .aspect, .values { display: flex; align-items: center }
.source-line { gap: .6rem 1rem; flex-wrap: wrap; font-size: .76rem }
#mode { display:inline-flex; align-items:center; gap:.48rem; color:var(--gold); font-weight:700; letter-spacing:.07em; text-transform:uppercase }
#mode i { width: .46rem; height:.46rem; border:1px solid #ffd891; border-radius:50%; background:#ffd891; box-shadow: 0 0 10px #edb75c66 }
.exploring #mode i { background:transparent; box-shadow:none }
#utc { color:#e3c5b8; font-variant-numeric:tabular-nums }
h1, h2, h3, p { margin:0 }
h1 { font: normal clamp(2.45rem,5.9vw,4.8rem)/.99 var(--serif); letter-spacing:-.045em; margin:.82rem 0 }
.intro { max-width:31rem; color:#f5e1ce; font-size:clamp(.98rem,1.7vw,1.12rem); line-height:1.5 }
.values { margin:1.3rem 0 0; padding-top: .9rem; border-top:1px solid #ebc78e4d; width:fit-content; min-width: min(100%,17rem) }
.values > div { min-width:7.5rem; padding-right:.96rem }
.values > div + div { border-left:1px solid #ebc78e4d; padding-left:.96rem }
.values dt, .note h3, .try h3 { font:700 .71rem/1.4 system-ui,sans-serif; letter-spacing:.1em; text-transform:uppercase; color:var(--gold) }
.values dd { margin: .17rem 0 0; font:normal clamp(1.45rem,2.6vw,2rem)/1.15 var(--serif); font-variant-numeric: tabular-nums }
.observatory { display:grid; justify-items:center; gap:.85rem; min-width:0 }
.instrument { position:relative; width: min(100%, clamp(11.2rem,24vw,16.5rem)); aspect-ratio:1; border:1px solid #cda96a94; border-radius:50%; background:radial-gradient(circle,#180e17 34%,#200e1e 66%,#5a2d3980 68%,#180d1800 71%); box-shadow:inset 0 0 0 4px #361825, inset 0 0 0 5px #cba46555; display:grid; place-items:center }
.instrument img, .instrument canvas { display:block; position:absolute; width:81%; height:81%; border-radius:50%; box-shadow:0 0 0 1px #f0dfbb24, 0 3px 10px #0d040b }
.south .instrument img, .south .instrument canvas, .south .phase-grid img { transform: rotate(180deg) }
.mark { position:absolute; left:50%; transform:translateX(-50%); font:600 .59rem/1 system-ui,sans-serif; color:#e8c78e }
.mark.n { top:2.2% } .mark.s { bottom:2.2% }
.aspect { gap:2px; border:1px solid #b58e6a; border-radius:18px; background:#2b1321; padding:2px }
.aspect button { border:0; min-height:32px; padding:.22rem .7rem; border-radius:15px; font-size:.75rem; font-weight:600; background:transparent; color:#e9d3bd }
.aspect button[aria-pressed=true] { background:#e6c998; color:#321725 }
.stepper { justify-content:space-between; gap:.45rem; margin:.7rem 0 1.25rem }
.stepper button { min-height:42px; padding:.3rem .92rem; border-radius:999px; border:1px solid #956c5c; background:#361d2c; color:#f3d8b8; font-size:.83rem; font-weight:600 }
.stepper button:hover, .phase-grid button:hover { background-color:#663042; border-color:var(--gold) }
#today[aria-pressed=true] { background:#503043; border-color:#bc9769 }
.stepper button span { font-size:1.05rem }
.panel { padding:clamp(1rem,2.5vw,1.8rem); margin-top:1rem; background:linear-gradient(120deg,#38202c,#2a1925); border-color:#775751 }
.section-heading { gap:.75rem; justify-content:space-between; align-items:baseline; margin-bottom:1rem }
h2 { font:normal clamp(1.52rem,3.25vw,2.1rem)/1.1 var(--serif); letter-spacing:-.025em }
.section-heading > span { font-size:.76rem; color:#e7c5a0; text-align:right }
.phase-grid { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:.38rem }
.phase-grid button { display:flex; min-width:0; flex-direction:column; align-items:center; justify-content:flex-start; gap:.45rem; padding:.58rem .18rem; background:#291722; border:1px solid #71515a; border-radius:9px; color:#f7e7d6; font-size:.77rem; line-height:1.15; font-weight:550 }
.phase-grid img { width:min(100%,3.3rem); height:auto; aspect-ratio:1; background:#170e17; border:1px solid #79594e; border-radius:50% }
.phase-grid button[aria-pressed=true] { background:linear-gradient(155deg,#6a3641,#462331); border-color:#f2c880; box-shadow: inset 0 -2px 0 #edc58b }
.reading { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.6rem }
.note p,.try p,.orbit-body p,.sources p { margin:.42rem 0 0; color:var(--soft); font-size:.96rem; line-height:1.63 }
.try { margin-top:1.1rem; border-left:2px solid #c99a66; background:#542c3955; border-radius:0 7px 7px 0; padding:.7rem 1rem }
.try p { margin-top:.24rem }
details.panel { padding:.9rem clamp(1rem,2.5vw,1.8rem) }
summary { color:var(--paper); cursor:pointer; font:normal 1.13rem/1.5 var(--serif) }
summary::marker { color:var(--gold); font-size:.85rem }
.orbit-body { display:grid; grid-template-columns:1fr 1fr; align-items:center; gap:1rem; margin:.7rem 0 }
#orbit-map { width:100%; max-width:360px; margin:auto; background:#201421; border-radius:12px }
#orbit-map .track { fill:none; stroke:#b18b6b; stroke-dasharray:3 4 }
#orbit-map text { font:12px system-ui,sans-serif; fill:#e7cba8 }
#orbit-map .ray { fill:none; stroke:#f2c985; stroke-width:1.6; stroke-linecap:round }
.caption,.source-links { color:var(--soft); font-size:.78rem }
.source-links { display:flex; gap:.7rem 1.3rem; flex-wrap:wrap; margin-top:.75rem }
footer { justify-content:space-between; color:var(--soft); border-top:1px solid #72514d; margin-top:1.5rem; padding:.9rem .15rem }
@media(max-width:820px) { .phase-grid { grid-template-columns:repeat(4,minmax(0,1fr)) } }
@media(max-width:590px) {
 .hero { grid-template-columns:1fr; gap:.85rem; padding:1.25rem 1.05rem 1rem; background-image:linear-gradient(135deg,#391322f2 8%,#431726d4 42%,#45172c77 95%), url("art/atlas.webp"),linear-gradient(125deg,#371320,#642033) }
 .hero-copy { display:grid; grid-template-columns:1fr; text-align:center; justify-items:center }
 .source-line { justify-content:center }
 h1 { margin:.5rem 0; font-size:clamp(2.2rem,8.7vw,3rem) }
 .intro { font-size:.92rem; line-height:1.42; max-width:23rem }
 .values { margin:.75rem 0 0; padding-top:.54rem; min-width:0 }
 .values > div { min-width:6.5rem; padding:0 .75rem }
 .values dd { font-size:1.4rem }
 .instrument { width:clamp(9.8rem,43vw,12.4rem) }
 .observatory { gap:.55rem }
 .aspect button { min-height:33px }
 .reading,.orbit-body { grid-template-columns:1fr; gap:1rem }
 .section-heading { margin-bottom:.75rem }
 .stepper { margin-bottom:.8rem }
 .stepper button { padding:.25rem .65rem }
}
@media(max-width:359px) {
 .phase-grid { gap:.25rem }
 .phase-grid button { font-size:.73rem }
 .section-heading > span { font-size:.7rem }
 .stepper button { font-size:.77rem }
}
