
/* ============================================================
   AI Workshack V2 — "Dark Editorial × Technical Precision"
   Fonts: Syne (display) + Lora (article body) + JetBrains Mono (code)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=Lora:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

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

/* ── Prevent horizontal scroll ───────────────────────────── */
html { overflow-x: hidden; }
body { overflow-x: hidden; max-width: 100%; }

/* Grid cells have min-width:auto by default — causes overflow */
.article-layout > main,
.article-layout > aside.toc-sidebar,
.cards-grid > *,
.tool-grid > *,
.footer-grid > * { min-width: 0; }

/* All sections/header/footer must stay within viewport */
header, .hero, .stats-strip, section,
.cta-section, footer, .page-hero {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Article content never overflows its column */
.article-body { overflow-wrap: break-word; word-wrap: break-word; }
.article-body pre,
.article-body img,
.table-wrap { max-width: 100%; }

/* Container always fits inside viewport */
.container { box-sizing: border-box; width: 100%; }

:root {
  /* Palette */
  --bg:          #06080f;
  --bg2:         #0a0d18;
  --surface:     #0f1420;
  --surface2:    #141928;
  --border:      #1c2540;
  --border2:     #253060;
  --cyan:        #00e5ff;
  --cyan-glow:   rgba(0,229,255,.18);
  --cyan-dim:    rgba(0,229,255,.10);
  --amber:       #f59e0b;
  --amber-dim:   rgba(245,158,11,.12);
  --text:        #d8e0f0;
  --text2:       #a0b0cc;
  --muted:       #5a6a88;
  --code-bg:     #080c18;
  --code-border: #1a2240;
  --tag-bg:      rgba(0,229,255,.10);

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-article: 'Lora', serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Spacing */
  --radius:   10px;
  --radius-lg:16px;
  --max-w:    1240px;
  --article-w:760px;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.65; font-size: 1rem; min-height: 100vh; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.75rem; }

/* ── Reading Progress Bar ─────────────────────────────────── */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  width: 0%; z-index: 9999; transition: width .1s linear;
  box-shadow: 0 0 12px var(--cyan-glow);
}

/* ── Header ──────────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(6,8,15,.88);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 2rem; }
.logo {
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.25rem; color: #fff; letter-spacing: -.02em; text-decoration: none;
}
.logo-mark { color: var(--cyan); }
.logo-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); flex-shrink: 0; }
.header-search { flex: 1; max-width: 320px; }
.header-search-input {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: .45rem 1rem .45rem 2.25rem; font-size: .88rem;
  color: var(--text); outline: none; font-family: var(--font-body);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235a6a88' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: .7rem center;
  transition: border-color .2s, box-shadow .2s;
}
.header-search-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim); }
.header-search-input::placeholder { color: var(--muted); }
nav { display: flex; align-items: center; gap: 1.75rem; }
nav a { color: var(--text2); font-size: .88rem; font-weight: 500; transition: color .2s; text-decoration: none; white-space: nowrap; }
nav a:hover, nav a.active { color: #fff; }
.nav-cta {
  background: var(--cyan); color: #000 !important; font-weight: 700 !important;
  padding: .45rem 1.1rem; border-radius: 7px; font-size: .83rem !important;
  transition: box-shadow .2s !important;
}
.nav-cta:hover { box-shadow: 0 0 20px var(--cyan-glow) !important; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.3rem; cursor: pointer; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 7rem 0 5.5rem; text-align: center;
  background: var(--bg2);
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 20% 50%, rgba(0,229,255,.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 80% at 80% 30%, rgba(245,158,11,.05) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 80%, rgba(0,229,255,.04) 0%, transparent 70%);
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .25;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 80%);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan); background: var(--cyan-dim); border: 1px solid rgba(0,229,255,.2);
  padding: .35rem .9rem; border-radius: 100px; margin-bottom: 2rem;
}
.hero h1 {
  font-family: var(--font-display); font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800; line-height: 1.08; letter-spacing: -.04em;
  color: #fff; margin-bottom: 1.5rem;
}
.hero h1 .accent { color: var(--cyan); }
.hero h1 .accent-warm { color: var(--amber); }
.hero-sub { font-size: 1.15rem; color: var(--text2); max-width: 580px; margin: 0 auto 2.5rem; line-height: 1.65; }
.hero-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.75rem; border-radius: 9px; font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .2s; text-decoration: none; border: 1.5px solid transparent; }
.btn-cyan { background: var(--cyan); color: #000; }
.btn-cyan:hover { box-shadow: 0 0 32px var(--cyan-glow), 0 4px 16px rgba(0,0,0,.4); transform: translateY(-1px); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border2); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); text-decoration: none; }

/* ── Stats ticker ─────────────────────────────────────────── */
.stats-strip {
  background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 1.1rem 0;
}
.stats-inner { display: flex; justify-content: center; gap: 4rem; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-val { font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; color: var(--cyan); display: block; }
.stat-lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* ── Section headers ─────────────────────────────────────── */
.sec-head { text-align: center; margin-bottom: 3rem; }
.sec-tag { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-bottom: .6rem; display: block; }
.sec-title { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; color: #fff; margin-bottom: .8rem; }
.sec-sub { color: var(--text2); max-width: 520px; margin: 0 auto; font-size: 1rem; }

/* ── Article cards ───────────────────────────────────────── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.25rem; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.6rem;
  display: flex; flex-direction: column; transition: border-color .25s, box-shadow .25s, transform .25s;
  text-decoration: none; color: inherit; position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--cyan-dim) 0%, transparent 60%);
  opacity: 0; transition: opacity .3s;
}
.card:hover { border-color: rgba(0,229,255,.35); box-shadow: 0 0 40px var(--cyan-dim), 0 8px 32px rgba(0,0,0,.4); transform: translateY(-3px); text-decoration: none; }
.card:hover::before { opacity: 1; }
.card-meta { display: flex; align-items: center; gap: .6rem; margin-bottom: .85rem; }
.card-tag { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cyan); background: var(--tag-bg); border: 1px solid rgba(0,229,255,.2); padding: .22rem .6rem; border-radius: 4px; }
.card-date { font-size: .78rem; color: var(--muted); }
.card-read-time { font-size: .72rem; color: var(--muted); margin-left: auto; }
.card h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; line-height: 1.35; color: #fff; margin-bottom: .7rem; }
.card p { font-size: .88rem; color: var(--text2); line-height: 1.6; flex: 1; }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.card-link { font-size: .82rem; font-weight: 600; color: var(--cyan); letter-spacing: .02em; }

/* ── Category grid ───────────────────────────────────────── */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.tool-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.4rem; display: flex; align-items: center; gap: .9rem;
  text-decoration: none; color: inherit; transition: all .25s;
}
.tool-card:hover { border-color: rgba(0,229,255,.3); box-shadow: 0 0 24px var(--cyan-dim); text-decoration: none; }
.tool-icon { font-size: 1.75rem; flex-shrink: 0; line-height: 1; }
.tool-info { min-width: 0; }
.tool-name { font-weight: 700; font-size: .9rem; color: #fff; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-count { font-size: .76rem; color: var(--muted); margin-top: .15rem; }

/* ── Filters ─────────────────────────────────────────────── */
.filter-bar { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filter-btn {
  font-size: .78rem; font-weight: 600; padding: .4rem .9rem; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text2);
  transition: all .2s; font-family: var(--font-body);
}
.filter-btn.active, .filter-btn:hover { border-color: var(--cyan); color: var(--cyan); background: var(--tag-bg); }

/* ── Page header ─────────────────────────────────────────── */
.page-hero {
  background: var(--bg2); border-bottom: 1px solid var(--border);
  padding: 3.5rem 0 3rem; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; top: 0; right: 0; width: 400px; height: 100%;
  background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(0,229,255,.06) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero h1 { font-family: var(--font-display); font-size: clamp(1.75rem, 3.5vw, 2.75rem); font-weight: 800; letter-spacing: -.03em; color: #fff; margin-bottom: .75rem; }
.page-hero p { color: var(--text2); font-size: 1rem; max-width: 560px; }
.breadcrumb { font-size: .8rem; color: var(--muted); margin-bottom: 1rem; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--text2); text-decoration: none; }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb-sep { color: var(--border2); }

/* ── Category page layout ────────────────────────────────── */
.cat-page-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 3rem;
  align-items: start;
  min-width: 0;
}
.cat-page-layout > * { min-width: 0; }
.cat-sidebar { position: sticky; top: 90px; }
@media (max-width: 900px) {
  .cat-page-layout { grid-template-columns: 1fr; }
  .cat-sidebar { position: static; }
}

/* ── Article layout ──────────────────────────────────────── */
.article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 4rem; align-items: start; padding: 3rem 0 5rem; }
.article-header { margin-bottom: 2.5rem; }
.article-header h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; line-height: 1.15; letter-spacing: -.03em; color: #fff; margin-bottom: 1.25rem; }
.article-meta-bar { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.art-tag { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cyan); background: var(--tag-bg); border: 1px solid rgba(0,229,255,.2); padding: .25rem .65rem; border-radius: 5px; }
.art-date { font-size: .82rem; color: var(--muted); }
.art-read { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: .3rem; }

/* ── Article body typography ─────────────────────────────── */
.article-body { font-family: var(--font-article); font-size: 1.05rem; line-height: 1.85; color: var(--text); }
.article-body h2 { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; color: #fff; margin: 2.75rem 0 .9rem; letter-spacing: -.025em; padding-top: .5rem; border-top: 1px solid var(--border); }
.article-body h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: #e8f0ff; margin: 2rem 0 .6rem; }
.article-body h4 { font-size: 1rem; font-weight: 700; color: var(--text); margin: 1.5rem 0 .4rem; }
.article-body p { margin-bottom: 1.35rem; }
.article-body ul, .article-body ol { margin: .6rem 0 1.4rem 1.4rem; }
.article-body li { margin-bottom: .45rem; }
.article-body strong { color: #fff; font-weight: 600; }
.article-body em { color: var(--amber); font-style: italic; }
.article-body a { color: var(--cyan); border-bottom: 1px solid rgba(0,229,255,.25); }
.article-body a:hover { border-bottom-color: var(--cyan); }
.article-body code { font-family: var(--font-mono); font-size: .875em; background: var(--surface2); color: #7dd3fc; padding: .15em .45em; border-radius: 4px; border: 1px solid var(--border); }

/* ── Code blocks ─────────────────────────────────────────── */
.code-block { position: relative; margin: 1.75rem 0; }
.code-block pre { background: var(--code-bg); border: 1px solid var(--code-border); border-radius: var(--radius); padding: 1.5rem 1.75rem; overflow-x: auto; line-height: 1.65; }
.code-block pre code { font-family: var(--font-mono); font-size: .85rem; color: #a8c7fa; background: none; border: none; padding: 0; }
.copy-btn {
  position: absolute; top: .6rem; right: .75rem;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 5px;
  color: var(--muted); font-size: .72rem; font-weight: 600; padding: .25rem .65rem; cursor: pointer;
  font-family: var(--font-body); transition: all .2s; letter-spacing: .03em; text-transform: uppercase;
}
.copy-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.copy-btn.copied { border-color: #22c55e; color: #22c55e; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 1.75rem 0; border: 1px solid var(--border); border-radius: var(--radius); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table-wrap th { background: var(--surface2); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border2); }
.table-wrap td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); color: var(--text2); vertical-align: top; }
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tr:hover td { background: var(--surface); }

/* ── Table of Contents ───────────────────────────────────── */
.toc-sidebar { position: sticky; top: 90px; }
.toc-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.35rem; }
.toc-title { font-family: var(--font-display); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 1rem; display: block; }
.toc-list { list-style: none; }
.toc-list li { border-bottom: none; }
.toc-list a { display: block; padding: .3rem 0 .3rem .7rem; font-size: .83rem; color: var(--text2); text-decoration: none; border-left: 2px solid var(--border); transition: all .2s; line-height: 1.35; }
.toc-list a:hover, .toc-list a.active { color: var(--cyan); border-left-color: var(--cyan); }
.toc-list a.active { background: var(--cyan-dim); padding-left: .9rem; }

/* ── Widget sidebar ──────────────────────────────────────── */
.sidebar-widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.35rem; margin-bottom: 1.25rem; }
.sidebar-widget-title { font-family: var(--font-display); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 1rem; display: block; }
.sidebar-widget ul { list-style: none; }
.sidebar-widget ul li + li { border-top: 1px solid var(--border); }
.sidebar-widget ul li a { display: block; padding: .55rem 0; font-size: .85rem; color: var(--text2); text-decoration: none; transition: color .2s; line-height: 1.35; }
.sidebar-widget ul li a:hover { color: var(--cyan); }

/* ── Article nav ─────────────────────────────────────────── */
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.article-nav-link { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; text-decoration: none; transition: all .2s; }
.article-nav-link:hover { border-color: rgba(0,229,255,.3); color: inherit; text-decoration: none; }
.article-nav-link .nav-dir { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .3rem; display: block; }
.article-nav-link .nav-title { font-size: .9rem; font-weight: 600; color: var(--text); line-height: 1.35; }
.article-nav-link.next { text-align: right; }

/* ── Search page ─────────────────────────────────────────── */
.search-input-wrap { position: relative; margin-bottom: 2rem; }
.search-input-wrap input {
  width: 100%; background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 1rem 1rem 1rem 3rem;
  font-size: 1.05rem; color: var(--text); font-family: var(--font-body); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-input-wrap input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-dim); }
.search-input-wrap .search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.1rem; pointer-events: none; }
#search-results-count { font-size: .9rem; color: var(--muted); margin-bottom: 1.5rem; }
mark { background: rgba(245,158,11,.25); color: var(--amber); border-radius: 2px; padding: 0 .1em; }

/* ── Social share bar ────────────────────────────────────── */
.share-bar {
  display: flex; align-items: center; gap: .65rem; flex-wrap: wrap;
  margin: 1.75rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid var(--border);
}
.share-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted); margin-right: .25rem;
}
.share-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .42rem .9rem; border-radius: 6px;
  font-size: .78rem; font-weight: 600; letter-spacing: .01em;
  border: 1px solid var(--border2); background: var(--surface2);
  color: var(--text2); cursor: pointer; font-family: var(--font-body);
  text-decoration: none; transition: all .18s; white-space: nowrap; line-height: 1;
}
.share-btn:hover { text-decoration: none; }
.share-x:hover        { border-color: #e7e7e7; color: #e7e7e7; background: rgba(231,231,231,.08); }
.share-linkedin:hover { border-color: #0a66c2; color: #0a66c2; background: rgba(10,102,194,.08); }
.share-copy:hover     { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-dim); }
.share-copy.copied    { border-color: #22c55e; color: #22c55e; background: rgba(34,197,94,.08); }

/* ── CTA / Newsletter ────────────────────────────────────── */
.cta-section {
  background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 5rem 0; text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(0,229,255,.05) 0%, transparent 70%);
}
.cta-section h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; color: #fff; margin-bottom: .75rem; }
.cta-section p { color: var(--text2); margin-bottom: 2rem; font-size: 1rem; }
.cta-form { display: flex; gap: .75rem; max-width: 420px; margin: 0 auto; }
.cta-form input {
  flex: 1; padding: .75rem 1rem; border-radius: 8px;
  border: 1px solid var(--border2); background: var(--bg2); color: var(--text);
  font-size: .9rem; outline: none; font-family: var(--font-body);
}
.cta-form input:focus { border-color: var(--cyan); }
.cta-form button { padding: .75rem 1.4rem; background: var(--cyan); color: #000; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; font-family: var(--font-body); transition: box-shadow .2s; white-space: nowrap; }
.cta-form button:hover { box-shadow: 0 0 20px var(--cyan-glow); }

/* ── Footer ──────────────────────────────────────────────── */
footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 3.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.footer-brand p { font-size: .88rem; color: var(--muted); line-height: 1.7; margin-top: .75rem; max-width: 280px; }
footer h4 { font-family: var(--font-display); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .9rem; }
footer ul { list-style: none; }
footer ul li + li { margin-top: .45rem; }
footer ul li a { color: var(--text2); font-size: .85rem; text-decoration: none; transition: color .2s; }
footer ul li a:hover { color: var(--cyan); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: .8rem; color: var(--muted); flex-wrap: wrap; gap: .75rem; }

/* ── Helpers ─────────────────────────────────────────────── */
section { padding: 5rem 0; }
.section-divider { border: none; border-top: 1px solid var(--border); margin: 0; }
.bg2 { background: var(--bg2); }
.text-center { text-align: center; }
.mt-10 { margin-top: 2.5rem; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp .5s ease both; }
.fade-up-d1 { animation-delay: .1s; }
.fade-up-d2 { animation-delay: .2s; }
.fade-up-d3 { animation-delay: .3s; }
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
[data-reveal].revealed { opacity: 1; transform: none; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: 1fr; gap: 2rem; }
  .toc-sidebar { position: static; }
  .toc-box { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  nav { display: none; }
  nav.open { display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 1rem 1.75rem; gap: 1.1rem; z-index: 300; }
  .nav-toggle { display: block; }
  .header-inner { position: relative; }
  .header-search { display: none; }
  .cards-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .article-nav { grid-template-columns: 1fr; }
  .cta-form { flex-direction: column; }
  .hero { padding: 4rem 0 3.5rem; }
  section { padding: 3.5rem 0; }
}
@media (max-width: 500px) {
  .tool-grid { grid-template-columns: 1fr; }
}
