/* SaltBash. A Unix shell for the kitchen.
   Dark theme: seasoned cast iron. Light theme: a ruled recipe card.
   The ANSI colors are spices: turmeric, paprika, basil, enamel, beet, mint.
   Type: Victor Mono (OFL), self-hosted; its cursive italic is used for
   comments, the way recipe notes are handwritten in the margin. */

@font-face {
  font-family: "Victor Mono";
  src: url("/fonts/victor-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Victor Mono";
  src: url("/fonts/victor-mono-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------------------------------------------------------------- tokens */

:root {
  color-scheme: dark;
  --bg: #201c18;        /* cast iron */
  --bg-2: #2a2520;      /* raised: terminal, scripts */
  --card: #26221d;
  --rule: #463f37;
  --fg: #e9e2d4;        /* flour */
  --fg-strong: #fffaf0; /* salt */
  --dim: #aba293;       /* ash */
  --dim-2: #7d7468;
  --yellow: #ecbc4e;    /* turmeric: prompts, focus */
  --red: #f4775f;       /* paprika: errors, quantities */
  --green: #9fcd78;     /* basil: executables, success */
  --blue: #8ab9ee;      /* enamel: directories, links */
  --magenta: #dc98cd;   /* beet: keywords */
  --cyan: #7fd0c2;      /* mint: flags, cross references */
  --err-bg: #31211c;
  --card-line: rgba(138, 185, 238, 0.13);
  --card-margin: rgba(244, 119, 95, 0.5);

  --mono: "Victor Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --fs-small: 0.875rem;
  --fs-h2: 1.25rem;
  --fs-h1: clamp(1.85rem, 4.4vw, 2.75rem);
  --lh-card: 2rem;
  --radius: 6px;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #fbfaf7;
    --bg-2: #f1eee7;
    --card: #ffffff;
    --rule: #d8d1c4;
    --fg: #27231e;
    --fg-strong: #0d0b09;
    --dim: #625b51;
    --dim-2: #8f877a;
    --yellow: #865900;
    --red: #b2321f;
    --green: #2f6a1e;
    --blue: #1d5ea6;
    --magenta: #8b3a7f;
    --cyan: #0e6a5e;
    --err-bg: #fbeee9;
    --card-line: rgba(29, 94, 166, 0.17);
    --card-margin: rgba(178, 50, 31, 0.55);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fbfaf7;
  --bg-2: #f1eee7;
  --card: #ffffff;
  --rule: #d8d1c4;
  --fg: #27231e;
  --fg-strong: #0d0b09;
  --dim: #625b51;
  --dim-2: #8f877a;
  --yellow: #865900;
  --red: #b2321f;
  --green: #2f6a1e;
  --blue: #1d5ea6;
  --magenta: #8b3a7f;
  --cyan: #0e6a5e;
  --err-bg: #fbeee9;
  --card-line: rgba(29, 94, 166, 0.17);
  --card-margin: rgba(178, 50, 31, 0.55);
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 440;
  line-height: 1.65;
  font-variant-ligatures: none;
  font-feature-settings: "calt" 0, "liga" 0;
  overflow-wrap: break-word;
}
@media (min-width: 700px) {
  body { font-size: 1.0625rem; }
}

h1, h2, h3 { color: var(--fg-strong); line-height: 1.25; font-weight: 700; }
h1 { font-size: var(--fs-h1); margin: 0.4rem 0 1rem; letter-spacing: -0.015em; text-wrap: balance; }
h2 { font-size: var(--fs-h2); margin: 2.25rem 0 0.75rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1rem; }
code { font-family: inherit; color: var(--fg-strong); }
b, strong { font-weight: 700; color: var(--fg-strong); }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
a.dir { color: var(--blue); font-weight: 650; }
a.exec { color: var(--green); font-weight: 650; }
a.xref { color: var(--cyan); }
a.file { color: var(--fg); }

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

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 clamp(24px, 4vw, 44px); } }

.dim { color: var(--dim); }
.ps { color: var(--yellow); }
.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: 0; background: var(--yellow); color: var(--bg); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

.lede { font-size: 1.125rem; max-width: 64ch; color: var(--fg); }
.prose p, .prose li { max-width: 72ch; }

.btn, .tty__chips button {
  font: inherit;
  font-size: var(--fs-small);
  color: var(--fg);
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.5rem 0.8rem;
  min-height: 40px;
  cursor: pointer;
}
.btn:hover, .tty__chips button:hover { border-color: var(--yellow); color: var(--fg-strong); }
.btn[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--bg); font-weight: 700; }

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

.top { border-bottom: 1px solid var(--rule); }
.top__in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 2rem; padding-top: 0.9rem; padding-bottom: 0.9rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--fg-strong); font-weight: 700; font-size: 1.15rem; text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.shaker { flex: none; }
.top__nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.15rem 1.4rem; }
.top__nav a { text-decoration: none; padding: 0.1rem 0.25rem; margin: 0 -0.25rem; border-radius: 2px; }
.top__nav a:hover { text-decoration: underline; }
.top__nav a[aria-current="page"] { background: var(--blue); color: var(--bg); }
.top__nav a.file[aria-current="page"] { background: var(--fg); }

/* Prompt line: the command that "printed" the page. Doubles as breadcrumbs. */
.cmdline { margin: 2rem 0 0.75rem; font-size: var(--fs-small); color: var(--dim); overflow-wrap: anywhere; }
.cmdline nav { display: inline; }
.ps1__user { color: var(--green); }
.ps1__path, .ps1__path a { color: var(--blue); }
.ps1__path a { text-decoration: none; }
.ps1__path a:hover { text-decoration: underline; }
.cmdline__typed { color: var(--fg-strong); }

/* ------------------------------------------------------------------ hero */

.hero { padding: clamp(1.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.hero__title {
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  color: var(--dim);
  letter-spacing: 0;
  margin: 0 0 clamp(1rem, 3vw, 1.75rem);
}
.hero__title .hash { color: var(--dim-2); }
.hero__run { margin: 0 0 clamp(1.25rem, 3vw, 2rem); }
.run {
  margin: 0;
  font-size: clamp(1.55rem, 6.6vw, 3.6rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 400;
  color: var(--fg);
}
.run--1 { color: var(--fg-strong); font-weight: 700; }
.run--2 { color: var(--dim); }
.run--4 { color: var(--green); font-weight: 700; }
.run--5 { color: var(--fg-strong); }
.cursor {
  display: inline-block; width: 0.6em; height: 0.95em; vertical-align: -0.1em;
  background: var(--fg-strong); margin-left: 0.05em;
}
.hero__lede { max-width: 62ch; font-size: 1.125rem; margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .run__cmd { display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap; width: 0; animation: type 0.75s steps(18, end) 0.25s forwards; }
  .run--2, .run--3, .run--4, .run--5 { opacity: 0; animation: show 0.01s linear forwards; }
  .run--2 { animation-delay: 1.15s; }
  .run--3 { animation-delay: 1.75s; }
  .run--4 { animation-delay: 2.45s; }
  .run--5 { animation-delay: 2.75s; }
  .cursor { animation: blink 1.1s steps(1, end) 3s infinite; }
}
@keyframes type { to { width: 18ch; } }
@keyframes show { to { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }

/* -------------------------------------------------------------- terminal */

.tty {
  margin: 0 0 clamp(2.5rem, 6vw, 4.5rem);
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  max-width: 980px;
}
.tty__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 1rem; border-bottom: 1px solid var(--rule); font-size: var(--fs-small);
}
.tty__title { font-size: inherit; font-weight: 400; margin: 0; color: var(--fg); }
.tty__title .ps1 { color: var(--fg); }
.tty__name { color: var(--dim); }
.tty__screen {
  position: relative;
  max-height: min(29rem, 62vh);
  overflow-y: auto;
  padding: 1rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  overscroll-behavior: contain;
}
.tl { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 1.55em; }
.tl--cmd { color: var(--fg-strong); margin-top: 0.75rem; }
.tl--cmd:first-child { margin-top: 0; }
.tl .ps1, .tty__line .ps1 { color: var(--green); }
.tl--head { color: var(--dim); }
.tl--sh { color: var(--fg-strong); font-weight: 700; margin-top: 0.5rem; }
.tl--in { padding-left: 2ch; }
@media (min-width: 700px) { .tl--in { padding-left: 4ch; } }
.tl--err { color: var(--red); }
.tl--ok { color: var(--green); font-weight: 700; }
.tl.c, .tl .c { color: var(--dim); font-style: italic; }
.tl .k { color: var(--yellow); }
.tl--help { display: grid; grid-template-columns: minmax(0, 1fr); padding-left: 2ch; }
.tl--help .hd { padding-left: 2ch; color: var(--dim); }
@media (min-width: 700px) {
  .tl--help { grid-template-columns: 24ch minmax(0, 1fr); padding-left: 4ch; }
  .tl--help .hd { padding-left: 0; color: var(--fg); }
}
.tl .b { color: var(--fg-strong); font-weight: 700; }
.tl .sev1 { color: var(--red); }
.tl .sev2 { color: var(--yellow); }
.tl .sev3 { color: var(--cyan); }
.tl .sev4 { color: var(--dim); }
.tl a.dir { margin-right: 0; }
.tty__line { display: flex; align-items: baseline; gap: 1ch; margin-top: 0.75rem; }
.tty__line .ps1 { flex: none; }
.tty__line:focus-within { box-shadow: inset 0 -2px 0 var(--yellow); }
.tty__input {
  flex: 1; min-width: 0; padding: 0.15rem 0; margin: 0;
  background: transparent; border: 0; border-radius: 0;
  color: var(--fg-strong); caret-color: var(--yellow);
  font: inherit; font-size: max(16px, 0.9375rem);
}
.tty__input:focus { outline: none; }
.tty__foot {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 0.75rem; padding: 0.75rem 1rem 1rem; border-top: 1px solid var(--rule);
}
.tty__hint { margin: 0; color: var(--dim); font-style: italic; font-size: var(--fs-small); }
.tty__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tty__chips button { background: var(--bg); }

/* ----------------------------------------------------------- home board */

.board { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 4rem; }
@media (min-width: 980px) { .board { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.block { margin: 0 0 3.25rem; }
.block__cmd { font-size: var(--fs-h2); margin: 0 0 0.25rem; color: var(--fg-strong); }
.block__note { color: var(--dim); font-style: italic; margin: 0 0 1.1rem; }
.block__more { margin: 1rem 0 0; font-size: var(--fs-small); }

/* ls -l rows. The size column is total cooking time. */
.lsl { list-style: none; margin: 0; padding: 0; }
.lsl__row { border-bottom: 1px solid var(--rule); }
.lsl__row:first-child { border-top: 1px solid var(--rule); }
.lsl__link {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  grid-template-areas: "name name name" "title title title" "size date .";
  column-gap: 2ch;
  padding: 0.7rem 0;
  color: inherit;
  text-decoration: none;
}
.lsl__perm { grid-area: perm; display: none; color: var(--dim-2); }
.lsl__size { grid-area: size; color: var(--yellow); font-size: var(--fs-small); }
.lsl__date { grid-area: date; color: var(--dim); font-size: var(--fs-small); }
.lsl__name { grid-area: name; color: var(--green); font-weight: 700; }
.lsl__title { grid-area: title; color: var(--fg); }
.lsl__link:hover .lsl__name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.lsl__summary { margin: -0.25rem 0 0.9rem; color: var(--dim); max-width: 70ch; }
@media (min-width: 760px) {
  .lsl__link {
    grid-template-columns: 10ch 5ch 6ch minmax(0, 1fr);
    grid-template-areas: "perm size date name" ". . . title";
  }
  .lsl__perm { display: block; }
  .lsl__size { text-align: right; font-size: inherit; }
  .lsl__date { font-size: inherit; }
  .lsl__summary { margin-left: calc(21ch + 6ch); }
}
.ls-total { color: var(--dim); margin: 1.5rem 0 0.5rem; }

/* man -k output */
.apropos { list-style: none; margin: 0; padding: 0; }
.apropos a { display: grid; grid-template-columns: minmax(0, 1fr); padding: 0.35rem 0; text-decoration: none; color: var(--fg); }
.apropos__name { color: var(--cyan); font-weight: 700; }
.apropos a:hover .apropos__name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
@media (min-width: 560px) {
  .apropos a { grid-template-columns: 19ch minmax(0, 1fr); column-gap: 2ch; }
}

/* history output */
.hist { list-style: none; margin: 1.5rem 0 3rem; padding: 0; }
.hist a {
  display: grid;
  grid-template-columns: 4ch minmax(0, 1fr);
  grid-template-areas: "n cmd" ". tag" ". date";
  column-gap: 2ch;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--fg);
  text-decoration: none;
}
.hist li:first-child a { border-top: 1px solid var(--rule); }
.hist__n { grid-area: n; color: var(--dim-2); white-space: pre; text-align: right; }
.hist__cmd { grid-area: cmd; color: var(--green); font-weight: 700; }
.hist__tag { grid-area: tag; }
.hist__date { grid-area: date; color: var(--dim); font-size: var(--fs-small); }
.hist a:hover .hist__cmd { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
@media (min-width: 760px) {
  .hist a { grid-template-columns: 4ch minmax(0, 1fr) auto; grid-template-areas: "n cmd date" ". tag tag"; }
  .hist__date { font-size: inherit; }
}

/* the incident log */
.log { list-style: none; margin: 0; padding: 0; }
.log a {
  display: flex; flex-wrap: wrap; column-gap: 1.5ch;
  padding: 0.6rem 0 0.65rem; border-bottom: 1px solid var(--rule);
  color: var(--fg); text-decoration: none; font-size: var(--fs-small);
}
.log li:first-child a { border-top: 1px solid var(--rule); }
.log__when { color: var(--dim); }
.log__id { color: var(--dim); }
.log__sev { font-weight: 700; }
.log__msg { flex-basis: 100%; font-size: 1rem; color: var(--fg); }
.log__code { color: var(--red); font-weight: 700; }
.log a:hover .log__msg { text-decoration: underline; text-underline-offset: 0.2em; }
.sev-1 .log__sev, .sev-legend .sev-1 dt, .incident.sev-1 .incident__sev { color: var(--red); }
.sev-2 .log__sev, .sev-legend .sev-2 dt, .incident.sev-2 .incident__sev { color: var(--yellow); }
.sev-3 .log__sev, .sev-legend .sev-3 dt, .incident.sev-3 .incident__sev { color: var(--cyan); }
.sev-4 .log__sev, .sev-legend .sev-4 dt, .incident.sev-4 .incident__sev { color: var(--dim); }

/* Command of the Week, home */
.cotw__cmd { font-size: clamp(1.35rem, 3.2vw, 1.8rem); font-weight: 700; line-height: 1.25; margin: 0.25rem 0 0.5rem; }
.cotw__cmd a { color: var(--green); text-decoration: none; }
.cotw__cmd a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.cotw__tag { color: var(--fg-strong); font-size: 1.1rem; margin-bottom: 0.5rem; }
.cotw__tip { color: var(--dim); }

.changelog-head__v { font-weight: 700; margin-bottom: 0.4rem; }
.changelog-head__v a { color: var(--yellow); text-decoration: none; }
.changelog-head__v a:hover { text-decoration: underline; }
.changelog-head p:last-child { margin-bottom: 0; font-size: var(--fs-small); }

/* The one sponsor slot. Driven by content/sponsor.json. */
.sponsor__slot { border: 2px dashed var(--rule); border-radius: var(--radius); padding: 1rem 1.25rem; }
.sponsor__label { margin: 0 0 0.25rem; color: var(--yellow); font-weight: 700; }
.sponsor__body { margin: 0; color: var(--dim); font-style: italic; }
.sponsor:not(.sponsor--empty) .sponsor__body { color: var(--fg); font-style: normal; }

/* ---------------------------------------------------------- page heads */

.page-head { margin-bottom: 2rem; }
.page-head .lede { margin-bottom: 0; }
.man-group h2 { font-size: 1.05rem; color: var(--dim); font-weight: 600; margin: 2rem 0 0.5rem; }
.sev-legend {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.5rem 2rem; margin: 0 0 2rem; font-size: var(--fs-small);
}
.sev-legend div { display: flex; gap: 1ch; }
.sev-legend dt { font-weight: 700; flex: none; }
.sev-legend dd { margin: 0; color: var(--dim); }

.rels { list-style: none; margin: 0 0 3rem; padding: 0; }
.rel { padding: 1.25rem 0; border-bottom: 1px solid var(--rule); }
.rel:first-child { border-top: 1px solid var(--rule); }
.rel__v { font-size: 1.3rem; margin: 0; }
.rel__v a { color: var(--fg-strong); text-decoration: none; }
.rel__v a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.rel__name { color: var(--yellow); font-style: italic; font-weight: 500; }
.rel__date { color: var(--dim); font-size: var(--fs-small); margin: 0 0 0.5rem; }
.rel__sum { margin: 0 0 0.35rem; max-width: 70ch; }
.rel__counts { color: var(--dim); font-size: var(--fs-small); margin: 0; }

/* --------------------------------------------------------------- recipe */

.recipe__head .lede { margin-bottom: 1.5rem; }
.facts { display: flex; flex-wrap: wrap; gap: 0.75rem 2.5rem; margin: 0 0 1.5rem; }
.facts dt { color: var(--dim); font-size: var(--fs-small); }
.facts dd { margin: 0; color: var(--fg-strong); font-weight: 650; }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; }
.tools__date { margin: 0; color: var(--dim); font-size: var(--fs-small); }

.recipe__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; margin-top: 2.5rem; }
@media (min-width: 1040px) {
  .recipe__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3.5rem; }
  .recipe__script { position: sticky; top: 1.5rem; align-self: start; }
}
.recipe__plain h2 { margin-top: 0; }

/* Ingredients on a ruled index card. Every line box is exactly one rule tall. */
.card {
  position: relative;
  background-color: var(--card);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--lh-card) - 1px), var(--card-line) calc(var(--lh-card) - 1px), var(--card-line) var(--lh-card));
  background-origin: content-box;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1rem 1rem 1rem 2.75rem;
  line-height: var(--lh-card);
}
.card::before { content: ""; position: absolute; top: 0; bottom: 0; left: 2rem; width: 1px; background: var(--card-margin); }
.card h2, .card h3 { margin: 0; line-height: var(--lh-card); }
.card h2 { font-size: var(--fs-h2); box-shadow: 0 1px 0 var(--card-margin); }
.ingr__group { color: var(--dim); font-style: italic; font-weight: 500; }
.ingr { list-style: none; margin: 0; padding: 0; }
.ingr label { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); cursor: pointer; }
.ingr input {
  width: 1rem; height: 1rem; margin: calc((var(--lh-card) - 1rem) / 2) 0 0;
  accent-color: var(--green);
}
.ingr input:checked + span { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--dim); }
.ingr span { color: var(--fg-strong); }

.method { margin-top: 2.5rem; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 4ch; margin-bottom: 1rem; max-width: 68ch; }
.steps li::before { content: counter(step) "."; position: absolute; left: 0; color: var(--yellow); font-weight: 700; }
.notes { margin-top: 2rem; }
.notes h2 { font-size: 1rem; color: var(--dim); }
.notes ul { margin: 0; padding: 0; list-style: none; }
.notes li { font-style: italic; color: var(--fg); margin-bottom: 0.75rem; max-width: 68ch; padding-left: 2ch; text-indent: -2ch; }
.notes li::before { content: "# "; color: var(--dim-2); }

/* The script itself */
.script, .session { margin: 0; background: var(--bg-2); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.script figcaption, .session figcaption {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem;
  padding: 0.55rem 1rem; border-bottom: 1px solid var(--rule); font-size: var(--fs-small); color: var(--dim);
}
.script__file { color: var(--green); font-weight: 700; }
.script pre, .session pre, .stderr, .man__ex pre {
  margin: 0; overflow-x: auto; font-size: 0.9375rem; line-height: 1.65; tab-size: 2;
}
.script pre { font-size: 0.875rem; }
.session pre, .stderr, .man__ex pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.script pre { padding: 0.9rem 1rem 1rem 0; counter-reset: ln; }
/* Long lines wrap with a hanging indent instead of scrolling sideways. */
.script .ln {
  display: block; min-height: 1.65em;
  white-space: pre-wrap; overflow-wrap: anywhere;
  padding-left: 8ch; text-indent: -8ch;
}
.script .ln::before {
  counter-increment: ln; content: counter(ln);
  display: inline-block; width: 4.5ch; padding-right: 1.5ch; text-align: right; text-indent: 0;
  color: var(--dim-2); -webkit-user-select: none; user-select: none;
}
.script__note { margin: 0.75rem 0 0; color: var(--dim); font-style: italic; font-size: var(--fs-small); }

.t-com, .t-bang { color: var(--dim); font-style: italic; }
.t-cmd { color: var(--green); font-weight: 650; }
.t-kw { color: var(--magenta); }
.t-flag { color: var(--cyan); white-space: nowrap; }
.t-str { color: var(--yellow); }
.t-var { color: var(--blue); }
.t-op { color: var(--dim); }
.t-qty { color: var(--red); }

.seealso { margin: 3rem 0 0; }
.seealso__label { color: var(--dim); }

.pager {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem;
  margin: 2.5rem 0 1rem; padding: 1.25rem 0 0; border-top: 1px solid var(--rule); font-size: var(--fs-small);
}
.pager__dir { color: var(--dim); }
.pager__none { color: var(--dim-2); }
@media (min-width: 760px) {
  .pager { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; }
  .pager__next { text-align: right; }
  .pager__dir { display: block; }
}

/* ------------------------------------------------------------ man pages */

.man { max-width: 86ch; }
.man__rule {
  display: flex; justify-content: space-between; gap: 1rem;
  color: var(--dim); font-size: var(--fs-small);
  padding-bottom: 0.5rem; margin: 0.5rem 0 0.5rem; border-bottom: 1px solid var(--rule);
}
.man__rule > span:last-child { display: none; }
.man__rule--foot { border-bottom: 0; border-top: 1px solid var(--rule); padding: 0.5rem 0 0; margin-top: 2.5rem; }
@media (min-width: 600px) { .man__rule > span:last-child { display: inline; } }
.man__sh { display: block; font-size: 1rem; font-weight: 700; color: var(--fg-strong); margin: 1.6rem 0 0.35rem; letter-spacing: 0.03em; }
.man__body { padding-left: 2ch; }
@media (min-width: 700px) { .man__body { padding-left: 7ch; } }
.man__body p { max-width: 72ch; }
.man__name { font-size: 1.3rem; font-weight: 400; color: var(--fg); margin: 0; line-height: 1.45; letter-spacing: 0; }
.man__syn { margin: 0 0 0.25rem; }
var { font-style: italic; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; color: var(--fg); }
.man__dl { margin: 0; }
.man__dl dt { margin-top: 0.9rem; }
.man__dl dt:first-child { margin-top: 0; }
.man__dl dd { margin: 0.15rem 0 0 2ch; max-width: 70ch; }
@media (min-width: 700px) { .man__dl dd { margin-left: 4ch; } }
.man__ex { margin-bottom: 1.25rem; }
.man__ex pre { background: var(--bg-2); padding: 0.6rem 1rem; border-radius: 4px; margin: 0 0 0.5rem; color: var(--fg-strong); }
.man__ex p { margin: 0 0 0 2ch; }
.nw { white-space: nowrap; }

/* ----------------------------------------------- command of the week */

.cotw-page__when { color: var(--dim); font-size: var(--fs-small); margin: 0; }
.cotw-page__cmd {
  font-size: clamp(2.75rem, 11vw, 6rem); color: var(--green); line-height: 1;
  letter-spacing: -0.03em; margin: 0.75rem 0 1rem; overflow-wrap: anywhere;
}
.cotw-page__usage { margin-bottom: 1rem; }
.session { margin: 2rem 0; max-width: 78ch; }
.session pre { padding: 1rem; }
.session .ln { display: block; min-height: 1.65em; }
.session .ln--in { color: var(--fg-strong); }
.session .ln--out { color: var(--fg); }
.session .ln--warn { color: var(--yellow); }
.tip { border-left: 3px solid var(--yellow); padding: 0.1rem 0 0.1rem 1.25rem; margin: 2.5rem 0 1rem; max-width: 72ch; }
.tip h2 { font-size: 1rem; color: var(--yellow); margin: 0 0 0.4rem; }
.tip p { color: var(--fg-strong); font-size: 1.125rem; margin: 0; }

/* -------------------------------------------------------- incidents */

.incident__meta { display: flex; flex-wrap: wrap; gap: 0.35rem 2rem; margin: 0 0 1rem; font-size: var(--fs-small); }
.incident__meta div { display: flex; gap: 1ch; }
.incident__meta dt { color: var(--dim); }
.incident__meta dd { margin: 0; color: var(--fg-strong); }
.incident__sev { font-weight: 700; }
.incident__sev .dim { font-weight: 400; }
.status--resolved { color: var(--green); }
.status--monitoring { color: var(--yellow); }
.incident__title { margin-bottom: 0; }
.incident__code { color: var(--red); }
.stderr {
  background: var(--err-bg); color: var(--fg-strong);
  border-left: 3px solid var(--red); border-radius: 0 4px 4px 0;
  padding: 1rem 1.25rem; margin: 0 0 2rem; max-width: 92ch;
}
.postmortem h2 { font-size: 1.1rem; margin: 2rem 0 0.4rem; }
.todo { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.todo li { position: relative; padding-left: 4.5ch; margin-bottom: 0.6rem; }
.todo li::before { content: "[ ]"; position: absolute; left: 0; color: var(--dim); }
.blameless { color: var(--dim); font-style: italic; margin-top: 2rem; }

/* ---------------------------------------------------------- releases */

.release__name { color: var(--yellow); font-style: italic; font-weight: 500; }
.release__date { color: var(--dim); font-size: var(--fs-small); margin-top: -0.5rem; }
.cl h2 { font-size: 1.05rem; margin: 2rem 0 0.6rem; }
.cl ul { list-style: none; margin: 0; padding: 0; }
.cl li { display: grid; grid-template-columns: 2ch minmax(0, 1fr); gap: 1ch; margin-bottom: 0.65rem; max-width: 74ch; }
.cl__mark { font-weight: 700; }
.cl--breaking .cl__mark, .cl--removed .cl__mark { color: var(--red); }
.cl--added .cl__mark { color: var(--green); }
.cl--changed .cl__mark { color: var(--yellow); }
.cl--fixed .cl__mark { color: var(--cyan); }
.cl--deprecated .cl__mark { color: var(--dim); }
.cl--known_issues .cl__mark { color: var(--magenta); }

/* ------------------------------------------------------- about, 404 */

.about h1 { margin-bottom: 1rem; }
.about__formats { margin: 0; }
.about__formats div { margin-bottom: 1.1rem; }
.about__formats dd { margin: 0.15rem 0 0; max-width: 70ch; }
.about ul { padding-left: 2ch; }
.about li { margin-bottom: 0.6rem; }
.nf .stderr { margin: 1rem 0 1.5rem; }
.nf h2 { margin-top: 2.5rem; }
.nf__dirs { list-style: none; margin: 0 0 3rem; padding: 0; }
.nf__dirs li { margin: 0.4rem 0; }
.nf__dirs .dim { margin-left: 1ch; }

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

.foot { border-top: 1px solid var(--rule); margin-top: 3.5rem; padding: 1.75rem 0 2.5rem; font-size: var(--fs-small); color: var(--dim); }
.foot .cmdline { margin: 0 0 0.25rem; }
.foot__text { color: var(--fg); max-width: 78ch; margin: 0 0 1.25rem; }
.foot__bye { margin: 0; }
.foot__sponsor { color: var(--fg); margin: 0 0 1.25rem; }

/* --------------------------------------------------------------- print */

@media print {
  .top, .foot, .cmdline, .tools, .recipe__script, .pager, .seealso, .skip, .tty { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  h1, h2, h3, b, .ingr span, .facts dd { color: #000; }
  .lede, .facts dt, .notes li, .steps li { color: #222; }
  .recipe__grid { display: block; margin-top: 1rem; }
  .card { background: none; border: 1px solid #999; }
  .card::before { display: none; }
  .card h2 { box-shadow: none; }
  .steps li::before { color: #000; }
  a { color: #000; text-decoration: none; }
}
