/*
Theme Name: Bloxtra
Theme URI: https://bloxtra.com
Author: Bloxtra Editorial
Description: Minimalist sectional editorial theme for AI tools and Roblox enhancements coverage. Dark default with light toggle. Includes Tool Review template, schema.org Article/Review/HowTo/FAQ markup, robots.txt. AdSense-ready, E-E-A-T compliant.
Version: 2.8.0
License: GPL v2 or later
Text Domain: bloxtra
*/

/* ============ TOKENS ============ */
:root {
  --paper: #0a0a0b;
  --ink: #f4f4f5;
  --ink2: #18181b;
  --line: #27272a;
  --line2: #3f3f46;
  --muted: #a1a1aa;
  --hush: #71717a;
  --accent: #60a5fa;
  --accent2: #3b82f6;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --maxw: 1100px;
  --readw: 680px;
}
[data-theme="light"] {
  --paper: #fafaf9;
  --ink: #0a0a0b;
  --ink2: #ffffff;
  --line: #e7e5e4;
  --line2: #d6d3d1;
  --muted: #57534e;
  --hush: #78716c;
  --accent: #2563eb;
  --accent2: #1d4ed8;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'kern', 'liga';
  transition: background 0.2s ease, color 0.2s ease;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; transition: all 0.15s ease; }
a:hover { text-decoration-color: var(--ink); }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* ============ TYPE ============ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5vw + 1rem, 4.4rem); line-height: 1.05; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.7rem, 2.2vw + 1rem, 2.5rem); }
h3 { font-size: clamp(1.25rem, 0.8vw + 1rem, 1.5rem); font-weight: 500; }
h4 { font-size: 1.1rem; font-weight: 500; }
p { margin: 0 0 1.3em 0; }
p:last-child { margin-bottom: 0; }
em { font-style: italic; }
.accent-italic { font-style: italic; color: var(--accent); }

.eyebrow, .section-num {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hush);
  display: block;
}
.section-num { margin-bottom: 0.6rem; }

.lede {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--muted);
  font-style: italic;
  max-width: 60ch;
}

/* ============ LAYOUT ============ */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.read { max-width: var(--readw); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section-head { max-width: var(--readw); margin: 0 auto 48px; padding: 0 24px; }
.section-head h2 { margin-top: 0.4rem; }
.section-head .lede { margin-top: 1.2rem; }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s ease;
}
.brand:hover { color: var(--accent); text-decoration: none; }
.brand-mark, .brand-tag { display: none; }
.nav-main {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--sans);
  font-size: 0.85rem;
}
.nav-main a, .nav-main button {
  padding: 8px 14px;
  text-decoration: none;
  color: var(--muted);
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-main a:hover, .nav-main button:hover { color: var(--ink); background: var(--ink2); }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a {
  padding: 8px 12px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  border-radius: 4px;
}
.nav-dropdown-menu a:hover { color: var(--ink); background: var(--paper); }
.nav-dropdown-menu .cat-emoji { font-size: 0.95rem; flex-shrink: 0; }

/* Mode toggle */
.mode-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.mode-toggle:hover { border-color: var(--ink); color: var(--ink); background: var(--ink2); }
.mode-toggle svg { width: 16px; height: 16px; display: block; }
.mode-toggle .icon-sun { display: none; }
[data-theme="light"] .mode-toggle .icon-moon { display: none; }
[data-theme="light"] .mode-toggle .icon-sun { display: block; }

/* ============ MOBILE NAV ============
   Clean slide-out drawer pattern.
   - Hamburger button drawn with pure CSS (no SVG).
   - Drawer slides in from the right when JS adds .is-open
   - Backdrop darkens the page behind it.
   - Works on mobile (<= 900px) and tablets.
============================================ */

/* Hamburger button */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  position: relative;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.menu-toggle:hover,
.menu-toggle:focus-visible { border-color: var(--ink); background: var(--ink2); }
.menu-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Hamburger lines drawn with the span + pseudos. */
.menu-toggle .bars,
.menu-toggle .bars::before,
.menu-toggle .bars::after {
  position: absolute;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, top 0.2s ease, background-color 0.15s ease;
}
.menu-toggle .bars {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.menu-toggle .bars::before { content: ""; top: -7px; left: 0; }
.menu-toggle .bars::after  { content: "";  top:  7px; left: 0; }

/* When open, the middle bar fades out and the outer bars rotate into an X. */
.menu-toggle.is-open .bars { background: transparent; }
.menu-toggle.is-open .bars::before { top: 0; transform: rotate(45deg); }
.menu-toggle.is-open .bars::after  { top: 0; transform: rotate(-45deg); }

/* Slide-out drawer */
.bx-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 88vw);
  background: var(--paper);
  border-left: 1px solid var(--line);
  z-index: 110;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  visibility: hidden;
  box-shadow: -16px 0 40px rgba(0,0,0,0.35);
}
.bx-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

/* Drawer head: brand + close button */
.bx-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.bx-drawer-brand {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.bx-drawer-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.bx-drawer-close:hover,
.bx-drawer-close:focus-visible { border-color: var(--ink); background: var(--ink2); }
.bx-drawer-close svg { width: 20px; height: 20px; display: block; }

/* Drawer body (scrollable nav) */
.bx-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 24px 40px;
  -webkit-overflow-scrolling: touch;
}
.bx-drawer-body h4 {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hush);
  margin: 24px 0 4px;
}
.bx-drawer-body h4:first-child { margin-top: 8px; }
.bx-drawer-body a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  border-bottom: 1px solid var(--line);
}
.bx-drawer-body a:hover,
.bx-drawer-body a:active,
.bx-drawer-body a:focus { color: var(--accent); }
.bx-drawer-body a > span:first-child { font-size: 1.1rem; flex-shrink: 0; min-width: 1.5em; }

/* Backdrop */
.bx-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.bx-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* Body scroll lock when drawer open */
html.bx-no-scroll,
html.bx-no-scroll body { overflow: hidden; }

/* MOBILE + SMALL TABLET (≤ 900px): show hamburger, hide desktop nav */
@media (max-width: 900px) {
  .nav-main { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-inner { padding: 14px 18px; gap: 12px; }
  .brand { font-size: 1.3rem; }
}

/* DESKTOP (≥ 901px): drawer never visible. */
@media (min-width: 901px) {
  .bx-drawer,
  .bx-backdrop { display: none !important; }
}

/* ============ HERO ============ */
.hero {
  padding: 100px 0 80px;
  text-align: center;
}
.hero .eyebrow { margin-bottom: 24px; }
.hero h1 { max-width: 18ch; margin: 0 auto 28px; }
.hero .lede { margin: 0 auto; text-align: center; }
.hero-meta {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--hush);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero-meta strong { color: var(--ink); font-weight: 500; }

.hero-byline {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--hush);
  flex-wrap: wrap;
}
.hero-byline a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.hero-byline a:hover { border-bottom-color: currentColor; }
.hero-byline strong { color: var(--ink); font-weight: 500; }

/* "View all reviews →" link */
.more-link {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.15s ease;
}
.more-link:hover { color: var(--accent); }

/* Note under comparison tables */
.comp-table-note {
  font-size: 14px;
  color: var(--hush);
  margin-top: 18px;
  text-align: center;
  max-width: var(--readw);
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

/* Author card on homepage */
.author-card {
  max-width: var(--readw);
  margin: 0 auto;
  padding: 36px;
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.author-eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--hush);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.author-name {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  margin: 0 0 12px;
}
.author-bio {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.65;
}
.author-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--hush);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  margin-bottom: 12px;
}
.author-contact a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line2); }
.author-contact a:hover { border-bottom-color: currentColor; }
.author-policies {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--hush);
  letter-spacing: 0.02em;
}
.author-policies a {
  color: var(--hush);
  text-decoration: none;
}
.author-policies a:hover { color: var(--ink); }

/* Home article wrapper - prevents hero from being inside .post-content */
.home-article { display: block; }
.home-article .read h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  margin: 32px 0 12px;
  line-height: 1.3;
}

/* ============ DATA CARDS (whatdatetoday-style grid) ============ */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  max-width: var(--readw);
  margin: 0 auto;
}
.data-card {
  background: var(--paper);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
  transition: background 0.15s ease;
}
.data-card:hover { background: var(--ink2); }
.data-card .label {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hush);
}
.data-card .value {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.1;
}
.data-card .sub {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: auto;
}

/* ============ COMPARISON TABLE ============ */
.comp-table-wrap {
  max-width: var(--readw);
  margin: 0 auto;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.88rem;
}
.comp-table th, .comp-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.comp-table th {
  font-weight: 500;
  color: var(--hush);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--ink2);
}
.comp-table tr:last-child td { border-bottom: 0; }
.comp-table .tool-name { color: var(--ink); font-weight: 500; }
.comp-table .pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line2);
  border-radius: 100px;
  font-size: 0.7rem;
  color: var(--muted);
}
.comp-table .pill.good { color: var(--accent); border-color: var(--accent); }

/* ============ FORMULA / BENCHMARK BOX ============ */
.formula-box {
  max-width: var(--readw);
  margin: 0 auto;
  padding: 32px 28px;
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.92rem;
  text-align: center;
  color: var(--muted);
}
.formula-box .formula-name {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hush);
  margin-bottom: 16px;
}
.formula-box .formula-eq {
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}
.formula-box .formula-note {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 12px;
}

/* ============ TOPIC GRID (categories on home) ============ */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.topic-card {
  background: var(--paper);
  padding: 28px 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 160px;
  transition: background 0.15s ease;
}
.topic-card:hover { background: var(--ink2); text-decoration: none; }
.topic-emoji { font-size: 1.6rem; }
.topic-card h3 {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 500;
}
.topic-card p {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.topic-card .topic-meta {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--hush);
  letter-spacing: 0.06em;
  margin-top: auto;
}

/* ============ ARTICLE LIST ============ */
.article-list {
  max-width: var(--readw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.article-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: start;
}
.article-item:last-child { border-bottom: 0; }
.article-num {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--hush);
  text-transform: uppercase;
  padding-top: 6px;
}
.article-item h3 {
  font-size: 1.35rem;
  font-weight: 400;
  margin-bottom: 8px;
}
.article-item h3 a { text-decoration: none; }
.article-item h3 a:hover { color: var(--accent); }
.article-item p {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
}
.article-meta {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--hush);
  letter-spacing: 0.04em;
  margin-top: 10px;
}

/* ============ ARTICLE CARD GRID (with cover images) ============ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.article-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.article-card:hover {
  border-color: var(--line2);
  transform: translateY(-2px);
}
.article-card-cover {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink2);
  border-bottom: 1px solid var(--line);
}
.article-card-cover .post-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.article-card:hover .article-card-cover .post-cover { transform: scale(1.03); }
.article-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.article-card-cat {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hush);
  margin-bottom: 12px;
}
.article-card-cat a {
  color: inherit;
  text-decoration: none;
}
.article-card-cat a:hover { color: var(--accent); }
.article-card h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 10px;
}
.article-card h3 a { text-decoration: none; color: var(--ink); }
.article-card h3 a:hover { color: var(--accent); }
.article-card-body p {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.55;
}
.article-card-body .article-meta { margin-top: auto; }

/* ============ POST COVER (hero on single post) ============ */
.post-cover-wrap {
  margin: 0 0 48px;
}
.post-cover-hero {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--ink2);
}
/* If hero is an SVG placeholder, ensure it fills */
svg.post-cover-hero { display: block; }

/* ============ SINGLE POST / PAGE ============ */
.post-header {
  padding: 80px 24px 60px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.post-header .eyebrow { margin-bottom: 20px; }
.post-header h1 { max-width: 24ch; margin: 0 auto 24px; }
.post-meta {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--hush);
  letter-spacing: 0.04em;
}
.post-meta a { color: inherit; }
.post-meta .dot { padding: 0 8px; color: var(--line2); }

.post-content {
  max-width: var(--readw);
  margin: 0 auto;
  padding: 60px 24px 80px;
}
.post-content h2 {
  margin: 2.4em 0 0.6em;
  scroll-margin-top: 100px;
}
.post-content h2:first-child { margin-top: 0; }
.post-content h3 { margin: 1.8em 0 0.5em; }
.post-content p { font-size: 1.075rem; line-height: 1.75; color: var(--ink); }
.post-content ul, .post-content ol { margin: 0 0 1.4em 1.4em; }
.post-content li { margin-bottom: 0.6em; line-height: 1.7; }
.post-content blockquote {
  margin: 2em 0;
  padding: 0 0 0 1.5em;
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: var(--muted);
}
.post-content code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 2px 6px;
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.post-content pre {
  margin: 1.5em 0;
  padding: 16px 20px;
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.86rem;
}
.post-content pre code { background: transparent; border: 0; padding: 0; }
.post-content a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.post-content a:hover { text-decoration-color: var(--accent); }
.post-content img { margin: 2em auto; border-radius: 6px; }
.post-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }

/* TOC */
.toc {
  max-width: var(--readw);
  margin: 40px auto 0;
  padding: 24px 28px;
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.toc-title {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hush);
  margin-bottom: 12px;
}
.toc ol { margin: 0; padding-left: 1.2em; counter-reset: toc; list-style: none; }
.toc li {
  counter-increment: toc;
  margin-bottom: 6px;
  font-family: var(--sans);
  font-size: 0.9rem;
}
.toc li::before {
  content: counter(toc, decimal-leading-zero) " /";
  color: var(--hush);
  margin-right: 8px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }

/* Breadcrumbs */
.crumbs {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--hush);
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { padding: 0 8px; color: var(--line2); }

/* ============ CONTACT BLOCK ============ */
.contact-grid {
  max-width: var(--readw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.contact-card {
  background: var(--paper);
  padding: 28px 24px;
}
.contact-card h4 {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hush);
  margin-bottom: 12px;
}
.contact-card a {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
}
.contact-card a:hover { text-decoration: underline; }
.contact-card p {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 60px 0 40px;
  margin-top: 80px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-grid h4 {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hush);
  margin-bottom: 16px;
}
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a {
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-grid a:hover { color: var(--ink); }
.footer-brand {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.footer-brand .accent-italic { color: var(--accent); }
.footer-tag {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 28ch;
}
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--hush);
}
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { color: var(--ink); }
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

/* ============ ARCHIVE / SEARCH ============ */
.archive-header {
  padding: 80px 24px 40px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.archive-header .eyebrow { margin-bottom: 16px; }
.archive-header h1 { max-width: 22ch; margin: 0 auto 16px; }
.archive-header p { font-family: var(--sans); color: var(--muted); max-width: 50ch; margin: 0 auto; }

/* ============ FORMS ============ */
.form-block {
  max-width: var(--readw);
  margin: 32px auto 0;
  padding: 28px;
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.form-block label {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--hush);
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.form-block input, .form-block textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.92rem;
  margin-bottom: 18px;
}
.form-block input:focus, .form-block textarea:focus { outline: none; border-color: var(--accent); }
.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 4px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.85; text-decoration: none; }

/* ============ MISC ============ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--paper);
}
.skip-link:focus { left: 8px; top: 8px; z-index: 100; }

.alignleft { float: left; margin: 0.5em 1.5em 1em 0; }
.alignright { float: right; margin: 0.5em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-family: var(--sans); font-size: 0.82rem; color: var(--hush); text-align: center; margin-top: 8px; }
.sticky, .gallery-caption, .bypostauthor, .screen-reader-text {
  position: absolute !important; left: -9999px !important;
}
.screen-reader-text,
.visually-hidden {
  clip: rect(1px,1px,1px,1px);
  height: 1px;
  width: 1px;
  overflow: hidden;
  position: absolute !important;
  left: -9999px !important;
}

@media (max-width: 600px) {
  body { font-size: 17px; }
  .section { padding: 60px 0; }
  .hero { padding: 60px 0 50px; }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.6rem); }
  .post-content { padding: 40px 24px 60px; }
  .article-item { grid-template-columns: 1fr; gap: 8px; }
  .article-num { padding-top: 0; }
  .topic-grid { grid-template-columns: 1fr !important; }
  .article-grid { grid-template-columns: 1fr !important; gap: 24px; }
  .data-grid { grid-template-columns: 1fr 1fr !important; }
  .contact-grid { grid-template-columns: 1fr !important; }
  .hero-meta { flex-direction: column; gap: 8px; }
  .comp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .comp-table { min-width: 560px; }
  .post-cover-wrap { margin-bottom: 32px; }
  .post-cover-hero { border-radius: 8px; }
  .author-card { padding: 24px; }
  .author-name { font-size: 1.35rem; }
  .author-contact { flex-direction: column; gap: 6px; }
  .hero-byline { font-size: 13px; gap: 8px; }
}

/* TABLET (601px – 900px) */
@media (min-width: 601px) and (max-width: 900px) {
  .topic-grid { grid-template-columns: 1fr 1fr !important; }
  .article-grid { grid-template-columns: 1fr 1fr !important; gap: 24px; }
  .hero h1 { font-size: clamp(2.4rem, 6vw, 3.2rem); }
  .section { padding: 80px 0; }
}
