/*
 * ai-water-use-report-1.css
 * Water-Energy Nexus of AI Infrastructure — Interactive OSINT Report
 * WCAG 2.2 AA | Dark-mode primary | Fluid typography
 * Rules applied: CLAUDE.md Separation of Concerns, Modern CSS 2026 tokens,
 *   fluid typography (clamp), container grid layout, reduced-motion support.
 */

/* ── Design tokens ──────────────────────────────────────────────── */
:root {
  /* Color palette — deep ocean / water theme */
  --bg-base:        #030a14;
  --bg-surface:     #071525;
  --bg-elevated:    #0b1e35;
  --bg-highlight:   #0f2845;
  --border-subtle:  #0d2235;
  --border-medium:  #163352;

  --text-primary:   #c0d8e8;
  --text-body:      #7a9ab8;
  --text-muted:     #3d5a72;
  --text-label:     #1e3a50;

  /* Accent — water blue */
  --blue:           #00b4d8;
  --blue-dim:       rgba(0,180,216,.10);
  --blue-border:    rgba(0,180,216,.25);
  --teal:           #00d4ff;
  --teal-dim:       rgba(0,212,255,.08);
  --deep-blue:      #0077b6;

  /* Semantic */
  --risk-critical:  #ef4444;
  --risk-high:      #f97316;
  --risk-medium:    #eab308;
  --safe:           #22c55e;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Monaco', monospace;

  /* Layout */
  --sidebar-w: 220px;
  --content-max: 760px;
  --nav-h: 37px;
  --progress-h: 3px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-body);
  line-height: 1.78;
  min-height: 100vh;
  padding-top: calc(var(--nav-h) + var(--progress-h));
}

/* ── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* ── Selection ──────────────────────────────────────────────────── */
::selection { background: var(--blue-dim); color: var(--teal); }

/* ── Focus ring ─────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ── Hacker nav banner ──────────────────────────────────────────── */
#hacker-nav-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  height: var(--nav-h);
  background: #010a12;
  border-bottom: 1px dashed rgba(0,180,216,.35);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-primary);
}
#hacker-nav-banner a {
  color: #63c0f5;
  text-decoration: none;
  text-shadow: 0 0 5px rgba(104,182,255,.4);
}
#hacker-nav-banner a:hover { text-decoration: underline; }
#hacker-nav-banner .banner-title {
  color: var(--blue);
  text-shadow: 0 0 6px rgba(0,180,216,.55), 0 0 14px rgba(0,180,216,.2);
  letter-spacing: -0.03em;
}
#hacker-nav-banner .banner-tag { color: #1a3a50; font-size: 11px; }
#hacker-nav-banner .banner-v   { color: var(--deep-blue); font-size: 11px; }

/* ── Reading progress bar ───────────────────────────────────────── */
#reading-progress {
  position: fixed;
  top: var(--nav-h); left: 0;
  width: 0%;
  height: var(--progress-h);
  background: linear-gradient(90deg, var(--blue), var(--teal));
  z-index: 9998;
  transition: width .1s linear;
  pointer-events: none;
}

/* ── Skip link ──────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -4rem; left: 1rem;
  background: var(--blue);
  color: #000;
  padding: .45rem 1rem;
  border-radius: 0 0 6px 6px;
  font-weight: 700;
  font-size: .875rem;
  z-index: 9999;
  text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: calc(var(--nav-h) + var(--progress-h)); }

/* ── Page layout ────────────────────────────────────────────────── */
.page-wrapper {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-areas: "sidebar main";
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 1rem;
  gap: 0 2rem;
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.sidebar {
  grid-area: sidebar;
  position: sticky;
  top: calc(var(--nav-h) + var(--progress-h) + 1rem);
  height: calc(100vh - var(--nav-h) - var(--progress-h) - 2rem);
  overflow-y: auto;
  overflow-x: hidden;
  padding-block: 2rem .5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
}

.toc-label {
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--text-label);
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: .65rem;
  padding-left: .75rem;
  border-left: 2px solid var(--border-medium);
}

.toc-list { list-style: none; font-size: .78rem; }
.toc-list li { margin-block: .1rem; }

.toc-list a {
  display: block;
  padding: .28rem .75rem;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  line-height: 1.4;
  transition: color .18s, border-color .18s, background .18s;
}
.toc-list a:hover {
  color: var(--text-body);
  background: var(--bg-elevated);
  border-left-color: var(--border-medium);
}
.toc-list a.active {
  color: var(--blue);
  border-left-color: var(--blue);
  background: var(--blue-dim);
}

/* ── Main content ───────────────────────────────────────────────── */
main {
  grid-area: main;
  max-width: var(--content-max);
  padding-block: 2.5rem 6rem;
}

/* ── Report section ─────────────────────────────────────────────── */
.report-section {
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}
.report-section:last-child { border-bottom: none; }

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--blue);
  margin-bottom: .5rem;
}

.section-heading {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 1.5rem;
  letter-spacing: -.02em;
}

.section-subheading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 .75rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-body);
  font-size: .93rem;
}

strong { color: var(--text-primary); }

sup a {
  color: var(--blue);
  font-size: .68rem;
  text-decoration: none;
}
sup a:hover { text-decoration: underline; }

/* ── Hero ───────────────────────────────────────────────────────── */
.report-hero {
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-medium);
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1.25rem;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .58rem;
  border-radius: 3px;
}
.badge-blue  { background: var(--blue-dim);   color: var(--blue);  border: 1px solid var(--blue-border); }
.badge-teal  { background: var(--teal-dim);   color: var(--teal);  border: 1px solid rgba(0,212,255,.22); }
.badge-muted { background: #0a1a28;           color: var(--text-muted); border: 1px solid var(--border-subtle); }
.badge-risk  { background: rgba(239,68,68,.08); color: var(--risk-critical); border: 1px solid rgba(239,68,68,.25); }

.report-title {
  font-size: clamp(1.55rem, 4vw, 2.3rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -.03em;
  margin-bottom: .75rem;
}

.report-subtitle {
  font-size: clamp(.88rem, 2vw, 1rem);
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  max-width: 620px;
}

.version-banner {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--blue);
  padding: .3rem .75rem;
  border-radius: 0 4px 4px 0;
  margin-bottom: 2rem;
}

/* ── Hero stats ─────────────────────────────────────────────────── */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .9rem;
  margin-top: 1.5rem;
}

.hero-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--blue);
  border-radius: 0 0 8px 8px;
  padding: .9rem .75rem;
  text-align: center;
}

.stat-val {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: .25rem;
  line-height: 1.2;
}
.stat-val.blue   { color: var(--blue); }
.stat-val.teal   { color: var(--teal); }
.stat-val.orange { color: var(--risk-high); }
.stat-val.red    { color: var(--risk-critical); }
.stat-val.green  { color: var(--safe); }

.stat-lbl {
  font-size: .68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .05em;
  line-height: 1.4;
  display: block;
}

/* ── Insight cards ──────────────────────────────────────────────── */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.1rem;
  margin: 1.5rem 0;
}

.insight-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.2rem;
}

.insight-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--border-medium);
  line-height: 1;
  margin-bottom: .5rem;
}

.insight-title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .4rem;
}

.insight-body {
  font-size: .81rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── FWPCOA claim cards ─────────────────────────────────────────── */
.claim-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.1rem;
}

.claim-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
}

.claim-label {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  flex: 1;
}

.verdict-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .18rem .5rem;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.verdict-accurate { background: rgba(34,197,94,.1);  color: var(--safe);           border: 1px solid rgba(34,197,94,.3); }
.verdict-revised  { background: rgba(249,115,22,.1); color: var(--risk-high);      border: 1px solid rgba(249,115,22,.28); }
.verdict-outdated { background: rgba(239,68,68,.1);  color: var(--risk-critical);  border: 1px solid rgba(239,68,68,.28); }

.claim-analysis {
  font-size: .84rem;
  color: var(--text-body);
  line-height: 1.7;
  margin: 0;
}

/* ── Callout boxes ──────────────────────────────────────────────── */
.callout {
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  font-size: .88rem;
  line-height: 1.7;
}
.callout-info { background: var(--blue-dim); border: 1px solid var(--blue-border); color: var(--text-body); }
.callout-warn { background: rgba(249,115,22,.08); border: 1px solid rgba(249,115,22,.25); color: #c4906e; }
.callout-risk { background: rgba(239,68,68,.07);  border: 1px solid rgba(239,68,68,.22);  color: #c47070; }
.callout strong { color: var(--text-primary); }

/* ── Stat callout ───────────────────────────────────────────────── */
.stat-callout {
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--blue);
  border-radius: 0 8px 8px 0;
  padding: 1.2rem 1.5rem;
  margin: 2rem 0;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.sc-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--blue);
  flex-shrink: 0;
  line-height: 1.2;
}
.sc-text { font-size: .84rem; color: var(--text-body); line-height: 1.65; }

/* ── Data tables ────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}
table { width: 100%; border-collapse: collapse; font-size: .83rem; }
thead { background: var(--bg-elevated); }
th {
  padding: .7rem 1rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: .67rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--blue);
  border-bottom: 1px solid var(--border-medium);
}
td {
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-body);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-surface); }

/* ── Chart containers ───────────────────────────────────────────── */
.chart-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.chart-title {
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--blue);
  margin-bottom: 1rem;
}
.chart-caption {
  font-size: .77rem;
  color: var(--text-muted);
  margin-top: .7rem;
  font-style: italic;
  line-height: 1.55;
}
.chart-canvas-wrapper {
  position: relative;
  height: 280px;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.1rem;
}

/* ── Location accordions ────────────────────────────────────────── */
.accordion-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  margin-bottom: .7rem;
  overflow: hidden;
}
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1.2rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  font-size: .9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  transition: background .15s;
}
.accordion-trigger:hover { background: var(--bg-elevated); }
.accordion-trigger[aria-expanded="true"] {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}
.accordion-icon {
  flex-shrink: 0;
  width: 18px; height: 18px;
  color: var(--blue);
  transition: transform .2s ease;
  margin-left: auto;
}
.accordion-trigger[aria-expanded="true"] .accordion-icon { transform: rotate(180deg); }
.accordion-region {
  font-family: var(--font-mono);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--blue);
  flex-shrink: 0;
}
.risk-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .12rem .38rem;
  border-radius: 3px;
}
.risk-critical { background: rgba(239,68,68,.1);  color: var(--risk-critical); border: 1px solid rgba(239,68,68,.25); }
.risk-high     { background: rgba(249,115,22,.1); color: var(--risk-high);     border: 1px solid rgba(249,115,22,.25); }
.risk-medium   { background: rgba(234,179,8,.1);  color: var(--risk-medium);   border: 1px solid rgba(234,179,8,.25); }

/* Accordion panel animation via grid-template-rows trick */
.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .25s ease;
}
.accordion-content[aria-hidden="false"] { grid-template-rows: 1fr; }
.accordion-inner { overflow: hidden; }
.accordion-content[aria-hidden="false"] .accordion-inner { padding: 1.2rem; }

/* ── Debate cards ───────────────────────────────────────────────── */
.debate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin: 1.5rem 0;
}
.debate-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.25rem;
  border-top: 4px solid;
}
.debate-card.pro { border-top-color: var(--safe); }
.debate-card.con { border-top-color: var(--risk-critical); }
.debate-label {
  font-family: var(--font-mono);
  font-size: .67rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .75rem;
}
.pro .debate-label { color: var(--safe); }
.con .debate-label { color: var(--risk-critical); }
.debate-card ul { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.debate-card li {
  font-size: .83rem;
  color: var(--text-body);
  line-height: 1.65;
  padding-left: 1rem;
  position: relative;
}
.debate-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  font-size: .72rem;
}
.pro li::before { color: var(--safe); }
.con li::before { color: var(--risk-critical); }

/* ── Policy cards ───────────────────────────────────────────────── */
.policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .9rem;
  margin: 1.5rem 0;
}
.policy-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.1rem;
  border-top: 3px solid var(--blue);
}
.policy-type {
  font-family: var(--font-mono);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--blue);
  margin-bottom: .45rem;
}
.policy-title {
  font-size: .86rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .4rem;
}
.policy-body { font-size: .79rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* ── Assumptions table ──────────────────────────────────────────── */
.asmpt-table td:first-child { color: var(--text-primary); font-size: .83rem; }
.asmpt-table td:last-child  { font-size: .81rem; }

/* ── Glossary ───────────────────────────────────────────────────── */
.glossary-grid { display: grid; gap: .65rem; margin-top: 1rem; }
.glossary-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: .7rem 1rem;
}
.glossary-term {
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: .25rem;
}
.glossary-def { font-size: .81rem; color: var(--text-body); line-height: 1.6; margin: 0; }

/* ── Works cited ────────────────────────────────────────────────── */
.works-cited-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.works-cited-list li {
  font-size: .77rem;
  color: var(--text-muted);
  line-height: 1.65;
  padding-left: 2.25rem;
  position: relative;
}
.works-cited-list li .cite-num {
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  color: var(--text-label);
  font-size: .7rem;
}
.works-cited-list a {
  color: var(--blue);
  text-decoration: none;
  word-break: break-all;
}
.works-cited-list a:hover { text-decoration: underline; }

/* ── Footer ─────────────────────────────────────────────────────── */
.report-footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 3rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-label);
  line-height: 1.8;
}
.report-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}
.report-footer a:hover { color: var(--blue); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    grid-template-areas: "main";
    padding-inline: .75rem;
  }
  .sidebar { display: none; }
  main { padding-block: 1.5rem 4rem; }
  .debate-grid { grid-template-columns: 1fr; }
  .hero-stats  { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  #hacker-nav-banner .banner-title { font-size: 11px; }
  .stat-callout { flex-direction: column; gap: .5rem; }
}

/* ── Scale / comparison callout ─────────────────────────────────── */
.scale-stat {
  text-align: center;
  padding: 1.1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}
.scale-val {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: .3rem;
}
.scale-label {
  font-size: .75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .07em;
  line-height: 1.4;
  display: block;
}
.scale-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .9rem;
  margin: 1.25rem 0;
}

/* ── Placeholder demo block (for ai-water-use-fact-2.md) ─────────── */
.placeholder-demo {
  background: var(--bg-surface);
  border: 1px dashed var(--border-medium);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.75rem 0;
  text-align: center;
}
.placeholder-demo .ph-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: .5rem;
  opacity: .6;
}
.placeholder-demo .ph-title {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: .4rem;
}
.placeholder-demo .ph-body {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}
.placeholder-demo .ph-tag {
  display: inline-block;
  margin-top: .75rem;
  font-family: var(--font-mono);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .18rem .5rem;
  border-radius: 3px;
  background: rgba(0,180,216,.08);
  color: var(--blue);
  border: 1px solid var(--blue-border);
}

/* ── Utility ─────────────────────────────────────────────────────── */
.mono        { font-family: var(--font-mono); }
.text-blue   { color: var(--blue); }
.text-teal   { color: var(--teal); }
.text-orange { color: var(--risk-high); }
.text-red    { color: var(--risk-critical); }
.text-green  { color: var(--safe); }
.text-muted  { color: var(--text-muted); }
.mt-sm       { margin-top: .75rem; }
.mt-md       { margin-top: 1.5rem; }

/* ═══════════════════════════════════════════════════════════════════
   INTERACTIVE DEMO CARDS  (ai-water-use-fact-2.md)
   CLAUDE.md rules applied: §1 separation-of-concerns, §2 CSS tokens,
   §3 WCAG 2.2 AA focus/keyboard, §5 clean minimal design.
══════════════════════════════════════════════════════════════════ */
.demo-card {
  background: linear-gradient(160deg, #021018 0%, #040d1a 100%);
  border: 1px solid rgba(0, 180, 216, .22);
  border-radius: 10px;
  padding: 1.4rem 1.5rem 1.2rem;
  margin: 1.75rem 0;
  position: relative;
}
.demo-card::after {
  content: '\25C8 LIVE DEMO';
  position: absolute;
  top: .65rem; right: .85rem;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--blue);
  opacity: .5;
  pointer-events: none;
}
.demo-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 .25rem;
  letter-spacing: -.01em;
}
.demo-subtitle {
  font-size: .78rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  line-height: 1.5;
}
.demo-subtitle .scope-note {
  display: block;
  font-size: .7rem;
  opacity: .7;
  margin-top: .2rem;
}
.demo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem 1.2rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.ctrl-group {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.ctrl-label {
  font-size: .72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  user-select: none;
  line-height: 1.3;
}
.ctrl-label strong { color: var(--blue); }

input[type="range"].demo-range {
  -webkit-appearance: none;
  appearance: none;
  width: 180px;
  height: 4px;
  background: rgba(0, 180, 216, .15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  vertical-align: middle;
}
input[type="range"].demo-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px rgba(0, 180, 216, .55);
  cursor: pointer;
  transition: box-shadow .15s;
}
input[type="range"].demo-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(0,180,216,.25), 0 0 8px rgba(0,180,216,.55);
}
input[type="range"].demo-range::-moz-range-thumb {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--blue);
  border: none;
  box-shadow: 0 0 8px rgba(0, 180, 216, .55);
  cursor: pointer;
}
.pill-group {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
  align-items: center;
}
.pill-btn {
  padding: .2rem .55rem;
  border: 1px solid rgba(0,180,216,.22);
  border-radius: 20px;
  font-size: .68rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  line-height: 1.4;
  white-space: nowrap;
}
.pill-btn:hover { border-color: var(--blue); color: var(--teal); }
.pill-btn.active {
  background: rgba(0,180,216,.14);
  border-color: var(--blue);
  color: var(--blue);
  font-weight: 600;
}
.pill-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.scope-toggle-wrap {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.scope-toggle-wrap input[type="checkbox"] {
  accent-color: var(--blue);
  cursor: pointer;
  width: 13px; height: 13px;
}
.dur-group { display: flex; gap: .3rem; }
.dur-btn {
  padding: .18rem .48rem;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 4px;
  font-size: .68rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: all .15s;
}
.dur-btn.active {
  background: rgba(0,180,216,.12);
  border-color: rgba(0,180,216,.4);
  color: var(--blue);
}
.dur-btn:hover:not(.active) {
  border-color: rgba(255,255,255,.2);
  color: var(--text-body);
}
.dur-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.demo-result {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  margin: .5rem 0 .9rem;
  flex-wrap: wrap;
}
.result-num {
  font-size: 2.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--blue);
  line-height: 1;
  text-shadow: 0 0 20px rgba(0,180,216,.3);
  transition: color .25s;
  letter-spacing: -.03em;
}
.result-unit {
  font-size: .9rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.result-tag {
  font-size: .78rem;
  color: var(--teal);
  font-style: italic;
  flex-basis: 100%;
  margin-top: .1rem;
}

/* Equivalence mini-cards (Demo 1) */
.equi-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .5rem;
  margin: .5rem 0 .9rem;
}
.equi-card {
  background: rgba(0,180,216,.04);
  border: 1px solid rgba(0,180,216,.1);
  border-radius: 6px;
  padding: .5rem .65rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.equi-pct {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--teal);
  line-height: 1.2;
}
.equi-lbl {
  font-size: .64rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Comparison bar table (Demos 2 & 3) */
.cmp-table { width: 100%; border-collapse: collapse; }
.cmp-table td { padding: .22rem .3rem; }
.cmp-lbl {
  font-size: .7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-align: right;
  padding-right: .6rem;
  white-space: nowrap;
  width: 1%;
  min-width: 110px;
}
.cmp-lbl.lbl-hi { color: var(--blue); }
.cmp-track {
  background: rgba(255,255,255,.05);
  border-radius: 3px;
  height: 12px;
  overflow: hidden;
  position: relative;
  min-width: 80px;
}
.cmp-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  border-radius: 3px;
  transition: width .45s cubic-bezier(.4,0,.2,1);
  min-width: 3px;
}
.cmp-fill.f-ai   { background: linear-gradient(90deg, var(--blue), var(--teal)); box-shadow: 0 0 5px rgba(0,180,216,.4); }
.cmp-fill.f-agri { background: rgba(80,190,80,.55); }
.cmp-fill.f-mega { background: rgba(249,115,22,.45); }
.cmp-val {
  font-size: .67rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  padding-left: .4rem;
  white-space: nowrap;
  width: 1%;
}
.cmp-val.val-hi { color: var(--blue); font-weight: 600; }

/* Equivalence callout */
.equiv-callout {
  margin-top: .7rem;
  padding: .55rem .8rem;
  background: rgba(0,180,216,.06);
  border-left: 2px solid rgba(0,180,216,.38);
  border-radius: 0 5px 5px 0;
  font-size: .76rem;
  color: var(--text-body);
  font-family: var(--font-mono);
  line-height: 1.55;
  min-height: 2.5em;
}
.equiv-callout strong { color: var(--teal); }

/* Chart container */
.demo-chart-wrap { position: relative; margin-top: .75rem; }

/* Compact variant — inside accordions */
.demo-card.demo-compact {
  padding: 1rem 1.1rem .9rem;
  margin: 1rem 0 0;
  border-color: rgba(0,180,216,.15);
}
.demo-compact .demo-title  { font-size: .88rem; }
.demo-compact .result-num  { font-size: 2.1rem; }
.demo-compact .demo-result { margin: .4rem 0 .7rem; }
.demo-compact input[type="range"].demo-range { width: 140px; }

/* Source note */
.demo-src {
  font-size: .63rem;
  color: #1a3050;
  margin-top: .7rem;
  font-family: var(--font-mono);
  line-height: 1.5;
  border-top: 1px solid rgba(0,180,216,.06);
  padding-top: .5rem;
}
