/* Modern theme — shared base. Everything is scoped to html.theme-modern so Classic is untouched. */
html.theme-modern{--m-bg:#f7f8fa;--m-surface:#fff;--m-surface2:#f1f3f6;--m-ink:#0f172a;--m-ink2:#475569;--m-line:#e5e7eb;--m-radius:16px;--m-shadow:0 1px 2px rgba(15,23,42,.04),0 8px 24px rgba(15,23,42,.06);--m-shadow-h:0 2px 4px rgba(15,23,42,.06),0 16px 40px rgba(15,23,42,.10);--m-font:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color-scheme:light}
html.m-dark.theme-modern{--m-bg:#0b1020;--m-surface:#131a2b;--m-surface2:#1b2438;--m-ink:#e8edf5;--m-ink2:#a6b0c3;--m-line:#253049;--m-shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.35);--m-shadow-h:0 16px 40px rgba(0,0,0,.5);color-scheme:dark}
.theme-modern body{font-family:var(--m-font);background:var(--m-bg);color:var(--m-ink);-webkit-font-smoothing:antialiased;letter-spacing:-.003em}
.theme-modern h1,.theme-modern h2,.theme-modern h3,.theme-modern h4,.theme-modern legend,.theme-modern .logo,.theme-modern .stat,.theme-modern .q legend{font-family:var(--m-font)!important;letter-spacing:-.025em;color:var(--m-ink)}
.theme-modern h1{font-weight:800;letter-spacing:-.035em;line-height:1.05}.theme-modern h2{font-weight:700}.theme-modern h3{font-weight:650}
.theme-modern a{color:var(--m-link);text-underline-offset:3px;text-decoration-thickness:1px}
.theme-modern .meta,.theme-modern .sub,.theme-modern .src,.theme-modern .hint{color:var(--m-ink2)}
/* header */
.theme-modern .nav{background:color-mix(in srgb,var(--m-bg) 78%,transparent);backdrop-filter:saturate(180%) blur(14px);-webkit-backdrop-filter:saturate(180%) blur(14px);border-bottom:1px solid transparent;padding:.7rem 5vw;transition:border-color .2s,box-shadow .2s}
.theme-modern .nav.scrolled{border-bottom-color:var(--m-line);box-shadow:0 4px 20px rgba(15,23,42,.05)}
.theme-modern .logo{font-weight:800;color:var(--m-ink)}
.theme-modern .nav nav a,.theme-modern .dd-btn{color:var(--m-ink2);font-weight:500;border-radius:999px;padding:.4rem .75rem;margin-left:.1rem;transition:background .15s,color .15s;border-bottom:0!important}
.theme-modern .nav nav a:hover,.theme-modern .dd-btn:hover{background:var(--m-surface2);color:var(--m-ink)}
.theme-modern .nav nav a[aria-current]{background:var(--m-accent-soft);color:var(--m-accent-ink)}
.theme-modern .dd-btn{background:transparent;border:0;font:inherit;cursor:pointer}
.theme-modern .dd-menu{background:var(--m-surface)!important;border:1px solid var(--m-line)!important;border-radius:14px!important;box-shadow:var(--m-shadow-h)!important;padding:.4rem!important}
.theme-modern .dd-menu a{border-radius:10px}
/* layout */
.theme-modern .wrap{padding-top:clamp(2.5rem,1.5rem + 3vw,5rem);padding-bottom:clamp(1.5rem,1rem + 2vw,3rem)}
.theme-modern .eyebrow{color:var(--m-accent-ink);font-weight:700;letter-spacing:.14em;font-size:.74rem}
/* cards */
.theme-modern .card,.theme-modern .gform fieldset,.theme-modern .ratings{background:var(--m-surface);border:1px solid var(--m-line);border-radius:var(--m-radius);box-shadow:var(--m-shadow);padding:1.4rem 1.5rem;color:var(--m-ink);transition:transform .2s,box-shadow .2s}
.theme-modern a.card:hover,.theme-modern .path:hover,.theme-modern .dir-list a.card:hover{transform:translateY(-2px);box-shadow:var(--m-shadow-h);outline:0}
.theme-modern .grid,.theme-modern .grid4{gap:1.25rem}
/* buttons */
.theme-modern .btn{background:var(--m-accent);color:var(--m-on-accent);border-radius:999px;padding:.75rem 1.35rem;font-weight:600;font-family:var(--m-font);box-shadow:0 1px 2px rgba(0,0,0,.08),0 4px 14px color-mix(in srgb,var(--m-accent) 30%,transparent);transition:transform .15s,box-shadow .15s,filter .15s}
.theme-modern .btn:hover{transform:translateY(-1px);filter:brightness(1.06)}
.theme-modern .btn.ghost{background:color-mix(in srgb,currentColor 6%,transparent);border:1px solid color-mix(in srgb,currentColor 35%,transparent);box-shadow:none}
/* forms and tables */
.theme-modern input,.theme-modern select,.theme-modern textarea{font-family:var(--m-font);border-radius:10px!important;border:1px solid var(--m-line)!important;background:var(--m-surface)!important;color:var(--m-ink)}
.theme-modern input:focus,.theme-modern select:focus,.theme-modern textarea:focus{outline:3px solid var(--m-accent-soft);border-color:var(--m-accent)!important}
.theme-modern :focus-visible{outline:3px solid var(--m-accent)!important;outline-offset:2px}
.theme-modern table{background:var(--m-surface);border-radius:12px;overflow:hidden;box-shadow:0 0 0 1px var(--m-line)}
.theme-modern th{background:var(--m-surface2);font-weight:600;font-size:.86rem;color:var(--m-ink2)}.theme-modern td,.theme-modern th{border-bottom:1px solid var(--m-line)}
.theme-modern .notice{background:var(--m-accent-soft);border:0;border-left:4px solid var(--m-accent);border-radius:12px;color:var(--m-ink)}
.theme-modern .badge,.theme-modern .tag,.theme-modern .chip{border-radius:999px}
/* footer */
.theme-modern footer{background:var(--m-footer);color:#cbd5e1;border-top:1px solid var(--m-line)}
.theme-modern footer a{color:#fff}
/* theme switch (both themes) */
.theme-switch{text-align:center;font:500 .85rem system-ui,sans-serif;padding:.9rem 1rem 1.2rem;color:#667}
.theme-switch button{font:inherit;cursor:pointer;border:1px solid currentColor;background:transparent;color:inherit;border-radius:999px;padding:.25rem .8rem;margin-left:.3rem}
.theme-modern .theme-switch{background:var(--m-footer);color:#cbd5e1}
/* maps and charts keep a light canvas in dark mode so their colours stay readable */
@media(prefers-reduced-motion:reduce){.theme-modern *{transition:none!important}}
@media print{.theme-switch{display:none}}
.theme-modern .btn.ghost{color:var(--m-ink)}.theme-modern .next .btn.ghost,.theme-modern .engine .btn.ghost,.theme-modern .hero .btn.ghost,.theme-modern .partner .btn.ghost{color:#fff}
/* ---- Appearance: dark surfaces for our own components (html.m-dark set by the head script) ---- */
html.m-dark.theme-modern .chart{background:var(--m-surface);border-color:var(--m-line)}
html.m-dark.theme-modern .chart figcaption{color:var(--m-ink)}
html.m-dark.theme-modern .chart .lab,html.m-dark.theme-modern .chart text{fill:var(--m-ink2)}
html.m-dark.theme-modern .chart .val{fill:var(--m-ink)}
html.m-dark.theme-modern .chart line[stroke="#ddd"],html.m-dark.theme-modern .chart [stroke="#ddd"],html.m-dark.theme-modern .chart [stroke="#eee"]{stroke:#2c3852}
html.m-dark.theme-modern table,html.m-dark.theme-modern .card,html.m-dark.theme-modern .partners a,html.m-dark.theme-modern .q label,html.m-dark.theme-modern .filters button,html.m-dark.theme-modern .chip,html.m-dark.theme-modern .ib,html.m-dark.theme-modern .notice,html.m-dark.theme-modern .ratings,html.m-dark.theme-modern .gform fieldset{background-color:var(--m-surface);color:var(--m-ink)}
html.m-dark.theme-modern .notice{background:var(--m-accent-soft)}
html.m-dark.theme-modern .leaflet-container{background:#1b2438}html.m-dark.theme-modern .leaflet-tile-pane{filter:brightness(.78) contrast(1.05) saturate(.85)}
html.m-dark.theme-modern .leaflet-popup-content-wrapper,html.m-dark.theme-modern .leaflet-popup-tip,html.m-dark.theme-modern .leaflet-control a,html.m-dark.theme-modern .leaflet-bar a{background:var(--m-surface);color:var(--m-ink)}
html.m-dark.theme-modern .nav{background:color-mix(in srgb,var(--m-bg) 80%,transparent)}
html.m-dark.theme-modern .nav-tog,html.m-dark.theme-modern .dd-menu a{color:var(--m-ink);background:transparent;border-color:var(--m-line)}
html.m-dark.theme-modern img.si,html.m-dark.theme-modern .logo img{filter:brightness(1.15)}
/* serif leftovers in our own markup -> new type */
.theme-modern .chart figcaption,.theme-modern .tagline,.theme-modern .path .n,.theme-modern .ae-pow b,.theme-modern .gform legend,.theme-modern .pl h4,.theme-modern ol.steps li:before{font-family:var(--m-font)!important;letter-spacing:-.01em}
/* appearance toggle */
.ap-btn{display:inline-grid;place-items:center;width:2.25rem;height:2.25rem;border-radius:999px;border:1px solid var(--m-line,#ccc);background:var(--m-surface,#fff);color:var(--m-ink,#222);cursor:pointer;padding:0;flex:none}
.ap-btn:hover{background:var(--m-surface2,#eee)}.ap-btn svg{width:18px;height:18px}
.ap-wrap{display:flex;align-items:center;gap:.5rem;margin-left:auto}
.ap-in-menu{display:none}
@media(max-width:860px){.ap-in-menu{display:flex;align-items:center;gap:.5rem;padding:.6rem .7rem;font-size:.92rem}}

html.m-dark.theme-modern .cz,html.m-dark.theme-modern .chart button{background:var(--m-surface2);color:var(--m-ink);border-color:var(--m-line)}
.theme-modern .logo{white-space:nowrap}
/* Dufferin Weekend accent: seasonal warm accent (follows the season switch) */
html.theme-modern{--m-accent:var(--accent);--m-accent-ink:var(--accent);--m-accent-soft:color-mix(in srgb,var(--accent) 12%,#fff);--m-on-accent:#fff;--m-link:var(--accent);--m-footer:#1c1410}
.theme-modern body{--m-accent:var(--accent);--m-accent-ink:var(--accent);--m-link:var(--accent);--m-accent-soft:color-mix(in srgb,var(--accent) 12%,#fff)}
html.m-dark.theme-modern body{--m-accent:var(--accent2);--m-accent-ink:var(--accent2);--m-link:var(--accent2);--m-accent-soft:color-mix(in srgb,var(--accent2) 18%,#131a2b);--m-on-accent:#1c1410}
.theme-modern .logo span{color:var(--accent2)}
.theme-modern .hero{min-height:min(78vh,720px)}
.theme-modern .hero-in{padding-top:5rem}
.theme-modern .hero h1{font-size:clamp(2.6rem,1.6rem + 4.5vw,5.2rem);color:#1c1410}
.theme-modern .hero .lede{font-size:1.2rem;color:#2a1d15}.theme-modern .hero .eyebrow{display:inline-block;background:rgba(255,255,255,.65);backdrop-filter:blur(6px);padding:.35rem .8rem;border-radius:999px;color:#3d2a1e}
.theme-modern .hero .btn:not(.ghost){background:#1c1410;color:#fff}.theme-modern .hero .btn.ghost{background:rgba(255,255,255,.55);color:#1c1410;border:1px solid rgba(28,20,16,.25);backdrop-filter:blur(6px)}
.theme-modern h2{color:var(--m-ink)}
.theme-modern .ph{border-radius:12px;height:140px}
.theme-modern .card-photo{border-radius:12px;height:180px}
.theme-modern .filters button,.theme-modern .tabs a,.theme-modern .chip{background:var(--m-surface);border:1px solid var(--m-line);color:var(--m-ink);font-family:var(--m-font)}
.theme-modern .filters button.on,.theme-modern .tabs a.on,.theme-modern .chip:has(input:checked){background:var(--m-ink);color:var(--m-bg);border-color:var(--m-ink)}
.theme-modern .strip{gap:.75rem;border-radius:0}.theme-modern .strip .s{border-radius:var(--m-radius)}
.theme-modern #leaflet{border-radius:0}.theme-modern .place-map,.theme-modern .g-map{border-radius:var(--m-radius)}
.theme-modern .partner{background:linear-gradient(135deg,#1c1410,#3d2a1e);border-radius:24px}
.theme-modern .g-hero,.theme-modern .g-cover{background:var(--hero)}.theme-modern .g-hero h1,.theme-modern .g-cover h2{color:#1c1410}
.theme-modern footer{text-align:center}
.theme-modern .notice{color:var(--m-ink)}
.theme-modern .hero-in{max-width:900px}.theme-modern .hero h1{font-size:clamp(2.4rem,1.5rem + 3.6vw,4.4rem)}
