/*
 * Whitebeam, shared styling for the apex page and the guides.
 *
 * The palette comes from the name rather than from a swatch generator. A
 * whitebeam is a tree whose leaves are dark green above and silver-white
 * underneath, so they turn over and flash pale in wind. That gives a green so
 * deep it reads as ink, a pewter grey with a green bias rather than a dead
 * neutral, and a paper that is warm but not cream. It is a palette nobody else
 * in this category is using, which is most of the job.
 *
 * Type is Newsreader over IBM Plex Sans. The subject is regulation, and a
 * serif carries authority that a geometric sans has to borrow.
 */

:root {
  --paper: #f7f8f5;
  --raised: #ffffff;
  --ink: #16211b;
  --ink-soft: #4a5750;
  --ink-faint: #6f7c75;
  --rule: #dfe4dd;
  --green: #1f5d43;
  --green-deep: #14402f;
  --pewter: #8b9a92;
  --eu-blue: #003399;
  --eu-yellow: #ffcc00;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1310;
    --raised: #141c18;
    --ink: #e8ede9;
    --ink-soft: #a9b5ae;
    --ink-faint: #8a968f;
    --rule: #26322c;
    --green: #6fc79c;
    --green-deep: #a8dcc2;
    --pewter: #7c8a83;
  }
}

* { 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.65;
  -webkit-font-smoothing: antialiased;
}

/* One gutter, set once, never zeroed by a padding shorthand elsewhere. */
.wrap {
  width: 100%;
  max-width: 54rem;
  margin: 0 auto;
  padding-inline: 20px;
}

.wrap--text { max-width: 44rem; }

a { color: var(--green); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--green-deep); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 2px; }

/* Masthead ---------------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  background: var(--paper);
  z-index: 10;
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

/* The mark: a leaf turning over, dark face and pale underside. */
.leaf { width: 18px; height: 18px; flex: none; display: block; }

.masthead nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
  font-size: 0.88rem;
}

.masthead nav a { color: var(--ink-soft); text-decoration: none; }
.masthead nav a:hover { color: var(--green); text-decoration: underline; }

/* Typography -------------------------------------------------------------- */

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; text-wrap: balance; }

h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 18px;
}

h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); line-height: 1.2; margin: 0 0 12px; }
h3 { font-size: 1.1rem; margin: 0 0 6px; }

p { margin: 0 0 1.1em; max-width: var(--measure); }

.lede { font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--ink-soft); line-height: 1.55; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pewter);
  margin: 0 0 14px;
}

.section { padding-block: clamp(48px, 8vw, 84px); }
.section + .section { border-top: 1px solid var(--rule); }

/* Components -------------------------------------------------------------- */

.countdown {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--eu-blue);
  color: var(--eu-yellow);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.stack { display: flex; flex-direction: column; gap: 14px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 18px; }

.card {
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card p { margin: 0; max-width: none; color: var(--ink-soft); font-size: 0.96rem; }

.status {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid var(--rule);
  color: var(--ink-faint);
}

.status--live { border-color: var(--green); color: var(--green); }

.card__link { margin-top: auto; font-size: 0.95rem; }

/* A claim with its source attached, which is the whole posture of this site. */
.sourced {
  border-left: 2px solid var(--green);
  padding: 2px 0 2px 18px;
  margin: 26px 0;
  color: var(--ink-soft);
}

.sourced cite { display: block; font-style: normal; font-family: var(--mono); font-size: 0.74rem; color: var(--ink-faint); margin-top: 8px; }

figure { margin: 28px 0; }

figure img {
  display: block;
  width: 100%;
  max-width: 330px;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--rule);
}

figcaption { font-size: 0.86rem; color: var(--ink-faint); text-align: center; margin-top: 12px; }

.btn {
  display: inline-block;
  background: var(--green);
  color: var(--paper);
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.96rem;
}

.btn:hover { background: var(--green-deep); color: var(--paper); }

@media (prefers-color-scheme: dark) {
  .btn { color: #0d1310; }
  .btn:hover { color: #0d1310; }
}

ul.plain { margin: 0 0 1.1em; padding-left: 1.1em; max-width: var(--measure); color: var(--ink-soft); }
ul.plain li { margin-bottom: 6px; }

dl { margin: 0; max-width: var(--measure); }
dt { font-weight: 600; margin-top: 22px; }
dd { margin: 4px 0 0; color: var(--ink-soft); }

.foot {
  border-top: 1px solid var(--rule);
  padding-block: 28px 40px;
  font-size: 0.88rem;
  color: var(--ink-faint);
}

.foot p { max-width: none; }
.foot a { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
