:root{
  --bg0:#07080b;
  --bg1:#0f1422;
  --ink:#e9e6df;
  --muted:rgba(233,230,223,.72);
  --faint:rgba(233,230,223,.14);
  --gold:#c6ad6a;
  --verd:#2aa98f;
  --card:rgba(255,255,255,.03);
  --card2:rgba(0,0,0,.14);
  --stroke:rgba(233,230,223,.10);
  --weapon:rgba(198,173,106,.78);
  --spirit:rgba(149,130,200,.72);
  --vitality:rgba(42,169,143,.78);
}

*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  color:var(--ink);
  background-color: var(--bg0);
  background:
    radial-gradient(85% 90% at 50% 40%, rgba(42,169,143,.10), transparent 60%),
    radial-gradient(70% 60% at 70% 18%, rgba(198,173,106,.08), transparent 55%),
    linear-gradient(135deg, rgba(233,230,223,.04), transparent),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  background-repeat:no-repeat;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  letter-spacing:.2px;
}
body::before{
  content:'';
  position:fixed; inset:0;
  pointer-events:none;
  background:repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0px, rgba(255,255,255,.03) 1px, transparent 2px, transparent 6px);
  opacity:.08;
  mix-blend-mode:overlay;
}

.brandline{
  font-family:'Iowan Old Style','Palatino Linotype',Palatino,'Book Antiqua',Georgia,serif;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-weight:650;
  font-size:13px;
  color:rgba(233,230,223,.78);
  display:flex;
  align-items:center;
  gap:12px;
  user-select:none;
  text-decoration:none;
}
.brandtext{ white-space:nowrap; line-height:1; }
.co{
  font-weight:520;
  color:var(--muted);
  letter-spacing:.22em;
  font-size:.52em;
  vertical-align: 10%;
  margin-left:.25em;
}
.tm{
  font-size:.55em;
  vertical-align: super;
  letter-spacing:0;
  margin-left:.08em;
}
.crest{
  width:30px; height:30px;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.55));
  opacity:.97;
}

.regionLabel{
  border:1px solid rgba(198,173,106,.40);
  background: rgba(0,0,0,.20);
  color: rgba(233,230,223,.90);
  padding:9px 16px;
  border-radius:999px;
  font-size:10px;
  font-weight:600;
  letter-spacing:.08em;
  text-transform:uppercase;
  user-select:none;
  backdrop-filter: blur(6px);
}

.spinner{
  width:24px;
  height:24px;
  border:2px solid rgba(233,230,223,.14);
  border-top-color:var(--gold);
  border-radius:50%;
  animation:spin 1s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }

.loading{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:24px;
  color:var(--muted);
  font-size:14px;
}

.err{
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(233,230,223,.12);
  background: rgba(0,0,0,.12);
  color: rgba(233,230,223,.78);
  display:none;
}

.empty{
  text-align:center;
  padding:24px;
  color:var(--muted);
}
.emptyTitle{
  font-family:'Iowan Old Style','Palatino Linotype',Palatino,Georgia,serif;
  font-size:16px;
  letter-spacing:.06em;
  margin-bottom:6px;
  color:var(--ink);
}

.bookmarkBtn{
  appearance:none;
  background:transparent;
  border:0;
  padding:0;
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color:rgba(233,230,223,.32);
  font-size:14px;
  line-height:1;
  transition: color .15s ease, transform .15s ease;
  user-select:none;
}
.bookmarkBtn:hover{
  color: var(--gold);
  transform: scale(1.12);
}
.bookmarkBtn[aria-pressed="true"]{
  color: var(--gold);
}
.bookmarkBtn:focus{ outline:2px solid rgba(42,169,143,.35); outline-offset:2px; border-radius:4px; }

@media (prefers-reduced-motion: reduce){
  body::before{ opacity:.06; }
  .spinner{ animation:none; }
  .bookmarkBtn{ transition:none; }
  .bookmarkBtn:hover{ transform:none; }
}

/* ============================================================
   Moneyball insights — "The Edge" section on hero pages, plus
   sleeper strip on the home grid. Generic primitive: insight cards
   with a kind tag, confidence dots, headline, sub, compare bars,
   optional action tile, and a sample-size footnote.
   ============================================================ */

.insightSection{
  margin: 4px 0 18px;
}
.insightSection .sectionTitle{
  font-family:'Iowan Old Style','Palatino Linotype',Palatino,Georgia,serif;
  font-weight:650;
  letter-spacing:.06em;
  font-size:18px;
  margin: 18px 0 12px;
  color: var(--ink);
  display:flex;
  align-items:center;
  gap:14px;
}
/* Generic subtitle next to a section title — used by The Edge AND Counters
   so the typography stays consistent across all sections. */
.sectionTitle .titleSub{
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  font-size:11px;
  font-weight:500;
  letter-spacing:.10em;
  text-transform:uppercase;
  color: rgba(233,230,223,.40);
}
.insightGrid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap:10px;
}
.insightCard{
  display:grid;
  gap:8px;
  padding:14px 16px;
  border-radius:12px;
  background: rgba(0,0,0,.20);
  border:1px solid rgba(233,230,223,.10);
}
.insightCard.confidence-1{ opacity:.86; }
.insightHead{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
}
.insightKind{
  font-size:9px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color: var(--gold);
  background: rgba(198,173,106,.10);
  border:1px solid rgba(198,173,106,.25);
  padding:4px 9px;
  border-radius:999px;
  white-space:nowrap;
}
.insightConfidence{
  display:flex;
  gap:5px;
  align-items:center;
}
.insightConfidence .lbl{
  font-size:9px; letter-spacing:.10em; text-transform:uppercase;
  color: rgba(233,230,223,.45);
}
.insightConfidence .dot{
  width:6px; height:6px;
  border-radius:50%;
  background: rgba(233,230,223,.18);
}
.insightConfidence .dot.on{ background: var(--gold); }
.insightHeadline{
  font-family:'Iowan Old Style','Palatino Linotype',Palatino,Georgia,serif;
  font-weight:650;
  letter-spacing:.04em;
  font-size:16px;
  line-height:1.3;
}
.insightSub{
  font-size:13px;
  color: var(--muted);
  line-height:1.45;
}
.compareBars{ display:grid; gap:6px; }
.compareRow{
  display:grid;
  grid-template-columns: 64px 1fr 44px;
  gap:8px;
  align-items:center;
}
.compareRow .compareLabel{
  font-size:10px;
  letter-spacing:.10em;
  text-transform:uppercase;
  color: rgba(233,230,223,.55);
}
.compareRow .compareTrack{
  height:6px;
  border-radius:3px;
  background: rgba(0,0,0,.30);
  overflow:hidden;
}
.compareRow .compareFill{
  height:100%;
  background: var(--gold);
  border-radius:3px;
}
.compareRow.baseline .compareFill{
  background: rgba(233,230,223,.22);
}
.compareRow .compareValue{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:12px;
  color: var(--ink);
  text-align:right;
}
.insightAction{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.insightActionLabel{
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: rgba(233,230,223,.55);
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 10px;
  border-radius:999px;
  background: rgba(0,0,0,.18);
  border:1px solid rgba(233,230,223,.10);
}
.insightFootnote{
  font-size:10px;
  letter-spacing:.06em;
  color: rgba(233,230,223,.40);
  margin-top:2px;
}

/* Loaded-but-hidden fields surfaced on build cards */
.itemTile{ position:relative; }
.itemTile.has-annotation{
  border-bottom-style: dashed !important;
}
.itemTile .imbueGlyph{
  position:absolute;
  bottom:-2px;
  right:-2px;
  width:13px;
  height:13px;
  border-radius:50%;
  background: rgba(149,130,200,.85);
  border:1px solid rgba(7,8,11,.95);
  font-size:8px;
  font-weight:700;
  color: var(--ink);
  display:flex;
  align-items:center;
  justify-content:center;
  letter-spacing:0;
  pointer-events:none;
}
.abilityOrderStrip{
  display:flex;
  flex-wrap:wrap;
  gap:3px;
  align-items:center;
  padding:6px 8px;
  border-radius:8px;
  background: rgba(0,0,0,.18);
  border:1px solid rgba(233,230,223,.06);
  font-size:10px;
}
.abilityOrderLabel{
  font-size:9px;
  letter-spacing:.10em;
  text-transform:uppercase;
  color: rgba(233,230,223,.45);
  margin-right:4px;
}
.abilityOrderStep{
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  gap:1px;
  padding: 2px 5px;
  border-radius:4px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(233,230,223,.08);
  min-width: 22px;
}
.abilityOrderStep .lvl{
  font-size:7px;
  letter-spacing:.05em;
  color: rgba(233,230,223,.40);
  line-height:1;
}
.abilityOrderStep .ab{
  font-size:10px;
  font-weight:700;
  color: var(--ink);
  line-height:1;
}
.abilityOrderStep[data-ult="1"]{
  background: rgba(198,173,106,.12);
  border-color: rgba(198,173,106,.35);
}
.abilityOrderStep[data-ult="1"] .ab{ color: var(--gold); }

.buildDescription{
  font-size:12px;
  color: rgba(233,230,223,.62);
  line-height:1.45;
  padding:8px 10px;
  border-radius:8px;
  background: rgba(0,0,0,.14);
  border-left: 2px solid rgba(198,173,106,.30);
  font-style: italic;
  cursor: pointer;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.buildDescription.expanded{
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}
.buildDescription:hover{ color: rgba(233,230,223,.78); }

.staleChip{
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-size:9px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:3px 7px;
  border-radius:6px;
  background: rgba(198,173,106,.10);
  border:1px solid rgba(198,173,106,.30);
  color: var(--gold);
  line-height:1.2;
}

/* ============================================================
   v2 sections: hero matchups (counters), ally synergy strip,
   week-over-week trend chip. All driven by the live Deadlock
   analytics endpoints baked into each hero JSON.
   ============================================================ */

.matchupSection{
  margin: 4px 0 18px;
}
.matchupTable{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.matchupColumn{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:12px 14px;
  border-radius:12px;
  background: rgba(0,0,0,.20);
  border:1px solid rgba(233,230,223,.10);
}
.matchupColumn.best{
  border-color: rgba(42,169,143,.30);
  background: linear-gradient(135deg, rgba(42,169,143,.08), rgba(0,0,0,.20));
}
.matchupColumn.worst{
  border-color: rgba(220,90,90,.28);
  background: linear-gradient(135deg, rgba(220,90,90,.08), rgba(0,0,0,.20));
}
.matchupColHead{
  font-size:10px;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  color: rgba(233,230,223,.55);
  padding-bottom:4px;
  border-bottom:1px solid rgba(233,230,223,.06);
}
.matchupColumn.best .matchupColHead{ color: rgba(42,169,143,.85); }
.matchupColumn.worst .matchupColHead{ color: rgba(220,120,120,.85); }
.matchupRow{
  display:grid;
  grid-template-columns: 28px 1fr 50px 60px;
  gap:8px;
  align-items:center;
  padding:6px 4px;
  border-radius:6px;
  text-decoration:none;
  color: var(--ink);
  transition: background .12s ease;
}
.matchupRow:hover{ background: rgba(255,255,255,.04); }
.matchupRow .matchupIcon{
  width:28px;
  height:28px;
  border-radius:6px;
  overflow:hidden;
  background: rgba(0,0,0,.30);
  border:1px solid rgba(233,230,223,.10);
}
.matchupRow .matchupIcon img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.matchupRow .matchupName{
  font-size:13px;
  font-weight:600;
  letter-spacing:.02em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.matchupRow .matchupWR{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:13px;
  font-weight:700;
  text-align:right;
}
.matchupRow .matchupWR.wr-high{ color: rgba(42,169,143,.95); }
.matchupRow .matchupWR.wr-low{  color: rgba(220,120,120,.95); }
.matchupRow .matchupWR.wr-mid{  color: rgba(233,230,223,.78); }
.matchupRow .matchupSample{
  font-size:10px;
  letter-spacing:.04em;
  color: rgba(233,230,223,.40);
  text-align:right;
  white-space:nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.synergyStrip{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding:8px 12px;
  margin-bottom:14px;
  border-radius:10px;
  background: rgba(0,0,0,.18);
  border:1px solid rgba(233,230,223,.08);
}
.synergyLabel{
  font-size:10px;
  font-weight:600;
  letter-spacing:.10em;
  text-transform:uppercase;
  color: rgba(233,230,223,.50);
  flex:0 0 auto;
}
.synergyPills{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  flex:1 1 auto;
}
.synergyPill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px 4px 4px;
  border-radius:999px;
  background: rgba(0,0,0,.30);
  border:1px solid rgba(42,169,143,.30);
  color: var(--ink);
  text-decoration:none;
  font-size:12px;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.synergyPill:hover{
  transform: translateY(-1px);
  border-color: rgba(42,169,143,.55);
  background: rgba(42,169,143,.08);
}
.synergyPill .synergyIcon{
  width:20px;
  height:20px;
  border-radius:50%;
  object-fit:cover;
  display:block;
}
.synergyPill .synergyName{
  font-weight:600;
  letter-spacing:.02em;
}
.synergyPill .synergyWR{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:11px;
  color: rgba(42,169,143,.95);
  font-weight:700;
}

.trendChip{
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-size:10px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:4px 9px;
  border-radius:999px;
  border:1px solid rgba(233,230,223,.10);
  background: rgba(0,0,0,.18);
  align-self:center;
}
.trendChip.up{
  border-color: rgba(42,169,143,.35);
  background: rgba(42,169,143,.08);
  color: rgba(42,169,143,.95);
}
.trendChip.down{
  border-color: rgba(220,90,90,.30);
  background: rgba(220,90,90,.08);
  color: rgba(220,120,120,.95);
}
.trendChip .trendArrow{
  font-size:11px;
  line-height:1;
}

@media (max-width: 560px){
  .matchupTable{ grid-template-columns: 1fr; }
  .matchupRow{ grid-template-columns: 24px 1fr 44px 56px; }
}

/* Featured "Pick This" build card — top-scoring build elevated above the
   regular list with a one-line rationale. Composite score combines community
   favorites, leaderboard rank of the author, and patch-freshness. */
.featuredBuild{
  margin: 4px 0 18px;
}
.featuredCard{
  position:relative;
  display:grid;
  gap:10px;
  padding:18px 20px 16px;
  border-radius:14px;
  background: linear-gradient(135deg, rgba(198,173,106,.10), rgba(0,0,0,.30));
  border:1px solid rgba(198,173,106,.40);
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
}
.featuredTag{
  position:absolute;
  top:-10px;
  left:18px;
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:10px;
  font-weight:700;
  letter-spacing:.16em;
  text-transform:uppercase;
  padding:5px 12px;
  border-radius:999px;
  background: var(--gold);
  color: #07080b;
  box-shadow: 0 4px 14px rgba(198,173,106,.40);
}
.featuredHead{
  display:flex;
  align-items:baseline;
  gap:10px;
  flex-wrap:wrap;
  margin-top:6px;
}
.featuredName{
  font-family:'Iowan Old Style','Palatino Linotype',Palatino,Georgia,serif;
  font-weight:650;
  letter-spacing:.04em;
  font-size:18px;
  line-height:1.2;
  color: var(--ink);
}
.featuredAuthor{
  font-size:12px;
  letter-spacing:.04em;
  color: rgba(233,230,223,.55);
}
.featuredReasons{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.featuredChip{
  display:inline-flex;
  align-items:center;
  font-size:10px;
  font-weight:700;
  letter-spacing:.10em;
  text-transform:uppercase;
  padding:4px 10px;
  border-radius:999px;
  background: rgba(198,173,106,.14);
  border:1px solid rgba(198,173,106,.40);
  color: var(--gold);
  line-height:1.2;
}
.featuredExplainer{
  font-size:12px;
  color: rgba(233,230,223,.55);
  line-height:1.5;
  max-width: 70ch;
}
.featuredActions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:2px;
}
.featuredActions .buildCode{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size:13px;
  letter-spacing:.04em;
  color: var(--ink);
  background: rgba(0,0,0,.30);
  padding:8px 14px;
  border-radius:8px;
  border:1px solid rgba(233,230,223,.10);
}
.featuredActions .copyBtn{
  font-size:12px;
  padding:8px 18px;
  background: rgba(198,173,106,.12);
  border-color: rgba(198,173,106,.45);
  color: var(--gold);
}
.featuredActions .copyBtn:hover{
  background: rgba(198,173,106,.20);
  border-color: rgba(198,173,106,.65);
  color: var(--ink);
}

/* Sleeper strip on the home grid */
.sleeperStrip{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding:10px 14px;
  margin-bottom:10px;
  border-radius:14px;
  background: linear-gradient(135deg, rgba(198,173,106,.10), rgba(42,169,143,.05));
  border:1px solid rgba(198,173,106,.25);
}
.sleeperLabel{
  font-family:'Iowan Old Style','Palatino Linotype',Palatino,Georgia,serif;
  font-weight:650;
  font-size:13px;
  letter-spacing:.06em;
  color: var(--gold);
  flex: 0 0 auto;
}
.sleeperLabel small{
  display:block;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  font-size:10px;
  font-weight:500;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: rgba(233,230,223,.50);
  margin-top:2px;
}
.sleeperPills{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  flex: 1 1 auto;
}
.sleeperPill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  text-decoration:none;
  padding:5px 10px;
  border-radius:999px;
  background: rgba(0,0,0,.30);
  border:1px solid rgba(198,173,106,.30);
  color: var(--ink);
  font-size:11px;
  letter-spacing:.04em;
  white-space:nowrap;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.sleeperPill:hover{
  transform: translateY(-1px);
  border-color: rgba(198,173,106,.55);
  background: rgba(198,173,106,.10);
}
.sleeperPill .sleeperName{ font-weight:600; }
.sleeperPill .sleeperStats{
  font-size:10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: rgba(233,230,223,.65);
}

@media (max-width: 560px){
  .insightGrid{ grid-template-columns: 1fr; }
  .compareRow{ grid-template-columns: 56px 1fr 40px; }
  .insightHeadline{ font-size:15px; }
  .sleeperStrip{ padding:8px 10px; }
  .sleeperLabel{ font-size:12px; }
}

@media (prefers-reduced-motion: reduce){
  .sleeperPill{ transition:none; }
  .sleeperPill:hover{ transform:none; }
}
