/* The Long Table — shared stylesheet */

:root {
  --paper: #EAEBE3;
  --paper-deep: #E1E3D8;
  --ink: #1A1F19;
  --muted: #5C6459;
  --rule: #C3C7B9;
  --olive: #3D5140;
  --oak: #8A6E4B;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);

  --display: "Petrona", Georgia, "Times New Roman", serif;
  --body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", 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(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.002em;
}

/* ---------- skip link ---------- */

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

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

/* ---------- shell ---------- */

.shell {
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.column { max-width: var(--measure); }

/* ---------- masthead bar ---------- */

.bar {
  padding: 1.75rem 0 1.25rem;
}

.bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
}

.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

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

.bar nav a {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.bar nav a:hover,
.bar nav a[aria-current="page"] { color: var(--ink); }

/* ---------- the table edge (signature) ---------- */

.edge {
  position: relative;
  height: 13px;
  border-top: 1px solid var(--rule);
}

.edge span {
  position: absolute;
  top: 0;
  width: 2px;
  height: 12px;
  background: var(--oak);
}

.edge span:nth-child(1) { left: 6%; }
.edge span:nth-child(2) { left: 29%; }
.edge span:nth-child(3) { left: 52%; }
.edge span:nth-child(4) { left: 75%; }

.edge--hero { margin: 2.5rem 0 0; border-top-color: var(--ink); }
.edge--section { margin: 4.5rem 0 2.25rem; }

/* ---------- type ---------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2rem, 5.5vw, 3.125rem);
  max-width: 18ch;
}

h2 { font-size: clamp(1.375rem, 3vw, 1.75rem); }

h3 { font-size: 1.125rem; margin-bottom: 0.35rem; }

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

a { color: var(--olive); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--oak);
  margin: 0 0 1.1rem;
}

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

.small { font-size: 0.9375rem; color: var(--muted); }

.hero { padding: 2rem 0 0.5rem; }

section { margin: 0; }

/* ---------- notes list ---------- */

.notes { list-style: none; margin: 0; padding: 0; }

.notes li { border-bottom: 1px solid var(--rule); }
.notes li:first-child { border-top: 1px solid var(--rule); }

.notes a {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 0 1rem;
  padding: 1.35rem 0;
  text-decoration: none;
  color: var(--ink);
}

.notes a:hover { background: var(--paper-deep); }

.notes .num {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--oak);
  line-height: 1.2;
}

.notes .title {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.2rem;
}

.notes .blurb {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 46ch;
}

/* ---------- numbered standards ---------- */

.standards { counter-reset: std; margin: 0; padding: 0; list-style: none; }

.standards li {
  counter-increment: std;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1.5rem;
  max-width: var(--measure);
}

.standards li::before {
  content: counter(std);
  position: absolute;
  left: 0;
  top: -0.15rem;
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--oak);
}

.standards p { margin: 0; }

/* ---------- plain list ---------- */

.plain { padding-left: 1.15rem; max-width: var(--measure); }
.plain li { margin-bottom: 0.55rem; }

/* ---------- questions ---------- */

.qa { margin: 0; max-width: var(--measure); }

.qa dt {
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-top: 1.5rem;
}

.qa dd { margin: 0.3rem 0 0; color: var(--muted); }

/* ---------- support panel ---------- */

.panel {
  background: var(--paper-deep);
  border-left: 3px solid var(--olive);
  padding: 1.5rem 1.5rem 1.25rem;
  max-width: var(--measure);
}

.panel p:last-child { margin-bottom: 0; }

/* ---------- article body ---------- */

.article { padding-top: 1.5rem; }

.article h1 { max-width: 22ch; }

.article h2 {
  margin-top: 2.5rem;
  font-size: 1.3125rem;
}

.byline {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}

.sources {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: var(--measure);
}

.sources li { margin-bottom: 0.6rem; }

/* ---------- legal ---------- */

.legal h2 { margin-top: 2.5rem; font-size: 1.1875rem; }
.legal p, .legal li { font-size: 1rem; }

/* ---------- footer ---------- */

footer {
  margin-top: 5rem;
  padding: 2.5rem 0 4rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--muted);
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1.25rem;
}

footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }

footer p { max-width: 52ch; margin-bottom: 0.75rem; }

/* ---------- 404 ---------- */

.notfound { padding: 4rem 0 2rem; }

/* ---------- narrow screens ---------- */

@media (max-width: 30rem) {
  body { font-size: 1rem; }
  .notes a { grid-template-columns: 2.25rem 1fr; gap: 0 0.75rem; }
  .notes .num { font-size: 1.25rem; }
  .notes .title { font-size: 1.125rem; }
  .panel { padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
