/*
VOICE: a field card: calm, exact, readable in rain with cold hands.
IDEA: the printed Cordova checklist's weekly bar chart, carried in a pocket.
PICTURE: each bird's 48-week abundance bar, with a marker on today's week.
COLOUR and TYPE: harbour-blue band, white paper, the checklist's yellow-to-red bars; Atkinson Hyperlegible, Fraunces for the name.
LAYOUT: sticky search on top, one list, bottom tabs within thumb reach.
*/
:root{color-scheme:light dark;
--bg:light-dark(#ffffff,#0c1822);--ink:light-dark(#13202b,#e6edf2);--mute:light-dark(#5b6873,#9fb0bd);
--line:light-dark(#e3e8ec,#1f3141);--card:light-dark(#f3f6f8,#132433);--band:#13324a;--band2:#1d4a6b;
--acc:#d9463f;--t0:light-dark(#a9dcd7,#2a6a6e);--t1:light-dark(#86cbc5,#327c80);--t2:light-dark(#5db5af,#3c9195);--t3:light-dark(#379b98,#4caaab);--t4:light-dark(#1c7f81,#66c3c0);--t5:light-dark(#0f666c,#8ad8d2);--t6:light-dark(#08505a,#bdeee8);--now:#f2b632;--shape:light-dark(#1d4a6b,#8fc3ea);
--h0:light-dark(#bcd5e8,#1c3a52);--h1:light-dark(#9cc0de,#24557a);--h2:light-dark(#86b0d6,#2f71a0);--h3:light-dark(#5a8fc2,#4a8fc0);--h4:light-dark(#3570a8,#6fadd8);--h5:light-dark(#1d528a,#9cccec);--h6:light-dark(#0d355f,#d3ebfa);--mline:light-dark(#d5dde3,#253d50);--ok:#2e7d4f;--warn:#b7541a;
--l0:#f2c744;--l1:#f1b33e;--l2:#ef9a3c;--l3:#e9763a;--l4:#d9463f;--l5:#c41f3b;--l6:light-dark(#231f20,#f4efe9);
--cas:#5b80a8;--accd:#d9463f;--uns:#8a8f94}
:root[data-theme=light]{color-scheme:light}:root[data-theme=dark]{color-scheme:dark}
*{box-sizing:border-box;min-width:0}
html{-webkit-text-size-adjust:100%}
[hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--ink);font:17px/1.45 "Atkinson Hyperlegible",system-ui,-apple-system,"Segoe UI",sans-serif;overflow-x:clip;padding-bottom:calc(72px + env(safe-area-inset-bottom))}
button,input,select,textarea{font:inherit;color:inherit}
a{color:inherit}
h1,h2,h3{margin:0;line-height:1.1;text-wrap:balance}
.top{position:sticky;top:0;z-index:5;background:var(--band);color:#fff;padding:calc(6px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left))}
.brand{display:flex;align-items:baseline;gap:10px;justify-content:space-between}
.top h1{font:600 19px/1.15 Fraunces,Georgia,serif;letter-spacing:.2px;white-space:nowrap}
.wk{margin:0;font-size:13px;color:#c9dbe8;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tabs a{position:relative}.badge{position:absolute;top:4px;left:calc(50% + 6px);min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:var(--acc);color:#fff;font-size:12px;line-height:20px;text-align:center}
.searchrow{margin-top:6px;display:flex;gap:6px}
#q{width:100%;min-height:38px;height:38px;border-radius:10px;border:0;padding:0 14px;font-size:17px;background:#fff;color:#13202b}
#q:focus-visible{outline:3px solid #f2c744}
main{max-width:760px;margin:0 auto;padding:0 0 20px}
main:focus{outline:none}
.tabs{position:fixed;left:0;right:0;bottom:0;z-index:6;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));background:var(--bg);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
.tabs a{display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 2px 9px;font-size:12.5px;text-decoration:none;color:var(--mute);min-height:58px}
.tabs svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tabs a[aria-current=page]{color:var(--band2);font-weight:700}
:root[data-theme=dark] .tabs a[aria-current=page]{color:#8fc3ea}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]) .tabs a[aria-current=page]{color:#8fc3ea}}
.bar-sec{padding:14px 16px 6px}
.bar-sec h2{font:600 24px/1.15 Fraunces,Georgia,serif}
.lede{margin:6px 0 0;color:var(--mute);font-size:15.5px}
.chips{display:flex;gap:8px;overflow-x:auto;padding:10px 16px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;border:1px solid var(--line);background:var(--card);border-radius:999px;padding:0 14px;min-height:40px;font-size:15px;white-space:nowrap}
.chip[aria-pressed=true]{background:var(--band);border-color:var(--band);color:#fff}
.gh{position:sticky;top:var(--toph,118px);z-index:2;background:var(--bg);margin:0;padding:12px 16px 4px;font:700 13.5px/1.2 inherit;color:var(--mute);border-bottom:1px solid var(--line)}
ul.birds{list-style:none;margin:0;padding:0;position:relative}
/* faint month lines running down through the list, lined up with the bars and the month ruler */
ul.birds::before{content:'';position:absolute;top:0;bottom:0;left:52px;right:14px;pointer-events:none;z-index:0;
  background-image:linear-gradient(to right,var(--mline) 1px,transparent 1px);background-size:calc(100% / 12) 100%;background-repeat:repeat-x}
.b{position:relative;z-index:1}
.b{display:grid;grid-template-columns:52px minmax(0,1fr);align-items:center;border-bottom:1px solid var(--line)}
.ck{width:52px;height:56px;border:0;background:none;display:flex;align-items:center;justify-content:flex-end;padding:0 6px 0 0;overflow:visible;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none;touch-action:manipulation}
.ck span{min-width:30px;height:30px;padding:0 5px;border:2px solid var(--mute);border-radius:8px;display:grid;place-items:center;font-size:15px;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
.ck[aria-pressed=true] span{background:var(--ok);border-color:var(--ok);color:#fff}
.bm{display:block;text-align:left;border:0;background:none;padding:9px 14px 9px 0;width:100%}
.bn{display:flex;align-items:baseline;gap:8px;justify-content:space-between}
.bn b{font-weight:700;font-size:17px}
.ab{font-size:13.5px;color:var(--mute);white-space:nowrap}
.ab.r{color:var(--acc);font-weight:700}
.mini{display:block;width:100%;height:12px;margin-top:5px}
.rc{display:flex;gap:4px;margin-top:6px;flex-wrap:wrap}
.rc i{font-style:normal;font-size:12.5px;border-radius:6px;padding:1px 7px;background:var(--card);color:var(--mute)}
.rc i.C{background:var(--cas);color:#fff}.rc i.A{background:var(--accd);color:#fff}.rc i.U{background:var(--uns);color:#fff}
.rc i.now{outline:2px solid var(--ink);outline-offset:1px}
.empty{padding:28px 18px;color:var(--mute);text-align:center}
.hero{position:relative;height:150px;background:#2a3d4c center 35%/cover;margin-bottom:4px}
.hero::after{content:'';position:absolute;inset:0;background:linear-gradient(transparent 30%,#0b1c2bcc)}
.hero p{z-index:1;position:absolute;left:16px;right:16px;bottom:12px;margin:0;color:#fff;font-size:15px;text-shadow:0 1px 6px #0009}
.hero p b{display:block;font:600 26px/1.1 Fraunces,Georgia,serif}
.stat{display:flex;gap:10px;padding:12px 16px}
.stat div{flex:1;background:var(--card);border-radius:12px;padding:10px 12px}
.stat b{display:block;font-size:24px;line-height:1.1}
.stat span{font-size:13.5px;color:var(--mute)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:12px;min-height:46px;padding:0 16px;background:var(--band);color:#fff;font-weight:700;font-size:16px;text-decoration:none}
.btn.alt{background:var(--card);color:var(--ink);border:1px solid var(--line)}
.btn.danger{background:none;color:var(--acc);border:1px solid var(--acc)}
.btn:focus-visible,.chip:focus-visible,.ck:focus-visible,.bm:focus-visible,.tabs a:focus-visible{outline:3px solid #f2a33c;outline-offset:2px}
.row{display:flex;gap:10px;flex-wrap:wrap;padding:8px 16px}
.row .btn{flex:1 1 140px}
.card{margin:10px 16px;padding:14px;border-radius:14px;background:var(--card)}
.card h3{font-size:18px;margin-bottom:6px}
.card p{margin:6px 0}
.flag{margin:10px 16px;padding:12px 14px;border-radius:12px;background:light-dark(#fdeee9,#3a1c18);border-left:5px solid var(--acc);font-size:15.5px}
label.f{display:block;margin:10px 0 0;font-size:14.5px;color:var(--mute)}
label.f input,label.f select,label.f textarea{display:block;width:100%;margin-top:4px;min-height:46px;border-radius:10px;border:1px solid var(--line);background:var(--bg);padding:8px 12px;font-size:16px}
.two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.tl{list-style:none;margin:0;padding:0}
.tl li{display:flex;justify-content:space-between;gap:10px;align-items:center;border-bottom:1px solid var(--line);padding:10px 16px}
.tl li button.bm{padding:4px 0}
.cnt{display:flex;align-items:center;gap:4px}
.cnt button{width:40px;height:40px;border-radius:10px;border:1px solid var(--line);background:var(--card);font-size:20px;font-weight:700}
.cnt input{width:56px;height:40px;text-align:center;border-radius:10px;border:1px solid var(--line);background:var(--bg);font-size:16px}
.sheet{position:fixed;inset:0;z-index:10;display:flex;align-items:flex-end;justify-content:center}
.sheetbg{position:absolute;inset:0;background:#0008}
.sheetbody{position:relative;width:100%;max-width:760px;max-height:90vh;overflow:auto;background:var(--bg);border-radius:18px 18px 0 0;padding:16px 16px calc(20px + env(safe-area-inset-bottom));animation:up .22s ease-out}
@keyframes up{from{transform:translateY(40px);opacity:.4}}
@media (prefers-reduced-motion:reduce){.sheetbody{animation:none}}
.sh{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.sh h2{font:600 26px/1.1 Fraunces,Georgia,serif}
.sci{font-style:italic;color:var(--mute);margin:4px 0 0}
.x{border:0;background:var(--card);border-radius:999px;width:44px;height:44px;font-size:22px;flex:none}
.big{display:block;width:100%;height:120px;margin:14px 0 4px}
.photo{margin:12px 0 0}
.gal{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;margin-top:12px}
.gal .photo{flex:0 0 100%;scroll-snap-align:start;margin:0}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;padding:8px 16px}
.tile{border:0;padding:0;background:var(--card);border-radius:12px;overflow:hidden;text-align:left}
.tile img{display:block;width:100%;aspect-ratio:1;object-fit:cover}
.tile span{display:block;padding:6px 8px;font-size:14px;font-weight:700}
.cam{width:16px;height:16px;vertical-align:-2px;fill:none;stroke:var(--mute);stroke-width:2}
.photo img{width:100%;border-radius:12px;display:block}
.photo figcaption{font-size:13px;color:var(--mute);margin-top:4px}
.legend{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;align-items:center;margin:8px 0 2px}
.legend i{display:block;border-radius:2px}
.legend+div{display:flex;justify-content:space-between;font-size:13px;color:var(--mute)}
.toast{position:fixed;left:50%;top:calc(12px + env(safe-area-inset-top));transform:translateX(-50%);background:#13202b;color:#fff;padding:10px 16px;border-radius:12px;font-size:15px;opacity:0;pointer-events:none;transition:opacity .2s;max-width:90vw;z-index:20}
.toast.on{opacity:1}
.note{font-size:14px;color:var(--mute)}
pre.out{white-space:pre-wrap;background:var(--card);border-radius:10px;padding:10px;font-size:13.5px;max-height:220px;overflow:auto}
@media print{
  .top,.tabs,.toast,.noprint{display:none!important}
  body{padding:0;background:#fff;color:#000}
  .sheet{position:static}.sheetbg{display:none}.sheetbody{max-height:none;box-shadow:none;animation:none}
}
.tog{display:flex;gap:12px;align-items:flex-start;margin:14px 0 0;font-size:15.5px}
.tog input{width:24px;height:24px;flex:none;margin:1px 0 0;accent-color:var(--band2)}
.tile small{font-weight:400;font-size:13px}
.ruler{margin:6px calc(-1 * max(12px,env(safe-area-inset-right))) 0 calc(-1 * max(12px,env(safe-area-inset-left)));background:var(--band2)}
.rin{max-width:760px;margin:0 auto;padding:3px 14px 2px 52px}
.key{display:flex;align-items:center;gap:2px;font-size:11.5px;line-height:1;color:var(--mute);margin:0 0 3px;height:17px;background:var(--bg);border-radius:5px;padding:0 6px}
.key span{flex:none;margin:0 4px}.key span:first-child{margin-left:0}.key span:last-child{margin-right:0}
.key i{display:block;flex:1;border-radius:1px}
.k0{height:3px;background:var(--l0)}.k1{height:4px;background:var(--l1)}.k2{height:6px;background:var(--l2)}.k3{height:8px;background:var(--l3)}.k4{height:9px;background:var(--l4)}.k5{height:11px;background:var(--l5)}.k6{height:12px;background:var(--l6)}
.mon{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));font-size:11.5px;line-height:15px;font-weight:700;color:#fff;text-align:center}
.mon span{border-left:1px solid #ffffff40}.mon span:first-child{border-left:0}
.mon span.cur{background:var(--now);color:#13202b;border-radius:3px}
/* key follows the chosen bar style */
:root[data-bars=shape] .key i{background:var(--shape)}
:root[data-bars=heat] .key i{height:11px}
:root[data-bars=heat] .k0{background:var(--h0)}:root[data-bars=heat] .k1{background:var(--h1)}:root[data-bars=heat] .k2{background:var(--h2)}:root[data-bars=heat] .k3{background:var(--h3)}:root[data-bars=heat] .k4{background:var(--h4)}:root[data-bars=heat] .k5{background:var(--h5)}:root[data-bars=heat] .k6{background:var(--h6)}
/* this week: one amber band running down the list, the same colour as the month highlight */
ul.birds::after{content:'';position:absolute;top:0;bottom:0;pointer-events:none;z-index:2;
  left:calc(52px + (100% - 66px) * var(--wk) / 48);width:calc((100% - 66px) / 48 + 1px);background:var(--now);opacity:.4}
:root[data-bars=shape] .key i,:root[data-bars=blend] .key i{border-radius:4px}
:root[data-bars=blend] .k0{background:var(--t0)}:root[data-bars=blend] .k1{background:var(--t1)}:root[data-bars=blend] .k2{background:var(--t2)}:root[data-bars=blend] .k3{background:var(--t3)}:root[data-bars=blend] .k4{background:var(--t4)}:root[data-bars=blend] .k5{background:var(--t5)}:root[data-bars=blend] .k6{background:var(--t6)}
.ex{position:relative;padding:2px 0}
.ex::after{content:'';position:absolute;top:0;bottom:0;left:calc(100% * var(--wk) / 48);width:calc(100% / 48);background:var(--now);opacity:.4}
.mini{touch-action:pan-y}
.big{touch-action:pan-y}
.scrubtip{position:fixed;z-index:30;pointer-events:none;background:#13202b;color:#fff;border-radius:10px;padding:6px 10px;font-size:14px;line-height:1.25;box-shadow:0 4px 14px #0004;white-space:nowrap}
.scrubtip b{display:block;font-size:13px;color:#f2c744}
.scrubtick{position:fixed;z-index:29;pointer-events:none;width:2px;background:#13202b;outline:1px solid #fff}
.cntbig{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:16px}
.cntbig button{width:64px;height:64px;border-radius:16px;border:1px solid var(--line);background:var(--card);font-size:30px;font-weight:700}
.cntbig input{width:130px;height:64px;text-align:center;font-size:32px;font-weight:700;border-radius:16px;border:2px solid var(--band2);background:var(--bg)}
.ck span.long{font-size:13px;padding:0 3px}
.ib{flex:none;width:40px;height:38px;border-radius:10px;border:0;background:#ffffff26;color:#fff;display:grid;place-items:center;padding:0}
.ib svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ib.on{background:var(--acc);animation:pulse 1.2s ease-in-out infinite}
@keyframes pulse{50%{box-shadow:0 0 0 6px #d9463f44}}
@media (prefers-reduced-motion:reduce){.ib.on{animation:none}}
.ib:focus-visible{outline:3px solid #f2c744}
