/* yfeld.de design system — implements docs/plan/04-design.md.
   Calm, typographic, fast. System fonts, no JS, one accent color.
   Mobile-first: base styles are the phone layout; the only width
   breakpoints are (min-width: 40rem) and (min-width: 64rem).
   Widths use rem/ch/min()/clamp() — never a fixed px width over 320px
   outside a media query — so the page never scrolls horizontally. */

:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;

  --fs-base: clamp(1rem, 0.95rem + 0.3vw, 1.0625rem); /* 16px on phones → 17px on desktop */
  --pad-x: clamp(1rem, 4vw, 2rem);                    /* page side padding */
  --tap: 2.75rem;                                     /* 44px minimum touch target */
  --lh: 1.65;
  --measure: 68ch;
  --wide: 72rem;                                      /* header/footer max width */

  --bg: #fbfaf7;            /* warm off-white */
  --bg-soft: #f2f0ea;       /* code blocks, cards */
  --fg: #1d1d1f;
  --fg-muted: #5c5c66;
  --border: #e3e0d8;
  --accent: #0f6e6e;        /* deep teal */
  --accent-soft: #e0f0ef;
  --error: #b42318;

  --radius: 6px;
  --space: 1rem;

  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141517;
    --bg-soft: #1d1f22;
    --fg: #e6e4df;
    --fg-muted: #a09ea0;
    --border: #2c2e33;
    --accent: #5cc8c2;
    --accent-soft: #17302f;
    --error: #ff8a80;
  }
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh);
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  line-height: 1.25;
  font-weight: 650;
}

h1 {
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  margin: 0 0 1rem;
}

h2 {
  font-size: clamp(1.35rem, 1.15rem + 1vw, 1.75rem);
  margin: 2rem 0 0.75rem;
}

h3 {
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.3rem);
  margin: 1.5rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

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

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--pad-x);
  z-index: 10;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* Shared page-width wrappers. Side padding respects notch safe areas. */
.wrap {
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: max(var(--pad-x), env(safe-area-inset-left))
    max(var(--pad-x), env(safe-area-inset-right));
}

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

.site-header {
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  padding-block: 0.75rem;
}

.site-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 650;
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
}

.site-name:hover {
  color: var(--accent);
}

/* Below 64rem: the nav is a wrapping row of pills; the name sits on its
   own line. Every section stays visible — no hamburger, no JS. */
.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: var(--accent-soft);
  color: var(--fg);
}

.nav-link[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

@media (min-width: 64rem) {
  .header-inner {
    flex-wrap: nowrap;
    justify-content: space-between;
    padding-block: 0.5rem;
  }

  /* Desktop: plain text links, active item gets an accent underline.
     The 44px tap height is kept. */
  .nav-list {
    flex-wrap: nowrap;
    gap: 0.25rem;
  }

  .nav-link {
    border: none;
    background: none;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
  }

  .nav-link[aria-current="page"] {
    background: none;
    color: var(--fg);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.4em;
  }
}

/* ---------------------------------------------------------------- main -- */

.site-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--pad-x));
  margin-inline: auto;
  padding-block: 2rem 3rem;
  padding-inline: max(var(--pad-x), env(safe-area-inset-left))
    max(var(--pad-x), env(safe-area-inset-right));
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 1rem;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}

.footer-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0.4rem 0.75rem;
  color: var(--fg-muted);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--accent);
}

@media (min-width: 40rem) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* --------------------------------------------------------------- prose -- */
/* Post and page body, including everything the Markdown/Typst pipeline
   emits (03-architecture.md §7). */

.prose {
  overflow-wrap: anywhere;
}

.prose h2,
.prose h3,
.prose h4 {
  scroll-margin-top: 1rem;
}

.prose > * {
  margin-block-start: 0;
}

.prose > * + * {
  margin-block-start: 1rem;
}

.prose ul,
.prose ol {
  margin-block: 1rem;
}

.prose li {
  margin-block: 0.25rem;
}

.prose h2 + *,
.prose h3 + *,
.prose h4 + * {
  margin-block-start: 0.5rem;
}

.prose h2,
.prose h3,
.prose h4 {
  margin-block: 2rem 0.75rem;
}

/* Heading anchors (#) from the renderer: hover-visible, always visible
   on touch devices where there is no hover. */
a.header-anchor {
  text-decoration: none;
  opacity: 0;
  margin-left: 0.25rem;
  font-weight: 400;
}

.prose h2:hover a.header-anchor,
.prose h3:hover a.header-anchor,
.prose h4:hover a.header-anchor,
a.header-anchor:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  a.header-anchor {
    opacity: 0.6;
  }
}

/* Code blocks: wide content scrolls inside its own box. */
pre.code {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  font-family: var(--font-mono);
  font-size: 0.85em;
  line-height: 1.55;
  margin-block: 1.25rem;
}

@media (min-width: 40rem) {
  pre.code {
    font-size: 0.9em;
  }
}

:not(pre) > code {
  background: var(--bg-soft);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-family: var(--font-mono);
  font-size: 0.92em;
}

pre > code {
  font-family: inherit;
  background: none;
  padding: 0;
}

/* Tables scroll horizontally on phones inside .table-wrap. */
.table-wrap {
  overflow-x: auto;
  margin-block: 1.25rem;
}

table {
  border-collapse: collapse;
  inline-size: 100%;
  font-size: 0.95em;
}

th,
td {
  border: 1px solid var(--border);
  padding: 0.4em 0.6em;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--bg-soft);
}

blockquote {
  margin: 1.25rem 0;
  padding: 0.25rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--fg);
}

blockquote p {
  margin-block: 0.5rem;
}

/* GitHub alerts (comrak `alerts = true`). */
.markdown-alert {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.5rem 1rem;
  margin-block: 1.25rem;
}

.markdown-alert-title {
  font-weight: 600;
  margin-block: 0.25rem;
  color: var(--accent);
}

.markdown-alert-warning,
.markdown-alert-caution {
  border-left-color: var(--error);
}

.markdown-alert-warning .markdown-alert-title,
.markdown-alert-caution .markdown-alert-title {
  color: var(--error);
}

/* Footnotes. */
.footnotes {
  font-size: 0.9em;
  color: var(--fg-muted);
  margin-block: 2rem;
}

.footnotes hr {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: 0.75rem 1rem;
}

/* Figures, images, media. */
figure {
  margin: 1.5rem 0;
  text-align: center;
}

figcaption {
  font-size: 0.85em;
  color: var(--fg-muted);
  margin-block-start: 0.5rem;
}

/* Typst math: display math is centered and scrolls when too wide;
   inline math keeps its own baseline (no max-width!). */
.math-display {
  margin-block: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  text-align: center;
}

svg.math-inline {
  margin: 0;
}

/* Typst block figures: the SVG scales with width; once it would shrink
   below ~60% of its natural size (renderer sets min-width on the SVG),
   the figure scrolls inside its own box instead. */
.typst-figure {
  overflow-x: auto;
  overflow-y: hidden;
  margin-block: 1.5rem;
}

.typst-figure svg {
  margin-inline: auto;
}

/* Renderer failures are visible, never silent. */
.render-error {
  border: 1px solid var(--error);
  border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 0.75rem 1rem;
  margin-block: 1.25rem;
  font-size: 0.9em;
}

.render-error strong {
  color: var(--error);
}

.render-error pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
  overflow-x: auto;
  margin-block: 0.5rem;
}

/* WASM demos (03-architecture.md §10): the root fills its box and the
   demo adapts; nothing here may force page-level scroll. */
.wasm-demo {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-block: 1.5rem;
  overflow: hidden;
}

.wasm-demo-root {
  inline-size: 100%;
}

.wasm-demo-status {
  text-align: center;
  color: var(--fg-muted);
  padding: 2rem 1rem;
  margin: 0;
}

.wasm-demo noscript {
  display: block;
  padding: 0 1rem 1rem;
  color: var(--fg-muted);
  text-align: center;
}

/* The demo's reset button is created in wasm; it arrives unstyled, so the
   site gives it the pill treatment (44px tap target, theme-aware). */
.wasm-demo button {
  display: inline-block;
  min-height: var(--tap);
  padding: 0.4rem 1.2rem;
  margin-block: 0.25rem 1rem;
  font: inherit;
  color: var(--fg);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}

.wasm-demo button:hover,
.wasm-demo button:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent);
}

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

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  margin-block-end: 2rem;
}

.hero-intro h1 {
  margin-block-end: 0.5rem;
}

.hero-intro {
  text-align: left;
}

.profile-photo {
  inline-size: 120px;
  block-size: 120px;
  border-radius: 50%;
  flex: none;
}

.featured-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--tap);
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
}

.feature-link svg {
  inline-size: 1.25rem;
  block-size: 1.25rem;
  flex: none;
  color: var(--accent);
}

.feature-link:hover,
.feature-link:focus-visible {
  background: var(--accent-soft);
}

.recent-posts h2 {
  margin-block: 1.5rem 0.75rem;
}

@media (min-width: 40rem) {
  .hero {
    flex-direction: row;
    text-align: left;
    align-items: center;
    gap: 2rem;
  }

  .profile-photo {
    inline-size: 160px;
    block-size: 160px;
  }

  .featured-links {
    justify-content: flex-start;
  }
}

/* ------------------------------------------------------ post list rows -- */
/* Shared by home (with summary), blog index and tag pages. On phones the
   date sits above the title; from 40rem it's a left column. */

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

.post-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.post-item:last-child {
  border-bottom: none;
}

.post-item-date {
  font-size: 0.85rem;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
}

.post-item-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 650;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
}

.post-item-summary {
  margin: 0;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.post-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.75rem;
  margin: 0;
  font-size: 0.85rem;
}

@media (min-width: 40rem) {
  .post-item {
    flex-direction: row;
    gap: 1rem;
    align-items: baseline;
  }

  .post-item-date {
    flex: none;
    inline-size: 6rem;
  }

  .post-item-main {
    flex: 1;
  }
}

/* --------------------------------------------------------------- about -- */

.about-photo {
  display: block;
  margin-inline: auto;
  margin-block-end: 1.5rem;
  inline-size: 120px;
  block-size: 120px;
  border-radius: 50%;
}

@media (min-width: 40rem) {
  .about-photo {
    float: right;
    margin-inline: 0 0 1.5rem 1.5rem;
    inline-size: 180px;
    block-size: 180px;
  }
}

/* -------------------------------------------------------- publications -- */

.pub {
  margin-block-end: 2rem;
  overflow-wrap: anywhere;
}

.pub-title {
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
}

.pub-title a {
  color: var(--fg);
  text-decoration: none;
}

.pub-title a:hover,
.pub-title a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.pub-authors {
  margin: 0 0 0.25rem;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

.pub-venue {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.pub-links-note {
  flex-basis: 100%;
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Small muted label for unlisted posts (T34). */
.badge-unlisted {
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  font-weight: 500;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
}

.pill:hover,
.pill:focus-visible {
  background: var(--accent-soft);
}

/* ----------------------------------------------------------- blog + tags -- */

.blog-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin-block: 0 1.5rem;
}

.blog-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

/* The "Unlisted" section of the blog index (`?unlisted=1`, T34). */
.unlisted-note {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-block: 0.25rem 0.75rem;
}

.post-item-main .badge-unlisted {
  align-self: center;
}

.year-group h2 {
  font-size: 1.35rem;
  margin-block: 1.5rem 0.25rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.tag-list-item {
  display: inline-flex;
}

.tag-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--tap);
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.tag-link:hover,
.tag-link:focus-visible {
  background: var(--accent-soft);
}

.tag-count {
  color: var(--fg-muted);
  font-size: 0.85rem;
}

/* Tag links stay visually small, but the hit area is padded to a 24px+ tap
   target (negative margins keep the layout unchanged), and the underline
   keeps them distinguishable from surrounding text (axe link-in-text-block). */
a.tag {
  display: inline-block;
  padding: 0.3rem 0.35rem;
  margin: -0.3rem -0.35rem;
  text-decoration-thickness: 1px;
}

/* ---------------------------------------------------------------- post -- */

.post-header {
  margin-block-end: 2rem;
  padding-block-end: 1rem;
  border-bottom: 1px solid var(--border);
}

.post-header h1 {
  margin-block: 0 0.5rem;
}

.post-meta {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.post-meta .tag {
  white-space: nowrap;
}

.post-updated {
  color: var(--fg-muted);
  font-size: 0.85rem;
  margin: 0.25rem 0 0;
}

.draft-banner {
  border: 1px solid var(--error);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--error) 10%, var(--bg));
  color: var(--error);
  padding: 0.75rem 1rem;
  margin-block-end: 1.5rem;
  font-size: 0.95rem;
}

.post-unlisted {
  color: var(--fg-muted);
  font-size: 0.85rem;
  margin: 0.25rem 0 0;
}

.post-unlisted .badge-unlisted {
  margin-inline-end: 0.25rem;
}

/* Blog search (T35): the box on the blog index, the results page, and the
   live results rendered by static/js/search.js. Mobile-first; no fixed widths. */
.search-form {
  margin-block: 1rem 1.5rem;
}

.search-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-block-end: 0.35rem;
}

.search-row {
  display: flex;
  gap: 0.5rem;
  max-width: var(--measure);
}

.search-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--tap);
  padding: 0 0.75rem;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

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

.search-submit {
  min-height: var(--tap);
  padding: 0 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
}

.search-submit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.search-count {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-block: 0.75rem 0.5rem;
}

.search-empty {
  color: var(--fg-muted);
  margin-block: 0.75rem;
}

.search-error {
  color: var(--error);
  margin-block: 0.75rem;
}

mark.search-hit {
  background: var(--accent-soft);
  color: inherit;
  padding: 0 0.1em;
  border-radius: 2px;
}

.post-item-unlisted {
  opacity: 0.85;
}

.post-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-block-start: 2.5rem;
  padding-block-start: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

.post-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

.post-nav-next {
  margin-inline-start: auto;
}

/* ------------------------------------------------------------ projects -- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(18rem, 100%), 1fr));
  gap: 1rem;
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.project-card h2 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.project-card p {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--fg-muted);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

.empty-state {
  color: var(--fg-muted);
  text-align: center;
  margin-block: 3rem;
}

/* --------------------------------------------------------------- links -- */

.link-list {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.link-item {
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.link-item:last-child {
  border-bottom: none;
}

.link-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--tap);
  font-weight: 600;
}

.link-label svg {
  inline-size: 1.25rem;
  block-size: 1.25rem;
  flex: none;
  color: var(--accent);
}

.link-desc {
  margin: 0 0 0.25rem;
  color: var(--fg-muted);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

@media (min-width: 40rem) {
  .link-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.5rem;
    align-items: center;
  }

  .link-desc {
    margin: 0;
  }
}

/* ----------------------------------------------------------------- 404 -- */

.not-found {
  text-align: center;
  margin-block: 3rem;
}

.not-found p {
  color: var(--fg-muted);
}

.not-found-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.not-found-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0.3rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}

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

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .post-nav,
  .wasm-demo {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    min-height: 0;
  }

  a {
    color: #000;
  }

  /* External link URLs are useful on paper (posts only). */
  .prose a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }

  pre.code,
  .table-wrap,
  .math-display,
  .typst-figure {
    overflow: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none;
    animation: none;
  }
}
