/* Amortance — one stylesheet, no fonts to download, no JavaScript.
   Light and dark from the same tokens; the page follows the reader's system. */

:root {
  --paper: #ffffff;
  --paper-2: #f6f7f5;
  --ink: #0e1116;
  --ink-2: #3d454f;
  --muted: #6f7784;
  --rule: #e4e6e2;
  --rule-2: #c7ccc5;
  --accent: #0a5f47;
  --accent-soft: #e8f2ee;
  /* the edge shading that says a table continues past the screen; it has to survive
     the theme, so it is a token rather than one grey that only works on paper */
  --scroll-shade: rgba(72, 80, 90, .30);
  --page: 1040px;
  --measure: 62ch;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b0d10;
    --paper-2: #13161b;
    --ink: #e9ecef;
    --ink-2: #b4bac3;
    --muted: #8b939f;
    --rule: #222630;
    --rule-2: #39404b;
    --accent: #63d3aa;
    --accent-soft: #102420;
    --scroll-shade: rgba(196, 206, 222, .30);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 18px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 640px) { body { font-size: 17px; } }

h1, h2, h3 { margin: 0; font-weight: 620; letter-spacing: -0.025em; text-wrap: balance; line-height: 1.12; }
h1 { font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.125rem); line-height: 1.18; }
h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 620; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: .16em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 24px; }
@media (min-width: 900px) { .wrap { padding: 0 40px; } }
.prose { max-width: var(--measure); }
.lede { font-size: clamp(1.125rem, 1rem + .6vw, 1.375rem); line-height: 1.5; color: var(--ink-2); }
.small { font-size: .9375rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.label {
  font: 500 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 9; }

/* ------------------------------------------------------------------ header */

.top { border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.mark { font: 620 1.0625rem/1 var(--sans); letter-spacing: -.02em; text-decoration: none; }
.mark span { color: var(--accent); }
.top nav { margin-left: auto; display: flex; gap: 20px; font-size: .9375rem; }
.top nav a { text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.top nav a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 560px) { .top nav { gap: 16px; font-size: .875rem; } .hide-s { display: none; } }
/* below this the brand and two nav labels cannot share a line in any language:
   let the header take a second row rather than push a link off the screen */
@media (max-width: 430px) {
  .top .wrap { flex-wrap: wrap; min-height: 0; padding-top: 12px; padding-bottom: 12px; gap: 6px 16px; }
}

/* ------------------------------------------------------------------ blocks */

.band { padding: clamp(56px, 9vw, 112px) 0; }
.band + .band { border-top: 1px solid var(--rule); }
.band-tint { background: var(--paper-2); }
.head { max-width: 34ch; margin-bottom: clamp(28px, 4vw, 40px); }
.head p { margin-top: 14px; }

.hero h1 { margin-bottom: 28px; }
.hero .rows { margin-top: clamp(36px, 5vw, 56px); }
.hero .lede { margin-bottom: 22px; }


/* three lines of mechanism, hairline-separated, no cards */
.rows { display: grid; }
.rows > div { display: grid; gap: 4px 28px; padding: 20px 0; border-top: 1px solid var(--rule); }
.rows > div:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 760px) { .rows > div { grid-template-columns: 22ch minmax(0, 1fr); align-items: baseline; } }
/* inside a half-width column the label track has no room: fall back to one column */
@container (max-width: 640px) { .rows > div { grid-template-columns: none; } }
.rows dt, .rows h3 { font-weight: 600; margin: 0; }
.rows dd, .rows p { margin: 0; color: var(--ink-2); }

/* the two doors */
.doors { display: grid; gap: 0; margin-top: clamp(32px, 5vw, 48px); }
@media (min-width: 800px) { .doors { grid-template-columns: 1fr 1fr; gap: 0 48px; } }
.door {
  display: grid; gap: 10px; align-content: start;
  padding: 28px 0; border-top: 1px solid var(--rule-2); text-decoration: none;
}
.door:last-child { border-bottom: 1px solid var(--rule-2); }
@media (min-width: 800px) { .door:last-child { border-bottom: 0; } .doors .door { border-bottom: 1px solid var(--rule-2); } }
.door h3 { font-size: clamp(1.375rem, 1.2rem + .6vw, 1.75rem); letter-spacing: -.025em; }
.door p { margin: 0; color: var(--ink-2); font-size: .9375rem; }
.door .go { font: 500 .9375rem/1 var(--sans); color: var(--accent); }
.door:hover h3 { text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: .16em; }

/* actions */
.actions { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: 2px;
  font: 500 .9375rem/1 var(--sans); text-decoration: none;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn-ghost:hover { background: transparent; border-color: var(--ink); }

/* a ledger, the only table on the site */
.scroll {
  --scroll-bg: var(--paper);
  overflow-x: auto; margin: 28px 0;
  background:
    linear-gradient(to right, var(--scroll-bg) 30%, transparent) left / 40px 100% no-repeat,
    linear-gradient(to left, var(--scroll-bg) 30%, transparent) right / 40px 100% no-repeat,
    radial-gradient(farthest-side at 0 50%, var(--scroll-shade), transparent) left / 14px 100% no-repeat,
    radial-gradient(farthest-side at 100% 50%, var(--scroll-shade), transparent) right / 14px 100% no-repeat;
  background-attachment: local, local, scroll, scroll;
}
.band-tint .scroll { --scroll-bg: var(--paper-2); }
/* a code block is tinted paper; on a tinted band it needs the plain one back */
.band-tint pre { background: var(--paper); }
table { border-collapse: collapse; width: 100%; font: 400 14px/1.5 var(--mono); font-variant-numeric: tabular-nums; }
th, td { padding: 9px 14px 9px 0; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--rule); }
/* a clipped figure looks like a wrong figure: let the words wrap, never the numbers */
th { white-space: normal; vertical-align: bottom; }
td:first-child, th:first-child { white-space: normal; }
td:first-child { min-width: 16ch; }
th:first-child, td:first-child { text-align: left; }
thead th { font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
tbody tr:last-child td { border-bottom: 0; }
tr.diff td { color: var(--accent); border-top: 1px solid var(--rule-2); }

/* events, definition style */
.events { margin: 0; padding: 0; list-style: none; }
.events li { padding: 18px 0; border-top: 1px solid var(--rule); display: grid; gap: 4px 28px; }
.events li:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 760px) { .events li { grid-template-columns: 22ch minmax(0, 1fr); align-items: baseline; } }
@container (max-width: 640px) { .events li { grid-template-columns: none; } }
.events b { font-weight: 600; }
.events span { color: var(--ink-2); }

.cols { display: grid; gap: clamp(32px, 5vw, 56px); }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.cols > * { min-width: 0; container-type: inline-size; }

.ticks, .crosses { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ticks li, .crosses li { padding-left: 24px; position: relative; color: var(--ink-2); }
@media (min-width: 900px) { .crosses.two { grid-template-columns: 1fr 1fr; gap: 14px 48px; } }
.ticks li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.crosses li::before { content: "×"; position: absolute; left: 0; color: var(--muted); }

.qa { margin: 0; }
.qa > div { padding: 22px 0; border-top: 1px solid var(--rule); }
.qa > div:last-child { border-bottom: 1px solid var(--rule); }
.qa h3 { margin-bottom: 8px; }
.qa p { color: var(--ink-2); margin: 0; }

pre {
  margin: 0 0 20px; padding: 18px 20px; overflow-x: auto; background: var(--paper-2);
  border: 1px solid var(--rule); border-radius: 2px; font: 400 13.5px/1.6 var(--mono);
}
code { font-family: var(--mono); font-size: .92em; }
/* On a phone a code block has nowhere to scroll to, and a command running off the edge
   reads as a broken command. Below 560px the lines wrap instead. The text is unchanged,
   so it still copies as written. */
@media (max-width: 560px) {
  pre { white-space: pre-wrap; overflow-wrap: break-word; padding: 14px 15px; font-size: 12.5px; }
}

.note { border-left: 2px solid var(--rule-2); padding: 2px 0 2px 18px; color: var(--ink-2); margin: 24px 0; max-width: var(--measure); }
.quote { font-size: 1.0625rem; color: var(--ink-2); border-left: 2px solid var(--accent); padding: 2px 0 2px 18px; margin: 0 0 16px; }

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

.foot { border-top: 1px solid var(--rule); padding: 40px 0 56px; font-size: .9375rem; color: var(--muted); }
.foot .wrap { display: grid; gap: 24px; }
@media (min-width: 800px) { .foot .wrap { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.foot a { color: var(--ink-2); }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
