/* Crashboard — crashboard.net
   Three static pages. No frameworks, no fonts fetched, no scripts, no trackers.

   The palette is not an approximation of the app's: the ramp stops below are
   computed from Barometer.hue(percentile:) and Barometer.maxChroma(_:_:) in
   CrashboardCore, at the same lightness the app paints (0.74 light, 0.44 dark).
   See scripts/check-site-copy.py, which keeps this file honest about the
   disclaimer the way check-store-copy.sh does for the listing. */

:root {
  color-scheme: light dark;

  --ink:        #111213;
  --ink-soft:   #55585c;
  --ink-faint:  #85898e;
  --paper:      #fbfbfa;
  --paper-cool: #f2f2f0;
  --rule:       #e2e2df;

  --ramp: linear-gradient(90deg,#fb817a,#fb8740,#e39a1f,#c5aa20,#9cba20,#25cd42);

  --measure: 34rem;
  --sans: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@supports (color: oklch(0.74 0.15 25)) {
  :root {
    --ramp: linear-gradient(90deg,
      oklch(0.74 0.1505 25), oklch(0.74 0.1645 49), oklch(0.74 0.1500 73),
      oklch(0.74 0.1452 97), oklch(0.74 0.1690 121), oklch(0.74 0.2214 145));
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #ecedee;
    --ink-soft:   #a6a9ad;
    --ink-faint:  #74777b;
    --paper:      #0e0f10;
    --paper-cool: #17181a;
    --rule:       #2a2c2e;

    --ramp: linear-gradient(90deg,#9b0e1b,#823b08,#704908,#605209,#4b5a09,#0b641c);
  }
  @supports (color: oklch(0.44 0.15 25)) {
    :root {
      --ramp: linear-gradient(90deg,
        oklch(0.44 0.1703 25), oklch(0.44 0.1131 49), oklch(0.44 0.0898 73),
        oklch(0.44 0.0869 97), oklch(0.44 0.1011 121), oklch(0.44 0.1323 145));
    }
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.5rem; }

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

/* ---- masthead ---------------------------------------------------------- */

.masthead {
  display: flex; align-items: baseline; gap: 1rem 1.25rem; flex-wrap: wrap;
  padding: 2.25rem 0 1.5rem;
}
.wordmark {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.22em;
  text-decoration: none; white-space: nowrap;
}
.masthead .tag {
  font-size: 0.78rem; color: var(--ink-faint); margin-right: auto;
}
.masthead nav { display: flex; gap: 1.1rem; font-size: 0.85rem; }
.masthead nav a { color: var(--ink-soft); text-decoration: none; }
.masthead nav a:hover, .masthead nav a[aria-current="page"] {
  color: var(--ink); text-decoration: underline;
}

.band { height: 6px; background: var(--ramp); }

/* ---- type -------------------------------------------------------------- */

h1 {
  font-size: clamp(2.1rem, 6.2vw, 3.4rem);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.04;
  margin: 2.5rem 0 0; text-wrap: balance;
}
.lede {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--ink-soft); max-width: var(--measure);
  margin: 1.1rem 0 0; text-wrap: pretty;
}
h2 {
  font-size: 1.32rem; font-weight: 700; letter-spacing: -0.018em;
  margin: 3.25rem 0 0.65rem;
}
h3 { font-size: 1rem; font-weight: 700; margin: 1.75rem 0 0.3rem; }
p, li { max-width: var(--measure); text-wrap: pretty; }
p { margin: 0.85rem 0; }
ul { padding-left: 1.1rem; margin: 0.85rem 0; }
li { margin: 0.4rem 0; }
strong { font-weight: 700; }

.eyebrow {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-faint);
  margin: 3.25rem 0 0.5rem;
}
.muted { color: var(--ink-soft); }
.small { font-size: 0.86rem; }

/* ---- figures ----------------------------------------------------------- */

.scale { margin: 2.5rem 0 0; }
.scale .bar {
  height: 2.5rem; border-radius: 5px; background: var(--ramp);
}
.scale .ends {
  display: flex; justify-content: space-between;
  font-size: 0.72rem; color: var(--ink-faint); margin-top: 0.5rem;
  font-family: var(--mono);
}

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 1.25rem 1.5rem; margin: 2.25rem 0 0;
  border-top: 1px solid var(--rule); padding-top: 1.25rem;
}
.facts div { max-width: none; }
.facts dt, .facts .n {
  font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1;
}
.facts dd, .facts .l {
  margin: 0.35rem 0 0; font-size: 0.79rem; color: var(--ink-soft);
  line-height: 1.35;
}

.readings {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.75rem; margin: 1.5rem 0 0;
}
.readings > div { max-width: none; }
.readings h3 { margin-top: 0; }
.readings p { max-width: none; }

.sources {
  list-style: none; padding: 0; margin: 1rem 0 0;
  font-size: 0.86rem; color: var(--ink-soft);
}
.sources li {
  max-width: none; padding: 0.6rem 0; border-top: 1px solid var(--rule);
  margin: 0;
}
.sources li b { color: var(--ink); font-weight: 700; }

.price {
  border: 1px solid var(--rule); border-radius: 8px;
  padding: 1.4rem 1.5rem; margin: 1.25rem 0 0; background: var(--paper-cool);
}
.price p { max-width: none; }
.price .free { font-weight: 700; }

/* ---- the legal notice -------------------------------------------------- */

.important {
  border-top: 1px solid var(--rule);
  margin-top: 3.5rem; padding-top: 1.5rem;
}
.important p {
  font-size: 0.82rem; color: var(--ink-soft); line-height: 1.5;
}

footer { padding: 0 0 4rem; }
.colophon {
  display: flex; gap: 0.75rem 1.25rem; flex-wrap: wrap; align-items: baseline;
  margin-top: 1.75rem; font-size: 0.8rem; color: var(--ink-faint);
}
.colophon nav { display: flex; gap: 1.25rem; margin-left: auto; }
.colophon a { color: var(--ink-soft); }

/* ---- contact ----------------------------------------------------------- */

.contact {
  border: 1px solid var(--rule); border-radius: 8px;
  padding: 1.5rem; margin: 1.5rem 0 0; background: var(--paper-cool);
}
.contact p { max-width: none; margin: 0.5rem 0 0; }
.contact .addr {
  font-size: clamp(1.1rem, 3.4vw, 1.5rem); font-weight: 700;
  letter-spacing: -0.02em; word-break: break-word;
}

dl.qa { margin: 1rem 0 0; }
dl.qa dt { font-weight: 700; margin: 1.5rem 0 0.25rem; }
dl.qa dd { margin: 0; max-width: var(--measure); color: var(--ink-soft); }
dl.qa dd p { color: var(--ink-soft); margin: 0.5rem 0; }

@media (max-width: 34rem) {
  body { font-size: 16px; }
  .masthead { padding-top: 1.5rem; }
  /* The hard break is a desktop nicety; at phone widths it fights the
     natural wrap and orphans a word. */
  h1 br { display: none; }
}
