/* Aurora Meter. Dark only. A photo hero, then one canvas with hairlines.
   Study notes: Linear (#08090a, weight 510, tight tracking), Raycast (one statement, much empty space),
   minimal.gallery (small nav, tight headline). See DESIGN.md. */
:root {
  --bg: #08090a;
  --ink: #f7f8f8;
  --ink-2: #b4b7bb;
  --ink-3: #8a8d92;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .22);
  --well: rgba(255, 255, 255, .04);
  --accent: #4ade80;
  --cloud: #a8abb0;
  --focus: #f7f8f8;
  --glow: .85;
  --sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.7, 0, .2, 1);
  --r: 6px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
h1, h2, p { margin: 0; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--ink-2); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mono { font-family: var(--mono); }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: min(94svh, 860px); overflow: clip; }
.hero-bg {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 28%;
  filter: brightness(var(--glow)) saturate(1.08);
  transition: filter 1.2s var(--ease);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(8, 9, 10, .62) 0%, rgba(8, 9, 10, 0) 24%, rgba(8, 9, 10, 0) 46%, rgba(8, 9, 10, .72) 74%, var(--bg) 100%);
}
.hero-top { display: flex; align-items: center; justify-content: space-between; height: 68px; flex: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.flag { display: block; width: 22px; height: 16px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); flex: none; }
.coords { font-size: 12px; color: var(--ink-2); letter-spacing: 0; white-space: pre; }
body:has(.btn.busy) .hero-top::after {
  content: ""; position: fixed; top: 0; left: 0; z-index: 5; height: 2px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 40% 100%; background-repeat: no-repeat;
  animation: load 1s linear infinite;
}
@keyframes load { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* controls sit on the photo */
.controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px 32px; padding-top: 12px; flex: none; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field[hidden] { display: none; }
.grow { flex: 1 1 240px; max-width: 420px; }
.lbl { font-size: 13px; color: var(--ink-2); }
.in {
  height: 44px; width: 100%; min-width: 0;
  background: transparent; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0;
  padding: 0; font-size: 20px; letter-spacing: -.02em; color: var(--ink);
}
.in::placeholder { color: var(--ink-3); opacity: 1; }
.in:hover { border-bottom-color: var(--ink-3); }
.in:focus-visible { outline: 0; border-bottom-color: var(--ink); }
.date-field { flex: 0 1 190px; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }

.seg {
  position: relative; display: inline-grid; grid-template-columns: repeat(3, auto);
  border: 1px solid var(--line-2); border-radius: var(--r); padding: 2px; height: 46px; max-width: 100%;
  background: rgba(8, 9, 10, .55);
}
.seg label { position: relative; z-index: 1; display: flex; }
.seg input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg label span {
  display: flex; align-items: center; justify-content: center;
  min-height: 42px; min-width: 44px; padding: 0 14px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  border-radius: 4px; white-space: nowrap;
}
.seg input:checked + span { color: var(--bg); }
.seg input:hover + span { color: var(--ink); }
.seg input:checked:hover + span { color: var(--bg); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 0; }
.thumb {
  position: absolute; z-index: 0; top: 2px; left: 0; height: 40px; width: 0;
  background: var(--ink); border-radius: 4px;
  transition: transform .25s var(--ease), width .25s var(--ease);
}

/* The date and place update the result on change. The button stays for Enter and for screen readers. */
.btn { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }
.form-err { flex-basis: 100%; font-size: 14px; color: var(--ink); border-left: 2px solid var(--ink-3); padding-left: 10px; }

/* the number is the hero */
.hero-body {
  margin-top: auto; padding-top: 72px; padding-bottom: 56px;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 56px; align-items: end;
}
.hero-body .slot { padding: 0; border: 0; min-width: 0; }
.s-figure { min-height: 300px; }
.fig-top { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 4px; }
.fig-where { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); }
.fig-where b { font-weight: 500; color: var(--ink); }
.fig-main { display: flex; align-items: baseline; gap: 8px 24px; flex-wrap: wrap; }
.fig-n { display: inline-flex; align-items: baseline; }
.fig-num { font-size: clamp(120px, 21vw, 232px); line-height: .92; font-weight: 500; letter-spacing: -.065em; margin-left: -.04em; }
.fig-pct { font-size: clamp(32px, 5vw, 56px); font-weight: 400; color: var(--ink-3); margin-left: 6px; letter-spacing: 0; }
.fig-label { font-size: 24px; font-weight: 500; letter-spacing: -.025em; }
.fig-win { font-size: 16px; color: var(--ink); margin-top: 20px; }
.fig-win span { color: var(--ink-2); }
.note { font-size: 13px; color: var(--ink-2); margin-top: 16px; max-width: 46ch; }

.chips { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 14px; }
.chip { display: inline-flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.chip b { font-weight: 400; color: var(--ink); font-family: var(--mono); font-size: 13px; }
.chip.tier { align-items: center; color: var(--ink-2); }
.chip.tier::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.chip.tier.b::before { background: transparent; border: 1.5px solid var(--ink-2); }

.s-reasons { min-height: 120px; align-self: end; }
.s-reasons .cap { margin-bottom: 14px; }
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.reasons li { font-size: 14px; line-height: 1.55; color: var(--ink-2); padding-left: 14px; border-left: 1px solid var(--line-2); }

/* ---------- below the hero ---------- */
main.wrap { padding-top: 8px; padding-bottom: 24px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.grid .slot { border-top: 1px solid var(--line); padding: 48px 0 56px; min-width: 0; }
.cap { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.s-chart { min-height: 440px; }
.s-travel { min-height: 320px; }
.s-weather { min-height: 300px; }
.s-sources { min-height: 100px; padding-top: 28px !important; padding-bottom: 28px !important; }


/* right now */
.s-now { min-height: 1040px; }
.now-verdict { display: flex; align-items: baseline; gap: 12px 28px; flex-wrap: wrap; margin-bottom: 44px; }
.nv-head { font-size: clamp(64px, 11vw, 120px); font-weight: 500; letter-spacing: -.065em; line-height: .9; }
.now-verdict.yes .nv-head, .now-verdict.maybe .nv-head { color: var(--accent); }
.now-verdict.day .nv-head { color: var(--ink-2); }
.nv-text { font-size: 18px; line-height: 1.45; color: var(--ink-2); max-width: 40ch; }
.now-stats .n { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.04em; line-height: 1.1; }
.now-stats .n small { display: block; margin: 6px 0 0; }
.cap.sub { margin-top: 56px; }
.now-sum { font-size: 15px; line-height: 1.55; color: var(--ink-2); margin-top: 10px; max-width: 72ch; }
.nhead, .nrow { display: grid; grid-template-columns: 56px 128px minmax(0, 1.2fr) 52px minmax(0, 1.4fr) 64px 48px; column-gap: 16px; align-items: baseline; }
.nhead { margin-top: 28px; padding-bottom: 10px; font-size: 11px; letter-spacing: 0; color: var(--ink-3); }
.nhead span:nth-child(4), .nhead span:nth-child(6), .nhead span:nth-child(7) { text-align: right; }
.nlist { list-style: none; margin: 0; padding: 0; }
.nrow { padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.nlist .nrow:last-child { border-bottom: 1px solid var(--line); }
.nrow .nt { font-size: 13px; color: var(--ink); }
.nrow .nc { display: flex; align-items: center; gap: 10px; }
.nrow .nc .bar { flex: 1; height: 2px; background: var(--well); }
.nrow .nc .bar i { display: block; height: 100%; background: var(--accent); }
.nrow .nc b { font-weight: 400; font-size: 12px; min-width: 30px; text-align: right; color: var(--ink-2); }
.nrow .ns { color: var(--ink-2); }
.nrow .nd, .nrow .nw, .nrow .nk { text-align: right; font-size: 13px; }
.nrow .nw, .nrow .nk { color: var(--ink-3); }
.nrow .np { color: var(--ink-3); }
.nrow .np em { font-style: normal; color: var(--ink); }
@media (max-width: 640px) {
  .nhead { display: none; }
  .nrow { grid-template-columns: 44px 76px minmax(0, 1fr) 40px; grid-template-areas: "t c s d" ". . p p"; row-gap: 2px; }
  .nrow .nt { grid-area: t; } .nrow .nc { grid-area: c; } .nrow .ns { grid-area: s; } .nrow .nd { grid-area: d; } .nrow .np { grid-area: p; font-size: 13px; }
  .nrow .nw, .nrow .nk { display: none; }
  .s-now { min-height: 1560px; }
}

/* chart */
.cap-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.key-bar { width: 8px; height: 8px; border-radius: 1px; background: var(--accent); }
.key-line { width: 14px; height: 1.5px; background: var(--cloud); }
.chart-box { position: relative; width: 100%; height: 220px; }
.chart-box svg { display: block; width: 100%; height: 220px; touch-action: pan-y; }
.chart-box:focus-visible { outline-offset: 4px; border-radius: 4px; }
.c-grid { stroke: var(--line); stroke-width: 1; }
.c-tick { fill: var(--ink-3); font: 400 11px var(--mono); }
.c-bar { fill: var(--accent); }
.c-bar.dim { opacity: .4; }
.c-line { fill: none; stroke: var(--cloud); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.c-dot { fill: var(--ink); stroke: var(--bg); stroke-width: 2; }
.c-cursor { stroke: var(--line-2); stroke-width: 1; }
.readout {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 20px; align-items: baseline;
  margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; min-height: 76px;
}
.readout .t { font: 400 14px var(--mono); color: var(--ink); }
.readout .v { color: var(--ink-3); }
.readout .v b { color: var(--ink); font-weight: 500; }
details.tbl { margin-top: 8px; }
details.tbl summary {
  display: inline-flex; align-items: center; min-height: 44px; cursor: pointer;
  font-size: 13px; color: var(--ink-3); list-style: none;
}
details.tbl summary:hover { color: var(--ink-2); }
details.tbl summary::-webkit-details-marker { display: none; }
details.tbl summary::after { content: "+"; margin-left: 8px; font-family: var(--mono); }
details.tbl[open] summary::after { content: "\2212"; }
.tbl table { width: 100%; table-layout: fixed; border-collapse: collapse; font: 400 12px var(--mono); font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 8px 4px; text-align: right; border-top: 1px solid var(--line); }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th { font-weight: 400; color: var(--ink-3); border-top: 0; }

/* travel: the answer to "where do I go" */
.s-travel { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 56px; align-content: start; }
.s-travel .cap { grid-column: 1 / -1; margin-bottom: 24px; }
.s-travel > .err { grid-column: 1 / -1; }
.t-main { min-width: 0; }
.t-name { font-size: clamp(36px, 6.4vw, 64px); font-weight: 500; letter-spacing: -.045em; line-height: 1.02; }
.t-sub { font-size: 15px; color: var(--ink-2); margin-top: 12px; }
.t-cmp { display: flex; align-items: baseline; gap: 16px; margin-top: 32px; }
.t-from { font-size: 28px; font-weight: 400; letter-spacing: -.03em; color: var(--ink-3); }
.t-arrow { font-size: 22px; color: var(--ink-3); }
.t-to { font-size: clamp(48px, 8vw, 80px); font-weight: 500; letter-spacing: -.055em; line-height: .95; color: var(--accent); }
.t-list { list-style: none; margin: 0; padding: 0; align-self: end; }
.t-list li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; }
.t-list li:last-child { border-bottom: 1px solid var(--line); }
.t-list .m { color: var(--ink-3); font-size: 13px; }
.t-list .r { text-align: right; font: 400 14px var(--mono); }

/* weather: values in columns */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 24px; margin-top: 24px; }
.stat { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat .k { font-size: 13px; color: var(--ink-3); }
.stat .n { font-size: clamp(28px, 4vw, 40px); font-weight: 500; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .n small { font: 400 12px var(--mono); letter-spacing: 0; color: var(--ink-3); margin-left: 6px; }
.layers { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 12px; max-width: 520px; }
.layer { display: grid; grid-template-columns: 84px 1fr 44px; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-3); }
.layer .bar { height: 2px; background: var(--well); overflow: hidden; }
.layer .bar i { display: block; height: 100%; background: var(--cloud); }
.layer .p { text-align: right; font: 400 12px var(--mono); color: var(--ink); }

/* sources: small print */
.s-sources .cap { font-size: 12px; margin-bottom: 12px; }
.src { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 28px; }
.src li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13px; color: var(--ink-3); }
.src .st { font: 400 12px var(--mono); color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.src .st::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.src .bad .st { color: var(--ink); }
.src .bad .st::before { background: transparent; border: 1.5px solid var(--ink); }
.src .msg { flex-basis: 100%; color: var(--ink-3); font-size: 13px; }

/* error slot */
.err { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.err p { font-size: 14px; color: var(--ink-2); border-left: 2px solid var(--ink-3); padding-left: 10px; }
.link {
  min-height: 44px; padding: 0 16px; background: transparent; border: 1px solid var(--line-2); border-radius: var(--r);
  font-size: 14px; font-weight: 500; cursor: pointer;
}
.link:hover { border-color: var(--ink-3); }

/* skeleton */
.sk { background: var(--well); border-radius: 4px; position: relative; overflow: hidden; }
.sk::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05), transparent);
  transform: translateX(-100%); animation: sh 1.4s infinite;
}
@keyframes sh { to { transform: translateX(100%); } }
.sk-stack { display: grid; gap: 14px; }

/* footer */
.foot { padding-top: 28px; padding-bottom: 64px; font-size: 13px; color: var(--ink-3); display: grid; gap: 6px; border-top: 1px solid var(--line); }

.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .hero { min-height: min(100svh, 900px); }
  .hero::after { background: linear-gradient(to bottom, rgba(8, 9, 10, .72) 0%, rgba(8, 9, 10, .5) 34%, rgba(8, 9, 10, .72) 60%, var(--bg) 92%); }
  .hero-body { grid-template-columns: minmax(0, 1fr); row-gap: 36px; padding-top: 56px; padding-bottom: 40px; }
  .s-figure { min-height: 0; }
  .s-reasons { min-height: 0; }
  .s-travel { grid-template-columns: minmax(0, 1fr); }
  .t-list { margin-top: 36px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s-chart { min-height: 440px; }
  .grid .slot { padding: 40px 0 44px; }
}
@media (max-width: 420px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .coords { display: none; }
  .controls { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
