/* ============================================================================
   tunings.css — the tuning reference page (2026-09-20).
   Theme variables only; see home.css for why.
   ============================================================================ */
.tp {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 60px;
}

.tp-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.tp-search {
  flex: 1 1 260px;
  max-width: 380px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--sunken);
  color: var(--text);
  font-size: 14px;
}
.tp-search:focus {
  outline: none;
  border-color: var(--hero);
}
.tp-count {
  font-size: 13px;
  color: var(--text-faint);
}

/* -------------------------------------------------------- type filter --- */
/* Chips wear the real frame art, so the control and the thing it filters are
   obviously the same symbol. */
.tp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.tp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.tp-chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.tp-chip.is-on {
  border-color: var(--hero);
  background: var(--hero-dim);
  color: var(--text);
}
/* The chips wear the same type symbols as the optimizer's results cards
   (categorySymbolHTML), so one symbol means one thing everywhere. */
.tp-chip .cat-sym {
  width: 18px;
  height: 18px;
}
.tp-chip-n {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-faint);
}

/* ---------------------------------------------------------------- roles --- */
.tp-role {
  margin-bottom: 28px;
}
.tp-role-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  /* colour comes from cat-text-<ROLE>, the app's single source of type colour */
}
.tp-role-head .cat-sym {
  width: 19px;
  height: 19px;
}
.tp-role-count {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-faint);
}

/* ----------------------------------------------------------------- rows --- */
.tp-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: 8px;
  overflow: hidden;
}
.tp-row[open] {
  border-color: var(--border-strong);
}
.tp-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
}
.tp-summary::-webkit-details-marker {
  display: none;
}
.tp-summary:hover {
  background: var(--panel-2);
}
/* The disclosure triangle, drawn rather than relying on the default marker
   (which differs per browser and can't be positioned). */
.tp-summary::after {
  content: "\25be";
  margin-left: 4px;
  color: var(--text-faint);
  font-size: 13px;
  transition: transform 0.15s;
}
.tp-row[open] > .tp-summary::after {
  transform: rotate(180deg);
}

.tp-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tp-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}
.tp-effects {
  font-size: 12.5px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tp-badges {
  /* Pushes the badges — and therefore the chevron after them — to the right
     edge, so rows line up as two columns however long the summary is. */
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.tp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  white-space: nowrap;
}
.tp-badge .cat-sym {
  width: 13px;
  height: 13px;
}
.tp-klass-HERO {
  color: var(--hero);
  border-color: var(--hero-dim);
  background: var(--hero-dim);
}
.tp-klass-VILLAIN {
  color: var(--villain);
  border-color: var(--villain-dim);
  background: var(--villain-dim);
}

/* -------------------------------------------------------------- expanded --- */
.tp-body {
  padding: 4px 14px 14px;
  border-top: 1px solid var(--border);
}
.tp-effect {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.tp-effect:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}
.tp-effect-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.tp-star {
  color: var(--gold);
  margin-right: 5px;
}
.tp-effect-special .tp-effect-name {
  color: var(--gold);
}
.tp-desc {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 78ch;
}
.tp-desc-dim {
  color: var(--text-faint);
  font-style: italic;
}

/* Level values. A wrapping row of small chips reads faster than a table and
   survives 11-level specials without a horizontal scrollbar. */
.tp-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tp-lv {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--sunken);
  font-size: 12.5px;
  color: var(--text);
}
.tp-lv b {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-faint);
}
.tp-sub {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-faint);
}
.tp-empty {
  margin: 0;
  padding: 24px 2px;
  color: var(--text-dim);
  font-size: 14px;
}

@media (max-width: 760px) {
  .tp {
    padding: 14px 16px 48px;
  }
  /* The badges are the first thing to go: the name and its effects matter more
     than the class/role labels, which the tile colour already conveys. */
  .tp-badges {
    display: none;
  }
  .tp-effects {
    white-space: normal;
  }
}

/* Line the shared page heading up with THIS page's content width — the
   default in style.css matches the optimizer's wider .layout. */
.page-intro {
  max-width: 1280px;
  padding-left: 24px;
  padding-right: 24px;
}

/* This page keeps its heading LEFT: the search box and type chips below it
   are left-aligned, and a centred heading over them looks accidental. */
.page-intro {
  text-align: left;
}
.page-intro p {
  margin-left: 0;
}
