/* ---------- Tokens ---------- */
:root {
  --bg: #fbfaf6;
  --surface: #f3f0e8;
  --text: #3a3733;
  --muted: #6b665d;
  --line: #e4dfd3;
  --accent: #c2410c;
  --accent-soft: #ffe8d9;
  --code-bg: #f3f0e8;
  --tok-comment: #6b655a;
  --tok-string: #2a7a4b;
  --tok-number: #a34a07;
  --tok-keyword: #b02a68;
  --tok-type: #1d6fa5;
  --tok-fn: #6d4cc0;
  --tok-meta: #7d6317;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  /* One family for everything you read. Set both to var(--serif) to switch to a serif look. */
  --font-read: var(--sans);
  --font-display: var(--sans);
  --wide: 64rem;
  /* Every page starts the same distance below the header. Side panels (contents list, terminal) begin at
     that same height and stick there, so they never slide when you start scrolling. */
  --header-h: 3.8rem;
  --top-gap: 1.35rem;
  --sticky-top: calc(var(--header-h) + var(--top-gap));
  --read-width: 42rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121214;
    --surface: #1b1b1f;
    --text: #dcd8d0;
    --muted: #9a958a;
    --line: #2b2b30;
    --accent: #ff8a5c;
    --accent-soft: #3a2218;
    --code-bg: #1b1b1f;
    --tok-comment: #8a8a92;
    --tok-string: #8fd19e;
    --tok-number: #ffb86b;
    --tok-keyword: #ff8fb8;
    --tok-type: #7cc4ff;
    --tok-fn: #c9b5ff;
    --tok-meta: #e6c777;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #121214;
  --surface: #1b1b1f;
  --text: #dcd8d0;
  --muted: #9a958a;
  --line: #2b2b30;
  --accent: #ff8a5c;
  --accent-soft: #3a2218;
  --code-bg: #1b1b1f;
  --tok-comment: #8a8a92;
  --tok-string: #8fd19e;
  --tok-number: #ffb86b;
  --tok-keyword: #ff8fb8;
  --tok-type: #7cc4ff;
  --tok-fn: #c9b5ff;
  --tok-meta: #e6c777;
  color-scheme: dark;
}

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

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

/* Large monitors: scale the whole design up together. Everything is sized in rem, so the container,
   the text and the reading column grow in step and a line keeps the same number of characters. */
@media (min-width: 1600px) {
  html {
    font-size: 112.5%;
  }
}

@media (min-width: 2200px) {
  html {
    font-size: 125%;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

.prose p,
.lede {
  text-wrap: pretty;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

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

.wrap {
  width: min(var(--wide), 100% - 2.5rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  z-index: 10;
}

/* ---------- Header / footer ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
  min-height: 3.75rem;
}

.brand {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.4rem;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: #fff;
  font: 700 0.8rem var(--mono);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-nav a,
.theme-toggle {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.theme-toggle:hover {
  color: var(--text);
  background: var(--surface);
}

.theme-toggle {
  border: 0;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  font: inherit;
}

.site-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 2rem;
}

.site-footer a {
  color: inherit;
}

.footer-links {
  display: flex;
  gap: 1.1rem;
}

/* ---------- Hero ---------- */
.hero {
  padding-block: var(--top-gap) 1rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  font: 600 0.8rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  max-width: 24ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.hero .lede {
  max-width: 38rem;
  margin: 1.1rem 0 0;
  font-size: 1.15rem;
  color: var(--muted);
}

/* ---------- Section titles & lists ---------- */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 2rem 0 0.25rem;
  font: 600 0.8rem var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title a {
  text-decoration: none;
  letter-spacing: normal;
  text-transform: none;
  font-family: var(--sans);
  font-size: 0.9rem;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-item {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.25rem 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}

.post-item .when {
  grid-row: span 3;
  margin: 0;
  padding-top: 0.35rem;
  font: 0.85rem var(--sans);
  color: var(--muted);
}

.post-item .when span {
  display: block;
}

.post-item h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.post-item h3 a {
  text-decoration: none;
}

.post-item h3 a:hover {
  color: var(--accent);
}

.post-item p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.year {
  margin: 2.5rem 0 0;
  font: 700 1.1rem var(--sans);
  color: var(--accent);
}

/* ---------- Tags ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
}

.tags a,
.tags span {
  display: inline-block;
  padding: 0.1rem 0.65rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
}

.tags a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Page headings ---------- */
.page-head {
  padding-block: var(--top-gap) 1rem;
}

.page-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.page-head p {
  color: var(--muted);
  margin: 0.75rem 0 0;
}

/* ---------- Article ---------- */
/* Same container as every other page, so the text lines up with the logo.
   On wide screens the contents list takes the right-hand column. */
.post-layout {
  width: min(var(--wide), 100% - 2.5rem);
  margin-inline: auto;
}

.post {
  max-width: var(--read-width);
}

.toc {
  display: none;
}

@media (min-width: 1100px) {
  .post-layout {
    display: grid;
    grid-template-columns: minmax(0, var(--read-width)) 13rem;
    justify-content: space-between;
  }

  .toc {
    display: block;
  }

  .toc-inner {
    position: sticky;
    top: var(--sticky-top);
    margin-top: var(--top-gap);
    max-height: calc(100vh - var(--sticky-top) - 1.5rem);
    overflow-y: auto;
    padding-left: 1rem;
    border-left: 1px solid var(--line);
    font-size: 0.82rem;
    line-height: 1.35;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
  }
}

.toc-title {
  margin: 0 0 0.6rem;
  font: 600 0.72rem var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.toc li + li {
  margin-top: 0.35rem;
}

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

.toc a:hover {
  color: var(--accent);
}

/* The section currently being read (set by theme.js) */
.toc a.active {
  color: var(--text);
}

.toc a.active::before {
  content: "";
  position: absolute;
  left: calc(-1rem - 1px);
  top: 0.1em;
  bottom: 0.1em;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* Collapsible contents box for screens too narrow for the side list */
.toc-mobile {
  margin: 0 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.95rem;
}

.toc-mobile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.toc-mobile summary::-webkit-details-marker {
  display: none;
}

.toc-mobile summary::after {
  content: "+";
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
}

.toc-mobile[open] summary::after {
  content: "\2212";
}

.toc-mobile ul {
  list-style: none;
  margin: 0;
  padding: 0 1rem 0.9rem;
}

.toc-mobile li + li {
  margin-top: 0.45rem;
}

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

.toc-mobile a:hover {
  color: var(--accent);
}

@media (min-width: 1100px) {
  .toc-mobile {
    display: none;
  }
}

.post-head {
  padding-block: var(--top-gap) 1.25rem;
}

.post-head h1 {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.post-head .lede {
  margin: 1rem 0 0;
  font-size: 1.15rem;
  color: var(--muted);
}

.meta {
  margin: 0;
  font: 0.85rem var(--sans);
  color: var(--muted);
}

.draft {
  color: var(--accent);
  font-weight: 700;
}

.prose {
  max-width: var(--read-width);
  font-family: var(--font-read);
  font-size: 1.125rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.prose > * + * {
  margin-top: 1.05rem;
}

/* No trailing space after the last block, so anything beside the text can line up with its last line. */
.prose > :last-child {
  margin-bottom: 0;
}

.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--sans);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-top: 2.2rem;
  position: relative;
}

.prose h2 {
  font-size: 1.65rem;
}

.prose h3 {
  font-size: 1.3rem;
  margin-top: 1.7rem;
}

.prose h4 {
  font-size: 1.1rem;
}

.prose h2 .anchor,
.prose h3 .anchor,
.prose h4 .anchor {
  position: absolute;
  left: -1.4rem;
  color: var(--line);
  text-decoration: none;
  opacity: 0;
}

.prose :is(h2, h3, h4):hover .anchor,
.prose .anchor:focus {
  opacity: 1;
  color: var(--accent);
}

.prose a {
  text-decoration-thickness: 2px;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.prose a:hover {
  text-decoration-color: var(--accent);
}

.prose ul,
.prose ol {
  padding-left: 1.5rem;
}

.prose li + li {
  margin-top: 0.3rem;
}

.prose li::marker {
  color: var(--accent);
}

.prose blockquote {
  margin-left: 0;
  padding: 0.2rem 0 0.2rem 1.25rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
}

/* Callout boxes: > [!NOTE], > [!TIP], > [!WARNING], > [!SUMMARY] */
.callout {
  padding: 0.9rem 1.15rem;
  border-left: 4px solid var(--callout, var(--accent));
  border-radius: 8px;
  background: var(--surface);
  font-size: 1.05rem;
}

.callout > * + * {
  margin-top: 0.6rem;
}

.callout-title {
  margin: 0;
  font: 700 0.78rem var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--callout, var(--accent));
}

.callout-note {
  --callout: var(--tok-type);
}

.callout-tip {
  --callout: var(--tok-string);
}

.callout-warning {
  --callout: var(--tok-number);
}

.callout-summary {
  --callout: var(--accent);
}

/* Figures: diagram wrapper plus caption */
.prose figure {
  margin: 0;
}

.prose figcaption {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.prose hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin-block: 2.5rem;
}

.prose img,
.prose svg {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.prose code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.12em 0.4em;
}

.prose pre {
  position: relative;
  padding: 1.1rem 1rem;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  tab-size: 4;
}

.prose pre code {
  display: block;
  padding: 0;
  background: none;
  border: 0;
  font-size: inherit;
}

/* Syntax tokens (classes emitted by build.mjs) */
.tok-comment {
  color: var(--tok-comment);
  font-style: italic;
}

.tok-string {
  color: var(--tok-string);
}

.tok-number,
.tok-literal {
  color: var(--tok-number);
}

.tok-keyword,
.tok-tag {
  color: var(--tok-keyword);
}

.tok-type,
.tok-prop,
.tok-variable {
  color: var(--tok-type);
}

.tok-fn {
  color: var(--tok-fn);
}

.tok-annotation,
.tok-attr {
  color: var(--tok-meta);
}

.copy {
  position: absolute;
  top: 0.35rem;
  right: 0.5rem;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font: 0.72rem var(--sans);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.prose pre:hover .copy,
.copy:focus-visible {
  opacity: 1;
}

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

.table-wrap,
.diagram {
  overflow-x: auto;
}

.diagram svg {
  display: block;
}

/* A diagram with no phone version keeps a readable minimum size and scrolls sideways. */
.diagram:not(.diagram-wide):not(.diagram-tall) svg {
  min-width: 560px;
}

/* Diagrams with two versions: a wide one for larger screens and an upright one for phones. */
.diagram-tall {
  display: none;
}

@media (max-width: 640px) {
  .diagram-wide {
    display: none;
  }

  .diagram-tall {
    display: block;
  }

  .diagram-tall svg {
    max-width: 360px;
    margin-inline: auto;
  }
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.95rem;
}

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

.prose th {
  background: var(--surface);
  font-weight: 600;
}

/* ---------- Search and related posts ---------- */
[hidden] {
  display: none !important;
}

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

.search {
  margin-top: 0.75rem;
}

.search input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.search input::placeholder {
  color: var(--muted);
}

.search input:focus-visible {
  border-color: var(--accent);
  outline-offset: 2px;
}

.search-status {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

mark {
  padding: 0 0.12em;
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  color: inherit;
}

.nav-search {
  display: grid;
  place-items: center;
}

@media (max-width: 480px) {
  .nav-search {
    display: none;
  }
}

.related {
  margin-top: 3.5rem;
}

/* ---------- Pager ---------- */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.pager a {
  display: block;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
}

.pager a:hover {
  border-color: var(--accent);
}

.pager small {
  display: block;
  color: var(--muted);
  font: 0.75rem var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pager .next {
  grid-column: 2;
  text-align: right;
}

/* ---------- Tag index & 404 ---------- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.tag-cloud a {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
}

.tag-cloud a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tag-cloud small {
  color: var(--muted);
  margin-left: 0.3rem;
}

.empty {
  padding-block: 4rem;
  text-align: center;
  color: var(--muted);
}

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .post-item {
    grid-template-columns: 1fr;
  }

  .post-item .when {
    grid-row: auto;
    padding: 0;
  }

  .post-item .when span::before {
    content: "\00b7\00a0";
  }

  .post-item .when span {
    display: inline;
  }

  .post-item .when time::after {
    content: " ";
  }

  .prose pre {
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .prose h2 .anchor,
  .prose h3 .anchor,
  .prose h4 .anchor {
    display: none;
  }

  .site-header .wrap {
    padding-block: 0.25rem;
  }

  .brand {
    gap: 0.5rem;
    font-size: 0.95rem;
  }

  .site-nav {
    gap: 0;
  }

  .site-nav a,
  .theme-toggle {
    padding: 0.35rem 0.4rem;
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- About page terminal ---------- */
:root {
  --term-bg: #17171a;
  --term-text: #dcd8d0;
  --term-muted: #9a958a;
  --term-prompt: #ff8a5c;
  --term-ok: #8fd19e;
  --term-line: #2b2b30;
}

.terminal-wrap {
  margin-top: 2.5rem;
  max-width: var(--read-width);
}

@media (min-width: 1100px) {
  .page-with-aside {
    display: grid;
    grid-template-columns: minmax(0, var(--read-width)) 20rem;
    justify-content: space-between;
    align-items: start;
  }

  /* The card stays in view beside the text and is as tall as its content, up to the space left under the
     header. assets/terminal.js hides the least important lines when they do not all fit; if that script is
     missing, the oldest lines scroll off the top and the live prompt stays visible, as in a real terminal. */
  .terminal-wrap {
    position: sticky;
    top: var(--sticky-top);
    margin-top: var(--top-gap);
    max-width: none;
  }

  .terminal {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--sticky-top) - 1.5rem);
  }

  .terminal-bar {
    flex: none;
  }

  .terminal-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 0;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, transparent, #000 1rem);
  }
}

.terminal {
  overflow: hidden;
  border: 1px solid var(--term-line);
  border-radius: 12px;
  background: var(--term-bg);
  color: var(--term-text);
  font: 0.8rem/1.6 var(--mono);
  box-shadow: 0 14px 34px -22px rgba(0, 0, 0, 0.55);
}

.terminal-bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--term-line);
}

.terminal-bar span {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--term-line);
}

.terminal-bar span:first-child {
  background: var(--term-prompt);
}

.terminal-body {
  padding: 1.1rem 1rem;
}

.t-line + .t-line {
  margin-top: 0.7rem;
}

.terminal p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.t-cmd::before {
  content: "$ ";
  color: var(--term-prompt);
}

.t-out {
  color: var(--term-muted);
}

.t-out a {
  color: var(--term-text);
  text-decoration-color: var(--term-prompt);
  text-underline-offset: 0.2em;
}

.t-out a:hover {
  color: var(--term-prompt);
}

.t-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.9rem;
}

.t-ok {
  color: var(--term-ok);
}

.t-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  background: var(--term-prompt);
  vertical-align: text-bottom;
}

/* Lines appear one after another, and the cursor blinks, only for people who have not asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .t-line {
    opacity: 0;
    animation: t-reveal 0.2s ease forwards;
    animation-delay: calc(0.3s + var(--i) * 0.28s);
  }

  .t-cursor {
    animation: t-blink 1.1s steps(1) infinite;
  }
}

/* Phones have little room, so the terminal is left out there. */
@media (max-width: 640px) {
  .terminal-wrap {
    display: none;
  }
}

@keyframes t-reveal {
  to {
    opacity: 1;
  }
}

@keyframes t-blink {
  50% {
    opacity: 0;
  }
}

@media print {
  .site-header,
  .site-footer,
  .pager,
  .terminal-wrap,
  .copy {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
