/* =========================================================================
   Monograph — a clean, modern editorial theme
   1. Tokens   2. Reset   3. Base   4. Layout   5. Header   6. Masthead
   7. Post list   8. Single   9. Prose   10. Code   11. Forms
   12. Footer   13. Bits   14. Responsive
   ========================================================================= */

/* 1. TOKENS ---------------------------------------------------------------- */
:root {
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1180px;
  --wrap-wide: 1080px;
  --wrap-narrow: 720px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);

  --step--1: clamp(0.82rem, 0.79rem + 0.13vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2:  clamp(1.45rem, 1.3rem + 0.7vw, 1.9rem);
  --step-3:  clamp(1.75rem, 1.5rem + 1.2vw, 2.6rem);
  --step-4:  clamp(2.1rem, 1.7rem + 2vw, 3.6rem);
  --step-5:  clamp(2.5rem, 1.9rem + 3vw, 4.6rem);

  --radius: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;
  --ring: 0 0 0 3px color-mix(in oklab, var(--text) 18%, transparent);
  --shadow-sm: 0 1px 2px rgba(20, 18, 16, 0.04), 0 2px 8px rgba(20, 18, 16, 0.04);
  --shadow-md: 0 8px 30px rgba(20, 18, 16, 0.10);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

:root,
[data-theme="light"] {
  --bg: #faf9f7;
  --surface: #ffffff;
  --surface-2: #f4f2ee;
  --text: #1b1a18;
  --text-soft: #3c3a36;
  --muted: #6c685f;
  --faint: #9a958c;
  --border: #e8e4dd;
  --border-strong: #d9d4ca;
  --accent: #16a34a;
  --accent-hover: #15803d;
  --code-bg: #f6f4f0;
  --code-text: #24232a;
  --selection: #d8efdf;
}

[data-theme="dark"] {
  --bg: #0d0d0f;
  --surface: #161619;
  --surface-2: #1c1c20;
  --text: #ecebe7;
  --text-soft: #cdccc6;
  --muted: #99978f;
  --faint: #6f6d68;
  --border: #26262b;
  --border-strong: #34343a;
  --accent: #1fb155;
  --accent-hover: #34c46a;
  --code-bg: #131318;
  --code-text: #d7d6e0;
  --selection: #1c3a28;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3), 0 2px 10px rgba(0,0,0,0.25);
  --shadow-md: 0 12px 40px rgba(0,0,0,0.5);
}

/* 2. RESET ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
::selection { background: var(--selection); }

/* 3. BASE ------------------------------------------------------------------ */
body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv05" 1, "ss01" 1;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.012em; color: var(--text); font-optical-sizing: auto; }
strong, b { font-weight: 600; }

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

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 200;
  background: var(--surface); color: var(--text); padding: 0.7rem 1.1rem;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md); border: 1px solid var(--border);
}
.skip-link:focus { top: 1rem; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 4. LAYOUT ---------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--wide { max-width: var(--wrap-wide); }
.wrap--narrow { max-width: var(--wrap-narrow); }
.site-main { display: block; min-height: 50vh; }

/* 5. HEADER ---------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 68px; }
.brand { flex: 0 0 auto; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -0.02em; }
.custom-logo-link img { max-height: 38px; width: auto; }

.primary-nav { flex: 1 1 auto; }
.nav-list { display: flex; gap: 1.6rem; list-style: none; padding: 0; }
.nav-list a { font-size: var(--step--1); font-weight: 500; color: var(--muted); letter-spacing: 0.01em; position: relative; padding-block: 0.4rem; transition: color 0.18s var(--ease); }
.nav-list a:hover { color: var(--text); }
.nav-list .current-cat a, .nav-list .current-menu-item a { color: var(--text); }

.header-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 0.4rem; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-sm); color: var(--muted); transition: background-color 0.18s, color 0.18s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-moon { display: block; }
.menu-toggle { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: var(--step--1); font-weight: 600; padding: 0.6rem 1.1rem; border-radius: var(--radius-pill); transition: transform 0.15s var(--ease), background-color 0.18s, box-shadow 0.18s; }
.btn-cta { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.btn-cta:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-cta:active { transform: translateY(0); }

.search-panel { border-top: 1px solid var(--border); background: var(--bg); padding-block: 1rem; }

/* 6. MASTHEAD -------------------------------------------------------------- */
.masthead { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 3vw, 2.5rem); }
.masthead-eyebrow { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.6rem; }
.masthead-title { font-size: var(--step-5); font-weight: 600; letter-spacing: -0.022em; max-width: 16ch; }
.masthead-title span { color: var(--muted); }
.masthead-tagline { margin-top: 1rem; font-size: var(--step-1); color: var(--muted); max-width: 52ch; line-height: 1.5; }
.masthead--archive { padding-bottom: clamp(1rem, 2vw, 1.5rem); border-bottom: 1px solid var(--border); margin-bottom: 2.5rem; }
.masthead-search { margin-top: 1.5rem; max-width: 440px; }

/* 7. POST LIST ------------------------------------------------------------- */
.post-list { padding-block: 1rem 3rem; }
.post-cats { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.85rem; }
.pill { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 0.22rem 0.6rem; border-radius: var(--radius-pill); transition: color 0.16s, border-color 0.16s; }
.pill:hover { color: var(--text); border-color: var(--border-strong); }

.post-meta { display: flex; align-items: center; gap: 0.55rem; font-size: var(--step--1); color: var(--faint); }
.meta-sep { opacity: 0.6; }

/* Feature (first post on home) */
.post-card--feature { margin-bottom: clamp(2.5rem, 5vw, 4rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--border); max-width: var(--wrap-wide); }
.post-card--feature .card-media { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; margin-bottom: 1.6rem; border: 1px solid var(--border); }
.post-card--feature .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.post-card--feature:hover .card-media img { transform: scale(1.03); }
.post-card--feature .card-title { font-size: var(--step-4); max-width: 18ch; margin-bottom: 0.8rem; }
.post-card--feature .card-excerpt { font-size: var(--step-1); color: var(--text-soft); max-width: 56ch; line-height: 1.55; margin-bottom: 1.1rem; }

/* Rows */
.post-card--row { display: grid; grid-template-columns: 1fr 220px; gap: 2rem clamp(1.5rem, 3vw, 2.6rem); align-items: center; padding-block: clamp(1.6rem, 3vw, 2.2rem); border-bottom: 1px solid var(--border); }
.post-card--row:first-child { border-top: 1px solid var(--border); }
.post-card--row .card-media { display: block; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--border); order: 2; }
.post-card--row .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.post-card--row:hover .card-media img { transform: scale(1.04); }
.post-card--row .card-body { order: 1; }
.card-title { font-size: var(--step-2); letter-spacing: -0.015em; margin-bottom: 0.55rem; }
.card-title a { background-image: linear-gradient(var(--text), var(--text)); background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 0.3s var(--ease); }
.post-card:hover .card-title a { background-size: 100% 1px; }
.card-excerpt { color: var(--muted); margin-bottom: 0.85rem; max-width: 60ch; line-height: 1.55; }

/* 8. SINGLE ---------------------------------------------------------------- */
.single-header { padding-top: clamp(2rem, 5vw, 4rem); text-align: center; }
.single-header .post-cats { justify-content: center; }
.single-title { font-size: var(--step-4); letter-spacing: -0.02em; margin-inline: auto; max-width: 20ch; }
.single-standfirst { margin: 1.2rem auto 0; font-size: var(--step-1); color: var(--muted); max-width: 52ch; line-height: 1.5; }
.single-meta { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-top: 1.6rem; }
.meta-avatar { border-radius: 50%; width: 38px; height: 38px; border: 1px solid var(--border); }
.meta-byline { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; text-align: left; }
.meta-author { font-weight: 600; font-size: var(--step--1); }
.single-meta .post-meta { font-size: 0.82rem; }

.single-hero { margin-block: clamp(2rem, 5vw, 3.5rem); }
.single-hero img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
body.has-hero .single-hero { margin-top: clamp(2rem, 5vw, 3.5rem); }

.single-footer { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--border); }
.single-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.single-tags a { font-size: 0.78rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 0.2rem 0.6rem; border-radius: var(--radius-pill); }
.single-tags a:hover { color: var(--text); }
.back-link { font-size: var(--step--1); font-weight: 600; color: var(--muted); }
.back-link:hover { color: var(--text); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.5rem; }
.post-nav-link { display: flex; flex-direction: column; gap: 0.3rem; padding: 1.1rem 1.3rem; border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 0.2s, background-color 0.2s, transform 0.15s var(--ease); }
.post-nav-link:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-2px); }
.post-nav-link.next { text-align: right; }
.post-nav-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.post-nav-title { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--text); line-height: 1.25; }

/* 9. PROSE ----------------------------------------------------------------- */
.entry-content { font-size: var(--step-0); line-height: 1.75; color: var(--text-soft); }
.entry-content > * + * { margin-top: 1.35em; }
.entry-content p { max-width: 68ch; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--text); max-width: 40ch; line-height: 1.2; }
.entry-content h2 { font-size: var(--step-2); margin-top: 2.6em; }
.entry-content h3 { font-size: var(--step-1); margin-top: 2em; }
.entry-content h4 { font-size: 1.12rem; margin-top: 1.8em; }
.entry-content a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; text-decoration-thickness: 1.5px; transition: text-decoration-color 0.18s, color 0.18s; }
.entry-content a:hover { text-decoration-color: var(--text); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; max-width: 64ch; }
.entry-content li + li { margin-top: 0.45em; }
.entry-content li::marker { color: var(--faint); }
.entry-content img, .entry-content figure { border-radius: var(--radius-sm); }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption { font-size: var(--step--1); color: var(--faint); text-align: center; margin-top: 0.7rem; }
.entry-content blockquote {
  margin-inline: 0; padding: 0.4rem 0 0.4rem 1.5rem; border-left: 3px solid var(--border-strong);
  font-family: var(--font-display); font-size: var(--step-1); font-style: italic; color: var(--text); max-width: 60ch;
}
.entry-content blockquote p { max-width: none; }
.entry-content hr { border: none; height: 1px; background: var(--border); margin-block: 3em; max-width: 68ch; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.entry-content th, .entry-content td { padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); text-align: left; }
.entry-content th { font-weight: 600; color: var(--text); }
.entry-content :is(h2, h3) + * { margin-top: 0.9em; }

/* 10. CODE ----------------------------------------------------------------- */
.entry-content :not(pre) > code {
  font-family: var(--font-mono); font-size: 0.86em; background: var(--surface-2);
  border: 1px solid var(--border); padding: 0.12em 0.4em; border-radius: 6px; color: var(--code-text);
  word-break: break-word;
}
.entry-content pre, .wp-block-code {
  position: relative; font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.7;
  background: var(--code-bg); color: var(--code-text); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.15rem 1.25rem; overflow-x: auto; max-width: 100%;
  -webkit-overflow-scrolling: touch; tab-size: 2;
}
.entry-content pre code { font-family: inherit; background: none; border: none; padding: 0; font-size: inherit; color: inherit; }
.code-copy {
  position: absolute; top: 0.6rem; right: 0.6rem; font-family: var(--font-sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.02em; color: var(--muted); background: var(--surface); border: 1px solid var(--border);
  padding: 0.25rem 0.55rem; border-radius: 7px; opacity: 0; transition: opacity 0.18s, color 0.18s; cursor: pointer;
}
.entry-content pre:hover .code-copy { opacity: 1; }
.code-copy:hover { color: var(--text); }

/* 11. FORMS ---------------------------------------------------------------- */
.search-form { position: relative; display: flex; align-items: center; gap: 0.5rem; }
.search-form .search-icon { position: absolute; left: 0.95rem; color: var(--faint); pointer-events: none; }
.search-field {
  flex: 1; padding: 0.8rem 1rem 0.8rem 2.7rem; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.search-field:focus { border-color: var(--text); box-shadow: var(--ring); }
.search-field::placeholder { color: var(--faint); }
.search-submit { padding: 0.8rem 1.3rem; border-radius: var(--radius-pill); background: var(--text); color: var(--bg); font-weight: 600; font-size: var(--step--1); transition: opacity 0.18s; }
.search-submit:hover { opacity: 0.85; }

/* 12. FOOTER --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); margin-top: clamp(3rem, 8vw, 6rem); padding-block: clamp(2.5rem, 5vw, 4rem); }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem 2.5rem; align-items: start; }
.footer-brand .brand-name { font-size: 1.25rem; }
.footer-tagline { color: var(--muted); margin-top: 0.5rem; max-width: 40ch; font-size: var(--step--1); }
.footer-col-title { font-family: var(--font-display); font-weight: 600; font-size: var(--step-0); color: var(--text); margin-bottom: 0.9rem; }
.footer-list { display: flex; flex-wrap: wrap; gap: 1.2rem; list-style: none; padding: 0; margin: 0; }
.footer-list--stack { flex-direction: column; gap: 0.55rem; }
.footer-list a { font-size: var(--step--1); color: var(--muted); }
.footer-list a:hover { color: var(--text); }
.footer-legal { grid-column: 1 / -1; color: var(--faint); font-size: var(--step--1); padding-top: 1.5rem; border-top: 1px solid var(--border); margin-top: 0.5rem; }

/* Optional footer widget area (renders only when populated). */
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; padding-bottom: clamp(2rem, 4vw, 3rem); margin-bottom: clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--border); }
.footer-widget { font-size: var(--step--1); color: var(--muted); }
.footer-widget-title { font-family: var(--font-display); font-size: var(--step-0); color: var(--text); margin-bottom: 0.75rem; }
.footer-widget a { color: var(--muted); }
.footer-widget a:hover { color: var(--text); }
.footer-widget ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }

/* 13. BITS ----------------------------------------------------------------- */
.reading-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 110; pointer-events: none; }
.reading-progress span { display: block; height: 100%; width: 100%; background: var(--text); transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.1s linear; }

.pagination { margin-top: 1rem; }
.pagination .page-numbers { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; justify-content: center; }
.pagination a, .pagination span.current, .pagination span.dots { display: grid; place-items: center; min-width: 42px; height: 42px; padding-inline: 0.6rem; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: var(--step--1); font-weight: 500; color: var(--muted); transition: all 0.16s; }
.pagination a:hover { border-color: var(--border-strong); color: var(--text); }
.pagination .current { background: var(--text); color: var(--bg); border-color: var(--text); }
.pagination .dots { border: none; }

.empty-state { text-align: center; padding-block: clamp(3rem, 10vw, 7rem); }
.empty-state h1, .empty-state h2 { font-size: var(--step-3); margin-bottom: 0.6rem; }
.empty-state p { color: var(--muted); max-width: 44ch; margin-inline: auto; }
.empty-state--404 .error-code { font-family: var(--font-display); font-size: clamp(4rem, 14vw, 8rem); font-weight: 600; color: var(--faint); line-height: 1; }
.error-search { max-width: 420px; margin: 1.8rem auto; }

.to-top { position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 90; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-md); transition: transform 0.2s var(--ease), opacity 0.2s; }
.to-top:hover { transform: translateY(-3px); }

.alignwide { width: min(var(--wrap-wide), 100%); margin-inline: auto; }
.alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); max-width: 100vw; }

/* 13b. COMMENTS ------------------------------------------------------------ */
.comments { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border); }
.comments-title { font-size: var(--step-2); margin-bottom: 1.6rem; }
.req { color: var(--muted); font-weight: 400; }

.comment-list { list-style: none; padding: 0; margin: 0 0 3rem; display: flex; flex-direction: column; gap: 1.7rem; }
.comment-list .children { list-style: none; margin: 1.7rem 0 0; padding-left: 1.5rem; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 1.7rem; }
.comment-item { scroll-margin-top: 90px; }
.comment-body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.comment-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.8rem; }
.comment-avatar { border-radius: 50%; border: 1px solid var(--border); width: 40px; height: 40px; }
.comment-meta { display: flex; flex-direction: column; gap: 0.05rem; }
.comment-author { font-weight: 600; font-size: var(--step--1); }
.comment-date { font-size: 0.78rem; color: var(--faint); }
.comment-date:hover { color: var(--muted); }
.comment-content { color: var(--text-soft); font-size: 0.98rem; line-height: 1.7; }
.comment-content p { max-width: none; }
.comment-content > * + * { margin-top: 0.8em; }
.comment-pending { margin-top: 0.6rem; font-size: 0.85rem; color: var(--faint); font-style: italic; }
.comment-actions { margin-top: 0.7rem; }
.comment-reply-link { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }
.comment-reply-link:hover { color: var(--text); }
.comments-closed { color: var(--faint); font-size: var(--step--1); }

/* Comment form */
.comment-respond { margin-top: 1rem; }
.comment-notes { color: var(--muted); font-size: var(--step--1); margin-bottom: 1.3rem; }
.comment-form { display: flex; flex-direction: column; gap: 1.1rem; max-width: 100%; }
.cf-field { display: flex; flex-direction: column; gap: 0.4rem; margin: 0; }
.cf-field label { font-size: var(--step--1); font-weight: 500; color: var(--muted); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; padding: 0.78rem 0.95rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  outline: none; font-family: var(--font-sans); font-size: 0.96rem;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.comment-form textarea { resize: vertical; min-height: 150px; line-height: 1.65; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--text); box-shadow: var(--ring); }
.comment-form input::placeholder, .comment-form textarea::placeholder { color: var(--faint); }
.cf-author, .cf-email, .cf-url { display: inline-flex; }
@media (min-width: 600px) {
  .comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.2rem; }
  .cf-comment, .comment-notes, .comment-form-cookies-consent, .form-submit, .logged-in-as { grid-column: 1 / -1; }
}
.comment-form-cookies-consent { display: flex; align-items: center; gap: 0.55rem; }
.comment-form-cookies-consent label { color: var(--muted); font-size: var(--step--1); margin: 0; }
.comment-form-cookies-consent input { width: 16px; height: 16px; accent-color: var(--accent); }
.logged-in-as { color: var(--muted); font-size: var(--step--1); }
.form-submit { margin: 0; }
.comment-submit {
  background: var(--text); color: var(--bg); padding: 0.8rem 1.6rem; border-radius: var(--radius-pill);
  font-weight: 600; font-size: var(--step--1); transition: opacity 0.18s, transform 0.15s var(--ease);
}
.comment-submit:hover { opacity: 0.88; transform: translateY(-1px); }
.comment-reply-title small { margin-left: 0.6rem; font-weight: 400; }

/* 13c. ASK ME ANYTHING ----------------------------------------------------- */
.ama { max-width: var(--wrap-narrow); margin-top: 2rem; }
.ama-form { display: flex; flex-direction: column; gap: 1.1rem; }
.ama-label { font-size: var(--step--1); font-weight: 500; color: var(--muted); }
.ama-textarea {
  width: 100%; padding: 0.9rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  outline: none; font-family: var(--font-sans); font-size: 1rem; line-height: 1.65; resize: vertical; min-height: 160px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.ama-textarea:focus { border-color: var(--text); box-shadow: var(--ring); }
.ama-textarea::placeholder { color: var(--faint); }
.ama-captcha { display: flex; flex-direction: column; gap: 0.4rem; padding: 1rem 1.1rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ama-captcha .ama-label { color: var(--text-soft); }
.ama-answer { width: 110px; padding: 0.6rem 0.8rem; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); outline: none; }
.ama-answer:focus { border-color: var(--text); box-shadow: var(--ring); }
.ama-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ama-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem; }
.ama-submit {
  background: var(--accent); color: #fff; padding: 0.8rem 1.5rem; border-radius: var(--radius-pill);
  font-weight: 600; font-size: var(--step--1); transition: background-color 0.18s, transform 0.15s var(--ease);
}
.ama-submit:hover { background: var(--accent-hover); transform: translateY(-1px); }
.ama-note { font-size: var(--step--1); color: var(--faint); }
.ama-msg { padding: 0.9rem 1.1rem; border-radius: var(--radius-sm); font-size: 0.96rem; margin-bottom: 1.2rem; }
.ama-msg--ok { background: color-mix(in oklab, var(--accent) 12%, transparent); border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent); color: var(--text); }
.ama-msg--err { background: color-mix(in oklab, #d9534f 12%, transparent); border: 1px solid color-mix(in oklab, #d9534f 40%, transparent); color: var(--text); }

/* 14. RESPONSIVE ----------------------------------------------------------- */
@media (max-width: 860px) {
  .post-card--row { grid-template-columns: 1fr; }
  .post-card--row .card-media { order: 0; margin-bottom: 1.1rem; aspect-ratio: 16 / 9; max-height: 240px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-link.next { text-align: left; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .menu-toggle { display: grid; }
  .primary-nav {
    position: fixed; inset: 68px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--border);
    transform: translateY(-120%); transition: transform 0.3s var(--ease); padding: 1rem var(--gutter) 1.5rem; z-index: 99;
  }
  html.nav-open .primary-nav { transform: translateY(0); }
  .nav-list { flex-direction: column; gap: 0.2rem; }
  .nav-list a { display: block; padding: 0.7rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
  .header-actions .btn-cta { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .single-header { text-align: left; }
  .single-header .post-cats, .single-meta { justify-content: flex-start; }
  .single-title, .single-standfirst { margin-inline: 0; }
}
