:root {
  color-scheme: light dark;
  --bg: oklch(0.985 0.008 95);
  --raised: oklch(1 0 0);
  --panel: oklch(0.955 0.012 110);
  --tint: oklch(0.96 0.018 160);
  --ink: oklch(0.22 0.02 165);
  --muted: oklch(0.47 0.02 165);
  --line: oklch(0.89 0.012 120);
  --line-strong: oklch(0.6 0.02 165);
  --primary: oklch(0.5 0.115 160);
  --primary-press: oklch(0.43 0.1 160);
  --on-primary: oklch(1 0 0);
  --link: oklch(0.46 0.11 160);
  --accent: oklch(0.84 0.155 88);
  --on-accent: oklch(0.22 0.02 165);
  --ticket: oklch(0.96 0.05 92);
  --warn: oklch(0.95 0.045 75);
  --warn-edge: oklch(0.6 0.13 65);
  --focus: oklch(0.5 0.115 160);
  --device: oklch(0.24 0.02 165);
  --screen: oklch(0.99 0.004 95);
  --viewfinder: oklch(0.3 0.02 165);
  --bar-soft: oklch(0.88 0.012 140);
  --bar-strong: oklch(0.62 0.02 165);
  --shadow: 0 1px 0 oklch(0.22 0.02 165 / 0.04), 0 12px 32px -12px oklch(0.22 0.02 165 / 0.18);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 72rem;
  --measure: 40rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 0.75rem;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    /* A well damped spring, sampled: settles with a small overshoot and no wobble. */
    --ease: linear(0, 0.06 3%, 0.22 7%, 0.5 13%, 0.78 21%, 0.93 30%, 1.01 40%, 1.015 50%, 1.004 65%, 1);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(0.18 0.012 165);
    --raised: oklch(0.22 0.014 165);
    --panel: oklch(0.225 0.014 165);
    --tint: oklch(0.24 0.03 160);
    --ink: oklch(0.95 0.008 150);
    --muted: oklch(0.76 0.015 160);
    --line: oklch(0.3 0.015 165);
    --line-strong: oklch(0.55 0.02 165);
    --primary: oklch(0.78 0.13 160);
    --primary-press: oklch(0.84 0.12 160);
    --on-primary: oklch(0.18 0.03 165);
    --link: oklch(0.8 0.12 160);
    --ticket: oklch(0.27 0.04 90);
    --warn: oklch(0.28 0.05 70);
    --warn-edge: oklch(0.78 0.13 75);
    --focus: oklch(0.84 0.155 88);
    --device: oklch(0.36 0.015 165);
    --screen: oklch(0.24 0.014 165);
    --viewfinder: oklch(0.14 0.01 165);
    --bar-soft: oklch(0.34 0.015 165);
    --bar-strong: oklch(0.62 0.02 165);
    --shadow: 0 1px 0 oklch(0 0 0 / 0.2), 0 12px 32px -12px oklch(0 0 0 / 0.6);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

img,
svg {
  display: block;
  max-width: 100%;
}

p,
li,
td,
dd {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.022em;
  text-wrap: balance;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2rem, 1.5rem + 2.4vw, 2.9rem);
  letter-spacing: -0.032em;
  line-height: 1.06;
}

h2 {
  font-size: clamp(1.35rem, 1.2rem + 0.8vw, 1.75rem);
  margin-top: 2.4rem;
}

h3 {
  font-size: 1.125rem;
  letter-spacing: -0.012em;
  margin-top: 1.8rem;
  margin-bottom: 0.35em;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

strong {
  font-weight: 650;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  padding: 0.1rem 0.35rem;
  overflow-wrap: anywhere;
}

/* A code sample on its own line (the User-Agent) reads as a block. */
p > code:only-child {
  display: block;
  padding: 0.75rem 1rem;
  line-height: 1.5;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Skip link: hidden until focused. */
.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 10;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-weight: 650;
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  flex: none;
}

.mark-field {
  fill: var(--primary);
}

.mark-tag {
  fill: var(--on-primary);
}

.mark-hole {
  fill: var(--accent);
}

.site-nav {
  max-width: 100%;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
}

.site-nav a {
  display: block;
  white-space: nowrap;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 550;
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 0.5rem;
  transition: background-color 160ms var(--ease);
}

.site-nav a:hover {
  background: var(--panel);
}

.site-nav a[aria-current="page"] {
  background: var(--tint);
  color: var(--link);
  box-shadow: inset 0 -2px 0 var(--primary);
}

@media (max-width: 47.99rem) {
  .site-nav {
    flex-basis: 100%;
  }

  .site-nav ul {
    margin-left: -0.7rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.7rem 1.25rem;
  border-radius: 0.65rem;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  transition:
    transform 220ms var(--ease),
    background-color 160ms var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover {
  background: var(--primary-press);
}

.btn-quiet {
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.btn-quiet:hover {
  background: var(--panel);
}

.btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Labels */
.kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.lead {
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 34rem;
}

.fine {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Callouts: the disclosure and the promise read like a shelf ticket. */
.callout {
  position: relative;
  background: var(--ticket);
  color: var(--ink);
  border-radius: 0.5rem;
  padding: 0.9rem 1.1rem 0.9rem 1.4rem;
  font-weight: 550;
  overflow: hidden;
}

.callout::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.35rem;
  background: var(--accent);
}

.notice-draft {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  background: var(--warn);
  color: var(--ink);
  border: 1px solid var(--warn-edge);
  border-left-width: 0.35rem;
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  margin: 0 0 2rem;
  font-weight: 600;
  font-size: 0.98rem;
}

.notice-draft svg {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.15rem;
  color: var(--warn-edge);
}

/* Document pages: one readable column, a quiet rail on wide screens. */
.doc {
  padding: clamp(2rem, 5vw, 3.75rem) 0 4rem;
}

.doc-grid {
  display: grid;
  gap: 3rem;
}

.prose {
  max-width: var(--measure);
  min-width: 0;
}

.prose > h1 {
  margin-bottom: 1.4rem;
}

.prose > h1 + p,
.prose > h1 + .callout + p {
  font-size: 1.125rem;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
  margin: 0 0 1.2rem;
}

.prose li {
  margin-bottom: 0.5rem;
  padding-left: 0.2rem;
}

.prose li::marker {
  color: var(--primary);
  font-weight: 700;
}

.prose ol > li::marker {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1.5rem;
  font-size: 0.98rem;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.75rem 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.prose th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--ink);
}

.prose td:first-child {
  font-weight: 600;
  min-width: 7.5rem;
}

/* Stores table: a status dot before each listing label. */
.prose tr[class^="is-"] td:last-child::before {
  content: "";
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  margin-right: 0.55rem;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  vertical-align: 0.02em;
}

.prose tr.is-feed td:last-child::before,
.prose tr.is-live td:last-child::before {
  background: var(--primary);
  border-color: var(--primary);
}

.prose tr.is-link td:last-child::before {
  background: var(--accent);
  border-color: var(--warn-edge);
}

.doc-rail {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.rail-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  background: var(--raised);
}

.rail-card p {
  margin: 0;
}

.rail-card .kicker {
  margin-bottom: 0.6rem;
}

.rail-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail-card li + li {
  border-top: 1px solid var(--line);
}

.rail-card li a {
  display: block;
  padding: 0.45rem 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 550;
}

.rail-card li a:hover {
  color: var(--link);
}

.rail-card li a[aria-current="page"] {
  color: var(--link);
  font-weight: 700;
}

.rail-card li a[aria-current="page"]::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--primary);
  vertical-align: 0.1em;
}

@media (min-width: 60rem) {
  .doc-grid {
    grid-template-columns: minmax(0, 1fr) 17rem;
    gap: 4rem;
  }

  .doc-rail {
    position: sticky;
    top: 1.5rem;
  }
}

/* Home: hero */
.hero {
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-top: clamp(2.25rem, 6vw, 5rem);
  padding-bottom: 0;
}

.hero h1 {
  font-size: clamp(2.3rem, 1.6rem + 3.6vw, 4rem);
  max-width: 14ch;
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--link);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 1.25rem;
}

.hero-copy {
  padding-bottom: clamp(0rem, 3vw, 4rem);
}

.hero-figure {
  position: relative;
  margin: 0 auto;
  width: min(100%, 22rem);
}

/* The shelf edge the phone rests on. */
.hero-figure::after {
  content: "";
  display: block;
  height: 0.9rem;
  margin: 0 -100vw;
  background: var(--accent);
  border-top: 3px solid var(--ink);
}

.scene {
  width: 100%;
  height: auto;
  margin-bottom: -2px;
}

.s-ticket {
  fill: var(--ticket);
  stroke: var(--line-strong);
  stroke-width: 1;
}

.s-ticket-line {
  fill: var(--bar-strong);
  opacity: 0.55;
}

.s-device {
  fill: var(--device);
}

.s-screen {
  fill: var(--screen);
}

.s-notch {
  fill: var(--device);
}

.s-viewfinder {
  fill: var(--viewfinder);
}

.s-code {
  fill: oklch(0.97 0.004 95);
}

.s-corner {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
}

.s-beam {
  fill: var(--accent);
}

.s-row {
  fill: var(--raised);
  stroke: var(--line);
  stroke-width: 1.5;
}

.s-row-top {
  fill: var(--tint);
  stroke: var(--primary);
  stroke-width: 2;
}

.s-dot {
  fill: var(--bar-soft);
}

.s-dot-top {
  fill: var(--primary);
}

.s-soft {
  fill: var(--bar-soft);
}

.s-strong {
  fill: var(--bar-strong);
}

.s-ink {
  fill: var(--ink);
}

.s-button {
  fill: var(--primary);
}

.s-button-label {
  fill: var(--on-primary);
  opacity: 0.85;
}

@media (min-width: 56rem) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 3rem;
    align-items: end;
  }

  .hero-figure {
    width: min(100%, 24rem);
    margin-right: 0;
  }
}

/* Home: sections */
.band {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.band + .band {
  border-top: 1px solid var(--line);
}

.band-panel {
  background: var(--panel);
}

.band-head h2 {
  margin-top: 0;
}

.band-head p {
  color: var(--muted);
  max-width: 28rem;
}

.split {
  display: grid;
  gap: 2rem;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr);
    gap: 4rem;
  }
}

/* How it works: a numbered ruled strip, not cards. */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  border-top: 2px solid var(--ink);
  padding: 1.1rem 0 1.6rem;
}

.steps li::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--link);
  margin-bottom: 0.6rem;
}

.steps h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

@media (min-width: 40rem) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
  }
}

/* What we do and don't do */
.ledger {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 48rem) {
  .ledger {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

.ledger-col {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.2rem;
  box-shadow: var(--shadow);
}

.ledger-col h3 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.ledger-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ledger-col li {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  gap: 0.6rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.ledger-col li svg {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.22rem;
}

.ledger-do li svg {
  color: var(--primary);
}

.ledger-dont li svg {
  color: var(--muted);
}

.ledger + .callout {
  margin-top: 1.75rem;
}

/* Further reading: an index list with hairlines. */
.index {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.index li {
  border-bottom: 1px solid var(--line);
}

.index a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 1rem;
  align-items: center;
  padding: 1.05rem 0.25rem;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 160ms var(--ease);
}

.index a:hover {
  background: var(--panel);
}

.index strong {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.index span {
  grid-column: 1;
  color: var(--muted);
  font-size: 0.98rem;
}

.index svg {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--link);
  transition: transform 260ms var(--ease);
}

.index a:hover svg {
  transform: translateX(4px);
}

@media (min-width: 48rem) {
  .index a {
    grid-template-columns: 14rem minmax(0, 1fr) auto;
    padding: 1.15rem 0.5rem;
  }

  .index span {
    grid-column: 2;
  }

  .index svg {
    grid-column: 3;
    grid-row: 1;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.95rem;
  padding: 3rem 0 2.5rem;
}

.foot-grid {
  display: grid;
  gap: 2rem;
}

.foot-brand p {
  margin: 0.9rem 0 0;
  max-width: 22rem;
}

.foot-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1.5rem;
}

.foot-nav .kicker {
  margin-bottom: 0.5rem;
}

.foot-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-nav a {
  display: inline-block;
  padding: 0.25rem 0;
  color: var(--ink);
  text-decoration: none;
}

.foot-nav a:hover {
  color: var(--link);
  text-decoration: underline;
}

.site-footer a[href^="mailto:"] {
  color: var(--link);
  font-weight: 600;
}

@media (min-width: 56rem) {
  .foot-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 4rem;
  }
}

/* Motion: a single staged entrance on the home page, and three passes of the scan beam. */
@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 760ms var(--ease) both;
  }

  .rise-2 {
    animation-delay: 70ms;
  }

  .rise-3 {
    animation-delay: 140ms;
  }

  .rise-4 {
    animation-delay: 210ms;
  }

  .rise-5 {
    animation-delay: 280ms;
  }

  .s-beam {
    animation: beam 1.3s ease-in-out 400ms 3 alternate both;
  }

  .s-rows > g {
    animation: row-in 640ms var(--ease) both;
  }

  .s-rows > g:nth-child(1) {
    animation-delay: 1.1s;
  }

  .s-rows > g:nth-child(2) {
    animation-delay: 1.2s;
  }

  .s-rows > g:nth-child(3) {
    animation-delay: 1.3s;
  }

  .s-rows > g:nth-child(4) {
    animation-delay: 1.4s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes beam {
  from {
    transform: translateY(-34px);
  }

  to {
    transform: translateY(34px);
  }
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .callout,
  .notice-draft,
  .ledger-col,
  .rail-card {
    border: 1px solid CanvasText;
  }
}

/* Print: the legal pages print as plain documents, draft notice included. */
@media print {
  :root {
    --bg: #fff;
    --ink: #000;
    --muted: #333;
    --link: #000;
    --line: #999;
    --ticket: #fff;
    --warn: #fff;
    --warn-edge: #000;
    --panel: #fff;
    --raised: #fff;
    --tint: #fff;
    --primary: #000;
    --line-strong: #666;
    --accent: #000;
  }

  body {
    display: block;
    min-height: 0;
    font-size: 11pt;
    line-height: 1.5;
    background: #fff;
    color: #000;
  }

  .skip,
  .site-nav,
  .doc-rail,
  .foot-nav,
  .hero-figure {
    display: none !important;
  }

  .site-header,
  .site-footer {
    background: none;
    border-color: #999;
  }

  .doc {
    padding: 1rem 0;
  }

  .doc-grid {
    display: block;
  }

  .prose {
    max-width: none;
  }

  .callout {
    border: 1px solid #000;
  }

  .callout::before {
    display: none;
  }

  .notice-draft {
    border: 2px solid #000;
  }

  .prose a[href^="/"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
  }

  tr,
  li {
    break-inside: avoid;
  }
}
