/* Snowoverflow site. Colours are the app's (Shared/Theme.swift): night gradient, white text that passes 4.5:1 on the lightest stop. */
:root {
  --top: #0a1233;
  --mid: #1f4285;
  --bottom: #29579e;
  --ink: #ffffff;
  --ink-2: rgba(255, 255, 255, .85);
  --card: rgba(255, 255, 255, .08);
  --card-hi: rgba(255, 255, 255, .14);
  --card-line: rgba(255, 255, 255, .16);
  --accent: #8fd0ff;
  --radius: 22px;
  --wrap: 1120px;
  --wash: 255, 255, 255;
  --on-ink: #0a1233;
  --panel: #13265a;
  --bar-top: #ffffff;
  --flake: #ffffff;
  color-scheme: light dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  color: var(--ink);
  background: var(--top);
  background-image: linear-gradient(180deg, var(--top) 0, var(--mid) 1100px, var(--bottom) 100%);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
button { font: inherit; color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.rounded { font-family: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); }

/* Falling snow: decorative, behind everything, off for reduced motion */
.snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.snow i { position: absolute; top: -10px; border-radius: 50%; background: var(--flake); animation: fall linear infinite; }
@keyframes fall { to { transform: translate3d(var(--drift, 20px), 105vh, 0); } }
@media (prefers-reduced-motion: reduce) { .snow { display: none; } }
main, header, footer { position: relative; z-index: 1; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; gap: 12px; max-width: var(--wrap); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand .sym { width: 38px; height: 38px; }
.brand .wm { height: 42px; width: auto; }
.top nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.top nav a { color: var(--ink-2); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }

/* Segmented controls (units, sort) */
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--card-line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }

/* Search */
.ask { padding-top: 28px; padding-bottom: 8px; }
.ask h1 { font-size: clamp(32px, 5.4vw, 56px); line-height: 1.05; margin: 0 0 18px; letter-spacing: -.02em; max-width: 18ch; }
.search { position: relative; }
.search-row { display: flex; gap: 8px; }
.search input {
  flex: 1; min-width: 0; font: inherit; font-size: 18px; color: var(--ink); padding: 15px 18px; border-radius: 16px;
  background: rgba(var(--wash), .12); border: 1px solid var(--card-line);
}
.search input::placeholder { color: rgba(var(--wash), .7); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--card-line); cursor: pointer;
  background: var(--card-hi); color: var(--ink); padding: 12px 16px; border-radius: 16px; font-weight: 600; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: rgba(var(--wash), .2); color: var(--ink); }
/* The one action we nudge: Near me. Bright snow blue with night-blue label, same in light and dark (8.8:1). */
.btn.cta, .btn.cta:hover { background: #5cbcff; border-color: #5cbcff; color: #0a1233; font-weight: 700; }
.btn.cta:hover { background: #84ccff; border-color: #84ccff; }
.btn.cta:disabled { opacity: .7; cursor: progress; }
.near-hint { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); text-align: right; }
.near-hint[hidden] { display: none; }
.btn.solid { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn svg { width: 20px; height: 20px; flex: none; }
.results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5; list-style: none; margin: 0; padding: 6px;
  background: var(--panel); border: 1px solid var(--card-line); border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .4);
  max-height: 340px; overflow: auto;
}
.results[hidden] { display: none; }
.results li { padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.results li[aria-selected="true"], .results li:hover { background: rgba(var(--wash), .12); }
.results small { display: block; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--card-line); font-size: 15px; font-weight: 600; cursor: pointer; }
.chip:hover { background: var(--card-hi); }
.chip.saved::before { content: "★"; color: var(--accent); }
.chips .chip:not(.saved) { flex: 1 1 auto; justify-content: center; } /* the "Try" row fills the same width as the cards */
.chips-label { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); font-weight: 700; width: 100%; margin-bottom: -2px; }

/* The report */
.report { display: grid; grid-template-columns: 1.05fr 1fr; gap: 16px; padding: 26px 0 40px; align-items: stretch; }
.report > .panel { display: flex; flex-direction: column; }
.panel { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 24px; }
.place-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.place-head h2 { margin: 0; font-size: 28px; line-height: 1.15; }
.place-head p { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; }
.star { border: 1px solid var(--card-line); background: var(--card); border-radius: 999px; width: 44px; height: 44px; cursor: pointer; font-size: 20px; flex: none; }
.star[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 22px 0 2px; }
.big { font-size: clamp(84px, 13vw, 150px); font-weight: 800; line-height: .92; margin: 0; letter-spacing: -.03em; }
.big small { font-size: .3em; letter-spacing: 0; margin-left: .06em; }
.quip { font-size: clamp(19px, 2.2vw, 23px); font-weight: 600; margin: 12px 0 0; max-width: 26ch; }
.meta { font-size: 14px; color: var(--ink-2); margin: auto 0 0; padding-top: 18px; }
.side { display: grid; gap: 16px; grid-template-rows: auto auto 1fr; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat .label { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.stat .n { font-size: 40px; font-weight: 800; line-height: 1.1; }
.stat .n small { font-size: 18px; margin-left: 2px; }
.incoming { display: flex; gap: 14px; align-items: center; }
.incoming .icon { font-size: 28px; line-height: 1; }
.incoming b { display: block; }
.incoming .detail { color: var(--ink-2); }

.week h3 { margin: 0 0 14px; font-size: 17px; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 170px; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.bar .v { font-size: 13px; font-weight: 700; white-space: nowrap; }
.bar .col { width: 100%; max-width: 38px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--bar-top), var(--accent)); min-height: 3px; transition: height .5s ease; }
.bar .col.zero { background: rgba(var(--wash), .2); }
.bar .d { font-size: 13px; color: var(--ink-2); }

.loading .big, .loading .quip, .loading .n { opacity: .35; }
.error { padding: 16px 18px; border-radius: 16px; background: rgba(26, 115, 217, .35); border: 1px solid var(--card-line); }

/* Where's the snow */
section { padding: 50px 0; }
h2.sec { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.1; margin: 0 0 8px; letter-spacing: -.01em; }
.sub { color: var(--ink-2); font-size: 19px; max-width: 52ch; margin: 0 0 24px; }
.where-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
/* Country picker */
.picker { position: relative; }
.picker-btn {
  display: flex; align-items: center; gap: 12px; min-width: 260px; text-align: left; cursor: pointer;
  background: var(--card-hi); border: 1px solid var(--card-line); border-radius: 16px; padding: 10px 14px 10px 12px;
}
.picker-btn:hover { background: rgba(var(--wash), .2); }
.picker-btn .pf { font-size: 28px; line-height: 1; width: 34px; text-align: center; }
.picker-btn .pn { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.picker-btn .pn b { font-size: 18px; }
.picker-btn .pn small { font-size: 13px; color: var(--ink-2); }
.picker-btn .chev { width: 18px; height: 18px; flex: none; transition: transform .2s; opacity: .85; }
.picker-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.picker-panel {
  position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; width: min(640px, calc(100vw - 32px));
  background: var(--panel); border: 1px solid var(--card-line); border-radius: 20px; padding: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.picker-panel[hidden] { display: none; }
.picker-panel input {
  width: 100%; font: inherit; color: var(--ink); padding: 11px 14px; border-radius: 12px; margin-bottom: 10px;
  background: rgba(var(--wash), .1); border: 1px solid var(--card-line);
}
.picker-panel input::placeholder { color: rgba(var(--wash), .7); }
.ctiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: min(420px, 60vh); overflow: auto; }
.ctile {
  display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; padding: 9px 10px;
  background: none; border: 1px solid transparent; border-radius: 12px; min-width: 0;
}
.ctile:hover, .ctile:focus-visible { background: rgba(var(--wash), .1); outline: none; border-color: var(--card-line); }
.ctile[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.ctile[aria-pressed="true"] small { color: var(--on-ink); opacity: .85; }
.ctile .f { font-size: 22px; line-height: 1; flex: none; }
.ctile span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ctile b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctile small { font-size: 12px; color: var(--ink-2); }
.ctile.near { grid-column: 1 / -1; }
.ctiles .empty { grid-column: 1 / -1; padding: 12px; color: var(--ink-2); }
.summary { font-size: 15px; color: var(--ink-2); margin: 0 0 12px; min-height: 1.5em; }
.areas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; align-items: stretch; }
.area {
  display: grid; grid-template-columns: minmax(0, 1fr) 118px; grid-template-rows: auto 1fr; gap: 2px 14px; align-items: start; height: 100%; min-height: 96px; width: 100%; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--card-line); border-radius: 16px; padding: 12px 16px;
}
.area:hover { background: var(--card-hi); }
.area .name { font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.area .reg { font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area .depth { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-weight: 800; font-size: 22px; line-height: 1.2; }
.area .depth small { display: block; font-size: 13px; font-weight: 600; color: var(--accent); }
.area .depth small.nil { color: var(--ink-2); }
.area.none .depth { color: var(--ink-2); font-weight: 600; font-size: 17px; line-height: 1.6; }
.more { margin-top: 14px; }
.summary .retry { margin-left: 4px; }
.duo[hidden], .week[hidden] { display: none; }
.credit { font-size: 13px; color: var(--ink-2); margin-top: 14px; }

/* The app band */
.app { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; background: var(--card); border: 1px solid var(--card-line); border-radius: 28px; padding: 32px; }
.app img { width: 120px; height: 120px; border-radius: 27px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.app h2 { margin: 0 0 6px; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.1; }
.app ul { margin: 10px 0 18px; padding-left: 20px; color: var(--ink-2); columns: 2; column-gap: 32px; }
.app li { margin-bottom: 4px; break-inside: avoid; }
.app .free { color: var(--ink-2); font-size: 15px; margin-left: 10px; }

.honest { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; color: var(--ink-2); max-width: 68ch; margin: 0; }

/* Text pages */
.doc { max-width: 720px; padding-top: 30px; padding-bottom: 60px; }
.doc h1 { font-size: clamp(36px, 6vw, 52px); line-height: 1.05; margin: 10px 0 10px; }
.doc h2 { font-size: 24px; margin: 36px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }
.doc li { margin-bottom: 6px; }
.doc .updated { font-size: 14px; color: var(--ink-2); }
.card { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); }
details.card { margin-bottom: 12px; }
details.card summary { cursor: pointer; padding: 18px 22px; font-weight: 700; list-style: none; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary::after { content: "+"; float: right; color: var(--accent); }
details.card[open] summary::after { content: "–"; }
details.card > p, details.card > ul { padding: 0 22px 18px; margin: 0; }
.doc .eyebrow { margin-top: 30px; }
.doc .quip { margin-bottom: 20px; }

.ctable { border-collapse: collapse; width: 100%; max-width: 420px; color: var(--ink-2); }
.ctable th, .ctable td { text-align: left; padding: 6px 0; border-bottom: 1px solid var(--card-line); }
.ctable td:last-child, .ctable th:last-child { text-align: right; }
.doc code { font-size: .92em; background: var(--card-hi); padding: 1px 6px; border-radius: 6px; color: var(--ink); }

/* SEO blocks on ski area and country pages */
.seo { padding-top: 10px; }
.crumbs { font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); }
.crumbs [aria-current] { color: var(--ink); }
.facts { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.facts li { background: var(--card); border: 1px solid var(--card-line); border-radius: 16px; padding: 12px 18px; display: flex; flex-direction: column; min-width: 140px; }
.facts b { font-size: 22px; }
.facts span { font-size: 14px; color: var(--ink-2); }
.seo h3 { font-size: 20px; margin: 0 0 12px; }
ul.near, .countries { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
ul.near a, .countries a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--card-line); color: var(--ink); text-decoration: none; font-weight: 700; height: 100%; }
ul.near a:hover, .countries a:hover { background: var(--card-hi); }
ul.near small, .countries small { font-weight: 500; font-size: 13px; color: var(--ink-2); }
.countries a { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 10px; }
.countries .f { font-size: 22px; }
.countries small { width: 100%; padding-left: 32px; }
.regions { columns: 3 240px; column-gap: 28px; }
.region { break-inside: avoid; margin-bottom: 18px; }
.region h3 { font-size: 16px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.region ul { list-style: none; padding: 0; margin: 0; }
.region li { padding: 3px 0; }

/* Footer */
footer { border-top: 1px solid var(--card-line); padding: 28px 0 40px; font-size: 14px; color: var(--ink-2); margin-top: 30px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { color: var(--ink-2); }


@media (max-width: 860px) {
  .report { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; padding: 24px; }
  .app img { width: 84px; height: 84px; border-radius: 19px; }
  .app ul { columns: 1; }
}
@media (max-width: 340px) {
  .brand .wm { display: none; } /* too small for the stacked wordmark: the crystal alone */
}
@media (max-width: 560px) {
  .wrap, .top { padding-left: 16px; padding-right: 16px; }
  .top nav .hide-sm { display: none; }
  .search-row { flex-wrap: wrap; }
  .search-row input { flex-basis: 100%; }
  .search-row .btn { flex: 1; }
  .near-hint { text-align: center; }
  .panel { padding: 20px; }
  .stat .n { font-size: 32px; }
  .bars { gap: 5px; height: 150px; }
  .bar .v { font-size: 11px; }
  .areas { grid-template-columns: 1fr; }
  .picker, .picker-btn { width: 100%; }
  .ctiles { grid-template-columns: 1fr 1fr; }
  .where-bar .seg { width: 100%; }
  .where-bar .seg button { flex: 1; }
  .app .free { display: block; margin: 10px 0 0; }
}
/* Light mode: snow-day sky, night-blue ink (the brand's #0E1A44). */
@media (prefers-color-scheme: light) {
  :root {
    --top: #f6f9ff; --mid: #e4effc; --bottom: #d5e7fa;
    --ink: #0e1a44; --ink-2: rgba(14, 26, 68, .82);
    --card: rgba(255, 255, 255, .72); --card-hi: #ffffff; --card-line: rgba(14, 26, 68, .14);
    --accent: #0b5cad;
    --wash: 14, 26, 68; --on-ink: #ffffff; --panel: #ffffff; --bar-top: #3c8ee0; --flake: #8db8e8;
  }
  .btn.cta, .btn.cta:hover { border-color: #1678bd; } /* edge definition on the pale page */
  .search input, .picker-panel input { background: #ffffff; border-color: rgba(14, 26, 68, .3); }
  .search input::placeholder, .picker-panel input::placeholder { color: rgba(14, 26, 68, .65); }
}

.mockbar { position: fixed; bottom: 12px; left: 12px; z-index: 9; background: #ffd34d; color: #1a1a1a; font: 600 12px/1 system-ui; padding: 8px 10px; border-radius: 8px; }
