/* Credit Hacked: flag red, report-paper white, ink. Dark mode is a winter night. */
:root {
  --red: #d52b1e;
  --paper: #f5f6f7;
  --sheet: #ffffff;
  --ink: #15171c;
  --muted: #545b67;
  --rule: #d9dce1;
  --leaf: #d52b1e;
  --link: #b3231a;
  --focus: #1f5fd1;
  --display: "Archivo", "Arial Narrow", sans-serif;
  --body: "Literata", Georgia, serif;
  --measure: 66ch;
  color-scheme: light;
}
[data-theme="dark"] {
  --paper: #0e1626;
  --sheet: #141e31;
  --ink: #eef1f5;
  --muted: #a7b0bf;
  --rule: #26324a;
  --leaf: #e2382b;
  --link: #ff7a6e;
  --focus: #8fb4ff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.7;
  transition: background-color .25s ease, color .25s ease;
}
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* Masthead */
.masthead {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1rem clamp(1.25rem, 4vw, 3rem);
  position: relative; z-index: 3;
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink);
  font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: 1.35rem; letter-spacing: -.01em; }
.brand-leaf { width: 1.4rem; height: 1.4rem; fill: var(--leaf); }
.nav { display: flex; gap: 1.25rem; margin-left: auto; font-family: var(--display); font-stretch: 90%; font-weight: 600; font-size: 1rem; }
.nav a { color: var(--ink); text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--red); }
.theme-toggle { flex: none; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--ink); border: 1.5px solid var(--rule); border-radius: 50%; }
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .icon-moon { fill: currentColor; stroke: none; }
[data-theme="light"] .icon-sun, [data-theme="dark"] .icon-moon { display: none; }

/* Hero: the one loud thing */
.hero {
  position: relative; overflow: hidden;
  min-height: min(92vh, 860px);
  padding: clamp(3rem, 9vh, 7rem) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 8vh, 6rem);
  display: grid; align-content: end;
  border-bottom: 6px solid var(--red);
}
.hero-leaf {
  position: absolute; right: -14vw; top: -6vh;
  width: min(88vw, 1100px); height: auto; fill: var(--leaf);
  transform-origin: 50% 60%;
  animation: leaf-in 1.1s cubic-bezier(.2,.7,.2,1) both;
}
[data-theme="dark"] .hero-leaf { opacity: .9; }
@keyframes leaf-in { from { transform: rotate(-9deg) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.hero h1 {
  position: relative; margin: 0; max-width: 11ch;
  font-family: var(--display); font-weight: 900; font-stretch: 62%;
  font-size: clamp(4rem, min(13vw, 16vh), 12.5rem); line-height: .86; letter-spacing: -.02em;
  color: var(--ink);
  text-wrap: balance;
}
.hero h1 span { display: block; }
.hero-sub {
  position: relative; max-width: 34rem; margin: 2rem 0 0;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55;
  background: var(--paper); padding: .9rem 1.1rem .9rem 0;
}
.hero-actions { position: relative; display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.btn {
  display: inline-block; font-family: var(--display); font-stretch: 90%; font-weight: 700; font-size: 1.05rem;
  padding: .85rem 1.4rem; border-radius: 3px; text-decoration: none; border: 2px solid var(--ink);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-plain { background: var(--paper); color: var(--ink); }
.btn-plain:hover { border-color: var(--red); color: var(--red); }
.hero-note { position: relative; margin: 1.4rem 0 0; font-size: .95rem; color: var(--muted); background: var(--paper); display: inline-block; padding-right: .6rem; }

/* Home sections */
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }
.section { padding: clamp(3rem, 8vw, 6rem) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section h2 {
  font-family: var(--display); font-weight: 800; font-stretch: 75%;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1; letter-spacing: -.01em; margin: 0 0 1.5rem; max-width: 18ch;
}
.section > .wrap > p { max-width: var(--measure); }
.guides { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 0; }
.guides li { border-top: 2px solid var(--ink); }
.guides li:last-child { border-bottom: 2px solid var(--ink); }
.guides a {
  display: grid; grid-template-columns: minmax(12rem, 22rem) 1fr; gap: 1rem 2.5rem;
  padding: 1.6rem 0; text-decoration: none; color: var(--ink);
}
.guides a:hover .guide-title { color: var(--red); }
.guide-title { font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.05; }
.guide-desc { color: var(--muted); max-width: 52ch; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); }
.split p { margin-top: 0; }

/* Article pages */
.article { max-width: calc(var(--measure) + 2.5rem); margin: 0 auto; padding: clamp(2.5rem, 7vw, 5rem) clamp(1.25rem, 4vw, 1.25rem) 5rem; }
.article h1 {
  font-family: var(--display); font-weight: 900; font-stretch: 62%;
  font-size: clamp(3rem, 8vw, 5.6rem); line-height: .92; letter-spacing: -.015em; margin: 0 0 1.25rem;
}
.article .lede { font-size: 1.3rem; line-height: 1.55; color: var(--muted); margin: 0 0 2.5rem; }
.article h2 { font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: 2rem; line-height: 1.1; margin: 3rem 0 .75rem; }
.article h3 { font-family: var(--display); font-weight: 700; font-stretch: 85%; font-size: 1.35rem; margin: 2rem 0 .5rem; }
.article ol, .article ul { padding-left: 1.3rem; }
.article li { margin: .45rem 0; }
.article li::marker { color: var(--red); font-family: var(--display); font-weight: 800; }
.article table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 1rem; }
.article th, .article td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.article th { font-family: var(--display); font-stretch: 85%; font-weight: 700; border-bottom: 2px solid var(--ink); }
.callout { border-left: 6px solid var(--red); background: var(--sheet); padding: 1.1rem 1.3rem; margin: 2rem 0; }
.callout p { margin: 0; }
.letter {
  background: var(--sheet); border: 1px solid var(--rule); padding: 1.6rem 1.8rem; margin: 1.5rem 0;
  font-family: var(--body); font-size: 1rem; line-height: 1.65; white-space: pre-wrap;
}
.copy-btn { font-family: var(--display); font-stretch: 90%; font-weight: 700; font-size: .95rem; cursor: pointer;
  padding: .55rem 1rem; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 3px; }
.copy-btn:hover { border-color: var(--red); color: var(--red); }
.sources { margin-top: 3.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: .95rem; color: var(--muted); }
.sources h2 { font-size: 1.3rem; margin-top: 0; }
.updated { font-size: .95rem; color: var(--muted); }

/* Footer */
.footer { border-top: 6px solid var(--red); background: var(--sheet); margin-top: 2rem; }
.footer-inner { max-width: 72rem; margin: 0 auto; padding: 2.5rem clamp(1.25rem, 4vw, 3rem); font-size: .95rem; color: var(--muted); }
.footer-inner p { max-width: var(--measure); margin: 0 0 .8rem; }
.footer-brand { font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: 1.3rem; color: var(--ink); }

@media (max-width: 760px) {
  .nav { display: none; }
  .theme-toggle { margin-left: auto; }
  .hero { min-height: 88vh; }
  .hero-leaf { right: -38vw; top: -2vh; width: 135vw; }
  .guides a { grid-template-columns: 1fr; gap: .4rem; }
  .split { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-leaf { animation: none; }
  body { transition: none; }
}
