/* ============================================================================
   ClickTools.app — Design System
   ----------------------------------------------------------------------------
   01. Design tokens (light + dark)
   02. Base & reset
   03. Global theme transition
   04. Utilities
   05. Header / navigation
   06. Theme toggle switch
   07. Hero
   08. Sections & section heads
   09. Article card grid (content hub)
   10. Split panels (tool directory + privacy protocol)
   11. About band
   12. Footer
   13. Page hero / article header
   14. Prose (long-form guides & policy pages)
   15. Endnote box & pager
   16. Motion & accessibility
   ========================================================================== */

/* ---------------------------------------------------------------------------
   01. DESIGN TOKENS
   All text colors verified ≥ 7:1 (WCAG AAA) against their surfaces.
   Accent hues (#2563EB / #3B82F6) are reserved for decorative UI (dots,
   rings, focus, bars); text-safe variants (--link, --tag) carry copy.
   -------------------------------------------------------------------------- */
:root {
  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo,
    Consolas, "Liberation Mono", monospace;

  /* Layout */
  --max-width: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --nav-height: 4.25rem;
  --prose-measure: 72ch;

  /* Spacing scale */
  --space-1: 0.375rem;
  --space-2: 0.625rem;
  --space-3: 0.875rem;
  --space-4: 1.25rem;
  --space-5: 1.75rem;
  --space-6: 2.5rem;
  --space-7: 3.5rem;
  --space-8: 5rem;

  /* Shape */
  --radius-sm: 4px;
  --radius-md: 6px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.44, 1);
  --dur-fast: 0.18s;
  --dur: 0.3s;

  /* Reading */
  --leading: 1.6;
  --tracking-head: -0.01em;
}

/* — Light theme (default) — */
:root,
html.light {
  color-scheme: light;
  --bg: #fafafa;                /* soft neutral off-white            */
  --surface: #ffffff;           /* surface containers                */
  --surface-2: #f4f4f5;         /* recessed surfaces (chips, tracks) */
  --text: #1a1a1a;              /* deep charcoal — never pure black  */
  --muted: #4b5563;             /* 7.2:1 on bg · 7.6:1 on surface    */
  --accent: #2563eb;            /* brand blue (decorative)           */
  --link: #1e40af;              /* 8.4:1 text-safe blue              */
  --link-strong: #1e3a8a;
  --emerald: #059669;           /* emerald accent (decorative)       */
  --tag: #065f46;               /* 7.4:1 text-safe emerald           */
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --code-bg: #f4f4f5;
  --header-bg: rgba(250, 250, 250, 0.8);
  --shadow: 0 1px 2px rgba(26, 26, 26, 0.04), 0 8px 24px -12px rgba(26, 26, 26, 0.1);
  --shadow-lift: 0 2px 4px rgba(26, 26, 26, 0.05), 0 18px 36px -18px rgba(26, 26, 26, 0.18);
  --btn-bg: #1e40af;
  --btn-bg-hover: #1e3a8a;
  --btn-fg: #ffffff;
  --focus-ring: #2563eb;
  --sel-bg: #2563eb;
  --sel-fg: #ffffff;
}

/* — Dark theme — */
html.dark {
  color-scheme: dark;
  --bg: #0f172a;                /* slate deep background             */
  --surface: #1e293b;           /* surface containers                */
  --surface-2: #243247;         /* recessed surfaces                 */
  --text: #f8fafc;              /* crisp readable light gray         */
  --muted: #b0becf;             /* 7.7:1 on surface · 9.5:1 on bg    */
  --accent: #3b82f6;            /* brand blue (decorative)           */
  --link: #93c5fd;              /* 8.1:1 text-safe blue              */
  --link-strong: #bfdbfe;
  --emerald: #10b981;           /* emerald accent (decorative)       */
  --tag: #6ee7b7;               /* 9.6:1 text-safe emerald           */
  --border: #293449;
  --border-strong: #3b4a63;
  --code-bg: #0b1424;
  --header-bg: rgba(15, 23, 42, 0.75);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.45);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.35), 0 18px 36px -18px rgba(0, 0, 0, 0.6);
  --btn-bg: #93c5fd;
  --btn-bg-hover: #bfdbfe;
  --btn-fg: #0f172a;
  --focus-ring: #60a5fa;
  --sel-bg: #93c5fd;
  --sel-fg: #0f172a;
}

/* ---------------------------------------------------------------------------
   02. BASE & RESET
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1.25rem);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--leading);
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  letter-spacing: var(--tracking-head);
  font-weight: 700;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

::selection {
  background: var(--sel-bg);
  color: var(--sel-fg);
}

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

/* ---------------------------------------------------------------------------
   03. GLOBAL THEME TRANSITION
   Smooth cross-fade whenever the .light / .dark class flips on <html>.
   Components that animate transforms re-declare full transition lists.
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  transition:
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    fill var(--dur) var(--ease),
    stroke var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    outline-color var(--dur) var(--ease);
}

/* ---------------------------------------------------------------------------
   04. UTILITIES
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -100vw;
  top: 0;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0 0 var(--radius-sm) 0;
}

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

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

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tag);
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--emerald);
}

/* ---------------------------------------------------------------------------
   05. HEADER / NAVIGATION
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  backdrop-filter: blur(12px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  height: var(--nav-height);
}

/* Brand lockup */
.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: var(--tracking-head);
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 1.3rem;
  height: 1.3rem;
  color: var(--accent);
  flex: none;
}

.brand-tld {
  color: var(--muted);
  font-weight: 500;
}

/* Centered symmetrical links */
.main-nav {
  justify-self: center;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.6vw, 2.4rem);
}

.main-nav a {
  position: relative;
  display: inline-block;
  padding: 0.4rem 0.1rem;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--muted);
}

.main-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition: right var(--dur-fast) var(--ease);
}

.main-nav a:hover::after {
  right: 0;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

/* Hamburger (mobile only) */
.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
}

.menu-toggle:active {
  transform: scale(0.96);
}

.mt-bar {
  width: 1.05rem;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform var(--dur-fast) var(--ease);
}

body.nav-open .mt-bar:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

body.nav-open .mt-bar:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-nav {
  display: none;
}

@media (max-width: 820px) {
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-nav {
    display: none;
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
    backdrop-filter: blur(12px) saturate(1.5);
    border-bottom: 1px solid var(--border);
  }

  body.nav-open .mobile-nav {
    display: block;
  }

  .mobile-nav ul {
    display: grid;
    gap: 0.15rem;
    padding: 0.6rem var(--gutter) 1rem;
  }

  .mobile-nav a {
    display: block;
    padding: 0.65rem 0.25rem;
    font-weight: 500;
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }

  .mobile-nav li:last-child a {
    border-bottom: none;
  }
}

/* ---------------------------------------------------------------------------
   06. THEME TOGGLE SWITCH
   Animated pill with sun / moon glyphs and a sliding thumb.
   -------------------------------------------------------------------------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
}

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

.theme-toggle:active {
  transform: scale(0.96);
}

.tt-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 3.1rem;
  height: 1.5rem;
  padding-inline: 0.24rem;
}

.tt-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 1.02rem;
  height: 1.02rem;
  color: var(--muted);
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease),
    transform 0.4s var(--ease-spring);
}

.tt-icon svg {
  width: 0.92rem;
  height: 0.92rem;
}

html:not(.dark) .tt-sun {
  color: var(--text);
}

html:not(.dark) .tt-moon {
  opacity: 0.55;
  transform: rotate(-30deg) scale(0.85);
}

html.dark .tt-moon {
  color: #ffffff;
}

html.dark .tt-sun {
  opacity: 0.55;
  transform: rotate(30deg) scale(0.85);
}

.tt-thumb {
  position: absolute;
  top: 50%;
  left: 0.12rem;
  width: 1.26rem;
  height: 1.26rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transform: translateY(-50%);
  transition: transform 0.4s var(--ease-spring), background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

html.dark .tt-thumb {
  transform: translateY(-50%) translateX(1.48rem);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 1px 6px rgba(59, 130, 246, 0.45);
}

/* ---------------------------------------------------------------------------
   07. HERO
   -------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(4.25rem, 10vw, 7.5rem) clamp(3.5rem, 8vw, 5.75rem);
  text-align: center;
}

.hero-inner {
  max-width: 58rem;
  margin-inline: auto;
}

.hero .eyebrow {
  justify-content: center;
}

.hero h1 {
  margin-top: var(--space-4);
  font-size: clamp(2.35rem, 1.6rem + 3.4vw, 3.75rem);
  font-weight: 800;
  letter-spacing: var(--tracking-head);
}

.hero-sub {
  max-width: 44rem;
  margin: var(--space-4) auto 0;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: var(--muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.875rem;
  margin-top: var(--space-6);
}

.hero-trust {
  margin-top: var(--space-5);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.78rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
}

.btn-primary:hover {
  background: var(--btn-bg-hover);
}

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--muted);
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ---------------------------------------------------------------------------
   08. SECTIONS & SECTION HEADS
   -------------------------------------------------------------------------- */
.section {
  padding-block: clamp(3rem, 7vw, 5.25rem);
}

.section-head {
  max-width: 46rem;
  margin-bottom: var(--space-6);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head.center .eyebrow {
  justify-content: center;
}

.section-head h2 {
  margin-top: var(--space-3);
  font-size: clamp(1.7rem, 1.4rem + 1.4vw, 2.3rem);
}

.section-lede {
  margin-top: var(--space-3);
  font-size: 1.02rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------------------
   09. ARTICLE CARD GRID — the AdSense content hub
   repeat(auto-fit, minmax(320px, 1fr)) keeps the matrix perfectly balanced:
   3 columns on desktop, 2 on tablet, 1 on mobile — always symmetric.
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: clamp(1.4rem, 2.4vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.card:hover {
  border-color: var(--border-strong);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
  transition: transform 0.25s var(--ease), border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.card-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--tag);
}

.card-tag::before {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--emerald);
}

.card-title {
  font-size: 1.22rem;
  line-height: 1.35;
}

.card-excerpt {
  flex-grow: 1;
  font-size: 0.95rem;
  color: var(--muted);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--link);
}

/* Stretched link — the whole card is one generous click target */
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card:hover .card-link {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.card-link .arrow {
  display: inline-block;
  transition: transform var(--dur-fast) var(--ease);
}

.card:hover .card-link .arrow {
  transform: translateX(4px);
}

/* ---------------------------------------------------------------------------
   10. SPLIT PANELS — tool directory + privacy protocol
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.panel h2 {
  font-size: 1.4rem;
  letter-spacing: var(--tracking-head);
}

.panel > p {
  font-size: 0.96rem;
  color: var(--muted);
}

.panel-note {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}

.panel-note a {
  font-weight: 600;
}

/* Subdomain chip array */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.72rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
}

.chip em {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tag);
}

.chip em::before {
  content: "";
  display: inline-block;
  width: 0.32rem;
  height: 0.32rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  background: var(--emerald);
  vertical-align: 1px;
}

/* Protocol checklist */
.check-list {
  display: grid;
  gap: 0.7rem;
}

.check-list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.96rem;
  color: var(--muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--emerald) 14%, transparent);
  background: var(--surface-2);
}

.check-list li::after {
  content: "";
  position: absolute;
  left: 0.32rem;
  top: 0.52em;
  width: 0.42rem;
  height: 0.22rem;
  border-left: 2px solid var(--tag);
  border-bottom: 2px solid var(--tag);
  transform: rotate(-45deg);
}

/* ---------------------------------------------------------------------------
   11. ABOUT BAND
   -------------------------------------------------------------------------- */
.about {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-grid h2 {
  margin-top: var(--space-3);
  font-size: clamp(1.5rem, 1.3rem + 1vw, 1.9rem);
}

.about-grid .about-copy p {
  margin-top: var(--space-3);
  font-size: 0.98rem;
  color: var(--muted);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 480px) {
  .stat-row {
    grid-template-columns: 1fr;
  }
}

.stat {
  padding: 1.15rem 0.75rem;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.stat b {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: var(--tracking-head);
  line-height: 1.2;
}

.stat span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------------------
   12. FOOTER — 4-column balanced compliance grid
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-block: clamp(2.75rem, 6vw, 4rem);
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-col h3 {
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-col ul {
  display: grid;
  gap: 0.55rem;
}

.footer-col a {
  font-size: 0.925rem;
  color: var(--muted);
}

.footer-col a:hover {
  color: var(--link);
}

.footer-brand p {
  margin-top: var(--space-3);
  max-width: 30ch;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-tools li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.footer-tools .soon {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tag);
  white-space: nowrap;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.3rem;
  border-top: 1px solid var(--border);
}

.footer-bottom p,
.footer-note {
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

.to-top {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.to-top:hover {
  color: var(--link);
}

/* ---------------------------------------------------------------------------
   13. PAGE HERO / ARTICLE HEADER
   -------------------------------------------------------------------------- */
.page-hero {
  padding: clamp(3rem, 6.5vw, 4.75rem) 0 clamp(1.75rem, 3.5vw, 2.75rem);
}

.crumbs {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crumbs > * + *::before {
  content: "/";
  margin: 0 0.6rem;
  color: var(--muted);
  font-weight: 400;
}

.crumbs a {
  color: var(--tag);
}

.crumbs a:hover {
  color: var(--link);
}

.crumbs .crumb-current {
  color: var(--muted);
}

.page-hero h1 {
  max-width: 24ch;
  margin-top: var(--space-4);
  font-size: clamp(1.95rem, 1.5rem + 2.2vw, 2.9rem);
  font-weight: 800;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0;
  margin-top: var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.article-meta span + span {
  margin-left: 1.4rem;
  padding-left: 1.4rem;
  border-left: 1px solid var(--border-strong);
}

/* ---------------------------------------------------------------------------
   14. PROSE — long-form guides & policy documents
   -------------------------------------------------------------------------- */
.prose {
  max-width: var(--prose-measure);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 5vw, 3.5rem) clamp(1.5rem, 3vw, 2rem);
  font-size: 1.0625rem;
}

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

.prose h2 {
  margin-top: 2.3em;
  font-size: 1.5rem;
  line-height: 1.3;
}

.prose h2::before {
  content: "";
  display: block;
  width: 1.75rem;
  height: 3px;
  margin-bottom: 0.85em;
  border-radius: 2px;
  background: var(--accent);
}

.prose h3 {
  margin-top: 1.9em;
  font-size: 1.18rem;
  line-height: 1.35;
}

.prose ul,
.prose ol {
  display: grid;
  gap: 0.45em;
  padding-left: 1.4rem;
}

.prose li::marker {
  color: var(--accent);
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent);
}

.prose a:hover {
  text-decoration-color: var(--link);
}

.prose strong {
  font-weight: 650;
  color: var(--text);
}

.prose blockquote {
  padding: 0.35em 0 0.35em 1.3em;
  border-left: 2px solid var(--accent);
  font-size: 1.02em;
  color: var(--muted);
}

.prose code {
  padding: 0.12em 0.38em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.84em;
  color: var(--text);
}

.prose pre {
  padding: 1rem 1.15rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  line-height: 1.55;
}

.prose pre code {
  padding: 0;
  background: none;
  border: none;
  font-size: 0.84rem;
}

.prose .table-wrap {
  overflow-x: auto;
}

.prose table {
  width: 100%;
  margin-block: 0.35em;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.prose th,
.prose td {
  padding: 0.62rem 0.85rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.prose thead th {
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Callout note */
.note {
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--emerald);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--muted);
}

.note strong,
.note b {
  color: var(--text);
}

/* ---------------------------------------------------------------------------
   15. ENDNOTE BOX & PAGER
   -------------------------------------------------------------------------- */
.endnote-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--prose-measure);
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.endnote-box p {
  font-size: 0.95rem;
  color: var(--muted);
}

.endnote-box p strong {
  color: var(--text);
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: var(--prose-measure);
  margin: 0 auto;
  padding-block: var(--space-6) var(--space-8);
}

@media (max-width: 640px) {
  .pager {
    grid-template-columns: 1fr;
  }
}

.pager a {
  display: block;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.pager a:hover {
  border-color: var(--border-strong);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  text-decoration: none;
}

.pager .pager-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.pager .pager-title {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.pager .pager-next {
  text-align: right;
}

/* ---------------------------------------------------------------------------
   16. MOTION & ACCESSIBILITY
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
