/* ---------------------------------------------------------------
   Sunday Paperboy — shared styling for the legal pages.
   Same palette and type as the rest of the site, set for reading
   rather than for effect.
   --------------------------------------------------------------- */

:root {
  --paper:  #fbfbf9;
  --ink:    #0e0e0d;
  --muted:  #6f6c66;
  --hair:   #e3e1db;
  --rule:   #c9c6be;
  --accent: #d8261c;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", ui-sans-serif, "Segoe UI", Helvetica, Arial, sans-serif;
}

*, *::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: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: min(84rem, 94vw);
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 3.5rem) clamp(1.1rem, 4vw, 2.5rem) clamp(4rem, 10vh, 6rem);
}

/* --- masthead ---------------------------------------------------- */
.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--hair);
}
.top a {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
}
.top span {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- headings ---------------------------------------------------- */
h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: clamp(2rem, 6vh, 3rem) 0 0.4rem;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 clamp(2rem, 5vh, 3rem);
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 2.6rem 0 0.7rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--hair);
}
h2:first-of-type { border-top: 0; padding-top: 0; }

h3 {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.8rem 0 0.5rem;
}

/* --- body -------------------------------------------------------- */
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); }
a:hover { color: #b81f16; }

ul { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin: 0.35rem 0; }

strong { font-weight: 500; }

address {
  font-style: normal;
  margin: 0 0 1rem;
}

.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* a block that needs to stand out — model texts, form templates */
.box {
  border: 1px solid var(--rule);
  background: #fff;
  padding: clamp(1rem, 3vw, 1.6rem);
  margin: 1.2rem 0;
}
.box p:last-child { margin-bottom: 0; }

/* a short definition list, e.g. processor / purpose / country */
.facts {
  margin: 0 0 1.2rem;
  border-top: 1px solid var(--hair);
}
.facts > div {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 0 1.2rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--hair);
}
.facts dt {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  padding-top: 0.12rem;
}
.facts dd { margin: 0; }

/* --- footer ------------------------------------------------------ */
.foot {
  margin-top: clamp(3rem, 8vh, 4.5rem);
  padding-top: 1.2rem;
  border-top: 1px solid var(--hair);
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
}
.foot a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--hair); }
.foot a:hover { color: var(--ink); border-bottom-color: var(--ink); }

@media (max-width: 560px) {
  .facts > div { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* ==============================================================
   WIDE SCREENS
   The heading moves into its own column and the prose runs beside
   it. Uses the full width without stretching a line of text to a
   metre and a half.
   ============================================================== */
@media (min-width: 1000px) {
  .wrap {
    display: grid;
    grid-template-columns: 18rem minmax(0, 1fr);
    column-gap: clamp(2.5rem, 5vw, 5rem);
    align-content: start;
  }

  /* these run across both columns */
  .top, h1, .subtitle, .foot { grid-column: 1 / -1; }

  h2 {
    grid-column: 1;
    border-top: 0;
    padding-top: 0;
    margin: 2.6rem 0 0;
  }

  h3, p, ul, ol, address, dl, .box { grid-column: 2; }

  /* the first element after a heading shares its row, so the space
     above has to match the heading's */
  h2 + p, h2 + ul, h2 + dl, h2 + address, h2 + .box, h2 + h3 {
    margin-top: 2.6rem;
  }
}
