/* app.css — shared design system: tokens, theme, base elements, form controls.
   Linked by index.html, trip.html, trips.html BEFORE their page-specific <style>.
   Page-specific + intentionally-denser component rules stay inline in each file. */

:root{
  --accent:#a8412a; --accent2:#2a6b6b;
  --bg:#f4f1ea; --panel:#fffdf8; --ink:#23201c; --muted:#726a5e; --line:#ddd5c7;
  --chip:#eee8db; --score:#8a7f6d; --score-bg:#e7e0d1;
  --xp1:#4f8f5a; --xp2:#c8a13a; --xp3:#d8792f; --xp4:#b5382a;
  --sig:#a8412a; --off:#2a6b6b;
  --cand:#8a7f6d; --short:#c8912f; --lock:#4f8f5a; --cut:#b5382a;
  --ok:#4f8f5a; --tight:#c8912f; --over:#b5382a;
  --shadow:0 1px 3px rgba(0,0,0,.08),0 6px 18px rgba(0,0,0,.05);
  --serif:"Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif;
  --sans:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --mono:ui-monospace,"SF Mono",Menlo,Consolas,monospace;
}
@media (prefers-color-scheme:dark){:root{
  --bg:#1a1815;--panel:#242019;--ink:#ece5d8;--muted:#a79c89;--line:#39332a;
  --chip:#302a21;--score:#b6a98f;--score-bg:#322c22;
}}
:root[data-theme="dark"]{--bg:#1a1815;--panel:#242019;--ink:#ece5d8;--muted:#a79c89;--line:#39332a;--chip:#302a21;--score:#b6a98f;--score-bg:#322c22;}
:root[data-theme="light"]{--bg:#f4f1ea;--panel:#fffdf8;--ink:#23201c;--muted:#726a5e;--line:#ddd5c7;--chip:#eee8db;--score:#8a7f6d;--score-bg:#e7e0d1;}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--sans);line-height:1.45}
h1,h2,h3{font-family:var(--serif);font-weight:600;margin:0}
a{color:var(--accent)}
header.top .grow{flex:1}
.v-ok{color:var(--ok)}
.v-tight{color:var(--tight)}
.v-over{color:var(--over)}
.bdg.cat{background:color-mix(in srgb,var(--accent2) 16%,transparent);color:var(--accent2)}
.bdg.sig{background:var(--sig);color:#fff}
.bdg.off{background:var(--off);color:#fff}
.expo[data-x="1"] i:nth-child(-n+1),.expo[data-x="2"] i:nth-child(-n+2),.expo[data-x="3"] i:nth-child(-n+3),.expo[data-x="4"] i:nth-child(-n+4){background:var(--xp)}
.expo[data-x="1"]{--xp:var(--xp1)}
.expo[data-x="2"]{--xp:var(--xp2)}
.expo[data-x="3"]{--xp:var(--xp3)}
.expo[data-x="4"]{--xp:var(--xp4)}
.leaflet-container{background:#aadaff;font-family:var(--sans)}
.leaflet-popup-content{font-size:.82rem}

/* form controls + base text (canonical — was drifting per-page, the B29 bug) */
select,input,button{font-family:var(--sans);font-size:.85rem;color:var(--ink);background:var(--panel);border:1px solid var(--line);border-radius:7px;padding:5px 8px}
button{cursor:pointer}
.sub{color:var(--muted);font-size:.85rem}

/* B46: a card's photo links to its 📖 learn page. display:contents means the <a> generates no box,
   so every image keeps its existing layout (flex sizing, the board card's negative-margin bleed, gallery grid). */
a.imglink{display:contents}
a.imglink img,a.imglink .noimg{cursor:pointer;transition:opacity .12s}
a.imglink img:hover,a.imglink .noimg:hover{opacity:.9}
