/* Yad Moss — site styles. One file, no framework, light + dark.
   Chart colours are custom properties so the server-rendered SVG charts re-theme
   without being redrawn (see charts.css). */

:root {
  color-scheme: light;
  --blue: #1e73be;
  --blue-700: #155a96;
  --blue-50: #eaf3fb;
  --navy: #0d2a47;
  --navy-2: #163b60;
  --amber: #f2a93b;
  --green: #1c9a62;
  --red: #cf4437;

  --surface: #ffffff;
  --plane: #f3f6f9;
  --ink: #0f1c2b;
  --ink-2: #435468;
  --ink-muted: #6b7b8f;
  --grid: #e2e8ee;
  --axis: #c4cdd9;
  --hairline: rgba(15, 28, 43, .12);

  --series-median: #1e73be;
  --series-control: #e8702a;
  --band-outer: #d3e5f7;
  --band-inner: #a1c6ea;
  --outlook: #eef2f6;

  --warn-bg: #fff4dc;
  --warn-ink: #6b4a00;
  --ok-bg: #e4f5ec;
  --ok-ink: #0f5d38;
  --bad-bg: #fde8e5;
  --bad-ink: #8a2418;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(13, 42, 71, .06), 0 8px 24px -8px rgba(13, 42, 71, .14);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Barlow Semi Condensed", "Inter", system-ui, sans-serif;
  --max: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --blue: #4b98e0;
    --blue-700: #78b3ec;
    --blue-50: #14283d;
    --surface: #14202e;
    --plane: #0c1621;
    --ink: #f1f5f9;
    --ink-2: #b8c4d3;
    --ink-muted: #8394a8;
    --grid: #263648;
    --axis: #34475c;
    --hairline: rgba(255, 255, 255, .12);
    --series-median: #4b98e0;
    --series-control: #ee8147;
    --band-outer: #17314d;
    --band-inner: #1f4a77;
    --outlook: #1a2a3b;
    --warn-bg: #3a2f10;
    --warn-ink: #f6d68a;
    --ok-bg: #12382a;
    --ok-ink: #9be0bd;
    --bad-bg: #3d1b17;
    --bad-ink: #f4b1a8;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--plane); color: var(--ink);
  font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--blue-700); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -.005em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 650; }
h3 { font-size: 1.3rem; font-weight: 650; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: .5rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; font: 600 .95rem/1 var(--font);
  padding: .8rem 1.25rem; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  text-decoration: none; transition: transform .15s, background .15s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-700); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--blue-50); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hairline); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-hero { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.55); backdrop-filter: blur(4px); }
.btn-hero:hover { background: rgba(255,255,255,.25); color: #fff; }
.btn-danger { background: transparent; color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.btn-danger:hover { background: var(--bad-bg); color: var(--red); }
.btn-sm { padding: .5rem .9rem; font-size: .85rem; }

/* -------------------------------------------------------------- header */
.preview-bar {
  background: var(--amber); color: #3b2800; font-size: .85rem; font-weight: 600; text-align: center; padding: .45rem 1rem;
}
.preview-bar a { color: inherit; }
.site-header {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--hairline);
}
.site-header .container { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand svg { width: 40px; height: 40px; flex-shrink: 0; }
.brand b { display: block; font: 700 1.45rem/1 var(--font-head); letter-spacing: .01em; }
.brand small { display: block; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); margin-top: .2rem; }
.nav { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.nav > a, .nav > .dd > button {
  font: 600 .93rem/1 var(--font); color: var(--ink-2); text-decoration: none; padding: .7rem .8rem; border-radius: 999px;
  background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem;
}
.nav > a:hover, .nav > .dd > button:hover, .nav a[aria-current="page"], .nav .dd.on > button { color: var(--blue); background: var(--blue-50); }
.dd { position: relative; }
.dd > button::after { content: ""; width: .4em; height: .4em; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); }
.dd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 12px; box-shadow: var(--shadow); padding: .4rem; display: none;
}
.dd.open .dd-menu { display: block; }
.dd-menu a { display: block; padding: .6rem .8rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .93rem; font-weight: 500; }
.dd-menu a:hover, .dd-menu a[aria-current="page"] { background: var(--blue-50); color: var(--blue); }
.nav .btn { margin-left: .5rem; padding: .65rem 1.05rem; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--hairline); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; color: var(--ink); }
.menu-toggle svg { width: 22px; height: 22px; }

@media (max-width: 960px) {
  .menu-toggle { display: grid; place-items: center; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--hairline); padding: .5rem 20px 1rem; box-shadow: var(--shadow);
    max-height: calc(100vh - 80px); overflow: auto;
  }
  .nav.open { display: flex; }
  .nav > a, .nav > .dd > button { padding: .9rem .5rem; border-radius: 8px; width: 100%; justify-content: space-between; }
  .dd-menu { position: static; display: none; box-shadow: none; border: 0; padding: 0 0 .4rem .8rem; }
  .nav .btn { margin: .5rem 0 0; justify-content: center; }
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; color: #fff; isolation: isolate; overflow: hidden;
  background: var(--navy) var(--hero) center 35% / cover no-repeat;
  padding: clamp(4rem, 11vw, 8.5rem) 0 clamp(7rem, 12vw, 9.5rem);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(13,42,71,.55) 0%, rgba(13,42,71,.35) 40%, rgba(13,42,71,.85) 100%),
              linear-gradient(90deg, rgba(13,42,71,.55), transparent 70%);
}
.hero .eyebrow { font: 600 .8rem/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: #bfe0ff; margin-bottom: 1.1rem; display: inline-flex; gap: .6rem; align-items: center; }
.hero .eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--amber); }
.hero h1 { color: #fff; max-width: 14ch; text-shadow: 0 2px 20px rgba(0,0,0,.25); margin-bottom: .35em; }
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 40rem; color: #e4effa; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }

.page-hero { background: linear-gradient(135deg, var(--navy), var(--navy-2) 60%, #1b5a93); color: #fff; padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2.2rem, 5vw, 3.4rem); position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.1), transparent 65%); }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: .3em; }
.page-hero p { color: #cfe3f6; font-size: 1.1rem; max-width: 44rem; margin: 0; }
.crumb { font-size: .85rem; color: #9dc2e6; margin-bottom: .8rem; }
.crumb a { color: #cfe3f6; }

/* ------------------------------------------------------ conditions card */
.conditions {
  margin-top: -5.2rem; position: relative; z-index: 5;
  display: grid; grid-template-columns: 1.25fr 1fr; background: var(--surface); border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 20px 50px -20px rgba(13,42,71,.45); overflow: hidden; border: 1px solid var(--hairline);
}
.cond-status { padding: 1.7rem 1.9rem; border-right: 1px solid var(--hairline); display: flex; flex-direction: column; gap: .75rem; }
.cond-status h2 { font-size: 1.65rem; margin: 0; }
.cond-status p { color: var(--ink-2); margin: 0; }
.cond-meta { font-size: .82rem; color: var(--ink-muted); }
.cond-wx { padding: 1.5rem 1.9rem; background: linear-gradient(160deg, var(--blue-50), var(--surface)); display: flex; flex-direction: column; gap: 1rem; }
.cond-wx .now { display: flex; align-items: center; gap: 1rem; }
.cond-wx .temp { font: 700 3rem/1 var(--font-head); }
.cond-wx .temp sup { font-size: 1.3rem; vertical-align: top; position: relative; top: .35rem; }
.cond-wx .desc { color: var(--ink-2); font-size: .95rem; line-height: 1.35; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.mini-stats div { background: var(--surface); border: 1px solid var(--hairline); border-radius: 10px; padding: .55rem .7rem; }
.mini-stats b { display: block; font: 700 1.15rem/1.1 var(--font-head); }
.mini-stats span { font-size: .72rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 820px) {
  .conditions { grid-template-columns: 1fr; margin-top: -4rem; }
  .cond-status { border-right: 0; border-bottom: 1px solid var(--hairline); }
}

.badge { display: inline-flex; align-items: center; gap: .45rem; font: 700 .78rem/1 var(--font); letter-spacing: .06em; text-transform: uppercase; padding: .5rem .8rem; border-radius: 999px; align-self: flex-start; }
.badge::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: currentColor; }
.badge-open { background: var(--ok-bg); color: var(--ok-ink); }
.badge-open::before { animation: pulse 1.8s infinite; }
.badge-planned { background: var(--warn-bg); color: var(--warn-ink); }
.badge-closed { background: var(--bad-bg); color: var(--bad-ink); }
.badge-offseason { background: var(--blue-50); color: var(--blue-700); }
.badge-plain { background: var(--plane); color: var(--ink-2); }
.badge-plain::before { display: none; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ------------------------------------------------------------ sections */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section.tight { padding-top: clamp(1.5rem, 3vw, 2rem); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: .3rem 0 0; color: var(--ink-2); }
.link-arrow { font-weight: 600; text-decoration: none; display: inline-flex; gap: .35rem; align-items: center; }
.link-arrow::after { content: "→"; transition: transform .15s; }
.link-arrow:hover::after { transform: translateX(3px); }

.facts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--hairline); border-radius: var(--radius); overflow: hidden; margin-top: 2.2rem; border: 1px solid var(--hairline); }
.facts div { background: var(--surface); padding: 1.2rem 1rem; text-align: center; }
.facts b { display: block; font: 700 2rem/1 var(--font-head); color: var(--blue); }
.facts span { font-size: .8rem; color: var(--ink-2); }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, 1fr); } .facts div:last-child { grid-column: 1 / -1; } }

.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 1.5rem 1.6rem; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------- webcams */
.cams { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1.25rem; }
.cam { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.cam button.shot { all: unset; display: block; cursor: zoom-in; position: relative; aspect-ratio: 16 / 9; background: #cfd9e4; }
.cam button.shot:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }
.cam img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam .shot::after { content: "Enlarge"; position: absolute; right: .6rem; bottom: .6rem; font: 600 .72rem/1 var(--font); letter-spacing: .04em; background: rgba(13,42,71,.8); color: #fff; padding: .35rem .6rem; border-radius: 999px; opacity: 0; transition: opacity .15s; }
.cam .shot:hover::after, .cam .shot:focus-visible::after { opacity: 1; }
.cam-body { padding: .85rem 1rem 1rem; display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.cam-body h3 { font-size: 1.1rem; margin: 0; }
.cam-body small { color: var(--ink-muted); font-size: .8rem; }
.cam-age { font-size: .8rem; color: var(--ink-2); }
.cam-age.stale { color: var(--warn-ink); background: var(--warn-bg); padding: .15rem .5rem; border-radius: 999px; font-weight: 600; }
.cams.compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.cams.compact .cam-body { padding: .6rem .85rem .75rem; }
.cams.compact h3 { font-size: 1rem; }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 96vw); width: 100%; }
dialog.lightbox::backdrop { background: rgba(5, 14, 26, .86); }
dialog.lightbox figure { margin: 0; position: relative; }
dialog.lightbox img { width: 100%; max-height: 82vh; object-fit: contain; border-radius: 12px; background: #0b1624; display: block; }
dialog.lightbox figcaption { color: #e4effa; padding: .8rem .2rem 0; display: flex; justify-content: space-between; gap: 1rem; }
dialog.lightbox .close { position: absolute; top: -14px; right: -6px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: #0d2a47; font-size: 1.4rem; cursor: pointer; box-shadow: var(--shadow); }
.notice { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: .9rem 1.1rem; font-size: .93rem; }
.info-note { background: var(--blue-50); color: var(--ink-2); border-radius: 12px; padding: .9rem 1.1rem; font-size: .93rem; }

/* ------------------------------------------------------------- weather */
.outlook-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: .6rem; }
.day { background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px; text-align: center; padding: .85rem .4rem; display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.day.today { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue) inset; }
.day .dn { font: 700 .85rem/1 var(--font); color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.day .dd2 { font-size: .75rem; color: var(--ink-muted); }
.day .hi { font: 700 1.2rem/1 var(--font-head); }
.day .lo { font-size: .85rem; color: var(--ink-muted); }
.day .snow { font-size: .78rem; font-weight: 600; color: var(--blue); }
.day .wind { font-size: .72rem; color: var(--ink-muted); }
@media (max-width: 860px) { .outlook-strip { grid-template-columns: repeat(7, minmax(88px, 1fr)); overflow-x: auto; padding-bottom: .5rem; } }
.wx-hero { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; }
.wx-hero .bigtemp { font: 700 4.5rem/1 var(--font-head); }
.wx-hero .bigtemp sup { font-size: 1.8rem; vertical-align: top; position: relative; top: .5rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; margin-top: 1.2rem; }
.stat-grid div { background: var(--plane); border-radius: 10px; padding: .75rem .9rem; }
.stat-grid b { display: block; font: 700 1.35rem/1.15 var(--font-head); }
.stat-grid span { font-size: .75rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .05em; }
.map-switch { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1rem; }
.map-frame { aspect-ratio: 16 / 10; width: 100%; border: 0; border-radius: 12px; background: var(--plane); }
.map-ph { aspect-ratio: 16 / 7; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue-50), var(--plane)); border-radius: 12px; text-align: center; padding: 1rem; color: var(--ink-2); }

.chart-panel { padding: 1.4rem 1.6rem 1rem; }
.chart-panel .forecast-head { margin: 0 0 1rem; }
.chart-panel .view-intro { max-width: 70ch; }
.attribution { font-size: .82rem; color: var(--ink-muted); }

/* -------------------------------------------------------------- content */
.prose { font-size: 1.05rem; }
.prose h2 { margin-top: 2.2em; padding-top: .2em; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .45em; }
.prose img { border-radius: 12px; margin: .5rem 0; }
.prose aside.note { background: var(--warn-bg); color: var(--warn-ink); border-left: 4px solid var(--amber); padding: 1rem 1.2rem; border-radius: 0 12px 12px 0; margin: 1.4rem 0; }
.prose hr { border: 0; border-top: 1px solid var(--hairline); margin: 2rem 0; }
.table-wrap { overflow-x: auto; margin: 1.2rem 0; border: 1px solid var(--hairline); border-radius: 12px; background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th, .table-wrap td { text-align: left; padding: .8rem 1.1rem; border-bottom: 1px solid var(--hairline); }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap th { background: var(--blue-50); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.page-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 3rem; align-items: start; }
.toc { position: sticky; top: 90px; font-size: .9rem; max-height: calc(100vh - 120px); overflow: auto; }
.toc b { display: block; font: 700 .75rem/1 var(--font); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-muted); margin-bottom: .8rem; }
.toc a { display: block; padding: .35rem .8rem; color: var(--ink-2); text-decoration: none; border-left: 2px solid var(--hairline); }
.toc a:hover { color: var(--blue); border-color: var(--blue); }
@media (max-width: 900px) { .page-layout { grid-template-columns: 1fr; } .toc { display: none; } }

.post-list { display: grid; gap: 1rem; }
.post { padding: 1.3rem 1.5rem; }
.post h3 { margin: .2rem 0 .4rem; font-size: 1.25rem; }
.post h3 a { color: inherit; text-decoration: none; }
.post h3 a:hover { color: var(--blue); }
.post time, .meta { font-size: .82rem; color: var(--ink-muted); }
.pin { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); }

.report-card { padding: 1.8rem 2rem; }
.report-card h2 { margin: .8rem 0 .5rem; }
.timeline { border-left: 2px solid var(--hairline); margin-left: .5rem; padding-left: 1.5rem; display: grid; gap: 1.5rem; }
.timeline article { position: relative; }
.timeline article::before { content: ""; position: absolute; left: calc(-1.5rem - 6px); top: .45rem; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--plane); }
.timeline h3 { margin: 0 0 .2rem; font-size: 1.15rem; }

.photo-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: .8rem; }
.photo-row img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); aspect-ratio: 4 / 3; }
.photo-row img:first-child { grid-row: span 1; }
@media (max-width: 700px) { .photo-row { grid-template-columns: 1fr 1fr; } .photo-row img:first-child { grid-column: 1 / -1; } }

.yt { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #0b1624 center / cover no-repeat; cursor: pointer; border: 0; padding: 0; width: 100%; display: block; box-shadow: var(--shadow); }
.yt::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.65)); }
.yt span.play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; transition: transform .15s; }
.yt:hover span.play { transform: scale(1.08); }
.yt span.play::after { content: ""; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent var(--navy); margin-left: 4px; }
.yt em { position: absolute; left: 1rem; bottom: .8rem; right: 1rem; color: #fff; font: 600 .95rem/1.3 var(--font); font-style: normal; z-index: 1; text-align: left; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.cta { background: linear-gradient(135deg, var(--navy), #1b5a93); color: #fff; border-radius: calc(var(--radius) + 6px); padding: clamp(1.8rem, 4vw, 3rem); display: grid; grid-template-columns: 1.4fr auto; gap: 1.5rem; align-items: center; }
.cta h2 { color: #fff; margin-bottom: .4rem; }
.cta p { color: #cfe3f6; margin: 0; max-width: 46ch; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------- footer etc */
.site-footer { background: var(--navy); color: #b7cde3; margin-top: 3rem; padding: 3.2rem 0 2rem; font-size: .93rem; }
.site-footer a { color: #e4effa; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer h4 { color: #fff; font: 700 .78rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.foot-brand b { color: #fff; font: 700 1.5rem/1 var(--font-head); display: block; margin-bottom: .6rem; }
.foot-base { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.2rem; padding-top: 1.4rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem; font-size: .82rem; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

.flash { padding: .9rem 1.2rem; border-radius: 12px; margin: 1rem 0; font-weight: 500; }
.flash-ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash-warn { background: var(--warn-bg); color: var(--warn-ink); }

/* ---------------------------------------------------------------- forms */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.hint { font-weight: 400; color: var(--ink-muted); font-size: .82rem; margin-top: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=date], select, textarea {
  width: 100%; font: inherit; font-size: .97rem; padding: .7rem .85rem; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--hairline); border-radius: 10px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 22%, transparent); }
textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
textarea.tall { min-height: 420px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; }
.field { margin-bottom: 1.1rem; }
.row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--blue); }
.form-card { max-width: 440px; margin: 0 auto; padding: 2rem; }
.auth-wrap { min-height: calc(100vh - 260px); display: grid; align-items: center; padding: 3rem 0; }
.error { background: var(--bad-bg); color: var(--bad-ink); padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .93rem; }

/* ------------------------------------------------------------- feedback */
.fb-fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; background: var(--navy); color: #fff; border: 2px solid #fff; border-radius: 999px; padding: .8rem 1.15rem; font: 600 .9rem/1 var(--font); cursor: pointer; box-shadow: 0 10px 30px -8px rgba(0,0,0,.5); display: inline-flex; gap: .5rem; align-items: center; }
.fb-fab:hover { background: var(--blue); }
dialog.fb { border: 0; border-radius: 18px; padding: 0; width: min(520px, 94vw); box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); background: var(--surface); color: var(--ink); }
dialog.fb::backdrop { background: rgba(5, 14, 26, .6); }
dialog.fb form { padding: 1.6rem; }
dialog.fb h2 { font-size: 1.5rem; }
.fb-kinds { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.fb-kinds label { font-weight: 600; border: 1.5px solid var(--hairline); border-radius: 999px; padding: .45rem .85rem; cursor: pointer; margin: 0; font-size: .85rem; }
.fb-kinds input { position: absolute; opacity: 0; }
.fb-kinds input:checked + span { color: var(--blue); }
.fb-kinds label:has(input:checked) { border-color: var(--blue); background: var(--blue-50); color: var(--blue); }
.fb-kinds label:has(input:focus-visible) { outline: 3px solid var(--amber); }

/* ---------------------------------------------------------------- admin */
.admin-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.admin-side { background: var(--navy); color: #cfe3f6; padding: 1.4rem 1rem; position: sticky; top: 0; height: 100vh; overflow: auto; }
.admin-side .brand { color: #fff; margin: 0 .5rem 1.6rem; }
.admin-side .brand small { color: #8fb2d4; }
.admin-side nav { display: grid; gap: .15rem; }
.admin-side a { color: #cfe3f6; text-decoration: none; padding: .65rem .8rem; border-radius: 10px; font-weight: 500; font-size: .93rem; display: flex; justify-content: space-between; align-items: center; }
.admin-side a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-side a[aria-current="page"] { background: rgba(255,255,255,.15); color: #fff; }
.admin-side .count { background: var(--amber); color: #3b2800; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .15rem .5rem; }
.admin-side hr { border: 0; border-top: 1px solid rgba(255,255,255,.14); margin: 1rem 0; width: 100%; }
.admin-main { padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem; min-width: 0; }
.admin-main h1 { font-size: 2rem; margin-bottom: .3em; }
.admin-main .sub { color: var(--ink-2); margin: 0 0 1.6rem; max-width: 70ch; }
.admin-bar { display: none; }
@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-side nav { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-cards .card { padding: 1.2rem 1.3rem; }
.stat-cards b { display: block; font: 700 2rem/1 var(--font-head); color: var(--blue); }
.stat-cards span { color: var(--ink-2); font-size: .88rem; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-muted); padding: .7rem 1rem; border-bottom: 1px solid var(--hairline); }
.admin-table td { padding: .85rem 1rem; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.actions form { margin: 0; }
.cam-admin { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.4rem; padding: 1.2rem; align-items: start; margin-bottom: 1rem; }
.cam-admin .thumb { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #cfd9e4; }
.cam-admin .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-admin.hidden-cam { opacity: .6; }
.cam-admin details { margin-top: .8rem; }
.cam-admin summary { cursor: pointer; font-weight: 600; color: var(--blue); }
@media (max-width: 700px) { .cam-admin { grid-template-columns: 1fr; } }
.pill { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .25rem .6rem; border-radius: 999px; background: var(--plane); color: var(--ink-2); }
.pill.ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill.bad { background: var(--bad-bg); color: var(--bad-ink); }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.creds { background: var(--ok-bg); border: 1px solid color-mix(in srgb, var(--green) 40%, transparent); border-radius: 12px; padding: 1.2rem 1.4rem; margin-bottom: 1.6rem; }
.creds pre { background: var(--surface); padding: 1rem; border-radius: 8px; overflow-x: auto; font-size: .9rem; margin: .8rem 0 0; user-select: all; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--hairline); align-items: baseline; }
.check-list li:last-child { border-bottom: 0; }
.check-list .pill { min-width: 3.4rem; text-align: center; }
.markup-help { font-size: .85rem; color: var(--ink-2); background: var(--plane); border-radius: 10px; padding: .8rem 1rem; }
.markup-help code { background: var(--surface); padding: .1rem .35rem; border-radius: 4px; font-size: .85em; }

@media print { .site-header, .site-footer, .fb-fab, .preview-bar, .toc { display: none !important; } body { background: #fff; } }

/* ---- piste map ---- */
.pistemap { margin: 0; }
.pistemap .mapopen { all: unset; display: block; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; box-shadow: 0 8px 30px rgba(13,42,71,.18); }
.pistemap .mapopen:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.pistemap img { display: block; width: 100%; height: auto; }
.pistemap figcaption { margin-top: .7rem; color: var(--ink-muted); font-size: .92rem; }
.runlist { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.runlist li { display: flex; align-items: center; gap: .75rem; padding: .55rem .8rem; background: var(--surface); border: 1px solid var(--hairline); border-radius: 10px; font-weight: 600; }
.runlist li span { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: #4a90d9; color: #fff; font-size: .85rem; }
dialog.mapbox { width: min(96vw, 1400px); max-height: 94vh; padding: 0; border: 0; border-radius: 12px; background: #0d2a47; }
dialog.mapbox::backdrop { background: rgba(5,15,28,.8); }
dialog.mapbox .close { position: absolute; top: .5rem; right: .7rem; z-index: 2; background: rgba(13,42,71,.85); color: #fff; border: 0; font-size: 1.6rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; cursor: pointer; }
.mapscroll { overflow: auto; max-height: 94vh; -webkit-overflow-scrolling: touch; }
.mapscroll img { display: block; width: max(100%, 1200px); height: auto; max-width: none; }

/* ---- pictures on reports and news ---- */
.gallery { display: grid; gap: .5rem; margin-top: 1rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gallery.g1 { grid-template-columns: minmax(0, 340px); }
.gallery.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 560px; }
.gallery a.gal { position: relative; display: block; border-radius: 10px; overflow: hidden; background: var(--plane); line-height: 0; box-shadow: 0 1px 4px rgba(13,42,71,.15); cursor: zoom-in; }
.gallery a.gal:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.gallery img { width: 100%; height: 100%; max-height: 260px; object-fit: cover; display: block; transition: transform .2s; }
.gallery a.gal:hover img { transform: scale(1.03); }
.gallery.single { margin-top: .8rem; }
.gallery.single img { max-height: 200px; }
.gal-more { position: absolute; right: .5rem; bottom: .5rem; background: rgba(13,42,71,.85); color: #fff; font: 600 .78rem/1 var(--font); padding: .3rem .55rem; border-radius: 999px; }
.pic-existing { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .7rem; }
.pic-keep { display: grid; gap: .25rem; font-size: .82rem; width: 96px; }
.pic-keep img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; }
.pic-keep span { display: flex; gap: .3rem; align-items: center; }

/* ---- location map ---- */
.gmap { overflow: hidden; }
.gmap-box { min-height: 320px; display: grid; place-content: center; text-align: center; background: var(--blue-50); padding: 1rem; }
.gmap-box iframe { border: 0; width: 100%; height: 420px; display: block; }
.gmap-box.on { display: block; padding: 0; min-height: 0; }

/* ---- photo gallery ---- */
.yearnav { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; position: sticky; top: 64px; z-index: 6; background: color-mix(in srgb, var(--plane) 92%, transparent); backdrop-filter: blur(6px); padding: .6rem 0; margin-bottom: 1rem; border-bottom: 1px solid var(--hairline); }
.yearnav span { font-weight: 600; color: var(--ink-muted); margin-right: .4rem; font-size: .9rem; }
.yearnav a { padding: .25rem .65rem; border: 1px solid var(--hairline); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .88rem; }
.yearnav a:hover { border-color: var(--blue); color: var(--blue); }
.yearblock { scroll-margin-top: 130px; margin-bottom: 2.4rem; }
.yearblock h2 { display: flex; align-items: baseline; gap: .7rem; margin: 0 0 .7rem; }
.yearblock h2 small { font: 500 .9rem var(--font); color: var(--ink-muted); }
.gallery.gal-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-top: 0; }
.gal-grid a.gal { aspect-ratio: 4 / 3; }
.gal-grid img { max-height: none; height: 100%; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(13,42,71,.8); color: #fff; border: 0; width: 2.8rem; height: 2.8rem; border-radius: 50%; font-size: 1.9rem; line-height: 1; cursor: pointer; }
.lb-prev { left: .6rem; } .lb-next { right: .6rem; }
.lb-nav[hidden] { display: none; }
.gadmin { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .9rem; }
.gcard { background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.gcard.off { opacity: .6; }
.gcard img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.gfields { padding: .6rem .7rem .7rem; display: grid; gap: .4rem; font-size: .88rem; }
.gfields input[type=number] { width: 5.5rem; padding: .3rem .5rem; }
.gfields input[type=text] { padding: .35rem .5rem; }
.gfields .del { color: var(--red); }
.site-footer .ver { opacity: .6; font-size: .82rem; white-space: nowrap; }
