:root {
  /* Register: gazette paper, olive ink, a mono hand for anything a clerk would stamp */
  --paper: #faf9f5;
  --paper-2: #f1efe7;
  --paper-3: #e8e5da;
  --rule: #ddd8cb;
  --rule-2: #c9c3b3;
  --ink: #1c1917;
  --ink-2: #45483e;
  --ink-3: #6b6f62;
  --olive: #3c4b26;
  --olive-2: #53633c;
  --sage: #dce3cb;
  --mark: #7fa63c;
  --focus: #3c4b26;
  --font-display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  /* layout: one register column, a year rail at the left, rows as a five-column ledger */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15170f; --paper-2: #1b1e14; --paper-3: #23271a;
    --rule: #2d3224; --rule-2: #3d4432;
    --ink: #ece9df; --ink-2: #c4c3b6; --ink-3: #8f9385;
    --olive: #b9cb9b; --olive-2: #9fb281; --sage: #2c361f; --mark: #8fb84a; --focus: #c6d6a7;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #15170f; --paper-2: #1b1e14; --paper-3: #23271a;
  --rule: #2d3224; --rule-2: #3d4432;
  --ink: #ece9df; --ink-2: #c4c3b6; --ink-3: #8f9385;
  --olive: #b9cb9b; --olive-2: #9fb281; --sage: #2c361f; --mark: #8fb84a; --focus: #c6d6a7;
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* .row and .year set display: grid, which would otherwise beat the attribute. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.55 var(--font-ui); font-feature-settings: "ss01";
}
a { color: inherit; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--olive); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.sc { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }

.mast { border-bottom: 1px solid var(--rule-2); padding: 28px 0 20px; }
.mast .wrap { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.brand { text-decoration: none; display: block; }
.brand .amicably { font: italic 500 30px/1 var(--font-display); letter-spacing: -.02em; color: var(--olive); }
.brand .signal { display: block; margin-top: 6px; font: 600 12px/1 var(--font-ui); letter-spacing: .28em; text-transform: uppercase; color: var(--ink-2); }
.formats { display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: baseline; }
.formats .sc { color: var(--ink-3); }
.formats a { font-family: var(--font-mono); font-size: 13px; text-decoration: none; border-bottom: 1px solid var(--rule-2); padding-bottom: 1px; }
.formats a:hover { border-color: var(--olive); color: var(--olive); }

.notice { padding: 28px 0 24px; border-bottom: 1px solid var(--rule); }
.notice .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 56px; }
.notice .watch { grid-column: 2; grid-row: 1 / span 2; }
.notice .fmts { grid-column: 1; align-self: start; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.notice .fmts h2, .notice .fmts .how { grid-column: 1 / -1; }
.notice .fmts a { grid-template-columns: 1fr; grid-template-rows: 1fr auto; gap: 4px; border-bottom: 1px solid var(--rule); }
.notice h1 { margin: 0 0 10px; font: 400 clamp(28px, 3.4vw, 40px)/1.12 var(--font-display); letter-spacing: -.012em; text-wrap: balance; }
.notice h1 em { font-style: italic; color: var(--olive); }
.notice p.standing { margin: 0; font: 400 17px/1.55 var(--font-display); color: var(--ink-2); max-width: 62ch; }
.notice p.standing strong { font-weight: 500; color: var(--ink); }
.watch { font-size: 13.5px; }
.watch h2 { margin: 0 0 10px; font: 600 11px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.watch dl { margin: 0; display: grid; grid-template-columns: 7.5em 1fr; gap: 6px 14px; }
.watch dt { color: var(--ink-3); font-family: var(--font-mono); font-size: 12px; padding-top: 2px; }
.watch dd { margin: 0; color: var(--ink-2); }
.names summary { cursor: pointer; }
.names summary:hover { color: var(--olive); }
.names p { margin: 6px 0 0; }
.watch .checked { text-wrap: pretty; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); }

.filters { padding: 16px 0 10px; position: sticky; top: 0; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); z-index: 5; border-bottom: 1px solid var(--rule); }
.filters .wrap { display: grid; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips .lbl { font: 600 11px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); width: 6.5em; }
.chip {
  font: 500 12px/1 var(--font-mono); letter-spacing: .02em; padding: 6px 9px; border: 1px solid var(--rule-2);
  background: transparent; color: var(--ink-2); border-radius: 3px; cursor: pointer;
}
.chip.k { font-family: var(--font-ui); letter-spacing: 0; font-size: 12.5px; }
.chip:hover { border-color: var(--olive-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--olive); border-color: var(--olive); color: var(--paper); }
.chip .c { opacity: .6; margin-left: 5px; }
.shown { font: 400 12.5px/1 var(--font-mono); color: var(--ink-3); margin-left: auto; }

.register { padding: 8px 0 48px; }
.year { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0 24px; }
.year + .year { margin-top: 10px; }
.year > h2 {
  position: sticky; top: 108px; align-self: start; margin: 0; padding: 22px 0 0;
  font: 400 34px/1 var(--font-display); color: var(--olive); font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.year > h2 small { display: block; margin-top: 8px; font: 400 12px/1.3 var(--font-mono); color: var(--ink-3); }
.rows { border-top: 1px solid var(--rule-2); }
.row {
  display: grid; grid-template-columns: 7.2rem 3.4rem 7.6rem minmax(0, 1fr) 12rem;
  gap: 0 18px; padding: 16px 0 17px; border-bottom: 1px solid var(--rule); align-items: baseline;
}
.row:hover { background: linear-gradient(90deg, transparent, var(--paper-2) 8%, var(--paper-2) 92%, transparent); }
.row .d { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row .d .eff { display: block; font-size: 12px; color: var(--ink-3); margin-top: 3px; white-space: nowrap; }
.stamp { display: inline-block; min-width: 2.2em; text-align: center; font: 500 11px/1 var(--font-mono); padding: 4px 4px 3px; border: 1px solid var(--rule-2); border-radius: 2px; color: var(--ink-2); letter-spacing: .06em; }
.stamp.all { border-style: dashed; }
.row .kd { font-size: 12px; line-height: 1.35; color: var(--ink-2); }
.row .kd b { display: block; font-weight: 600; color: var(--ink); letter-spacing: .02em; }
.row .kd span { color: var(--ink-3); }
.row h3 { margin: 0 0 4px; font: 500 19px/1.25 var(--font-display); letter-spacing: -.005em; text-wrap: pretty; }
.row h3 a { text-decoration: none; }
.row h3 a:hover { color: var(--olive); text-decoration: underline; }
.row p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; max-width: 68ch; }
.row .id { margin-top: 8px; font: 400 11.5px/1.3 var(--font-mono); color: var(--ink-3); overflow-wrap: anywhere; }
.row .id a { text-decoration: none; color: inherit; }
.row .id a:hover { color: var(--olive); }
.row .af { font-size: 12px; line-height: 1.5; color: var(--ink-2); }
.row .af span { display: block; }
.row .af span::before { content: "\2022"; color: var(--mark); margin-right: 7px; }
.empty { padding: 40px 0; font: 400 16px/1.5 var(--font-display); color: var(--ink-3); }

footer { border-top: 1px solid var(--rule-2); padding: 28px 0 56px; color: var(--ink-3); font-size: 13px; }
footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 40px; align-items: start; }
footer p { margin: 0 0 8px; max-width: 70ch; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer nav a { text-decoration: none; font-family: var(--font-mono); font-size: 12.5px; }

/* entry page */
.crumbs { padding: 18px 0 0; font: 400 12.5px/1.4 var(--font-mono); color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--olive); }
.record { padding-top: 26px; padding-bottom: 40px; display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 32px 56px; }
.record > .body { min-width: 0; }
.record .no { font: 500 12.5px/1.35 var(--font-mono); color: var(--ink-3); letter-spacing: .02em; overflow-wrap: anywhere; }
.record h1 { margin: 12px 0 18px; font: 400 clamp(30px, 4vw, 46px)/1.1 var(--font-display); letter-spacing: -.014em; text-wrap: balance; }
.facts { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 22px; padding: 16px 0; border-top: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule); font-size: 14px; }
.facts dt { color: var(--ink-3); font: 600 11px/1.6 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; }
.facts dd { margin: 0; color: var(--ink); }
.facts dd.mono { font-size: 13.5px; }
.summary { font: 400 20px/1.5 var(--font-display); color: var(--ink); margin: 24px 0 0; max-width: 64ch; }
.source { margin: 28px 0 0; padding: 18px 20px; border: 1px solid var(--rule-2); border-radius: 4px; max-width: 64ch; }
.source .sc { color: var(--ink-3); display: block; margin-bottom: 6px; }
.source b { font-weight: 600; }
.source a { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 13px; overflow-wrap: anywhere; color: var(--olive); }
.refs { margin: 28px 0 0; }
.refs h2, .side h2 { margin: 0 0 10px; font: 600 11px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.refs table { border-collapse: collapse; width: 100%; max-width: 64ch; font-size: 14px; }
.refs td { padding: 8px 0; border-top: 1px solid var(--rule); vertical-align: top; }
.refs td:first-child { color: var(--ink-3); width: 9em; font-size: 12.5px; padding-top: 10px; }
.refs td.mono { font-size: 13.5px; }
.side { min-width: 0; }
.side section + section { margin-top: 26px; }
.side .af li { list-style: none; padding: 5px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.side .af { margin: 0; padding: 0; }
.side .af li:last-child { border-bottom: 1px solid var(--rule); }
.side .nav a { display: block; text-decoration: none; padding: 10px 0; border-top: 1px solid var(--rule); font-size: 14px; }
.side .nav a:last-child { border-bottom: 1px solid var(--rule); }
.side .nav .sc { display: block; color: var(--ink-3); margin-bottom: 3px; }
.side .nav a:hover { color: var(--olive); }
button.copy { font: 500 12px/1 var(--font-mono); padding: 6px 10px; border: 1px solid var(--rule-2); background: transparent; color: var(--ink-2); border-radius: 3px; cursor: pointer; }
button.copy:hover { border-color: var(--olive-2); color: var(--ink); }


/* From Bulletin: the dateline and the sage "In Amicably now" box */
.dateline { margin-bottom: 14px; font: 700 10.5px/1.5 var(--font-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--olive-2); }
.dateline span:not(:last-child)::after { content: "\00b7"; margin: 0 9px; color: var(--rule-2); }
.innote { margin: 26px 0 0; background: var(--sage); border-radius: 4px; padding: 18px 20px; max-width: 64ch; }
.innote .sc { display: block; margin-bottom: 6px; color: var(--olive); }
.innote p { margin: 0; font: 400 16px/1.55 var(--font-ui); color: var(--olive); }
.source b { text-wrap: balance; }
.source a + b { display: block; margin-top: 14px; }

/* From Wire: the formats panel and the machine rail, in Register's ink */
.panel { border: 1px solid var(--rule-2); border-radius: 4px; padding: 14px 16px 16px; min-width: 0; }
.fmts h2 { margin: 0 0 12px; font: 600 11px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.fmts a { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 9px 0; border-top: 1px solid var(--rule); align-items: baseline; text-decoration: none; }
.fmts a:last-of-type { border-bottom: 1px solid var(--rule); }
.fmts a b { font-weight: 500; font-size: 13.5px; color: var(--ink); }
.fmts a small { display: block; color: var(--ink-3); font-size: 12px; }
.fmts a code { font: 400 12px/1 var(--font-mono); color: var(--ink-2); }
.fmts a:hover code { color: var(--olive); }
.fmts .how { margin: 10px 0 0; font: 400 12px/1.6 var(--font-mono); color: var(--ink-3); overflow-wrap: anywhere; }
.fmts .how b { color: var(--ink-2); font-weight: 500; }
.machine details + details { margin-top: 10px; }
.machine summary { list-style: none; cursor: pointer; }
.machine summary::-webkit-details-marker { display: none; }
.machine summary h2 { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.machine summary h2 span::before { content: "+"; margin-right: 8px; color: var(--olive); font-size: 13px; }
.machine details[open] summary h2 span::before { content: "\2212"; }
.machine details[open] summary h2 { margin-bottom: 12px; }
.machine pre { margin: 0; max-height: 22rem; overflow: auto; font: 400 12px/1.55 var(--font-mono); color: var(--ink-2); white-space: pre; }
.machine .req { font: 400 12px/1.6 var(--font-mono); color: var(--ink-3); margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.machine .req b { color: var(--olive); font-weight: 500; }
.machine .req i { font-style: normal; color: var(--ink-2); }

@media (max-width: 900px) {
  .dateline span { display: block; }
  .dateline span:not(:last-child)::after { content: none; }
  .notice .wrap { grid-template-columns: 1fr; }
  .notice .watch, .notice .fmts { grid-column: auto; grid-row: auto; }
  .notice .fmts { display: block; }
  .notice .fmts a { grid-template-columns: 1fr auto; grid-template-rows: auto; gap: 10px; border-bottom: 0; }
  .notice .fmts a:last-of-type { border-bottom: 1px solid var(--rule); }
  .watch dl { grid-template-columns: 1fr; gap: 2px 0; }
  .watch dt { margin-top: 8px; }
  .watch dt:first-child { margin-top: 0; }
  .machine pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .year { grid-template-columns: 1fr; }
  .year > h2 { position: static; padding: 26px 0 10px; font-size: 28px; }
  .year > h2 small { display: inline; margin-left: 10px; }
  .row { grid-template-columns: 1fr; gap: 6px 0; padding: 16px 0; }
  .row .d { display: flex; gap: 10px; align-items: baseline; order: 1; }
  .row .d .eff { display: inline; margin: 0; }
  .row .j { order: 2; }
  .row .kd { order: 3; display: flex; gap: 8px; }
  .row .kd b { display: inline; }
  .row .t { order: 4; margin-top: 4px; }
  .row .af { order: 5; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 2px 14px; }
  .record { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dt { margin-top: 10px; }
  .facts dt:first-child { margin-top: 0; }
  .summary { font-size: 18px; }
  footer .wrap { grid-template-columns: 1fr; }
  .filters { position: static; backdrop-filter: none; }
  .chips .lbl { width: auto; }
  .chips.where .chip { display: none; }
  .chips.where .sel { display: block; }
  .mast .formats { display: none; }
}
.sel { display: none; position: relative; }
.sel select { appearance: none; -webkit-appearance: none; font: 500 13px/1 var(--font-ui); padding: 8px 32px 8px 10px; background: transparent; color: var(--ink); border: 1px solid var(--rule-2); border-radius: 3px; }
.sel::after { content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .chip, .row, a { transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
}
