body.latex-theme { font-size: 1.06rem; }
header { display:flex; align-items:center; gap:.8rem; padding:.65rem max(1rem,calc((100% - 72rem)/2)); background:var(--surface); border-bottom:1px solid var(--border); color:var(--navy); }
header strong { font-size:1.45rem; }
header span { border-left:1px solid var(--border-strong); padding-left:.8rem; }
main { max-width:76rem; padding:1.7rem 2rem; margin:auto; }
h1,h2,h3,summary,.mapbar strong { color:var(--navy); }
h1 { font-size:clamp(2.2rem,4vw,3.1rem); margin:0; line-height:1.1; }
h2 { margin:0 0 .6rem; font-size:1.4rem; line-height:1.25; }
p { margin:.4rem 0 .9rem; }
.grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(18rem,1fr); gap:1.25rem; align-items:start; }
.panel,figure,.console { margin:0; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); box-shadow:var(--shadow-sm); }
.panel,.console { padding:1.15rem 1.35rem; margin-bottom:1rem; }
figure { overflow:hidden; }
#map { display:block; width:100%; height:min(70vh,710px); min-height:365px; background:#273039; }
figcaption,.mapkey,.mapbar { padding:.65rem 1rem; }
figcaption,small { color:var(--ink-secondary); }
figcaption,.mapkey,.chartkey { font-size:.98rem; }
.mapkey,.mapbar,.clockrow,.playback,.chartkey,.tabs,.legend,.compare,.hours { display:flex; align-items:center; flex-wrap:wrap; gap:.65rem; }
.mapbar,.clockrow,.hours { justify-content:space-between; }
.mapbar { border-bottom:1px solid var(--border); }
.mapbar strong { font-size:1.25rem; }
.mapkey,.meters div { background:var(--surface-alt); }
.give,.houseStatus,.phase { color:#245c37; }
.take,.houseStatus.need { color:#93401b; }
button,select { font:inherit; color:var(--ink); cursor:pointer; border:1px solid var(--border-strong); border-radius:var(--radius-sm); background:var(--surface); padding:.32rem .75rem; }
button:hover { background:var(--navy-soft); }
button[aria-pressed=true],#play { background:var(--navy); color:white; border-color:var(--navy); }
:focus-visible { outline:2px solid var(--blue); outline-offset:3px; }
select { max-width:100%; }
#home { display:block; width:100%; margin:.2rem 0 .8rem; }
label,.phase,.houseStatus,.route { font-weight:700; }
.clockrow strong { font:2rem/1.15 var(--font-mono); color:var(--navy); }
.profile { display:block; width:100%; height:48px; margin-top:.65rem; }
.profile path { fill:none; stroke-width:2; vector-effect:non-scaling-stroke; }
.timeline,progress { width:100%; accent-color:var(--navy); }
.timeline,summary { cursor:pointer; }
.hours { font-family:var(--font-mono); color:var(--ink-muted); font-size:.9rem; }
.gold { color:#875009; }.mint { color:var(--blue); }
.meters { display:grid; grid-template-columns:1fr 1fr; gap:.7rem; margin:.7rem 0; }
.meters div { padding:.6rem .8rem; border-radius:var(--radius-sm); }
.meters strong,.meters small,.compare b { display:block; }
.meters strong { font:1.25rem var(--font-mono); }
.compare button { flex:1; text-align:left; }
.readout { border-left:3px solid var(--navy); padding-left:.8rem; }
svg text { font:bold 12px var(--font-body); fill:white; paint-order:stroke; stroke:#14251f; stroke-width:3; pointer-events:none; }
#overlay circle { cursor:pointer; }
@media(max-width:730px){main{padding:1rem .8rem}.grid{grid-template-columns:1fr}#map{height:58vh}.panel,.console{padding:1rem}}

.sidebar .nav-btn {text-decoration:none}
main.content-stage {width:100%;max-width:76rem;margin:0 auto}
header.topbar {justify-content:flex-start;padding:.6rem 1.4rem}
section[id],figure[id]{scroll-margin-top:5rem}
#demanda{margin-top:1rem}
#demanda table{border-collapse:collapse;width:100%;margin-bottom:1rem}
#demanda th,#demanda td{padding:.45rem;text-align:right;border-bottom:1px solid var(--border)}
#demanda th:first-child,#demanda td:first-child{text-align:left}
#demanda thead,#demanda tfoot{background:var(--surface-alt)}
.table-wrap{overflow-x:auto}
@media(max-width:960px){.sidebar .nav-list{flex-direction:row;flex-wrap:wrap;padding:.5rem}.sidebar .nav-btn{width:auto}.topbar{position:static}}
@media(min-width:961px) and (max-width:1120px){.grid{grid-template-columns:minmax(0,1.2fr) minmax(16rem,1fr)}}
