/* Base: fonts, reset, type scale, layout, masthead, footer. Tokens in tokens.css. */

@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ------------------------------------------------------------ reset */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-weight: 400;
  font-kerning: normal;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ring: var(--page);
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
svg { flex: none; }
p, ul, ol, dl, figure, blockquote, h1, h2, h3, h4 { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; }
abbr[title] { text-decoration: none; }
[hidden] { display: none !important; }
main:focus { outline: none; }

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

.display, h1, .h1, h2, .h2, h3, .h3 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  text-wrap: balance;
  color: var(--ink);
}
.display {
  font-size: var(--t-display);
  line-height: var(--lh-display);
  font-weight: 500;
  letter-spacing: -0.012em;
}
h1, .h1 { font-size: var(--t-h1); line-height: var(--lh-h1); font-weight: 500; letter-spacing: -0.008em; }
h2, .h2 { font-size: var(--t-h2); line-height: var(--lh-h2); font-weight: 560; letter-spacing: -0.004em; }
h3, .h3 { font-family: var(--sans); font-size: var(--t-body); line-height: var(--lh-body); font-weight: 650; }
.lede {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 28px;
  color: var(--ink-2);
  max-width: 62ch;
  text-wrap: pretty;
}
.small, small { font-size: var(--t-small); line-height: var(--lh-small); }
.eyebrow {
  font-family: var(--sans);
  font-size: var(--t-micro);
  line-height: var(--lh-micro);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  font-weight: 650;
  color: var(--ink-3);
}
.prose { max-width: 66ch; }
/* Every page head's lede is one size: 18/28 on a phone, 20/30 from 768px. */
@media (min-width: 768px) {
  .xhead .lede, .since-head .lede, .grp-head .lede, .cp-head .lede { font-size: 20px; line-height: 30px; }
}
.prose p + p { margin-top: var(--s4); }
.num, .tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.secondary { color: var(--ink-2); }
strong, b { font-weight: 650; }

a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px;
    text-underline-offset: 0.2em; text-decoration-color: var(--axis); }
a:hover { text-decoration-color: currentColor; }

kbd {
  font-family: var(--sans);
  font-size: var(--t-micro);
  line-height: 1;
  font-weight: 600;
  color: var(--ink-3);
  border: 1px solid var(--hairline);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 2px 5px;
  background: var(--surface);
}

/* Visually hidden, still read aloud. */
.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------ focus */

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}
.skip {
  position: absolute;
  left: var(--gutter);
  top: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--page);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--r-chip);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ------------------------------------------------------------ layout */

.wrap {
  width: 100%;
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
main { display: block; min-height: 50vh; }
.stack > * + * { margin-top: var(--s4); }
.section { padding-block: var(--s7); }
.section + .section { border-top: 1px solid var(--hairline); }

.fixture-banner {
  margin: 0;
  padding: 6px var(--gutter);
  background: var(--ink);
  color: var(--page);
  font-size: var(--t-micro);
  line-height: var(--lh-micro);
  letter-spacing: 0.02em;
  text-align: center;
}

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

.masthead { padding-top: 10px; }
.masthead__bar {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "mark tools" "nav nav";
  align-items: center;
  column-gap: var(--s4);
}
.wordmark {
  grid-area: mark;
  justify-self: start;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 23px;
  line-height: 28px;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  padding-block: 8px;
  white-space: nowrap;
}
.masthead__tools { grid-area: tools; display: flex; align-items: center; gap: 4px; margin-right: -10px; }
.nav {
  grid-area: nav;
  position: relative;
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}
.nav::-webkit-scrollbar { display: none; }
.nav__list { display: flex; gap: 20px; white-space: nowrap; padding-right: 32px; }
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  font-size: var(--t-small);
  line-height: var(--lh-small);
  font-weight: 520;
  color: var(--ink-2);
  text-decoration: none;
  position: relative;
}
a.nav__link:hover { color: var(--ink); }
.nav__link[aria-current="page"] { color: var(--ink); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 9px;
  height: 1px;
  background: var(--ink);
}
.nav__link--off { color: var(--ink-3); cursor: default; }

.tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: var(--touch);
  height: var(--touch);
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-chip);
  background: transparent;
  color: var(--ink-2);
  text-decoration: none;
  font-size: var(--t-small);
  font-weight: 520;
}
.tool:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.tool__icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.tool__fill { fill: currentColor; stroke: none; }
.tool__label, .tool__kbd { display: none; }
.tool--theme[aria-pressed="true"] .tool__fill { transform: rotate(180deg); transform-origin: 10px 10px; }

.masthead__rule { height: 2px; background: var(--brand); margin-top: 2px; }

@media (min-width: 768px) {
  .masthead { padding-top: 14px; }
  .wordmark { font-size: 28px; line-height: 32px; padding-block: 10px; }
  .tool--search { border: 1px solid var(--hairline); height: 36px; padding: 0 8px 0 10px; margin-right: 6px; background: var(--surface); }
  .tool--search:hover { border-color: var(--axis); background: var(--surface); }
  .tool__label, .tool__kbd { display: inline; }
  .tool__kbd { margin-left: 6px; }
  .nav { margin-inline: 0; padding-inline: 0; -webkit-mask-image: none; mask-image: none; overflow: visible; }
  .nav__list { gap: 24px; padding-right: 0; }
  .nav__link { min-height: 40px; }
  .nav__link[aria-current="page"]::after { bottom: 7px; }
}
@media (min-width: 1100px) {
  .masthead__bar { grid-template-columns: auto 1fr auto; grid-template-areas: "mark nav tools"; }
  .nav { justify-self: end; margin-right: var(--s3); }
  .nav__link { min-height: var(--touch); }
  .nav__link[aria-current="page"]::after { bottom: 10px; }
}

/* The ruler strip: hairline ticks hanging from the masthead rule. */
.ruler-strip { position: relative; height: 12px; }
.ruler-strip__zone {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: color-mix(in srgb, var(--range) 28%, transparent);
}
.rs-t { position: absolute; top: 0; width: 1px; height: 7px; background: var(--ink-3); transform: translateX(-0.5px); }
.rs-t--minor { height: 3px; background: var(--axis); }
.rs-t--zero { height: 12px; }
.ruler-strip__notch {
  position: absolute; top: 0;
  width: 0; height: 0;
  margin-left: -5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 9px solid var(--ink);
}
.rs-t--start { transform: none; }
.rs-t--end { transform: translateX(-1px); }

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

.footer {
  margin-top: var(--s8);
  border-top: 1px solid var(--hairline);
  padding-block: var(--s6) var(--s7);
  font-size: var(--t-small);
  line-height: var(--lh-small);
  color: var(--ink-2);
}
.footer__inner { display: grid; gap: var(--s5); }
.footer__name { font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 26px; color: var(--ink); }
.footer__tagline { margin-top: 4px; max-width: 40ch; }
.footer__list { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer__nav a, .footer__meta a, .footer__off { display: inline-flex; align-items: center; min-height: var(--touch); text-decoration: none; }
.footer__off { color: var(--ink-3); }
.footer__nav a:hover, .footer__meta a:hover { text-decoration: underline; }
.footer__stamp { color: var(--ink-3); font-size: var(--t-micro); line-height: var(--lh-micro); font-variant-numeric: tabular-nums; }
@media (min-width: 768px) {
  .footer__inner { grid-template-columns: 5fr 4fr 3fr; align-items: start; }
  .footer__list { flex-direction: column; gap: 0; }
  .footer__nav a, .footer__meta a, .footer__off { min-height: 32px; }
  .footer__meta { text-align: right; }
}

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

.page-404 { padding-block: var(--s8) var(--s7); }
.page-404 .display { margin-top: var(--s3); max-width: 18ch; }
.page-404 .lede { margin-top: var(--s4); }
.page-404 .actions { margin-top: var(--s5); display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ------------------------------------------------------------ motion & print */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; }
}
@media print {
  .masthead__tools, .nav, .skip, .search, .sheet, .fixture-banner { display: none !important; }
  body { background: #fff; }
  /* A chart, a card, a figure and a short table stay whole on one page, a heading
     stays with what follows it, and no table row splits. */
  .chart, .card, figure, .figure, .tray, .receipt, tr,
  table:not(:has(tbody tr:nth-child(13))) { break-inside: avoid; }
  h2, h3, .chart__sentence { break-after: avoid; }
  thead { display: table-header-group; }
  /* The address of the filing prints after the receipt line. */
  a.receipt__link { flex-wrap: wrap; max-width: 100%; }
  a.receipt__link::after { content: attr(href); flex: 1 0 100%; margin: 2px 0 0 17px; overflow-wrap: anywhere; }
}
