:root {
  --ink: #111318;
  --ink-soft: #3f434c;
  --muted: #737984;
  --line: #dedfe2;
  --paper: #ffffff;
  --canvas: #f4f4f2;
  --surface: #f8f8f6;
  --night: #111111;
  --night-soft: #1b1b1b;
  --brand: #f4bd18;
  --brand-strong: #dca500;
  --danger: #c63d42;
  --radius: 8px;
  --font-ui: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* Editorial chrome */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--night);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}
.utility-bar {
  border-bottom: 1px solid rgba(255,255,255,.1);
  color: #aaa;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.nav-inner {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
}
.utility-inner {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.utility-inner a:hover { color: var(--brand); }
.primary-nav {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.nav-logo {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--night);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: -.08em;
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: #d6d6d6;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--brand); }
.nav-cta {
  justify-self: end;
  padding: 9px 15px;
  border-radius: 4px;
  background: var(--brand);
  color: var(--night);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.nav-cta:hover { background: #ffd14b; }

/* Story layout */
.editorial-shell {
  width: min(1220px, calc(100% - 40px));
  margin: 42px auto 80px;
  display: grid;
  grid-template-columns: minmax(0, 820px) minmax(260px, 320px);
  gap: 52px;
  align-items: start;
}
.story-column { min-width: 0; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 12px;
}
.breadcrumbs a { font-weight: 600; }
.breadcrumbs a:hover { color: var(--brand-strong); }
.breadcrumbs span[aria-current] { color: var(--ink); }
.story-header {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.story-kicker,
.sidebar-label {
  display: inline-block;
  color: #8a6800;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.story-kicker {
  padding: 5px 8px;
  background: #fff0b8;
  border-radius: 3px;
}
.keyword-title {
  max-width: 780px;
  margin: 18px 0 14px;
  color: var(--ink);
  font-size: clamp(38px, 5.4vw, 64px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.02;
}
.story-dek {
  max-width: 720px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1.45;
}
.story-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
}
.author-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--night);
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: 10px;
}
.story-meta strong,
.story-meta small { display: block; line-height: 1.25; }
.story-meta strong { color: var(--ink); font-size: 12px; }
.story-meta small { margin-top: 2px; color: var(--muted); }
.meta-separator { width: 1px; height: 28px; margin: 0 5px; background: var(--line); }

/* Parsed article */
.post-article {
  margin-top: 30px;
  padding: 34px 38px 42px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid #e7e7e4;
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(18,20,24,.05);
}
.post-article > figure:first-child { margin: -34px -38px 32px; }
.post-article figure { margin: 28px 0; }
.post-article img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}
.post-article p {
  margin: 0 0 20px;
  color: #262a31;
  font-size: 18px;
  line-height: 1.72;
}
.post-article > p:first-of-type {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.58;
}
.post-article h2 {
  margin: 42px 0 16px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -.025em;
}
.post-article h3 {
  margin: 27px 0 10px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.3;
}
.post-article h3 a {
  border-bottom: 2px solid #f3cf61;
  transition: background .15s ease;
}
.post-article h3 a:hover { background: #fff3bf; }
.post-article ul,
.post-article ol { margin: 16px 0 24px; padding-left: 25px; }
.post-article li { margin: 8px 0; font-size: 17px; }
.post-article blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  background: #fff8db;
  border-left: 4px solid var(--brand);
  font-size: 19px;
}
.post-article table {
  width: 100%;
  margin: 28px 0;
  border-collapse: collapse;
  font-size: 14px;
}
.post-article th,
.post-article td { padding: 12px; border: 1px solid var(--line); text-align: left; }
.post-article th { background: var(--night); color: #fff; }
.post-article tr:nth-child(even) td { background: var(--surface); }
.post-article .related-links,
.post-article ul.related-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  list-style: none;
}
.post-article .related-links a {
  display: block;
  padding: 11px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
}
.post-article .related-links a:hover { border-color: var(--brand-strong); }

.article-source { font-size: 13px; color: var(--muted); }
.article-source a { text-decoration: underline; }
.risk-note {
  margin-top: 18px;
  padding: 18px 20px;
  background: #fff9e5;
  border: 1px solid #f0d77e;
  border-radius: var(--radius);
  color: #51420d;
  font-size: 13px;
  line-height: 1.55;
}
.content-blocks { margin-top: 26px; }

/* Sidebar */
.story-sidebar {
  position: sticky;
  top: 132px;
  display: grid;
  gap: 16px;
}
.sidebar-card {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sidebar-accent { background: var(--night); border-color: var(--night); color: #fff; }
.sidebar-card h2 { margin: 10px 0 8px; font-size: 24px; line-height: 1.16; }
.sidebar-card p { margin: 0; color: #aeb0b4; font-size: 14px; line-height: 1.55; }
.sidebar-card > a {
  display: block;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}
.sidebar-card > a:last-child { border-bottom: 0; }
.sidebar-card > a:hover { color: #8a6800; }
.network-card .related-links { margin: 10px 0 0; padding: 0; list-style: none; }
.network-card .related-links li { border-bottom: 1px solid var(--line); }
.network-card .related-links li:last-child { border-bottom: 0; }
.network-card .related-links a { display: block; padding: 10px 0; font-size: 13px; font-weight: 600; }

/* Static pages and HTML sitemap */
.page-wrap,
.ai-article-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 38px auto 70px;
}
.page-wrap .page-wrap { width: 100%; margin: 16px 0 30px; }
.ai-article { min-height: 65vh; padding: 34px 0 70px; }
.ai-article-inner {
  max-width: 820px;
  padding: 34px 38px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ai-article-title { margin: 0 0 24px; font-size: clamp(34px, 5vw, 54px); line-height: 1.05; }
.ai-article-body p { color: var(--ink-soft); font-size: 17px; line-height: 1.7; }
.related-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 14px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}
.related-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.related-link {
  display: block;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}
.related-link:hover { border-color: var(--brand-strong); color: var(--ink); }

/* Shared block compatibility */
.blk,
.block,
.card { border-radius: var(--radius); }
.blk-related,
.blk-comments,
.blk-news,
.blk-faq,
.blk-network { margin-top: 22px; }
.post-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.post-thumb { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 5px; }

.site-footer {
  padding: 42px max(24px, calc((100vw - 1220px) / 2));
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 30px;
  background: var(--night);
  color: #fff;
}
.site-footer strong { display: block; font-size: 18px; }
.site-footer div span,
.footer-copy { color: #858585; font-size: 12px; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer a { color: #cfcfcf; font-size: 13px; }
.site-footer a:hover { color: var(--brand); }

@media (max-width: 960px) {
  .primary-nav { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .editorial-shell { grid-template-columns: 1fr; gap: 28px; }
  .story-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .network-card { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .nav-inner,
  .editorial-shell { width: min(100% - 24px, 1220px); }
  .utility-inner { justify-content: center; }
  .utility-inner a { display: none; }
  .primary-nav { min-height: 62px; }
  .nav-logo { font-size: 15px; }
  .brand-mark { width: 30px; height: 30px; }
  .nav-cta { padding: 8px 10px; font-size: 10px; }
  .editorial-shell { margin-top: 24px; }
  .breadcrumbs { margin-bottom: 18px; }
  .keyword-title { font-size: clamp(34px, 12vw, 48px); }
  .story-dek { font-size: 17px; }
  .post-article { padding: 25px 20px 30px; }
  .post-article > figure:first-child { margin: -25px -20px 24px; }
  .post-article p { font-size: 17px; }
  .post-article h2 { margin-top: 34px; font-size: 25px; }
  .post-article .related-links { grid-template-columns: 1fr; }
  .story-sidebar { grid-template-columns: 1fr; }
  .network-card { grid-column: auto; }
  .site-footer { grid-template-columns: 1fr; gap: 18px; }
  .site-footer nav { flex-wrap: wrap; }
  .page-wrap,
  .ai-article-inner { width: min(100% - 24px, 1120px); }
  .ai-article-inner { padding: 25px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
