/* IceConditions prototype.
   References (Refero):
   - RAD Weather, confidence sheet, screen d2321000-234b-44a3-88c9-efddc6ad6424: mono labels, boxed rows, a status chip beside its word.
   - komoot, "Reporting route tip" flow 8373, screen 901b3a8f-b989-45f1-8786-df0caaa5344f: one plain question, a card of choices.
   - co2.is style ff036de5-4f3f-4509-86ab-21b6d73218cf: cold ink on white, icy blue as the only tint.
   Our own move: reports fade as they age, like ice going soft. */

:root {
  --bg: #f2f5f6;
  --card: #ffffff;
  --ink: #0f1a20;
  --mute: #56656d;
  --rule: #d3dde1;
  --fat: #173f86;
  --in: #2a74b8;
  --thin: #b97a06;
  --out: #8f3b26;
  --closed: #56656d;
  --focus: #2a74b8;
  --head: 'Archivo', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1215; --card: #141c20; --ink: #e8eef0; --mute: #95a5ac; --rule: #26343a;
    --fat: #4b7fdc; --in: #5aa6e8; --thin: #e0a530; --out: #d0705a; --closed: #95a5ac;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--head); font-stretch: 100%;
}
a { color: inherit; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.sample {
  background: var(--ink); color: var(--bg);
  font: 500 12px/1.4 var(--mono); letter-spacing: .02em;
  padding: 8px 16px; text-align: center;
}

header.top { border-bottom: 1px solid var(--rule); background: var(--card); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.mark { font: 800 18px/1 var(--head); font-stretch: 75%; text-transform: uppercase; letter-spacing: .02em; text-decoration: none; }
.mark span { color: var(--in); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 6px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--bg); font: 600 15px/1 var(--head); text-decoration: none; cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn:disabled { opacity: .35; cursor: default; }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

h1 { font: 800 clamp(40px, 11vw, 72px)/.95 var(--head); font-stretch: 75%; text-transform: uppercase; margin: 28px 0 8px; letter-spacing: -.01em; }
h2 { font: 700 14px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--mute); margin: 32px 0 10px; }
.lede { color: var(--mute); margin: 0 0 20px; max-width: 36em; }
.crumb { font: 500 13px/1 var(--mono); color: var(--mute); margin-top: 20px; display: inline-block; }

/* Status chip: colour plus word, never colour alone */
.rating {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font: 700 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em;
  padding: 6px 8px; border-radius: 4px; color: #fff; background: var(--closed);
}
.rating::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.rating.fat { background: var(--fat); } .rating.in { background: var(--in); }
.rating.thin { background: var(--thin); } .rating.out { background: var(--out); }
.age { font: 500 13px/1 var(--mono); color: var(--mute); white-space: nowrap; }

/* Lists */
.box { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li + li { border-top: 1px solid var(--rule); }
.row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; min-height: 64px; }
.row .name { font-weight: 700; font-size: 17px; line-height: 1.2; }
.row .sub { font: 400 13px/1.3 var(--mono); color: var(--mute); margin-top: 3px; }
.row .grow { flex: 1; min-width: 0; }
.row .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.toggle { display: inline-flex; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.toggle button { min-height: 40px; padding: 0 16px; border: 0; background: var(--card); color: var(--ink); font: 600 14px/1 var(--head); cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
#map { height: 460px; border-radius: 8px; border: 1px solid var(--rule); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.report { position: relative; padding: 0 0 20px 28px; transition: opacity .2s; }
.report::before { content: ''; position: absolute; left: 7px; top: 22px; bottom: 0; width: 2px; background: var(--rule); }
.report:last-child::before { display: none; }
.report .dot { position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--bg); background: var(--closed); }
.report .dot.fat { background: var(--fat); } .report .dot.in { background: var(--in); }
.report .dot.thin { background: var(--thin); } .report .dot.out { background: var(--out); }
.report .card { padding: 14px 16px; }
.report .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.report .what { font-weight: 700; }
.report p { margin: 8px 0 0; }
.source { font: 500 12px/1 var(--mono); color: var(--mute); }
.photo {
  margin-top: 10px; aspect-ratio: 16 / 9; max-height: 180px; width: 100%;
  border: 1px dashed var(--rule); border-radius: 6px; display: grid; place-items: center; text-align: center;
  font: 500 12px/1.4 var(--mono); color: var(--mute); padding: 12px; background: var(--bg);
}

/* Freeze-thaw */
.ft { padding: 16px; }
.ft .sum { font-weight: 600; margin: 0 0 12px; }
.ft .bars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; height: 120px; position: relative; }
.ft .freeze { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--in); }
.ft .freeze span { position: absolute; right: 0; top: -16px; font: 500 11px/1 var(--mono); color: var(--in); }
.ft .col { position: relative; }
.ft .bar { position: absolute; left: 20%; right: 20%; border-radius: 3px; background: var(--in); }
.ft .bar.thaw { background: var(--thin); }
.ft .days { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 6px; font: 500 11px/1 var(--mono); color: var(--mute); text-align: center; }
.ft .note { font: 400 12px/1.4 var(--mono); color: var(--mute); margin: 12px 0 0; }

/* Climb */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.facts div { padding: 12px 16px; border-top: 1px solid var(--rule); }
.facts div:nth-child(-n+2) { border-top: 0; }
.facts div:nth-child(odd) { border-right: 1px solid var(--rule); }
.facts dt { font: 500 12px/1 var(--mono); color: var(--mute); text-transform: uppercase; letter-spacing: .05em; }
.facts dd { margin: 6px 0 0; font-weight: 700; font-size: 18px; }
.status { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.status .big { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.status .rating { font-size: 15px; padding: 8px 12px; }
.beta { padding: 4px 16px 16px; }
.beta h3 { font: 700 15px/1.2 var(--head); margin: 16px 0 4px; }
.beta p { margin: 0; color: var(--ink); }
.flag { font: 500 12px/1.4 var(--mono); color: var(--thin); margin: 12px 16px 0; }
.links { list-style: none; padding: 0; margin: 0; }
.links a { display: block; padding: 14px 16px; text-decoration: none; }
.links a::after { content: ' ↗'; color: var(--mute); }
.sticky-cta { position: sticky; bottom: 0; padding: 12px 0 16px; background: var(--bg); border-top: 1px solid var(--rule); margin-top: 24px; }
.sticky-cta .btn { width: 100%; }

/* Submit flow */
.q { margin-top: 24px; }
.q .ask { font: 800 clamp(30px, 8vw, 44px)/1 var(--head); font-stretch: 75%; text-transform: uppercase; margin: 0 0 16px; }
.q .help { color: var(--mute); margin: -8px 0 16px; }
.choices { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 12px 16px; text-align: left;
  background: var(--card); color: var(--ink); border: 1px solid var(--rule); border-radius: 8px; cursor: pointer; font: 600 17px/1.2 var(--head);
}
.choice small { display: block; font: 400 13px/1.3 var(--mono); color: var(--mute); margin-top: 3px; }
.choice:hover { border-color: var(--ink); }
.choice.quiet { min-height: 48px; font-weight: 500; background: transparent; }
.field { width: 100%; font: 16px/1.4 var(--head); padding: 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); color: var(--ink); }
textarea.field { min-height: 120px; resize: vertical; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.answered { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; margin-top: 8px; }
.answered .k { font: 500 12px/1.2 var(--mono); color: var(--mute); text-transform: uppercase; }
.answered .v { font-weight: 600; }
.answered button { background: none; border: 0; color: var(--in); font: 600 14px/1 var(--head); cursor: pointer; min-height: 44px; padding: 0 4px; }
.done { margin-top: 24px; padding: 24px 16px; }
.done .ask { font: 800 clamp(30px, 8vw, 44px)/1 var(--head); font-stretch: 75%; text-transform: uppercase; margin: 0 0 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

footer { color: var(--mute); font: 400 12px/1.5 var(--mono); padding: 32px 0 40px; }

@media (min-width: 900px) {
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .wrap.wide { max-width: 1120px; }
}
