/* Styles for the weekly brief pages (rendered by brief_renderer.py from templates/brief.html). */
  :root {
    --bg: #0c110f;
    --bg-2: #111815;
    --surface: #151d19;
    --line: rgba(236, 231, 220, 0.09);
    --line-strong: rgba(236, 231, 220, 0.16);
    --text: #ece7dc;
    --body: #cfcbc1;
    --muted: #a2a89f;
    --faint: #737a72;
    --gold: #c9a55c;
    --gold-soft: #e2c88f;
    --green: #2f6b4f;
    --series: #c9a55c;
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --wrap: 1200px;
    --gutter: clamp(16px, 4vw, 40px);
  }

  * { box-sizing: border-box; }
  html { scroll-padding-top: 96px; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.65 var(--sans);
    -webkit-font-smoothing: antialiased;
  }
  a { color: inherit; text-decoration: none; }
  img { display: block; }
  button { font: inherit; color: inherit; }
  .wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

  .mark { width: 36px; height: auto; flex: none; }

  /* Header */
  .site-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(12, 17, 15, 0.86);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
  .brand { display: flex; align-items: center; gap: 12px; }
  .brand-name { font: 400 21px/1 var(--serif); letter-spacing: 0.01em; }
  .nav { display: flex; align-items: center; gap: 36px; }
  .nav a { font-size: 14px; color: var(--muted); transition: color .2s; }
  .nav a:hover, .nav a[aria-current] { color: var(--text); }
  .nav .btn { color: var(--text); }
  .menu-toggle { display: none; background: none; border: 0; color: var(--text); padding: 8px; margin-right: -8px; cursor: pointer; }
  .progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--gold); }

  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font: 500 14px/1 var(--sans); letter-spacing: 0.01em;
    padding: 14px 22px; border-radius: 999px; background: none; cursor: pointer;
    border: 1px solid var(--line-strong);
    transition: background .2s, border-color .2s, color .2s;
  }
  .btn:hover { border-color: var(--gold); }
  .btn-sm { padding: 10px 18px; }
  .link-arrow { font: 500 14px/1 var(--sans); color: var(--gold-soft); display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
  .link-arrow span { transition: transform .2s; }
  a:hover .link-arrow span { transform: translateX(4px); }

  .series {
    display: inline-flex; align-items: center; gap: 8px;
    font: 500 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--series);
  }
  .series::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  [data-series="energy-transition"] { --series: #c9a55c; }
  [data-series="emerging-tech"] { --series: #8fbfa3; }
  [data-series="materials"] { --series: #c98a6a; }

  /* Article hero */
  .article-hero {
    background: radial-gradient(ellipse 55% 90% at 90% 0%, rgba(47, 107, 79, 0.3), transparent 70%);
    border-bottom: 1px solid var(--line);
  }
  .article-hero .wrap { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 64px); }
  .crumbs { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--faint); margin-bottom: clamp(32px, 5vw, 56px); }
  .crumbs a:hover { color: var(--text); }
  .article-hero h1 {
    font: 300 clamp(36px, 5.4vw, 68px)/1.05 var(--serif); letter-spacing: -0.02em;
    margin: 24px 0 0; max-width: 18ch;
  }
  .meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
  .meta-items { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 14px; color: var(--muted); }
  .meta-items b { display: block; font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
  .share { display: flex; gap: 8px; }
  .share a, .share button {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: none; cursor: pointer;
    display: grid; place-items: center; color: var(--muted); transition: border-color .2s, color .2s; position: relative;
  }
  .share a:hover, .share button:hover { border-color: var(--gold); color: var(--text); }
  .copied { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); font-size: 12px; padding: 4px 10px; border-radius: 6px; white-space: nowrap; opacity: 0; transition: opacity .2s; pointer-events: none; }
  .copied.show { opacity: 1; }

  /* Layout */
  .layout { display: grid; grid-template-columns: 220px minmax(0, 680px); gap: clamp(40px, 7vw, 112px); justify-content: center; padding-top: clamp(48px, 7vw, 80px); padding-bottom: clamp(64px, 9vw, 104px); }
  .toc { position: sticky; top: 104px; align-self: start; font-size: 14px; }
  .toc h2 { font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 0 0 16px; }
  .toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
  .toc a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 1px solid transparent; color: var(--faint); line-height: 1.4; transition: color .2s, border-color .2s; }
  .toc a:hover { color: var(--text); }
  .toc a.active { color: var(--text); border-left-color: var(--gold); }
  .toc .sub a { padding-left: 28px; font-size: 13px; }

  /* Prose */
  .prose { color: var(--body); font-size: 17px; line-height: 1.75; }
  .prose p { margin: 0 0 1.3em; }
  .prose h2 {
    font: 400 clamp(28px, 3vw, 36px)/1.15 var(--serif); color: var(--text); letter-spacing: -0.01em;
    margin: 2.4em 0 1em; padding-top: 1.2em; border-top: 1px solid var(--line);
  }
  .prose h3 { font: 500 21px/1.3 var(--serif); color: var(--text); margin: 2em 0 .6em; }
  .prose h3.label { font: 500 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 18px; }
  .prose strong { color: var(--text); font-weight: 600; }
  .prose a.src {
    color: var(--text); text-decoration: underline; text-decoration-color: rgba(201, 165, 92, 0.45);
    text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color .2s;
  }
  .prose a.src:hover { text-decoration-color: var(--gold); }
  .prose sup.fn { font: 600 10px/0 var(--sans); color: var(--gold); margin-left: 2px; }

  .layout.no-toc { grid-template-columns: minmax(0, 680px); }
  .no-toc .toc { display: none; }
  .prose p.lede { font: 300 clamp(19px, 1.9vw, 22px)/1.6 var(--serif); color: var(--text); margin-bottom: 1.6em; }
  .summary { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(24px, 4vw, 40px); margin-bottom: 40px; }
  .summary p { font: 300 clamp(19px, 1.9vw, 22px)/1.6 var(--serif); color: var(--text); margin: 0; }
  .summary a.src { text-decoration-color: rgba(201, 165, 92, 0.35); }

  .dev { display: grid; grid-template-columns: 44px 1fr; gap: 0 8px; margin-top: 2.2em; }
  .dev .n { font: 300 28px/1.2 var(--serif); color: var(--gold); }
  .dev h3 { margin-top: 0; }

  .callout { border-left: 2px solid var(--gold); padding: 4px 0 4px 28px; margin: 0 0 2em; }
  .callout p { margin-bottom: 0; }

  .risks { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 1em; }
  .risk { border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 6px; font-size: 15px; line-height: 1.65; }
  .risk h4 { font: 500 17px/1.3 var(--serif); color: var(--text); margin: 0 0 10px; }

  .sources { margin-top: 3em; padding-top: 1.6em; border-top: 1px solid var(--line); }
  .sources h2 { all: unset; display: block; font: 500 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 18px; }
  .sources ol { margin: 0; padding: 0; list-style: none; counter-reset: s; font-size: 14px; }
  .sources li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .sources li::before { content: counter(s); color: var(--gold); font-size: 12px; padding-top: 2px; }
  .sources a { color: var(--muted); word-break: break-word; }
  .sources a:hover { color: var(--text); }
  .sources a b { color: var(--text); font-weight: 500; margin-right: 8px; }

  .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
  .tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 12px; }

  .disclaimer { margin-top: 40px; padding: 20px 24px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; line-height: 1.6; color: var(--faint); }
  .disclaimer b { color: var(--muted); font-weight: 500; }

  /* Related */
  .related { background: var(--bg-2); border-top: 1px solid var(--line); padding: clamp(64px, 9vw, 104px) 0; }
  .related-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
  .related-head h2 { font: 300 clamp(30px, 3.6vw, 44px)/1.1 var(--serif); margin: 0; letter-spacing: -0.015em; }
  .related-head h2 em { font-style: italic; color: var(--gold-soft); }
  .rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .rel { display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); transition: border-color .25s; }
  .rel:hover { border-color: var(--line-strong); }
  .rel-top { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--faint); }
  .rel h3 { font: 400 21px/1.3 var(--serif); margin: 20px 0 28px; }
  .rel .link-arrow { margin-top: auto; }

  .pager { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
  .pager a { padding: 24px 28px; border: 1px solid var(--line); border-radius: 16px; transition: border-color .25s; }
  .pager a:hover { border-color: var(--gold); }
  .pager small { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
  .pager strong { font: 400 18px/1.35 var(--serif); }
  .pager .next { text-align: right; grid-column: 2; }

  /* Footer */
  footer { border-top: 1px solid var(--line); padding: 64px 0 40px; }
  .foot-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
  .foot-tag { font: 300 italic 22px/1.3 var(--serif); color: var(--muted); margin: 20px 0 0; }
  .foot-col h4 { font: 500 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 0 0 18px; }
  .foot-col a { display: block; color: var(--muted); font-size: 14px; padding: 5px 0; }
  .foot-col a:hover { color: var(--text); }
  .foot-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; font-size: 12px; color: var(--faint); }

  /* Responsive */
  @media (max-width: 1000px) {
    .layout { grid-template-columns: minmax(0, 680px); }
    .toc { display: none; }
    .rel-grid { grid-template-columns: 1fr; }
  }
  @media (max-width: 760px) {
    .nav { display: none; }
    .nav.open {
      display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
      position: absolute; top: 72px; left: 0; right: 0;
      padding: 24px var(--gutter) 28px; background: var(--bg); border-bottom: 1px solid var(--line);
    }
    .nav.open a { font-size: 17px; color: var(--text); }
    .menu-toggle { display: block; }
    .prose { font-size: 16px; }
    .risks { grid-template-columns: 1fr; }
    .dev { grid-template-columns: 1fr; }
    .dev .n { font-size: 22px; margin-bottom: 6px; }
    .callout { padding-left: 18px; }
    .pager { grid-template-columns: 1fr; }
    .pager .next { grid-column: auto; }
    .foot-top { grid-template-columns: 1fr 1fr; }
    .foot-top > :first-child { grid-column: 1 / -1; }
  }
  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
  }
