/* Vector Hoops — assets/shell.css
 * Shared site chrome (nav + footer) and the three non-game pages
 * (landing, wiki, methods). Loaded AFTER assets/hoops.css on every page
 * so it inherits the same :root tokens (--paper/--ink/--data-orange/...,
 * --shadow-block, --radius, --mono/--sans) and the neobrutalist card/
 * button primitives (.vh-card, .vh-btn, .vh-btn--primary, .vh-link-btn)
 * defined there. assets/responsive.css loads last for fluid layout.
 */

/* ---------- shared top nav ---------- */

.site-nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--page-gutter, clamp(16px, 3.2vw, 28px));
  padding-top: calc(12px + env(safe-area-inset-top, 0));
  background: var(--surface);
  border-bottom: 2px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  box-sizing: border-box;
}

/* play.html already carries the game's own sticky .vh-header (z-index 20,
   top:0) directly below this bar — keep this one in normal flow there so
   the two don't fight for the same sticky slot; it scrolls away and the
   game header takes over the top exactly as it always has. */
.site-nav--static{ position: static; }

.site-nav__brand{
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 15px;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav__brand:hover{ text-decoration: underline; }
.site-nav__accent{ color: var(--data-orange); }

.site-nav__links{
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav__link{
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  border: 2px solid transparent;
}
.site-nav__link:hover{ color: var(--ink); }
.site-nav__link.is-active{
  color: var(--ink);
  border-color: var(--ink);
  background: var(--paper);
}

@media (max-width: 479px){
  .site-nav{
    padding: 8px 16px;
    padding-top: calc(8px + env(safe-area-inset-top, 0));
    gap: 6px;
  }
  .site-nav__brand{ font-size: 12px; }
  .site-nav__link{ font-size: 10px; padding: 6px 7px; }
  .landing-equation{
    flex-wrap: wrap;
    justify-content: center;
  }
  .landing-hero__title{ font-size: 26px; }
}

@media (prefers-reduced-motion: reduce){
  .landing-equation__tile--donor,
  .landing-equation__tile--target{
    animation: none;
  }
}

html{ scroll-behavior: smooth; }

/* ---------- shared footer ---------- */

.site-footer{
  margin-top: auto;
  padding: 20px var(--page-gutter, clamp(16px, 3.2vw, 28px));
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
  border-top: 2px solid var(--ink);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.site-footer__links{
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.site-footer__links a{
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--data-orange);
}
.site-footer__links a:hover{ color: var(--data-orange); }

.site-footer__attribution{
  font-size: 11px;
  color: var(--ink-muted);
  max-width: 640px;
  line-height: 1.5;
}
.site-footer__attribution a{ color: var(--ink-soft); }

/* ---------- landing page ---------- */

.landing-main{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 0 0 48px;
  width: 100%;
  box-sizing: border-box;
}

/* Full-bleed hero band — uses viewport width so nothing feels left-hung */
.landing-hero-band{
  width: 100%;
  background:
    linear-gradient(180deg, var(--surface) 0%, var(--paper) 100%);
  border-bottom: 2px solid var(--ink);
  position: relative;
  overflow: hidden;
}

.landing-hero-band::before{
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(235, 104, 52, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(42, 120, 214, 0.08) 0%, transparent 45%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 28px,
      rgba(17, 17, 17, 0.03) 28px,
      rgba(17, 17, 17, 0.03) 29px
    );
  pointer-events: none;
}

.landing-hero{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
  padding: 40px clamp(16px, 4vw, 32px) 48px;
  max-width: 1120px;
  margin-inline: auto;
  width: 100%;
  box-sizing: border-box;
}

.landing-hero__visual{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.landing-hero__eyebrow{
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin: 0;
}

.landing-hero__copy{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.landing-hero__title{
  font-family: var(--mono);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}

.landing-hero__title-accent{
  color: var(--data-orange);
  display: inline-block;
  position: relative;
}

.landing-hero__title-accent::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 6px;
  background: rgba(235, 104, 52, 0.25);
  z-index: -1;
}

.landing-hero__chips{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.landing-hero__chips li{
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  background: var(--surface);
  border: 2px solid var(--hairline);
  border-radius: 999px;
  padding: 6px 12px;
  box-shadow: var(--shadow-block-sm);
}

.landing-hero__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

@media (min-width: 900px){
  .landing-hero{
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: clamp(32px, 5vw, 64px);
    padding: 56px clamp(24px, 5vw, 48px) 64px;
    text-align: left;
  }
  .landing-hero__visual{
    align-items: flex-start;
  }
  .landing-hero__copy{
    align-items: flex-start;
  }
  .landing-hero__chips{
    justify-content: flex-start;
  }
  .landing-hero__actions{
    justify-content: flex-start;
  }
  .landing-equation{
    justify-content: flex-start;
  }
}

.landing-equation{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.landing-equation__tile{
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-block);
  width: clamp(72px, 14vw, 100px);
  height: clamp(72px, 14vw, 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 800;
  font-size: clamp(28px, 5vw, 40px);
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.landing-equation__tile--donor{
  animation: landing-tile-float 3s ease-in-out infinite;
}
.landing-equation__tile--a{ animation-delay: 0s; color: var(--data-orange); }
.landing-equation__tile--b{ animation-delay: 0.4s; color: var(--data-blue); }

.landing-equation__tile--target{
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
  animation: landing-target-pulse 2.5s ease-in-out infinite;
}

.landing-equation__target-line{
  display: block;
  width: 70%;
  height: 4px;
  background: var(--paper);
  border-radius: 2px;
  opacity: 0.9;
}

.landing-equation__op{
  font-family: var(--mono);
  font-weight: 800;
  font-size: clamp(20px, 4vw, 28px);
  color: var(--ink-soft);
  flex-shrink: 0;
  user-select: none;
}

@keyframes landing-tile-float{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-4px); }
}

@keyframes landing-target-pulse{
  0%, 100%{ box-shadow: var(--shadow-block); }
  50%{ box-shadow: 6px 6px 0 var(--data-orange); }
}

.landing-tagline{
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-soft);
  max-width: 36em;
  line-height: 1.55;
  margin: 0;
}

.landing-puzzle-line{
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin: 0;
}
.landing-puzzle-line b{ color: var(--data-orange); }

.landing-cta{
  font-size: 15px;
  padding: 14px 24px;
  text-decoration: none;
  display: inline-block;
  min-height: 48px;
}

.landing-cta-secondary{
  font-size: 14px;
  padding: 12px 20px;
  text-decoration: none;
  display: inline-block;
  min-height: 48px;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-block-sm);
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.landing-cta-secondary:hover{
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-block);
}

.landing-section{
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-inline: clamp(16px, 4vw, 32px);
  max-width: 1120px;
  margin-inline: auto;
  width: 100%;
  box-sizing: border-box;
}

.landing-section__label{
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  border-bottom: 2px solid var(--data-orange);
  display: inline-block;
  padding-bottom: 2px;
  align-self: flex-start;
}

/* mode cards */

.mode-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
}
@media (min-width: 600px){
  .mode-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px){
  .mode-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px){
  .mode-grid{
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }
  .mode-card__pitch{ font-size: 12px; }
}

.landing-research{
  margin-top: 24px;
  padding: 18px 16px 16px;
}
.landing-research__title{
  margin: 0 0 6px;
  font-size: 1.15rem;
}
.landing-research__lede{
  margin: 0 0 14px;
  color: var(--ink-muted);
  font-size: 0.92rem;
  max-width: 52ch;
}
.landing-research__grid{
  margin: 0;
}
@media (min-width: 1100px){
  .landing-research__grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.site-next{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: 0.9rem;
}
.site-next__label{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.site-next a{
  color: var(--ink-soft);
  text-decoration: none;
}
.site-next a:hover{ color: var(--ink); text-decoration: underline; }

.mode-card{
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  padding: 14px;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  height: 100%;
}
.mode-card:hover{ transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.mode-card:active{ transform: translate(3px, 3px); box-shadow: none; }

.mode-card__glyph{
  width: 36px;
  height: 36px;
}
.mode-card__glyph svg{ display: block; width: 100%; height: 100%; }

.mode-card__title{
  font-family: var(--mono);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
  line-height: 1.25;
}

.mode-card__pitch{
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0;
  flex: 1 1 auto;
}

/* how it works */

.how-steps{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 768px){
  .how-steps{ grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}
.how-steps li{
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-block-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
}
.how-steps__num{
  font-family: var(--mono);
  font-weight: 800;
  font-size: 12px;
  color: var(--data-orange);
}
.how-steps__text{ font-size: 13px; line-height: 1.5; color: var(--ink-soft); margin: 0; }

/* credibility strip */

.landing-section--strip{
  padding-inline: clamp(16px, 4vw, 32px);
}

.landing-section--strip .credibility-strip{
  width: 100%;
  margin-inline: 0;
}

.credibility-strip{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--panel-dark);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-sizing: border-box;
}
.credibility-strip p{ margin: 0; font-size: 13px; line-height: 1.5; color: #d8d6cf; }
.credibility-strip a{
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-bottom: 2px solid var(--data-orange);
  white-space: nowrap;
}
.credibility-strip a:hover{ color: var(--data-orange); }

/* ---------- research hub (trends / players / teams) ---------- */

.research-main{
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px var(--page-gutter, clamp(16px, 3.2vw, 28px)) 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.research-head h1{
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(22px, 4vw, 30px);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.research-head p{
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 62ch;
}

.research-tabs{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
}

.research-tabs button{
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  background: var(--surface);
  cursor: pointer;
  box-shadow: var(--shadow-block);
}

.research-tabs button.is-active{
  background: var(--data-orange);
  color: var(--surface);
}

.research-tabs button:hover:not(.is-active){
  background: var(--paper);
}

.research-panel[hidden]{ display: none !important; }

/* teams lab */
.teams-controls{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.teams-controls select{
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 10px;
  border: 2px solid var(--ink);
  background: var(--surface);
  min-width: 140px;
}

.teams-summary{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.teams-stat{
  border: 2px solid var(--ink);
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-block);
}

.teams-stat__label{
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  font-family: var(--mono);
}

.teams-stat__value{
  font-size: 20px;
  font-weight: 700;
  margin-top: 4px;
}

.teams-archetype-bars{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.teams-arch-row{
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) 48px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.teams-arch-row__track{
  height: 10px;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.teams-arch-row__fill{
  display: block;
  height: 100%;
  background: var(--data-blue);
}

.teams-roster{
  list-style: none;
  margin: 0;
  padding: 0;
  border: 2px solid var(--ink);
  background: var(--surface);
}

.teams-roster li{
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 72px minmax(0, 1fr) 56px;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--ink);
  font-size: 12px;
  align-items: center;
}

.teams-roster li:last-child{ border-bottom: none; }

.teams-roster a{
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--data-orange);
}

.teams-roster a:hover{ color: var(--data-orange); }

/* ---------- wiki page ---------- */

.wiki-main{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(16px, 3vw, 24px) var(--page-gutter) clamp(40px, 6vw, 56px);
  width: min(100%, var(--layout-wide, 1120px));
  max-width: var(--layout-wide, 1120px);
  min-width: 0;
  margin-inline: auto;
  box-sizing: border-box;
}

.wiki-head{ display: flex; flex-direction: column; gap: 6px; }
.wiki-head h1{
  font-family: var(--mono);
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
}
.wiki-head p{ margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

.wiki-controls{
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-block);
  padding: 14px;
}

.wiki-search{
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  min-height: 44px;
}

.wiki-filters{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wiki-filters select{
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-family: var(--mono);
  background: var(--surface);
  min-height: 40px;
}

.wiki-alphabet{
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.wiki-alphabet button{
  appearance: none;
  border: 2px solid var(--hairline);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 7px;
  cursor: pointer;
  min-width: 28px;
}
.wiki-alphabet button:hover{ border-color: var(--ink); color: var(--ink); }
.wiki-alphabet button.is-disabled{ opacity: 0.35; cursor: default; }

.wiki-count{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.wiki-list li{ list-style: none; }

.wiki-row-wrap{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  border-bottom: 2px solid var(--ink);
}

.wiki-row-wrap .wiki-row{ border-bottom: none; }

.wiki-row__grades{
  align-self: center;
  margin-right: 8px;
  font-size: 10px;
  padding: 6px 10px;
  white-space: nowrap;
}

.wiki-list{
  list-style: none;
  margin: 0;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.wiki-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  appearance: none;
  border: none;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
}
.wiki-list li:last-child .wiki-row{ border-bottom: none; }
.wiki-row:hover{ background: var(--paper); }
.wiki-row__name{ font-weight: 700; }
.wiki-row__meta{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.wiki-empty{
  padding: 24px 14px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 13px;
}

/* ---------- methods page ---------- */

.methods-main{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(16px, 3vw, 24px) var(--page-gutter) clamp(40px, 6vw, 56px);
  width: min(100%, var(--layout-max, 720px));
  max-width: var(--layout-max, 720px);
  min-width: 0;
  margin-inline: auto;
  box-sizing: border-box;
}
.methods-main h1{
  font-family: var(--mono);
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
}
.methods-section{
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-block-sm);
  padding: 16px;
}
.methods-doctrine{
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 12px;
  max-width: 62ch;
}
.methods-codeblock{
  font-family: var(--mono);
  font-size: 12px;
  background: var(--paper);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--ink-soft);
  margin: 8px 0;
}
.methods-section h2{
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
  border-bottom: 2px solid var(--data-orange);
  display: inline-block;
  padding-bottom: 2px;
}
.methods-section p{ font-size: 13px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 8px; }
.methods-section p:last-child{ margin-bottom: 0; }
.methods-section ul{ margin: 0 0 8px; padding-left: 18px; }
.methods-section li{ font-size: 13px; line-height: 1.6; color: var(--ink-soft); }
.methods-section table{ width: 100%; border-collapse: collapse; font-size: 12px; margin: 8px 0; }
.methods-section th, .methods-section td{
  border: 1px solid var(--hairline);
  padding: 6px 8px;
  text-align: left;
}
.methods-section code{
  font-family: var(--mono);
  font-size: 12px;
  background: var(--paper);
  padding: 1px 5px;
  border-radius: 4px;
}
.methods-limitations{ background: var(--identified-bg); border-color: var(--ink); }

/* ---------- identity chip ("you play as {name}") ----------
   Lives in play.html's .vh-header__brand (game page header) and inline in
   leaderboard.html's intro line — both just need #identity-name filled in
   by assets/leaderboard.js's window.VHIdentity.sessionName(). */

.vh-identity-chip{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px 9px;
  width: fit-content;
}
.vh-identity-chip b{ color: var(--data-blue); font-weight: 800; }

.vh-favorite-chip{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px 9px;
  width: fit-content;
}
.vh-favorite-chip b{ color: var(--team-primary, var(--data-orange)); font-weight: 800; }

/* Team theme — accent stripe + tinted surfaces when favorite team is set */
body.vh-team-themed::before{
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--team-primary, var(--data-orange)) 0%,
    var(--team-primary, var(--data-orange)) 50%,
    var(--team-secondary, var(--data-blue)) 50%,
    var(--team-secondary, var(--data-blue)) 100%
  );
  z-index: 10000;
  pointer-events: none;
}
body.vh-team-themed .site-nav,
body.vh-team-themed .vh-header{
  border-bottom-color: var(--team-primary, var(--data-orange));
}
body.vh-team-themed .vh-btn--primary{
  background: var(--team-primary, var(--data-orange));
  color: var(--paper);
  border-color: var(--ink);
}
body.vh-team-themed .vh-btn--accent{
  color: var(--team-secondary, var(--data-blue));
  border-color: var(--team-secondary, var(--data-blue));
}
body.vh-team-themed .landing-hero__title-accent,
body.vh-team-themed .site-nav__accent,
body.vh-team-themed .vh-logo__accent{
  color: var(--team-primary, var(--data-orange));
}
body.vh-team-themed .vh-favorite-picker__select:focus,
body.vh-team-themed .landing-favorite__select:focus{
  outline: 2px solid var(--team-primary, var(--data-orange));
  outline-offset: 1px;
}

.vh-favorite-picker{
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vh-favorite-picker__hint{
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.vh-favorite-picker__select{
  font-family: var(--mono);
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  width: 100%;
}

.landing-favorite{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.landing-favorite__label{
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.landing-favorite__select{
  font-family: var(--mono);
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  min-width: 220px;
}

/* ---------- leaderboard page ---------- */

.leaderboard-main{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(16px, 3vw, 24px) var(--page-gutter) clamp(40px, 6vw, 56px);
  width: min(100%, var(--layout-max, 720px));
  max-width: var(--layout-max, 720px);
  min-width: 0;
  margin-inline: auto;
  box-sizing: border-box;
}

.lb-head{ display: flex; flex-direction: column; gap: 8px; }
.lb-head h1{
  font-family: var(--mono);
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
}
.lb-head p{
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.lb-controls{
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-block);
  padding: 14px;
}

.lb-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lb-chip{
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 7px 14px;
  cursor: pointer;
  min-height: 36px;
}
.lb-chip:hover{ color: var(--ink); }
.lb-chip.is-active{
  background: var(--ink);
  color: var(--paper);
}
.lb-chip__icon{ font-size: 13px; }

.lb-date-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.lb-date-label{
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.lb-date-row .vh-link-btn:disabled{ opacity: 0.35; cursor: default; }

.lb-board-card{
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-block);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lb-board-meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
}
.lb-players{ color: var(--ink); font-weight: 700; }
.lb-note{ color: var(--ink-muted); text-align: right; }

.lb-chimera-note{
  margin: 0;
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 8px 10px;
}

.lb-table-wrap{ overflow-x: auto; }

.lb-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.lb-table th{
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  border-bottom: 2px solid var(--ink);
  padding: 6px 8px;
}
.lb-table td{
  border-bottom: 1px solid var(--hairline);
  padding: 8px;
  color: var(--ink);
}
.lb-th-rank{ width: 56px; }
.lb-td-rank{ font-family: var(--mono); font-weight: 700; color: var(--ink-muted); }
.lb-td-score{ font-family: var(--mono); font-weight: 700; text-align: right; }
.lb-table tbody tr:last-child td{ border-bottom: none; }

.lb-row--you td{ background: var(--identified-bg); }
.lb-row--you .lb-td-rank{ color: var(--data-blue); }
.lb-you-badge{
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--paper);
  background: var(--data-blue);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}

.lb-empty{
  padding: 28px 14px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 13px;
}

.lb-you-line{
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--data-blue);
  font-weight: 700;
}

/* ---------- drift page ---------- */

.drift-main{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(16px, 3vw, 24px) var(--page-gutter) clamp(40px, 6vw, 56px);
  width: min(100%, var(--layout-wide, 1120px));
  max-width: var(--layout-wide, 1120px);
  min-width: 0;
  margin-inline: auto;
  box-sizing: border-box;
}

.drift-head{ display: flex; flex-direction: column; gap: 6px; }
.drift-head h1{
  font-family: var(--mono);
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
}
.drift-hero-line{
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 60em;
}
.drift-hero-line a{ color: var(--ink); border-bottom: 2px solid var(--data-orange); text-decoration: none; }
.drift-hero-line a:hover{ color: var(--data-orange); }

.drift-card{
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-block-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drift-card__head{ display: flex; flex-direction: column; gap: 4px; }
.drift-card__head h2{
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
  border-bottom: 2px solid var(--data-orange);
  display: inline-block;
  padding-bottom: 2px;
  width: fit-content;
}
.drift-card__head p{ margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-soft); }

.drift-chart{ width: 100%; }
.drift-chart svg{ display: block; width: 100%; height: auto; }

.drift-annotation-note{
  margin: 0;
  font-size: 12px;
  color: var(--ink-muted);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 8px 10px;
  line-height: 1.5;
}
.drift-annotation-note b{ color: var(--data-blue); }

.drift-table-wrap{ overflow-x: auto; }
.drift-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 560px;
}
.drift-table th{
  text-align: left;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  border-bottom: 2px solid var(--ink);
  padding: 6px 8px;
}
.drift-table td{
  border-bottom: 1px solid var(--hairline);
  padding: 7px 8px;
  color: var(--ink);
}
.drift-table tbody tr:last-child td{ border-bottom: none; }
.drift-loading{ color: var(--ink-muted); text-align: center; padding: 14px; }

.drift-method{ margin: 0; }
.drift-method-quote{
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink-soft);
  white-space: pre-wrap;
}

/* ---------- shared viz layout (trends page) ---------- */

.drift-card__head--compact p{ max-width: 52ch; }
.drift-card__foot{
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.5;
}
.drift-card__foot a{ font-weight: 600; }

.viz-duo-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 760px){
  .viz-duo-grid{ grid-template-columns: 1fr; }
}
.viz-panel__label{
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.viz-panel__chart svg{ display: block; width: 100%; height: auto; }

.archetype-era-compact{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.era-compact-card{
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 8px 10px;
}
.era-compact-card__head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--hairline);
}
.era-compact-card__head span{ color: var(--ink-muted); font-weight: 500; text-transform: none; }
.era-compact-bar{
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 6px;
  margin-bottom: 5px;
}
.era-compact-bar__name{
  grid-column: 1 / -1;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.era-compact-bar__track{
  height: 6px;
  background: var(--hairline);
  border-radius: 3px;
  overflow: hidden;
}
.era-compact-bar__fill{
  display: block;
  height: 100%;
  background: var(--data-blue);
  border-radius: 3px;
}
.era-compact-bar__pct{
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-muted);
  min-width: 28px;
  text-align: right;
}
.era-compact-badge{
  font-size: 9px;
  margin-left: 3px;
}
.era-compact-badge--novel{ color: var(--data-orange); }
.era-compact-badge--lineage{ color: var(--data-blue); }
.era-compact-bar__tags{
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: -2px;
}
.era-compact-tag{
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  background: var(--paper-2, #f4f3ee);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 1px 5px;
}

/* ---------- archetype court heatmap (trends) ---------- */
.court-heatmap{
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}
.court-heatmap__head{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 10px;
}
.court-heatmap__head .viz-panel__label{ margin: 0; }
.court-heatmap__modes{
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.court-heatmap__mode,
.court-heatmap__era{
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border: 1px solid var(--hairline);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 4px;
  cursor: pointer;
}
.court-heatmap__mode.is-active,
.court-heatmap__era.is-active{
  border-color: var(--ink);
  color: var(--ink);
  background: #fff;
}
.court-heatmap__body{
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(180px, 0.9fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 720px){
  .court-heatmap__body{ grid-template-columns: 1fr; }
}
.court-heatmap__canvas{
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 50 / 47;
  background: #fff;
  border: 1.5px solid rgba(17,17,17,0.22);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6);
}
.court-heatmap__caption{
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.45;
  font-weight: 500;
}
.court-heatmap__era-tabs{
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.court-heatmap__zones{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.court-heatmap__zone{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(17,17,17,0.12);
}
.court-heatmap__zone-name{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 600;
}
.court-heatmap__zone-dot{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--ink-muted);
}
.court-heatmap__zone.is-up .court-heatmap__zone-dot{ background: var(--hot); }
.court-heatmap__zone.is-down .court-heatmap__zone-dot{ background: var(--cold); }
.court-heatmap__zone-val{
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
}
.court-heatmap__zone.is-up .court-heatmap__zone-val{ color: var(--hot); }
.court-heatmap__zone.is-down .court-heatmap__zone-val{ color: var(--cold); }
.court-heatmap__tags{ margin-top: 14px; }
.court-heatmap__tags-label{
  margin: 0 0 6px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.court-heatmap__baseline-kind{
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
.court-heatmap__tags-empty{
  margin: 0;
  font-size: 11.5px;
  color: var(--ink-muted);
}
.court-heatmap__tag-row{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.court-heatmap__tag{
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 4px 8px;
  background: var(--paper);
}
.court-heatmap__tag em{
  font-style: normal;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  margin-left: 2px;
}
.court-heatmap__tag.is-up{ border-color: color-mix(in srgb, var(--hot) 35%, var(--hairline)); }
.court-heatmap__tag.is-down{ border-color: color-mix(in srgb, var(--cold) 35%, var(--hairline)); }
.court-heatmap__legend{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 12px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
  align-items: center;
}
.court-heatmap__swatch{
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: -2px;
  border: 1px solid rgba(17,17,17,0.15);
}
.court-heatmap__swatch--up{ background: #006300; }
.court-heatmap__swatch--down{ background: #c62828; }
.court-heatmap__swatch--def{
  background: repeating-linear-gradient(
    45deg,
    #1e64c8,
    #1e64c8 2px,
    transparent 2px,
    transparent 4px
  );
}

.emergence-claims-viz{ margin: 4px 0 14px; }
.emergence-claims-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.emergence-claim-pill{
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: var(--paper);
  cursor: help;
}
.emergence-claim-pill--yes{ border-left: 3px solid #199e70; }
.emergence-claim-pill--no{ border-left: 3px solid var(--hairline); opacity: 0.85; }
.emergence-claim-pill__icon{
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  flex-shrink: 0;
}
.emergence-claim-pill--yes .emergence-claim-pill__icon{ color: #199e70; }
.emergence-claim-pill--no .emergence-claim-pill__icon{ color: var(--ink-muted); }
.emergence-claim-pill__text{
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.emergence-novel-badges{ margin-bottom: 4px; }
.novel-era-row{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.novel-era-row__label{
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-muted);
  min-width: 72px;
}
.novel-era-row__badges{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.novel-badge{
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(235,104,52,0.1);
  border: 1px solid rgba(235,104,52,0.35);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: help;
}
.drift-loading--inline{ font-size: 12px; margin: 0; }

.trajectory-class-viz svg{ display: block; width: 100%; height: auto; max-height: 180px; }

.trajectory-path-gallery{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 14px;
}
.path-gallery__row{
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 8px 10px;
}
.path-gallery__meta{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-bottom: 6px;
}
.path-gallery__class{
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.path-gallery__name{
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.path-gallery__n{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
}
.path-gallery__track{
  display: flex;
  height: 14px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--hairline);
}
.path-block{
  min-width: 2px;
  height: 100%;
}
.path-gallery__skill{
  display: block;
  margin-top: 5px;
  font-size: 10px;
  color: var(--ink-muted);
  font-style: italic;
}

.trajectory-motif-flow svg{ display: block; width: 100%; height: auto; }

/* ---------- archetype eras (drift page) ---------- */

.trends-viz-card{ overflow: hidden; }

.trends-biggest-shifts{
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline);
}
.trends-biggest-shifts__head{
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
}
.trends-biggest-shifts__row{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 900px){
  .trends-biggest-shifts__row{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .trends-biggest-shifts__row{ grid-template-columns: 1fr; }
}
.trends-shift-card{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: var(--paper);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.trends-shift-card:hover{
  border-color: var(--data-orange);
  box-shadow: 0 2px 8px rgba(17,17,17,0.06);
}
.trends-shift-card--active{
  border-color: var(--data-orange);
  background: rgba(235,104,52,0.08);
  box-shadow: inset 0 0 0 1px rgba(235,104,52,0.25);
}
.trends-shift-card__rank{
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--data-orange);
}
.trends-shift-card__deg{
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink);
}
.trends-shift-card__season{
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}
.trends-shift-card__feats{
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-muted);
}
.trends-shift-card__interp{
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-soft);
  font-style: italic;
}

.drift-era-legend{
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.drift-era-legend__item{
  display: flex;
  align-items: center;
  gap: 6px;
}
.drift-era-legend__swatch{
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 2px solid;
  flex-shrink: 0;
}
.drift-era-legend__label{
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
}

.trends-viz-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.trends-viz-grid--story{ margin-bottom: 12px; }
@media (max-width: 720px){
  .trends-viz-grid{ grid-template-columns: 1fr; }
}

.trends-viz-panel{
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.trends-viz-panel--bars{ margin-bottom: 4px; }

.trends-viz-svg{
  width: 100%;
  min-height: 140px;
}
.trends-viz-svg svg{
  display: block;
  width: 100%;
  height: auto;
}
.trends-viz-svg--wide svg{ max-height: 340px; }
.trends-viz-panel--gauge .trends-viz-svg{ min-height: 150px; }
.trends-viz-panel--compass .trends-viz-svg{ min-height: 200px; }

.trends-viz-panel__label{
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.trends-viz-controls{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.trends-viz-slider-label{
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}
.trends-viz-slider{
  flex: 1;
  min-width: 140px;
  accent-color: var(--data-orange);
}
.trends-viz-season-tag{
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--data-orange);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(235,104,52,0.1);
}

.trends-viz-caption{
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.trends-viz-caption b,
.trends-viz-caption strong{ color: var(--ink); }
.trends-viz-caption__interp{
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-muted);
  font-style: italic;
}

.trends-stat-narratives{
  display: grid;
  gap: 10px;
  margin: 14px 0 4px;
}
.trends-stat-narratives__empty{
  margin: 0;
  font-size: 12px;
  color: var(--ink-muted);
}
.trends-stat-card{
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: var(--paper);
  padding: 10px 12px;
  border-left-width: 3px;
}
.trends-stat-card--favorable{ border-left-color: #199e70; }
.trends-stat-card--unfavorable{ border-left-color: #d03b3b; }
.trends-stat-card--neutral{ border-left-color: #2a78d6; }
.trends-stat-card--unreliable{ border-left-color: #9085e9; }
.trends-stat-card__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.trends-stat-card__name{
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.trends-stat-card__badge{
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
}
.trends-stat-card__body{
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.trends-story-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.trends-chip{
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
}
.trends-chip:hover{ border-color: var(--data-orange); color: var(--ink); }
.trends-chip--active{
  background: rgba(235,104,52,0.12);
  border-color: var(--data-orange);
  color: var(--data-orange);
}

.archetype-stream-chart{ width: 100%; }
.archetype-stream-chart svg{ display: block; width: 100%; height: auto; }

.archetype-legend{
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.archetype-legend__item{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.3;
}
.archetype-legend__swatch{
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: 0 0 auto;
}

.archetype-delta{ font-weight: 700; }
.archetype-delta--up{ color: var(--hot); }
.archetype-delta--down{ color: var(--cold); }

.archetype-era-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.archetype-era-card{
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.archetype-era-card__head{
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 6px;
}
.archetype-era-card__n{ color: var(--ink-muted); font-weight: 400; text-transform: none; letter-spacing: normal; }
.archetype-era-list{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.archetype-era-item__name{ font-size: 12px; font-weight: 600; color: var(--ink); }
.archetype-era-item__share{ font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }
.archetype-lineage{
  margin: 1px 0 0;
  font-size: 10.5px;
  color: var(--ink-muted);
  line-height: 1.4;
}
.archetype-lineage--strong{
  color: var(--data-blue);
  font-weight: 700;
}
.archetype-lineage--novel{
  color: var(--data-orange);
  font-weight: 700;
  font-style: normal;
}

/* ---------- archetype emergence (trends page) ---------- */

.emergence-verdict{
  margin: 0 0 14px;
  padding: 12px 14px;
  background: var(--paper);
  border-radius: 8px;
  border: 1px solid var(--hairline);
}
.emergence-verdict__head{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.emergence-verdict__badge{
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
}
.emergence-verdict__badge--supported{ background: #e6f4ea; color: #1e6b3a; }
.emergence-verdict__badge--partially-supported{ background: #fff4e5; color: #9a5b00; }
.emergence-verdict__badge--not-supported{ background: #fdecea; color: #9b2c2c; }
.emergence-verdict__score{ font-size: 11px; color: var(--ink-muted); }
.emergence-verdict__headline{ margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink); }
.emergence-role-chart svg,
.emergence-rolling-chart svg{ display: block; width: 100%; height: auto; }
.emergence-claim--yes td:nth-child(2){ color: #1e6b3a; font-weight: 600; }
.emergence-claim--no td:nth-child(2){ color: var(--ink-muted); }

/* ---------- career shapes / trajectories (drift page) ---------- */

.trajectory-headline{
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  border-left: 3px solid var(--data-orange);
  border-radius: 6px;
  padding: 10px 12px;
}
.trajectory-headline b{ color: var(--data-orange); }

.trajectory-class-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.trajectory-class-card{
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.trajectory-class-card__head{
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink);
}
.trajectory-class-card__share{
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 800;
  color: var(--data-orange);
}
.trajectory-class-card__stats{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
}
.trajectory-class-card__def{
  margin: 2px 0 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ink-muted);
}

.trajectory-era-chart{ width: 100%; }
.trajectory-era-chart svg{ display: block; width: 100%; height: auto; }

.trajectory-motif-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trajectory-motif-item{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 8px 10px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-size: 12.5px;
}
.trajectory-motif-item__path{ font-weight: 600; color: var(--ink); }
.trajectory-motif-item__count{
  font-family: var(--mono);
  font-weight: 800;
  color: var(--data-orange);
}
.trajectory-motif-item__gloss{
  color: var(--ink-muted);
  font-style: italic;
}
.trajectory-motif-item__gloss::before{ content: "— "; }
.archetype-lineage__chain{ font-weight: 700; }

/* ---- skills lens (skills.html + shared badge chips) ---- */
.skills-main{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(16px, 3vw, 24px) var(--page-gutter) clamp(40px, 6vw, 56px);
  width: min(100%, var(--layout-wide, 1120px));
  max-width: var(--layout-wide, 1120px);
  min-width: 0;
  margin-inline: auto;
  box-sizing: border-box;
}
.skills-head{ display: flex; flex-direction: column; gap: 6px; }
.skills-head h1{
  margin: 0;
  font-family: var(--mono);
  font-size: 26px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.skills-head p{ margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.skills-columns{
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 760px){
  .skills-columns{ grid-template-columns: minmax(0, 1fr); }
}
.skills-panel{
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-block);
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skills-panel h2{
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.skills-hint{ margin: 0; font-size: 12px; color: var(--ink-muted); line-height: 1.5; }
.skills-suggest{
  list-style: none;
  margin: 0; padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
}
.skills-suggest:empty{ display: none; }
.skills-suggest button{
  display: flex; justify-content: space-between; gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0; border-bottom: 1px solid var(--hairline);
  background: var(--surface);
  font: 13px var(--sans);
  text-align: left;
  cursor: pointer;
}
.skills-suggest li:last-child button{ border-bottom: 0; }
.skills-suggest button:hover{ background: var(--paper); }
.skills-suggest__meta{ color: var(--ink-muted); font-size: 11px; white-space: nowrap; }
.skills-seasons{ display: flex; flex-wrap: wrap; gap: 6px; }
.skills-seasons button{
  font: 11px var(--mono);
  padding: 4px 8px;
  border: 1.5px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
}
.skills-seasons button.is-active{
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.skills-player-meta{ font-size: 12px; color: var(--ink-soft); margin: 0; }
.skills-era-tag{
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--data-blue);
  background: rgba(42, 120, 214, 0.1);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 2px;
}
.skills-era-arch{ color: var(--ink-muted); font-style: italic; }
.skillbar-list{ display: flex; flex-direction: column; gap: 7px; margin: 0; padding: 0; list-style: none; }
.skillbar{
  display: grid;
  grid-template-columns: clamp(72px, 26vw, 132px) minmax(0, 1fr) clamp(26px, 7vw, 34px);
  align-items: center;
  gap: clamp(6px, 1.5vw, 10px);
}
.skillbar__label{
  font: 10px var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.skillbar__track{
  display: block;
  height: 11px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  overflow: hidden;
}
.skillbar__fill{
  display: block;
  height: 100%;
  background: var(--data-blue);
  border-radius: 5px;
  transition: width 200ms ease;
}
.skillbar__fill.is-strong{ background: var(--data-orange); }
.skillbar__fill.is-elite{ background: var(--identified); }
.skillbar__grade{
  font: 11px var(--mono);
  text-align: right;
  font-weight: 700;
}
.vh-skill-badges{ display: flex; flex-wrap: wrap; gap: 6px; }
.vh-skill-badge{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 10px var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--identified-bg);
  color: var(--ink);
  white-space: nowrap;
}
.vh-skill-badge--gold{ background: var(--identified); }
.vh-skill-badge--muted{
  border-color: var(--hairline);
  background: var(--paper);
  color: var(--ink-muted);
}
.vh-skill-note{
  font-size: 12px;
  color: var(--ink-muted);
  font-style: italic;
}
.skills-mtnn{ margin-top: 16px; }
.skills-mtnn__list{
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.skills-mtnn__list li{
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
}
.skills-mtnn__list a{ font-weight: 600; }
.skills-mtnn__meta{ color: var(--ink-muted); font-size: 12px; }
.skills-board-controls{ display: flex; gap: 8px; flex-wrap: wrap; }
.skills-board-controls select{
  font: 12px var(--mono);
  padding: 7px 9px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--surface);
}
.skills-board{ list-style: none; margin: 0; padding: 0; counter-reset: boardrank; }
.skills-board li{
  counter-increment: boardrank;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 2px;
  border-bottom: 1px solid var(--hairline);
  font-size: 13px;
}
.skills-board li::before{
  content: counter(boardrank);
  font: 11px var(--mono);
  color: var(--ink-muted);
  min-width: 20px;
  text-align: right;
}
.skills-board li:last-child{ border-bottom: 0; }
.skills-board__name{ flex: 1 1 auto; font-weight: 700; cursor: pointer; }
.skills-board__name:hover{ text-decoration: underline; }
.skills-board__season{ font: 11px var(--mono); color: var(--ink-soft); }
.skills-board__grade{ font: 12px var(--mono); font-weight: 700; }

/* ---- next-season predicted vs actual (skills profile) ---- */
.skills-next-profile{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.np-splits{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.np-split{
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 1fr 1fr 52px;
  align-items: baseline;
  gap: 8px;
  font: 12px var(--mono);
  padding: 3px 0;
  border-bottom: 1px solid var(--hairline);
}
.np-splits--pending .np-split{
  grid-template-columns: minmax(0, 1.4fr) 1fr;
}
.np-split:last-child{ border-bottom: 0; }
.np-split--head{
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 5px;
  margin-bottom: 2px;
}
.np-split__label{ color: var(--ink-soft); font-size: 11px; }
.np-split__pred{ font-weight: 700; }
.np-split__actual{ color: var(--ink); }
.np-split__delta{ text-align: right; font-weight: 700; color: var(--ink-muted); }
.np-split__delta--ok{ color: var(--ink-soft); }
.np-split__delta--miss{ color: var(--data-orange); }

/* ---- playoff lens (skills.html Playoff Lens; dormant until data lands) ---- */
.skills-playoffs{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.po-tag{
  font: 10px var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  margin-left: 6px;
  white-space: nowrap;
}
.po-tag--riser{ background: var(--hot); color: #fff; border-color: var(--hot); }
.po-tag--fader{ background: var(--cold); color: #fff; border-color: var(--cold); }
.po-tag--steady{ background: var(--paper); color: var(--ink-soft); }
.po-tag--champion{
  background: #111;
  color: #f5d76e;
  border-color: #111;
  font-weight: 800;
}
.po-honors{ margin-left: 4px; }
.po-series__row--won{ border-color: var(--ink); }
.po-series__row--lost{ opacity: 0.85; }
.po-series__row--champion{
  background: #111;
  color: #f5d76e;
  border-color: #111;
}
.po-series__row--champion .po-series__opp{ color: #f5d76e; }
.po-series__mark{ font-size: 10px; margin-left: 4px; opacity: 0.85; }
.po-splits{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.po-split{
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 1fr 1fr 46px;
  align-items: baseline;
  gap: 8px;
  font: 12px var(--mono);
  padding: 3px 0;
  border-bottom: 1px solid var(--hairline);
}
.po-split:last-child{ border-bottom: 0; }
.po-split__label{ color: var(--ink-soft); font-size: 11px; }
.po-split__rs{ color: var(--ink-muted); }
.po-split__po{ font-weight: 700; }
.po-split__delta{ text-align: right; font-weight: 700; }

.po-series{
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.po-series__row{
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 48px;
  gap: 8px;
  align-items: baseline;
  font: 12px var(--mono);
  padding: 4px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
}
.po-series__round{ font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-size: 10px; }
.po-series__opp{ color: var(--ink-soft); }
.po-series__result{ text-align: right; font-weight: 800; }

.po-games{ margin-top: 4px; }
.po-games summary{
  cursor: pointer;
  font: 700 12px var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 4px 0;
}
.po-game-list{
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  overflow-x: auto;
}
.po-game{
  display: grid;
  grid-template-columns: 44px minmax(90px, 1.4fr) 28px 36px 36px 36px 40px 44px;
  gap: 6px;
  align-items: baseline;
  font: 11px var(--mono);
  padding: 3px 0;
  border-bottom: 1px solid var(--hairline);
  min-width: 420px;
}
.po-game--head{
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 9px;
  border-bottom: 1.5px solid var(--ink);
}
.po-game__wl--w{ color: var(--hot); font-weight: 800; }
.po-game__wl--l{ color: var(--cold); font-weight: 800; }
.po-game__pts{ font-weight: 800; }
.po-game__pm{ text-align: right; }

/* ---- wide (masked) tracking skills in the profile ---- */
.skillbar--widehead .skillbar__label{
  color: var(--ink-muted);
  font-size: 9px;
  padding-top: 4px;
  border-top: 1px dashed var(--hairline);
}
.skillbar--widehead{ margin-top: 2px; }
.skillbar__grade--na{ color: var(--ink-muted); font-weight: 400; }

/* ---------- MTNN network explorer (/model) ---------- */

.network-main{
  max-width: none;
  width: min(100%, calc(100vw - 20px));
}
.network-hero{ max-width: 58ch; }
.network-controls-card{ margin-bottom: 14px; position: relative; }
.network-controls{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.network-controls__label{
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}
.network-search{ flex: 1; min-width: 180px; max-width: 280px; }
.network-suggest{
  position: absolute;
  z-index: 20;
  list-style: none;
  margin: 0;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  max-width: 320px;
}
.network-suggest button{
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}
.network-suggest button:hover{ background: rgba(235,104,52,0.08); }
.network-suggest span{ color: var(--ink-muted); font-family: var(--mono); font-size: 11px; }
.network-player-tag{
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--data-orange);
}
.network-player-tag--compare{
  color: #67b5ff;
}
.network-compare-toggle{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
}
.network-compare-toggle input{
  accent-color: var(--data-orange);
}
.network-timebar{
  margin-top: 10px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px 10px;
}
.network-timebar__head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.network-timebar__label{
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}
.network-timebar__current{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
}
.network-timebar input[type="range"]{
  width: 100%;
  margin: 8px 0 2px;
}
.network-timebar__range{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
}
.network-step-nav{
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.network-step-btn{
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: var(--paper);
  cursor: pointer;
  color: var(--ink-soft);
}
.network-step-btn.is-active{
  border-color: var(--data-orange);
  background: rgba(235,104,52,0.12);
  color: var(--ink);
}
.network-play-btn{
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: var(--data-orange);
  color: #fff;
  cursor: pointer;
}
.network-play-btn:disabled{ opacity: 0.5; cursor: wait; }
.network-step-caption{
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.network-story{
  margin-top: 12px;
}
.network-story-lane{
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 8px;
  align-items: stretch;
}
.network-story-stage{
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 8px;
  background: var(--paper);
  opacity: 0.55;
  transition: opacity .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.network-story-stage.is-done{ opacity: 0.82; }
.network-story-stage.is-active{
  opacity: 1;
  border-color: rgba(235,104,52,0.45);
  box-shadow: inset 0 0 0 1px rgba(235,104,52,0.12);
}
.network-story-stage__head{
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.network-story-stage__chips{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.network-story-chip{
  font-size: 11px;
  line-height: 1.2;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  padding: 4px 8px;
  background: var(--paper);
  color: var(--ink-soft);
}
.network-story-chip b{
  font-family: var(--mono);
  margin-left: 4px;
  color: var(--ink);
}
.network-story-chip--arch{
  border-color: rgba(235,104,52,0.45);
  background: rgba(235,104,52,0.08);
}
.network-story-arrow{
  align-self: center;
  font-size: 16px;
  color: var(--ink-muted);
  font-weight: 700;
}
@media (max-width: 980px){
  .network-story-lane{
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .network-story-arrow{ display: none; }
}

/* Full-width stacked sections (embedding space, then data flow). */
.network-section{
  margin-bottom: 14px;
  overflow: hidden;
}
.network-section__head{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.network-section__head .viz-panel__label{ margin: 0; }
.network-map-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 16px;
  align-items: start;
}
.network-flow-layout{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 16px;
  align-items: start;
}
.network-flow-main{ min-width: 0; }
@media (max-width: 900px){
  .network-map-layout,
  .network-flow-layout{ grid-template-columns: 1fr; }
}
.network-map-canvas{
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  background: #121210;
  cursor: grab;
}
.network-map-canvas:active{ cursor: grabbing; }
/* Archetype legend: the secondary encoding that keeps map identity from
   resting on hue alone. Text wears ink tokens; the swatch carries identity. */
.network-map-legend{
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
.network-map-legend__item{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--ink-soft);
}
.network-map-legend__swatch{
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
  /* 2px surface ring so adjacent swatches never touch */
  box-shadow: 0 0 0 2px #121210;
}
.network-map-legend__name{ color: var(--ink-soft); }
/* "37.5 /100" — the unit recedes so the number reads first. */
.network-node-inspector__num .unit,
.network-skill-row__val .unit{
  color: var(--ink-muted);
  font-size: 0.85em;
  font-weight: 400;
}
.network-map-card,
.network-flow-card{ overflow: hidden; }
.network-map-stage{
  position: relative;
  min-width: 0;
}
.network-map-layout .network-insights,
.network-flow-layout .network-node-inspector{ margin-top: 0; }
/* Trace tooling */
.network-flow-tools{
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.network-trace-status{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
}
.network-trace-status.is-tracing{ color: var(--data-orange); }
.network-trace-clear{
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
}
.network-trace-clear:hover{ border-color: var(--data-orange); color: var(--ink); }
.network-map-hint{
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--ink-muted);
}
.network-insights{
  margin-top: 10px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
}
.network-insights__head{
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.network-insights__chips{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.network-insight-chip{
  font-size: 11px;
  line-height: 1.2;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  padding: 3px 8px;
  color: var(--ink-soft);
  background: var(--paper);
}
.network-insight-chip b{
  font-family: var(--mono);
  margin-left: 4px;
  color: var(--ink);
}
.network-neighbor-list{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.network-neighbor-list li{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  border-bottom: 1px dashed var(--hairline);
  padding-bottom: 4px;
}
.network-neighbor-list li:last-child{
  border-bottom: 0;
  padding-bottom: 0;
}
.network-neighbor-list__name{
  font-size: 12px;
  color: var(--ink);
}
.network-neighbor-list__meta{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
}
.network-neighbor-list__pick{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.network-neighbor-list__pick:hover .network-neighbor-list__name{
  text-decoration: underline;
}
.network-insight-meters{
  display: grid;
  gap: 7px;
}
.network-insight-meter{
  display: grid;
  grid-template-columns: minmax(112px, 138px) minmax(0, 1fr) 52px;
  align-items: center;
  gap: 8px;
}
.network-insight-meter__label{
  font-size: 11px;
  color: var(--ink-soft);
}
.network-insight-meter__bar{
  height: 8px;
  border-radius: 999px;
  background: var(--hairline);
  overflow: hidden;
}
.network-insight-meter__fill{
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(235,104,52,0.65), #eb6834);
}
.network-insight-meter__val{
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
  color: var(--ink-soft);
}
.network-node-inspector__head{
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.network-node-inspector__list{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow: auto;
}
.network-node-inspector__list li{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 64px;
  gap: 8px;
  align-items: baseline;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--hairline);
}
.network-node-inspector__name{
  font-size: 12px;
  color: var(--ink);
}
.network-node-inspector__pick{
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font-size: 12px;
  color: var(--ink);
  padding: 2px 4px;
  cursor: pointer;
}
.network-node-inspector__pick:hover{
  border-color: var(--hairline);
  background: rgba(103,181,255,0.08);
}
.network-node-inspector__pick.is-selected{
  border-color: #67b5ff;
  background: rgba(103,181,255,0.18);
}
.network-node-inspector__num{
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
  color: var(--ink-soft);
}
.network-node-inspector__hint{
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--ink-muted);
}
.network-flow-host{
  min-height: 520px;
  background: #FFFEF7;
  background-image: radial-gradient(#E8E0C8 1px, transparent 1.2px);
  background-size: 22px 22px;
  border: 2px solid #111;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  box-shadow: 4px 4px 0 #111;
}
.network-flow-host::after{
  content: '';
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: transparent;
  opacity: 0;
}
.network-arch-row,
.network-skill-row{
  cursor: pointer;
}
.network-arch-row.is-selected,
.network-skill-row.is-selected{
  outline: 2px solid rgba(103,181,255,0.55);
  background: rgba(103,181,255,0.08);
}
.network-flow-svg{ display: block; width: 100%; height: auto; }
.network-flow-col-label{
  fill: #111111;
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.network-flow-node{
  fill: #FFFFFF;
  stroke: #111111;
  stroke-width: 2.2;
  transition: fill 0.2s ease, stroke 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
}
.network-flow-node--input{ fill: #FFFFFF; stroke:#111111; stroke-width:2.2; }
.network-flow-node.is-lit{ stroke: #111111; fill: #FFFFFF; opacity:0.92; }
.network-flow-node.is-active{
  stroke: #111111;
  fill: #F0E442;
  stroke-width:2.5;
}
.network-flow-node.is-selected{
  stroke: #0072B2;
  fill: #FFFFFF;
  stroke-width: 2.8;
}
.network-flow-edge{
  fill: none;
  stroke: #111111;
  stroke-width: 1.2;
  opacity: 0.55;
  transition: stroke 0.35s ease, opacity 0.35s ease, stroke-width 0.35s ease;
}
.network-flow-edge.is-lit{ stroke: #5a5954; opacity: 0.5; }
.network-flow-edge.is-active{
  stroke: #eb6834;
  opacity: 0.85;
  stroke-width: 1.5;
}
.network-flow-edge--main{ stroke-width: 2; }
.network-flow-edge--head{ stroke-width: 1; }

/* Slow signal crawl on lit / traced edges — presence, not noise. */
.network-flow-host.is-animating .network-flow-edge.is-active,
.network-flow-host.is-animating .network-flow-edge.on-path{
  stroke-dasharray: 7 11;
  animation: network-flow-crawl 4.8s linear infinite;
}
.network-flow-host.is-animating .network-flow-edge--main.is-active,
.network-flow-host.is-animating .network-flow-edge--main.on-path{
  stroke-dasharray: 10 14;
  animation-duration: 5.6s;
}
.network-flow-host.is-animating .network-flow-node.is-active,
.network-flow-host.is-animating .network-flow-node.on-path{
  animation: network-node-breathe 3.6s ease-in-out infinite;
}
.network-flow-host.is-animating .network-flow-node--embed.is-active,
.network-flow-host.is-animating .network-flow-node--embed.on-path{
  animation: network-embed-glow 4.2s ease-in-out infinite;
}
@keyframes network-flow-crawl{
  from{ stroke-dashoffset: 0; }
  to{ stroke-dashoffset: -72; }
}
@keyframes network-node-breathe{
  0%, 100%{ opacity: 1; }
  50%{ opacity: 0.78; }
}
@keyframes network-embed-glow{
  0%, 100%{ stroke-width: 2; }
  50%{ stroke-width: 2.8; }
}
@media (prefers-reduced-motion: reduce){
  .network-flow-host.is-animating .network-flow-edge.is-active,
  .network-flow-host.is-animating .network-flow-edge.on-path,
  .network-flow-host.is-animating .network-flow-edge--main.is-active,
  .network-flow-host.is-animating .network-flow-edge--main.on-path,
  .network-flow-host.is-animating .network-flow-node.is-active,
  .network-flow-host.is-animating .network-flow-node.on-path,
  .network-flow-host.is-animating .network-flow-node--embed.is-active,
  .network-flow-host.is-animating .network-flow-node--embed.on-path{
    animation: none;
    stroke-dasharray: none;
  }
  .network-flow-node,
  .network-flow-edge{
    transition: none;
  }
}
.network-flow-head-item{
  fill: #2a2926;
  stroke: #4a4944;
  stroke-width: 1.2;
  cursor: pointer;
}
.network-flow-head-item.is-selected{
  fill: rgba(103,181,255,0.35);
  stroke: #67b5ff;
}
.network-flow-head-item.is-active{
  fill: rgba(235,104,52,0.35);
  stroke: #eb6834;
}

/* Tower family labels (shown for hovered / traced towers). */
.network-flow-tower-label{
  fill: #111111;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight:800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.network-flow-tower-label.is-shown{ opacity: 1; }

/* Line-of-sight tracing: dim everything off the active path so the
   traced input <-> output chain reads as one bright line. */
.network-flow-svg.is-tracing .network-flow-node:not(.on-path),
.network-flow-svg.is-tracing .network-flow-node--input:not(.on-path){
  opacity: 0.18 !important;
}
.network-flow-svg.is-tracing .network-flow-edge:not(.on-path){
  opacity: 0.12 !important;
}
.network-flow-svg.is-tracing [data-input-label]:not(.on-path),
.network-flow-svg.is-tracing [data-input-value]:not(.on-path){
  opacity: 0.22;
}
.network-flow-node.on-path{
  stroke: #111111;
  fill: #F0E442;
  stroke-width: 3;
}
.network-flow-edge.on-path{
  stroke: #111111;
  opacity: 0.95 !important;
  stroke-width: 2.6;
}
.network-flow-node.trace-origin{
  stroke: #0072B2;
  stroke-width: 3.2;
  fill: #FFFFFF;
}
.network-flow-host [data-input-label].on-path,
.network-flow-host [data-input-value].on-path{ fill: #111111; font-weight:800; }

.network-arch-out,
.network-skill-out{
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}
/* Guess & grade — nested under Data Flow so heads decode feels continuous. */
.network-flow-outputs{
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}
.network-flow-outputs__head{
  margin-bottom: 12px;
}
.network-flow-outputs__head .viz-panel__label{ margin: 0; }
.network-flow-outputs__grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.network-flow-outputs__panel{
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
}
.network-flow-outputs__panel .viz-panel__label{
  margin: 0 0 8px;
}
.network-flow-card.is-heads-step .network-flow-outputs{
  border-top-color: rgba(235,104,52,0.35);
}
.network-flow-card.is-heads-step .network-flow-outputs__panel{
  border-color: rgba(235,104,52,0.28);
  box-shadow: inset 0 0 0 1px rgba(235,104,52,0.08);
}
@media (max-width: 1200px){
  .network-flow-outputs__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px){
  .network-flow-outputs__grid{ grid-template-columns: 1fr; }
}
.network-flow-outputs__panel .network-arch-row{
  grid-template-columns: 24px 8px minmax(0, 1fr) minmax(64px, 1fr) 44px;
  gap: 6px;
  padding: 5px 6px;
}
.network-flow-outputs__panel .network-skill-row{
  grid-template-columns: minmax(0, 1fr) minmax(64px, 1fr) 36px;
  gap: 8px;
  padding: 5px 6px;
}
.network-flow-outputs__panel .network-arch-out,
.network-flow-outputs__panel .network-skill-out{
  max-height: 320px;
  overflow: auto;
}
.network-out-subhead{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 4px;
}
/* methods.html: plain-language glossaries for readers without a stats
   background. Same voice as the /model insight notes below. */
.methods-plainly{
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--data-orange);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 14px;
  margin: 16px 0;
}
.methods-plainly__head{
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}
.methods-plainly__list{ margin: 0; }
.methods-plainly__list dt{
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
  margin-top: 10px;
}
.methods-plainly__list dt:first-of-type{ margin-top: 0; }
.methods-plainly__list dd{
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.methods-plainly__list dd b{ color: var(--ink); }

/* Plain-language "how to read this" note above a stats panel. */
.network-insight-note{
  margin: 0 0 10px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.network-insight-note b{ color: var(--ink); }
.network-insight-note em{ font-style: normal; color: var(--data-orange); }
.network-arch-row{
  display: grid;
  grid-template-columns: 30px 10px minmax(0, 1fr) minmax(140px, 220px) 52px;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(17,17,17,0.025);
}
.network-skill-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 220px) 40px;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 6px;
  background: rgba(17,17,17,0.025);
}
.network-arch-row.is-top .network-arch-row__name{
  font-weight: 700;
  color: var(--ink);
}
.network-arch-row__idx{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-muted);
  text-align: right;
}
.network-arch-row__swatch{
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.network-arch-row__name,
.network-skill-row__name{
  font-size: 13px;
  color: var(--ink);
  white-space: normal;
  line-height: 1.3;
}
.network-skill-row__meta{
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.network-skill-row__name{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.network-skill-row__key{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
  text-transform: lowercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.network-arch-row__track,
.network-skill-row__track{
  height: 10px;
  background: var(--hairline);
  border-radius: 999px;
  overflow: hidden;
}
.network-arch-row__fill,
.network-skill-row__fill{
  display: block;
  height: 100%;
  background: var(--data-blue);
  border-radius: 999px;
  transition: width 0.5s ease;
}
.network-arch-row__pct,
.network-skill-row__val{
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  color: var(--ink-soft);
}
.network-skill-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
@media (max-width: 900px){
  .network-insight-meter{
    grid-template-columns: minmax(96px, 120px) minmax(0, 1fr) 46px;
    gap: 6px;
  }
  .network-node-inspector__list li{
    grid-template-columns: minmax(0, 1fr) 54px 54px;
    gap: 6px;
  }
  .network-neighbor-list li{
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .network-arch-row{
    grid-template-columns: 28px 10px minmax(0, 1fr) minmax(110px, 150px) 46px;
    gap: 7px;
  }
  .network-skill-row{
    grid-template-columns: minmax(0, 1fr) minmax(110px, 150px) 36px;
    gap: 8px;
  }
}

/* ---------------------------------------------------------------------------
   Attribution panel (/model) — "what drove this prediction"

   Color by the job it does, validated against the light card surface (#ffffff):
     magnitude (tower bars, heatmap)  -> ONE sequential hue, blue, light->dark
     signed contribution (features)   -> diverging blue<->red, NEUTRAL gray zero
     "Other" bucket                   -> recessive neutral, never a 9th hue
     never-measured                   -> icon + label, never color alone
   Diverging poles pass the validator on #ffffff: worst adjacent CVD dE 74.6
   (protan), both >= 3:1 contrast. Sign is double-encoded by side-of-zero, so
   the bars survive monochrome and forced-colors too.
--------------------------------------------------------------------------- */
.network-attr-card{ gap: 12px; }

.attr-tools{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.attr-tabs, .attr-scope{ display: flex; gap: 4px; }

.attr-tab, .attr-scope-btn{
  font: inherit;
  font-size: 0.78rem;
  padding: 4px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
}
.attr-tab:hover, .attr-scope-btn:hover{ border-color: var(--ink-muted); color: var(--ink); }
.attr-tab.is-active, .attr-scope-btn.is-active{
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.attr-subject{
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
}
.attr-probe-banner{
  margin: 8px 0 0;
  padding: 8px 10px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink) 4%, var(--surface));
  border: 1px solid var(--hairline);
  border-radius: 6px;
}
.attr-probe-banner b{ color: var(--ink); font-weight: 600; }
.attr-family-fallback{
  margin: 0 0 8px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--ink-soft);
}
.attr-family-fallback b{ color: var(--ink); }

.attr-multi{ margin: 0 0 12px; }
.attr-multi__grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}
.attr-multi__card{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.72rem;
  text-align: left;
  cursor: pointer;
}
.attr-multi__card:hover{ border-color: var(--ink-muted); color: var(--ink); }
.attr-multi__card.is-active{
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.attr-multi__label{ grid-column: 1; font-weight: 600; }
.attr-multi__pct{
  grid-column: 2;
  grid-row: 1 / span 2;
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  color: var(--ink);
}
.attr-multi__track{
  grid-column: 1;
  height: 6px;
  background: var(--hairline);
  border-radius: 3px;
  overflow: hidden;
}
.attr-multi__fill{
  display: block;
  height: 100%;
  background: #2a78d6;
  border-radius: 0 3px 3px 0;
}
.attr-multi__note{
  margin: 6px 0 0;
  font-size: 0.72rem;
  color: var(--ink-muted);
  line-height: 1.35;
}

.attr-grid{
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(220px, 1fr) minmax(260px, 1.3fr);
  gap: 12px;
  align-items: start;
}
.attr-panel{ min-width: 0; }

/* Stat tile: a value and the baseline it must beat. Never a one-bar bar chart. */
.attr-tile__label{ font-size: 0.72rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.attr-tile__value{ font-size: 2rem; line-height: 1.1; color: var(--ink); margin: 4px 0; }
.attr-tile__baseline, .attr-tile__note{ font-size: 0.76rem; color: var(--ink-soft); margin: 0; }

/* Ranked bars: one hue; length carries the value. */
.attr-bars{ list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.attr-bar{
  display: grid;
  grid-template-columns: minmax(64px, 96px) minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.attr-bar__label{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attr-bar__track{
  position: relative;
  height: 12px;
  background: var(--hairline);
  border-radius: 4px;
  overflow: hidden;
}
.attr-bar__fill{
  display: block;
  height: 100%;
  background: #2a78d6;              /* sequential blue, step 450 */
  border-radius: 0 4px 4px 0;       /* 4px rounded data-end, square at baseline */
}
.attr-bar__fill--other{ background: var(--ink-muted); }
.attr-bar__num{
  font-size: 0.74rem;
  color: var(--ink-soft);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Diverging bars: anchored at zero, neutral midpoint, hue only in the arms. */
.attr-divs{ list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.attr-div{
  display: grid;
  grid-template-columns: minmax(72px, 120px) minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.attr-div__label{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attr-div__track{ position: relative; display: flex; align-items: center; height: 12px; }
.attr-div__half{ position: relative; flex: 1 1 50%; height: 100%; background: var(--hairline); }
.attr-div__half--neg{ border-radius: 4px 0 0 4px; display: flex; justify-content: flex-end; }
.attr-div__half--pos{ border-radius: 0 4px 4px 0; }
.attr-div__zero{ width: 2px; height: 16px; background: var(--ink-muted); flex: 0 0 2px; }
.attr-div__fill{ display: block; height: 100%; }
.attr-div__fill--neg{ background: #e34948; border-radius: 4px 0 0 4px; }   /* diverging red */
.attr-div__fill--pos{ background: #2a78d6; border-radius: 0 4px 4px 0; }   /* diverging blue */
.attr-div__num{ font-size: 0.74rem; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }

/* Never-measured: status + icon + label. Not a zero-length bar. */
.attr-div--masked .attr-div__masked{
  grid-column: 2 / span 2;
  font-size: 0.74rem;
  color: var(--ink-muted);
  font-style: italic;
}
.attr-div__icon{ font-style: normal; margin-right: 4px; }

.attr-axis{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 0;
  font-size: 0.7rem;
  color: var(--ink-muted);
}

/* Population heatmap: one sequential hue, magnitude by opacity of that hue. */
.attr-heatmap-wrap{ overflow-x: auto; }
.attr-heatmap{ border-collapse: collapse; width: 100%; font-size: 0.76rem; }
.attr-heatmap caption{
  caption-side: top;
  text-align: left;
  color: var(--ink-muted);
  font-size: 0.74rem;
  padding-bottom: 6px;
}
.attr-heatmap th{ font-weight: 600; color: var(--ink-soft); text-align: left; padding: 4px 6px; }
.attr-heatmap thead th{ font-size: 0.72rem; color: var(--ink-muted); }
.attr-cell{
  position: relative;
  padding: 0;
  height: 26px;
  min-width: 58px;
  border: 2px solid var(--surface);   /* 2px surface gap between adjacent fills */
}
.attr-cell__fill{
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: #2a78d6;
  opacity: calc(0.08 + 0.92 * var(--v));
}
.attr-cell__num{
  position: relative;
  display: block;
  text-align: center;
  line-height: 26px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.attr-cell__num--onDark{ color: #ffffff; }   /* fill is dark enough to swallow ink */

/* Table view: the accessible answer, and the contrast-relief route. */
.attr-table{ border-collapse: collapse; width: 100%; font-size: 0.78rem; margin-top: 8px; }
.attr-table caption{ caption-side: top; text-align: left; color: var(--ink-muted); font-size: 0.74rem; padding-bottom: 6px; }
.attr-table th, .attr-table td{ text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--hairline); }
.attr-table th{ color: var(--ink-muted); font-size: 0.72rem; font-weight: 600; }
.attr-table__num{ text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 900px){
  .attr-grid{ grid-template-columns: minmax(0, 1fr); }
}

@media (forced-colors: active){
  .attr-bar__fill, .attr-div__fill--pos{ background: Highlight; }
  .attr-div__fill--neg{ background: LinkText; }
  .attr-cell__fill{ opacity: 1; background: Canvas; border: 1px solid CanvasText; }
}

/* Truthful flow additions — B1h/B2h etc, cat, skip dashed — Cam's Lab light paper ink Okabe AAA */
.network-flow-node--tower-sub { fill:#FFFFFF; stroke:#111111; stroke-width:2; }
.network-flow-node--b1h { fill:#FFFFFF; stroke:#111111; stroke-width:2; }
.network-flow-node--b1o { fill:#FFFFFF; stroke:#111111; stroke-width:2.2; }
.network-flow-node--b2h { fill:#FFFFFF; stroke:#111111; stroke-width:2; }
.network-flow-node--tower { fill:#FFFFFF; stroke:#111111; stroke-width:2.5; }
.network-flow-node--cat { fill:#FFFFFF; stroke:#111111; stroke-width:2.2; }
.network-flow-node--fusion { fill:#FFFFFF; stroke:#111111; stroke-width:2.5; }
.network-flow-node--fusion-hidden { fill:#FFFFFF; stroke:#111111; stroke-width:2.2; }
.network-flow-node--embed { fill:#F0E442; stroke:#111111; stroke-width:2.8; }
.network-flow-node--season { fill:#56B4E9; stroke:#111111; stroke-width:2.2; }
.network-flow-node--head { fill:#FFFFFF; stroke:#111111; stroke-width:2.2; }
.network-flow-node--head-hidden { fill:#FFFFFF; stroke:#111111; stroke-width:1.8; }
.network-flow-node--aux { fill:#FFFFFF; stroke:#111111; stroke-width:1.8; }
.network-flow-edge--tower-internal { stroke:#111111; opacity:0.45; stroke-width:1.1; }
.network-flow-edge--skip { stroke:#111111; stroke-dasharray:3 3; opacity:0.55; stroke-width:1; }
.network-flow-edge--season { stroke:#0072B2; stroke-width:1.4; opacity:0.7; }
.network-flow-edge--head-hidden { stroke:#111111; opacity:0.35; stroke-width:1; }
.network-flow-svg.is-tracing .network-flow-node--tower-sub:not(.on-path){ opacity:0.25; }

/* Progressive step disclosure: mute off-step columns (disabled while tracing). */
.network-flow-svg:not(.is-tracing)[data-step="0"] .network-flow-node--tower-sub,
.network-flow-svg:not(.is-tracing)[data-step="0"] .network-flow-node--tower,
.network-flow-svg:not(.is-tracing)[data-step="0"] .network-flow-node--fusion,
.network-flow-svg:not(.is-tracing)[data-step="0"] .network-flow-node--fusion-hidden,
.network-flow-svg:not(.is-tracing)[data-step="0"] .network-flow-node--embed,
.network-flow-svg:not(.is-tracing)[data-step="0"] .network-flow-node--season,
.network-flow-svg:not(.is-tracing)[data-step="0"] .network-flow-node--head,
.network-flow-svg:not(.is-tracing)[data-step="0"] .network-flow-edge--tower-internal,
.network-flow-svg:not(.is-tracing)[data-step="0"] .network-flow-edge--skip,
.network-flow-svg:not(.is-tracing)[data-step="0"] [data-edge^="fuse-"],
.network-flow-svg:not(.is-tracing)[data-step="0"] [data-edge="emb-main"],
.network-flow-svg:not(.is-tracing)[data-step="0"] [data-edge^="head-"]{
  opacity: 0.18;
}
.network-flow-svg:not(.is-tracing)[data-step="1"] .network-flow-node--fusion,
.network-flow-svg:not(.is-tracing)[data-step="1"] .network-flow-node--fusion-hidden,
.network-flow-svg:not(.is-tracing)[data-step="1"] .network-flow-node--embed,
.network-flow-svg:not(.is-tracing)[data-step="1"] .network-flow-node--head,
.network-flow-svg:not(.is-tracing)[data-step="1"] [data-edge^="fuse-"],
.network-flow-svg:not(.is-tracing)[data-step="1"] [data-edge="emb-main"],
.network-flow-svg:not(.is-tracing)[data-step="1"] [data-edge^="head-"]{
  opacity: 0.2;
}
.network-flow-svg:not(.is-tracing)[data-step="2"] .network-flow-node--head,
.network-flow-svg:not(.is-tracing)[data-step="2"] [data-edge^="head-"],
.network-flow-svg:not(.is-tracing)[data-step="2"] .network-flow-node--embed{
  opacity: 0.22;
}
.network-flow-svg:not(.is-tracing)[data-step="3"] .network-flow-node--head,
.network-flow-svg:not(.is-tracing)[data-step="3"] [data-edge^="head-"]{
  opacity: 0.22;
}

.network-hero-note{
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 8px;
}
.network-flow-subhead{
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--ink-muted);
  font-family: var(--mono);
}
.attr-clear-focus{
  margin-left: 8px;
  font: inherit;
  font-size: 0.74rem;
  padding: 2px 8px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
}
.attr-clear-focus:hover{ border-color: var(--ink-muted); color: var(--ink); }

.network-arch-spec-card{ padding-top: 10px; padding-bottom: 10px; }
.network-arch-summary{
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  font-size: 12px;
}
.network-arch-summary::-webkit-details-marker{ display: none; }
.network-arch-summary__hint{
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.network-arch-checkpoint{
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-muted);
}
.network-arch-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
}
.network-arch-grid__label{
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 4px;
}
.network-arch-code{
  background: var(--hairline);
  padding: 1px 4px;
  border-radius: 4px;
}
.network-arch-muted{ color: var(--ink-muted); }
.network-arch-raw{ margin-top: 10px; }
.network-arch-raw summary{
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  color: var(--ink-soft);
}
.network-arch-pre{
  overflow: auto;
  background: var(--surface);
  padding: 10px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.4;
  max-height: 220px;
  border: 1px solid var(--hairline);
  margin-top: 8px;
}

@media (max-width: 900px){
  .network-story-lane{
    grid-template-columns: 1fr;
  }
  .network-story-arrow{ display: none; }
}
