/* ==========================================================================
   Standard Index — theme tokens
   Type scale and neutral ramp follow Ghost's Source/Headline themes (MIT);
   accent hues, the index gutter and the rail are specific to this theme.
   ========================================================================== */

:root {
  --font-ui: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-body: Lora, Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ink: #15171a;
  --ink-2: rgb(0 0 0 / 0.55);
  --ink-3: rgb(0 0 0 / 0.38);
  --paper: #ffffff;
  --paper-2: #f6f7f7;
  --rule: rgb(0 0 0 / 0.08);
  --rule-strong: rgb(0 0 0 / 0.16);
  --accent: #0a6b63;
  --accent-soft: rgb(10 107 99 / 0.08);
  --berry: #8a2f4c;

  --container: 1320px;
  --content: 720px;
  --gap: clamp(20px, 1.4rem + 1.6vw, 44px);
  --rail: 300px;

  --radius: 3px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.04);
}

:root[data-theme="dark"] {
  --ink: #e9ecef;
  --ink-2: rgb(255 255 255 / 0.64);
  --ink-3: rgb(255 255 255 / 0.42);
  --paper: #101215;
  --paper-2: #171a1d;
  --rule: rgb(255 255 255 / 0.15);
  --rule-strong: rgb(255 255 255 / 0.28);
  --accent: #5fd3c6;
  --accent-soft: rgb(95 211 198 / 0.12);
  --berry: #e08ca6;
  --shadow: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e9ecef;
    --ink-2: rgb(255 255 255 / 0.64);
    --ink-3: rgb(255 255 255 / 0.42);
    --paper: #101215;
    --paper-2: #171a1d;
    --rule: rgb(255 255 255 / 0.15);
    --rule-strong: rgb(255 255 255 / 0.28);
    --accent: #5fd3c6;
    --accent-soft: rgb(95 211 198 / 0.12);
    --berry: #e08ca6;
    --shadow: none;
  }
}

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

html {
  font-size: 62.5%; /* 1rem = 10px, matching the Source theme scale */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.6rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 1rem 1.4rem;
  z-index: 10;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

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

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 5;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 7.2rem;
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.8rem;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.nav {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
  /* min-width:0 is what lets the horizontal scroll work inside a flex row
     instead of widening the page. */
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  font-size: 1.35rem;
  font-weight: 500;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 24px), transparent 100%);
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent);
}

.theme-toggle {
  background: none;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.7rem 1rem;
}

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

/* ---------- masthead ---------- */
.masthead {
  border-bottom: 1px solid var(--rule);
  margin: 0 0 clamp(28px, 4vw, 56px);
  padding: clamp(32px, 6vw, 72px) 0 clamp(24px, 4vw, 40px);
}

.masthead-kicker {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--berry);
  margin: 0 0 1.2rem;
}

.masthead-title {
  font-size: clamp(3.4rem, 7vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 1.6rem;
  max-width: 18ch;
}

.masthead-lede {
  font-family: var(--font-body);
  font-size: clamp(1.7rem, 2.2vw, 2.05rem);
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 2.4rem;
  max-width: 58ch;
}

.masthead-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.4rem 4.8rem;
  margin: 0;
  border-top: 1px solid var(--rule);
  padding-top: 1.8rem;
}

.masthead-stats dt {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.masthead-stats dd {
  margin: 0.4rem 0 0;
  font-size: 1.6rem;
  font-weight: 600;
}

/* ---------- layouts ---------- */
.layout-home,
.layout-post {
  display: grid;
  gap: clamp(32px, 4vw, 56px);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 1000px) {
  .layout-home {
    grid-template-columns: minmax(0, 1fr) var(--rail);
  }

  /* DOM order is article → rail (better for screen readers and mobile);
     on desktop the rail is placed back on the left. */
  .layout-post {
    grid-template-columns: var(--rail) minmax(0, 1fr);
  }

  .layout-post .column-main {
    grid-column: 2;
    grid-row: 1;
  }

  .layout-post .rail {
    grid-column: 1;
    grid-row: 1;
  }
}

.column-main {
  min-width: 0;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 2.8rem;
  position: sticky;
  top: 9.6rem;
}

.rail-block {
  border-top: 1px solid var(--rule);
  padding-top: 1.6rem;
}

.rail-title {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1.2rem;
}

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

.term {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  display: inline-block;
  font-size: 1.25rem;
  padding: 0.5rem 0.9rem;
}

.term .count,
.count {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ---------- entry roll: the index gutter is the signature ---------- */
.roll {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.roll > li {
  border-bottom: 1px solid var(--rule);
}

.entry {
  display: grid;
  grid-template-columns: 5.6rem minmax(0, 1fr);
  gap: 1.6rem;
  padding: 2.4rem 0;
}

.entry-index {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--ink-3);
  padding-top: 0.6rem;
  transition: color 0.15s ease;
}

.entry:hover .entry-index {
  color: var(--accent);
}

.entry-body {
  min-width: 0;
}

.entry-kicker {
  margin: 0 0 0.8rem;
}

.chip {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--berry);
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  display: inline-block;
}

.chip:hover {
  color: var(--berry);
  border-color: var(--berry);
}

.entry-title {
  font-size: clamp(2rem, 2.6vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.8rem;
}

.entry-title a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.entry-summary {
  font-family: var(--font-body);
  font-size: 1.65rem;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 1rem;
  max-width: 62ch;
}

.entry-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  margin: 0;
}

/* ---------- pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 3.2rem 0 6rem;
}

.page-link {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 1.3rem;
  padding: 0.6rem 1.1rem;
}

.page-link.is-current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.page-gap {
  color: var(--ink-3);
  font-family: var(--font-mono);
}

/* ---------- breadcrumbs ---------- */
.breadcrumbs {
  /* the breadcrumb is followed by a grid, so the gap has to live here */
  margin: 2.4rem 0 clamp(14px, 2vw, 22px);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--ink-3);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.6rem;
  color: var(--ink-3);
}

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

/* ---------- listing header ---------- */
.taxonomy-header {
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(24px, 3vw, 40px);
  /* the breadcrumb above supplies the top gap */
  padding: 0 0 2rem;
}

.taxonomy-kicker {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--berry);
  margin: 0 0 0.8rem;
}

.taxonomy-header h1 {
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 0.8rem;
}

.taxonomy-meta {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--ink-3);
  margin: 0;
}

.listing-title {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  letter-spacing: -0.02em;
  margin: 4rem 0 2rem;
}

/* ---------- article ---------- */
.article-header {
  margin-bottom: 2.4rem;
}

.article-header h1 {
  font-size: clamp(3rem, 5.4vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0.8rem 0 1.4rem;
  max-width: 26ch;
}

.article-lede {
  font-family: var(--font-body);
  font-size: 1.95rem;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 1.6rem;
  max-width: 60ch;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--ink-3);
  border-top: 1px solid var(--rule);
  margin: 0;
  padding-top: 1.4rem;
}

.article-hero {
  margin: 0 0 2.4rem;
}

.prose {
  font-family: var(--font-body);
  font-size: 1.92rem;
  line-height: 1.72;
  max-width: 68ch;
}

.prose > * + * {
  margin-top: 1.5em;
}

.prose h2 {
  font-family: var(--font-ui);
  font-size: clamp(2.2rem, 3vw, 2.7rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-top: 2.4em;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
}

.prose h3 {
  font-family: var(--font-ui);
  font-size: 1.92rem;
  letter-spacing: -0.01em;
  margin-top: 1.8em;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose blockquote {
  border-left: 2px solid var(--accent);
  color: var(--ink-2);
  margin: 2em 0;
  padding-left: 1.4rem;
  font-style: italic;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.1em 0.35em;
}

.prose pre {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow-x: auto;
  padding: 1.4rem;
}

.prose pre code {
  background: none;
  border: 0;
  padding: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

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

.prose th,
.prose td {
  border-bottom: 1px solid var(--rule);
  padding: 1rem 1.2rem;
  text-align: left;
}

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

.prose--page {
  max-width: 72ch;
}

/* ---------- faq ---------- */
.faq {
  margin: 4rem 0 0;
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
  max-width: 68ch;
}

.faq h2 {
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  margin: 0 0 1.2rem;
}

.faq-item {
  border-bottom: 1px solid var(--rule);
  padding: 1.2rem 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.7rem;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "+";
  color: var(--accent);
  font-family: var(--font-mono);
  margin-right: 0.8rem;
}

.faq-item[open] summary::before {
  content: "−";
}

.faq-item .answer {
  font-family: var(--font-body);
  font-size: 1.8rem;
  line-height: 1.7;
  color: var(--ink-2);
  padding: 1rem 0 0.4rem 2.6rem;
}

/* ---------- toc ---------- */
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 1.35rem;
}

.toc li {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.6rem;
  padding: 0.45rem 0;
}

.toc-num {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--ink-3);
}

.toc a {
  color: var(--ink-2);
  line-height: 1.4;
}

.toc a.is-active {
  color: var(--accent);
  font-weight: 600;
}

.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.recent-list a {
  display: block;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.35;
}

.recent-list .entry-meta {
  font-size: 1.05rem;
}

/* ---------- ads ---------- */
.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--paper-2);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius);
  margin: 3rem 0;
  padding: 1rem;
  min-height: 9rem;
}

.ad-slot--fixed {
  min-height: 26rem;
}

.ad-label {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- post nav + related ---------- */
.post-nav {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding-top: 2.4rem;
}

@media (min-width: 700px) {
  .post-nav {
    grid-template-columns: 1fr 1fr;
  }
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.35;
}

.post-nav-link.is-next {
  text-align: right;
}

.post-nav-link span {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
}

.related {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding-top: 2.4rem;
}

.related h2 {
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin: 0 0 1.6rem;
}

.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.4rem;
}

@media (min-width: 760px) {
  .related-list {
    grid-template-columns: 1fr 1fr;
  }
}

.related-list a {
  display: block;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

/* ---------- comments (read-only, file-backed) ---------- */
.comments {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  max-width: 68ch;
  padding-top: 2.4rem;
}

.comments h2 {
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin: 0 0 1.6rem;
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem;
}

.comment {
  border-left: 2px solid var(--rule);
  padding-left: 1.4rem;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--ink-3);
  margin: 0 0 0.6rem;
}

.comment-avatar {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 50%;
  color: var(--accent);
  display: inline-flex;
  font-size: 1.1rem;
  font-weight: 600;
  height: 2.4rem;
  justify-content: center;
  width: 2.4rem;
}

.comment-author {
  color: var(--ink);
  font-weight: 600;
}

.comment-body {
  font-family: var(--font-body);
  font-size: 1.75rem;
  line-height: 1.65;
  margin: 0;
}

.comment-form {
  border-top: 1px dashed var(--rule);
  display: grid;
  gap: 1.2rem;
  margin-top: 2.8rem;
  padding-top: 2rem;
}

.comment-note {
  background: var(--paper-2);
  border-left: 2px solid var(--berry);
  color: var(--ink-2);
  font-size: 1.35rem;
  margin: 0;
  padding: 0.8rem 1rem;
}

.comment-form label {
  display: grid;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  gap: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.comment-form input,
.comment-form textarea {
  background: var(--paper-2);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.5rem;
  padding: 1rem;
}

.comment-form button {
  background: var(--ink);
  border: 0;
  border-radius: var(--radius);
  color: var(--paper);
  cursor: not-allowed;
  font-size: 1.4rem;
  justify-self: start;
  opacity: 0.5;
  padding: 1rem 1.6rem;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: clamp(48px, 8vw, 96px);
  padding: clamp(32px, 5vw, 56px) 0 3.2rem;
  background: var(--paper-2);
}

.footer-cols {
  display: grid;
  gap: 3.2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.footer-col h2 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1.2rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  font-size: 1.45rem;
}

.footer-col p {
  color: var(--ink-2);
  font-size: 1.4rem;
  line-height: 1.6;
  margin: 0;
  max-width: 40ch;
}

.colophon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
  margin-top: 3.2rem;
  padding-top: 1.6rem;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--ink-3);
}

/* ---------- not found ---------- */
.notfound {
  padding: clamp(40px, 10vw, 120px) 0;
}

.notfound h1 {
  font-size: clamp(3rem, 6vw, 4.4rem);
  letter-spacing: -0.03em;
  margin: 0 0 1.2rem;
}

.notfound-actions {
  margin: 2rem 0 2.8rem;
}

.button {
  background: var(--ink);
  border-radius: var(--radius);
  color: var(--paper);
  display: inline-block;
  font-size: 1.45rem;
  padding: 1rem 1.6rem;
}

.button:hover {
  background: var(--accent);
  color: var(--paper);
}

.empty {
  font-family: var(--font-body);
  font-size: 1.8rem;
  color: var(--ink-2);
  padding: 3rem 0;
}

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

/* ==========================================================================
   Small screens — mobile fixes
   Base sheet is desktop-complete; everything below tightens it for phones.
   Touch targets are held at >= 44px, and nothing may force a horizontal
   scrollbar: ad units, tables and long words are all capped to the viewport.
   ========================================================================== */

.prose {
  overflow-wrap: anywhere;
}

.prose .table-wrap table {
  min-width: 34rem; /* scroll inside .table-wrap instead of crushing columns */
}

.ad-slot {
  max-width: 100%;
}

.ad-slot ins {
  max-width: 100%;
}

@media (max-width: 999px) {
  /* a sticky rail taller than the viewport traps the scroll */
  .rail {
    position: static;
    top: auto;
  }
}

@media (max-width: 600px) {
  :root {
    --gap: 18px;
  }

  /* header: nav scrolls, toggle and brand stay tappable */
  .header-inner {
    gap: 1.2rem;
    min-height: 6.4rem;
  }

  .brand-name {
    font-size: 1.65rem;
  }

  .brand-tagline {
    font-size: 0.95rem;
    letter-spacing: 0.06em;
  }

  .nav a {
    display: inline-flex;
    align-items: center;
    min-height: 4.4rem;
    padding: 0 0.2rem;
  }

  .theme-toggle {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-height: 4.4rem;
    min-width: 4.4rem;
    padding: 0;
  }

  /* masthead + listing */
  .masthead {
    padding: 2.4rem 0 1.6rem;
  }

  .masthead-title {
    font-size: clamp(2.9rem, 11vw, 3.6rem);
  }

  .masthead-lede {
    font-size: 1.65rem;
  }

  .masthead-stats {
    gap: 1.6rem 2.8rem;
  }

  .entry {
    grid-template-columns: 3.6rem minmax(0, 1fr);
    gap: 1rem;
    padding: 1.8rem 0;
  }

  .entry-title {
    font-size: 2.05rem;
  }

  .entry-summary {
    font-size: 1.55rem;
  }

  .article-header h1 {
    font-size: clamp(2.6rem, 9vw, 3.2rem);
    max-width: 100%;
  }

  .article-lede {
    font-size: 1.75rem;
  }

  .article-meta {
    gap: 0.4rem 1.2rem;
    font-size: 1.05rem;
  }

  .prose {
    font-size: 1.8rem;
    line-height: 1.68;
  }

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

  .prose h3 {
    font-size: 1.8rem;
  }

  .faq-item summary {
    padding: 1rem 0;
    font-size: 1.6rem;
  }

  .faq-item .answer {
    padding: 0.6rem 0 0.4rem 1.4rem;
    font-size: 1.7rem;
  }

  .comment-body {
    font-size: 1.65rem;
  }

  .post-nav {
    gap: 2rem;
  }

  .post-nav-link.is-next {
    text-align: left;
  }

  /* touch targets */
  .term,
  .page-link,
  .button,
  .comment-form button {
    align-items: center;
    display: inline-flex;
    min-height: 4.4rem;
    padding-inline: 1.2rem;
  }

  .breadcrumbs ol {
    font-size: 1.05rem;
  }

  .footer-col ul {
    font-size: 1.5rem;
    gap: 0.2rem;
  }

  .footer-col a {
    display: inline-block;
    padding: 0.8rem 0;
  }

  .footer-col h2 {
    margin-bottom: 0.6rem;
  }

  .colophon {
    gap: 0.4rem;
  }
}

.taxonomy-bio {
  border-left: 2px solid var(--accent-soft);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 1.7rem;
  line-height: 1.6;
  margin: 1.2rem 0 0;
  max-width: 62ch;
  padding-left: 1.2rem;
}
