/* impact.css — styles for community-impact.html (the data-center community-harm
 * report). Builds on css/seo.css (shared header/footer/base + :root tokens). */

:root {
  --water: #4aa8ff;
  --energy: #f7c431;
  --air: #ff6b6b;
  --land: #c98b3a;
  --noise: #b88bff;
  --warn: #ff7a7a;
}

/* ---- In-page sticky sub-navigation ---- */
.impact-subnav {
  position: sticky; top: 57px; z-index: 9;
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 10px 0; margin: 0 0 8px;
  background: rgba(10, 14, 26, 0.82); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--panel-border);
}
.impact-subnav a {
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--panel-border); background: var(--panel);
}
.impact-subnav a:hover { color: var(--text); border-color: rgba(56, 232, 200, 0.4); text-decoration: none; }

/* ---- Hero ---- */
.impact-hero h1 { max-width: 18ch; }
.impact-hero .lede { margin-bottom: 14px; }
.byline {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-dim); margin: 0 0 8px;
}
.byline .dot-cite { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* ---- The infographic ---- */
.infographic {
  margin: 26px 0 10px;
  border: 1px solid var(--panel-border); border-radius: var(--radius);
  overflow: hidden; background: #0a0e1a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.infographic svg { display: block; width: 100%; height: auto; }
.infographic-tools {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  font-size: 13px; color: var(--text-dim); margin: 6px 0 4px;
}
.infographic-tools a.dl {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 10px; font-weight: 700;
  background: rgba(56, 232, 200, 0.12); color: var(--accent);
  border: 1px solid rgba(56, 232, 200, 0.25);
}
.infographic-tools a.dl:hover { text-decoration: none; filter: brightness(1.1); }

/* ---- Category cards (the five harms) ---- */
.harm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 22px 0; }
.harm-card {
  position: relative; overflow: hidden;
  padding: 18px 18px 16px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-border);
}
.harm-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--accent)); }
.harm-card .hc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.harm-card .hc-icon { font-size: 22px; line-height: 1; }
.harm-card h3 { margin: 0; font-size: 16px; }
.harm-card .hc-stat { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--c, var(--text)); margin: 2px 0 6px; }
.harm-card p { margin: 0; font-size: 13.5px; color: #c4ccde; }

/* ---- Documented case list ---- */
.cases { margin-top: 16px; }
.cat-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.cat-chip {
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  padding: 6px 12px; border-radius: 999px; color: var(--text-dim);
  background: var(--panel); border: 1px solid var(--panel-border);
}
.cat-chip[aria-pressed="true"] { color: #04121a; background: var(--accent); border-color: transparent; }
.case {
  display: grid; grid-template-columns: 76px 1fr; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.case .cat-badge {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--c, var(--text-dim)); text-align: center;
}
.case .cat-badge .cb-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-size: 22px; background: color-mix(in srgb, var(--c, #888) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c, #888) 35%, transparent);
}
.case h3 { margin: 0 0 4px; font-size: 16.5px; }
.case .case-where { font-size: 12.5px; color: var(--text-dim); margin-bottom: 6px; }
.case .case-where .op { color: var(--accent-2); }
.case p { margin: 0 0 8px; font-size: 14.5px; color: #c4ccde; max-width: 80ch; }
.case .metric {
  display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--text);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--panel-border);
  border-radius: 8px; padding: 4px 10px; margin: 0 0 8px;
}
.case .srcs { font-size: 12.5px; color: var(--text-dim); }
.case .srcs a { color: var(--accent-2); }
.case .srcs a::after { content: " ↗"; opacity: 0.6; }
.case .srcs .sep { opacity: 0.4; margin: 0 6px; }

/* ---- Status breakdown (cancelled + in-process) ---- */
.status-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 8px; }
.status-totals .impact-stat .is-num.warn { color: var(--warn); }
.status-totals .impact-stat .is-num.go { color: var(--accent); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 14px; border-radius: 10px; }
.breakdown { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 13.5px; }
.breakdown th { text-align: left; padding: 9px 10px; color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--panel-border); position: sticky; }
.breakdown td { padding: 11px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: top; }
.breakdown tr:hover td { background: rgba(255, 255, 255, 0.03); }
.breakdown .b-name { font-weight: 700; color: var(--text); }
.breakdown .b-op { font-size: 12px; color: var(--text-dim); }
.breakdown .b-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.breakdown .b-src a { color: var(--accent-2); font-size: 12px; }
.breakdown .b-src a::after { content: " ↗"; opacity: 0.55; }
.status-pill {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap;
}
.status-pill.cancelled { background: rgba(255, 107, 107, 0.14); color: #ff9a9a; border: 1px solid rgba(255, 107, 107, 0.3); }
.status-pill.blocked   { background: rgba(255, 122, 122, 0.14); color: #ff9a9a; border: 1px solid rgba(255, 122, 122, 0.3); }
.status-pill.withdrawn { background: rgba(201, 139, 58, 0.16); color: #e3ab63; border: 1px solid rgba(201, 139, 58, 0.32); }
.status-pill.paused    { background: rgba(247, 196, 49, 0.14); color: #f7d774; border: 1px solid rgba(247, 196, 49, 0.3); }
.status-pill.moratorium{ background: rgba(184, 139, 255, 0.14); color: #c9aaff; border: 1px solid rgba(184, 139, 255, 0.3); }
.status-pill.construction { background: rgba(56, 232, 200, 0.12); color: var(--accent); border: 1px solid rgba(56, 232, 200, 0.28); }
.status-pill.announced { background: rgba(106, 166, 255, 0.12); color: var(--accent-2); border: 1px solid rgba(106, 166, 255, 0.28); }

/* ---- Markets correlation cards ---- */
.mkt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; margin: 18px 0; }
.mkt-card { padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--panel-border); border-left: 4px solid var(--accent-2); }
.mkt-card.mkt-up { border-left-color: var(--accent); }
.mkt-card.mkt-down { border-left-color: var(--warn); }
.mkt-card.mkt-mixed { border-left-color: var(--energy); }
.mkt-point { font-size: 11.5px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.mkt-card h3 { margin: 6px 0 10px; font-size: 17px; }
.mkt-move { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.mkt-tickers { font-size: 12px; font-weight: 700; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.mkt-badge { font-size: 13px; font-weight: 800; padding: 3px 11px; border-radius: 999px; }
.mkt-up .mkt-badge { background: rgba(56, 232, 200, 0.14); color: var(--accent); border: 1px solid rgba(56, 232, 200, 0.3); }
.mkt-down .mkt-badge { background: rgba(255, 107, 107, 0.14); color: #ff9a9a; border: 1px solid rgba(255, 107, 107, 0.3); }
.mkt-mixed .mkt-badge { background: rgba(247, 196, 49, 0.14); color: #f7d774; border: 1px solid rgba(247, 196, 49, 0.3); }
.mkt-card p { margin: 0 0 10px; font-size: 14px; color: #c4ccde; }
.mkt-card .srcs { font-size: 12.5px; color: var(--text-dim); }
.mkt-card .srcs a { color: var(--accent-2); }
.mkt-card .srcs a::after { content: " ↗"; opacity: 0.6; }
.mkt-card .srcs .sep { opacity: 0.4; margin: 0 6px; }

/* ---- Disclaimer / methodology ---- */
.disclaimer {
  margin-top: 28px; padding: 16px 18px; border-radius: 12px; font-size: 13px; color: var(--text-dim);
  background: rgba(255, 196, 49, 0.05); border: 1px solid rgba(247, 196, 49, 0.18);
}
.disclaimer strong { color: #f7d774; }

.allsrc { columns: 2; column-gap: 28px; padding-left: 18px; margin: 10px 0 0; }
.allsrc li { font-size: 13px; margin-bottom: 7px; break-inside: avoid; color: var(--text-dim); }
.allsrc a { color: var(--accent-2); }

@media (max-width: 640px) {
  .impact-subnav { top: 0; }
  .breakdown .col-where, .breakdown td.col-where { display: none; }
  .allsrc { columns: 1; }
  .case { grid-template-columns: 52px 1fr; gap: 12px; }
  .case .cat-badge .cb-icon { width: 38px; height: 38px; font-size: 18px; }
  .case .cat-badge span:last-child { display: none; }
}

/* Fluid infographic: scale the 1200x2300 poster to the viewport on phones */
.infographic { overflow-x: auto; }
.infographic svg { width: 100%; height: auto; max-width: 1200px; display: block; }
@media (max-width: 640px) { .infographic-share { flex-wrap: wrap; } }
