/*
 * foilo's look, shared by the site and the hub: Dash0's near-black, white
 * type, one accent. Pico's dark theme under it, re-pointed at our tokens;
 * everything else here is the few pieces Pico does not have. One font, Mona
 * Sans (SIL OFL), served from our own origin — nothing loads from anyone
 * else. Each app adds only what is its own (the site's hero, the hub's tables).
 */
@font-face {
  font-family: 'Mona Sans';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('/assets/mona-sans.8ki275q1cegh.woff2') format('woff2');
}

@font-face {
  font-family: 'Mona Sans';
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url('/assets/mona-sans.qup1xb7kotxj.woff2') format('woff2');
}

:root[data-theme='dark'] {
  --accent: #35e0c1;
  --accent-ink: #04221c;
  --accent-soft: rgb(53 224 193 / 12%);
  --surface: #161616;
  --line: #262626;
  --line-strong: #353535;
  --muted: #9a9a9a;
  /* The dimmest text colour: still 5.6:1 on the page, 5.2:1 on a card (WCAG AA wants 4.5:1). */
  --faint: #8a8a8a;
  /* Chrome on Linux resolves bare ui-monospace to a serif; name real faces first. */
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'DejaVu Sans Mono', Menlo, monospace;

  --pico-font-family: 'Mona Sans', system-ui, sans-serif;
  --pico-background-color: #0e0e0e;
  --pico-color: #e8e8e8;
  --pico-muted-color: var(--muted);
  --pico-muted-border-color: var(--line);
  --pico-card-background-color: var(--surface);
  --pico-primary: var(--accent);
  --pico-primary-hover: #5ceed3;
  --pico-primary-background: var(--accent);
  --pico-primary-hover-background: #5ceed3;
  --pico-primary-inverse: var(--accent-ink);
  --pico-primary-focus: rgb(53 224 193 / 35%);
  --pico-form-element-background-color: #121212;
  --pico-form-element-border-color: var(--line-strong);
  --pico-form-element-focus-color: var(--accent);
  --pico-h1-color: #fff;
  --pico-h2-color: #fff;
  --pico-h3-color: #fff;

  /*
   * Pico grows the root font from 100% to 131.25% across its breakpoints,
   * which is what made every line look oversized on a wide screen. One size.
   */
  --pico-font-size: 100%;
  --pico-line-height: 1.6;
}

/* Pico drops the side padding from 768px on, expecting its own narrower widths. */
.container {
  max-width: 74.5rem;
  padding-inline: 1.25rem;
}

body {
  background-image: radial-gradient(rgb(255 255 255 / 4.5%) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ---- Type ---------------------------------------------------------------- */

h1,
h2 {
  font-weight: 500;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.1;
}

h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}

h3 {
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

p {
  color: var(--muted);
}

strong {
  color: #fff;
  font-weight: 600;
}

.accent {
  color: var(--accent);
}

.lead {
  max-width: 40rem;
  font-size: 1.125rem;
}

.note {
  font-size: 0.875rem;
  color: var(--faint);
}

.wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  text-decoration: none;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.55rem;
  font: 600 0.6875rem var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.eyebrow-accent {
  color: var(--accent);
  border-color: rgb(53 224 193 / 40%);
  background: var(--accent-soft);
}

/* ---- Calls to action ----------------------------------------------------- */

/* Links that act as calls to action. Links, not buttons: they navigate. */
.cta,
button.cta {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 0.55rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
}

.cta:hover {
  color: var(--accent-ink);
  background: var(--pico-primary-hover);
  border-color: var(--pico-primary-hover);
}

.cta.outline {
  color: #fff;
  background: transparent;
  border-color: var(--line-strong);
}

.cta.outline:hover {
  border-color: var(--accent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* ---- Header -------------------------------------------------------------- */

/* Dash0's nav: a framed bar that stays at the top while the page scrolls. */
header.container {
  position: sticky;
  top: 0.75rem;
  z-index: 10;
  padding-block: 0;
}

header nav {
  padding-inline: 1.25rem;
  background: rgb(22 22 22 / 85%);
  border: 1px solid var(--line);
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

header nav li {
  padding-block: 0.625rem;
}

header nav a {
  font-size: 0.9375rem;
  white-space: nowrap;
}

header nav a:not(.cta, .wordmark) {
  color: var(--muted);
}

header nav a:not(.cta, .wordmark):hover {
  color: #fff;
}

header nav .cta {
  padding: 0.35rem 0.8rem;
}

/* On a phone the bar holds the wordmark and the two buttons; the anchors are one scroll away anyway. */
@media (width < 48rem) {
  header nav li:has(> a[href^='/#']:not(.cta)) {
    display: none;
  }
}

/* ---- Status tags --------------------------------------------------------- */

.status {
  flex-shrink: 0;
  padding: 0.15rem 0.5rem;
  font: 600 0.6875rem var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.status-ready {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.status-building {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgb(53 224 193 / 45%);
}

.status-planned {
  color: var(--muted);
}

/* ---- Forms --------------------------------------------------------------- */

label,
legend {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #fff;
}

label small,
legend small {
  font-weight: 400;
  color: var(--faint);
}

/*
 * The site's own pieces. The look itself — tokens, font, type, buttons, the
 * header bar — is @foilo/theme, which the build puts in front of this file.
 */

/* ---- Sections ------------------------------------------------------------ */

main > section {
  margin: 0;
  padding-block: 4.5rem;
}

main > section + section {
  border-top: 1px solid var(--line);
}

/* A jump to any #anchor should not land under the sticky header. */
[id] {
  scroll-margin-top: 6rem;
}

/* ---- Hero ---------------------------------------------------------------- */

.hero {
  padding-top: 6rem;
  text-align: center;
}

.hero .lead {
  margin-inline: auto;
}

.hero .note {
  margin-top: 1rem;
}

/* The hero diagram, drawn as Dash0 draws its pipeline: labelled nodes on one line. */
.pipeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 44rem;
  margin: 3.5rem auto 0;
  padding: 0;
  --node: 3.5rem;
}

.pipeline li {
  position: relative;
  display: grid;
  gap: 0.6rem;
  justify-items: center;
  list-style: none;
}

.pipeline-name {
  font: 500 0.75rem var(--mono);
  color: var(--muted);
}

.pipeline-node {
  display: grid;
  place-items: center;
  width: var(--node);
  height: var(--node);
  color: var(--faint);
  background: var(--pico-background-color);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}

.pipeline li[data-status='building'] .pipeline-name {
  color: #fff;
}

.pipeline li[data-status='building'] .pipeline-node {
  color: var(--accent);
  background: #0f1715;
  border-color: rgb(53 224 193 / 55%);
  box-shadow: 0 0 24px rgb(53 224 193 / 18%);
}

/* ---- Launch banner ------------------------------------------------------- */

/* When foilo is expected to open: one tile under the hero's buttons, the date the loudest thing in it. */
.launch {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  max-width: 34rem;
  margin: 2.5rem auto 0;
  padding: 1.4rem 1.75rem 1.5rem;
  background: var(--accent-soft);
  border: 1px solid rgb(53 224 193 / 45%);
  border-radius: 12px;
  box-shadow: 0 0 32px rgb(53 224 193 / 10%);
}

.launch-label {
  font: 600 0.6875rem var(--mono);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.launch-date {
  margin: 0;
  font-size: 1.05rem;
  color: var(--muted);
}

.launch-date time {
  display: block;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.launch-text {
  max-width: 28rem;
  margin: 0.4rem 0 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---- Heute / Mit foilo --------------------------------------------------- */

.compare-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.compare-head p {
  margin: 0;
}

.compare-steps {
  padding: 0;
  counter-reset: step;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.compare-steps li {
  display: grid;
  grid-template-columns: 1fr 1fr;
  list-style: none;
  counter-increment: step;
}

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

.compare-steps li > div {
  padding: 1.1rem 1.35rem;
}

.compare-steps p {
  margin: 0;
  font-size: 0.9375rem;
}

.today {
  background: var(--surface);
}

.today strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
}

.today strong::before {
  margin-right: 0.6rem;
  content: '0' counter(step);
  font: 600 0.75rem var(--mono);
  color: var(--faint);
}

.with-foilo {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  background: #111514;
  border-left: 1px solid var(--line);
}

.with-foilo p {
  color: #d6d6d6;
}

@media (width < 48rem) {
  .compare-head,
  .compare-steps li {
    grid-template-columns: 1fr;
  }

  .with-foilo {
    border-left: 0;
    border-top: 1px dashed var(--line-strong);
  }
}

/* ---- Tools --------------------------------------------------------------- */

.tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 2rem;
  padding: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.tools li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.1rem 1.35rem;
  list-style: none;
  background: var(--surface);
}

/* An odd number of tools in two columns: the last one spans, so no empty cell is left. */
.tools li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.tools strong {
  font-size: 0.9375rem;
}

.tools p {
  margin: 0.2rem 0 0;
  font-size: 0.9375rem;
}

@media (width < 48rem) {
  .tools {
    grid-template-columns: 1fr;
  }
}

/* ---- Assistant ----------------------------------------------------------- */

.assistant-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.assistant-eyebrow {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
}

.assistant-eyebrow .eyebrow {
  margin: 0;
}

.abilities {
  margin: 2rem 0 0;
}

.abilities div + div {
  margin-top: 1rem;
}

.abilities dt {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
}

.abilities dd {
  margin: 0.2rem 0 0;
  font-size: 0.9375rem;
  color: var(--muted);
}

.chat {
  margin: 0;
  padding: 1.25rem;
  background: radial-gradient(ellipse at 100% 0%, rgb(53 224 193 / 8%), transparent 55%), var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
}

.chat ol {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}

.chat li {
  max-width: 88%;
  margin: 0;
  padding: 0.7rem 0.9rem;
  list-style: none;
  border-radius: 12px;
}

.chat-you {
  align-self: flex-end;
  background: #222;
  border-bottom-right-radius: 4px;
}

.chat-assistant {
  align-self: flex-start;
  background: #111514;
  border: 1px solid rgb(53 224 193 / 25%);
  border-bottom-left-radius: 4px;
}

.chat-who {
  display: block;
  margin-bottom: 0.2rem;
  font: 600 0.6875rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.chat-assistant .chat-who {
  color: var(--accent);
}

.chat li p {
  margin: 0;
  font-size: 0.9375rem;
  color: #d6d6d6;
}

.chat figcaption {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--faint);
}

.safeguards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 3rem;
  padding: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.safeguards li {
  margin: 0;
  padding: 1.1rem 1.35rem;
  list-style: none;
  background: var(--surface);
}

.safeguards strong {
  font-size: 0.9375rem;
}

.safeguards p {
  margin: 0.3rem 0 0;
  font-size: 0.875rem;
}

@media (width < 64rem) {
  .safeguards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (width < 48rem) {
  .assistant-head,
  .safeguards {
    grid-template-columns: 1fr;
  }

  .assistant-head {
    gap: 2rem;
  }

  .chat li {
    max-width: 94%;
  }
}

/* ---- Cards --------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.cards article {
  margin: 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
}

.cards article p {
  margin: 0;
  font-size: 0.9375rem;
}

main > section.cards-two {
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  margin-top: 0;
}

.cards-two h2 {
  font-size: 1.375rem;
}

/* ---- FAQ ----------------------------------------------------------------- */

.faq {
  max-width: 48rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.faq details {
  margin: 0;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}

.faq summary {
  font-weight: 500;
  color: #fff;
}

.faq details p {
  margin: 0.6rem 0 0;
  font-size: 0.9375rem;
}

/* ---- Waitlist ------------------------------------------------------------ */

main > section.waitlist {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: start;
  margin-block: 2rem 5rem;
  padding: 2.5rem;
  background: radial-gradient(ellipse at 0% 0%, rgb(53 224 193 / 10%), transparent 55%), var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
}

.waitlist fieldset {
  margin-bottom: 1rem;
}

.waitlist legend {
  margin-bottom: 0.5rem;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.choices label {
  margin: 0;
  font-size: 0.9375rem;
}

@media (width < 48rem) {
  main > section.waitlist {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
}

/* ---- Forms --------------------------------------------------------------- */
.consent small {
  font-size: 0.8125rem;
  color: var(--faint);
}

.consent a {
  color: var(--muted);
}

/* The forms' honeypot: off-screen for people, still there for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Text pages: Kontakt, Impressum, Datenschutz, notices ---------------- */

/* Pico draws every <article> as a card; a page of text is not one. */
.prose,
.legal,
.notice {
  max-width: 44rem;
  margin: 0;
  padding: 4rem 0 5rem;
  background: none;
  box-shadow: none;
}

.legal h1,
.prose h1,
.notice h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

.legal h2 {
  margin-top: 2.5rem;
  font-size: 1.25rem;
}

.legal h3 {
  margin-top: 1.5rem;
  font-size: 1rem;
}

.legal p,
.legal li {
  font-size: 0.9375rem;
}

.notice {
  min-height: 50vh;
}

/* ---- Footer -------------------------------------------------------------- */

body > footer.container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  padding-block: 2.5rem 3rem;
  /* A line inside the padding, so it ends where the section lines above it do. */
  background: linear-gradient(var(--line), var(--line)) center top / calc(100% - 2.5rem) 1px no-repeat;
}

footer p {
  max-width: 26rem;
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--faint);
}

footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
}

footer li {
  list-style: none;
}

footer ul a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}

footer ul a:hover {
  color: #fff;
}

/* Pico spaces list items for prose; these lists are drawn as tables and grids. */
.pipeline li,
.compare-steps li,
.tools li,
footer li {
  margin: 0;
}

@media (width < 48rem) {
  .hero {
    padding-top: 3.5rem;
  }

  /* Five mono labels do not fit a phone's width; the narrower face does. */
  .pipeline-name {
    font: 500 0.6875rem var(--pico-font-family);
  }

  .pipeline {
    --node: 2.75rem;
  }
}

/* The hub said this visitor is signed in (account.ts): the waitlist has nothing for them. */
:root[data-signed-in] .waitlist-only {
  display: none;
}

/*
 * The pipeline in motion, as Dash0 animates its own: a comet runs each
 * connector in turn and the node it reaches flares. Accent into the stages
 * being built, dim white into the planned ones — so the motion shows the
 * status too. One 5s cycle; each hop takes 0.6s.
 */
.pipeline li:not(:first-child)::before,
.pipeline li:not(:first-child)::after {
  position: absolute;
  bottom: calc(var(--node) / 2);
  left: calc(-50% + var(--node) / 2);
  width: calc(100% - var(--node));
  content: '';
}

.pipeline li:not(:first-child)::before {
  height: 1px;
  background: var(--line-strong);
}

.pipeline li[data-status='building']:not(:first-child)::before {
  background: rgb(53 224 193 / 55%);
}

.pipeline li:not(:first-child)::after {
  --comet: rgb(255 255 255 / 70%);
  height: 2px;
  margin-bottom: -0.5px;
  background: linear-gradient(90deg, transparent, var(--comet) 85%, #fff) no-repeat;
  background-position: -4rem 0;
  background-size: 4rem 100%;
  filter: drop-shadow(0 0 3px var(--comet)) drop-shadow(0 0 8px var(--comet));
}

.pipeline li[data-status='building']:not(:first-child)::after {
  --comet: var(--accent);
}

.pipeline li:nth-child(3)::after {
  animation-delay: 0.6s;
}

.pipeline li:nth-child(4)::after {
  animation-delay: 1.2s;
}

.pipeline li:nth-child(5)::after {
  animation-delay: 1.8s;
}

.pipeline li:nth-child(2) .pipeline-node {
  animation-delay: 0.6s;
}

.pipeline li:nth-child(3) .pipeline-node {
  animation-delay: 1.2s;
}

.pipeline li:nth-child(4) .pipeline-node {
  animation-delay: 1.8s;
}

.pipeline li:nth-child(5) .pipeline-node {
  animation-delay: 2.4s;
}

@keyframes comet {
  0% {
    background-position: -4rem 0;
  }

  12%,
  100% {
    background-position: calc(100% + 4rem) 0;
  }
}

@keyframes arrive-built {
  0%,
  16%,
  100% {
    box-shadow: 0 0 24px rgb(53 224 193 / 18%);
  }

  3% {
    border-color: var(--accent);
    box-shadow: 0 0 32px rgb(53 224 193 / 55%);
  }
}

@keyframes arrive-planned {
  0%,
  16%,
  100% {
    color: var(--faint);
  }

  3% {
    color: #d0d0d0;
    border-color: #5a5a5a;
    box-shadow: 0 0 18px rgb(255 255 255 / 12%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* Longhands, not the `animation` shorthand: that would reset the delays that stagger the hops. */
  .pipeline li:not(:first-child)::after,
  .pipeline-node {
    animation-duration: 5s;
    animation-iteration-count: infinite;
    animation-fill-mode: backwards;
  }

  .pipeline li:not(:first-child)::after {
    animation-name: comet;
    animation-timing-function: linear;
  }

  .pipeline li[data-status='building'] .pipeline-node {
    animation-name: arrive-built;
    animation-timing-function: ease-out;
  }

  .pipeline li[data-status='planned'] .pipeline-node {
    animation-name: arrive-planned;
    animation-timing-function: ease-out;
  }
}

/* ==== Ratgeber: the index and its articles ================================ */

.ratgeber .article-list {
  margin: 2.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.article-list li {
  margin: 0;
  padding-block: 1.5rem;
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.article-list h2 {
  margin-bottom: 0.5rem;
  font-size: 1.375rem;
}

.article-list h2 a {
  color: #fff;
  text-decoration: none;
}

.article-list h2 a:hover {
  color: var(--accent);
}

.article-list p {
  margin: 0 0 0.5rem;
}

.article-list small {
  font-size: 0.8125rem;
  color: var(--faint);
}

/* Pico draws every <article>, and its <header>, as a card; a page of text is not one. */
.article {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 3.5rem 0 5rem;
  background: none;
  box-shadow: none;
}

.article > header {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
}

.article > header .eyebrow {
  text-decoration: none;
}

.article h1 {
  max-width: 42rem;
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  text-wrap: balance;
}

.byline {
  margin: 0 0 2.5rem;
  font-size: 0.875rem;
  color: var(--faint);
}

.toc {
  display: block;
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.toc p {
  margin: 0 0 0.75rem;
  font: 600 0.6875rem var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Pico lays a nav's lists out as a bar; this one is a plain numbered list. */
.toc ol {
  display: block;
  margin: 0;
  padding-left: 1.25rem;
}

.toc li {
  display: list-item;
  margin: 0.4rem 0;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--faint);
  list-style: decimal;
}

.toc a {
  display: inline;
  margin: 0;
  padding: 0;
}

.toc a {
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  color: #fff;
}

/* About 70 characters a line: the measure long text reads best at. */
.article-body {
  max-width: 42rem;
  font-size: 1.0625rem;
  overflow-wrap: break-word;
}

.article-body p,
.article-body li {
  color: #c4c4c4;
  hyphens: auto;
}

.article-body h2 {
  margin-top: 3.5rem;
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  text-wrap: balance;
}

.article-body h3 {
  margin-top: 2rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  font-style: normal;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
}

.article-body blockquote > :last-child {
  margin-bottom: 0;
}

/* The figures are drawn 720 wide; on a phone, shrunk to fit, their labels could not be read, so they scroll instead. */
.article-body figure {
  margin: 2.5rem 0;
  overflow-x: auto;
}

.article-body figure svg {
  display: block;
  width: 100%;
  min-width: 34rem;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

/* A figure with a narrow drawing of its own shows that one on a phone instead of scrolling. */
.article-body figure .figure-phone {
  display: none;
}

@media (width < 48rem) {
  .article-body figure.has-phone .figure-wide {
    display: none;
  }

  .article-body figure.has-phone .figure-phone {
    display: block;
    min-width: 0;
    max-width: 28rem;
  }
}

.table-scroll {
  margin: 1.5rem 0 2rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.table-scroll table {
  min-width: 34rem;
  margin: 0;
  font-size: 0.875rem;
}

.table-scroll th,
.table-scroll td {
  padding: 0.65rem 0.9rem;
  vertical-align: top;
  background: none;
}

.table-scroll thead th {
  font-weight: 600;
  color: #fff;
  background: var(--surface);
}

.table-scroll tbody tr:last-child td {
  border-bottom: 0;
}

.table-scroll [data-align='right'] {
  text-align: right;
  white-space: nowrap;
}

.table-scroll [data-align='center'] {
  text-align: center;
}

.article-next {
  max-width: 42rem;
  margin-top: 3rem;
  padding: 1.5rem;
  background: radial-gradient(ellipse at 0% 0%, rgb(53 224 193 / 10%), transparent 55%), var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
}

.article-next p {
  margin: 0;
  color: var(--pico-color);
}

@media (width < 48rem) {
  .article {
    padding-top: 2.5rem;
  }

  .article-body blockquote {
    padding: 1rem 1.1rem;
  }

  .article-body blockquote ul {
    padding-left: 1rem;
  }
}

/* Wide enough for a column beside the text: the contents stay in view while the article scrolls. */
@media (width >= 64rem) {
  .article {
    grid-template-areas:
      'header .'
      'body toc'
      'next .';
    grid-template-columns: minmax(0, 42rem) 15rem;
    column-gap: 4rem;
  }

  .article > header {
    grid-area: header;
  }

  .article-body {
    grid-area: body;
  }

  .article-next {
    grid-area: next;
  }

  .toc {
    position: sticky;
    top: 6rem;
    grid-area: toc;
    align-self: start;
    max-height: calc(100vh - 7rem);
    margin: 0;
    overflow-y: auto;
    background: none;
    border-width: 0 0 0 1px;
    border-radius: 0;
  }
}
