/* Widget areas */
:where(.site-main:has(> .jf-widget-layout)) { --max-width: var(--max-width-wide, 1140px); max-width: var(--max-width-wide, 1140px); }
:where(.jf-widget-layout) { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--jf-widget-gap, 2rem); width: 100%; }
:where(.jf-widget-layout__main, .jf-widget-area) { min-width: 0; }
:where(.jf-widget-area) { display: flex; flex-direction: column; gap: var(--jf-widget-spacing, 1.5rem); align-self: start; }
:where(.jf-widget-layout--left, .jf-widget-layout--top) > :where(.jf-widget-area) { grid-row: 1; }
@media (min-width: 900px) {
  :where(.jf-widget-layout--right) { grid-template-columns: minmax(0, 1fr) var(--jf-sidebar-width, 18rem); }
  :where(.jf-widget-layout--left) { grid-template-columns: var(--jf-sidebar-width, 18rem) minmax(0, 1fr); }
  :where(.jf-widget-layout--left) > :where(.jf-widget-area) { grid-column: 1; }
  :where(.jf-widget-layout--left) > :where(.jf-widget-layout__main) { grid-column: 2; grid-row: 1; }
}
:where(.jf-widget__title) { font-size: 1rem; margin: 0 0 0.6rem; }
:where(.jf-widget__list) { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
:where(.jf-widget__list .jf-widget__list) { padding-left: 1rem; margin-top: 0.4rem; }
:where(.jf-widget__meta) { display: block; font-size: 0.8em; opacity: 0.7; }
:where(.jf-widget__search) { display: flex; gap: 0.5rem; }
:where(.jf-widget__search input) { flex: 1; min-width: 0; }

/* Theme styles */
/* Zine theme — base layer (Justflows Default v2 base styles: layout, blocks, navigation, widgets). Zine styling lives in components.css. */

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

:root {
  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-border: #e2e8f0;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --font-sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Fira Code", "Cascadia Code", Consolas, monospace;
  --font-heading: var(--font-sans);
  --max-width: 720px;
  --max-width-wide: 1140px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);

  /* One number drives the whole spacing scale, so raising it makes the site
     airier everywhere instead of in the one place someone remembered. */
  --space-unit-base: 8px;
  --space-unit: var(--space-unit-base);
  --space-0: 0;
  --space-1: calc(var(--space-unit) * 0.5);
  --space-2: var(--space-unit);
  --space-3: calc(var(--space-unit) * 1.5);
  --space-4: calc(var(--space-unit) * 2.5);
  --space-5: calc(var(--space-unit) * 4);
  --space-6: calc(var(--space-unit) * 6);
  --space-7: calc(var(--space-unit) * 9);
  --space-8: calc(var(--space-unit) * 13);

  --block-gap: 1.5rem;
  --heading-weight: 700;
  --heading-line: 1.15;
  --heading-tracking: -0.02em;
  --h1-size: 2.6rem;
  --h2-size: 2rem;
  --h3-size: 1.45rem;
}


html { font-size: var(--base-font-size, 16px); scroll-behavior: smooth; color-scheme: light; }

html[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #0f172a;
  --color-surface: #1e293b;
  --color-border: #334155;
  --color-text: #f8fafc;
  --color-muted: #94a3b8;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Site chrome ── */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: color-mix(in srgb, var(--color-bg) 92%, transparent);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header--static {
  position: relative;
}

.site-header-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
  min-height: 64px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header-blocks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
}

.site-header-blocks > * {
  max-width: 100%;
}

.site-header--center .site-header-inner {
  flex-direction: column;
  justify-content: center;
  height: auto;
  min-height: 64px;
  padding: 0.75rem 1.5rem;
}

.site-header--split .site-header-inner {
  justify-content: space-between;
}

.site-brand {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.site-logo {
  height: 32px;
  width: auto;
  display: block;
}

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

/* ── Menu designer: .jf-nav ──
   One markup/CSS contract for every layout (horizontal, vertical, dropdown,
   multi-level-dropdown, mega, footer, drawer) — the layout only changes a few
   rules below, never the tree shape rendered by nav-menu.ejs. Dropdown/mega
   open state and the mobile transform are driven by `hidden` and
   `aria-expanded`, toggled by /js/site-nav.js; this file never shows a panel
   on `:hover` alone (no hover-only functionality, and it stays correct with
   JS disabled: panels simply stay closed rather than becoming unreachable). */

.jf-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.jf-nav--align-center { justify-content: center; }
.jf-nav--align-end { justify-content: flex-end; }
.jf-nav--align-space-between { justify-content: space-between; }

.jf-nav--vertical,
.jf-nav--drawer {
  flex-direction: column;
  align-items: stretch;
  gap: 0.1rem;
}

.jf-nav--footer {
  justify-content: center;
  gap: 0.35rem 1rem;
}

.jf-nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 6px;
}

.jf-nav__toggle:hover { background: var(--color-surface, #f1f5f9); }

.jf-nav__item {
  position: relative;
}

.jf-nav__row {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.jf-nav__link,
.jf-nav__link--disabled {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
  padding: 0.3rem 0;
}

.jf-nav__link:hover,
.jf-nav__link:focus-visible { color: var(--color-primary); }

.jf-nav__link--disabled { color: var(--color-muted); cursor: default; opacity: 0.85; }

/* Style presets — set per item in the menu designer's "Style preset" field,
   which renders `jf-nav__link--<name>`. `button`, `button-outline` and
   `button-ghost` are built in; any other CSS-safe token is yours to style.

   The per-item "Button style" controls ride in as `--jf-navbtn-*` custom
   properties (with the theme colour as the fallback), so an author can recolour
   a single button without touching CSS. `jf-nav__link--btn-sm|lg|full` come
   from the same panel. Presets keep working in the mobile drawer / dropdown. */
.jf-nav__link--button,
.jf-nav__link--button-outline,
.jf-nav__link--button-ghost {
  padding: var(--jf-navbtn-pad, 0.42rem 0.95rem);
  border-radius: var(--jf-navbtn-radius, var(--radius-sm, 6px));
  font-weight: 700;
  font-size: var(--jf-navbtn-fs, 0.82rem);
  line-height: 1.2;
  /* Border colour applies to *every* variant, so a solid button can carry an
     outline too; width follows `--jf-navbtn-border-w` (default 1.5px). */
  border: var(--jf-navbtn-border-w, 1.5px) solid var(--jf-navbtn-border, transparent);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.jf-nav__link--button {
  background: var(--jf-navbtn-bg, var(--color-primary));
  color: var(--jf-navbtn-fg, #fff);
}
.jf-nav__link--button:hover,
.jf-nav__link--button:focus-visible {
  background: color-mix(in srgb, var(--jf-navbtn-bg, var(--color-primary)) 86%, #000);
  color: var(--jf-navbtn-fg, #fff);
}
.jf-nav__link--button-outline {
  color: var(--jf-navbtn-fg, var(--color-primary));
  /* Outline defaults its border to the primary colour; an explicit one wins. */
  border-color: var(--jf-navbtn-border, var(--color-primary));
  background: var(--jf-navbtn-bg, transparent);
}
.jf-nav__link--button-outline:hover,
.jf-nav__link--button-outline:focus-visible {
  background: var(--jf-navbtn-border, var(--color-primary));
  color: #fff;
}
.jf-nav__link--button-ghost {
  color: var(--jf-navbtn-fg, var(--color-text));
  background: var(--jf-navbtn-bg, var(--color-surface, #f1f5f9));
}
.jf-nav__link--button-ghost:hover,
.jf-nav__link--button-ghost:focus-visible {
  background: color-mix(in srgb, var(--jf-navbtn-bg, var(--color-surface, #f1f5f9)) 84%, var(--color-text));
  color: var(--jf-navbtn-fg, var(--color-text));
}

.jf-nav__link--btn-sm { --jf-navbtn-pad: 0.3rem 0.7rem; --jf-navbtn-fs: 0.75rem; }
.jf-nav__link--btn-lg { --jf-navbtn-pad: 0.6rem 1.4rem; --jf-navbtn-fs: 0.95rem; }
.jf-nav__link--btn-full { display: flex; width: 100%; justify-content: center; }

/* In the stacked mobile menu a button preset reads better left-aligned with a
   little breathing room above it, instead of stretched across the row. */
.jf-nav--mobile.jf-nav--open .jf-nav__row:has(.jf-nav__link--button),
.jf-nav--mobile.jf-nav--open .jf-nav__row:has(.jf-nav__link--button-outline),
.jf-nav--mobile.jf-nav--open .jf-nav__row:has(.jf-nav__link--button-ghost) {
  justify-content: flex-start;
  margin-top: 0.45rem;
}
.jf-nav--mobile.jf-nav--open .jf-nav__row:has(.jf-nav__link--btn-full) {
  display: block;
}

.jf-nav__icon { width: 1em; height: 1em; object-fit: contain; }

.jf-nav__badge {
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  border-radius: 999px;
  background: var(--color-surface, #f1f5f9);
  color: var(--color-text);
}

.jf-nav__badge--info { background: #dbeafe; color: #1e3a8a; }
.jf-nav__badge--success { background: #dcfce7; color: #14532d; }
.jf-nav__badge--warning { background: #fef3c7; color: #78350f; }
.jf-nav__badge--danger { background: #fee2e2; color: #7f1d1d; }

.jf-nav__description {
  display: block;
  font-size: 0.75rem;
  color: var(--color-muted);
}

.jf-nav__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.jf-nav__chevron {
  display: inline-block;
  transition: transform 0.15s;
}

.jf-nav__trigger[aria-expanded="true"] .jf-nav__chevron { transform: rotate(180deg); }

/* Standard + multi-level dropdown panels. `translate` (its own property, not
   `transform`) carries the author's --jf-nav-dx/dy nudge so it composes with
   the --center transform and the JS edge-flip instead of overwriting them. The
   viewport-relative max-width is a hard backstop: even before /js/site-nav.js
   re-anchors an overflowing panel, it can never be wider than the screen. */
.jf-nav__submenu {
  position: absolute;
  top: 100%;
  left: 0;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  max-width: calc(100vw - 1.5rem);
  margin: 0.25rem 0 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  translate: var(--jf-nav-dx, 0) var(--jf-nav-dy, 0);
  z-index: 30;
}

.jf-nav__submenu--end { left: auto; right: 0; }
.jf-nav__submenu--center { left: 50%; transform: translateX(-50%); }

/* Overflow correction, toggled by site-nav.js when a panel would leave the
   viewport. --edge re-anchors to the trigger's right edge; --clamp is the last
   resort — pinned to the viewport (position: fixed, JS sets `top`). */
.jf-nav__submenu--edge { left: auto; right: 0; transform: none; }
.jf-nav__submenu--clamp,
.jf-nav__megapanel--clamp {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  width: auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  transform: none;
  translate: none;
}

.jf-nav__submenu .jf-nav__item { width: 100%; }
.jf-nav__submenu .jf-nav__row { display: flex; width: 100%; padding: 0 0.75rem; }
.jf-nav__submenu .jf-nav__link,
.jf-nav__submenu .jf-nav__link--disabled { flex: 1; padding: 0.45rem 0; white-space: nowrap; }
/* Nested flyout: opens beside its parent, and must not inherit the parent's
   inline --jf-nav-dx/dy nudge (custom properties do inherit). */
.jf-nav__submenu .jf-nav__submenu {
  top: 0;
  left: 100%;
  margin: 0 0 0 0.25rem;
  --jf-nav-dx: 0;
  --jf-nav-dy: 0;
}

/* Mega-menu panel: a multi-column grid of author-defined content regions. The
   min-width is itself viewport-capped so a wide mega panel on a small screen
   can't force horizontal scroll before the mobile stacked layout takes over. */
.jf-nav__megapanel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: min(480px, calc(100vw - 1.5rem));
  max-width: min(90vw, 960px);
  margin: 0.25rem 0 0;
  padding: 1.25rem;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  translate: var(--jf-nav-dx, 0) var(--jf-nav-dy, 0);
  z-index: 30;
}

.jf-nav__megapanel--end { left: auto; right: 0; }
.jf-nav__megapanel--center { left: 50%; transform: translateX(-50%); }
.jf-nav__megapanel--edge { left: auto; right: 0; transform: none; }

/* Panel width overrides — set from the item's own "Panel width" field, shared by
   the mega panel and the standard/multi-level dropdown (see nav-menu.ejs's
   `_panelWidth` helper). Fit-content is the default above; this is the escape
   from it.

   Full-bleed uses `position: fixed` pinned to both viewport edges — the old
   `left: 50%; margin-left: -50vw` trick only lands centered when the trigger
   itself sits near the middle of the page, so a left-aligned nav pushed the
   panel off the left edge. site-nav.js sets `top` from the trigger's measured
   position on open, which handles any header height. A `max-width` from the
   item's field still applies (inline style), and `margin: 0 auto` then centres
   that narrower panel; `--jf-nav-dx`/`--jf-nav-dy` nudge from there.

   Comes after the alignment variants on purpose, so it wins over --center/--end
   when both happen to be set. */
.jf-nav__panel--viewport {
  position: fixed;
  left: 0;
  right: 0;
  width: auto;
  max-width: 100vw;
  margin: 0 auto;
  transform: none;
  translate: var(--jf-nav-dx, 0) var(--jf-nav-dy, 0);
}

.jf-nav__megagrid {
  display: grid;
  grid-template-columns: repeat(var(--jf-mega-columns, 3), 1fr);
  gap: 1.5rem;
}

.jf-nav__megaheading {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-muted);
}

.jf-nav__item--has-children:not(.jf-nav__item--mega) > [hidden],
.jf-nav__item--mega > [hidden] { display: none; }

/* `is-current`/ancestor state — a plain, always-on affordance (never hover-only). */
.jf-nav__item.is-current > .jf-nav__row > .jf-nav__link,
.jf-nav__link[aria-current="page"] {
  color: var(--color-primary);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .jf-nav__chevron,
  .jf-nav__link { transition: none; }
}

/* Per-element device visibility (`data-jf-devices`) is a platform default now —
   see @justflows/blocks `blockVisibilityCss()`, folded into /theme.css for every
   theme — so the rules that used to live here were removed. It covers menu
   items, header components and any block alike. */

/* ── Mobile menu ──
   EVERY rule here is gated on `.jf-nav--mobile`, which /js/site-nav.js adds to a
   nav's <ul> only while the viewport is at/below that menu's breakpoint (and
   removes — closing the menu — once it grows past). So a lingering
   `.jf-nav--open` can never leak the drawer/overlay styling onto the desktop
   menu. The scoped <style> nav-menu.ejs emits still hides the closed list +
   shows the hamburger pre-JS, so there is no flash. */

.jf-nav__toggle-icon--close { display: none; }
.jf-nav__toggle[aria-expanded="true"] .jf-nav__toggle-icon--open { display: none; }
.jf-nav__toggle[aria-expanded="true"] .jf-nav__toggle-icon--close { display: inline; }

/* Panel head: a close (X) control, plus the brand for the header's
   `hamburger-only` layout. The whole row shows for the overlay patterns
   (drawer / fullscreen, where the bar's hamburger is covered) and for any
   pattern that carries a brand; the X button itself only for overlays. */
.jf-nav__panelhead { display: none; }
.jf-nav--mobile.jf-nav--open[data-jf-nav-mobile="drawer-right"] .jf-nav__panelhead,
.jf-nav--mobile.jf-nav--open[data-jf-nav-mobile="drawer-left"] .jf-nav__panelhead,
.jf-nav--mobile.jf-nav--open[data-jf-nav-mobile="fullscreen"] .jf-nav__panelhead,
.jf-nav--mobile.jf-nav--open .jf-nav__panelhead:has(.site-brand) {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: 0 0 0.4rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
}
.jf-nav__panelhead .site-brand { font-size: 1rem; }
.jf-nav__close {
  margin-left: auto;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.jf-nav--mobile.jf-nav--open[data-jf-nav-mobile="drawer-right"] .jf-nav__close,
.jf-nav--mobile.jf-nav--open[data-jf-nav-mobile="drawer-left"] .jf-nav__close,
.jf-nav--mobile.jf-nav--open[data-jf-nav-mobile="fullscreen"] .jf-nav__close {
  display: inline-flex;
}
.jf-nav__close:hover { background: var(--color-surface, #f1f5f9); }

/* Open list: a stacked column. `!important` beats the base `.jf-nav`/layout
   `display` + `flex-direction` without an ID selector. */
.jf-nav--mobile.jf-nav--open {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0;
  list-style: none;
}

/* Flatten every floating sub-panel to inline flow inside the open menu. */
.jf-nav--mobile.jf-nav--open .jf-nav__submenu,
.jf-nav--mobile.jf-nav--open .jf-nav__megapanel {
  position: static;
  inset: auto;
  width: auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  translate: none;
  background: transparent;
  padding: 0 0 0 1rem;
}
.jf-nav--mobile.jf-nav--open .jf-nav__submenu .jf-nav__submenu { padding-left: 1rem; }
.jf-nav--mobile.jf-nav--open .jf-nav__megagrid { display: block; }
.jf-nav--mobile.jf-nav--open .jf-nav__megaregion { margin: 0 0 1rem; }
.jf-nav--mobile.jf-nav--open .jf-nav__item { position: static; width: 100%; }
.jf-nav--mobile.jf-nav--open .jf-nav__row {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding: 0.35rem 0;
}
.jf-nav--mobile.jf-nav--open .jf-nav__link,
.jf-nav--mobile.jf-nav--open .jf-nav__link--disabled { white-space: normal; }

/* Pattern: dropdown — full-width sheet under the header bar. */
.jf-nav--mobile.jf-nav--open[data-jf-nav-mobile="dropdown"] {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 55;
  max-height: 80vh;
  overflow-y: auto;
  padding: 0.5rem 1rem 1rem;
  background: var(--color-surface, #fff);
  border-top: 1px solid var(--color-border, #e2e8f0);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

/* Pattern: accordion — the list expands where it sits, no overlay. */
.jf-nav--mobile.jf-nav--open[data-jf-nav-mobile="accordion"] {
  width: 100%;
  padding: 0.25rem 0 0.5rem;
}

/* Patterns: drawer-left / drawer-right — off-canvas sheet, portaled to <body>
   by site-nav.js so `position: fixed` is viewport-relative. */
.jf-nav--mobile.jf-nav--open[data-jf-nav-mobile="drawer-right"],
.jf-nav--mobile.jf-nav--open[data-jf-nav-mobile="drawer-left"] {
  position: fixed;
  top: 0;
  bottom: 0;
  height: 100vh;
  height: 100dvh;
  width: min(22rem, 86vw);
  max-height: none;
  z-index: 60;
  overflow-y: auto;
  padding: 1rem 1.25rem 1.5rem;
  background: var(--color-surface, #fff);
}
.jf-nav--mobile.jf-nav--open[data-jf-nav-mobile="drawer-right"] {
  right: 0;
  left: auto;
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.18);
}
.jf-nav--mobile.jf-nav--open[data-jf-nav-mobile="drawer-left"] {
  left: 0;
  right: auto;
  box-shadow: 12px 0 32px rgba(0, 0, 0, 0.18);
}

/* Pattern: fullscreen — cover the viewport. */
.jf-nav--mobile.jf-nav--open[data-jf-nav-mobile="fullscreen"] {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  max-height: none;
  z-index: 60;
  overflow-y: auto;
  padding: 1rem 1.25rem 1.5rem;
  background: var(--color-surface, #fff);
}
.jf-nav--mobile.jf-nav--open[data-jf-nav-mobile="fullscreen"] .jf-nav__item {
  align-self: center;
  width: 100%;
  max-width: 24rem;
}
.jf-nav--mobile.jf-nav--open[data-jf-nav-mobile="fullscreen"] .jf-nav__link { font-size: 1.1rem; }

/* Open/close motion. site-nav.js adds `.jf-nav--anim-in` one frame after the
   panel mounts and removes it before unmount, keeping the node until the
   transition ends. `data-jf-nav-motion` = slide | fade | none; duration comes
   from `--jf-nav-motion-ms` (set inline per menu). */
.jf-nav--mobile.jf-nav--open[data-jf-nav-motion="slide"],
.jf-nav--mobile.jf-nav--open[data-jf-nav-motion="fade"] {
  transition: transform var(--jf-nav-motion-ms, 240ms) cubic-bezier(0.4, 0, 0.2, 1),
              opacity var(--jf-nav-motion-ms, 240ms) ease;
  will-change: transform, opacity;
}
.jf-nav--mobile.jf-nav--open[data-jf-nav-motion="fade"]:not(.jf-nav--anim-in) { opacity: 0; }
.jf-nav--mobile.jf-nav--open[data-jf-nav-motion="slide"][data-jf-nav-mobile="drawer-right"]:not(.jf-nav--anim-in) { transform: translateX(100%); }
.jf-nav--mobile.jf-nav--open[data-jf-nav-motion="slide"][data-jf-nav-mobile="drawer-left"]:not(.jf-nav--anim-in) { transform: translateX(-100%); }
.jf-nav--mobile.jf-nav--open[data-jf-nav-motion="slide"][data-jf-nav-mobile="fullscreen"]:not(.jf-nav--anim-in) { opacity: 0; transform: translateY(1.25rem); }
.jf-nav--mobile.jf-nav--open[data-jf-nav-motion="slide"][data-jf-nav-mobile="dropdown"]:not(.jf-nav--anim-in) { opacity: 0; transform: translateY(-0.5rem); }
.jf-nav--mobile.jf-nav--open[data-jf-nav-motion="slide"][data-jf-nav-mobile="accordion"]:not(.jf-nav--anim-in) { opacity: 0; }

/* Dim layer behind drawer / fullscreen menus (portaled to <body>). */
.jf-nav__backdrop {
  position: fixed;
  inset: 0;
  z-index: 59;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
  transition: opacity var(--jf-nav-motion-ms, 240ms) ease;
}
.jf-nav__backdrop:not(.jf-nav--anim-in) { opacity: 0; }
.jf-nav__backdrop[hidden] { display: none; }

/* Scroll-lock the page while an overlay menu is open (site-nav.js toggles it). */
body.jf-nav-scroll-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .jf-nav--mobile.jf-nav--open,
  .jf-nav__backdrop { transition: none !important; }
}

.site-lang {
  margin-left: 1rem;
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.site-lang__link {
  font-size: 0.75rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.site-lang__link.is-current {
  background: var(--color-surface, #f1f5f9);
  font-weight: 700;
}

.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.site-main--page {
  max-width: none;
  margin: 0;
  padding: 0;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.85rem;
  background: var(--color-surface);
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.site-footer-nav a {
  color: var(--color-muted);
  text-decoration: none;
  font-weight: 500;
}

.site-footer-nav a:hover { color: var(--color-text); }

/* ── Typography ──
   Sizes stay fluid, with the customizer's value as the ceiling rather than a
   fixed size: a heading picked on a desktop still scales down on the way to
   the mobile override below. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading, var(--font-sans));
  font-weight: var(--heading-weight, 800);
  line-height: var(--heading-line, 1.2);
  letter-spacing: var(--heading-tracking, -0.02em);
  margin: 1.75rem 0 0.75rem;
}

h1 { font-size: clamp(1.9rem, 5vw, var(--h1-size, 2.75rem)); }
h2 { font-size: clamp(1.4rem, 3vw, var(--h2-size, 2rem)); }
h3 { font-size: var(--h3-size, 1.25rem); }

p { margin: 0 0 1.15rem; }

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

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

blockquote {
  border-left: 4px solid var(--color-primary);
  margin: 0 0 1.25rem;
  padding: 0.75rem 1.25rem;
  color: var(--color-muted);
  font-style: italic;
  background: var(--color-surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.jf-footnote-ref { font-weight: 600; }
.jf-footnote-ref a { text-decoration: none; }
.jf-footnotes {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}
.jf-footnotes hr {
  border: none;
  border-top: 1px solid var(--color-border, #e2e8f0);
  margin: 0 0 1rem;
}
.jf-footnotes ol { padding-left: 1.25rem; }
.jf-footnotes li { margin-bottom: 0.4rem; }
.jf-footnote-backref { margin-left: 0.25rem; text-decoration: none; }

.jf-math { display: inline-block; }

pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre code { background: none; padding: 0; }

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  color: #fff;
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

/* ── Post / archive ── */
.post-list { list-style: none; margin: 0; padding: 0; }

.post-list-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

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

.post-thumb { display: block; margin-bottom: 0.75rem; }
.post-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

/* Grid layout for the "Post List" block — a card per post instead of the
   classic bordered-row list, with a smaller title so it fits a column. */
.post-list--grid {
  display: grid;
  gap: 1.5rem;
}
.post-list--grid.post-list--cols-1 { grid-template-columns: 1fr; }
.post-list--grid.post-list--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-list--grid.post-list--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-list--grid.post-list--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.post-list--grid .post-list-item { padding: 0; border-bottom: none; }
.post-list--grid .post-title { font-size: 1.15rem; font-weight: 800; }
.post-list--grid .post-excerpt { font-size: 0.95rem; margin-bottom: 0; }

.post-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
}

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

.post-title a:hover { color: var(--color-primary); }

.post-meta {
  color: var(--color-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.post-excerpt {
  font-size: 1.1rem;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

.post-header { margin-bottom: 2rem; }
.post-header h1 { margin-top: 0; }
.post-content { font-size: 1.05rem; }
.post-content figure { margin: 1.5rem 0; }
.post-content figcaption {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 0.5rem;
  text-align: center;
}

.block-content img { max-width: 100%; height: auto; border-radius: var(--radius-md); }

.block-content pre {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

/* ── Layout blocks ── */
.jf-section { width: 100%; }

.jf-section__inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.jf-section--pad-sm { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.jf-section--pad-md { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.jf-section--pad-lg { padding-top: 4rem; padding-bottom: 4rem; }
.jf-section--pad-xl { padding-top: 5rem; padding-bottom: 5rem; }

.jf-section--bg-default { background: var(--color-bg); }
.jf-section--bg-muted { background: var(--color-surface); }
.jf-section--bg-primary { background: #eff6ff; }
.jf-section--bg-dark { background: #0f172a; color: #f8fafc; }
.jf-section--bg-dark a { color: #93c5fd; }
.jf-section--bg-gradient {
  background: linear-gradient(135deg, var(--color-surface) 0%, #eff6ff 50%, #f0fdf4 100%);
}

.jf-section--align-center { text-align: center; }
.jf-section--align-center .jf-container { margin-left: auto; margin-right: auto; }

.jf-container {
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

.jf-container--narrow { max-width: 560px; }
.jf-container--default { max-width: var(--max-width); }
.jf-container--wide { max-width: var(--max-width-wide); }
.jf-container--full { max-width: none; padding: 0; }

.jf-group > * + * { margin-top: 1rem; }

.jf-columns { display: grid; width: 100%; }
.jf-columns--2 { grid-template-columns: repeat(2, 1fr); }
.jf-columns--3 { grid-template-columns: repeat(3, 1fr); }
.jf-columns--4 { grid-template-columns: repeat(4, 1fr); }
.jf-columns--gap-sm { gap: 0.75rem; }
.jf-columns--gap-md { gap: 1.5rem; }
.jf-columns--gap-lg { gap: 2.5rem; }
.jf-column { min-width: 0; }
.jf-column > * + * { margin-top: 1rem; }

/* ── Grid ──
   Children carry their own placement as custom properties, so any block type
   can sit in a grid without a wrapper. A child that sets none falls back to
   full width, which is what a stacked layout already looks like. */
.jf-grid {
  display: grid;
  grid-template-columns: repeat(var(--jf-grid-cols, 12), minmax(0, 1fr));
  width: 100%;
}
.jf-grid > * {
  min-width: 0;
  grid-column: var(--jf-col, auto) / span var(--jf-span, 12);
  grid-row: var(--jf-row, auto) / span var(--jf-row-span, 1);
}
.jf-grid--gap-none { gap: 0; }
.jf-grid--gap-sm { gap: 0.75rem; }
.jf-grid--gap-md { gap: 1.5rem; }
.jf-grid--gap-lg { gap: 2.5rem; }
.jf-grid--rows-sm { grid-auto-rows: minmax(4rem, auto); }
.jf-grid--rows-md { grid-auto-rows: minmax(8rem, auto); }
.jf-grid--rows-lg { grid-auto-rows: minmax(14rem, auto); }

@media (max-width: 900px) {
  /* Explicit columns stop being useful before the layout gets narrow enough to
     stack. Nothing goes below half width, and rows flow rather than being
     pinned to a track that no longer matches the new spans. */
  .jf-grid > * {
    grid-column: auto / span var(--jf-span-t, 12);
    grid-row: auto;
  }
}

/* ── Hero ── */
.jf-hero {
  padding: clamp(4rem, 10vw, 6.5rem) 1.5rem;
  background: linear-gradient(160deg, var(--color-surface) 0%, #eff6ff 45%, #fff 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.jf-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.08), transparent 50%),
    radial-gradient(circle at 80% 60%, rgba(16, 185, 129, 0.06), transparent 45%);
  pointer-events: none;
}

.jf-hero__inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  position: relative;
}

.jf-hero--align-center { text-align: center; }
.jf-hero--align-center .jf-hero__inner { max-width: 780px; }

.jf-hero__heading {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin: 0 0 1.25rem;
  letter-spacing: -0.03em;
}

.jf-hero__sub {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--color-muted);
  margin: 0 0 2rem;
  max-width: 620px;
  line-height: 1.6;
}

.jf-hero--align-center .jf-hero__sub { margin-left: auto; margin-right: auto; }

.jf-hero[style*="background-image"] { color: #fff; }
.jf-hero[style*="background-image"]::before { background: rgba(15, 23, 42, 0.55); }
.jf-hero[style*="background-image"] .jf-hero__sub { color: rgba(255, 255, 255, 0.88); }

.jf-hero__btn { margin-top: 0.25rem; }

/* ── Link list ── */
.jf-link-list__heading {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.jf-link-list__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.jf-link-list__link {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.jf-link-list__link:hover { color: var(--color-text); text-decoration: underline; }

/* ── Features ── */
.jf-features { padding: clamp(3rem, 6vw, 4.5rem) 0; }

.jf-features__heading {
  text-align: center;
  margin: 0 0 2.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.jf-features__grid { display: grid; gap: 1.25rem; }
.jf-features__grid--2 { grid-template-columns: repeat(2, 1fr); }
.jf-features__grid--3 { grid-template-columns: repeat(3, 1fr); }
.jf-features__grid--4 { grid-template-columns: repeat(4, 1fr); }

.jf-feature {
  padding: 1.75rem 1.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.jf-feature:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.jf-feature__icon { font-size: 1.85rem; display: block; margin-bottom: 0.85rem; }
.jf-feature__title { margin: 0 0 0.4rem; font-size: 1.05rem; font-weight: 700; }
.jf-feature__desc { margin: 0; font-size: 0.92rem; color: var(--color-muted); line-height: 1.5; }

/* ── Forms ── */
.jf-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 32rem;
  padding: 1.25rem 0;
}
.jf-form__title { margin: 0 0 0.25rem; font-size: 1.25rem; }
.jf-form__field { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.9rem; }
.jf-form__field input,
.jf-form__field textarea,
.jf-form__field select {
  font: inherit;
  font-weight: 400;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}
.jf-form button[type="submit"] {
  align-self: flex-start;
  padding: 0.6rem 1.1rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.jf-form button[type="submit"]:hover { background: var(--color-primary-hover); }
.jf-form__hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.jf-form--success {
  padding: 1rem 1.1rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-md);
  color: #065f46;
}
.jf-form--missing { color: var(--color-muted); }

/* ── Gallery ── */
.jf-gallery { margin: 1rem 0; }
.jf-gallery--empty { color: var(--color-muted); }
.jf-gallery--grid {
  display: grid;
  gap: 0.75rem;
}
.jf-gallery--grid.jf-gallery--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jf-gallery--grid.jf-gallery--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jf-gallery--grid.jf-gallery--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.jf-gallery--grid.jf-gallery--cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.jf-gallery--grid.jf-gallery--cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.jf-gallery--masonry { column-gap: 0.75rem; }
.jf-gallery--masonry.jf-gallery--cols-2 { column-count: 2; }
.jf-gallery--masonry.jf-gallery--cols-3 { column-count: 3; }
.jf-gallery--masonry.jf-gallery--cols-4 { column-count: 4; }
.jf-gallery--masonry.jf-gallery--cols-5 { column-count: 5; }
.jf-gallery--masonry.jf-gallery--cols-6 { column-count: 6; }
.jf-gallery__item {
  display: block;
  margin: 0 0 0.75rem;
  break-inside: avoid;
  position: relative;
  color: inherit;
  text-decoration: none;
}
.jf-gallery--grid .jf-gallery__item { margin: 0; }
.jf-gallery__item img {
  display: block;
  width: 100%;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}
.jf-gallery--grid .jf-gallery__item img {
  aspect-ratio: 1;
  object-fit: cover;
}
.jf-gallery__caption {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--color-muted);
}
.jf-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.jf-lightbox:target { display: flex; }
.jf-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
}
.jf-lightbox__frame {
  position: relative;
  margin: 0;
  max-width: min(96vw, 1100px);
  max-height: 90vh;
  z-index: 1;
}
.jf-lightbox__frame img {
  display: block;
  max-width: 96vw;
  max-height: 82vh;
  border-radius: var(--radius-md);
}
.jf-lightbox__frame figcaption {
  margin-top: 0.6rem;
  color: #e2e8f0;
  text-align: center;
}
.jf-lightbox__close,
.jf-lightbox__prev,
.jf-lightbox__next {
  position: absolute;
  z-index: 2;
  color: #fff;
  text-decoration: none;
  font-size: 2rem;
  line-height: 1;
  padding: 0.35rem 0.7rem;
}
.jf-lightbox__close { top: 1rem; right: 1rem; }
.jf-lightbox__prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.jf-lightbox__next { right: 0.75rem; top: 50%; transform: translateY(-50%); }

.jf-gallery__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--color-border, #cbd5e1);
}

/* Carousel: a scroll-snap track. Dragging or a two-finger swipe moves it, and
   each dot is a plain fragment link to a slide's own id — the browser scrolls
   it into view natively, no script required. */
.jf-gallery--carousel { margin: 1rem 0; }
.jf-carousel__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 0.75rem;
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}
.jf-carousel__track .jf-gallery__item {
  flex: 0 0 100%;
  scroll-snap-align: center;
  margin: 0;
}
.jf-carousel__track .jf-gallery__item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.jf-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

/* Slideshow: every slide is stacked in the same box; only one is opaque at a
   time. The first slide is opaque by default, and a dot link makes its slide
   the CSS `:target`, which — placed after the default rule — wins the fade. */
.jf-gallery--slideshow { margin: 1rem 0; }
.jf-slideshow__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-surface);
}
.jf-slideshow__stage .jf-gallery__item {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.5s ease;
}
.jf-slideshow__stage .jf-gallery__item:first-of-type { opacity: 1; z-index: 1; }
.jf-slideshow__stage .jf-gallery__item:target { opacity: 1; z-index: 2; }
.jf-slideshow__stage .jf-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.jf-slideshow__stage .jf-gallery__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.6rem 0.85rem;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.65), transparent);
  color: #fff;
}
.jf-slideshow__dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

/* List: full-width stacked rows — a single large image per item, caption
   underneath. */
.jf-gallery--list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.jf-gallery--list .jf-gallery__item { margin: 0; }
.jf-gallery--list .jf-gallery__item img {
  width: 100%;
  max-height: 32rem;
  object-fit: cover;
}

/* ── CTA ── */
.jf-cta { padding: clamp(3rem, 6vw, 4.5rem) 1.5rem; text-align: center; }
.jf-cta--primary { background: #eff6ff; }
.jf-cta--dark { background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%); color: #fff; }
.jf-cta--dark .jf-cta__text { color: rgba(255, 255, 255, 0.78); }
.jf-cta__heading { margin: 0 0 0.65rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.jf-cta__text { margin: 0 0 1.75rem; color: var(--color-muted); max-width: 520px; margin-left: auto; margin-right: auto; }

/* ── Demo components (HTML blocks) ── */
.jf-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.jf-logos__label {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.jf-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem 2.5rem;
}

.jf-logos span {
  font-size: 1.15rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: -0.02em;
}

.jf-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.jf-stat strong {
  display: block;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.jf-stat span {
  font-size: 0.9rem;
  color: var(--color-muted);
  font-weight: 500;
}

.jf-preview-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--color-bg);
}

.jf-preview-card__bar {
  display: flex;
  gap: 0.35rem;
  padding: 0.65rem 0.85rem;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.jf-preview-card__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.jf-preview-card__body { padding: 1.25rem; }

.jf-preview-card__hero {
  height: 100px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  margin-bottom: 1rem;
}

.jf-preview-card__lines { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1rem; }

.jf-preview-card__lines span {
  height: 8px;
  border-radius: 4px;
  background: var(--color-surface);
  width: 100%;
}

.jf-preview-card__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.jf-preview-card__grid span {
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.jf-testimonials__heading {
  text-align: center;
  margin: 0 0 2rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.jf-testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  text-align: left;
}

.jf-testimonial {
  margin: 0;
  padding: 1.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.jf-testimonial p {
  margin: 0 0 1rem;
  font-style: normal;
  color: var(--color-text);
  line-height: 1.55;
}

.jf-testimonial footer {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-style: normal;
  font-weight: 600;
}

.jf-pricing__heading {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.jf-pricing__sub {
  margin: 0 0 2rem;
  color: var(--color-muted);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.jf-pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  text-align: left;
}

.jf-price-card {
  position: relative;
  padding: 1.75rem 1.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.jf-price-card--featured {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: scale(1.02);
}

.jf-price-card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }

.jf-price-card__price {
  margin: 0 0 1.25rem;
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.jf-price-card__price span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-muted);
}

.jf-price-card ul {
  margin: 0 0 1.5rem;
  padding-left: 1.1rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.jf-price-card li { margin-bottom: 0.35rem; }

.jf-price-card .jf-badge {
  position: absolute;
  top: -0.65rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
}

.jf-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.block-content--page .jf-section--pad-sm,
.block-content--page .jf-section--pad-md,
.block-content--page .jf-section--pad-lg,
.block-content--page .jf-section--pad-xl { padding-left: 0; padding-right: 0; }

.block-content--page .jf-section__inner { max-width: none; padding: 0; }
.block-content--page .jf-section__inner > .jf-container { margin: 0 auto; }

/* ── Legacy home fallback ── */
.hero {
  background: linear-gradient(160deg, var(--color-surface) 0%, #eff6ff 100%);
  padding: 6rem 1.5rem 5rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero p {
  font-size: 1.15rem;
  color: var(--color-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 3rem;
}

.pagination a, .pagination span {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.875rem;
}

.pagination .current {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .jf-stats { grid-template-columns: repeat(2, 1fr); }
  .jf-testimonials { grid-template-columns: 1fr; }
  .jf-pricing { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .jf-price-card--featured { transform: none; }
}

@media (max-width: 640px) {
  /* Per-block spacing is written in scale steps, so lowering the unit pulls
     every one of them in at once instead of needing a mobile value each. */
  :root { --space-unit: calc(var(--space-unit-base, 8px) * 0.7); }
  .site-header-inner { height: auto; min-height: 64px; padding: 0.75rem 1rem; flex-wrap: wrap; }
  .jf-columns--2, .jf-columns--3, .jf-columns--4 { grid-template-columns: 1fr; }
  .jf-grid > * { grid-column: 1 / -1; grid-row: auto; }
  .jf-grid--rows-sm, .jf-grid--rows-md, .jf-grid--rows-lg { grid-auto-rows: auto; }
  .jf-features__grid--2, .jf-features__grid--3, .jf-features__grid--4 { grid-template-columns: 1fr; }
  .jf-stats { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.75rem; }
  .jf-gallery--grid.jf-gallery--cols-3,
  .jf-gallery--grid.jf-gallery--cols-4,
  .jf-gallery--grid.jf-gallery--cols-5,
  .jf-gallery--grid.jf-gallery--cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jf-gallery--masonry.jf-gallery--cols-3,
  .jf-gallery--masonry.jf-gallery--cols-4,
  .jf-gallery--masonry.jf-gallery--cols-5,
  .jf-gallery--masonry.jf-gallery--cols-6 { column-count: 2; }
}

/* ── Site widgets ── */
.jf-site-widget {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.jf-site-widget--left { justify-content: flex-start; }
.jf-site-widget--center { justify-content: center; }
.jf-site-widget--right { justify-content: flex-end; }

/* Every colour, size, and radius the widget uses is a custom property with a
   theme-token fallback, so a theme or the Theme Customizer can restyle the
   hover / active / focus states (and spacing) by setting the variable instead
   of overriding these rules. The --size-* / --radius-* modifier classes (set
   by the block's size and radius props) just reassign the same variables. */
.jf-color-scheme {
  --jf-color-scheme-gap: 0.25rem;
  --jf-color-scheme-font-size: 0.8rem;
  --jf-color-scheme-padding-y: 0.3rem;
  --jf-color-scheme-padding-x: 0.65rem;
  --jf-color-scheme-radius: 999px;
  --jf-color-scheme-bg: var(--color-surface);
  --jf-color-scheme-fg: var(--color-text);
  --jf-color-scheme-border: var(--color-border);
  --jf-color-scheme-hover-bg: var(--jf-color-scheme-bg);
  --jf-color-scheme-hover-fg: var(--jf-color-scheme-fg);
  --jf-color-scheme-hover-border: var(--color-primary);
  --jf-color-scheme-active-bg: var(--color-primary);
  --jf-color-scheme-active-fg: #fff;
  --jf-color-scheme-active-border: var(--color-primary);
  --jf-color-scheme-focus: var(--color-primary);
  display: inline-flex;
  gap: var(--jf-color-scheme-gap);
  align-items: center;
}

.jf-color-scheme--size-sm {
  --jf-color-scheme-font-size: 0.7rem;
  --jf-color-scheme-padding-y: 0.2rem;
  --jf-color-scheme-padding-x: 0.5rem;
}

.jf-color-scheme--size-lg {
  --jf-color-scheme-font-size: 0.95rem;
  --jf-color-scheme-padding-y: 0.45rem;
  --jf-color-scheme-padding-x: 0.9rem;
}

.jf-color-scheme--radius-rounded {
  --jf-color-scheme-radius: 8px;
}

.jf-color-scheme--radius-square {
  --jf-color-scheme-radius: 0;
}

.jf-color-scheme__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: var(--jf-color-scheme-padding-y) var(--jf-color-scheme-padding-x);
  border: 1px solid var(--jf-color-scheme-border);
  border-radius: var(--jf-color-scheme-radius);
  background: var(--jf-color-scheme-bg);
  color: var(--jf-color-scheme-fg);
  font: inherit;
  font-size: var(--jf-color-scheme-font-size);
  font-weight: 600;
  cursor: pointer;
}

.jf-color-scheme__btn:hover {
  background: var(--jf-color-scheme-hover-bg);
  color: var(--jf-color-scheme-hover-fg);
  border-color: var(--jf-color-scheme-hover-border);
}

.jf-color-scheme__btn:focus-visible,
.jf-color-scheme__select:focus-visible {
  outline: 2px solid var(--jf-color-scheme-focus);
  outline-offset: 2px;
}

.jf-color-scheme__btn[aria-pressed="true"],
.jf-color-scheme__btn[aria-checked="true"] {
  background: var(--jf-color-scheme-active-bg);
  border-color: var(--jf-color-scheme-active-border);
  color: var(--jf-color-scheme-active-fg);
}

/* Variants that show icons only. */
.jf-color-scheme--icons .jf-color-scheme__label,
.jf-color-scheme--tooltip-icons .jf-color-scheme__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Text-only variant: drop the glyph. */
.jf-color-scheme--labels .jf-color-scheme__icon {
  display: none;
}

/* Segmented control: buttons share edges. */
.jf-color-scheme--segmented {
  gap: 0;
}

.jf-color-scheme--segmented .jf-color-scheme__btn {
  border-radius: 0;
  margin-left: -1px;
}

.jf-color-scheme--segmented .jf-color-scheme__btn:first-child {
  border-radius: var(--jf-color-scheme-radius) 0 0 var(--jf-color-scheme-radius);
  margin-left: 0;
}

.jf-color-scheme--segmented .jf-color-scheme__btn:last-child {
  border-radius: 0 var(--jf-color-scheme-radius) var(--jf-color-scheme-radius) 0;
}

/* Single toggle: one button, one visible glyph. The glyph keys off
   html[data-theme], which /js/site-chrome.js stamps before first paint, so it
   is correct with no flash even before the widget's own state is set. */
.jf-color-scheme__toggle {
  position: relative;
}

.jf-color-scheme__toggle .jf-color-scheme__icon--moon {
  display: none;
}

html[data-theme="dark"] .jf-color-scheme__toggle .jf-color-scheme__icon--sun {
  display: none;
}

html[data-theme="dark"] .jf-color-scheme__toggle .jf-color-scheme__icon--moon {
  display: inline;
}

/* Switch: a track with a sliding thumb and no button chrome. The higher
   specificity here also cancels the shared .jf-color-scheme__btn hover /
   [aria-checked] fills. */
.jf-color-scheme--switch .jf-color-scheme__switch,
.jf-color-scheme--switch .jf-color-scheme__switch:hover,
.jf-color-scheme--switch .jf-color-scheme__switch[aria-checked="true"] {
  gap: 0.5rem;
  padding: 0.2rem 0;
  border: 0;
  background: none;
  color: var(--jf-color-scheme-fg);
}

.jf-color-scheme__track {
  position: relative;
  display: inline-block;
  flex: none;
  width: 2.4rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--jf-color-scheme-border);
  transition: background 0.2s ease;
}

.jf-color-scheme__thumb {
  position: absolute;
  top: 50%;
  left: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: left 0.2s ease;
}

.jf-color-scheme__switch[aria-checked="true"] .jf-color-scheme__track {
  background: var(--jf-color-scheme-active-bg);
}

.jf-color-scheme__switch[aria-checked="true"] .jf-color-scheme__thumb {
  left: calc(100% - 1.2rem);
}

@media (prefers-reduced-motion: reduce) {
  .jf-color-scheme__track,
  .jf-color-scheme__thumb {
    transition: none;
  }
}

.jf-color-scheme.is-animated .jf-color-scheme__icon {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Compact dropdown. */
.jf-color-scheme__select {
  font: inherit;
  font-size: var(--jf-color-scheme-font-size);
  padding: var(--jf-color-scheme-padding-y) var(--jf-color-scheme-padding-x);
  border: 1px solid var(--jf-color-scheme-border);
  border-radius: min(var(--jf-color-scheme-radius), 8px);
  background: var(--jf-color-scheme-bg);
  color: var(--jf-color-scheme-fg);
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .jf-color-scheme.is-animated .jf-color-scheme__icon {
    transition: none;
  }
}

.jf-language-switcher,
.jf-auth-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.jf-language-switcher {
  display: flex;
  max-width: 100%;
}

.jf-language-switcher__link,
.jf-auth-links--links a {
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-muted);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.jf-language-switcher__link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}

.jf-language-switcher__dropdown {
  position: relative;
  max-width: 100%;
}

.jf-language-switcher__trigger {
  display: inline-flex;
  min-height: 2.75rem;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.jf-language-switcher__trigger::-webkit-details-marker {
  display: none;
}

.jf-language-switcher__trigger:hover,
.jf-language-switcher__trigger:focus-visible {
  color: var(--color-primary);
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.jf-language-switcher__chevron {
  transition: transform 150ms ease;
}

.jf-language-switcher__dropdown[open] .jf-language-switcher__chevron {
  transform: rotate(180deg);
}

.jf-language-switcher__menu {
  position: absolute;
  z-index: 20;
  inset-block-start: calc(100% + 0.35rem);
  inset-inline-end: 0;
  display: flex;
  width: max-content;
  min-width: 100%;
  max-width: min(16rem, calc(100vw - 2rem));
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.35rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-background);
  box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 14%);
}

.jf-site-widget--left .jf-language-switcher__menu {
  inset-inline: 0 auto;
}

.jf-language-switcher__menu .jf-language-switcher__link {
  justify-content: flex-start;
}

.jf-language-switcher--flags .jf-language-switcher__link {
  min-width: 2.75rem;
  padding-inline: 0.55rem;
  font-size: 1.15rem;
}

@media (min-width: 48rem) {
  .jf-language-switcher__link {
    min-height: 2.25rem;
  }

  .jf-language-switcher__trigger {
    min-height: 2.25rem;
  }

  .jf-language-switcher--flags .jf-language-switcher__link {
    min-width: 2.25rem;
  }
}

.jf-language-switcher__link:hover,
.jf-auth-links--links a:hover {
  color: var(--color-primary);
}

.jf-language-switcher__link.is-current {
  background: var(--color-surface);
  color: var(--color-text);
}

.site-header .jf-color-scheme,
.site-header .jf-auth-links,
.site-header .jf-language-switcher {
  margin-left: 0.5rem;
}

/* ── Comments ──────────────────────────────────────────────────────────────── */

.jf-comments {
  max-width: var(--max-width);
  margin: var(--space-6) auto 0;
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.jf-comments__heading {
  font-size: 1.25rem;
  margin: 0 0 var(--space-4);
}

.jf-comments__count {
  color: var(--color-muted);
  font-weight: 400;
}

.jf-comments__banner {
  margin: 0 0 var(--space-4);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.jf-comments__banner--error {
  border-color: var(--color-primary);
}

.jf-comments__list {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
}

.jf-comments__list--replies {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding-left: var(--space-4);
  border-left: 2px solid var(--color-border);
}

.jf-comment {
  margin: 0 0 var(--space-4);
}

.jf-comment__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-bottom: 0.25rem;
}

.jf-comment__author {
  font-weight: 600;
  color: var(--color-text);
}

.jf-comment__author a {
  color: inherit;
}

.jf-comment__edited {
  font-style: italic;
}

.jf-comment__reply-link {
  color: var(--color-primary);
}

.jf-comment__text {
  line-height: 1.6;
}

.jf-comment__text > :first-child {
  margin-top: 0;
}

.jf-comment__text > :last-child {
  margin-bottom: 0;
}

.jf-comments__empty,
.jf-comments__closed {
  color: var(--color-muted);
}

.jf-comments__pager {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 0 0 var(--space-4);
}

.jf-comments__form {
  position: relative;
  margin-top: var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.jf-comments__form-title {
  font-size: 1.05rem;
  margin: 0 0 var(--space-3);
}

.jf-comments__replying {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin: 0 0 var(--space-3);
}

.jf-comments__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 var(--space-3);
}

.jf-comments__field label {
  font-size: 0.875rem;
  font-weight: 600;
}

.jf-comments__field--check {
  flex-direction: row;
  align-items: center;
}

.jf-comments__field input,
.jf-comments__field textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
}

.jf-comments__field input:focus-visible,
.jf-comments__field textarea:focus-visible,
.jf-comments__submit:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.jf-comments__hint {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.jf-comments__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.jf-comments__submit {
  padding: 0.6rem 1.2rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.jf-comments__submit:hover {
  background: var(--color-primary-hover);
}

/* Public search — matches the theme's form + surface language, and works
   without a CSS provider or client-side JavaScript. */
.jf-search-page {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: var(--space-6) var(--space-4);
}
.jf-search-page > h1 {
  margin: 0 0 var(--space-4);
}

.jf-search {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.jf-search label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
}
.jf-search input {
  max-width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  font-weight: 400;
}
.jf-search button {
  align-self: end;
  padding: 0.6rem 1.2rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.jf-search button:hover:not(:disabled) {
  background: var(--color-primary-hover);
}
.jf-search button:disabled {
  opacity: 0.6;
  cursor: default;
}
.jf-search details {
  flex-basis: 100%;
}
.jf-search summary {
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}
.jf-search details[open] {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.jf-search details[open] summary {
  flex-basis: 100%;
  margin-bottom: 0.5rem;
}

.jf-search-results {
  margin: var(--space-4) 0;
  padding-inline-start: 1.5rem;
}
.jf-search-results li {
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.jf-search-results h2 {
  margin: 0 0 0.35rem;
  font-size: var(--h3-size);
}
.jf-search-results p {
  margin: 0 0 0.35rem;
  overflow-wrap: anywhere;
}
.jf-search-results small {
  color: var(--color-muted);
}

.jf-search-pagination {
  display: flex;
  gap: var(--space-4);
  margin-block: var(--space-4);
}

.jf-search :focus-visible,
.jf-search-page a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}


/* ==========================================================
   Zine — playful, tech-savvy blog & news theme
   Layered on the base styles in global.css. Treat :root below as
   defaults: the Customizer palette is emitted after this file.
   Element rules are body-scoped so they also hold when a CSS
   provider such as Tailwind (Preflight) loads after theme.css.
   ========================================================== */

:root {
  --color-bg: #fff7ec;
  --color-surface: #f3ecff;
  --color-border: #e7dccb;
  --color-text: #1a1530;
  --color-muted: #605a78;
  --color-primary: #6b46ff;
  --color-primary-hover: #5530f0;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  --font-heading: ui-rounded, "SF Pro Rounded", Nunito, Quicksand, "Varela Round", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --heading-weight: 800;
  --heading-line: 1.05;
  --heading-tracking: -0.03em;
  --h1-size: 4rem;
  --h2-size: 2.4rem;
  --h3-size: 1.5rem;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --max-width: 740px;
  --max-width-wide: 1200px;
}

:root {
  /* Outlines and hard shadows: the "sticker" look. */
  --zn-ink: #1a1530;
  --zn-band: #1a1530;
  --zn-shadow: #1a1530;
  --zn-card: #ffffff;
  --zn-bw: 2px;
  --zn-lift: 5px;
  --zn-on-primary: #ffffff;
  --zn-dots: rgba(26, 21, 48, .09);
  /* Accents. Fixed (not Customizer colours) so cards keep their candy mix. */
  --zn-lime: #c6f432;
  --zn-pink: #ff8ad1;
  --zn-sun: #ffd43b;
  --zn-sky: #7cd3ff;
  --zn-coral: #ff6a4d;
  --zn-code-bg: #16122b;
  --zn-code-fg: #ece7ff;
  --zn-ease: cubic-bezier(.2, .9, .3, 1.3);
  --zn-gutter: clamp(1.1rem, 4vw, 2.5rem);
}

html[data-theme="dark"] {
  --color-bg: #110e1f;
  --color-surface: #1f1a38;
  --color-border: #2f2950;
  --color-text: #f6f1ff;
  --color-muted: #a9a2c7;
  --color-primary: #a48cff;
  --color-primary-hover: #bba8ff;
  --zn-ink: #f6f1ff;
  --zn-band: #6b46ff;
  --zn-shadow: #6b46ff;
  --zn-card: #1b1730;
  --zn-on-primary: #110e1f;
  --zn-dots: rgba(246, 241, 255, .07);
  --zn-code-bg: #0b0916;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --color-bg: #110e1f;
    --color-surface: #1f1a38;
    --color-border: #2f2950;
    --color-text: #f6f1ff;
    --color-muted: #a9a2c7;
    --color-primary: #a48cff;
    --color-primary-hover: #bba8ff;
    --zn-ink: #f6f1ff;
    --zn-band: #6b46ff;
    --zn-shadow: #6b46ff;
    --zn-card: #1b1730;
    --zn-on-primary: #110e1f;
    --zn-dots: rgba(246, 241, 255, .07);
    --zn-code-bg: #0b0916;
  }
}

/* ---------- Base & Preflight repairs ---------- */
body {
  background-color: var(--color-bg);
  background-image: radial-gradient(var(--zn-dots) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
body ::selection { background: var(--zn-lime); color: #1a1530; }
body :focus-visible {
  outline: 3px dashed var(--color-primary);
  outline-offset: 3px;
  border-radius: 6px;
}
body h1, body h2, body h3, body h4, body h5 {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  line-height: var(--heading-line);
  letter-spacing: var(--heading-tracking);
  color: inherit;
}
body h1 { font-size: clamp(2.4rem, 6.5vw, var(--h1-size)); font-weight: 900; }
body h2 { font-size: clamp(1.75rem, 4vw, var(--h2-size)); }
body h3 { font-size: clamp(1.2rem, 2.4vw, var(--h3-size)); }
body a { color: var(--color-primary); text-underline-offset: .2em; }
body a:hover { color: var(--color-primary-hover); }
body img { max-width: 100%; height: auto; }

/* Small mono "chip": used for dates, eyebrows and tags. */
.zn-chip,
body .post-meta {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  width: fit-content;
  margin: 0;
  padding: .28rem .7rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--zn-ink);
  background: var(--zn-card);
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: 999px;
}
.zn-chip--lime { background: var(--zn-lime); color: #1a1530; }
.zn-chip--pink { background: var(--zn-pink); color: #1a1530; }
.zn-chip--sun { background: var(--zn-sun); color: #1a1530; }

/* ---------- Header ---------- */
body .site-header {
  background: color-mix(in srgb, var(--color-bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: var(--zn-bw) solid var(--zn-ink);
}
body .site-header-inner { min-height: 72px; padding: 0 var(--zn-gutter); }
body .site-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -.03em;
  color: var(--color-text);
  text-decoration: none;
}
body .site-brand-text::before {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: .55rem;
  vertical-align: -.28em;
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: 8px;
  background: conic-gradient(from 210deg, var(--color-primary), var(--zn-pink), var(--zn-sun), var(--zn-lime), var(--color-primary));
  box-shadow: 2px 2px 0 var(--zn-shadow);
  transition: transform .5s var(--zn-ease);
}
body .site-brand:hover .site-brand-text::before { transform: rotate(180deg) scale(1.08); }

body .jf-nav--horizontal { gap: .25rem; }
body .jf-nav__link {
  font-weight: 650;
  font-size: .95rem;
  color: var(--color-text);
  border: var(--zn-bw) solid transparent;
  border-radius: 999px;
  padding: .4rem .9rem;
  text-decoration: none;
  transition: background .15s, border-color .15s, transform .2s var(--zn-ease);
}
body .jf-nav__link:hover {
  background: var(--zn-lime);
  border-color: var(--zn-ink);
  color: #1a1530;
  transform: rotate(-2deg);
}
body .jf-nav__link[aria-current="page"],
body .jf-nav__item.is-current > .jf-nav__row > .jf-nav__link {
  background: var(--zn-card);
  border-color: var(--zn-ink);
  box-shadow: 2px 2px 0 var(--zn-shadow);
}
body .jf-nav__submenu {
  background: var(--zn-card);
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: var(--radius-md);
  box-shadow: var(--zn-lift) var(--zn-lift) 0 var(--zn-shadow);
}
body .jf-nav__toggle {
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: 12px;
  background: var(--zn-card);
  color: var(--color-text);
  box-shadow: 2px 2px 0 var(--zn-shadow);
}

/* ---------- Buttons ---------- */
body .btn,
body .jf-comments__submit,
body .jf-form button[type="submit"],
body .jf-search button {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -.01em;
  padding: .8rem 1.5rem;
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--zn-shadow);
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s var(--zn-ease), box-shadow .18s var(--zn-ease), background .15s;
}
body .btn:hover,
body .jf-comments__submit:hover,
body .jf-form button[type="submit"]:hover,
body .jf-search button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--zn-shadow);
}
body .btn:active,
body .jf-comments__submit:active,
body .jf-form button[type="submit"]:active,
body .jf-search button:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--zn-shadow);
}
body .btn--primary,
body .jf-comments__submit,
body .jf-form button[type="submit"],
body .jf-search button { background: var(--color-primary); color: var(--zn-on-primary); }
body .btn--primary:hover { background: var(--color-primary-hover); color: var(--zn-on-primary); }
body .btn--secondary { background: var(--zn-lime); color: #1a1530; }
body .btn--secondary:hover { background: var(--zn-lime); color: #1a1530; }
body .btn--outline { background: var(--zn-card); color: var(--color-text); }
body .btn--outline:hover { background: var(--zn-card); color: var(--color-text); }

/* ---------- Inputs ---------- */
body .jf-form__field input,
body .jf-form__field textarea,
body .jf-form__field select,
body .jf-comments__field input,
body .jf-comments__field textarea,
body .jf-search input {
  font: inherit;
  color: var(--color-text);
  background: var(--zn-card);
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: 14px;
  padding: .75rem 1rem;
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--zn-ink) 8%, transparent);
}
body .jf-form__field input:focus,
body .jf-form__field textarea:focus,
body .jf-comments__field input:focus,
body .jf-comments__field textarea:focus,
body .jf-search input:focus {
  outline: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 30%, transparent);
}

/* ---------- Hero ---------- */
body .jf-hero.zn-hero {
  position: relative;
  padding: clamp(4.5rem, 11vw, 8.5rem) var(--zn-gutter) clamp(4rem, 9vw, 7rem);
  background: transparent;
  border-bottom: var(--zn-bw) solid var(--zn-ink);
  overflow: hidden;
  isolation: isolate;
}
body .jf-hero.zn-hero::before {
  inset: -10%;
  z-index: -1;
  background:
    radial-gradient(38% 46% at 12% 20%, color-mix(in srgb, var(--color-primary) 32%, transparent), transparent 70%),
    radial-gradient(30% 40% at 88% 18%, color-mix(in srgb, var(--zn-pink) 45%, transparent), transparent 70%),
    radial-gradient(34% 44% at 72% 92%, color-mix(in srgb, var(--zn-lime) 55%, transparent), transparent 70%);
  filter: blur(8px);
  animation: zn-drift 18s ease-in-out infinite alternate;
}
/* Decorative sparkle sticker. */
body .jf-hero.zn-hero::after {
  content: "";
  position: absolute;
  right: clamp(1rem, 8vw, 9rem);
  top: clamp(2rem, 9vw, 6rem);
  width: clamp(64px, 9vw, 120px);
  aspect-ratio: 1;
  background: var(--zn-sun);
  border: var(--zn-bw) solid var(--zn-ink);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: zn-spin 24s linear infinite;
  z-index: -1;
}
body .zn-hero .jf-hero__inner { max-width: var(--max-width-wide); margin: 0 auto; }
@media (max-width: 640px) {
  body .jf-hero.zn-hero::after { top: .9rem; right: .9rem; width: 44px; }
}
body .zn-hero.jf-hero--align-center .jf-hero__inner { max-width: 900px; }
body .zn-hero .jf-hero__heading {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 8.5vw, 6.2rem);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.045em;
  max-width: 14ch;
  margin: 0 0 1.5rem;
  color: var(--color-text);
}
body .zn-hero.jf-hero--align-center .jf-hero__heading { margin-left: auto; margin-right: auto; }
body .zn-hero .jf-hero__sub {
  font-size: clamp(1.1rem, 2.1vw, 1.35rem);
  color: var(--color-muted);
  max-width: 34rem;
  margin-bottom: 2.25rem;
}

@keyframes zn-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(3%, -4%, 0) scale(1.08); }
}
@keyframes zn-spin { to { transform: rotate(360deg); } }
@keyframes zn-marquee { to { transform: translateX(-50%); } }
@keyframes zn-wiggle {
  0%, 100% { transform: rotate(-1.2deg); }
  50% { transform: rotate(1.2deg); }
}

/* ---------- Marquee band ---------- */
.zn-marquee {
  overflow: hidden;
  background: var(--zn-band);
  color: #fff;
  border-bottom: var(--zn-bw) solid var(--zn-ink);
  padding: .85rem 0;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1rem, 2vw, 1.25rem);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.zn-marquee__track {
  display: inline-flex;
  gap: 2rem;
  padding-right: 2rem;
  animation: zn-marquee 32s linear infinite;
}
.zn-marquee__track span { display: inline-flex; align-items: center; gap: 2rem; }
.zn-marquee__track span::after { content: "✦"; color: var(--zn-lime); }
.zn-marquee:hover .zn-marquee__track { animation-play-state: paused; }

/* ---------- Section heads ---------- */
.zn-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin: 0 0 2.25rem;
}
.zn-section-head h2 { margin: .7rem 0 0; }
.zn-section-head p { margin: 0; color: var(--color-muted); max-width: 30rem; }
.zn-hl {
  background: linear-gradient(transparent 58%, var(--zn-lime) 58%, var(--zn-lime) 92%, transparent 92%);
  padding: 0 .08em;
  color: inherit;
}
html[data-theme="dark"] .zn-hl { color: #1a1530; background: var(--zn-lime); border-radius: 6px; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) .zn-hl { color: #1a1530; background: var(--zn-lime); border-radius: 6px; }
}

/* ---------- Post list (cards) ---------- */
body .post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
body .post-list-item {
  --zn-accent: var(--zn-lime);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: 1.25rem 1.25rem 1.4rem;
  background: var(--zn-card);
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--zn-lift) var(--zn-lift) 0 var(--zn-shadow);
  transition: transform .25s var(--zn-ease), box-shadow .25s var(--zn-ease);
}
body .post-list-item:last-child { border-bottom: var(--zn-bw) solid var(--zn-ink); }
body .post-list-item:nth-child(5n + 2) { --zn-accent: var(--zn-pink); }
body .post-list-item:nth-child(5n + 3) { --zn-accent: var(--zn-sky); }
body .post-list-item:nth-child(5n + 4) { --zn-accent: var(--zn-sun); }
body .post-list-item:nth-child(5n + 5) { --zn-accent: var(--zn-coral); }
body .post-list-item:hover {
  transform: translate(-3px, -3px) rotate(-.6deg);
  box-shadow: calc(var(--zn-lift) + 4px) calc(var(--zn-lift) + 4px) 0 var(--zn-shadow);
}
body .post-list-item:nth-child(even):hover { transform: translate(-3px, -3px) rotate(.6deg); }

body .post-thumb {
  display: block;
  order: -1;
  margin: -1.25rem -1.25rem .35rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: var(--zn-bw) solid var(--zn-ink);
  border-radius: calc(var(--radius-lg) - 3px) calc(var(--radius-lg) - 3px) 0 0;
  background: var(--zn-accent);
}
body .post-thumb img,
body .post-thumb picture img {
  display: block;
  width: 100%;
  height: calc(100% + 1px);
  object-fit: cover;
  border-radius: 0;
  margin: 0;
  transition: transform .5s var(--zn-ease);
}
body .post-list-item:hover .post-thumb img { transform: scale(1.05); }
/* The site placeholder becomes a tinted, patterned tile. */
body .post-thumb img.jf-placeholder { mix-blend-mode: multiply; opacity: .35; }

body .post-list-item .post-title {
  order: 1;
  margin: .1rem 0 0;
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
}
body .post-list-item .post-title a { color: var(--color-text); text-decoration: none; }
/* Whole card is the click target. */
body .post-list-item .post-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
body .post-list-item .post-title a:hover { color: var(--color-text); }
body .post-list-item .post-meta { order: 0; background: var(--zn-accent); color: #1a1530; }
body .post-list-item .post-excerpt {
  order: 2;
  margin: 0;
  color: var(--color-muted);
  font-size: .98rem;
  line-height: 1.55;
}

body .post-list--grid { gap: 1.75rem; }
body .post-list--grid .post-list-item { padding: 1.25rem 1.25rem 1.4rem; border-bottom: var(--zn-bw) solid var(--zn-ink); }
body .post-list--grid .post-title { font-size: clamp(1.15rem, 2vw, 1.35rem); }

/* Stacked list layout: thumb beside the text on wide screens. */
@media (min-width: 760px) {
  body .post-list:not(.post-list--grid) .post-list-item {
    display: grid;
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    column-gap: 1.5rem;
    align-content: start;
  }
  body .post-list:not(.post-list--grid) .post-thumb {
    grid-row: 1 / span 3;
    margin: -1.25rem 0 -1.4rem -1.25rem;
    aspect-ratio: auto;
    min-height: 100%;
    border-bottom: 0;
    border-right: var(--zn-bw) solid var(--zn-ink);
    border-radius: calc(var(--radius-lg) - 3px) 0 0 calc(var(--radius-lg) - 3px);
  }
}

/* Optional: wrap a post list in a section with className "zn-feature-first"
   to make the newest post a double-width lead card. */
@media (min-width: 900px) {
  body .zn-feature-first .post-list--grid.post-list--cols-3 .post-list-item:first-child,
  body .zn-feature-first .post-list--grid.post-list--cols-4 .post-list-item:first-child {
    grid-column: span 2;
  }
  body .zn-feature-first .post-list--grid .post-list-item:first-child .post-title {
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    line-height: 1.05;
  }
  body .zn-feature-first .post-list--grid .post-list-item:first-child .post-thumb { aspect-ratio: 16 / 8.4; }
}
@media (max-width: 899px) {
  body .post-list--grid.post-list--cols-3,
  body .post-list--grid.post-list--cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  body .post-list--grid.post-list--cols-2,
  body .post-list--grid.post-list--cols-3,
  body .post-list--grid.post-list--cols-4 { grid-template-columns: 1fr; }
}

/* ---------- Pagination ---------- */
body .pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin: 3rem 0 0;
}
body .pagination a,
body .pagination span {
  min-width: 2.75rem;
  height: 2.75rem;
  display: inline-grid;
  place-items: center;
  padding: 0 .8rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-text);
  background: var(--zn-card);
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--zn-shadow);
  transition: transform .15s var(--zn-ease), box-shadow .15s var(--zn-ease);
}
body .pagination a:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--zn-shadow); background: var(--zn-lime); color: #1a1530; }
body .pagination .current { background: var(--color-primary); color: var(--zn-on-primary); }
body .pagination span:not(.current) { border-color: transparent; background: transparent; box-shadow: none; }

/* ---------- Single post ---------- */
body .site-main:not(.site-main--page) { padding: clamp(2.5rem, 7vw, 5rem) var(--zn-gutter) 5rem; }
body .site-main > .post-meta { margin-bottom: 1.25rem; background: var(--zn-lime); color: #1a1530; }
body .site-main > .post-title,
body .post-header h1 {
  font-size: clamp(2.3rem, 6vw, 3.9rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.04em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}
body .site-main > .post-excerpt {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.5;
  color: var(--color-muted);
  margin: 0 0 2.25rem;
  padding-left: 1rem;
  border-left: 4px solid var(--color-primary);
}
body .post-featured-image {
  margin: 0 0 2.75rem;
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--zn-shadow);
  transform: rotate(-.6deg);
}
body .post-featured-image img { display: block; width: 100%; border-radius: 0; margin: 0; }

body .site-main .block-content { font-size: 1.1rem; line-height: 1.78; }
body .block-content > * + * { margin-top: 1.25rem; }
body .site-main:not(.site-main--page) .block-content h2 {
  position: relative;
  margin: 3rem 0 1rem;
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
}
body .site-main:not(.site-main--page) .block-content h2::before {
  content: "#";
  position: absolute;
  right: 100%;
  margin-right: .35em;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--color-primary);
  opacity: .55;
}
@media (max-width: 860px) {
  body .site-main:not(.site-main--page) .block-content h2::before { position: static; margin-right: .3em; }
}
body .block-content h3 { margin: 2.25rem 0 .75rem; }
body .site-main:not(.site-main--page) .block-content a:not(.btn) {
  color: inherit;
  text-decoration: underline wavy var(--color-primary);
  text-decoration-thickness: 1.5px;
  text-underline-offset: .28em;
  transition: background .15s;
}
body .site-main:not(.site-main--page) .block-content a:not(.btn):hover { background: color-mix(in srgb, var(--zn-lime) 70%, transparent); color: #1a1530; }
body .site-main:not(.site-main--page) .block-content ul li::marker { color: var(--color-primary); content: "→  "; font-weight: 800; }
body .site-main:not(.site-main--page) .block-content ol li::marker { color: var(--color-primary); font-family: var(--font-mono); font-weight: 700; }
body .block-content li + li { margin-top: .35rem; }
body .block-content img,
body .block-content picture img {
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: var(--radius-md);
}
body .block-content figcaption,
body .post-content figcaption { font-family: var(--font-mono); font-size: .8rem; color: var(--color-muted); text-align: center; }

/* Sticky-note quotes */
body blockquote {
  position: relative;
  margin: 2.5rem 0;
  padding: 1.75rem 1.75rem 1.5rem;
  background: var(--zn-sun);
  color: #1a1530;
  border: var(--zn-bw) solid var(--zn-ink);
  border-left-width: var(--zn-bw);
  border-radius: 6px 6px 22px 6px;
  box-shadow: 6px 6px 0 var(--zn-shadow);
  transform: rotate(-1deg);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.45;
  font-style: normal;
}
body blockquote::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 84px;
  height: 22px;
  translate: -50% 0;
  rotate: 3deg;
  background: color-mix(in srgb, var(--zn-sky) 75%, transparent);
  border: 1px solid color-mix(in srgb, #1a1530 25%, transparent);
}
body blockquote p { margin: 0; }
body blockquote cite {
  display: block;
  margin-top: .9rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 600;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: .04em;
}
body blockquote cite::before { content: "— "; }
body blockquote a { color: inherit; }

/* Terminal-window code blocks */
body pre,
body .block-content pre {
  position: relative;
  margin: 2rem 0;
  padding: 2.9rem 1.4rem 1.4rem;
  background: var(--zn-code-bg);
  color: var(--zn-code-fg);
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: var(--radius-md);
  box-shadow: 6px 6px 0 var(--color-primary);
  font-family: var(--font-mono);
  font-size: .9rem;
  line-height: 1.65;
  overflow-x: auto;
}
body pre::before {
  content: "";
  position: absolute;
  top: 1rem;
  left: 1.1rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 20px 0 0 #febc2e, 40px 0 0 #28c840;
}
body pre code { background: none; color: inherit; padding: 0; border: 0; font-size: inherit; }
body :not(pre) > code {
  font-family: var(--font-mono);
  font-size: .86em;
  padding: .12em .45em;
  background: var(--color-surface);
  color: var(--color-primary);
  border: 1.5px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
  border-radius: 7px;
}

/* Squiggle divider */
body hr {
  height: 14px;
  margin: 3rem auto;
  max-width: 220px;
  border: 0;
  background-color: var(--color-primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='14' viewBox='0 0 40 14'%3E%3Cpath d='M0 7 Q10 0 20 7 T40 7' fill='none' stroke='black' stroke-width='3'/%3E%3C/svg%3E") repeat-x center / 40px 14px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='14' viewBox='0 0 40 14'%3E%3Cpath d='M0 7 Q10 0 20 7 T40 7' fill='none' stroke='black' stroke-width='3'/%3E%3C/svg%3E") repeat-x center / 40px 14px;
}

body table { width: 100%; border-collapse: separate; border-spacing: 0; border: var(--zn-bw) solid var(--zn-ink); border-radius: var(--radius-md); overflow: hidden; font-size: .95rem; }
body th { background: var(--color-surface); font-family: var(--font-heading); text-align: left; }
body th, body td { padding: .7rem .9rem; border-bottom: 1.5px solid var(--color-border); }
body tr:last-child td { border-bottom: 0; }

/* ---------- "Keep reading" & author box ---------- */
.zn-endnote {
  margin: 4rem 0 0;
  padding: 1.5rem 1.6rem;
  display: flex;
  gap: 1.1rem;
  align-items: center;
  background: var(--color-surface);
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--zn-lift) var(--zn-lift) 0 var(--zn-shadow);
}
.zn-endnote__mark {
  flex: none;
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: var(--zn-lime);
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: 50%;
  animation: zn-wiggle 3s ease-in-out infinite;
}
.zn-endnote p { margin: 0; }
.zn-endnote strong { font-family: var(--font-heading); font-size: 1.1rem; }

/* ---------- Sections, CTA, features ---------- */
body .jf-section--bg-muted { background: var(--color-surface); }
body .jf-section--bg-primary { background: var(--color-primary); color: var(--zn-on-primary); }
body .jf-section--bg-primary a:not(.btn) { color: inherit; }
body .jf-section--bg-dark { background: #16122b; color: #f6f1ff; }
body .jf-section--bg-dark a:not(.btn) { color: var(--zn-lime); }
body .jf-section--bg-gradient {
  background: linear-gradient(120deg, color-mix(in srgb, var(--color-primary) 22%, var(--color-bg)), color-mix(in srgb, var(--zn-pink) 26%, var(--color-bg)) 55%, color-mix(in srgb, var(--zn-lime) 30%, var(--color-bg)));
}

body .jf-cta {
  position: relative;
  max-width: calc(var(--max-width-wide) - 2 * var(--zn-gutter));
  margin: clamp(2rem, 6vw, 4.5rem) auto;
  padding: clamp(2.75rem, 7vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: calc(var(--radius-lg) + 8px);
  box-shadow: 8px 8px 0 var(--zn-shadow);
  overflow: hidden;
  isolation: isolate;
}
@media (max-width: 1260px) { body .jf-cta { margin-left: var(--zn-gutter); margin-right: var(--zn-gutter); } }
body .jf-cta--primary { background: var(--color-primary); color: var(--zn-on-primary); }
body .jf-cta--primary .jf-cta__text { color: color-mix(in srgb, var(--zn-on-primary) 82%, transparent); }
body .jf-cta--primary .jf-cta__btn { background: var(--zn-lime); color: #1a1530; }
body .jf-cta--dark { background: #16122b; color: #f6f1ff; }
body .jf-cta--dark .jf-cta__text { color: rgba(246, 241, 255, .76); }
body .jf-cta--dark .jf-cta__btn { background: var(--zn-lime); color: #1a1530; box-shadow: 4px 4px 0 var(--color-primary); }
body .jf-cta::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 260px;
  aspect-ratio: 1;
  right: -70px;
  top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--zn-pink), transparent 68%);
  opacity: .55;
}
body .jf-cta__heading { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 900; letter-spacing: -.035em; }
body .jf-cta__text { font-size: 1.1rem; }

body .jf-features__heading { font-family: var(--font-heading); font-weight: 900; }
body .jf-feature {
  text-align: left;
  background: var(--zn-card);
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--zn-lift) var(--zn-lift) 0 var(--zn-shadow);
}
body .jf-feature:hover { transform: translate(-3px, -3px); box-shadow: calc(var(--zn-lift) + 3px) calc(var(--zn-lift) + 3px) 0 var(--zn-shadow); }
body .jf-feature__icon {
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: var(--zn-lime);
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: 14px;
}
body .jf-feature:nth-child(3n + 2) .jf-feature__icon { background: var(--zn-pink); }
body .jf-feature:nth-child(3n + 3) .jf-feature__icon { background: var(--zn-sky); }
body .jf-feature__title { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 800; }

/* ---------- Comments & search ---------- */
body .jf-comments {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: var(--zn-bw) dashed var(--zn-ink);
}
body .jf-comment {
  background: var(--zn-card);
  border: var(--zn-bw) solid var(--zn-ink);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
}
body .jf-search { display: flex; gap: .6rem; flex-wrap: wrap; }
body .jf-search input { flex: 1 1 14rem; }

/* ---------- Statement (404, about) ---------- */
.zn-statement { text-align: center; }
.zn-statement__big {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(6rem, 22vw, 13rem);
  font-weight: 900;
  line-height: .85;
  letter-spacing: -.06em;
  color: var(--color-primary);
  -webkit-text-stroke: var(--zn-bw) var(--zn-ink);
  text-shadow: 7px 7px 0 var(--zn-lime);
  margin-bottom: 1.25rem;
}
.zn-statement h1, .zn-statement h2 { margin: 0 0 .75rem; }
.zn-statement p { color: var(--color-muted); font-size: 1.15rem; max-width: 32rem; margin: 0 auto 2rem; }

/* ---------- Footer ---------- */
body .site-footer {
  background: #16122b;
  color: #f6f1ff;
  border-top: var(--zn-bw) solid var(--zn-ink);
  padding: 0;
  text-align: left;
  font-size: 1rem;
}
body .site-footer a { color: #f6f1ff; }
.zn-footer { max-width: var(--max-width-wide); margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) var(--zn-gutter) 2rem; }
.zn-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
}
.zn-footer__brand {
  display: block;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 4.75rem);
  line-height: .9;
  letter-spacing: -.05em;
  margin: 0 0 1rem;
}
.zn-footer__brand span { color: var(--zn-lime); }
.zn-footer__top p { color: rgba(246, 241, 255, .7); max-width: 26rem; margin: 0; }
.zn-footer h4 {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--zn-pink);
}
.zn-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
body .zn-footer ul a { text-decoration: none; font-weight: 600; }
body .zn-footer ul a:hover { color: var(--zn-lime); text-decoration: underline wavy; text-underline-offset: .3em; }
.zn-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 2rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1.5px dashed rgba(246, 241, 255, .22);
  font-family: var(--font-mono);
  font-size: .8rem;
  color: rgba(246, 241, 255, .6);
}
.zn-footer__base p { margin: 0; }
@media (max-width: 760px) {
  .zn-footer__top { grid-template-columns: 1fr 1fr; }
  .zn-footer__top > :first-child { grid-column: 1 / -1; }
}

/* ---------- Colour-scheme toggle ---------- */
body .jf-color-scheme {
  --jf-color-scheme-bg: var(--zn-card);
  --jf-color-scheme-border: var(--zn-ink);
  --jf-color-scheme-active-bg: var(--zn-lime);
  --jf-color-scheme-active-fg: #1a1530;
  --jf-color-scheme-active-border: var(--zn-ink);
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  body *, body *::before, body *::after {
    animation: none !important;
    transition: none !important;
  }
  body .post-list-item:hover,
  body .post-featured-image,
  body blockquote { transform: none; }
}


:root {
  --color-primary: #6b46ff;
  --color-primary-hover: #5530f0;
  --color-bg: #fff7ec;
  --color-surface: #f3ecff;
  --color-text: #1a1530;
  --color-muted: #605a78;
  --color-border: #e7dccb;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --max-width: 740px;
  --max-width-wide: 1200px;
  --font-heading: ui-rounded, "SF Pro Rounded", Nunito, Quicksand, "Varela Round", system-ui, -apple-system, sans-serif;
  --heading-weight: 800;
  --heading-line: 1.05;
  --heading-tracking: -0.03em;
  --h1-size: 4rem;
  --h2-size: 2.4rem;
  --h3-size: 1.5rem;
  --space-unit-base: 8px;
  --block-gap: 1.5rem;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.06);
  --shadow-md: 0 8px 24px rgba(15,23,42,0.08);
  --jf-sidebar-width: 288px;
  --jf-widget-gap: 32px;
  --base-font-size: 16px;
}

html { font-size: 16px; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
    --color-primary: #a48cff;
    --color-primary-hover: #bba8ff;
    --color-bg: #110e1f;
    --color-surface: #1f1a38;
    --color-text: #f6f1ff;
    --color-muted: #a9a2c7;
    --color-border: #2f2950;
  }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --color-primary: #a48cff;
  --color-primary-hover: #bba8ff;
  --color-bg: #110e1f;
  --color-surface: #1f1a38;
  --color-text: #f6f1ff;
  --color-muted: #a9a2c7;
  --color-border: #2f2950;
}


/* Block animations */
.jf-anim {
  --jf-anim-duration: 0.6s;
  --jf-anim-delay: 0s;
  animation-duration: var(--jf-anim-duration);
  animation-delay: var(--jf-anim-delay);
  animation-fill-mode: backwards;
  animation-timing-function: ease-out;
}
.jf-anim-ease-ease-in { animation-timing-function: ease-in; }
.jf-anim-ease-ease-in-out { animation-timing-function: ease-in-out; }
.jf-anim-ease-linear { animation-timing-function: linear; }
.jf-anim-ease-spring { animation-timing-function: cubic-bezier(0.22, 1.2, 0.36, 1); }

.jf-anim--wait.jf-anim-e-fade { opacity: 0; }
.jf-anim--wait.jf-anim-e-fade-up { opacity: 0; transform: translate3d(0, 28px, 0); }
.jf-anim--wait.jf-anim-e-fade-down { opacity: 0; transform: translate3d(0, -28px, 0); }
.jf-anim--wait.jf-anim-e-fade-left { opacity: 0; transform: translate3d(28px, 0, 0); }
.jf-anim--wait.jf-anim-e-fade-right { opacity: 0; transform: translate3d(-28px, 0, 0); }
.jf-anim--wait.jf-anim-e-slide-up { transform: translate3d(0, 48px, 0); }
.jf-anim--wait.jf-anim-e-slide-down { transform: translate3d(0, -48px, 0); }
.jf-anim--wait.jf-anim-e-slide-left { transform: translate3d(48px, 0, 0); }
.jf-anim--wait.jf-anim-e-slide-right { transform: translate3d(-48px, 0, 0); }
.jf-anim--wait.jf-anim-e-zoom-in { opacity: 0; transform: scale(0.92); }
.jf-anim--wait.jf-anim-e-zoom-out { opacity: 0; transform: scale(1.08); }
.jf-anim--wait.jf-anim-e-bounce { opacity: 0; transform: translate3d(0, 40px, 0); }
.jf-anim--wait.jf-anim-e-flip-x { opacity: 0; transform: perspective(900px) rotateX(70deg); }
.jf-anim--wait.jf-anim-e-flip-y { opacity: 0; transform: perspective(900px) rotateY(70deg); }
.jf-anim--wait.jf-anim-e-rotate { opacity: 0; transform: rotate(-12deg); }
.jf-anim--wait.jf-anim-e-blur { opacity: 0; filter: blur(12px); }

.jf-anim--play.jf-anim-e-fade { animation-name: jf-anim-fade; }
.jf-anim--play.jf-anim-e-fade-up { animation-name: jf-anim-fade-up; }
.jf-anim--play.jf-anim-e-fade-down { animation-name: jf-anim-fade-down; }
.jf-anim--play.jf-anim-e-fade-left { animation-name: jf-anim-fade-left; }
.jf-anim--play.jf-anim-e-fade-right { animation-name: jf-anim-fade-right; }
.jf-anim--play.jf-anim-e-slide-up { animation-name: jf-anim-slide-up; }
.jf-anim--play.jf-anim-e-slide-down { animation-name: jf-anim-slide-down; }
.jf-anim--play.jf-anim-e-slide-left { animation-name: jf-anim-slide-left; }
.jf-anim--play.jf-anim-e-slide-right { animation-name: jf-anim-slide-right; }
.jf-anim--play.jf-anim-e-zoom-in { animation-name: jf-anim-zoom-in; }
.jf-anim--play.jf-anim-e-zoom-out { animation-name: jf-anim-zoom-out; }
.jf-anim--play.jf-anim-e-bounce { animation-name: jf-anim-bounce; }
.jf-anim--play.jf-anim-e-flip-x { animation-name: jf-anim-flip-x; }
.jf-anim--play.jf-anim-e-flip-y { animation-name: jf-anim-flip-y; }
.jf-anim--play.jf-anim-e-rotate { animation-name: jf-anim-rotate; }
.jf-anim--play.jf-anim-e-blur { animation-name: jf-anim-blur; }

@keyframes jf-anim-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes jf-anim-fade-up { from { opacity: 0; transform: translate3d(0, 28px, 0); } to { opacity: 1; transform: none; } }
@keyframes jf-anim-fade-down { from { opacity: 0; transform: translate3d(0, -28px, 0); } to { opacity: 1; transform: none; } }
@keyframes jf-anim-fade-left { from { opacity: 0; transform: translate3d(28px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes jf-anim-fade-right { from { opacity: 0; transform: translate3d(-28px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes jf-anim-slide-up { from { transform: translate3d(0, 48px, 0); } to { transform: none; } }
@keyframes jf-anim-slide-down { from { transform: translate3d(0, -48px, 0); } to { transform: none; } }
@keyframes jf-anim-slide-left { from { transform: translate3d(48px, 0, 0); } to { transform: none; } }
@keyframes jf-anim-slide-right { from { transform: translate3d(-48px, 0, 0); } to { transform: none; } }
@keyframes jf-anim-zoom-in { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes jf-anim-zoom-out { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }
@keyframes jf-anim-bounce {
  from { opacity: 0; transform: translate3d(0, 40px, 0); }
  60% { opacity: 1; transform: translate3d(0, -8px, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes jf-anim-flip-x { from { opacity: 0; transform: perspective(900px) rotateX(70deg); } to { opacity: 1; transform: none; } }
@keyframes jf-anim-flip-y { from { opacity: 0; transform: perspective(900px) rotateY(70deg); } to { opacity: 1; transform: none; } }
@keyframes jf-anim-rotate { from { opacity: 0; transform: rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes jf-anim-blur { from { opacity: 0; filter: blur(12px); } to { opacity: 1; filter: none; } }

.jf-anim-h-grow,
.jf-anim-h-shrink,
.jf-anim-h-lift,
.jf-anim-h-glow,
.jf-anim-h-tilt,
.jf-anim-h-brighten,
.jf-anim-t-press,
.jf-anim-t-pulse {
  transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
}
@media (hover: hover) {
  .jf-anim-h-grow:hover { transform: scale(1.04); }
  .jf-anim-h-shrink:hover { transform: scale(0.97); }
  .jf-anim-h-lift:hover { transform: translate3d(0, -6px, 0); }
  .jf-anim-h-glow:hover { box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16); }
  .jf-anim-h-tilt:hover { transform: rotate(2deg); }
  .jf-anim-h-brighten:hover { filter: brightness(1.08); }
}
.jf-anim-t-press:active { transform: scale(0.97); }
.jf-anim-t-pulse:active { transform: scale(1.04); }

@media (prefers-reduced-motion: reduce) {
  .jf-anim,
  .jf-anim--wait,
  .jf-anim--play {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .jf-anim-h-grow:hover,
  .jf-anim-h-shrink:hover,
  .jf-anim-h-lift:hover,
  .jf-anim-h-tilt:hover,
  .jf-anim-t-press:active,
  .jf-anim-t-pulse:active {
    transform: none !important;
  }
}

/* Device visibility */
/* Per-element device visibility (data-jf-devices) */
@media (max-width: 600px) {
  [data-jf-devices]:not([data-jf-devices~="mobile"]) { display: none !important; }
}
@media (min-width: 601px) and (max-width: 1024px) {
  [data-jf-devices]:not([data-jf-devices~="tablet"]) { display: none !important; }
}
@media (min-width: 1025px) {
  [data-jf-devices]:not([data-jf-devices~="desktop"]) { display: none !important; }
}


/* Custom CSS */
/* Zine: topic grid (About page) */
.zn-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1.25rem; }
.zn-topics p { margin: 0; padding: 1.25rem 1.35rem; background: var(--zn-card); border: var(--zn-bw) solid var(--zn-ink); border-radius: var(--radius-lg); box-shadow: var(--zn-lift) var(--zn-lift) 0 var(--zn-shadow); transition: transform .2s var(--zn-ease), box-shadow .2s var(--zn-ease); }
.zn-topics p:hover { transform: translate(-3px, -3px) rotate(-.5deg); box-shadow: calc(var(--zn-lift) + 3px) calc(var(--zn-lift) + 3px) 0 var(--zn-shadow); }
body .zn-topics a { font-family: var(--font-heading); font-weight: 800; font-size: 1.2rem; color: var(--color-text); text-decoration: none; }
body .zn-topics a:hover { color: var(--color-primary); }
.zn-topics span { display: block; margin-top: .35rem; color: var(--color-muted); font-size: .95rem; line-height: 1.5; }
/* Zine: rhythm for stacked blocks inside page sections */
body .jf-section .jf-container > * + * { margin-top: 1rem; }
body .jf-section .jf-container > * + h2 { margin-top: 2.5rem; }
body .jf-section .jf-container > .btn { margin-top: 1.5rem; }
