/* Wise Old Pup
   Ink on cool paper, with one loud thing: the tennis ball.
   Type is set large on purpose; most readers arrive on a phone. */

:root {
  --ink: #1c2b33;
  --paper: #f3f6f4;
  --white: #ffffff;
  --ball: #d7e04a;
  --spruce: #24594b;
  --muzzle: #5d6b72;
  --rule: #cfd8d4;

  --display: "Young Serif", Georgia, "Times New Roman", serif;
  --body: "Atkinson Hyperlegible", Verdana, system-ui, sans-serif;

  --measure: 36rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 7.5vw, 3.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); margin-top: 2.2em; }
h3 { font-size: 1.2rem; margin-top: 1.8em; }

p, ul, ol { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.2em; }
li { margin-bottom: 0.45em; }

a { color: var(--spruce); text-decoration-thickness: 0.09em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.18em; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--white); padding: 0.6rem 1rem;
}
.skip:focus { left: 0; z-index: 10; }

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 1.1rem var(--gutter);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--display); font-size: 1.25rem;
  color: var(--ink); text-decoration: none;
}
.wordmark-ball { width: 1.5rem; height: 1.5rem; flex: none; }
.site-header nav { display: flex; gap: 1.4rem; }
.site-header nav a { color: var(--ink); padding: 0.4rem 0; }

/* Page body */
main { display: block; }
.page {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  padding: clamp(1.5rem, 6vw, 4rem) var(--gutter) 4rem;
}
.lede { font-size: 1.2rem; line-height: 1.5; }
.note { color: var(--muzzle); font-size: 0.9rem; }

/* Home hero: the ball sits behind the headline's right edge */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 9vw, 6rem) var(--gutter) clamp(2.5rem, 8vw, 5rem);
}
.hero-text { position: relative; max-width: 40rem; }
.hero h1 { margin-bottom: 0.45em; }
.hero .lede { max-width: 30rem; }
.hero-ball {
  position: absolute;
  width: clamp(13rem, 46vw, 30rem);
  right: clamp(-6rem, -8vw, -3rem);
  top: clamp(-3rem, -4vw, -1rem);
  transform: rotate(-18deg);
}
@media (max-width: 40rem) {
  .hero { padding-top: 8.5rem; }
  .hero-ball { width: 9rem; right: -3rem; top: 0.5rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-ball { animation: roll-in 0.9s cubic-bezier(.2,.8,.2,1) both; }
  @keyframes roll-in {
    from { transform: translateX(45%) rotate(60deg); }
    to   { transform: translateX(0) rotate(-18deg); }
  }
}

.button {
  display: inline-block;
  background: var(--ink); color: var(--white);
  font-family: var(--body); font-weight: 700; font-size: 1rem;
  padding: 0.85rem 1.4rem; border-radius: 999px;
  text-decoration: none;
}
.button:hover { background: var(--spruce); }

/* Plain two-column list of what the site covers */
.covers {
  border-top: 2px solid var(--ink);
  margin: 0 var(--gutter);
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  column-gap: 3rem;
}
.covers li {
  margin: 0;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--rule);
}
.covers strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.25rem; margin-bottom: 0.2rem; }

/* Ink band: how we work */
.band {
  background: var(--ink); color: var(--white);
  margin-top: clamp(3rem, 9vw, 6rem);
  padding: clamp(2.5rem, 8vw, 5rem) var(--gutter);
}
.band-inner { max-width: var(--measure); }
.band h2 { margin-top: 0; }
.band a { color: var(--ball); }
.band a:focus-visible { outline-color: var(--ball); }

/* Guide list */
.guide-list { list-style: none; padding: 0; border-top: 2px solid var(--ink); }
.guide-list li { margin: 0; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.guide-list .status { display: block; color: var(--muzzle); font-size: 0.9rem; }

/* Guide furniture, used by every guide page */
.disclosure-line {
  background: var(--white);
  border-left: 0.4rem solid var(--ball);
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
}
.updated { color: var(--muzzle); font-size: 0.9rem; }
.compare { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 0 0 1.4em; }
.compare th, .compare td { text-align: left; padding: 0.65rem 0.75rem 0.65rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.compare thead th { border-bottom: 2px solid var(--ink); }
.table-scroll { overflow-x: auto; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem var(--gutter) 3rem;
  font-size: 0.9rem;
  color: var(--muzzle);
}
.site-footer p { max-width: var(--measure); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 1.2rem 0; }
.site-footer .copyright { margin: 0; }
