:root {
  --navy:#172a3d; --navy-deep:#102134; --paper:#edf2f7; --white:#fcfdff; --muted:#455e73;
  --line:#a3b6c6; --path:#1f506b; --gold:#ffcd76; --accent:#006968;
  --display:"Arial Black", "Helvetica Neue", system-ui, sans-serif;
  color-scheme:light; background:var(--paper); color:var(--navy); font:1rem/1.5 system-ui,sans-serif;
}
* { box-sizing:border-box; }
body { margin:0; min-width:0; }
button,input { font:inherit; }
button { cursor:pointer; }
button:disabled { cursor:default; opacity:.5; }
a { color:inherit; text-underline-offset:.25em; }
:focus-visible { outline:3px solid #b0440b; outline-offset:3px; }
[hidden] { display:none !important; }
.visually-hidden,.skip:not(:focus) { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.skip:focus { position:fixed; z-index:4; top:10px; left:10px; background:var(--white); padding:.7rem; }
.masthead, footer { display:flex; justify-content:space-between; align-items:center; gap:1rem; background:var(--navy); color:var(--white); padding:.8rem clamp(.9rem,4vw,4rem); }
.brand { display:inline-flex; align-items:center; gap:.45rem; font-weight:850; font-size:clamp(1rem,2vw,1.35rem); letter-spacing:-.06em; text-decoration:none; }
.brand-mark { color:var(--gold); font-size:1.65em; line-height:1; }
.masthead nav { display:flex; gap:clamp(.65rem,2.7vw,1.7rem); font-size:.88rem; align-items:center; }
.lead { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,.63fr); gap:1rem 2.5rem; align-items:end; max-width:102rem; margin:auto; padding:clamp(1.8rem,4.7vw,4.5rem) clamp(.9rem,4vw,4rem) clamp(1.4rem,2.8vw,3rem); }
.eyebrow { color:#37586d; font-size:.75rem; font-weight:820; text-transform:uppercase; letter-spacing:.125em; margin:0 0 .65rem; }
h1,h2,h3,p { overflow-wrap:anywhere; }
h1,h2,h3 { font-family:var(--display); font-weight:880; letter-spacing:-.061em; line-height:.96; margin:0; }
h1 { font-size:clamp(2.52rem,6.15vw,6.45rem); }
h2 { font-size:clamp(1.9rem,4.35vw,3.7rem); }
h3 { font-size:clamp(1.25rem,2.1vw,1.9rem); }
.lead > p { color:var(--muted); font-size:clamp(1rem,1.35vw,1.19rem); margin:0; max-width:26rem; }
.studio { width:min(100% - clamp(1.5rem,8vw,8rem),94rem); margin:0 auto 3rem; scroll-margin-top:1rem; }
.studio-head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:.7rem 1.5rem; }
.scenarios,.plans { display:flex; flex-wrap:wrap; align-items:center; gap:.34rem; }
.scenarios button,.plans button,.tool-buttons button,.quiet { border:1px solid var(--line); min-height:44px; border-radius:.18rem; padding:.4rem .65rem; background:var(--white); color:var(--navy); font-weight:720; }
.scenarios button[aria-pressed=true] { background:var(--navy); color:var(--white); border-color:var(--navy); }
.plans button[aria-pressed=true],.tool-buttons button[aria-pressed=true] { background:#d6eee5; border-color:#31766c; color:#124c47; }
.edit-label { color:var(--muted); font-size:.83rem; padding-right:.2rem; }
.studio-grid { display:grid; grid-template-columns:minmax(0,2.75fr) minmax(15rem,1fr); align-items:start; gap:.75rem; margin-top:.65rem; }
.map-panel,.control-panel,.comparison { min-width:0; border:1px solid var(--line); background:var(--white); border-radius:.22rem; }
.map-panel { grid-area:1/1; }
.control-panel { grid-area:1/2; }
.map-top { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; padding:.9rem .85rem; gap:.4rem .6rem; }
.map-top p { color:var(--muted); font-size:.83rem; margin:0; }
.map { display:grid; position:relative; isolation:isolate; grid-template-columns:repeat(7,minmax(0,1fr)); grid-template-rows:minmax(6.4rem,auto) minmax(5.2rem,auto) minmax(6.4rem,auto); gap:.46rem; padding:.65rem; background:#cbd6e1; }
.road { grid-area:2/1/3/-1; align-self:stretch; margin:0 -.65rem; background:repeating-linear-gradient(90deg,#728396 0 15px,#abb8c7 15px 30px) center / auto 2px repeat-x,#566a7d; border-block:2px solid #435a6b; z-index:-1; }
.pos-1 { --pos:1; }.pos-2 { --pos:2; }.pos-3 { --pos:3; }.pos-4 { --pos:4; }.pos-5 { --pos:5; }.pos-6 { --pos:6; }.pos-7 { --pos:7; }
.north { --lane:1; }.cross { --lane:2; }.south { --lane:3; }
.span { display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; text-align:left; color:#172a3d; background:#e5edf6; grid-row:var(--lane); grid-column:var(--pos); min-width:0; width:100%; min-height:56px; border:1px solid #537084; border-radius:.22rem; position:relative; padding:.33rem .43rem .4rem; }
.span:hover { filter:brightness(1.045); }
.span.selected { outline:2px dashed #13293d; outline-offset:1px; z-index:1; }
.span.on-route { box-shadow:inset 0 0 0 2px #1a4a62, 0 1px 0 #18304422; }
.span:focus-visible { z-index:2; outline:3px solid #b0440b; outline-offset:2px; }
.span-top { display:flex; align-items:center; justify-content:space-between; width:100%; height:1.35rem; }
.condition-mark { font-size:1.24rem; font-weight:840; line-height:1; }
.route-step { color:#fff; background:var(--path); font-size:.71rem; font-weight:850; line-height:1.2; min-width:1.25rem; text-align:center; border-radius:.1rem; padding:.13rem; }
.span-name { display:block; width:100%; font-weight:780; font-size:clamp(.76rem,1vw,.97rem); line-height:1.2; overflow-wrap:anywhere; margin-top:.18rem; }
.span-meta { font-size:.69rem; line-height:1.14; margin-top:.16rem; }
.edit-marks { font-size:.83rem; color:#174b40; font-weight:850; margin-top:auto; padding-top:.2rem; }
.shade { background:#bde3d9; }.sun { background:#ffdf9d; }.lit { background:#f8d991; }.unlit { background:#cbd4fa; }
.open { background:#cee2ef; }.blocked { background:#e2c7ed; }
.cross.span { border-style:dashed; }
.map-bottom { padding:.7rem .85rem .8rem; }
.legend { display:flex; gap:.6rem 1rem; flex-wrap:wrap; color:var(--muted); font-size:.8rem; }
.legend span { display:inline-flex; align-items:center; gap:.35rem; }
.key { display:inline-block; width:.85rem; height:.85rem; border:1px solid #5d798a; }
.key.outlined { border:2px solid var(--path); background:#edf6f8; }
.site-detail { margin:.55rem 0 0; color:var(--muted); font-size:.92rem; min-height:1.5em; }
.control-panel { padding:.78rem .85rem; }
.control-panel h3 { margin-bottom:.38rem; }
.control-panel .eyebrow { font-size:.69rem; margin-bottom:.47rem; }
.control-panel p { margin:.4rem 0 .6rem; }
.control-panel .dest { font-weight:800; font-size:.9rem; }
.control-panel #scenario-description > p:last-child { color:var(--muted); font-size:.9rem; }
.tool-buttons { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.3rem; margin-top:.55rem; }
.tool-buttons button { min-width:0; text-align:left; font-size:.83rem; line-height:1.2; padding:.45rem; }
.tool-buttons button small { float:right; margin-left:.23rem; font-size:.69rem; color:var(--muted); white-space:nowrap; }
.tool-hint { color:var(--muted); font-size:.83rem; min-height:2.55em; }
.budget-line { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:.35rem; border-top:1px solid var(--line); padding-top:.55rem; font-size:.85rem; }
.budget-line button { min-height:42px; }
.live { color:#17544b; font-weight:680; margin:.45rem 0; min-height:1.5rem; }
.live.warning { color:#842a18; background:#ffe3d3; padding:.35rem .6rem; }
.comparison { padding:clamp(.7rem,2vw,1.45rem); }
.comparison-top { display:flex; justify-content:space-between; flex-wrap:wrap; align-items:start; gap:.6rem 1rem; }
.comparison-top p { margin:.47rem 0; color:var(--muted); }
.share-actions { display:flex; flex-wrap:wrap; gap:.4rem .6rem; align-items:center; font-size:.85rem; }
.share-field { display:grid; margin:.6rem 0; gap:.35rem; font-weight:680; }
.share-field input { min-width:0; width:100%; padding:.4rem .5rem; border:1px solid var(--line); border-radius:.22rem; background:#f5f9fc; }
.results { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.5rem; margin-top:.4rem; }
.result { border:1px solid var(--line); padding:.7rem .75rem; background:#f4f7fb; min-width:0; }
.result.editing { border-color:#34766c; background:#e8f4ef; }
.result-head { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:.28rem .5rem; border-bottom:1px solid var(--line); padding-bottom:.5rem; }
.result-head span,.method,.result details,.block-reason { color:var(--muted); font-size:.87rem; }
.result dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.4rem .8rem; margin:.6rem 0; }
.result dl div { display:flex; flex-direction:column-reverse; justify-content:start; }
.result dt { color:var(--muted); font-size:.8rem; line-height:1.2; }
.result dd { margin:0; font-weight:850; font-size:clamp(1.1rem,2.2vw,1.9rem); }
.result p { margin:.32rem 0; }
.method { margin-top:.8rem; }
summary { cursor:pointer; font-weight:680; }
.quiet:hover:not(:disabled) { background:#dfebf5; }
.field-note { display:grid; grid-template-columns:minmax(0,.72fr) minmax(0,1fr); background:var(--navy-deep); color:var(--white); margin-inline:auto; }
.field-note img { width:100%; height:100%; max-height:26rem; object-fit:cover; }
.field-note > div { padding:clamp(1.2rem,4vw,4rem); align-self:center; }
.field-note p { max-width:39rem; }
.field-note a { color:var(--gold); }
.guide { width:min(100% - 2rem,53rem); margin:auto; padding:clamp(1.6rem,5vw,4rem) 0 3rem; }
.guide h1 { font-size:clamp(2.45rem,6.5vw,5.6rem); max-width:15ch; }
.guide h2 { margin-top:1.9rem; font-size:clamp(1.7rem,3.6vw,2.9rem); }
.guide p,.guide li { max-width:66ch; }
.guide .intro { color:var(--muted); font-size:1.15rem; }
.guide-photo { display:block; width:100%; height:auto; max-height:25rem; object-fit:cover; }
.guide li { margin:.5rem 0; }
.sources { color:var(--muted); font-size:.9rem; }
.primary-link { display:inline-block; background:var(--navy); color:var(--white); font-weight:780; padding:.6rem .8rem; }
@media(max-width:920px) {
  .studio-grid { grid-template-columns:1fr; }
  .map-panel,.control-panel { grid-area:auto; }
  .control-panel { display:grid; grid-template-columns:1fr 1fr; gap:.25rem 1rem; }
  .control-panel .tool-buttons { align-self:start; }
  .lead { grid-template-columns:1fr; }
  .wide-only { display:none; }
}
@media(max-width:660px) {
  .studio-grid { display:flex; flex-direction:column; }
  .studio-grid > section { width:100%; }
  .control-panel { order:-1; }
  .map { grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:repeat(7,auto); gap:.35rem; padding:.45rem; }
  .road { grid-area:1/2/-1/3; margin:-.45rem 0; border-block:none; border-inline:2px solid #435a6b; background:repeating-linear-gradient(0deg,#728396 0 13px,#abb8c7 13px 26px) center / 2px auto repeat-y,#566a7d; }
  .span { grid-row:var(--pos); grid-column:var(--lane); }
  .span-name { font-size:.8rem; }
  .results { grid-template-columns:1fr; }
  .field-note { grid-template-columns:1fr; }
  .field-note img { max-height:17rem; }
}
@media(max-width:420px) {
  .masthead { padding-inline:.65rem; gap:.5rem; }
  .masthead nav { gap:.48rem; font-size:.8rem; }
  .control-panel { grid-template-columns:1fr; }
  .lead h1 { font-size:clamp(2.16rem,9.4vw,3rem); }
  .scenarios button,.plans button { font-size:.78rem; }
}
