:root{
  --bg:#f4f1ea; --surface:#fffdf8; --text:#16181d; --muted:#3d434f; --line:#c9c3b5; --line-soft:#ddd8cc;
  --accent:#7a3b00; --sky1:#1c2c4c; --sky2:#3c5680; --sky-text:#ffffff; --sky-muted:#e2e8f3; --gold:#ffd88a;
  --serif:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif; --sans:-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color-scheme:light;
}
:root[data-theme="dark"]{
  --bg:#0b0d12; --surface:#12151c; --text:#eef0f4; --muted:#c3c9d4; --line:#323846; --line-soft:#232835;
  --accent:#ffc977; --sky1:#03050a; --sky2:#0d1426; --sky-text:#ffffff; --sky-muted:#d5dbe6; --gold:#ffd88a;
  color-scheme:dark;
}
[hidden]{display:none!important} svg[hidden]{display:none}
*{box-sizing:border-box}
html{scroll-behavior:smooth} @media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body{margin:0;background:var(--bg);color:var(--text);font:18px/1.6 var(--serif);-webkit-font-smoothing:antialiased}
a{color:var(--accent)} :focus-visible{outline:3px solid var(--gold);outline-offset:2px}
.skip{position:absolute;left:-999px;top:0}.skip:focus{left:8px;top:8px;z-index:50;background:var(--surface);color:var(--text);padding:8px 12px}

/* topbar */
.topbar{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:14px;height:46px;padding:0 16px;background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(8px);border-bottom:1px solid var(--line-soft);font:14px/1 var(--sans)}
.topbar .home{display:flex;align-items:center;gap:7px;color:var(--text);text-decoration:none;font-weight:600;white-space:nowrap}
.topbar nav{display:flex;gap:14px;overflow-x:auto;scrollbar-width:none;flex:1}
.topbar nav a{color:var(--muted);text-decoration:none;white-space:nowrap}.topbar nav a:hover{color:var(--text)}
.topbar .lang{color:var(--text);font-weight:600;text-decoration:none}
.icon-btn{display:grid;place-items:center;width:36px;height:36px;border:1px solid var(--line-soft);border-radius:50%;background:transparent;color:var(--text);cursor:pointer}
@media (pointer:coarse){.icon-btn{width:44px;height:44px}}
.progress{position:absolute;left:0;right:0;bottom:-1px;height:2px;pointer-events:none}
.progress i{position:absolute;top:-5px;left:0;width:12px;height:12px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff,#d9d3c4 60%,#8d877a);box-shadow:0 0 6px rgba(255,230,170,.7);transform:translateX(0)}

/* hero */
.hero{position:relative;background:radial-gradient(120% 90% at 50% 30%,var(--sky2),var(--sky1));color:var(--sky-text);overflow:hidden;padding:clamp(28px,5vw,64px) 20px 40px}
.stars{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.hero-grid{position:relative;max-width:1240px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:clamp(20px,4vw,60px);align-items:center}
@media (max-width:860px){.hero-grid{grid-template-columns:1fr}}
.kicker{font:600 13px/1.3 var(--sans);letter-spacing:.12em;text-transform:uppercase;color:var(--gold);margin:0 0 10px}
h1{font-size:clamp(32px,5vw,58px);line-height:1.06;margin:0 0 16px;font-weight:600;letter-spacing:-.01em}
.deck{font-size:clamp(18px,1.6vw,21px);color:var(--sky-muted);margin:0 0 22px;max-width:34em}
.picker{display:flex;flex-wrap:wrap;gap:10px;align-items:end;font-family:var(--sans)}
.picker label{display:flex;flex-direction:column;gap:5px;font-size:13px;color:var(--sky-muted)}
.picker input{font:600 18px var(--sans);padding:10px 12px;border-radius:10px;border:1px solid rgba(255,255,255,.45);background:rgba(0,0,0,.35);color:#fff;color-scheme:dark;min-height:46px}
.btn{font:600 15px var(--sans);min-height:46px;padding:0 16px;border-radius:999px;border:1px solid rgba(255,255,255,.5);background:transparent;color:#fff;cursor:pointer}
.btn.primary{background:var(--gold);color:#1b1404;border-color:var(--gold)}
.moon-wrap{position:relative;display:grid;place-items:center}
#moon{width:min(560px,86vw);aspect-ratio:1;display:block;filter:drop-shadow(0 0 40px rgba(255,236,190,.12))}
.readout{position:relative;margin-top:18px;display:grid;grid-template-columns:repeat(3,auto);justify-content:center;gap:6px 28px;text-align:center;font-family:var(--sans)}
.readout b{display:block;font:600 clamp(22px,2.6vw,30px)/1.1 var(--serif);color:#fff}
.readout span{font-size:13px;color:var(--sky-muted)}
.verdict{position:relative;max-width:40em;margin:16px auto 0;text-align:center;font-size:19px;color:#fff;min-height:3.2em}
.reset{margin-top:10px}

/* month strip */
.strip-sec{background:linear-gradient(var(--sky1),var(--sky1));color:var(--sky-text);padding:8px 20px 44px}
.strip-head{max-width:1240px;margin:0 auto;display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;font-family:var(--sans)}
.strip-head h2{font:600 22px/1.2 var(--serif);margin:0;color:#fff}
.strip{max-width:1240px;margin:16px auto 0;display:grid;grid-template-columns:repeat(15,1fr);gap:6px}
@media (max-width:860px){.strip{grid-template-columns:repeat(6,1fr)}}
.strip button{all:unset;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px 2px;border-radius:10px;font:12px/1.2 var(--sans);color:var(--sky-muted);text-align:center}
.strip button:focus-visible{outline:3px solid var(--gold)}
.strip button[aria-current="date"]{background:rgba(255,216,138,.16);color:#fff;box-shadow:inset 0 0 0 1px var(--gold)}
.strip canvas{width:100%;max-width:56px;aspect-ratio:1}
.strip .mark{color:var(--gold);font-weight:700;min-height:1.2em}

/* article */
main section{max-width:1240px;margin:0 auto;padding:56px 20px 8px}
.prose{max-width:38em}
h2{font-size:clamp(26px,3vw,36px);line-height:1.15;margin:0 0 14px;font-weight:600}
.two{display:grid;grid-template-columns:minmax(0,38em) minmax(0,1fr);gap:48px;align-items:start}
@media (max-width:980px){.two{grid-template-columns:1fr}}
figure{margin:0} figcaption{font:14px/1.5 var(--sans);color:var(--muted);margin-top:10px}
.orbit{width:100%;max-width:520px;height:auto;display:block;color:var(--text)}
.orbit .lbl{font:13px var(--sans);fill:var(--muted)}
.phases{display:grid;grid-template-columns:repeat(8,1fr);gap:8px;margin:18px 0 0;padding:0;list-style:none;font:13px/1.3 var(--sans);color:var(--muted);text-align:center}
@media (max-width:620px){.phases{grid-template-columns:repeat(4,1fr)}}
.phases canvas{width:100%;max-width:72px;aspect-ratio:1;display:block;margin:0 auto 6px;background:#05070c;border-radius:50%}
table{border-collapse:collapse;width:100%;font:15px/1.4 var(--sans);margin-top:12px}
th,td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--line-soft)} th{color:var(--muted);font-weight:600}
.sources li{margin-bottom:8px;font-size:16px}
.share{display:flex;align-items:center;gap:8px;margin:28px 0 0;font:14px var(--sans);color:var(--muted)}
.share a,.share button{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;border:1px solid var(--line-soft);background:transparent;color:var(--text);cursor:pointer}
@media (pointer:coarse){.share a,.share button{width:44px;height:44px}}
.share a:hover,.share button:hover{color:var(--accent);border-color:var(--accent)}
footer{max-width:1240px;margin:56px auto 0;padding:24px 20px 48px;border-top:1px solid var(--line-soft);display:flex;flex-wrap:wrap;gap:8px 22px;font:14px var(--sans);color:var(--muted)}
footer a{color:var(--text)}

/* rail + top */
.rail{position:fixed;right:14px;top:50%;transform:translateY(-50%);z-index:20;display:flex;flex-direction:column;gap:12px;padding:10px 6px;border-radius:999px;background:color-mix(in srgb,var(--bg) 80%,transparent);border:1px solid var(--line-soft)}
.rail a{position:relative;display:block;width:10px;height:10px;border-radius:50%;border:1.5px solid var(--muted)}
.rail a[aria-current="true"]{background:var(--accent);border-color:var(--accent)}
.rail a span{position:absolute;right:20px;top:50%;transform:translateY(-50%);white-space:nowrap;font:13px var(--sans);background:var(--surface);color:var(--text);padding:3px 8px;border-radius:6px;border:1px solid var(--line-soft);opacity:0;pointer-events:none}
.rail a:hover span,.rail a:focus-visible span{opacity:1}
@media (max-width:1330px){.rail{display:none}}
.to-top{position:fixed;right:16px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:25;width:48px;height:48px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--text);font:600 13px var(--sans);cursor:pointer}
@media print{.rail,.to-top,.topbar{display:none}}
