@font-face { font-family: "Young Serif"; src: url(fonts/young-serif-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light dark;
  /* Siphon bottles: cobalt glass, pewter heads, and the selection highlight as the one bright colour. */
  --cobalt: #1636a3;
  --cobalt-deep: #0f2778;
  --on-cobalt: #eef4fb;
  --on-cobalt-quiet: #bccdf0;
  --aqua: #9be8dc;
  --paper: #f4f8f8;
  --ink: #0e1b3d;
  --pewter: #5f6e7d;
  --line: #cfd9de;
  --link: #1636a3;
  --bar: #0e1b3d;
  --bar-text: #f4f8f8;
  --serif: "Young Serif", Georgia, serif;
  --sans: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1533;
    --ink: #e8eff4;
    --pewter: #a3b2c2;
    --line: #2c3a63;
    --link: #9be8dc;
    --bar: #f4f8f8;
    --bar-text: #0e1b3d;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.6 var(--sans); }

/* The selection is the brand: every page selects in the same aqua. */
::selection { background: var(--aqua); color: #0e1b3d; }

a { color: var(--link); text-underline-offset: 0.16em; }
:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; box-shadow: 0 0 0 2px #0e1b3d; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; }

.site-header {
  background: var(--cobalt);
  color: var(--on-cobalt);
  padding: 22px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  align-items: baseline;
}
.site-header a { color: var(--on-cobalt); text-decoration: none; }
.site-header a:hover { text-decoration: underline; }
.site-header .brand { font: 26px/1 var(--serif); margin-right: auto; }

/* Home */
.hero { background: var(--cobalt); color: var(--on-cobalt); padding: clamp(72px, 11vh, 120px) var(--gutter) clamp(56px, 9vh, 96px); }
.hero h1 { font-size: clamp(42px, 8.2vw, 104px); line-height: 1.06; margin: 0; max-width: 15ch; letter-spacing: -0.01em; }
.hero h1 .preselected { background: var(--aqua); color: #0e1b3d; }
.hero .lead { font-size: clamp(19px, 2vw, 23px); line-height: 1.5; max-width: 34em; margin: 36px 0 0; }
.hero .status { color: var(--on-cobalt-quiet); margin: 18px 0 0; max-width: 40em; }
.hero a { color: var(--aqua); }

.section { padding: clamp(48px, 8vh, 88px) var(--gutter) 0; }
.section:last-of-type { padding-bottom: clamp(56px, 10vh, 112px); }
.section h2 { font-size: clamp(28px, 3.6vw, 44px); margin: 0 0 22px; max-width: 30ch; }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; max-width: 40em; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.2em 1fr; margin-bottom: 14px; }
.steps li::before { content: counter(step); font: 700 24px/1.25 var(--sans); color: var(--link); }

.names { font: clamp(23px, 2.9vw, 36px)/1.32 var(--serif); max-width: 34em; margin: 0; }

.qualities { margin: 40px 0 0; max-width: 58em; display: grid; grid-template-columns: minmax(170px, 15em) 1fr; gap: 18px 36px; }
.qualities dt { font-weight: 700; }
.qualities dd { margin: 0; max-width: 36em; color: var(--pewter); }

/* The bar: a real floating toolbar, so a real floating toolbar's shadow. */
.bar {
  position: absolute;
  z-index: 10;
  display: flex;
  max-width: calc(100vw - 16px);
  background: var(--bar);
  color: var(--bar-text);
  border-radius: 9px;
  padding: 4px;
  font: 700 15px/1 var(--sans);
  box-shadow: 0 10px 28px rgb(6 14 44 / 0.42);
}
.bar[hidden] { display: none; }
.bar.arrive { animation: bar-arrive 170ms cubic-bezier(0.2, 0.9, 0.3, 1.25); }
@keyframes bar-arrive { from { opacity: 0; transform: translateY(5px) scale(0.96); } }
.bar button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 9px 11px;
  min-height: 36px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.bar button:hover { background: rgb(128 150 200 / 0.28); }
.bar .result { padding: 9px 11px; white-space: nowrap; }
.bar .result[hidden] { display: none; }

/* Extensions and documents */
.page { padding: clamp(32px, 6vh, 64px) var(--gutter) clamp(56px, 10vh, 96px); }
.page > * { max-width: 42em; }
.page h1 { font-size: clamp(34px, 5vw, 56px); margin: 0 0 20px; }
.page h2 { font-size: clamp(25px, 3vw, 32px); margin: 2em 0 0.5em; }
.page h3 { font-size: 21px; margin: 1.6em 0 0.4em; }
.page table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; font-size: 16px; margin: 1em 0; }
.page td, .page th { border-top: 1px solid var(--line); padding: 7px 14px 7px 0; text-align: left; vertical-align: top; min-width: 7em; }
.page th { border-top: 0; }
.page code { font: 0.86em/1.4 Consolas, ui-monospace, monospace; overflow-wrap: anywhere; }
.page pre { overflow-x: auto; max-width: 100%; }
.page pre code { overflow-wrap: normal; }
.page blockquote { margin: 1em 0; padding-left: 16px; border-left: 3px solid var(--aqua); }
.page hr { display: none; }

.quiet { color: var(--pewter); }

.item { display: flex; gap: 20px; justify-content: space-between; align-items: flex-start; padding: 18px 0; border-top: 1px solid var(--line); max-width: 42em; }
.item > div { min-width: 0; }
.item p { margin: 2px 0; }
.item .name { font: 22px/1.25 var(--serif); }
.button {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 7px;
  background: var(--cobalt);
  color: var(--on-cobalt);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.button:hover { background: var(--cobalt-deep); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .button { background: var(--aqua); color: #0e1b3d; }
}

.site-footer { background: var(--cobalt-deep); color: var(--on-cobalt-quiet); padding: 26px var(--gutter); font-size: 14px; line-height: 1.5; }
.site-footer p { margin: 0; max-width: 56em; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .qualities { grid-template-columns: 1fr; gap: 2px; }
  .qualities dd { margin-bottom: 16px; }
  .item { flex-direction: column; gap: 10px; }
  .bar { font-size: 14px; }
  .bar button { padding: 9px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .bar.arrive { animation: none; }
}
