/* ============================================================
   XML Schemata 2026 — Design Tokens
   Geist-aligned monochrome system, light-only.
   ============================================================ */

:root {
  /* Surfaces */
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --bg-muted: #f5f5f5;
  --bg-emphasis: #ededed;

  /* Borders */
  --border: #ebebeb;
  --border-strong: #e0e0e0;

  /* Text */
  --text-primary: #0a0a0a;
  --text-secondary: #525252;
  --text-tertiary: #737373;
  --text-quaternary: #a3a3a3;
  --text-on-accent: #ffffff;

  /* Accent (single) */
  --accent: #0070f3;
  --accent-hover: #0761d1;
  --accent-bg: #f0f7ff;

  /* Semantic (used sparingly) */
  --warn: #f5a623;
  --warn-bg: #fff8eb;
  --danger: #e5484d;
  --success: #0f7c3a;

  /* Code */
  --code-bg: #fafafa;
  --code-text: #0a0a0a;
  --code-border: #ebebeb;

  /* Focus ring */
  --focus-ring: rgba(0, 112, 243, 0.4);

  /* Typography */
  --font-sans: 'Geist Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', 'Fira Code', ui-monospace, Menlo, monospace;

  /* Type scale (rem on 16px base) */
  --fs-display-xl: 4.5rem;   /* 72 */
  --fs-display-lg: 3.5rem;   /* 56 */
  --fs-display-md: 2.5rem;   /* 40 */
  --fs-display-sm: 2rem;     /* 32 */
  --fs-heading-lg: 1.5rem;   /* 24 */
  --fs-heading-md: 1.25rem;  /* 20 */
  --fs-heading-sm: 1.0625rem;/* 17 */
  --fs-body-lg: 1.1875rem;   /* 19 */
  --fs-body: 1.0625rem;      /* 17 */
  --fs-body-sm: 1rem;        /* 16 */
  --fs-meta: 0.875rem;       /* 14 */
  --fs-label: 0.75rem;       /* 12 */
  --fs-code-inline: 0.9375rem; /* 15 */
  --fs-code-block: 0.875rem;   /* 14 */

  /* Line heights */
  --lh-display: 1.05;
  --lh-display-sm: 1.2;
  --lh-heading: 1.3;
  --lh-body: 1.7;
  --lh-tight: 1.4;

  /* Letter spacing */
  --tracking-display-xl: -0.04em;
  --tracking-display-lg: -0.035em;
  --tracking-display-md: -0.03em;
  --tracking-display-sm: -0.025em;
  --tracking-heading: -0.015em;
  --tracking-label: 0.04em;

  /* Spacing scale (4px base) */
  --space-0: 0;
  --space-1: 0.125rem; /* 2 */
  --space-2: 0.25rem;  /* 4 */
  --space-3: 0.5rem;   /* 8 */
  --space-4: 0.75rem;  /* 12 */
  --space-5: 1rem;     /* 16 */
  --space-6: 1.25rem;  /* 20 */
  --space-7: 1.5rem;   /* 24 */
  --space-8: 2rem;     /* 32 */
  --space-9: 2.5rem;   /* 40 */
  --space-10: 3rem;    /* 48 */
  --space-12: 4rem;    /* 64 */
  --space-14: 5rem;    /* 80 */
  --space-16: 6rem;    /* 96 */
  --space-20: 8rem;    /* 128 */
  --space-24: 10rem;   /* 160 */

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* Container */
  --container: 1200px;
  --container-narrow: 720px;
  --container-wide: 1264px; /* 1024 + 240 toc */

  /* Transitions */
  --transition-fast: 100ms ease;
  --transition-base: 150ms ease;
  --transition-slow: 250ms ease;

  /* Z-index */
  --z-header: 40;
  --z-modal: 50;
  --z-toast: 60;
}
/* ============================================================
   Base / reset / fonts / typography defaults
   ============================================================ */

@font-face {
  font-family: 'Geist Sans';
  src: url('../fonts/Geist-Sans-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/Geist-Mono-Variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background: var(--bg);
  font-feature-settings: 'cv01', 'cv02', 'cv03', 'cv04', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
img { font-style: italic; background-repeat: no-repeat; background-size: cover; shape-margin: 1rem; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition-base);
}
a:hover { color: var(--accent-hover); }

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* Lists */
ul, ol { padding-left: 1.5em; margin: 0; }
li { margin-bottom: var(--space-3); }
li:last-child { margin-bottom: 0; }

/* Paragraphs */
p { margin: 0; }
p + p { margin-top: var(--space-5); }

/* Strong / em */
strong, b { font-weight: 600; }
em, i { font-style: italic; }

/* Code (inline) */
code, kbd, samp {
  font-family: var(--font-mono);
  font-size: var(--fs-code-inline);
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.125em 0.375em;
  color: var(--code-text);
}

pre {
  font-family: var(--font-mono);
  font-size: var(--fs-code-block);
  line-height: 1.6;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  overflow-x: auto;
  margin: 0;
}

pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: inherit;
}

/* Blockquote */
blockquote {
  margin: var(--space-7) 0;
  padding: var(--space-3) var(--space-7);
  border-left: 3px solid var(--text-quaternary);
  color: var(--text-secondary);
  font-style: italic;
}

/* HR */
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-12) 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-7) 0;
  font-size: var(--fs-body-sm);
}

th, td {
  text-align: left;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

thead th {
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-strong);
}

tbody tr:last-child td { border-bottom: none; }

/* Forms */
input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
  display: block;
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-base);
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-color: var(--accent);
}

button { cursor: pointer; border: none; background: none; padding: 0; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-toast);
}
.skip-link:focus {
  left: var(--space-5);
  top: var(--space-5);
  background: var(--text-primary);
  color: var(--text-on-accent);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  text-decoration: none;
}

/* Selection */
::selection { background: var(--accent); color: var(--text-on-accent); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visibility utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* ============================================================
   Layout — containers, grids, sections
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--space-7);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding-inline: var(--space-7);
}

@media (max-width: 640px) {
  .container, .container-narrow { padding-inline: var(--space-5); }
}

/* Section vertical rhythm */
.section {
  padding-block: var(--space-12);
}

.section-lg {
  padding-block: var(--space-16);
}

.section-hero {
  padding-block: var(--space-20) var(--space-16);
}

@media (max-width: 768px) {
  .section { padding-block: var(--space-10); }
  .section-lg { padding-block: var(--space-12); }
  .section-hero { padding-block: var(--space-12); }
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-7);
}

.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-cols-3, .grid-cols-2, .grid-cols-4 { grid-template-columns: 1fr; }
}

/* Stack utility */
.stack > * + * { margin-top: var(--space-5); }
.stack-lg > * + * { margin-top: var(--space-7); }
.stack-xl > * + * { margin-top: var(--space-10); }

/* Flex utility */
.row {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

/* Article + sidebar layout (TOC) */
.article-with-toc {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  max-width: var(--container-wide);
  margin: 0 auto;
  padding-inline: var(--space-7);
}

@media (min-width: 1280px) {
  .article-with-toc {
    grid-template-columns: minmax(0, 1fr) 240px;
    align-items: start;
  }
}
/* ============================================================
   Components — header, footer, cards, buttons, etc.
   ============================================================ */

/* ---------- Eyebrow / label ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  height: 40px;
  padding-inline: var(--space-5);
  font-family: var(--font-sans);
  font-size: var(--fs-meta);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--text-on-accent);
  border: 1px solid var(--text-primary);
}
.btn-primary:hover { background: #262626; border-color: #262626; color: var(--text-on-accent); }

.btn-ghost {
  background: var(--bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-subtle); border-color: var(--border-strong); color: var(--text-primary); }

.btn-sm { height: 32px; padding-inline: var(--space-4); font-size: var(--fs-label); }
.btn-lg { height: 48px; padding-inline: var(--space-7); font-size: var(--fs-body-sm); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--space-7);
}

.site-logo {
  font-family: var(--font-sans);
  font-size: var(--fs-heading-md);
  font-weight: 600;
  letter-spacing: var(--tracking-heading);
  color: var(--text-primary);
  text-decoration: none;
}
.site-logo:hover { color: var(--text-primary); }
.site-logo .dot { color: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-7);
}

.site-nav__link {
  font-size: var(--fs-meta);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-base);
}
.site-nav__link:hover, .site-nav__link.is-current { color: var(--text-primary); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-header__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: background var(--transition-base), color var(--transition-base);
}
.site-header__icon:hover { background: var(--bg-subtle); color: var(--text-primary); }

/* Mobile menu */
.site-nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .site-nav { display: none; }
  .site-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: var(--space-7);
    border-bottom: 1px solid var(--border);
    gap: var(--space-5);
  }
  .site-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: var(--space-16) var(--space-12);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--space-7);
}

@media (min-width: 1024px) {
  .hero__inner { grid-template-columns: 1.5fr 1fr; align-items: end; gap: var(--space-12); }
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, var(--fs-display-xl));
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display-xl);
  font-weight: 600;
  margin-top: var(--space-5);
  margin-bottom: var(--space-7);
}

.hero__dek {
  font-size: var(--fs-body-lg);
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 56ch;
  margin: 0;
}

.hero__featured {
  align-self: end;
}

/* ---------- Article card ---------- */
.article-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-7);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-base), border-color var(--transition-base);
  height: 100%;
}

.article-card:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  color: inherit;
}

.article-card__category {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--text-secondary);
}

.article-card__title {
  font-size: var(--fs-heading-sm);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-heading);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.article-card__excerpt {
  font-size: var(--fs-meta);
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__meta {
  margin-top: auto;
  padding-top: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-label);
  color: var(--text-tertiary);
}

.article-card__meta__separator {
  width: 3px;
  height: 3px;
  background: var(--text-quaternary);
  border-radius: 50%;
}

/* ---------- Tool card ---------- */
.tool-card {
  display: block;
  padding: var(--space-8);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-base), border-color var(--transition-base);
}

.tool-card:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  color: inherit;
}

.tool-card__name {
  font-size: var(--fs-heading-lg);
  font-weight: 600;
  letter-spacing: var(--tracking-heading);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.tool-card__tagline {
  font-size: var(--fs-body-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
  line-height: 1.55;
}

.tool-card__cta {
  font-size: var(--fs-meta);
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.tool-card:hover .tool-card__cta { color: var(--accent-hover); }

/* ---------- Tag/category badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--text-secondary);
  text-decoration: none;
  transition: background var(--transition-base);
}

.badge:hover { background: var(--bg-emphasis); color: var(--text-primary); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--space-20);
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
}

.site-footer__main {
  padding-block: var(--space-12) var(--space-8);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.site-footer__column-title {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--text-tertiary);
  margin: 0 0 var(--space-5) 0;
}

.site-footer__brand-name {
  font-size: var(--fs-heading-md);
  font-weight: 600;
  letter-spacing: var(--tracking-heading);
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}
.site-footer__brand-name .dot { color: var(--accent); }

.site-footer__brand-tagline {
  font-size: var(--fs-meta);
  color: var(--text-secondary);
  max-width: 36ch;
  line-height: 1.55;
}

.site-footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.site-footer__list li { margin: 0; }

.site-footer__list a {
  font-size: var(--fs-meta);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-base);
}

.site-footer__list a:hover { color: var(--text-primary); text-decoration: underline; }

.site-footer__bottom {
  padding-block: var(--space-7);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-5);
  font-size: var(--fs-label);
  color: var(--text-tertiary);
}

/* ---------- Article (single post) ---------- */
.article-header {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: var(--space-16) var(--space-7) var(--space-10);
}

.article-header__category {
  margin-bottom: var(--space-5);
}

.article-header__title {
  font-size: clamp(2rem, 5vw, var(--fs-display-lg));
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display-lg);
  font-weight: 600;
  margin: 0 0 var(--space-7) 0;
}

.article-header__dek {
  font-size: var(--fs-body-lg);
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.article-header__byline {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-10);
  padding-top: var(--space-7);
  border-top: 1px solid var(--border);
}

.byline__avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 500;
  color: var(--text-secondary);
}

.byline__name {
  font-size: var(--fs-meta);
  font-weight: 600;
  color: var(--text-primary);
}

.byline__meta {
  font-size: var(--fs-label);
  color: var(--text-tertiary);
}

/* Article body — content prose */
.prose {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-7) var(--space-12);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-primary);
}

.prose > * + * { margin-top: var(--space-7); }

.prose h2 {
  font-size: var(--fs-display-sm);
  line-height: var(--lh-display-sm);
  letter-spacing: var(--tracking-display-sm);
  font-weight: 600;
  margin-top: var(--space-12);
  margin-bottom: var(--space-5);
  scroll-margin-top: 80px;
}

.prose h3 {
  font-size: var(--fs-heading-lg);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-heading);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  scroll-margin-top: 80px;
}

.prose h4 {
  font-size: var(--fs-heading-md);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

.prose img, .prose figure { margin: var(--space-8) 0; }
.prose figure img { border-radius: var(--radius-md); border: 1px solid var(--border); }
.prose figcaption {
  margin-top: var(--space-3);
  font-size: var(--fs-meta);
  color: var(--text-tertiary);
  text-align: center;
}

.prose ul, .prose ol {
  padding-left: 1.5em;
}
.prose ul li::marker { color: var(--text-quaternary); }

.prose blockquote {
  font-size: var(--fs-body-lg);
  font-style: italic;
  color: var(--text-secondary);
  border-left: 3px solid var(--text-quaternary);
  padding-left: var(--space-7);
  margin-left: 0;
}

/* Inline callouts via .wp-block-quote variants or custom classes */
.callout {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--accent-bg);
  margin: var(--space-7) 0;
}
.callout--warn { border-left-color: var(--warn); background: var(--warn-bg); }
.callout--success { border-left-color: var(--success); }
.callout__title { font-weight: 600; margin-bottom: var(--space-2); }

/* Author block at end of article */
.author-block {
  max-width: var(--container-narrow);
  margin: var(--space-16) auto 0;
  padding: var(--space-8);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.author-block__row { display: flex; align-items: flex-start; gap: var(--space-5); }
.author-block__avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--fs-heading-md);
  font-weight: 500;
  color: var(--text-secondary);
}
.author-block__name { font-size: var(--fs-heading-md); font-weight: 600; margin-bottom: var(--space-2); }
.author-block__bio { font-size: var(--fs-meta); color: var(--text-secondary); line-height: 1.55; }

/* ---------- TOC ---------- */
.toc {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: var(--space-3);
}

.toc__heading {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--text-tertiary);
  margin: 0 0 var(--space-5) 0;
}

.toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.toc__list li { margin: 0; }

.toc__list a {
  display: block;
  padding-left: var(--space-3);
  border-left: 2px solid transparent;
  font-size: var(--fs-meta);
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--transition-base), border-color var(--transition-base);
}

.toc__list a:hover { color: var(--text-secondary); }
.toc__list a.is-active { color: var(--text-primary); border-left-color: var(--accent); }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-12);
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding-inline: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  transition: background var(--transition-base);
}

.pagination a:hover { background: var(--bg-subtle); color: var(--text-primary); }
.pagination .current {
  background: var(--text-primary);
  color: var(--text-on-accent);
  border-color: var(--text-primary);
}

/* ---------- 404 ---------- */
.error-404 {
  text-align: center;
  padding: var(--space-20) var(--space-7);
}

.error-404__code {
  font-family: var(--font-mono);
  font-size: var(--fs-display-md);
  color: var(--text-tertiary);
  margin-bottom: var(--space-7);
}

.error-404__title {
  font-size: var(--fs-display-md);
  letter-spacing: var(--tracking-display-md);
  margin: 0 0 var(--space-5);
}
/* ============================================================
   Hero + section visual enhancements
   ============================================================ */

/* Hero — dark canvas with subtle dot grid + soft accent gradients (Vercel-style) */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-20) var(--space-16);
  background:
    radial-gradient(ellipse 900px 450px at 75% 15%, rgba(0, 112, 243, 0.22), transparent 65%),
    radial-gradient(ellipse 700px 350px at 15% 90%, rgba(124, 58, 237, 0.15), transparent 60%),
    radial-gradient(ellipse 500px 250px at 50% 50%, rgba(34, 211, 238, 0.08), transparent 70%),
    linear-gradient(180deg, #050510 0%, #0a0a14 50%, #0f0f1a 100%);
  color: #fafafa;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 0);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 800px 500px at 50% 50%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 800px 500px at 50% 50%, #000 20%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  /* Bottom fade — softens transition to white sections below */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.06) 100%);
  pointer-events: none;
  z-index: 0;
}

.hero__inner { position: relative; z-index: 1; }

/* Hero typography on dark canvas */
.hero .eyebrow {
  color: rgba(255, 255, 255, 0.55);
}

.hero__title {
  background: linear-gradient(180deg, #ffffff 0%, #cfd0d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__dek {
  color: rgba(255, 255, 255, 0.7);
}

/* Hero CTA buttons override — light on dark */
.hero .btn-primary {
  background: #ffffff;
  border-color: #ffffff;
  color: #0a0a0a;
}
.hero .btn-primary:hover {
  background: #ededed;
  border-color: #ededed;
  color: #0a0a0a;
}

.hero .btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fafafa;
  backdrop-filter: blur(4px);
}
.hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

/* Stats / "trusted by" row */
.trust-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  padding-block: var(--space-7);
}

.trust-bar__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--space-7);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-7);
}

.trust-bar__label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--text-tertiary);
}

.trust-bar__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-7);
  list-style: none;
  padding: 0;
  margin: 0;
}

.trust-bar__list li {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.trust-bar__list li::before {
  content: '+';
  margin-right: var(--space-2);
  color: var(--text-quaternary);
}

/* Section heading with eyebrow + title row */
.section-heading {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
  max-width: 60ch;
}

.section-heading__title {
  font-size: clamp(1.75rem, 4vw, var(--fs-display-md));
  letter-spacing: var(--tracking-display-md);
  line-height: var(--lh-display-sm);
  font-weight: 600;
  margin: 0;
}

.section-heading__dek {
  font-size: var(--fs-body-lg);
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-7);
  margin-bottom: var(--space-10);
}

/* "Featured" article card — bigger first card */
.article-card-featured {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-10);
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-subtle) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-base), background var(--transition-base);
  position: relative;
  overflow: hidden;
}

.article-card-featured::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(0, 112, 243, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.article-card-featured:hover {
  border-color: var(--border-strong);
  color: inherit;
}

.article-card-featured__title {
  font-size: clamp(1.25rem, 3vw, var(--fs-display-sm));
  line-height: 1.2;
  letter-spacing: var(--tracking-display-sm);
  font-weight: 600;
  margin: var(--space-4) 0;
}

.article-card-featured__excerpt {
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 60ch;
}

.article-card-featured__meta {
  margin-top: var(--space-7);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-meta);
  color: var(--text-tertiary);
}

/* Tool card — add subtle icon and arrow on hover */
.tool-card {
  position: relative;
}

.tool-card__cta {
  transition: gap var(--transition-base);
}

.tool-card:hover .tool-card__cta {
  gap: var(--space-3);
}

.tool-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--accent-bg);
  border-radius: var(--radius-md);
  color: var(--accent);
  margin-bottom: var(--space-5);
}

/* CTA section before footer */
.cta-section {
  padding-block: var(--space-16);
  text-align: center;
  background:
    radial-gradient(ellipse 600px 300px at 50% 50%, rgba(0, 112, 243, 0.05), transparent 70%),
    var(--bg);
  border-top: 1px solid var(--border);
}

.cta-section__inner {
  max-width: 720px;
  margin: 0 auto;
  padding-inline: var(--space-7);
}

.cta-section__title {
  font-size: clamp(1.75rem, 4vw, var(--fs-display-md));
  letter-spacing: var(--tracking-display-md);
  line-height: var(--lh-display-sm);
  font-weight: 600;
  margin: 0 0 var(--space-5);
}

.cta-section__dek {
  font-size: var(--fs-body-lg);
  color: var(--text-secondary);
  margin: 0 0 var(--space-7);
  line-height: 1.5;
}

.cta-section__buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* Header — stronger scroll shadow + tighten when scrolled */
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--border-strong);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

/* Improve nav visual weight — center it on desktop, prevent wrap */
.site-nav {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.site-nav__link {
  position: relative;
  padding-block: var(--space-3);
}

.site-nav__link.is-current::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text-primary);
}

/* Article-with-toc layout enhancement */
.article {
  position: relative;
}

/* Add a subtle accent badge on category */
.article-header__category .badge {
  background: var(--accent-bg);
  color: var(--accent);
}

/* Code block enhancements */
.code-wrap {
  position: relative;
  margin: var(--space-7) 0;
}

.code-copy:hover {
  background: var(--bg-subtle) !important;
  color: var(--text-primary) !important;
}

/* Pagination accent for current page */
.pagination .current {
  font-weight: 600;
}

/* Article body — tighten image margins */
.prose figure { margin: var(--space-10) 0; }

/* Subtle divider between sections */
.section + .section:not([style*="background"]) {
  border-top: 1px solid var(--border);
}

/* Better mobile spacing */
@media (max-width: 640px) {
  .hero { padding-block: var(--space-12) var(--space-10); }
  .hero__title { font-size: 2.25rem; line-height: 1.1; letter-spacing: -0.03em; }
  .hero__dek { font-size: var(--fs-body); }
}

/* ============================================================
   Tools index page — featured large card + reason cards
   ============================================================ */

.tools-grid {
  display: grid;
  gap: var(--space-7);
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .tools-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .tools-grid > .tool-card-large { grid-row: span 2; }
}

@media (max-width: 1023px) and (min-width: 640px) {
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .tools-grid > .tool-card-large { grid-column: span 2; }
}

.tool-card-large {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-10);
  background: linear-gradient(135deg, #0a0a14 0%, #0f0f1a 100%);
  border: 1px solid #1f1f2a;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: #fafafa;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.tool-card-large::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 112, 243, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.tool-card-large::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
  background-size: 20px 20px;
  pointer-events: none;
}

.tool-card-large > * { position: relative; z-index: 1; }

.tool-card-large:hover {
  border-color: rgba(0, 112, 243, 0.4);
  color: #fafafa;
}

.tool-card-large__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.tool-card-large__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(0, 112, 243, 0.15);
  border: 1px solid rgba(0, 112, 243, 0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: #6ea8ff;
}

.tool-card-large__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: #6ea8ff;
}

.tool-card-large__name {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-weight: 600;
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, #cfd0d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.tool-card-large__desc {
  font-size: var(--fs-body);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.tool-card-large__features {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0 var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.tool-card-large__features li {
  position: relative;
  padding-left: var(--space-7);
  font-size: var(--fs-meta);
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
  margin: 0;
}

.tool-card-large__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(transparent 6px, rgba(0,112,243,0.9) 6px, rgba(0,112,243,0.9) 8px, transparent 8px),
    linear-gradient(90deg, transparent 6px, rgba(0,112,243,0.9) 6px, rgba(0,112,243,0.9) 8px, transparent 8px);
  background-size: 14px 14px;
  background-repeat: no-repeat;
}

.tool-card-large__cta {
  margin-top: auto;
  font-size: var(--fs-meta);
  font-weight: 500;
  color: #6ea8ff;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Reason card (3-step explanation) */
.reason-card {
  padding: var(--space-7);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.reason-card__num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  color: var(--accent);
  margin-bottom: var(--space-5);
}

.reason-card__title {
  font-size: var(--fs-heading-md);
  letter-spacing: var(--tracking-heading);
  font-weight: 600;
  margin: 0 0 var(--space-3);
  color: var(--text-primary);
}

.reason-card__body {
  font-size: var(--fs-meta);
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* ============================================================
   Archive / Blog / Search hero — dark variant for visual consistency
   ============================================================ */

.section-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 700px 350px at 80% 20%, rgba(0, 112, 243, 0.18), transparent 65%),
    radial-gradient(ellipse 500px 250px at 20% 80%, rgba(124, 58, 237, 0.12), transparent 60%),
    linear-gradient(180deg, #050510 0%, #0a0a14 100%);
  color: #fafafa;
  padding-block: var(--space-16) var(--space-12);
}

.section-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 600px 400px at 50% 50%, #000 30%, transparent 90%);
  mask-image: radial-gradient(ellipse 600px 400px at 50% 50%, #000 30%, transparent 90%);
  pointer-events: none;
  z-index: 0;
}

.section-hero > * { position: relative; z-index: 1; }

.section-hero .eyebrow { color: rgba(255, 255, 255, 0.55); }

.section-hero h1 {
  background: linear-gradient(180deg, #ffffff 0%, #cfd0d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
}

.section-hero p {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Article header has light surface — keep it light, but add a subtle accent strip */
.article-header {
  position: relative;
}

.article-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #7c3aed 50%, #22d3ee 100%);
  opacity: 0.08;
}

/* ============================================================
   Page template improvements (about, contact)
   ============================================================ */
.page .article-header {
  text-align: center;
  padding-block: var(--space-16) var(--space-10);
  background:
    radial-gradient(ellipse 600px 250px at 50% 0%, rgba(0, 112, 243, 0.05), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}

.page .article-header__title {
  margin-inline: auto;
  max-width: 22ch;
}

/* ============================================================
   Page hero text classes (replaces inline styles)
   ============================================================ */
.page-hero__title {
  font-size: clamp(2rem, 5vw, var(--fs-display-lg));
  letter-spacing: var(--tracking-display-lg);
  line-height: var(--lh-display);
  font-weight: 600;
  margin: var(--space-5) 0 var(--space-5) 0;
}

.page-hero__dek {
  font-size: var(--fs-body-lg);
  line-height: 1.5;
  margin: 0;
}

/* On dark section-hero, override inline-color elements */
.section-hero .page-hero__dek { color: rgba(255, 255, 255, 0.7); }

.error-404 { text-align: center; padding: var(--space-12) var(--space-7); }
.error-404__buttons { display: flex; gap: var(--space-4); justify-content: center; flex-wrap: wrap; }

/* On dark section-hero, error code stays bright */
.section-hero .error-404__code {
  color: rgba(255, 255, 255, 0.4);
  font-size: var(--fs-display-md);
  font-family: var(--font-mono);
  margin-bottom: var(--space-7);
}

/* Article header on dark section-hero — make sure title visible */
.section-hero .badge {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}
.section-hero .badge:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* ============================================================
   Final polish — prose body, article links, blockquote, callouts
   ============================================================ */

.prose a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  border-bottom: 0;
}
.prose a:hover { text-decoration-thickness: 2px; }

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

.prose ul li::marker, .prose ol li::marker { color: var(--text-quaternary); }

.prose pre {
  margin: var(--space-8) 0;
  border-radius: var(--radius-md);
}

/* Inline code in prose body — slightly smaller */
.prose :not(pre) > code {
  font-size: 0.92em;
  padding: 0.1em 0.4em;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

/* Tables in prose — full bleed within container */
.prose table {
  margin: var(--space-8) 0;
  font-size: var(--fs-body-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.prose th { background: var(--bg-subtle); font-family: var(--font-sans); text-transform: none; letter-spacing: 0; font-size: var(--fs-meta); font-weight: 600; color: var(--text-primary); }

.prose tr:hover { background: var(--bg-subtle); }

/* Callouts inside prose — wp:html injected blocks */
.prose .callout, .prose [class^="callout"] {
  margin: var(--space-8) 0;
}

/* Article header on dark section-hero variant — only used when explicitly added */
body.is-article .article-header {
  /* keep light-canvas article hero — just add subtle gradient strip */
}

/* Quotation enhancement */
.prose blockquote {
  font-size: var(--fs-body-lg);
  line-height: 1.5;
  font-style: italic;
  color: var(--text-secondary);
  border-left: 3px solid var(--accent);
  padding: var(--space-3) var(--space-7);
  margin: var(--space-8) 0;
  background: linear-gradient(90deg, var(--accent-bg) 0%, transparent 100%);
}

.prose blockquote p { margin: 0; }
.prose blockquote cite {
  display: block;
  font-style: normal;
  font-size: var(--fs-meta);
  color: var(--text-tertiary);
  margin-top: var(--space-3);
}

/* Image with caption */
.prose figure { margin: var(--space-10) 0; }
.prose figure img { width: 100%; border-radius: var(--radius-md); border: 1px solid var(--border); }

/* "Cited by" trust bar — hover effect */
.trust-bar__list li {
  transition: color var(--transition-base);
  cursor: default;
}
.trust-bar__list li:hover { color: var(--text-primary); }

/* Featured article card — accent on hover */
.article-card-featured:hover {
  border-color: var(--accent);
}

/* Footer — center bottom row on mobile */
@media (max-width: 640px) {
  .site-footer__bottom { flex-direction: column; text-align: center; gap: var(--space-3); }
}

/* Ensure single article gradient strip is visible */
.is-article .article-header::before {
  opacity: 1;
  background: linear-gradient(90deg, var(--accent) 0%, #7c3aed 50%, #22d3ee 100%);
  height: 3px;
}

/* Subtle divider between sections on white bg */
.section + .cta-section,
.cta-section + .section { border-top: 1px solid var(--border); }

/* ============================================================
   Tool page hero (compact dark hero for /tools/<slug>/)
   ============================================================ */

.tool-page-hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-12) var(--space-10);
  background:
    radial-gradient(ellipse 700px 350px at 75% 15%, rgba(0, 112, 243, 0.18), transparent 65%),
    radial-gradient(ellipse 500px 250px at 15% 85%, rgba(124, 58, 237, 0.12), transparent 60%),
    linear-gradient(180deg, #050510 0%, #0a0a14 100%);
  color: #fafafa;
}

.tool-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 600px 300px at 50% 50%, #000 30%, transparent 90%);
  mask-image: radial-gradient(ellipse 600px 300px at 50% 50%, #000 30%, transparent 90%);
  pointer-events: none;
  z-index: 0;
}

.tool-page-hero > .container { position: relative; z-index: 1; }

.tool-page-hero__crumb {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  margin-bottom: var(--space-5);
  transition: color var(--transition-base);
}
.tool-page-hero__crumb:hover { color: rgba(255, 255, 255, 0.85); }

.tool-page-hero .eyebrow { color: rgba(110, 168, 255, 0.85); margin-bottom: var(--space-4); display: block; }

.tool-page-hero__title {
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-weight: 600;
  margin: 0 0 var(--space-5) 0;
  background: linear-gradient(180deg, #ffffff 0%, #cfd0d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  max-width: 24ch;
}

.tool-page-hero__dek {
  font-size: var(--fs-body-lg);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
  max-width: 56ch;
  margin: 0;
}

/* Tool body wrapper — give breathing room from hero */
.tool-page main > *:not(.tool-page-hero) {
  /* nothing yet — tool-specific CSS still controls inner widget */
}

/* On tool pages, override body font to use Geist for chrome */
.tool-page {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
}

/* Tool widget wrapper containers — give them subtle top margin from hero */
.tool-page .tool-wrapper,
.tool-page .meta-tool-wrapper,
.tool-page .qr-wrapper,
.tool-page .schema-wrapper,
.tool-page .robots-wrapper,
.tool-page .canon-wrapper,
.tool-page .hreflang-wrapper,
.tool-page .sdp-wrapper,
.tool-page .word-wrapper,
.tool-page .json-wrapper,
.tool-page .roi-wrapper,
.tool-page .ab-wrapper,
.tool-page .utm-wrapper,
.tool-page .serp-wrapper {
  background: var(--bg);
}

/* ==========================================================
   About page
   ========================================================== */
.about-bio {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-12);
  align-items: start;
}

.about-bio__avatar img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  display: block;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}

.about-bio__name {
  font-size: var(--fs-display-sm);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: var(--space-2) 0 var(--space-6);
  color: var(--text-primary);
}

.about-bio__body p {
  font-size: var(--fs-body-lg);
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 var(--space-5);
}

.about-bio__body p:last-child { margin-bottom: 0; }

.about-topics {
  margin-top: var(--space-10);
}

.about-topic {
  position: relative;
  padding: var(--space-8);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.about-topic:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.about-topic__num {
  position: absolute;
  top: var(--space-6);
  right: var(--space-7);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--text-quaternary);
  letter-spacing: 0.04em;
}

.about-topic__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent);
  margin-bottom: var(--space-5);
}

.about-topic__name {
  font-size: var(--fs-h4);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
  color: var(--text-primary);
}

.about-topic__desc {
  font-size: var(--fs-body-sm);
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

@media (max-width: 700px) {
  .about-bio {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }
  .about-bio__avatar { justify-self: center; }
}

/* ==========================================================
   Contact page
   ========================================================== */
.contact-channels { margin-top: var(--space-4); }

.contact-channel {
  padding: var(--space-8);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.contact-channel:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.contact-channel__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent);
  margin-bottom: var(--space-6);
}

.contact-channel__title {
  font-size: var(--fs-h4);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
  color: var(--text-primary);
}

.contact-channel__desc {
  font-size: var(--fs-body-sm);
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 var(--space-6);
  flex: 1;
}

.contact-channel__cta {
  font-size: var(--fs-body-sm);
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.005em;
}

.contact-channel__cta:hover { color: var(--accent-hover); text-decoration: underline; }

.contact-form-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-10);
  max-width: 640px;
  margin: 0 auto;
}

/* CF7 styling — match theme */
.contact-form-wrap .wpcf7-form p {
  margin: 0 0 var(--space-5);
}

.contact-form-wrap label {
  display: block;
  font-size: var(--fs-body-sm);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.contact-form-wrap input[type="text"],
.contact-form-wrap input[type="email"],
.contact-form-wrap input[type="url"],
.contact-form-wrap textarea {
  display: block;
  width: 100%;
  font-family: inherit;
  font-size: var(--fs-body);
  padding: 10px 12px;
  background: var(--bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.contact-form-wrap input:focus,
.contact-form-wrap textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.12);
}

.contact-form-wrap textarea { min-height: 140px; resize: vertical; }

.contact-form-wrap .wpcf7-submit,
.contact-form-wrap input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 var(--space-6);
  background: var(--text-primary);
  color: var(--text-on-accent);
  border: 1px solid var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: var(--fs-body-sm);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.contact-form-wrap .wpcf7-submit:hover {
  background: #262626;
  border-color: #262626;
}

.contact-form-wrap .wpcf7-response-output {
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-sm);
  font-size: var(--fs-body-sm);
}

.contact-faq h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-6);
  color: var(--text-primary);
}

.contact-faq__item {
  border-top: 1px solid var(--border);
  padding: var(--space-5) 0;
}

.contact-faq__item:last-child { border-bottom: 1px solid var(--border); }

.contact-faq__item summary {
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.contact-faq__item summary::-webkit-details-marker { display: none; }

.contact-faq__item summary::after {
  content: '+';
  font-size: 20px;
  color: var(--text-quaternary);
  font-weight: 400;
  margin-left: var(--space-4);
  transition: transform var(--transition);
}

.contact-faq__item[open] summary::after { content: '−'; }

.contact-faq__item p {
  margin: var(--space-4) 0 0;
  font-size: var(--fs-body-sm);
  color: var(--text-secondary);
  line-height: 1.65;
}

@media (max-width: 900px) {
  .contact-channels { grid-template-columns: 1fr; }
}
@media print {
  .site-header, .site-footer, .toc, .author-block { display: none !important; }
  body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  a { color: #000 !important; text-decoration: underline !important; }
  pre, code { background: transparent !important; border: 1px solid #999 !important; }
  .prose { max-width: 100% !important; padding: 0 !important; }
  .article-header__title { font-size: 24pt !important; }
  .prose h2 { font-size: 16pt !important; }
}
