/* ============================================================
   InStackReview — SaaS & software review site
   Design system: "developer terminal / spec sheet"
   Voice: build-log meets datasheet. Monospace labels, syntax-
   highlight accents, hairline rules, spec stamps. Deliberately
   NOT a rounded consumer-review look (see VeraxonAI), NOT a serif
   journal (see FinLongTail), NOT a field notebook (see SmartPetLife).
   Type: system sans (UI) + system mono (labels/data).
   ============================================================ */

:root {
  /* Palette — paper + dark terminal + cyan/amber syntax accents */
  --bg: #FBFBF8;
  --surface: #F3F3EC;
  --surface-2: #EAEAE0;
  --ink: #13161C;
  --text: #1E2329;
  --text-2: #39414A;
  --muted: #66707A;
  --border: #E2E2D6;
  --border-strong: #C6C6B6;

  --terminal: #0E1420;       /* near-black navy header/console band */
  --terminal-2: #17202F;
  --terminal-line: #2A3546;

  --cyan: #0E7490;           /* primary — terminal cyan */
  --cyan-600: #0A5A71;
  --cyan-700: #084A5E;
  --cyan-soft: #E3F1F5;

  --amber: #A16207;          /* accent — syntax amber */
  --amber-soft: #F7EEDB;

  --green: #15803D;
  --green-soft: #E5F3EA;
  --red: #B91C1C;
  --red-soft: #FBE9E9;

  --maxw: 1140px;
  --radius: 4px;             /* sharp, technical */
  --radius-sm: 3px;
  --shadow-sm: 0 1px 2px rgba(19, 22, 28, 0.05);
  --shadow-md: 0 8px 22px rgba(19, 22, 28, 0.10);

  --font-sans: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Cascadia Code', 'Consolas', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.72;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.mono { font-family: var(--font-mono); }

/* ---------- Header (terminal band) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--terminal);
  border-bottom: 1px solid var(--terminal-line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.02rem;
  color: #E8EDF2;
}
.brand:hover { text-decoration: none; color: #fff; }
.brand .prompt { color: var(--green); }
.brand .logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid #2A3546;
  border-radius: var(--radius-sm);
  background: #16202F;
  color: #7DD3FC;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
}
.brand .cursor { display: inline-block; width: 7px; height: 15px; background: var(--cyan); margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  display: inline-block;
  padding: 8px 11px;
  color: #9AA6B5;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}
.nav a:hover { background: #16202F; text-decoration: none; color: #fff; }
.nav a.active { color: #7DD3FC; background: #16202F; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--terminal-line);
  border-radius: var(--radius-sm);
  padding: 6px 11px;
  cursor: pointer;
  color: #9AA6B5;
  font-family: var(--font-mono);
  font-size: 1rem;
}

/* ---------- Pricing ticker (terminal band, non-sticky) ---------- */
.ticker {
  display: flex;
  align-items: stretch;
  background: #0A0F18;
  color: #7C889A;
  border-bottom: 1px solid var(--terminal-line);
  overflow: hidden;
  height: 36px;
}
.ticker-label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  background: var(--cyan-700);
  color: #D7F0F6;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ticker-label .ticker-sub { color: #86BCC9; font-weight: 500; letter-spacing: 0.02em; text-transform: none; }
.ticker-track { flex: 1 1 auto; overflow: hidden; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.ticker-items { display: inline-flex; align-items: center; white-space: nowrap; will-change: transform; animation: ticker-scroll 50s linear infinite; }
.ticker-item { display: inline-flex; align-items: baseline; gap: 7px; padding: 0 22px; font-family: var(--font-mono); font-size: 0.76rem; color: #7C889A; position: relative; }
.ticker-item::before { content: "▸"; position: absolute; left: 6px; top: 50%; transform: translateY(-50%); color: var(--cyan); }
.ticker-item b { font-weight: 600; color: #C9D2DC; font-size: 0.74rem; }
.ticker:hover .ticker-items { animation-play-state: paused; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-items { animation: none; }
  .ticker-track { overflow-x: auto; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 60px 0 48px;
  background:
    linear-gradient(rgba(19, 22, 28, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 22, 28, 0.028) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
  border-bottom: 1px solid var(--border);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--amber);
  margin-bottom: 18px;
}
.eyebrow::before { content: "//"; color: var(--cyan); font-weight: 700; }
.eyebrow--plain { color: var(--cyan); }
.hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 16px;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--cyan); font-family: var(--font-mono); font-weight: 700; }
.hero p.lead {
  font-size: 1.12rem;
  color: var(--text-2);
  max-width: 34em;
  margin-bottom: 26px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--cyan); color: #fff; }
.btn-primary:hover { background: var(--cyan-600); }
.btn-ghost { background: var(--bg); color: var(--text-2); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* Terminal window (hero right) */
.terminal-window {
  background: var(--terminal);
  border: 1px solid var(--terminal-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: #16202F;
  border-bottom: 1px solid var(--terminal-line);
}
.terminal-bar .dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #E5484D; } .dot-y { background: #F5A623; } .dot-g { background: #2FBF71; }
.terminal-bar .title { margin-left: 8px; color: #7C889A; font-size: 0.72rem; }
.terminal-body { padding: 16px 16px 18px; color: #C9D2DC; line-height: 1.7; }
.terminal-body .line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.terminal-body .c { color: #7DD3FC; }
.terminal-body .g { color: #6EE7A0; }
.terminal-body .a { color: #FBBF24; }
.terminal-body .dim { color: #6B7686; }

/* ---------- Section scaffolding ---------- */
.section { padding: 52px 0; }
.section--surface { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.015em; }
.section-head .sub { color: var(--muted); max-width: 46em; }
.section-head .more { font-family: var(--font-mono); font-weight: 600; font-size: 0.86rem; white-space: nowrap; color: var(--cyan); }

/* ---------- Spec / category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 2px solid var(--cyan);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  transition: border-color 0.14s ease, transform 0.14s ease;
}
.cat-tile:hover { border-color: var(--cyan); text-decoration: none; }
.cat-tile .path { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.cat-tile .path::before { content: "$"; color: var(--amber); }
.cat-tile h3 { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.cat-tile:hover h3 { color: var(--cyan); }
.cat-tile p { font-size: 0.84rem; color: var(--muted); }

/* ---------- Cards (article cards) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.card:hover { border-color: var(--cyan); box-shadow: var(--shadow-sm); text-decoration: none; }
.card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--border); position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .ext {
  position: absolute;
  top: 8px; right: 8px;
  font-family: var(--font-mono); font-size: 0.64rem; font-weight: 700;
  color: #fff; background: rgba(14, 20, 32, 0.72);
  padding: 1px 6px; border-radius: 3px;
}
.card-body { padding: 16px 18px 18px; }
.card-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 9px;
}
.card-tag::before { content: "# "; color: var(--cyan); }
.card h3 { font-size: 1.12rem; font-weight: 700; line-height: 1.32; margin-bottom: 8px; color: var(--ink); }
.card:hover h3 { color: var(--cyan); }
.card p { font-size: 0.9rem; color: var(--muted); margin-bottom: 13px; }
.card-meta { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.card-meta .dot { color: var(--border-strong); }

/* ---------- Scoreboard / top picks ---------- */
.scoreboard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.score-card {
  position: relative;
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 2px solid var(--cyan);
  border-radius: var(--radius);
  padding: 18px 20px 18px;
  color: var(--text);
  transition: border-color 0.14s ease;
}
.score-card:hover { text-decoration: none; border-color: var(--cyan); }
.score-card .rank {
  position: absolute;
  top: 14px; right: 16px;
  font-family: var(--font-mono);
  font-size: 1.9rem; font-weight: 700;
  line-height: 1; color: var(--surface-2);
}
.score-card .pick-flag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green); margin-bottom: 11px;
}
.pick-flag::before { content: "✓ "; }
.pick-flag--alt { color: var(--cyan); }
.pick-flag--value { color: var(--amber); }
.score-card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 2px; color: var(--ink); }
.score-card .model { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); margin-bottom: 13px; }
.score-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.score-badge {
  background: var(--green); color: #fff;
  border-radius: var(--radius-sm); padding: 3px 9px;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; white-space: nowrap;
}
.score-badge--neutral { background: var(--cyan); }
.score-card .price { font-family: var(--font-mono); font-size: 1.06rem; font-weight: 700; color: var(--cyan); }
.score-card .best-for { font-size: 0.88rem; color: var(--text-2); border-top: 1px dashed var(--border-strong); padding-top: 11px; }

/* ---------- Article layout ---------- */
.article-hero { padding: 40px 0 28px; border-bottom: 1px solid var(--border); background: var(--surface); }
.breadcrumb { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--cyan); }
.article-hero h1 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); line-height: 1.14; letter-spacing: -0.02em; font-weight: 800; margin-bottom: 13px; text-wrap: balance; }
.article-hero .dek { font-size: 1.12rem; color: var(--text-2); max-width: 48em; margin-bottom: 16px; }
.byline { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); flex-wrap: wrap; }
.byline .avatar {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--terminal); color: #7DD3FC; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.74rem;
}
.byline b { color: var(--text-2); }

.article-body { display: grid; grid-template-columns: 1fr 260px; gap: 46px; padding: 38px 0 60px; }
.prose { max-width: 720px; }
.prose h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.01em; margin: 34px 0 13px; }
.prose h2::before { content: "## "; color: var(--cyan); font-family: var(--font-mono); font-size: 0.9em; }
.prose h3 { font-size: 1.15rem; font-weight: 700; margin: 26px 0 9px; }
.prose p { margin-bottom: 16px; color: var(--text-2); }
.prose ul, .prose ol { margin: 0 0 16px 22px; color: var(--text-2); }
.prose li { margin-bottom: 7px; }
.prose strong { color: var(--text); }
.prose a { font-weight: 500; }
.prose img { border-radius: var(--radius); border: 1px solid var(--border); margin: 18px 0; }
.prose blockquote {
  border-left: 3px solid var(--cyan);
  background: var(--cyan-soft);
  padding: 13px 17px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 18px 0; color: var(--text-2); font-family: var(--font-mono); font-size: 0.92rem;
}
.callout {
  border: 1px solid var(--border);
  background: var(--surface);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius-sm);
  padding: 15px 17px; margin: 20px 0; font-size: 0.95rem;
}
.callout--warn { background: var(--amber-soft); border-color: #E4D3AC; border-left-color: var(--amber); }
.callout--tip { background: var(--green-soft); border-color: #BFDCC8; border-left-color: var(--green); }
.callout b.label {
  display: block;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 5px;
}

/* ---------- Sidebar (TOC) ---------- */
.toc { position: sticky; top: 108px; align-self: start; font-size: 0.84rem; border-left: 2px solid var(--border); padding-left: 15px; }
.toc .toc-title { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--cyan); margin-bottom: 10px; font-weight: 700; }
.toc ol { list-style: none; }
.toc li { margin-bottom: 7px; }
.toc a { color: var(--muted); display: block; padding: 3px 0; font-family: var(--font-mono); font-size: 0.78rem; }
.toc a:hover { color: var(--cyan); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
thead th {
  text-align: left; background: var(--terminal); color: #C9D2DC;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.7rem;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 11px 13px;
  border-bottom: 1px solid var(--terminal-line); white-space: nowrap;
}
tbody td, tbody th { padding: 11px 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--surface); }
tbody th[scope="row"] { font-weight: 600; color: var(--text); white-space: nowrap; }
.tool-name { font-weight: 700; color: var(--text); }
.price { font-family: var(--font-mono); font-weight: 700; color: var(--cyan); white-space: nowrap; }
.verdict-good { color: var(--green); font-weight: 600; }
.verdict-bad { color: var(--red); font-weight: 600; }

/* ---------- Rating badge ---------- */
.rating { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-weight: 700; color: var(--text); }
.rating .score { background: var(--green); color: #fff; border-radius: var(--radius-sm); padding: 2px 8px; font-size: 0.84rem; }

/* ---------- Sources ---------- */
.sources { margin-top: 38px; padding-top: 22px; border-top: 1px dashed var(--border-strong); }
.sources h2 { font-size: 1.15rem; margin-bottom: 11px; }
.sources h2::before { content: "## "; color: var(--cyan); font-family: var(--font-mono); }
.sources ol { padding-left: 20px; font-size: 0.82rem; color: var(--muted); }
.sources li { margin-bottom: 6px; overflow-wrap: anywhere; }
.sources li a { color: var(--cyan); }

/* ---------- Charts & data ---------- */
.chart-module {
  margin: 22px 0; background: var(--surface);
  border: 1px solid var(--border); border-top: 2px solid var(--cyan);
  border-radius: var(--radius); padding: 18px 18px 15px;
}
.chart-module .chart-title { font-weight: 700; font-size: 1.02rem; color: var(--ink); margin-bottom: 3px; }
.chart-box { width: 100%; height: 340px; }
.chart-note { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); margin-top: 9px; line-height: 1.5; }
.chart-note a { color: var(--muted); text-decoration: underline; }
.chart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

.kpi-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 6px 0 22px; }
.kpi { background: var(--bg); border: 1px solid var(--border); border-top: 2px solid var(--cyan); border-radius: var(--radius); padding: 16px 16px 15px; }
.kpi .kpi-label { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 7px; }
.kpi .kpi-value { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; color: var(--cyan); line-height: 1.1; }
.kpi .kpi-value.green { color: var(--green); }
.kpi .kpi-context { font-size: 0.8rem; color: var(--text-2); margin-top: 7px; }
.kpi .kpi-src { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); margin-top: 4px; }

/* ---------- Disclaimer ---------- */
.disclaimer-banner {
  background: var(--cyan-soft); border: 1px solid #B9D9E2; border-left: 3px solid var(--cyan);
  border-radius: var(--radius); padding: 14px 16px; font-size: 0.88rem; color: var(--text-2); margin: 6px 0 22px;
}
.disclaimer-banner b.label {
  display: block; font-family: var(--font-mono); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--cyan); margin-bottom: 4px;
}
.disclaimer-banner p:last-child { margin-bottom: 0; }

/* ---------- Roadmap ---------- */
.roadmap-list { display: flex; flex-direction: column; gap: 10px; }
.roadmap-item {
  display: flex; align-items: center; gap: 15px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; background: var(--bg);
}
.roadmap-item:hover { border-color: var(--cyan); }
.roadmap-item .idx { font-family: var(--font-mono); font-weight: 700; color: var(--cyan); font-size: 0.9rem; width: 30px; }
.roadmap-item .title { flex: 1; font-weight: 600; color: var(--text); }
.roadmap-item .title a { color: var(--text); }
.roadmap-item .title a:hover { color: var(--cyan); }
.status-pill { font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: var(--radius-sm); white-space: nowrap; }
.status-published { background: var(--green-soft); color: var(--green); }
.status-draft { background: var(--amber-soft); color: var(--amber); }
.status-planned { background: var(--surface-2); color: var(--muted); }

/* ---------- Methodology ---------- */
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.method { border: 1px solid var(--border); border-top: 2px solid var(--cyan); border-radius: var(--radius); padding: 20px 18px; background: var(--bg); }
.method .method-ico { font-family: var(--font-mono); font-size: 0.8rem; color: var(--amber); display: block; margin-bottom: 9px; }
.method h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 4px; color: var(--ink); }
.method p { font-size: 0.85rem; color: var(--muted); }

/* ---------- Category chips ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  display: inline-flex; align-items: baseline; gap: 11px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 16px; font-weight: 700; font-size: 0.95rem; color: var(--ink); background: var(--bg);
  transition: border-color 0.14s ease, color 0.14s ease;
}
.chip:hover { text-decoration: none; border-color: var(--cyan); color: var(--cyan); }
.chip .chip-ico { font-family: var(--font-mono); color: var(--amber); }
.chip .chip-count { font-family: var(--font-mono); font-weight: 400; font-size: 0.76rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--terminal); color: #9AA6B5; padding: 50px 0 26px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.site-footer .brand { color: #E8EDF2; margin-bottom: 12px; }
.site-footer p { font-size: 0.86rem; color: #7C889A; max-width: 34em; }
.site-footer h4 { color: #C9D2DC; font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 13px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #7C889A; font-size: 0.88rem; }
.site-footer a:hover { color: #7DD3FC; }
.footer-bottom { border-top: 1px solid var(--terminal-line); margin-top: 34px; padding-top: 18px; font-family: var(--font-mono); font-size: 0.72rem; color: #5D6979; }
.footer-contact { margin-top: 15px; font-size: 0.85rem; line-height: 1.5; display: flex; flex-direction: column; gap: 9px; }
.footer-contact .fc-item { display: flex; align-items: flex-start; gap: 9px; }
.footer-contact .fc-ico { width: 15px; height: 15px; flex: none; margin-top: 2px; color: #5D6979; }
.footer-contact a { color: #7DD3FC; }
.footer-contact a:hover { color: #fff; }
.footer-contact address { font-style: normal; color: #7C889A; margin: 0; line-height: 1.5; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .article-body { grid-template-columns: 1fr; }
  .toc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .scoreboard { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--terminal); border-bottom: 1px solid var(--terminal-line); padding: 10px 20px 16px; align-items: stretch; }
  .nav.open a { padding: 11px 6px; border-bottom: none; }
  .nav-toggle { display: block; }
  .card-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .kpi-strip { grid-template-columns: 1fr 1fr; }
  .hero { padding: 42px 0 36px; }
  .section { padding: 38px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .chart-box { height: 300px; }
}
