/* NC Mesh site styles. Phone first: everything below 1000px is one column. */
:root{--bg:#081318;--card:#0c1c24d9;--line:#ffffff1f;--text:#e9f1f4;--green:#6fdc4b;--green2:#8ff06d;--amber:#ffb547;--blue:#5cc8ff}
*{box-sizing:border-box}html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;font:16px/1.6 Outfit,system-ui,sans-serif;color:var(--text);background:var(--bg);overflow-x:hidden}
a{color:var(--green2)}img{max-width:100%}
.cond{font-family:"Barlow Condensed",sans-serif;text-transform:uppercase;font-weight:800}
[hidden]{display:none!important}
.g{background:var(--card);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid var(--line);border-radius:20px}
.skip{position:absolute;left:-999px}.skip:focus{left:16px;top:16px;z-index:999;background:#000;padding:8px}

/* header */
header.bar{display:flex;align-items:center;gap:22px;padding:8px 10px 8px 12px;margin:14px 16px 0;position:relative;z-index:500}
header.bar .logo{flex:none}header.bar .logo img{height:44px;width:auto;display:block;border-radius:10px}
header.bar nav{display:flex;align-items:center;gap:20px;flex:1}
header.bar nav a{color:var(--text);text-decoration:none;font-weight:500;opacity:.85;white-space:nowrap}
header.bar nav a:hover,header.bar nav a[aria-current]{opacity:1;color:var(--green2)}
header.bar nav .pill{margin-left:auto;border:1px solid #fff5;padding:7px 18px;border-radius:999px;opacity:1}
.menu{display:none;margin-left:auto;background:#ffffff14;color:var(--text);border:0;border-radius:999px;padding:9px 16px;font:500 15px Outfit;cursor:pointer}
.menu:before{content:"☰ "}.menu[aria-expanded=true]:before{content:"✕ "}
@media(max-width:1000px){
 header.bar{flex-wrap:wrap;gap:0;margin:10px 10px 0}
 .menu{display:block}
 header.bar nav{display:none;flex:1 0 100%;flex-direction:column;align-items:stretch;gap:0;padding:6px 4px 4px}
 header.bar nav.open{display:flex}
 header.bar nav a{padding:12px 8px;border-top:1px solid #ffffff14;font-size:17px}
 header.bar nav .pill{margin:10px 0 4px;text-align:center;border-top:1px solid #fff5}
}

/* buttons and bits */
h1{margin:0 0 18px;line-height:.9}h1 em,h2 em{font-style:normal;color:var(--green)}
h2{font-size:clamp(36px,5vw,60px);line-height:.95;margin:0 0 8px}
.cta{display:inline-block;background:var(--green);color:#06210a;font-weight:700;padding:14px 26px;border-radius:999px;text-decoration:none;margin:0 10px 10px 0}
.cta.alt{background:var(--card);color:var(--text);border:1px solid #fff4}
.easy{display:flex;gap:6px 18px;flex-wrap:wrap;margin-top:8px;font-size:15px;opacity:.9}.easy span:before{content:"✓ ";color:var(--green);font-weight:700}
.live{font-size:12px;color:var(--green2);font-weight:400}.live.quiet{color:#9fb3bb}.live.quiet:before{background:#9fb3bb;box-shadow:none}.live:before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--green);box-shadow:0 0 8px var(--green);margin-right:6px}
.live.off{color:#ffb547}.live.off:before{background:#ffb547;box-shadow:none}
.ok{color:var(--green2);font-weight:500}.bad{color:var(--amber);font-weight:500}
.muted{opacity:.65}
footer{text-align:center;padding:50px 20px 60px;font-weight:300;font-size:15px}
footer nav{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 18px;margin-bottom:10px}footer nav a{color:var(--text);opacity:.75;text-decoration:none}
footer p{margin:0;opacity:.55}

/* message feed */
.air{display:flex;flex-direction:column;overflow:hidden}
.air h3{margin:0;padding:14px 16px 8px;font-weight:500;font-size:17px;display:flex;justify-content:space-between;align-items:center;gap:10px}
.air h3 a{font-size:14px;font-weight:400;margin-left:auto}
.air h3{flex-wrap:wrap;row-gap:0}.air h3 .live{order:3;flex-basis:100%;margin-top:-2px}
.tabs{display:flex;gap:6px;padding:0 14px 10px}.tabs button{flex:1;background:#ffffff12;color:var(--text);border:0;padding:8px;border-radius:999px;font:500 14px Outfit;cursor:pointer}.tabs button.on{background:var(--green);color:#06210a}
.feed{overflow:auto;padding:0 16px 8px;flex:1}
.msg{display:flex;gap:10px;padding:10px 0;border-top:1px solid #ffffff14}
.av{flex:none;width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,#2f6b5a,var(--green));color:#06210a;font:700 10px Outfit;display:grid;place-items:center;overflow:hidden;text-align:center;line-height:1}
.msg .body{min-width:0;flex:1}
.meta{font-size:12px;opacity:.75;display:flex;gap:4px 8px;flex-wrap:wrap}.who{font-weight:500;opacity:1;overflow-wrap:anywhere}.ch{color:var(--green2)}
.txt{overflow-wrap:anywhere;font-size:15px;line-height:1.4;white-space:pre-wrap}
.empty{padding:20px 0;opacity:.7;font-weight:300}

/* numbers */
.nums{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;max-width:1180px;margin:0 auto;padding:0 20px}
.nums .g{padding:16px 22px}.nums b{font:800 62px/1 "Barlow Condensed";color:var(--green);display:block}.nums span{font-weight:300;opacity:.85}

/* home sections */
section.w{max-width:1180px;margin:auto;padding:72px 20px 0}
.sub{font-weight:300;font-size:19px;opacity:.85;max-width:680px;margin:0 0 26px}
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.steps .g{padding:24px;position:relative}
.steps i{font:800 84px/0.8 "Barlow Condensed";color:#6fdc4b33;position:absolute;right:18px;top:18px;font-style:normal}
.steps h3,.why h3,.cards h3{margin:0 0 6px;font-weight:500;font-size:21px;color:var(--green2)}
.steps p,.why p{margin:0;font-weight:300}.steps a{display:inline-block;margin-top:12px;font-weight:500;text-decoration:none}
.why{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.why .g{padding:22px}
.band{margin-top:72px;background:linear-gradient(100deg,#16384a,#2f6b5a 70%,#4fae3c);padding:44px 20px}
.band div{max-width:1180px;margin:auto;display:flex;align-items:center;gap:24px;flex-wrap:wrap}.band h2{flex:1;margin:0;min-width:260px}.band .cta{background:var(--bg);color:#fff;margin:0}
.trio{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.trio .g{padding:22px}.trio h3{margin:0 0 6px;font-weight:500;font-size:21px}.trio p{margin:0;font-weight:300}

/* home hero: live map behind the pitch on wide screens */
.home .hero{position:relative;height:100vh;min-height:700px;overflow:hidden}
.home .hero header.bar{position:absolute;top:0;left:0;right:0}
.home .hero{background:var(--bg)}
/* The picture (/api/map.webp?f=hero) is placed so North Carolina sits right of the headline, from --ncx, --ncw wide,
   its top at --ncy, and the live feed below the coast. HERO numbers from ncmesh_api.hero_geometry(): NC is 0.2606 of
   the picture's width, starts 0.4612 across and 0.3413 down; the picture is 1.7:1; NC is 0.3799 of its own width tall. */
.home{--ncw:min(calc(100vw - 664px),1050px);--ncx:calc(620px + (100vw - 644px - var(--ncw)) / 2);--ncy:112px}
.heromap{position:absolute;inset:0;overflow:hidden}
.heromap img{position:absolute;display:block;max-width:none;width:calc(var(--ncw) / .2606);height:auto;
  left:calc(var(--ncx) - var(--ncw) / .2606 * .4612);top:calc(var(--ncy) - var(--ncw) / .2606 / 1.7 * .3413)}
.heromap .credit{position:absolute;z-index:455;right:16px;bottom:96px;padding:1px 7px;border-radius:4px}
.shade{position:absolute;inset:0;z-index:401;pointer-events:none;background:linear-gradient(90deg,#081318f0 0%,#081318d9 25%,#08131899 40%,#08131826 52%,#0813180d 100%),linear-gradient(#0b1d2ccc 0%,#0000 14%,#0000 70%,#081318 100%)}
.pitch{position:absolute;z-index:450;left:40px;top:50%;transform:translateY(-46%);max-width:560px;pointer-events:none}.pitch *{pointer-events:auto}
.pitch h1{font-size:clamp(54px,7.4vw,118px);line-height:.88}.pitch p{font-size:21px;font-weight:300;max-width:520px;margin:0 0 22px}
.home .air{position:absolute;z-index:450;right:16px;top:min(calc(var(--ncy) + var(--ncw) * .3799 + 22px),calc(100vh - 380px));bottom:120px;width:330px}
.home .nums{position:relative;z-index:460;margin-top:-74px}
/* Wide screens: the feed runs from under the header to the stats over the ocean, and NC sits between the headline and
   the feed, shifted left so the coast clears the feed and the mountains fade under the headline. */
@media(min-width:1200px){
 .home{--airw:340px;--ncw:clamp(440px,calc((100vw - 570px - var(--airw) - 16px) * 1.15),1000px);--ncx:calc(570px - var(--ncw) * .14);--ncy:120px}
 .home .air{top:96px;width:var(--airw)}
}
@media(min-width:1200px) and (max-width:1399px){.home{--airw:300px}}

/* inner pages */
.wrap{max-width:1180px;margin:0 auto;padding:40px 20px 0}
.gwrap{max-width:1180px;margin:0 auto;padding:40px 20px 0;display:grid;grid-template-columns:230px minmax(0,1fr);gap:40px}
.toc{position:sticky;top:20px;align-self:start;padding:6px 18px 12px}
.toc summary{font-weight:500;padding:10px 0;cursor:pointer;list-style:none}.toc summary::-webkit-details-marker{display:none}
.toc summary{display:flex;align-items:center;justify-content:space-between;gap:10px}
.toc summary::after{content:"";width:8px;height:8px;border-right:2px solid var(--green2);border-bottom:2px solid var(--green2);transform:rotate(45deg) translateY(-3px);transition:transform .15s}
.toc[open] summary::after{transform:rotate(-135deg) translateY(-2px)}
.toc a{display:block;color:inherit;opacity:.8;text-decoration:none;padding:5px 0;font-size:15px}.toc a:hover{opacity:1;color:var(--green2)}
.guide h1,.wrap h1{font-size:clamp(44px,6vw,84px);line-height:.92;margin:0 0 14px}
.lead{font-size:20px;font-weight:300;max-width:760px;margin:0 0 26px}
.guide h2,.wrap h2{margin:54px 0 10px;font-size:clamp(32px,4vw,48px)}.guide h3,.wrap h3{font-weight:500;font-size:22px;margin:30px 0 10px}
.guide p,.guide li,.prose p,.prose li{font-weight:300;font-size:17px;line-height:1.6;max-width:760px}
code{font-family:ui-monospace,Menlo,Consolas,monospace;background:#ffffff14;border-radius:6px;padding:1px 6px;font-size:.92em;overflow-wrap:anywhere}
.note{border-left:3px solid var(--green);padding:12px 16px;margin:16px 0;max-width:760px}.note.warn{border-color:var(--amber)}
.draft{background:#ffb5471a;border:1px dashed var(--amber);border-radius:12px;padding:2px 8px;font-size:13px;color:#ffd08a;white-space:nowrap}
.set{width:100%;border-collapse:collapse;margin:6px 0 10px;font-size:16px}
.set th,.set td{text-align:left;padding:10px 12px;border-bottom:1px solid #ffffff17;vertical-align:top}
.set th{font-weight:500;font-size:13px;text-transform:uppercase;letter-spacing:.06em;opacity:.7}
.set td:first-child{font-weight:500;white-space:nowrap}.set td:nth-child(2){color:var(--green2);font-weight:500}.set td:last-child{font-weight:300;opacity:.9}
.link{display:block;word-break:break-all;padding:14px 16px;margin:10px 0;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:14px}
.fix{margin:10px 0;padding:0}.fix summary{cursor:pointer;padding:14px 18px;font-weight:500;font-size:17px;list-style:none}.fix summary::-webkit-details-marker{display:none}
.fix summary:before{content:"+ ";color:var(--green)}.fix[open] summary:before{content:"– "}.fix div{padding:0 18px 12px}
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:14px 0}.cards .g{padding:22px}.cards p{margin:0;font-weight:300}
.cards.two{grid-template-columns:repeat(2,1fr)}
.tag{display:inline-block;font-size:12px;padding:1px 9px;border-radius:999px;background:#ffffff14;margin:2px 4px 2px 0}

/* map page */
.mappage{height:100dvh;display:flex;flex-direction:column}
.mappage header.bar{margin-bottom:10px}
.mapbox{position:relative;flex:1;margin:0 16px 16px;border-radius:20px;overflow:hidden;border:1px solid var(--line)}
.mapbox #map{position:absolute;inset:0;background:var(--bg)}
/* the map's controls: search, period and links on one row, a stats line under it; the legend on one line on the map */
.mapctl{position:absolute;z-index:450;left:12px;right:12px;top:12px;max-width:560px;padding:6px 6px 5px;border-radius:18px}
.mapctl .row{display:flex;align-items:center;gap:6px}
.mapctl input[type=search]{min-width:0;flex:1 1 auto;background:#ffffff14;border:1px solid var(--line);border-radius:999px;color:var(--text);font:16px Outfit;padding:8px 14px}
.mapctl select{flex:none;background:#ffffff14;border:1px solid var(--line);border-radius:999px;color:var(--text);font:15px Outfit;padding:8px 10px;color-scheme:dark}
.mapctl .tog{flex:none;margin:0 6px 0 2px;gap:6px;font-size:15px}
.mapctl .stats{font-size:12px;opacity:.75;margin:4px 12px 0}
.mapctl .results{margin:0 6px}
.maplegend{position:absolute;z-index:450;left:12px;bottom:26px;padding:5px 12px;border-radius:999px;display:flex;flex-wrap:nowrap;gap:0 10px;font-size:12px;white-space:nowrap;max-width:calc(100% - 76px);overflow:hidden}
.maplegend span{display:inline-flex;align-items:center}.maplegend .lines{gap:0 10px}.maplegend .lines[hidden]{display:none!important}
.maplegend i{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:4px}.maplegend .lines i{width:13px;height:3px;border-radius:2px}
.maplegend b{font-weight:inherit}.maplegend .short{display:none}
@media(max-width:420px){.maplegend .lines b{display:none}.maplegend .lines{gap:0 2px}.maplegend .lines .short{display:inline;margin-left:2px}}
.results{max-height:40vh;overflow:auto;margin-top:6px}.results button{display:block;width:100%;text-align:left;background:none;border:0;border-top:1px solid #ffffff14;color:var(--text);font:15px Outfit;padding:8px 2px;cursor:pointer}
.legend{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:13px;margin-top:6px;opacity:.9}.legend i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:5px}
.pop{font:14px/1.45 Outfit;min-width:220px}.pop b{font-size:16px;display:block;overflow-wrap:anywhere}.pop .muted{font-size:12px}
.nhead{display:flex;gap:10px;align-items:center;margin-bottom:6px}.nhead .body{min-width:0;flex:1}
.badge{flex:none;min-width:40px;height:40px;padding:0 4px;border-radius:50%;color:#06210a;font:700 11px/40px Outfit;text-align:center;overflow:hidden;box-sizing:border-box}
.btns{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.btns button,.btns a,.detail button.small{background:#ffffff14;color:var(--text);border:0;border-radius:999px;padding:6px 14px;font:500 13px Outfit;cursor:pointer;text-decoration:none}
.btns .on{background:var(--green);color:#06210a}
.tog{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:14px;cursor:pointer}.tog input{width:18px;height:18px;accent-color:var(--green)}
.legend.lines i{width:16px;height:3px;border-radius:2px;vertical-align:middle}
.detail{position:absolute;z-index:460;top:70px;right:12px;bottom:12px;width:380px;max-width:calc(100% - 24px);overflow:auto;padding:16px 18px;font-size:14px;box-sizing:border-box;background:#0c1c24f2}
.detail .x{position:sticky;top:0;float:right;background:#ffffff14;color:var(--text);border:0;border-radius:50%;width:34px;height:34px;font-size:15px;cursor:pointer;z-index:1}
.detail .nhead b{font-size:18px}
.detail section{border-top:1px solid var(--line);margin-top:14px;padding-top:10px}
.detail h3{margin:0 0 4px;font-weight:500;font-size:16px;color:var(--green2)}.detail p{margin:0 0 6px}
.detail .muted{font-size:12.5px}.detail a{overflow-wrap:anywhere}
.detail .item{padding:7px 0;border-top:1px solid #ffffff0d}.detail .item:first-of-type{border-top:0}
.detail .path{font-size:13px;margin-top:3px;overflow-wrap:anywhere}.hop{opacity:.9}.hop.good{color:#8ff06d}.hop.fair{color:#ffd25c}.hop.weak{color:#ff7b6b}.hop.unk{color:#9fb3bb}
.detail button.small{margin-top:6px}
.chart{margin:8px 0 10px}.chart .cap{display:flex;justify-content:space-between;font-size:13px}.chart .cap b{color:var(--green2);font-weight:500}
.chart svg{display:block;width:100%;height:58px;background:#ffffff08;border-radius:8px;margin-top:3px}
.chart polyline{fill:none;stroke:var(--green2);stroke-width:2;vector-effect:non-scaling-stroke}
.chart .axis{font-size:11px;opacity:.6;margin-top:2px}
.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#0c1c24;color:var(--text)}
.leaflet-container a.leaflet-popup-close-button{color:var(--text)}
.leaflet-control-zoom a{background:#0c1c24!important;color:var(--text)!important;border-color:var(--line)!important}
.leaflet-control-attribution,.credit{background:#081318c8!important;color:#b9c6cc!important;font:11px/1.5 Outfit,system-ui,sans-serif;white-space:nowrap}
.leaflet-control-attribution a,.credit a{color:#8a979d!important;text-decoration-color:#8a979d66}.leaflet-control-attribution a:hover,.credit a:hover{color:#d5dde0!important}
.leaflet-control-attribution .attr-full,.credit .attr-full{display:none}
.leaflet-control-attribution.open,.credit.open{white-space:normal;max-width:calc(100vw - 32px)}
.leaflet-control-attribution.open .attr-short,.credit.open .attr-short{display:none}
.leaflet-control-attribution.open .attr-full,.credit.open .attr-full{display:inline}
@media(min-width:1001px){.mapbox .attr-short{display:none}.mapbox .attr-full{display:inline}}

/* messages page */
.msgpage .air{height:auto;min-height:60vh}
.more{display:block;margin:14px auto 0;background:#ffffff14;color:var(--text);border:0;border-radius:999px;padding:10px 22px;font:500 15px Outfit;cursor:pointer}

/* status page */
.bars{display:flex;align-items:flex-end;gap:3px;height:140px;padding:16px;margin:10px 0}
.bars span{flex:1;background:var(--green);border-radius:3px 3px 0 0;min-height:2px;opacity:.85}
.bars span.t{background:var(--blue)}
.rows{list-style:none;margin:0;padding:0}.rows li{display:flex;gap:12px;padding:8px 0;border-top:1px solid #ffffff14;font-weight:300}.rows li b{margin-left:auto;font-weight:500}
.rows li .bar{flex:0 0 80px;height:8px;background:#ffffff14;border-radius:4px;align-self:center;overflow:hidden}.rows li .bar i{display:block;height:100%;background:var(--green)}

@media(max-width:1000px){
 .nums{grid-template-columns:1fr 1fr;gap:10px;padding:0 16px}.nums .g{padding:12px 16px}.nums b{font-size:46px}
 .steps,.why,.trio,.cards,.cards.two{grid-template-columns:1fr}
 section.w{padding:52px 16px 0}.band{margin-top:52px;padding:34px 16px}
 .home .hero{height:auto;min-height:0;overflow:visible;display:flex;flex-direction:column}
 .home .hero header.bar{position:relative;order:0}
 .pitch{position:relative;order:1;transform:none;left:0;top:0;padding:34px 18px 6px;max-width:none}
 .pitch h1{font-size:clamp(50px,15vw,84px)}.pitch p{font-size:18px}
 /* phones: the picture (/api/map.webp?f=phone, NC low in a portrait frame) fades in behind the headline */
 .heromap{position:absolute;top:0;left:0;right:0;bottom:auto;height:min(150vw,800px);order:0}
 .heromap>a,.heromap picture{display:block;height:100%}
 .heromap img{position:static;width:100%;height:100%;object-fit:cover;object-position:88% 75%}
 .heromap .credit{right:10px;top:78px;bottom:auto;border-radius:4px;font-size:10px}
 .shade{display:block;bottom:auto;height:min(150vw,800px);background:linear-gradient(#081318e6 0%,#081318b8 30%,#08131866 60%,#081318d0 88%,#081318 100%)}
 .home .hero{background:none}
 .home .air{position:relative;top:auto;right:auto;bottom:auto;order:3;width:auto;height:430px;margin:14px 16px 0;z-index:450}
 .home .nums{margin-top:14px}
 .gwrap{grid-template-columns:minmax(0,1fr);gap:0;padding:24px 16px 0}.wrap{padding:24px 16px 0}
 .toc{position:static;margin-bottom:14px}
 .set td:first-child{white-space:normal}
 .set,.set tbody,.set tr,.set td{display:block}.set thead{display:none}.set tr{padding:8px 4px;border-bottom:1px solid #ffffff17}.set td{border:0;padding:3px 10px}
 .lead{font-size:18px}
 .mapbox{margin:0 10px 10px}
 .mapctl{left:8px;right:8px;top:8px}.mapctl .row{gap:4px}.mapctl select{padding:8px 6px;font-size:14px}.mapctl .tog{font-size:14px;gap:4px;margin:0 4px 0 0}
 .maplegend{left:8px;bottom:22px;padding:4px 9px;font-size:11px;gap:0 7px;max-width:calc(100% - 64px)}.maplegend .lines{gap:0 7px}.maplegend i{margin-right:3px}
 .detail{top:auto;left:8px;right:8px;bottom:8px;width:auto;max-width:none;max-height:62%;border-radius:18px}
 .mapctl .results{max-height:30vh}
}
/* tablets and narrow windows: a shorter, wider slice, NC raised to sit above the feed */
@media(min-width:601px) and (max-width:1000px){
 .heromap,.shade{height:clamp(520px,64vw,620px)}
 .heromap img{object-position:50% 80%}
}
