/* SSC Weather website v1.0. Ported from website/reference/mockup-v1.0.html (the visual spec): same rules in
   the same order, container queries turned into media queries at the same widths, rejected leftovers removed.
   Production additions are at the end. */
html{background:#0e1a28}
body{margin:0}
.cq{background:#0e1a28;color:#e9eef4;font-family:'Barlow','Helvetica Neue',Arial,sans-serif;font-weight:500;font-variant-numeric:tabular-nums;-webkit-text-size-adjust:100%}
.cq *{box-sizing:border-box}
.cq svg text{font-family:'Barlow','Helvetica Neue',Arial,sans-serif}
.site{max-width:1280px;margin:0 auto;padding:0 12px 24px}
.cq a{color:#7fd7e8}.cq a:hover{color:#fff}

/* header */
.top{display:flex;align-items:center;gap:12px;padding:12px 2px 10px}
.logo{width:48px;height:48px;flex:none;background:#fff;border-radius:8px;padding:3px;display:block}
.brand{flex:1;min-width:0}
.name{font:700 26px/1 'Barlow Condensed','Arial Narrow',sans-serif;color:#fff;letter-spacing:.02em}
.place{font:500 13px/1.3 'Barlow',sans-serif;color:rgba(255,255,255,.72);margin-top:3px}
.when{text-align:right}
.clock{font:600 17px/1 'Barlow Condensed',sans-serif;color:rgba(255,255,255,.85);letter-spacing:.02em}
.clock b{color:#fff;font-weight:700}
.sun{font:500 12px/1.3 'Barlow',sans-serif;color:rgba(255,255,255,.72);margin-top:4px}

.moon{font:500 12px/1.3 'Barlow',sans-serif;color:rgba(255,255,255,.72);margin-top:2px;display:flex;align-items:center;justify-content:flex-end;gap:5px}

/* jump links */
.jump{position:sticky;top:0;z-index:5;display:flex;background:#0e1a28;border-bottom:1px solid rgba(255,255,255,.18);margin:0 -12px;padding:0 12px}
.jump a{flex:1;min-height:44px;display:flex;align-items:center;justify-content:center;font:600 14px/1 'Barlow',sans-serif;letter-spacing:.08em;text-transform:uppercase;color:rgba(255,255,255,.78);text-decoration:none;border-bottom:3px solid transparent}
.jump a.on{color:#fff;border-bottom-color:#f26b1d}
.jump a:hover{color:#fff}

/* current conditions */
.hero{margin-top:12px;display:grid;grid-template-columns:1fr 1fr;position:relative;border-radius:6px;overflow:hidden;
  background:linear-gradient(100deg,#8fa5bb 0%,#6f8aa6 22%,#2f4a6a 55%,#1a2e47 100%);padding-bottom:5px;scroll-margin-top:52px}
.hero::after{content:"";position:absolute;left:0;right:0;bottom:0;height:5px;background:#f26b1d}
.hc{padding:12px 14px 12px;min-width:0}
.hwind{grid-column:1 / -1}
.htide,.htemp{border-top:2px solid rgba(255,255,255,.3)}
.htemp{border-left:2px solid rgba(255,255,255,.3)}
.lab{margin:0;display:flex;justify-content:space-between;align-items:baseline;gap:8px;font:600 13px/1.2 'Barlow',sans-serif;color:rgba(255,255,255,.82);letter-spacing:.1em;text-transform:uppercase}
.live{letter-spacing:.02em;text-transform:none;font-size:13px;color:#fff;white-space:nowrap}
.live i{display:inline-block;width:8px;height:8px;border-radius:50%;background:#8df0a4;margin-right:6px}
.wrow{display:flex;align-items:center;gap:14px;margin-top:8px}
.num{font:700 104px/.86 'Barlow Condensed','Arial Narrow',sans-serif;letter-spacing:-.02em;color:#fff}
.num small{font:600 30px/1 'Barlow Condensed',sans-serif;color:rgba(255,255,255,.8);margin-left:4px;letter-spacing:0}
.side{display:flex;flex-direction:column;gap:5px;flex:1;min-width:0}
.force{font:700 32px/1 'Barlow Condensed',sans-serif;color:#fff;white-space:nowrap}
.fname{font:500 14px/1.1 'Barlow',sans-serif;color:rgba(255,255,255,.85)}
.gust{font:600 24px/1 'Barlow Condensed',sans-serif;color:rgba(255,255,255,.85)}
.gust b{color:#fff;font-weight:700}
.cmp{display:flex;flex-direction:column;align-items:center;gap:2px;flex:none}
.compass{width:86px;height:86px;display:block}
.dirl{font:700 30px/1 'Barlow Condensed',sans-serif;color:#fff}
.htide svg{margin-top:6px}
.next{margin-top:4px;font:700 26px/1 'Barlow Condensed',sans-serif;color:#fff;display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}
.next .k{color:rgba(255,255,255,.75);font-weight:600}
.next .in{color:#ffd34d;font-size:20px}
.trow{display:flex;flex-direction:column;gap:4px;margin-top:8px}
.v{font:700 64px/.9 'Barlow Condensed',sans-serif;color:#fff}
.v sup{font-size:40%;color:rgba(255,255,255,.8);vertical-align:top;margin-left:3px;position:relative;top:4px}
.sky{display:flex;align-items:center;gap:6px;font:600 20px/1 'Barlow Condensed',sans-serif;color:#fff}
.sky img{width:44px;height:44px;display:block}

/* shorter current-conditions panel */
.hc{padding:9px 14px 9px}
.wrow{margin-top:6px}
.num{font-size:88px}
.num small{font-size:26px}
.force{font-size:28px}
.gust{font-size:22px}
.compass{width:70px;height:70px}
.dirl{font-size:26px}
.htide svg{margin-top:2px}
.next{font-size:23px;margin-top:2px}
.next .in{font-size:18px}
.trow{flex-direction:row;align-items:center;gap:12px;margin-top:6px}
.v{font-size:56px}
.sky{flex-direction:column;gap:0;font-size:17px}
.sky img{width:36px;height:36px}
@media (min-width:900px){
  .hc{padding:10px 24px 11px}
  .wrow{margin-top:6px;gap:22px}
  .num{font-size:100px}.num small{font-size:32px}
  .force{font-size:34px}.gust{font-size:26px}
  .compass{width:88px;height:88px}
  .dirl{font-size:42px}
  .next{font-size:26px}.next .in{font-size:21px}
  .trow{flex-wrap:nowrap;gap:16px}
  .v{font-size:74px}
  .sky{font-size:20px}.sky img{width:46px;height:46px}
  .htide svg{max-width:260px}
}

/* sections */
.grid{display:grid;grid-template-columns:minmax(0,1fr);gap:22px;margin-top:22px}
.sec{min-width:0;scroll-margin-top:56px}
.sec > .lab{margin-bottom:8px;font-size:14px}
.plot{background:#fff;border-radius:6px;overflow:hidden}
.plot canvas{display:block;width:100%;height:auto}


/* station stepper, on the title line */
.labrow{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.labrow .lab{font-size:14px;white-space:nowrap}
.stp{display:flex;align-items:center}
.stp button{width:40px;height:44px;margin:-14px 0;border:0;background:none;color:#7fd7e8;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:6px;padding:0}
.stp button:hover{color:#fff}
.stp button:focus-visible{outline:2px solid #ffd34d;outline-offset:-8px}
.stname{min-width:108px;text-align:center;font:600 15px/1.2 'Barlow',sans-serif;color:#fff;white-space:nowrap}

/* week of tides: a white card like the forecast table */
.twk{display:flex;flex-direction:column;background:#fff;border-radius:6px;overflow:hidden;color:#111}
.tr{display:grid;grid-template-columns:58px repeat(4,minmax(0,1fr));align-items:stretch;border-bottom:1px solid #e3e7ec}
.tr:last-child{border-bottom:0}
.tr.today{background:#eaf1f8}
.tk{background:#f1f4f7;border-right:1px solid #cfd6de;padding:9px 6px 8px;font:600 14px/1 'Barlow',sans-serif;letter-spacing:.02em;color:#222}
.tk small{display:block;font:500 12px/1.2 'Barlow',sans-serif;letter-spacing:0;color:#555;margin-top:3px}
.tr.today .tk{background:#16324f;color:#fff;border-right-color:#16324f}
.tr.today .tk small{color:rgba(255,255,255,.85)}
.te{padding:9px 0 8px 8px;font:700 18px/1 'Barlow Condensed',sans-serif;color:#000;white-space:nowrap}
.te b{font-weight:600;color:#555;font-size:13px}
.te.hw b{color:#0b4f9e;font-weight:700}
.te small{display:block;font:500 12px/1.2 'Barlow',sans-serif;color:#555;margin-top:3px}
.te.past,.te.past b,.te.past small{color:#6b6b6b}

/* week strip */
.days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.cq a.day{display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 0 7px;min-height:44px;border-radius:6px;background:rgba(255,255,255,.07);color:#fff;text-decoration:none;overflow:hidden}
.cq a.day.sel{background:rgba(255,255,255,.2);box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.6)}
.dn{font:600 12px/1 'Barlow',sans-serif;letter-spacing:.03em;color:rgba(255,255,255,.88)}
.dd{display:none}
.day img{width:38px;height:38px;display:block}
.dw{font:700 24px/1 'Barlow Condensed',sans-serif}
.dw small{font:600 12px/1 'Barlow Condensed',sans-serif;color:rgba(255,255,255,.75)}
.dg{font:500 11px/1 'Barlow',sans-serif;color:rgba(255,255,255,.75)}
.dbar{width:70%;height:4px;border-radius:2px}
.dx{font:500 11px/1 'Barlow',sans-serif;color:rgba(255,255,255,.75)}

/* day summaries merged into the forecast card, as tabs above the table */
.fcard{background:#fff;border-radius:6px;overflow:hidden}
.cq .fcard .days{gap:0}
.cq .fcard a.day{background:#eef2f6;color:#000;border-radius:0;border-left:1px solid #d5dbe2;border-bottom:1px solid #cfd6de;padding:9px 0 8px}
.cq .fcard a.day:first-child{border-left:0}
.cq .fcard a.day:hover{background:#f7f9fb}
.cq .fcard a.day.sel{background:#fff;box-shadow:inset 0 4px 0 #f26b1d;border-bottom-color:#fff}
.fcard .dn{color:#222}
.fcard .dd,.fcard .dg,.fcard .dx,.fcard .dw small{color:#555}
.fcard .fcwrap{margin-top:0;border-radius:0}

/* compact day tabs */
.cq .fcard a.day{gap:1px;padding:7px 0 6px}
.fcard .day img{width:30px;height:30px}
.fcard .dw{font-size:21px}
.fcard .dbar{margin:2px 0 1px}
@media (min-width:620px){
  .cq .fcard a.day{display:grid;grid-template-columns:auto auto;justify-content:center;align-items:center;column-gap:8px;row-gap:1px;padding:8px 4px 7px}
  .fcard .dn{justify-self:end;font-size:14px}
  .fcard .dd{justify-self:start;font-size:13px}
  .fcard .day img{grid-column:1;grid-row:2 / 4;justify-self:end;width:40px;height:40px}
  .fcard .dw{grid-column:2;grid-row:2;justify-self:start;font-size:26px;align-self:end}
  .fcard .dg{grid-column:2;grid-row:3;justify-self:start;align-self:start;font-size:12px}
  .fcard .dbar{grid-column:1 / -1;justify-self:center;margin:3px 0 2px}
  .fcard .dx{grid-column:1 / -1;justify-self:center;font-size:12px}
}

/* forecast table */
.fcwrap{margin-top:10px;background:#fff;border-radius:6px;overflow-x:auto;-webkit-overflow-scrolling:touch;color:#111}
.fc{border-collapse:separate;border-spacing:0;font:600 14px/1.1 'Barlow',sans-serif}
.fc td,.fc th{padding:5px 0;text-align:center;min-width:46px;border-bottom:1px solid #e3e7ec}
.fc tbody tr:last-child td,.fc tbody tr:last-child th{border-bottom:0}
.fc .rl{position:sticky;left:0;z-index:2;background:#f1f4f7;min-width:58px;padding:5px 6px;text-align:left;font:600 12px/1.1 'Barlow',sans-serif;color:#333;border-right:1px solid #cfd6de}
.fc .rl small{font-weight:500;color:#555}
.fc .dh{background:#16324f;color:#fff;text-align:left;font:600 14px/1 'Barlow',sans-serif;letter-spacing:.03em;padding:8px 0;border-left:2px solid #fff;border-bottom:0;scroll-margin-left:60px}
.fc .dh span{position:sticky;left:68px;padding:0 10px;white-space:nowrap}
.fc thead .rl{background:#16324f;border-right-color:#16324f}
.fc td.ds{border-left:2px solid #16324f}
.fc .tm{font:500 12px/1 'Barlow',sans-serif;color:#444}
.fc img{width:30px;height:30px;display:block;margin:0 auto}
.fc .ar{width:16px;height:16px;display:block;margin:0 auto 1px}
.fc .wk{display:block;font:700 19px/1 'Barlow Condensed',sans-serif;color:#000}
.fc .dir{display:block;font:500 10px/1.2 'Barlow',sans-serif;color:#555}
.fc .fb{display:block;height:4px;margin:3px 5px 0;border-radius:2px}
.fc .wet{color:#0b4f9e;font-weight:700}
.fc .dry{color:#555;font-weight:500}

/* map */
.mapwrap{position:relative;border-radius:6px;overflow:hidden;background:#0e1a28;aspect-ratio:1073 / 1126}
.osm{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.overlay{position:absolute;inset:0;width:100%;height:100%}
.streak{stroke:#0b3a66;stroke-width:4.6;stroke-linecap:round;fill:none;opacity:.6;stroke-dasharray:12 18;animation:sscflow 1.8s linear infinite}
.streak.sea{stroke:#083055;opacity:.72;stroke-width:5.2;stroke-dasharray:16 18}
@keyframes sscflow{to{stroke-dashoffset:-30}}
@media (prefers-reduced-motion:reduce){.streak{animation:none}}
.slider{margin-top:10px;background:rgba(255,255,255,.07);border-radius:6px;padding:10px 12px 8px}
.mapline{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:2px 8px;min-height:24px}
.mapline .stp{margin-left:-10px}
.mapline .stp button{width:34px}
.mapline .stname{min-width:82px}
.stp button.off{color:rgba(255,255,255,.3);cursor:default}
.slider label{display:block;font:600 15px/1.2 'Barlow',sans-serif;color:#fff;white-space:nowrap}
.slider input{display:block;width:100%;height:36px;margin:2px 0 0;accent-color:#f26b1d}
.sl{display:flex;justify-content:space-between;font:500 12px/1 'Barlow',sans-serif;color:rgba(255,255,255,.72)}

.foot{margin-top:26px;padding-top:14px;border-top:1px solid rgba(255,255,255,.18);font:500 12px/1.45 'Barlow',sans-serif;color:rgba(255,255,255,.72)}
.foot p{margin:0 0 6px}

/* ---------- from large phone / tablet up ---------- */
@media (min-width:620px){
  .site{padding:0 20px 28px}
  .jump{margin:0 -20px;padding:0 20px}
  .jump a{flex:none;padding:0 22px}
  .grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px 16px}
  .s24,.sfc,.smap,.stw{grid-column:1 / -1}
  .s24{order:-1}
  .dd{display:block;font:500 12px/1 'Barlow',sans-serif;color:rgba(255,255,255,.72)}
  .dn{font-size:14px}
  .day img{width:48px;height:48px}
  .dw{font-size:30px}
  .dg,.dx{font-size:13px}
  .days{gap:8px}
  .fc td,.fc th{min-width:52px}
}

/* ---------- desktop ---------- */
@media (min-width:900px){
  .name{font-size:34px}.place{font-size:15px}
  .logo{width:60px;height:60px}
  .clock{font-size:26px}.sun,.moon{font-size:14px}
  .hero{grid-template-columns:2.2fr 1.1fr 1fr}
  .hwind{grid-column:auto}
  .hc{padding:14px 24px 16px}
  .htide,.htemp{border-top:0;border-left:0;position:relative}
  .htide::before,.htemp::before{content:"";position:absolute;left:0;top:20px;bottom:20px;width:2px;background:rgba(255,255,255,.45)}
  .lab{font-size:15px}
  .num{font-size:128px}.num small{font-size:40px}
  .force{font-size:40px}.fname{font-size:16px}.gust{font-size:30px}
  .wrow{gap:24px;margin-top:10px}
  .side{flex:none}
  .cmp{flex-direction:row;gap:12px;margin-left:16px}
  .compass{width:112px;height:112px}
  .dirl{font-size:50px}
  .next{font-size:30px}.next .in{font-size:24px}
  .v{font-size:92px}
  .trow{flex-direction:row;align-items:center;gap:18px;flex-wrap:wrap}
  .sky{font-size:24px}.sky img{width:60px;height:60px}
  .grid{grid-template-columns:minmax(0,.625fr) minmax(0,.625fr) minmax(0,1fr);grid-template-areas:"w24 w24 map" "w1h tide map" "fc fc fc" "tw tw tw";align-items:start}
  .s24{grid-area:w24;order:0}.s1h{grid-area:w1h}.stide{grid-area:tide}.smap{grid-area:map}.sfc{grid-area:fc}.stw{grid-area:tw}
  .sec > .lab,.labrow .lab{font-size:15px}
  .labrow.wide{justify-content:flex-start;gap:24px}
  .twk{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
  .tr{display:flex;flex-direction:column;align-items:center;text-align:center;border-bottom:0;border-left:1px solid #dfe4ea;padding-bottom:6px}
  .tr:first-child{border-left:0}
  .tk,.tr.today .tk{align-self:stretch;background:#16324f;color:#fff;border-right:0;padding:9px 0;font-size:15px;margin-bottom:4px}
  .tk small{display:inline;margin-left:8px;font-size:13px;color:rgba(255,255,255,.85)}
  .te{align-self:stretch;padding:9px 0 8px;font-size:22px}
  .te b{font-size:15px}
  .te small{font-size:13px}
}

/* ---------- production additions: stale states, focus, hidden ---------- */
[hidden]{display:none!important}
.jump a:focus-visible{outline:2px solid #ffd34d;outline-offset:-4px}
.live.off{color:rgba(255,255,255,.85)}
.live.off i{background:rgba(255,255,255,.4)}
.stale .num,.stale .force,.stale .fname,.stale .gust,.stale .gust b,.stale .dirl,.stale .v,.stale .next,.stale .next .in{color:rgba(255,255,255,.4)}
.stale .num small,.stale .v sup{color:rgba(255,255,255,.3)}
.stale .needle,.stale .sky{opacity:.35}
.snote{font:600 13px/1.2 'Barlow',sans-serif;color:#f0a070;white-space:nowrap}
.sec.stale .plot{opacity:.45}
.smap.stale .mapwrap{opacity:.45}

/* ---------- amendment, 3 Dec 2026 (Chris): the weather symbol and its short text sit in the current-conditions
   cell, to the right of the compass, not beside the temperature. Symbol above text, so it stays narrow. ---------- */
.wrow .sky{flex:none;flex-direction:column;align-items:center;gap:2px;text-align:center;line-height:1.05;max-width:72px;font-size:15px}
.hwind.stale .sky{opacity:1}
@media (min-width:620px){ .wrow .sky{max-width:120px;font-size:18px;margin-left:8px} .wrow .sky img{width:44px;height:44px} }
@media (min-width:900px){ .wrow .sky{max-width:130px;font-size:22px;margin-left:12px} .wrow .sky img{width:60px;height:60px} }
/* With the symbol in it the wind cell needs about 650 px, so the three cells only sit in one row from 1250 px;
   between 900 and 1249 px the banner keeps the tablet arrangement (wind across, tide and temperature beneath). */
@media (min-width:900px) and (max-width:1249px){
  .hero{grid-template-columns:1fr 1fr}
  .hwind{grid-column:1 / -1}
  .htide,.htemp{border-top:2px solid rgba(255,255,255,.3)}
  .htemp{border-left:2px solid rgba(255,255,255,.3)}
  .htide::before,.htemp::before{display:none}
}
@media (min-width:1250px){ .hero{grid-template-columns:minmax(0,2.75fr) minmax(0,1.25fr) minmax(0,1fr)} }
/* Room for the symbol: on a phone the wind figures, compass and symbol share about 310 px, so each gives a little;
   in the one-row desktop banner the gaps close up. Worst case fitted: two-digit wind, WSW, "Heavy rain showers". */
@media (max-width:619px){
  .wrow{gap:8px}
  .num{font-size:80px}.num small{font-size:24px}
  .force{font-size:26px}.gust{font-size:20px}
  .compass{width:62px;height:62px}
  .wrow .sky{max-width:58px;font-size:13px}.wrow .sky img{width:32px;height:32px}
}
@media (max-width:374px){ .num{font-size:72px}.force{font-size:24px}.gust{font-size:19px} }
@media (min-width:1250px){ .wrow{gap:16px} .cmp{margin-left:6px} .wrow .sky{margin-left:0;max-width:100px} }

/* ---------- amendment, 3 Dec 2026 (Chris): the temperature is centred in its cell, and the compass and the weather
   symbol are spaced out across the room left in the wind cell (the wind figures stay grouped at the left).
   The spare width is shared between the gaps, so when there is none (worst case) everything still fits. ---------- */
.htemp{display:flex;flex-direction:column}
.htemp .trow{flex:1;justify-content:center;align-items:center;margin-top:0}
.wrow{max-width:720px}
.wrow .side{flex:0 1 auto}
.wrow .cmp{margin-left:auto}
.wrow .sky{margin-left:auto}
@media (min-width:620px){ .wrow .sky{margin-right:auto} }
