@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/source-serif-4-latin.woff2") format("woff2");
}

:root {
  --paper: #f3f0e8;
  --ink: #1a1814;
  --muted: #4f4a42;
  --red: #961717;
  --on-red: #fff7f5;
  --rule: #d8d1c4;
  --speck: #141210;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.5;
}

a {
  color: inherit;
}

main {
  padding-bottom: 4rem;
}

/* Poster */

.poster-screen {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.poster {
  --pad: clamp(1.25rem, 4svw, 2.75rem);
  container-type: inline-size;
  aspect-ratio: 1;
  width: min(92vw, calc(100svh - 2rem), 46rem);
  margin: 0;
  background: var(--red);
  color: var(--on-red);
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.poster a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.poster h1 {
  margin: 0;
  font-size: clamp(2.4rem, 8cqw, 4.5rem);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.poster-sub {
  margin: 1rem 0 0;
  max-width: 28ch;
  font-size: 1.125rem;
  line-height: 1.375;
  opacity: 0.9;
}

.poster-foot {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.poster-foot p {
  margin: 0;
  max-width: 28ch;
  font-size: 1rem;
  line-height: 1.375;
}

/* The dot's side is the poster's full side divided by sqrt(area ratio). */
.poster-dot {
  width: calc((100cqw + 2 * var(--pad)) / var(--pay-ratio));
  height: calc((100cqw + 2 * var(--pad)) / var(--pay-ratio));
  background: var(--speck);
  flex: none;
}

/* Text column */

.column {
  max-width: 36rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 640px) {
  .column {
    padding: 0 2rem;
  }
}

section {
  margin-top: 2.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}

h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

section p {
  margin: 1rem 0 0;
  text-wrap: pretty;
}

.lede {
  margin: 2.5rem 0 0;
  text-wrap: pretty;
}

.qa {
  margin: 0.75rem 0 0;
}

.qa dt {
  margin-top: 1.25rem;
  font-weight: 600;
}

.qa dt:first-child {
  margin-top: 0;
}

.qa dd {
  margin: 0.25rem 0 0;
  text-wrap: pretty;
}

.share {
  margin-left: 0.5rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--red);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
  cursor: pointer;
}

.print-only {
  display: none;
}

.muted {
  color: var(--muted);
}

.plain {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.plain > li + li {
  margin-top: 0.5rem;
}

.sources > li + li {
  margin-top: 1rem;
}

.sources p {
  margin: 0;
}

.link {
  color: var(--red);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
}

.sources .link {
  display: inline-block;
  margin-top: 0.125rem;
}

footer {
  margin-top: 3rem;
  font-size: 0.875rem;
  color: var(--muted);
}

footer a {
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
}

footer span {
  display: block;
  margin-top: 0.25rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Print: poster on page one, text after, source URLs written out */

@media print {
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  main {
    padding-bottom: 0;
  }

  .poster-screen {
    min-height: 0;
    padding: 0;
    flex-direction: column;
    align-items: stretch;
    break-after: page;
  }

  .print-qr {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    font-size: 14pt;
  }

  .share {
    display: none;
  }

  .poster {
    width: 100%;
  }

  .poster-sub,
  .poster-foot p {
    max-width: 40ch;
  }

  .column {
    max-width: none;
    padding: 0;
  }

  .sources .link::after {
    content: " " attr(href);
    color: var(--muted);
    word-break: break-all;
  }
}

.archived {
  color: var(--muted);
  font-size: 0.875em;
}

table {
  width: 100%;
  margin-top: 0.75rem;
  border-collapse: collapse;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 0.4rem 0.5rem 0.4rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.875rem;
}

td:last-child,
th:last-child {
  text-align: right;
  padding-right: 0;
}

.sources-list summary {
  cursor: pointer;
  list-style: none;
}

.sources-list summary::-webkit-details-marker {
  display: none;
}

.sources-list summary h2 {
  display: inline;
}

.sources-list summary h2::after {
  content: " +";
  color: var(--muted);
  font-weight: 400;
}

.sources-list[open] summary h2::after {
  content: " −";
}

.draft {
  margin: 1.5rem 0 0;
  padding: 0.5rem 0.75rem;
  border: 1px dashed var(--red);
  color: var(--red);
  font-size: 0.875rem;
}

.help {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
}

.help p {
  margin: 0;
}

.help a {
  color: inherit;
  font-weight: 600;
}

.column > h1 {
  margin: 2rem 0 0;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.proposals {
  margin-top: 2rem;
}

.proposals > li + li {
  margin-top: 1rem;
}

.proposals a {
  display: block;
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  border-left: 6px solid var(--red);
  background: #fff;
  text-decoration: none;
}

.proposals a:hover h2,
.proposals a:focus-visible h2 {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.proposals p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

/* No single-word last lines: balance headings, avoid orphans in text. */
h1,
h2,
dt,
summary {
  text-wrap: balance;
}

p,
li,
dd,
td,
figcaption,
.poster-foot p {
  text-wrap: pretty;
}

/* Hierarchy: page title > section heading > body > secondary notes */

.column > h1,
.brand {
  margin: 2.5rem 0 0;
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.mark {
  width: 0.8em;
  height: 0.8em;
  flex: none;
  background: var(--red);
  background-image: linear-gradient(var(--speck), var(--speck));
  background-size: 22% 22%;
  background-position: 18% 82%;
  background-repeat: no-repeat;
}

.lede {
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--ink);
}

section {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--ink);
}

section h2 {
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

section h2 + p,
section h2 + ul,
section h2 + table,
section h2 + dl {
  margin-top: 0.75rem;
}

.callout {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 6px solid var(--red);
  background: #fff;
  font-size: 1.1875rem;
}

.secondary {
  border-top: 1px solid var(--rule);
  font-size: 1rem;
  color: var(--muted);
}

.secondary h2,
.sources-list summary h2 {
  font-size: 1.125rem;
  color: var(--ink);
}

.proposals h2 {
  font-size: 1.375rem;
  line-height: 1.2;
}

.proposals a {
  color: var(--ink);
}

@media print {
  section {
    border-top-width: 1px;
  }

  .callout {
    background: none;
  }
}

/* Site navigation */

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  max-width: 46rem;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--rule);
  font-size: 1rem;
}

.site-nav a {
  text-decoration: none;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.nav-brand .mark {
  width: 1.1rem;
  height: 1.1rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.nav-links a {
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* Poster still fits the first screen under the nav */
.site-nav + main .poster-screen {
  min-height: calc(100svh - 3.25rem);
}

.site-nav + main .poster {
  width: min(92vw, calc(100svh - 5.25rem), 46rem);
}

@media print {
  .site-nav {
    display: none;
  }
}

/* Site footer */

.site-footer {
  margin-top: 4rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 1rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 2rem;
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.site-footer h2 {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d6cfc2;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0.5rem;
}

.site-footer a,
.site-footer button {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #6b645a;
  text-underline-offset: 4px;
}

.site-footer a:hover,
.site-footer button:hover {
  text-decoration-color: var(--paper);
}

.site-footer button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

main {
  padding-bottom: 0;
}

@media print {
  .site-footer {
    display: none;
  }
}

/* Footer sits at the bottom on short pages */
body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

main {
  flex: 1;
}

.site-nav {
  width: 100%;
}

@media print {
  body {
    display: block;
  }
}

@media print {
  .site-nav + main .poster-screen {
    min-height: 0;
  }

  .site-nav + main .poster {
    width: 100%;
  }
}

/* Quick exit for pages about sexual violence */

.quick-exit {
  position: fixed;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 10;
  padding: 0.55rem 0.9rem;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.25);
}

.quick-exit:hover,
.quick-exit:focus-visible {
  background: var(--ink);
}

.quick-exit span {
  font-weight: 400;
  opacity: 0.85;
}

.has-exit .site-nav {
  padding-right: 11rem;
}

@media (max-width: 40rem) {
  .has-exit .site-nav {
    padding-right: 1.25rem;
    padding-top: 3.4rem;
  }

  .quick-exit span {
    display: none;
  }
}

.exit-note {
  margin-top: 0.6rem !important;
  font-size: 0.875rem;
  opacity: 0.8;
}

@media print {
  .quick-exit,
  .exit-note {
    display: none;
  }
}

/* Readability and accessibility (WCAG AAA) */

body {
  font-size: 1.1875rem;
  line-height: 1.6;
}

section p + p,
.column > p + p,
.qa dd + dt {
  margin-top: 1.5em;
}

.lede {
  line-height: 1.5;
}

.in-short {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid var(--rule);
}

.in-short h2 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.in-short p {
  margin: 0.5rem 0 0;
  font-size: 1.1875rem;
}

.poster-sub,
.poster-foot p {
  max-width: 40ch;
  line-height: 1.5;
}

/* The scaled square keeps its exact area; a light inner edge separates it from the red. */
.poster-dot {
  box-shadow: inset 0 0 0 1px var(--on-red);
}

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.poster :focus-visible,
.site-footer :focus-visible,
.help :focus-visible,
.quick-exit:focus-visible {
  outline-color: #fff;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}

.skip-link:focus {
  top: 0.5rem;
}

/* Tap targets at least 44px */
.nav-brand,
.nav-links a,
.site-footer li > a,
.site-footer button,
.share,
.quick-exit,
.sources-list summary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-brand {
  display: flex;
}

.site-footer li + li {
  margin-top: 0.25rem;
}

.quick-exit {
  gap: 0.35em;
}

.poster-sub {
  opacity: 1;
}
