/* ===========================================================
   Marvel Network: Behind the Connections
   Original dark-mode / comic-inspired design system.
   No Marvel artwork, logos, or trademarked branding used.
   =========================================================== */

:root {
  --bg: #0a0d16;
  --bg-alt: #0f1422;
  --panel: #131a2b;
  --panel-2: #182036;
  --border: #26304a;
  --text: #eef1fb;
  --text-dim: #a7b0c8;
  --text-faint: #6b7590;

  --accent: #ff3d68;        /* neon red/pink */
  --accent-2: #37e6ff;      /* neon cyan */
  --accent-3: #ffd23f;      /* comic yellow */
  --accent-4: #8c6bff;      /* violet */
  --ok: #4ade80;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --font-display: "Bangers", "Impact", "Arial Narrow Bold", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1180px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.reduced-motion, body.reduced-motion * {
  animation: none !important;
  transition: none !important;
}

a { color: var(--accent-2); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent-3);
  outline-offset: 2px;
}

img { max-width: 100%; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-3);
  color: #111;
  padding: 10px 16px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Comic-style headings ---------- */
h1, h2, h3, .comic-heading {
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  line-height: 1.05;
}

.section-kicker {
  display: inline-block;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-3);
  background: rgba(255, 210, 63, 0.1);
  border: 1px solid rgba(255, 210, 63, 0.35);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 10px;
  font-family: var(--font-display);
  text-shadow: 3px 3px 0 rgba(255, 61, 104, 0.25);
}

.section-lede {
  color: var(--text-dim);
  max-width: 68ch;
  font-size: 1.05rem;
  margin: 0 0 28px;
}

.story-beat {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--accent-2);
  text-align: center;
  margin: 0 auto 30px;
  max-width: 46ch;
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(10, 13, 22, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-nav .container {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 58px;
}
.site-nav .brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: 1px;
}
.site-nav .brand .dot { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--text); background: var(--panel-2); }
.nav-toggle {
  display: none;
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    flex-direction: column;
    padding: 8px;
    border-bottom: 1px solid var(--border);
    max-height: 70vh;
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }
}

button {
  font-family: inherit;
  cursor: pointer;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn:hover { border-color: var(--accent-2); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-4));
  color: #fff;
  border: none;
  box-shadow: 0 6px 20px rgba(255, 61, 104, 0.35);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
  background: transparent;
}
.btn.active {
  background: var(--accent-2);
  color: #06202a;
  border-color: var(--accent-2);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(255, 61, 104, 0.18), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(55, 230, 255, 0.14), transparent 55%),
    var(--bg);
}
.hero-network-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 90px 20px 60px;
}
.hero-eyebrow {
  color: var(--accent-3);
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 7vw, 5rem);
  margin: 10px 0 6px;
  background: linear-gradient(135deg, #fff, var(--accent-2) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  color: var(--text-dim);
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  max-width: 56ch;
  margin: 0 auto 34px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 760px;
  margin: 0 auto 36px;
}
.hero-stat {
  background: rgba(19, 26, 43, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 10px;
}
.hero-stat .value {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  color: var(--accent-2);
  display: block;
}
.hero-stat .label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}
@media (max-width: 640px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Sections ---------- */
section {
  padding: 90px 0;
  position: relative;
}
section:nth-of-type(even) {
  background: var(--bg-alt);
}

/* ---------- Dashboard cards ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.2s;
}
.stat-card.in-view { opacity: 1; transform: translateY(0); }
.stat-card:hover { border-color: var(--accent-2); }
.stat-card .icon { font-size: 1.6rem; }
.stat-card .value {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent-3);
  display: block;
  margin: 6px 0 2px;
}
.stat-card .label { color: var(--text-dim); font-size: 0.85rem; }

/* ---------- Generic panel / card ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Explainer / accordion ---------- */
details.explainer {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 14px;
}
details.explainer summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent-2);
  list-style: none;
}
details.explainer summary::-webkit-details-marker { display: none; }
details.explainer summary::before { content: "➕ "; }
details.explainer[open] summary::before { content: "➖ "; }
details.explainer .explainer-body {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 0.95rem;
}
details.explainer code {
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--accent-3);
}

/* ---------- Rankings / MVP cards ---------- */
.ranking-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.mvp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.mvp-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: left;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.15s, border-color 0.15s;
}
.mvp-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.mvp-rank {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent-3);
  width: 34px;
  flex-shrink: 0;
  text-align: center;
}
.mvp-info { flex: 1; min-width: 0; }
.mvp-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mvp-value { color: var(--text-dim); font-size: 0.85rem; }
.mvp-bar-track {
  background: var(--panel-2);
  border-radius: 999px;
  height: 6px;
  margin-top: 6px;
  overflow: hidden;
}
.mvp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 999px;
}

/* ---------- Charts ---------- */
.chart-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.chart-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
svg text { fill: var(--text-dim); font-family: var(--font-body); }
.axis path, .axis line { stroke: var(--border); }
.bar { fill: var(--accent-2); }
.bar:hover { fill: var(--accent-3); }
.bar-hover-tip {
  position: fixed;
  pointer-events: none;
  background: #05070c;
  border: 1px solid var(--accent-2);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  z-index: 50;
  white-space: nowrap;
}
.chart-caption {
  color: var(--text-faint);
  font-size: 0.82rem;
  margin-top: 10px;
}
.chart-summary {
  margin-top: 10px;
}
.chart-summary summary { color: var(--text-faint); font-size: 0.8rem; cursor: pointer; }

.scatter-dot { fill: var(--accent-4); fill-opacity: 0.75; stroke: none; cursor: pointer; }
.scatter-dot.highlight { fill: var(--accent-3); fill-opacity: 1; }
/* invisible r=11 hit circles under small scatter dots (see addHitDots in charts.js) */
.hit-dot { fill: transparent; stroke: none; pointer-events: all; cursor: pointer; }
.scatter-dot:focus-visible { fill: var(--accent-3); fill-opacity: 1; outline: none; }
.ref-line { stroke: var(--text-faint); stroke-dasharray: 4 4; }

/* ---------- Network graph ---------- */
.network-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.network-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
}
.control-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.control-group select, .control-group input[type="range"] {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 6px;
}
.network-stage {
  position: relative;
  width: 100%;
  height: 620px;
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 1px) 0 0/22px 22px,
    #060810;
}
#network-svg { width: 100%; height: 100%; display: block; cursor: grab; }
#network-svg:active { cursor: grabbing; }
#network-svg circle { cursor: pointer; }
.node-label { font-size: 9px; fill: var(--text); pointer-events: none; }
.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-right: 12px;
}
.legend-swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.network-search {
  position: relative;
  min-width: 200px;
}
.network-search input {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
}
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #05070c;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 4px;
  max-height: 260px;
  overflow-y: auto;
  z-index: 60;
}
.search-suggestions button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  padding: 8px 10px;
  font-size: 0.85rem;
}
.search-suggestions button:hover, .search-suggestions button.active { background: var(--panel-2); }

/* ---------- Character profile panel ---------- */
.profile-panel {
  background: var(--panel);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
  display: none;
}
.profile-panel.visible { display: block; }
.profile-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.profile-header h3 { margin: 0; font-family: var(--font-display); font-size: 1.6rem; color: var(--accent-3); }
.profile-close { background: none; border: none; color: var(--text-dim); font-size: 1.2rem; }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 10px; margin: 14px 0; }
.profile-stat { background: var(--panel-2); border-radius: var(--radius-sm); padding: 10px; text-align: center; }
.profile-stat .n { font-weight: 800; color: var(--accent-2); font-size: 1.2rem; display: block; }
.profile-stat .l { font-size: 0.72rem; color: var(--text-faint); text-transform: uppercase; }
.profile-interpretation {
  background: rgba(55, 230, 255, 0.08);
  border-left: 3px solid var(--accent-2);
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
}
.profile-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.badge {
  font-size: 0.7rem;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.badge.badge-ap { border-color: var(--accent); color: var(--accent); }
.badge.badge-isolated { border-color: var(--text-faint); color: var(--text-faint); }
.badge.badge-largest { border-color: var(--ok); color: var(--ok); }

/* ---------- Islands / components ---------- */
.island-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 0.82rem; }
.island-bar-track { flex: 1; background: var(--panel-2); border-radius: 6px; height: 16px; overflow: hidden; }
.island-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-4), var(--accent-2)); }
.island-bar-fill.largest { background: linear-gradient(90deg, var(--accent), var(--accent-3)); }
.isolate-chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.isolate-chip {
  font-size: 0.78rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--text-dim);
}

/* ---------- Density grid metaphor ---------- */
.density-grid {
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  gap: 2px;
  margin: 18px 0;
}
.density-cell { aspect-ratio: 1; border-radius: 2px; background: var(--panel-2); }
.density-cell.filled { background: var(--accent); }

/* ---------- Aha cards ---------- */
.aha-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.aha-card {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.aha-card::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(255,61,104,0.25), transparent 70%);
}
.aha-icon { font-size: 1.8rem; }
.aha-title { font-family: var(--font-display); font-size: 1.25rem; color: var(--accent-3); margin: 8px 0 6px; }
.aha-text { color: var(--text-dim); font-size: 0.92rem; position: relative; z-index: 1; }

/* ---------- Experiments ---------- */
.experiment-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
}
.experiment-card h3 { margin-top: 0; font-family: var(--font-display); color: var(--accent-2); }
.experiment-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.experiment-controls select {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 200px;
}
.result-box {
  background: var(--panel-2);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 12px;
  display: none;
}
.result-box.visible { display: block; }
.before-after { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; text-align: center; }
.before-after .arrow { font-size: 1.4rem; color: var(--accent-3); }
.ba-metric { font-size: 1.6rem; font-weight: 800; color: var(--accent-2); display: block; }
.ba-metric.after-change { color: var(--accent-3); }
.ba-label { font-size: 0.72rem; color: var(--text-faint); text-transform: uppercase; }

.guess-slider { width: 100%; }
.guess-value { font-family: var(--font-display); font-size: 2rem; color: var(--accent-3); text-align: center; }

/* ---------- Exercise section ---------- */
.exercise-list { display: grid; gap: 12px; }
.exercise-q {
  background: var(--panel);
  border-left: 3px solid var(--accent-4);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  font-weight: 600;
}

/* ---------- Story / methodology ---------- */
.story-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.story-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.story-card h3 { color: var(--accent-3); font-family: var(--font-display); margin-top: 0; }
@media (max-width: 900px) { .story-grid { grid-template-columns: 1fr; } }

.findings-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.findings-list li {
  background: var(--panel-2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  border-left: 3px solid var(--accent-2);
}

/* ---------- Footer ---------- */
footer {
  padding: 50px 0;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
footer a { color: var(--accent-2); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.loading-banner, .error-banner {
  max-width: 640px;
  margin: 120px auto;
  text-align: center;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
}
.error-banner { border-color: var(--accent); }
.error-banner code { display:block; margin-top:10px; background: var(--panel-2); padding: 10px; border-radius: 8px; text-align:left; overflow-x:auto; }

::selection { background: var(--accent); color: #fff; }

/* ---------- Shared week-page chrome (weeknav.js) ---------- */
.weeknav-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 10px;
  border-right: 1px solid var(--border);
  margin-right: 4px;
}
.weeknav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.weeknav-link:hover, .weeknav-link:focus-visible { color: var(--accent-2); }
.weeknav-switch select#weeknav-select {
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.78rem;
  max-width: 180px;
}
@media (max-width: 860px) {
  .weeknav-bar { border-right: none; margin-right: 0; padding-right: 0; }
}
/* Phones: the brand, the week switcher and the menu button don't fit on one
   row, so the switcher wraps to a second row instead of scrolling the page
   sideways. The dropdown menu hangs from the bottom of the bar either way. */
@media (max-width: 560px) {
  .site-nav .container { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; row-gap: 6px; }
  .site-nav .brand { order: 1; font-size: 1rem; }
  .site-nav .nav-toggle { order: 2; margin-left: auto; }
  .weeknav-bar { order: 3; flex-basis: 100%; min-width: 0; }
  .weeknav-switch { min-width: 0; flex: 1; }
  .weeknav-switch select#weeknav-select { max-width: 100%; width: 100%; }
  .nav-links { top: 100%; }
}

.weeknav-prevnext {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 30px 20px 50px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.weeknav-prevnext a {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, color 0.15s;
}
.weeknav-prevnext a:hover, .weeknav-prevnext a:focus-visible {
  border-color: var(--accent-2);
  color: var(--accent-2);
}
.weeknav-prevnext .weeknav-next { margin-left: auto; text-align: right; }
@media (max-width: 640px) {
  .weeknav-prevnext { flex-direction: column; }
  .weeknav-prevnext .weeknav-next { margin-left: 0; text-align: left; }
}

/* ---------- Hub page: week-card grid ---------- */
.hub-hero {
  padding: 80px 0 40px;
  text-align: center;
}
.hub-hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin: 10px 0 16px;
  background: linear-gradient(135deg, #fff, var(--accent-2) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hub-intro {
  color: var(--text-dim);
  max-width: 68ch;
  margin: 0 auto;
  font-size: 1.05rem;
}
.week-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 980px) {
  .week-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .week-grid { grid-template-columns: 1fr; }
}
.week-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  position: relative;
}
a.week-card:hover, a.week-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent-2);
  box-shadow: var(--shadow);
}
.week-card.is-coming {
  opacity: 0.5;
  cursor: not-allowed;
}
.week-eyebrow {
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 2px;
  color: var(--text-faint);
  display: block;
  margin-bottom: 8px;
}
.week-card.is-live .week-eyebrow { color: var(--accent-2); }
.week-course-title {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0 0 6px;
}
.week-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 8px;
  color: var(--text);
}
.week-card.is-live .week-title { color: var(--accent-3); }
.week-teaser {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin: 0 0 14px;
}
.week-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-faint);
}
.week-card.is-live {
  border-color: rgba(55, 230, 255, 0.35);
}
.week-card.is-live .week-status {
  color: var(--accent-2);
  border-color: var(--accent-2);
  background: rgba(55, 230, 255, 0.08);
}
.week-status .dot { font-size: 0.6rem; }

/* ---------- Hub hero: the network as navigation (src/js/hub_hero.js) ----------
   Stage sizes track the design sizes in scripts/hero_layout.mjs (1140x440 wide,
   350x560 tall) so the label boxes the layout keeps clear line up. */
.hero-net {
  display: none;
  position: relative;
  height: clamp(340px, calc((100vw - 40px) * 0.386), 440px);
  margin: 6px 0 26px;
  text-align: left;
}
.hero-net.is-ready { display: block; }
@media (max-width: 700px) {
  .hero-net { height: 560px; }
}
.hero-net canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-net-weeks { list-style: none; margin: 0; padding: 0; }
.hero-week {
  position: absolute;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  text-decoration: none;
  z-index: 1;
}
a.hero-week:hover, a.hero-week:focus-visible { z-index: 3; }
.hero-week.is-coming { cursor: not-allowed; }
.hero-week.is-coming:hover { z-index: 2; }
.hero-week-num {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-2);
  text-shadow: 0 0 4px var(--bg), 0 0 8px var(--bg), 0 0 12px var(--bg);
  pointer-events: none;
  transition: transform 0.15s, color 0.15s;
}
.hero-week.label-up .hero-week-num { bottom: calc(100% + 2px); }
.hero-week.label-down .hero-week-num { top: calc(100% + 2px); }
.hero-week.is-coming .hero-week-num { color: var(--text-faint); font-weight: 400; }
a.hero-week:hover .hero-week-num, a.hero-week:focus-visible .hero-week-num { color: var(--accent-3); }
a.hero-week.label-up:hover .hero-week-num, a.hero-week.label-up:focus-visible .hero-week-num { transform: translate(-50%, -3px); }
a.hero-week.label-down:hover .hero-week-num, a.hero-week.label-down:focus-visible .hero-week-num { transform: translate(-50%, 3px); }
/* Title card: opposite side from the number label, hidden until hover/focus
   (opacity only, so it stays in the accessibility tree). */
.hero-week-title {
  position: absolute;
  left: 50%;
  transform: translateX(calc(-50% + var(--shift, 0px)));
  width: max-content;
  max-width: min(270px, 70vw);
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--accent-2);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  line-height: 1.1;
  color: var(--accent-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.hero-week.label-up .hero-week-title { top: calc(100% + 6px); }
.hero-week.label-down .hero-week-title { bottom: calc(100% + 6px); }
.hero-week-course {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-2);
}
.hero-week.is-coming .hero-week-title { border-color: var(--border); color: var(--text-dim); }
.hero-week.is-coming .hero-week-course { color: var(--text-faint); }
a.hero-week:hover .hero-week-title, a.hero-week:focus-visible .hero-week-title,
.hero-week.is-coming:hover .hero-week-title { opacity: 1; }

/* ---------- Post body (write-up prose + figures, used by week posts) ---------- */
.post-body { max-width: 74ch; }
.post-body p { color: var(--text-dim); font-size: 1.02rem; margin: 0 0 18px; }
.post-body strong { color: var(--text); }
.post-body code {
  background: rgba(255, 255, 255, 0.07);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--accent-3);
  font-size: 0.92em;
}
.post-body h3 {
  color: var(--accent-2);
  font-family: var(--font-display);
  margin: 34px 0 14px;
}
.post-figure {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin: 26px 0;
  max-width: 74ch;
}
.post-figure img { display: block; width: 100%; border-radius: var(--radius-sm); }
.post-figure figcaption {
  color: var(--text-faint);
  font-size: 0.85rem;
  margin-top: 10px;
}
.post-figure figcaption strong { color: var(--text-dim); }
.callout {
  background: var(--panel-2);
  border-left: 3px solid var(--accent-4);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin: 20px 0;
  max-width: 74ch;
  color: var(--text-dim);
}
.callout strong { color: var(--text); }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}
.post-meta .badge { font-size: 0.75rem; }

/* ---------- Week 3: removal chart legend ---------- */
.removal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.removal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.78rem;
  color: var(--text);
}
.removal-legend-item.is-hidden { opacity: 0.4; }
.removal-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--legend-color, var(--accent-2));
  display: inline-block;
}

/* ---------- Week 3: six-degrees widget ---------- */
.sixdeg-widget {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.sixdeg-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.sixdeg-search { position: relative; flex: 1; min-width: 220px; }
.sixdeg-search input {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
}
.sixdeg-toggle { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-dim); }
.sixdeg-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.sixdeg-step {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
}
.sixdeg-step:hover { border-color: var(--accent-2); color: var(--accent-2); }
.sixdeg-arrow { color: var(--text-faint); }
.sixdeg-unreachable {
  color: var(--accent);
  font-weight: 700;
}
.sixdeg-result-meta { color: var(--text-faint); font-size: 0.82rem; margin-top: 10px; }

/* ---------- Week 3: broker/team tables and cards ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.data-table th { color: var(--text-faint); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

.clique-list { display: grid; gap: 10px; }
.clique-chip-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.clique-chip { background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; font-size: 0.8rem; }

.llm-paragraph {
  font-style: italic;
  color: var(--text-dim);
  border-left: 3px solid var(--accent-3);
  padding: 14px 18px;
  background: var(--panel-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0 22px;
}
.llm-claim { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 12px; }
.llm-claim .verdict { color: var(--accent); font-weight: 800; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; }
.llm-claim .verdict.ok { color: var(--ok); }

/* ---------- Week 3: z-score scatter dots ---------- */
.zdot {
  cursor: pointer;
  transition: r 0.1s ease, fill-opacity 0.1s ease;
}
.zdot:hover, .zdot:focus-visible {
  fill-opacity: 1 !important;
  outline: none;
}
.scatter-pinned {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--text-dim);
  min-height: 1.4em;
}
.scatter-pinned strong { color: var(--text); }
.scatter-pinned .z-pos { color: var(--accent-2); }
.scatter-pinned .z-neg { color: var(--accent); }

/* ---------- Week 4: communities & backbones ---------- */
.w4-lede-note { color: var(--text-faint); font-size: 0.85rem; max-width: 74ch; }
.w4-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.w4-controls .btn { padding: 7px 13px; font-size: 0.82rem; }
.w4-controls .btn[aria-pressed="true"] { background: var(--accent-2); color: #06202a; border-color: var(--accent-2); }
.w4-controls label { font-size: 0.85rem; color: var(--text-dim); display: inline-flex; align-items: center; gap: 8px; }
.w4-canvas-wrap { position: relative; width: 100%; background: #0b1020; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; touch-action: manipulation; }
.w4-canvas-wrap canvas { display: block; width: 100%; }
.w4-readout {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 14px; margin-top: 10px; font-size: 0.88rem; color: var(--text-dim); min-height: 1.4em;
}
.w4-readout strong { color: var(--text); }
.w4-readout .kept { color: var(--ok); }
.w4-readout .dropped { color: var(--accent); text-decoration: line-through; }
.w4-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.w4-legend .legend-chip { margin-right: 0; }
.w4-legend button.legend-chip { background: none; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; cursor: pointer; color: var(--text-dim); }
.w4-legend button.legend-chip[aria-pressed="false"] { opacity: 0.4; }
.w4-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 10px; }
.w4-stat { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.w4-stat .v { font-family: var(--font-display); font-size: 1.5rem; color: var(--accent-3); display: block; letter-spacing: 0.5px; }
.w4-stat .l { font-size: 0.76rem; color: var(--text-faint); }
.w4-range { width: min(420px, 100%); accent-color: var(--accent-2); }
.w4-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .w4-two { grid-template-columns: 1fr; } }
.w4-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.w4-table-wrap .data-table { min-width: 520px; }
.w4-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; font-size: 0.78rem; margin: 2px 4px 2px 0; color: var(--text); }
.w4-chip .legend-swatch { flex: none; }
.w4-runs { display: flex; flex-wrap: wrap; gap: 4px; }
.w4-run { width: 26px; height: 26px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.7rem; color: #0b1020; font-weight: 800; border: 1px solid rgba(255,255,255,0.15); }
.finder-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-top: 14px; }
.finder-card h3 { margin: 0 0 4px; font-family: var(--font-display); letter-spacing: 0.5px; font-size: 1.6rem; color: var(--accent-3); }
.finder-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 12px; }
@media (max-width: 760px) { .finder-grid { grid-template-columns: 1fr; } }
.finder-grid h4 { margin: 0 0 6px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-faint); }
.finder-grid p, .finder-grid li { font-size: 0.88rem; color: var(--text-dim); margin: 2px 0; }
.finder-grid ul { padding-left: 18px; margin: 0; }
.search-suggestions button[aria-selected="true"] { background: var(--panel-2); }
.w4-svg text { fill: var(--text-dim); font-size: 11px; }
.w4-svg .axis text { fill: var(--text-faint); }
.w4-svg .axis path, .w4-svg .axis line { stroke: var(--border); }
.w4-svg .cell:focus { outline: none; stroke: var(--accent-3); stroke-width: 2px; }
.w4-svg .grid line { stroke: var(--border); stroke-opacity: 0.5; }
.w4-figure-note { font-size: 0.8rem; color: var(--text-faint); margin-top: 6px; }
section .post-figure { max-width: 100%; }
.w4-slider-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.w4-slider-row output { font-variant-numeric: tabular-nums; color: var(--accent-3); font-weight: 700; min-width: 4ch; display: inline-block; }
.w4-caveat { border-left-color: var(--accent); }
@media (max-width: 640px) {
  .w4-stat .v { font-size: 1.25rem; }
  .finder-card h3 { font-size: 1.35rem; }
}

/* ---------- Week 5: the language half ---------- */
.w5-controls { display: grid; gap: 2px; margin-bottom: 6px; }
.w5-controls .w4-controls { margin-bottom: 6px; }
.w5-ctl { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-faint); min-width: 7.5em; }
.w5-select { background: var(--bg-alt); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 6px 10px; max-width: 100%; font: inherit; font-size: 0.88rem; }
.w4-controls .btn:focus-visible, .w5-select:focus-visible, .w4-range:focus-visible, .w5-search-form input:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 2px; }
.data-table small { color: var(--text-faint); }
.data-table tr.w5-group td { color: var(--text); font-weight: 700; font-size: 0.8rem; background: var(--panel-2); }
.w5-notes td:last-child { min-width: 260px; color: var(--text-dim); }
.w5-robust th, .w5-robust td { white-space: nowrap; }
.w5-robust th.num, .w5-honesty th.num { text-align: right; }
.data-table th.w5-sym { text-transform: none; font-size: 0.9rem; }
.w5-honesty td { vertical-align: top; color: var(--text-dim); }
.w5-honesty td:first-child { min-width: 170px; color: var(--text); }
.w5-honesty td:last-child { min-width: 280px; }
.w5-honesty td.num { font-size: 1rem; color: var(--accent-3); font-weight: 700; white-space: normal; min-width: 96px; }
.w5-honesty code, .w4-readout code { background: rgba(255, 255, 255, 0.07); padding: 1px 5px; border-radius: 4px; color: var(--accent-3); font-size: 0.92em; }
.w5-honesty mark { background: rgba(255, 210, 63, 0.25); color: var(--text); padding: 0 2px; border-radius: 3px; }
.w5-toy { border-style: dashed; }
#heaps .w4-slider-row label { font-size: 0.85rem; color: var(--text-dim); display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.w5-search-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.w5-search-form input[type="search"] { flex: 1 1 220px; min-width: 0; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 9px 12px; font: inherit; }
.w5-results { margin: 12px 0 0; padding-left: 26px; display: grid; gap: 8px; }
.w5-results li { color: var(--text-dim); font-size: 0.92rem; }
.w5-results small { display: block; color: var(--text-faint); overflow-wrap: anywhere; }
.w5-score { font-variant-numeric: tabular-nums; color: var(--accent-3); margin-left: 6px; font-size: 0.85rem; }
@media (max-width: 640px) {
  .w5-ctl { min-width: 100%; }
}

/* ---------- Week 6: names or meaning ---------- */
.w6-term { display: inline-flex; align-items: baseline; gap: 4px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 9px; margin: 2px 4px 2px 0; font-size: 0.82rem; color: var(--text); }
.w6-term small { color: var(--text-faint); font-size: 0.72rem; }
.w6-term.is-name { border-color: var(--accent); color: var(--accent); }
.w6-term.is-pron { border-color: var(--accent-3); color: var(--accent-3); }
.w6-quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0 4px; }
.w6-quote { margin: 0; background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--accent-2); border-radius: var(--radius-sm); padding: 10px 14px; color: var(--text-dim); font-size: 0.92rem; overflow-wrap: anywhere; }
.w6-quote cite { display: block; font-style: normal; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.w6-quote mark, .w4-readout mark { background: rgba(255, 61, 104, 0.25); color: var(--text); padding: 0 2px; border-radius: 3px; }
.w6-case { margin: 26px 0; }
.w6-case h3 { margin-bottom: 6px; }
.w6-list { color: var(--text-dim); margin: 0 0 18px; padding-left: 22px; }
.w6-list li { margin-bottom: 6px; }
.w6-list small { color: var(--text-faint); }
.w6-table th.num { text-align: right; }
.w6-table td { vertical-align: top; }
#hero-chart .hit-dot:focus { outline: none; stroke: var(--accent-3); stroke-width: 2px; }
#hook-chart rect:focus, #toy-chart rect:focus, #hero-chart circle:focus { outline: none; stroke: var(--accent-3); stroke-width: 2px; }
@media (max-width: 640px) {
  .w6-quotes { grid-template-columns: 1fr; }
}
#toy .w4-controls label { flex-wrap: wrap; max-width: 100%; }
#toy .w5-select { min-width: 0; max-width: 100%; width: 100%; }
@media (min-width: 641px) { #toy .w5-select { width: auto; } }
#hero .w5-controls { grid-template-columns: minmax(0, 1fr); }
#hero-select { min-width: 0; flex: 1 1 200px; }

/* ---------- Week 7: can the prose rebuild the graph ---------- */
.w7-strip { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; counter-reset: w7step; }
.w7-strip li { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px 12px; counter-increment: w7step; }
.w7-strip li::before { content: counter(w7step); position: absolute; top: 10px; right: 12px; font-family: var(--font-display); color: var(--text-faint); font-size: 1.1rem; }
.w7-strip .v { font-family: var(--font-display); font-size: 1.55rem; color: var(--accent-3); display: block; letter-spacing: 0.5px; }
.w7-strip .k { font-size: 0.82rem; color: var(--text); font-weight: 700; display: block; margin-bottom: 2px; }
.w7-strip .loss { font-size: 0.78rem; color: var(--text-dim); display: block; margin-top: 6px; }
.w7-strip .loss strong { color: var(--accent); font-weight: 700; }
.w7-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.w7-two .chart-wrap { margin: 0; min-width: 0; }
.w7-two .w4-table-wrap .data-table { min-width: 0; }
mark.w7-a { background: rgba(255, 61, 104, 0.28); color: var(--text); padding: 0 2px; border-radius: 3px; }
mark.w7-b { background: rgba(55, 230, 255, 0.24); color: var(--text); padding: 0 2px; border-radius: 3px; }
.w7-tag { display: inline-block; font-size: 0.7rem; letter-spacing: 0.4px; text-transform: uppercase; border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; margin-left: 6px; color: var(--text-faint); font-style: normal; }
.w7-tag.is-list { border-color: var(--accent-3); color: var(--accent-3); }
.w7-tag.is-third { border-color: var(--accent-4); color: #b9a6ff; }
.w7-sents { display: grid; gap: 8px; margin-top: 10px; }
.w7-sents .w6-quote { font-size: 0.88rem; }
.w7-verdicts { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 2px; }
.w7-verdicts span { font-size: 0.8rem; border-radius: 999px; padding: 2px 10px; border: 1px solid var(--border); color: var(--text-dim); }
.w7-verdicts .code { border-color: var(--accent-4); }
.w7-verdicts .text { border-color: var(--ok); color: var(--ok); }
.w7-fates { min-width: 0 !important; }
.w7-fates td, .w7-fates th { white-space: nowrap; }
#hero-chart .w7-dot:focus, #hero-chart .w7-bin:focus { outline: none; stroke: var(--accent-3); stroke-width: 2px; }
#hero .w5-controls { grid-template-columns: minmax(0, 1fr); }
#hero-select { min-width: 0; flex: 1 1 200px; }
#toy .w4-controls label { flex-wrap: wrap; max-width: 100%; }
#toy .w5-select { min-width: 0; max-width: 100%; width: 100%; }
@media (min-width: 641px) { #toy .w5-select { width: auto; } }
@media (max-width: 760px) {
  .w7-two { grid-template-columns: 1fr; }
}
