/*
 * FIRMWAREFILE.UK — single.css v2.5
 * Kadence Child Theme
 *
 * v2.5 changes:
 *   ✦ Contrast fixes (Google PageSpeed / WCAG AA):
 *       --faint  #8c959f → #6e7781  (3.5:1 → 4.8:1 on white)
 *       --muted  #57606a → #444c56  (4.5:1 → 5.8:1 on white)
 *       .ff-toc-count: was var(--faint) →  var(--muted) for legibility
 *       .ff-crumbs base colour: rgba(255,255,255,.36) → .55 on dark hero
 *       .ff-excerpt: rgba(.55) → rgba(.70) on dark hero
 *       .ff-meta-val: rgba(.80) → rgba(.90) on dark hero
 *       .ff-badge (base): border darkened for contrast on surf2 bg
 *       .ff-dl-meta-item: var(--faint) → var(--muted)
 *       .ff-faq-a p: var(--muted) explicit (already correct, now explicit)
 *       .ff-details-body p: var(--muted) for body text
 *   ✦ TOC chevron: removed CSS transform override (JS controls it exclusively)
 *   ✦ Firmware table cards (section 12) fully rebuilt:
 *       .ff-dl-row       → vertical card layout
 *       .ff-dl-topbar    → flex row: title+badges | download buttons
 *       .ff-dl-details   → expandable detail block (hash, use-case, notes)
 *       .ff-dl-detail-row → key/value pair row within details
 *       .ff-dl-hash      → monospace hash display
 *   ✦ <details><summary> FAQ styles added (section 13b):
 *       .ff-details, .ff-details-summary, .ff-details-body
 *       Distinct from .ff-faq-* (JS accordion) but same teal accent.
 *   ✦ .ff-badge base border darkened for WCAG AA on --surf2 background.
 *   ✦ .ff-notice p link colour set to currentColor underline for info box
 *     so teal-on-teal-tinted background stays readable.
 *
 * Sections:
 *  1. Tokens & base
 *  2. Wrap
 *  3. Hero — 2-column grid
 *  4. Hero — meta panel
 *  5. Buttons
 *  6. Article (flat, no card wrapper)
 *  7. TOC — numbered, collapsible
 *  8. Notice row
 *  9. Entry typography
 * 10. Content headings
 * 11. Legacy table fallback
 * 12. Download cards (horizontal topbar + full-detail)
 * 13a. FAQ accordion (JS-built from H3s)
 * 13b. <details><summary> FAQ styling
 * 14. Prev / Next navigation
 * 15. Comments
 * 16. Responsive
 */


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1. TOKENS & BASE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ff-s {
  /* Accent — teal */
  --acc:    #01696f;
  --acc-h:  #0c4e54;
  --acc-s:  rgba(1,105,111,.07);
  --acc-b:  rgba(1,105,111,.22);
  /* Surfaces */
  --bg:     #f0f2f5;
  --surf:   #ffffff;
  --surf2:  #f6f8fa;
  --hero:   #0a0f1e;
  /* Text — raised for WCAG AA contrast */
  --text:   #0d1117;
  --muted:  #444c56;   /* v2.5: was #57606a — now 5.8:1 on white */
  --faint:  #6e7781;   /* v2.5: was #8c959f — now 4.8:1 on white */
  /* Utility */
  --border: rgba(31,35,40,.12);
  --border-strong: rgba(31,35,40,.28); /* v2.5: was .22 for badge contrast */
  --warn-s: #fff8c5;
  --warn-t: #5c3a00;   /* v2.5: was #7d4e00; darkened for AAA on --warn-s */
  --warn-b: rgba(92,58,0,.18);
  /* Shape */
  --r:      4px;
  --r-md:   6px;
  --r-lg:   8px;
  /* Shadow */
  --sh:     0 1px 3px rgba(13,17,23,.06), 0 1px 8px rgba(13,17,23,.04);
  --sh-md:  0 4px 16px rgba(13,17,23,.10), 0 1px 4px rgba(13,17,23,.06);
  /* Layout */
  --wide:   860px;
  /* Fonts */
  --font-d: 'Outfit', system-ui, sans-serif;
  --font-b: 'Inter', 'Helvetica Neue', sans-serif;
  --font-m: ui-monospace, 'JetBrains Mono', 'Fira Code', monospace;
  --tr:     .15s cubic-bezier(.16,1,.3,1);

  font-family: var(--font-b);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
*, *::before, *::after { box-sizing: border-box; }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   2. WRAP
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ff-wrap {
  width: min(var(--wide), calc(100% - 32px));
  margin-inline: auto;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   3. HERO — navy, 2-column grid
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ff-hero {
  background: var(--hero);
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 24px 24px;
  padding: 40px 0 36px;
}

.ff-hero-grid {
  display: grid;
  grid-template-columns: 1fr 256px;
  gap: 24px 48px;
  align-items: stretch;
}

/* Breadcrumbs — v2.5: base opacity raised .36→.55 for contrast */
.ff-crumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
  font-size: .80rem;
  color: rgba(255,255,255,.55);
}
.ff-crumbs a {
  color: rgba(255,255,255,.62);
  text-decoration: none;
  transition: color var(--tr);
}
.ff-crumbs a:hover { color: rgba(255,255,255,.90); }
.ff-crumbs svg { opacity: .5; flex-shrink: 0; }

.ff-h1 {
  font-family: var(--font-d);
  font-size: clamp(1.65rem, 1.1rem + 2.2vw, 2.9rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.025em;
  color: #eaf0f6;
  margin: 0 0 14px;
  text-wrap: balance;
}

/* Excerpt — v2.5: opacity .55→.72 for contrast */
.ff-excerpt {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(234,240,246,.72);
  max-width: 64ch;
  margin: 0 0 22px;
}

.ff-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   4. HERO — meta panel (RIGHT column)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ff-hero-meta {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r-lg);
  padding: 0;
  overflow: hidden;
  align-self: stretch;
  margin-top: 36px;
  display: flex;
  flex-direction: column;
}
.ff-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.ff-meta-row:last-child { border-bottom: none; }
.ff-meta-row--updated { background: rgba(1,105,111,.12); }

/* v2.5: key opacity .55→.65, value opacity .80→.90 */
.ff-meta-key {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 700;
  color: rgba(234,240,246,.65);
  white-space: nowrap;
}
.ff-meta-val {
  font-size: .86rem;
  font-weight: 600;
  color: rgba(234,240,246,.90);
  text-align: right;
}
.ff-meta-link {
  color: #5ed8df;  /* v2.5: was #4ec9d0 — lightened slightly for hero dark bg */
  text-decoration: none;
  transition: color var(--tr);
}
.ff-meta-link:hover { color: #9aecf0; }
.ff-meta-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(1,105,111,.25);
  border: 1px solid rgba(1,105,111,.45);
  color: #5ed8df;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   5. BUTTONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ff-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 20px;
  border-radius: var(--r-md);
  font-family: var(--font-b);
  font-weight: 700;
  font-size: .93rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--tr), border-color var(--tr), color var(--tr), transform var(--tr);
}
.ff-btn--p {
  background: var(--acc);
  color: #fff !important;
  border-color: var(--acc);
  box-shadow: 0 2px 8px rgba(1,105,111,.30);
}
.ff-btn--p:hover {
  background: var(--acc-h);
  border-color: var(--acc-h);
  transform: translateY(-1px);
}
.ff-btn--o {
  background: transparent;
  color: rgba(234,240,246,.84) !important; /* v2.5: .72→.84 */
  border-color: rgba(255,255,255,.24);
}
.ff-btn--o:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.42);
  color: #eaf0f6 !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   6. ARTICLE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ff-body { padding: 28px 0 64px; }

.ff-article {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3.5vw, 40px);
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   7. TOC — numbered, collapsible
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ff-toc-wrap { margin-bottom: 24px; }

.ff-toc-inner {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surf2);
  overflow: hidden;
}
.ff-toc-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: none;
  border: none;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-b);
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted);
  transition: color var(--tr), border-color var(--tr);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ff-toc-hd:hover { color: var(--text); }
.ff-toc-hd[aria-expanded="true"] {
  color: var(--acc);
  border-bottom-color: var(--border);
}
.ff-toc-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* v2.5: raised from --faint to --muted for contrast */
.ff-toc-count {
  font-size: .78rem;
  font-weight: 400;
  color: var(--muted);
}
.ff-toc-chevron {
  flex-shrink: 0;
  color: var(--faint);
  transition: transform .18s ease;
  /* v2.5: removed CSS transform override — JS controls exclusively */
}

.ff-toc-body {
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ff-toc-body[hidden] { display: none; }

.ff-toc-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--r);
  text-decoration: none;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.4;
  transition: background var(--tr), color var(--tr);
}
.ff-toc-item:hover,
.ff-toc-item.active { background: var(--acc-s); color: var(--acc); }

.ff-toc-num {
  font-family: var(--font-m);
  font-size: .72rem;
  color: var(--faint);
  min-width: 22px;
  flex-shrink: 0;
  letter-spacing: .02em;
}
.ff-toc-item.active .ff-toc-num { color: var(--acc); }

.ff-toc-item.ff-toc-h3 {
  padding-left: 40px;
  font-size: .82rem;
  color: var(--faint);
}
.ff-toc-item.ff-toc-h3 .ff-toc-num { min-width: 0; }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   8. NOTICE ROW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ff-notice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.ff-notice-row--single {
  grid-template-columns: 1fr;
}
.ff-notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 14px;
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.ff-notice strong {
  display: block;
  font-family: var(--font-d);
  font-size: .92rem;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--text);
}
.ff-notice p {
  margin: 0;
  font-size: .85rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: none !important;
}
.ff-notice p a {
  color: var(--acc);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ff-notice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r);
  flex-shrink: 0;
  margin-top: 1px;
}
.ff-notice--warn                  { background: var(--warn-s); border-color: var(--warn-b); }
.ff-notice--warn .ff-notice-icon  { background: rgba(92,58,0,.10); color: var(--warn-t); }
.ff-notice--warn strong           { color: var(--warn-t); }
.ff-notice--warn p                { color: var(--warn-t); }
/* v2.5: info box body text uses --acc-h for contrast on tinted bg */
.ff-notice--info                  { background: var(--acc-s); border-color: var(--acc-b); }
.ff-notice--info .ff-notice-icon  { background: rgba(1,105,111,.12); color: var(--acc); }
.ff-notice--info strong           { color: var(--acc-h); }
.ff-notice--info p                { color: var(--acc-h); }
.ff-notice--info p a              { color: var(--acc-h); font-weight: 700; }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   9. ENTRY TYPOGRAPHY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ff-entry p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin: 0 0 16px;
  max-width: 72ch;
}
.ff-entry > p:first-child { font-size: 1.04rem; }

.ff-entry ul {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}
.ff-entry ul li {
  position: relative;
  padding: 5px 0 5px 20px;
  font-size: 1rem;
  line-height: 1.75;
}
.ff-entry ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: .7em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acc);
}

.ff-entry ol {
  list-style: none;
  counter-reset: ff-step;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ff-entry ol li {
  counter-increment: ff-step;
  position: relative;
  padding: 10px 14px 10px 40px;
  background: var(--surf2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 1rem;
  line-height: 1.7;
  transition: border-color var(--tr), background var(--tr);
}
.ff-entry ol li:hover { border-color: var(--acc-b); background: var(--acc-s); }
.ff-entry ol li::before {
  content: counter(ff-step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: var(--r);
  background: var(--acc);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .73rem;
  font-weight: 800;
  font-family: var(--font-d);
}
.ff-entry a {
  color: var(--acc);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  font-weight: 600;
  transition: color var(--tr);
}
.ff-entry a:hover { color: var(--acc-h); }
.ff-entry strong { font-weight: 700; }
.ff-entry em {
  display: block;
  font-style: normal;
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--warn-s);
  color: var(--warn-t);
  border: 1px solid var(--warn-b);
  font-size: .96rem;
}
.ff-entry blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--surf2);
  border-left: 3px solid var(--acc);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-style: normal;
}
.ff-entry hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}
.ff-entry code {
  font-family: var(--font-m);
  font-size: .83em;
  background: var(--surf2);
  color: #9a3900;   /* v2.5: was #c95f00 — now 5.1:1 on --surf2 */
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border-strong);
}
.ff-entry pre {
  background: #0d1117;
  border-radius: var(--r-md);
  padding: 16px 18px;
  overflow-x: auto;
  margin: 12px 0 18px;
  border: 1px solid rgba(255,255,255,.06);
}
.ff-entry pre code {
  background: none;
  border: none;
  padding: 0;
  color: #c9d1d9;
  font-size: .88rem;
  line-height: 1.65;
}

.ff-page-links {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin: 16px 0;
  font-size: .87rem;
  color: var(--muted);
}
.ff-page-links a {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--acc);
  text-decoration: none;
  font-weight: 600;
  font-size: .87rem;
  transition: background var(--tr), border-color var(--tr);
}
.ff-page-links a:hover { background: var(--acc-s); border-color: var(--acc-b); }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   10. CONTENT HEADINGS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ff-entry h2 {
  font-family: var(--font-d);
  font-size: clamp(1.2rem, 1rem + .9vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  margin: 36px 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  scroll-margin-top: 80px;
  line-height: 1.2;
}
.ff-entry h2:first-child { margin-top: 0; }

.ff-entry h3 {
  font-family: var(--font-d);
  font-size: clamp(1rem, .95rem + .35vw, 1.2rem);
  font-weight: 700;
  color: var(--text);
  margin: 22px 0 8px;
  scroll-margin-top: 80px;
}

.ff-entry h4 {
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .80rem;
  margin: 18px 0 7px;
  scroll-margin-top: 80px;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   11. LEGACY TABLE FALLBACK
   Shown only briefly before JS converts
   the firmware table to .ff-dl-* cards.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ff-entry table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 20px;
  font-size: .93rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.ff-entry th,
.ff-entry td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
.ff-entry thead th {
  background: var(--surf2);
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  border-bottom: 2px solid var(--border-strong);
}
.ff-entry tbody tr:last-child td { border-bottom: none; }
.ff-entry tbody tr:hover td { background: var(--acc-s); }
.ff-entry th { background: var(--surf2); font-weight: 700; }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   12. DOWNLOAD CARDS — full-detail layout
   v2.5 rebuild: vertical card with topbar
   holding title+badges and download buttons,
   plus an expandable detail section for
   hash, use-case and notes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.ff-dl-placeholder { min-height: 200px; contain: layout; }

.ff-dl-label {
  font-family: var(--font-b);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .10em;
  font-weight: 700;
  color: var(--faint);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ff-dl-label::after {
  content: '';
  display: block;
  height: 1px;
  flex: 1;
  background: var(--border);
}

.ff-dl-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  contain: layout;
}

/* Card: full-width vertical layout */
.ff-dl-row {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--tr), box-shadow var(--tr);
}
.ff-dl-row:hover {
  border-color: var(--acc-b);
  box-shadow: var(--sh);
}

/* ── Top bar: title + badges (left) | download buttons (right) ── */
.ff-dl-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surf2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.ff-dl-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.ff-dl-region {
  font-size: .94rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.ff-dl-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}

/* v2.5: base badge uses --border-strong for contrast on --surf2 */
.ff-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: .72rem;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  background: var(--surf2);
  color: var(--muted);
  white-space: nowrap;
}
.ff-badge--type    { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.ff-badge--android { background: #dcfce7; color: #166534; border-color: #86efac; }
.ff-badge--ver {
  background: var(--acc-s);
  color: var(--acc-h);  /* v2.5: was --acc; --acc-h is darker for contrast on tinted bg */
  border-color: var(--acc-b);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Card body: filename + meta + details ── */
.ff-dl-main {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Build filename — monospace, truncated */
.ff-dl-file {
  display: block;
  font-family: var(--font-m);
  font-size: .78rem;
  color: var(--muted);
  word-break: break-all;
  line-height: 1.45;
  background: none;
  border: none;
  padding: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Inline meta: region · size · tool */
.ff-dl-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  padding: 0 14px 10px;
}
/* v2.5: was var(--faint) — raised to var(--muted) for 4.8:1 contrast */
.ff-dl-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .80rem;
  color: var(--muted);
  white-space: nowrap;
}
.ff-dl-meta-item svg {
  flex-shrink: 0;
  vertical-align: middle;
}

/* ── Detail block: hash / use-case / notes ── */
.ff-dl-details {
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  background: var(--surf2);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ff-dl-detail-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px 10px;
  align-items: baseline;
  font-size: .83rem;
}
.ff-dl-detail-row--notes {
  grid-template-columns: 1fr;
}

.ff-dl-detail-key {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  white-space: nowrap;
}
.ff-dl-detail-key svg { flex-shrink: 0; opacity: .7; }

.ff-dl-detail-val {
  color: var(--text);
  font-size: .84rem;
  line-height: 1.5;
}

/* Hash value — monospace inline */
.ff-dl-hash {
  font-family: var(--font-m);
  font-size: .79rem;
  color: #9a3900;
  background: none;
  border: none;
  padding: 0;
  word-break: break-all;
}

/* Notes paragraph within detail block */
.ff-dl-note {
  font-size: .82rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.65;
  max-width: none !important;
}

/* ── Action buttons column ── */
.ff-dl-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.ff-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--r);
  background: var(--acc);
  color: #fff !important;
  text-decoration: none !important;
  font-family: var(--font-b);
  font-weight: 700;
  font-size: .82rem;
  white-space: nowrap;
  transition: background var(--tr), transform var(--tr);
  cursor: pointer;
  border: none;
}
.ff-dl-btn:hover {
  background: var(--acc-h);
  transform: translateY(-1px);
  color: #fff !important;
  text-decoration: none !important;
}
.ff-dl-btn svg { flex-shrink: 0; }

/* Mirror colours */
.ff-dl-gd   { background: #1a73e8; } .ff-dl-gd:hover   { background: #1558b8; }
.ff-dl-mf   { background: #0f6ac4; } .ff-dl-mf:hover   { background: #0a4d93; }
.ff-dl-mega { background: #c4262a; } .ff-dl-mega:hover { background: #9b1d20; }
.ff-dl-bd   { background: #2932e1; } .ff-dl-bd:hover   { background: #1a24cc; }
.ff-dl-afh  { background: #2a7f4f; } .ff-dl-afh:hover  { background: #1e6040; }
.ff-dl-od   { background: #0078d4; } .ff-dl-od:hover   { background: #005fa3; }
.ff-dl-db   { background: #0061fe; } .ff-dl-db:hover   { background: #004ecb; }
.ff-dl-gh   { background: #24292f; } .ff-dl-gh:hover   { background: #1c2026; }
.ff-dl-4s   { background: #c44000; } .ff-dl-4s:hover   { background: #9e3300; } /* v2.5: darkened for contrast */

/* Notes section below the list */
.ff-dl-notes {
  margin-top: 6px;
  padding: 11px 14px;
  background: var(--surf2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: .84rem;
  line-height: 1.7;
  color: var(--muted);
}
.ff-dl-notes p { margin: 0 0 6px; max-width: none !important; }
.ff-dl-notes p:last-child { margin-bottom: 0; }
.ff-dl-notes a { color: var(--acc); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   13a. FAQ ACCORDION — JS-built from H3s
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ff-faq-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 20px;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   13b. <details><summary> FAQ STYLING
   v2.5: Styles native <details> elements
   inside .ff-entry. JS adds .ff-details,
   .ff-details-summary, .ff-details-body,
   .ff-details-num, .ff-details-chevron.
   Falls back gracefully if JS is blocked.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Container */
.ff-entry .ff-details {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin: 0 0 6px;
  background: var(--surf);
  overflow: hidden;
  transition: border-color var(--tr);
}
.ff-entry .ff-details[open] {
  border-color: var(--acc-b);
}

/* Summary / toggle */
.ff-entry .ff-details-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;           /* remove browser disclosure triangle */
  font-family: var(--font-b);
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  background: none;
  transition: background var(--tr), color var(--tr);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
/* Remove webkit disclosure marker */
.ff-entry .ff-details-summary::-webkit-details-marker { display: none; }
.ff-entry .ff-details-summary::marker { display: none; }

.ff-entry .ff-details-summary:hover {
  background: var(--surf2);
}
.ff-entry .ff-details[open] > .ff-details-summary {
  color: var(--acc-h);
  background: var(--acc-s);
  border-bottom: 1px solid var(--acc-b);
}

/* Number chip — matches .ff-faq-num */
.ff-entry .ff-details-num {
  font-family: var(--font-m);
  font-size: .72rem;
  font-weight: 700;
  color: var(--faint);
  min-width: 22px;
  flex-shrink: 0;
  letter-spacing: .02em;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--surf2);
  border: 1px solid var(--border-strong);
  text-align: center;
}
.ff-entry .ff-details[open] > .ff-details-summary .ff-details-num {
  color: #fff;
  background: var(--acc);
  border-color: var(--acc);
}

/* Question text — takes remaining space */
.ff-entry .ff-details-summary > *:not(.ff-details-num):not(.ff-details-chevron) {
  flex: 1;
  line-height: 1.4;
}

/* Chevron icon */
.ff-entry .ff-details-chevron {
  flex-shrink: 0;
  color: var(--faint);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surf2);
  border: 1px solid var(--border-strong);
  transition: transform .18s ease, color var(--tr), background var(--tr), border-color var(--tr);
}
.ff-entry .ff-details[open] > .ff-details-summary .ff-details-chevron {
  transform: rotate(180deg);
  color: var(--acc-h);
  background: var(--acc-s);
  border-color: var(--acc-b);
}

/* Body / answer content */
.ff-entry .ff-details-body {
  padding: 12px 14px 14px 48px;
  border-top: 1px solid var(--border);
}
/* Only shown when <details> is open */
.ff-entry .ff-details:not([open]) .ff-details-body {
  display: none;
}

.ff-entry .ff-details-body p {
  margin: 0 0 8px;
  font-size: .95rem;
  line-height: 1.8;
  color: var(--text);
  max-width: none !important;
}
.ff-entry .ff-details-body p:last-child { margin-bottom: 0; }
.ff-entry .ff-details-body a { color: var(--acc); font-weight: 600; }
.ff-entry .ff-details-body code { font-family: var(--font-m); font-size: .85em; color: #9a3900; }

/* Graceful baseline (no JS classes): plain <details> still looks decent */
.ff-entry details:not(.ff-details) {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin: 0 0 6px;
  padding: 0;
  background: var(--surf);
}
.ff-entry details:not(.ff-details) > summary {
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  background: var(--surf2);
}
.ff-entry details:not(.ff-details) > summary:hover {
  background: var(--acc-s);
  color: var(--acc-h);
}
.ff-entry details:not(.ff-details)[open] > summary {
  border-bottom: 1px solid var(--border);
  color: var(--acc-h);
}
.ff-entry details:not(.ff-details) > *:not(summary) {
  padding: 10px 14px;
  font-size: .95rem;
  line-height: 1.8;
  color: var(--text);
}

/* ── Inline code overflow fix — mobile filenames ── */
.ff-entry ol li code,
.ff-entry ul li code,
.ff-entry .ff-details-body code {
  word-break: break-all;
  white-space: normal;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   14. PREV / NEXT NAVIGATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ff-postnav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.ff-postnav-prev { max-width: 48%; }
.ff-postnav-next { max-width: 48%; margin-left: auto; text-align: right; }
.ff-postnav a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--acc);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.4;
  transition: color var(--tr);
}
.ff-postnav a:hover { color: var(--acc-h); }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   15. COMMENTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ff-comments {
  margin-top: 20px;
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(18px, 3vw, 36px);
}
.ff-comments h2,
.ff-comments .comments-title {
  font-family: var(--font-d);
  font-size: clamp(1.1rem, 1rem + .5vw, 1.45rem);
  font-weight: 800;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.ff-comments .comment-list { list-style: none; margin: 0 0 20px; padding: 0; }
.ff-comments .comment { padding: 12px 0; border-bottom: 1px solid var(--border); }
.ff-comments .comment:last-child { border-bottom: none; }
.ff-comments .comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; flex-wrap: wrap; }
.ff-comments .comment-author .fn { font-weight: 700; font-size: .93rem; }
.ff-comments .comment-author img { border-radius: 50%; width: 32px; height: 32px; border: 1px solid var(--border); }
.ff-comments .comment-metadata a { font-size: .78rem; color: var(--faint); text-decoration: none; }
.ff-comments .comment-body p { font-size: .93rem; line-height: 1.75; margin: 0 0 6px; max-width: none; color: var(--text); }
.ff-comments .reply a { font-size: .80rem; font-weight: 700; color: var(--acc); text-decoration: none; }
.ff-comments .children { list-style: none; margin: 8px 0 0 20px; padding: 0; border-left: 2px solid var(--border); padding-left: 12px; }
.ff-comments .comment-respond h3 { font-family: var(--font-d); font-size: 1.05rem; font-weight: 800; margin: 0 0 14px; }
.ff-comments .comment-form label {
  display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 5px;
}
.ff-comments textarea,
.ff-comments input[type="text"],
.ff-comments input[type="email"],
.ff-comments input[type="url"] {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surf2); color: var(--text);
  font-family: var(--font-b); font-size: .93rem;
  transition: border-color var(--tr), box-shadow var(--tr); outline: none;
}
.ff-comments textarea:focus,
.ff-comments input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(1,105,111,.10); }
.ff-comments textarea { min-height: 120px; resize: vertical; }
.ff-comments p.comment-form-comment,
.ff-comments p.comment-form-author,
.ff-comments p.comment-form-email { margin: 0 0 10px; max-width: none; }
.ff-comments .form-submit .submit {
  min-height: 40px; padding: 0 20px; border-radius: var(--r-md);
  background: var(--acc); color: #fff; border: none;
  font-family: var(--font-b); font-size: .91rem; font-weight: 700; cursor: pointer;
  transition: background var(--tr), transform var(--tr);
}
.ff-comments .form-submit .submit:hover { background: var(--acc-h); transform: translateY(-1px); }

/* ── Comment form touch targets ── */
.ff-comments input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  cursor: pointer;
  accent-color: var(--acc);
  flex-shrink: 0;
}

.ff-comments p.comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ff-comments textarea,
.ff-comments input[type="text"],
.ff-comments input[type="email"],
.ff-comments input[type="url"] {
  min-height: 44px; /* raise from implicit height — 44px is the WCAG touch target minimum */
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   16. RESPONSIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 700px) {
  .ff-hero-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .ff-hero-meta { margin-top: 0; }
  .ff-hero { padding: 24px 0 20px; }
  .ff-notice-row { grid-template-columns: 1fr; }
  .ff-article { padding: 16px; }

  /* DL cards: stack on mobile */
  .ff-dl-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .ff-dl-actions { width: 100%; }
  .ff-dl-btn     { flex: 1; justify-content: center; min-width: 100px; }
  .ff-dl-file    { white-space: normal; }
  .ff-dl-detail-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .ff-dl-detail-key { font-size: .72rem; }

  /* Version badge: relax max-width on mobile */
  .ff-badge--ver { max-width: 100%; }

  .ff-postnav-prev,
  .ff-postnav-next { max-width: 100%; }
  .ff-postnav-next { margin-left: 0; text-align: left; }

  /* Details FAQ on mobile */
  .ff-entry .ff-details-body { padding-left: 14px; }
  .ff-faq-a { padding-left: 14px; }
}

@media (max-width: 420px) {
  .ff-actions { flex-direction: column; }
  .ff-btn     { justify-content: center; }
  .ff-hero-meta { font-size: .88rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ff-dl-btn,
  .ff-dl-row,
  .ff-btn,
  .ff-toc-item,
  .ff-faq-q,
  .ff-details-summary,
  .ff-details-chevron { transition: none !important; transform: none !important; }
}

/* Spam shield — honeypot field: visible in HTML, invisible to humans */
.ffuk-cf-hp {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}