/* weermorgen.com: Delfts blauw op tegelwit, met een streepje oranje. */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/assets/fonts/ibm-plex-sans.woff2') format('woff2');
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f4ee;
  --paper: #ffffff;
  --ink: #0e1f4d;
  --muted: #55618a;
  --line: #d6d9e6;
  --delft: #1a3a8f;
  --delft-deep: #10286b;
  --on-delft: #ffffff;
  --on-delft-muted: #bccaf2;
  --oranje: #f26a1b;
  --oranje-ink: #b8490a;
  --motif: #c9d5f5;
  --rain: #1f4fb5;
  --rain-soft: #dfe7f8;
  --rain-bar: #9db4e6;
  --night: #e6e8f0;
  --good: #1f7a4d;
  --meh: #8a6508;
  --bad: #1f4fb5;
  --focus: #ffb000;
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a122b;
    --paper: #131d40;
    --ink: #e9edf8;
    --muted: #a3aed0;
    --line: #26325c;
    --delft: #8eabf5;
    --delft-deep: #0d1a45;
    --on-delft-muted: #a9b9ea;
    --oranje-ink: #ff9450;
    --motif: #24346b;
    --rain: #7fa2f2;
    --rain-soft: #1c2b5c;
    --rain-bar: #3c5399;
    --night: #0d1633;
    --good: #6cc49a;
    --meh: #e0b84e;
    --bad: #7fa2f2;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--font);
}
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: 54rem; margin: 0 auto; padding: 0 18px; }

/* Blue top: bar and, on the home page, the hero */
.top { background: var(--delft-deep); color: var(--on-delft); border-bottom: 4px solid var(--oranje); }
.bar { padding: 16px 0; }
.bar .wrap { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.brand { font-weight: 700; font-size: 1.15rem; line-height: 1; text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--oranje); }
.bar nav a { color: var(--on-delft-muted); font-size: 0.95rem; }
.bar nav a:hover { color: var(--on-delft); }

.hero { padding-top: 1.5rem; padding-bottom: 2.25rem; }
.hero h1 { color: var(--on-delft-muted); margin-top: 0; }
.hero .day { color: var(--on-delft-muted); }
.hero .day::first-letter { text-transform: uppercase; }
.hero .answer { max-width: 17em; }
.hero .answer .temps { color: var(--on-delft-muted); }

.crumbs { font-size: 0.9rem; color: var(--muted); margin: 1.25rem 0 0.25rem; }
.crumbs a { color: var(--muted); }

/* The answer */
h1 {
  font-weight: 600;
  font-size: clamp(1.1rem, 3.2vw, 1.3rem);
  line-height: 1.2;
  margin: 0.75rem 0 0;
  color: var(--muted);
}
.day { margin: 0; color: var(--muted); }
.answer {
  font-weight: 700;
  font-size: clamp(2rem, 6.6vw, 3.3rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 1.1rem 0 0.6rem;
  text-wrap: balance;
}
.answer .temps { display: block; font-weight: 400; color: var(--muted); margin-top: 0.5rem; font-size: 0.5em; line-height: 1.3; letter-spacing: -0.01em; }
.answer .temps b { color: var(--ink); font-weight: 700; }
.extras { margin: 0; font-weight: 700; }

h2 { font-weight: 700; font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.015em; margin: 2.75rem 0 0.9rem; }
h2::before { content: ''; display: inline-block; width: 0.55em; height: 0.55em; background: var(--oranje); margin-right: 0.5em; }
.sub { color: var(--muted); margin: -0.5rem 0 1rem; font-size: 0.95rem; }

/* Weather icons: line drawings in the text colour */
.ico { display: inline-flex; vertical-align: middle; }
.ico svg { width: 1.5em; height: 1.5em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ico svg .dot { fill: currentColor; stroke: none; }

/* Province tiles: a wall of Delft tiles, one per province */
.tiles { list-style: none; padding: 1px; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; }
.tiles li { outline: 1px solid var(--line); }
.country-name { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 1.75rem 0 0.6rem; }
.tiles a {
  display: grid; grid-template-rows: auto 1fr auto; gap: 0.1rem;
  height: 100%; min-height: 9.25rem; padding: 0.95rem 1rem 0.9rem;
  text-decoration: none; color: var(--ink);
  background-color: var(--paper);
  /* the corner ornament of a Delft tile */
  background-image:
    radial-gradient(circle at 0 0, var(--motif) 0 7px, transparent 8px),
    radial-gradient(circle at 100% 0, var(--motif) 0 7px, transparent 8px),
    radial-gradient(circle at 0 100%, var(--motif) 0 7px, transparent 8px),
    radial-gradient(circle at 100% 100%, var(--motif) 0 7px, transparent 8px);
}
.tiles a:hover .name { text-decoration: underline; text-decoration-thickness: 2px; }
.tiles .name { font-weight: 700; line-height: 1.2; }
.tiles .cap { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.tiles .hi { align-self: center; display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.9rem; line-height: 1; letter-spacing: -0.03em; color: var(--delft); font-variant-numeric: tabular-nums; }
.tiles .hi .ico svg { width: 2.1rem; height: 2.1rem; }
.tiles .hi:empty::before { content: ''; width: 4.5rem; height: 1.9rem; background: var(--bg); }
.tiles .short { font-size: 0.9rem; color: var(--muted); line-height: 1.3; min-height: 1.2rem; }

/* Rain ribbon */
.ribbon { margin: 2rem 0 0.5rem; }
.ribbon-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); align-items: end; gap: 2px; }
.ribbon-col { display: grid; grid-template-rows: 1.3rem 5.5rem 1.3rem; text-align: center; min-width: 0; }
.ribbon-col .t { font-size: 0.78rem; font-weight: 700; align-self: end; }
.ribbon-col .well { position: relative; background: var(--paper); overflow: hidden; }
.ribbon-col.dark .well { background: var(--night); }
.ribbon-col .fill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--rain-bar); height: var(--h); }
.ribbon-col .fill.likely { background: var(--rain); }
.ribbon-col .h { font-size: 0.72rem; color: var(--muted); padding-top: 0.25rem; }
.ribbon-key { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
.ribbon-key i { display: inline-block; width: 0.8rem; height: 0.8rem; vertical-align: -0.1rem; margin-right: 0.35rem; }

/* Verdicts */
.verdicts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 0; }
.verdict { background: var(--paper); padding: 1rem 1.1rem 1.1rem; }
.verdict dt { color: var(--muted); font-size: 0.92rem; }
.verdict dd { margin: 0; }
.verdict .a { display: block; font-weight: 700; font-size: 1.25rem; line-height: 1.2; margin: 0.15rem 0 0.3rem; }
.verdict .a::before { content: ''; display: inline-block; width: 0.6rem; height: 0.6rem; margin-right: 0.5rem; vertical-align: 0.12rem; background: currentColor; }
.verdict .why { font-size: 0.93rem; color: var(--muted); }
.tone-good .a { color: var(--good); }
.tone-meh .a { color: var(--meh); }
.tone-bad .a { color: var(--bad); }

/* Hourly table */
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
th, td { padding: 0.5rem 0.75rem; text-align: right; white-space: nowrap; }
th:first-child, td:first-child, th:nth-child(2), td:nth-child(2) { text-align: left; }
thead th { font-weight: 400; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 0.85rem; }
tbody tr + tr td { border-top: 1px solid var(--line); }
tbody tr.wet td { background: var(--rain-soft); }
td .ico { margin-right: 0.4rem; color: var(--delft); }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.facts dt { color: var(--muted); font-size: 0.9rem; }
.facts dd { margin: 0; font-weight: 700; font-size: 1.2rem; line-height: 1.3; }

/* Town rows (province pages, nearby towns) */
.towns { list-style: none; padding: 0; margin: 0; background: var(--paper); border: 1px solid var(--line); }
.towns li + li { border-top: 1px solid var(--line); }
.towns a { display: grid; grid-template-columns: 1fr auto 4rem; align-items: center; gap: 0.75rem; padding: 0.7rem 1rem; text-decoration: none; }
.towns a:hover .name { text-decoration: underline; }
.towns .name { font-weight: 700; }
.towns .short { color: var(--muted); font-size: 0.92rem; text-align: right; }
.towns .hi { font-weight: 700; font-size: 1.1rem; line-height: 1; text-align: right; color: var(--delft); }
.towns .hi .ico { margin-right: 0.3rem; }
.towns .line { grid-column: 1 / -1; color: var(--muted); font-size: 0.92rem; margin-top: -0.4rem; }
.towns.plain a { grid-template-columns: 1fr auto; }
.towns .hi:empty, .towns .line:empty { display: none; }

/* Home: every town, province by province */
.search { margin: 0 0 1.25rem; }
.search label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.search input {
  width: 100%; font: inherit; font-size: 1.1rem; padding: 0.8rem 0.95rem;
  border: 2px solid var(--delft); border-radius: 0; background: var(--paper); color: var(--ink);
}
.search input::placeholder { color: var(--muted); opacity: 1; }
.province { display: grid; grid-template-columns: 11rem 1fr; gap: 0.25rem 1.5rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.province:last-child { border-bottom: 1px solid var(--line); }
.province[hidden] { display: none; }
.province h4 { margin: 0; font-size: 1.0625rem; font-weight: 700; line-height: 1.55; }
.province h4 a { text-decoration: none; }
.province h4 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.province h4 a::after { content: ' →'; color: var(--oranje-ink); }
.townlinks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.15rem 1.15rem; }
.townlinks a { text-decoration-color: var(--line); }
.townlinks a:hover { text-decoration-color: currentColor; }
.empty { color: var(--muted); }

.prose p { max-width: 38rem; }
.mm { color: var(--muted); font-size: 0.85em; margin-left: 0.25rem; }
.loading { color: var(--muted); margin: 1.5rem 0 8rem; }
.error { margin: 1.5rem 0; font-weight: 700; }
.error button, .near {
  font: inherit; font-weight: 700; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 0; padding: 0.55rem 0.95rem; cursor: pointer;
}
.near { margin-top: 1rem; }
.near:hover, .error button:hover { border-color: var(--ink); }

/* "Bij jou in de buurt" card */
.nearyou { margin: 1.5rem 0 0; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--oranje); padding: 0.9rem 1.1rem 1rem; max-width: 36rem; }
.nearyou p { margin: 0; }
.nearyou-line { display: flex; gap: 0.8rem; align-items: center; font-size: 1.15rem; line-height: 1.3; }
.nearyou-line .ico { color: var(--delft); }
.nearyou-line .ico svg { width: 2.2rem; height: 2.2rem; }
.nearyou-line b { font-weight: 700; }
.nearyou-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1.25rem; margin-top: 0.6rem !important; color: var(--muted); font-size: 0.92rem; }
.nearyou-links .go { color: var(--oranje-ink); font-weight: 700; }
.nearyou-links button, .locate button { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.nearyou-links button:hover, .locate button:hover { color: var(--ink); }
.locate { color: var(--muted); font-size: 0.92rem; margin: 0.25rem 0 0; }
.intro { color: var(--muted); max-width: 38rem; margin-top: 2.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.updated { color: var(--muted); font-size: 0.9rem; margin-top: 2.5rem; }
footer { margin-top: 3rem; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
footer p { margin: 0.25rem 0; }

@media (max-width: 760px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tiles a { min-height: 8.5rem; padding: 0.85rem 0.8rem 0.8rem; }
  .province { grid-template-columns: 1fr; }
  .townlinks li { padding: 0.2rem 0; }
  .verdicts { grid-template-columns: 1fr; }
  th, td { padding: 0.5rem 0.45rem; }
  th:nth-child(4), td:nth-child(4), td .wl { display: none; }
  thead th:nth-child(2) { font-size: 0; }
  .mm { display: none; }
  .ribbon-col .t { font-size: 0.68rem; }
  .ribbon-col .h { font-size: 0.64rem; }
  .towns a { grid-template-columns: 1fr 4rem; }
  .towns .short { grid-column: 1; grid-row: 2; text-align: left; margin-top: -0.35rem; }
  .towns .hi { grid-column: 2; grid-row: 1 / span 2; }
}
@media (prefers-reduced-motion: no-preference) {
  .ribbon-col .fill { animation: rise 0.6s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 18ms); transform-origin: bottom; }
  @keyframes rise { from { transform: scaleY(0); } }
}

/* Long-form pages */
.prose h2 { margin-top: 2.25rem; }
.more { font-weight: 700; }
main > h1:first-child { margin-top: 1.5rem; }
.og { width: 1200px; height: 630px; background: var(--delft-deep); color: #fff; border-bottom: 14px solid var(--oranje); padding: 70px 80px; display: flex; flex-direction: column; justify-content: space-between; }
