/* Black Desert Online class change log.
   Dark-first: the palette is built for a tool read next to the game at night,
   and the light theme is stepped separately rather than inverted. */

:root {
  color-scheme: dark;

  --bg: #14130f;
  --surface: #1d1b16;
  --surface-2: #24211a;
  --surface-3: #2b2820;
  --line: #332f26;
  --line-soft: #29261f;
  --text: #ece7db;
  --text-2: #c3bcab;
  --muted: #9c9484;
  --accent: #c8a253;
  --accent-soft: #3a3120;
  --accent-ink: #14130f;

  --buff: #55a876;
  --nerf: #ce6157;
  --fix: #6e90c4;
  --new: #c071a8;
  --change: #9c9484;

  --radius: 10px;
  --radius-sm: 6px;
  --rail-w: 268px;
  --top-h: 60px;

  --display: "Spectral", Georgia, "Times New Roman", serif;
  --ui: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #fbf9f4;
  --surface: #ffffff;
  --surface-2: #f3efe5;
  --surface-3: #ebe5d8;
  --line: #e3ddce;
  --line-soft: #eee9dd;
  --text: #23201a;
  --text-2: #4b4538;
  --muted: #6e6656;
  --accent: #8a6a1f;
  --accent-soft: #f4ead2;
  --accent-ink: #ffffff;

  --buff: #2f7d52;
  --nerf: #a83e36;
  --fix: #3c6ba8;
  --new: #93478a;
  --change: #6e6656;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;

    --bg: #fbf9f4;
    --surface: #ffffff;
    --surface-2: #f3efe5;
    --surface-3: #ebe5d8;
    --line: #e3ddce;
    --line-soft: #eee9dd;
    --text: #23201a;
    --text-2: #4b4538;
    --muted: #6e6656;
    --accent: #8a6a1f;
    --accent-soft: #f4ead2;
    --accent-ink: #ffffff;

    --buff: #2f7d52;
    --nerf: #a83e36;
    --fix: #3c6ba8;
    --new: #93478a;
    --change: #6e6656;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--ui);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { text-wrap: balance; margin: 0; }

a { color: var(--accent); }

button, input { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- topbar */

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--top-h);
  display: flex; align-items: center;
  gap: 14px; padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

/* The rail toggle sits left of the brand, where the thing it opens is. */
.rail-toggle {
  flex: none; width: 30px; height: 30px; padding: 0; cursor: pointer;
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--text-2);
}
.rail-toggle:hover { border-color: var(--accent); color: var(--accent); }

.rail-toggle-bars,
.rail-toggle-bars::before,
.rail-toggle-bars::after {
  display: block; width: 14px; height: 1.5px;
  background: currentColor; border-radius: 1px;
}
.rail-toggle-bars { position: relative; }
.rail-toggle-bars::before,
.rail-toggle-bars::after { content: ""; position: absolute; left: 0; }
.rail-toggle-bars::before { top: -4.5px; }
.rail-toggle-bars::after  { top:  4.5px; }

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand-mark {
  width: 26px; height: 26px; flex: none; border-radius: 4px;
  background:
    linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #000));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent);
  transform: rotate(45deg);
}

.topbar h1 {
  font: 600 17px/1.2 var(--display);
  letter-spacing: .01em;
}

.brand-sub {
  margin: 1px 0 0;
  font-size: 11.5px; color: var(--muted);
  letter-spacing: .04em; text-transform: uppercase;
}

.topbar-actions {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
}

.src {
  font-size: 12.5px; color: var(--muted); text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.src:hover { color: var(--accent); border-color: var(--accent); }

.ghost {
  background: transparent; border: 1px solid var(--line);
  color: var(--text-2); border-radius: var(--radius-sm);
  padding: 5px 11px; font-size: 12.5px; cursor: pointer;
}
.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ------------------------------------------------------------------ shell */

.shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  align-items: start;
}

/* Collapsed rail. Taking it out of the grid rather than sliding it keeps the
   stage a clean single column, which is what the extra width is wanted for. */
body.rail-off .shell { grid-template-columns: minmax(0, 1fr); }
body.rail-off .rail { display: none; }

/* -------------------------------------------------------------- class rail */

.rail {
  position: sticky; top: var(--top-h);
  height: calc(100vh - var(--top-h));
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.rail-head {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
}

.rail-head input {
  width: 100%; padding: 7px 10px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.rail-head input::placeholder { color: var(--muted); }

.rail-sort { display: flex; gap: 4px; }

.rail-sort button {
  flex: 1; padding: 4px 2px; cursor: pointer; white-space: nowrap;
  background: transparent; border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 11px; color: var(--muted);
  letter-spacing: .02em;
}
.rail-sort button:hover { color: var(--text); }
.rail-sort button.on {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.roster { overflow-y: auto; padding: 8px; flex: 1; }

.cls {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center; gap: 10px;
  width: 100%; padding: 7px 8px;
  background: transparent; border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer; text-align: left;
}
.cls:hover { background: var(--surface-2); }
.cls.on {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
}

.cls-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-3); object-fit: cover;
  display: grid; place-items: center;
  font: 500 12px var(--mono); color: var(--muted);
  border: 1px solid var(--line);
}

.cls-name {
  font: 500 14px/1.25 var(--ui);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cls.on .cls-name { color: var(--accent); }

.cls-meta {
  font: 400 11px/1.3 var(--mono); color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.cls-count {
  font: 500 12px var(--mono); color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.cls-count.zero { color: var(--muted); opacity: .55; }

/* ------------------------------------------------------------------ stage */

.stage { padding: 0 0 80px; min-width: 0; }

.loading, .empty {
  padding: 60px 28px; color: var(--muted); font-size: 14px;
}

.hero {
  padding: 20px 28px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.hero-top { display: flex; align-items: center; gap: 14px; }

.hero-icon {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface-2);
  object-fit: cover; flex: none;
}

.hero h2 {
  font: 600 26px/1.15 var(--display);
  letter-spacing: .01em;
}

.hero-sub {
  margin: 2px 0 0; font-size: 12.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* summary pills: totals by kind, read before any detail */
.tally { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }

.tally button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; font-size: 12px; color: var(--text-2);
}
.tally button:hover { border-color: var(--muted); }
.tally button[aria-pressed="false"] { opacity: .42; }
.tally .n {
  font: 500 12px var(--mono); font-variant-numeric: tabular-nums;
  color: var(--text);
}
.tally .glyph { font-size: 10px; line-height: 1; }

.tally button[data-tag="buff"] .glyph, .tally button[data-tag="buff"] .n { color: var(--buff); }
.tally button[data-tag="nerf"] .glyph, .tally button[data-tag="nerf"] .n { color: var(--nerf); }
.tally button[data-tag="fix"]  .glyph, .tally button[data-tag="fix"]  .n { color: var(--fix); }
.tally button[data-tag="new"]  .glyph, .tally button[data-tag="new"]  .n { color: var(--new); }

/* activity strip: changes per month, uniform time axis */
.strip-wrap { margin: 16px 0 0; }

.strip-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; color: var(--muted);
  letter-spacing: .05em; text-transform: uppercase;
}

.strip {
  display: flex; align-items: flex-end; gap: 2px;
  height: 44px; margin-top: 6px;
  border-bottom: 1px solid var(--line);
}

.strip .bar {
  flex: 1 1 0; min-width: 2px; position: relative;
  background: transparent; border: 0; padding: 0; cursor: pointer;
  align-self: stretch; display: flex; align-items: flex-end;
}
.strip .bar i {
  display: block; width: 100%;
  background: color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 2px 2px 0 0;
}
.strip .bar:hover i, .strip .bar.on i { background: var(--accent); }
.strip .bar.void { cursor: default; }
.strip .bar.void i { background: var(--line); }

.strip-axis {
  display: flex; justify-content: space-between;
  margin-top: 5px; font: 400 10.5px var(--mono); color: var(--muted);
}

/* filter row */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 14px 0 14px;
}

.filters input[type="search"] {
  flex: 1 1 200px; min-width: 160px; padding: 6px 10px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}

.chips { display: flex; gap: 4px; flex-wrap: wrap; }

.chips button {
  padding: 5px 10px; cursor: pointer; font-size: 12px;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.chips button:hover { color: var(--text); }
.chips button.on {
  color: var(--accent); background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

/* --------------------------------------------------------------- timeline */

.timeline { padding: 22px 28px 0; }

.patch {
  position: relative;
  scroll-margin-top: calc(var(--top-h) + 16px);
  padding: 0 0 26px 26px;
  border-left: 1px solid var(--line);
}
.patch:last-child { border-left-color: transparent; }

.patch::before {
  content: ""; position: absolute; left: -4.5px; top: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg);
}

.patch-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
  margin-bottom: 10px;
}

.patch-date {
  font: 500 12px var(--mono); color: var(--accent);
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}

.patch-title {
  font: 500 14px var(--ui); color: var(--text-2);
  text-decoration: none;
}
.patch-title:hover { color: var(--accent); }

.patch-n {
  font: 400 11px var(--mono); color: var(--muted);
  margin-left: auto; font-variant-numeric: tabular-nums;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

/* content blocks inside a patch card */
.spec {
  display: inline-block; margin: 14px 0 8px;
  font: 500 10.5px var(--ui); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line); padding-bottom: 3px;
}
.card > .spec:first-child { margin-top: 0; }

.skill {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 0 6px;
}
.card > .skill:first-child { margin-top: 0; }

.skill img {
  width: 27px; height: 27px; border-radius: 5px; flex: none;
}

.skill b {
  font: 600 14px/1.3 var(--display);
  color: var(--text); letter-spacing: .01em;
}

.chg {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: 8px; align-items: start;
  padding: 3px 0;
  font-size: 13.5px; color: var(--text-2);
}
.chg.d2 { margin-left: 18px; font-size: 13px; color: var(--muted); }
.chg.d3 { margin-left: 36px; font-size: 12.5px; color: var(--muted); }
.chg.d4 { margin-left: 54px; font-size: 12.5px; color: var(--muted); }

.chg mark {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  color: var(--text); border-radius: 2px; padding: 0 1px;
}

/* tag: colour plus glyph plus a readable label, never colour alone */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 6px 1px 5px; border-radius: 4px;
  font: 500 10px var(--ui); letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap; margin-top: 2px;
  border: 1px solid currentColor;
}
.tag .glyph { font-size: 9px; }
.tag.buff { color: var(--buff); }
.tag.nerf { color: var(--nerf); }
.tag.fix { color: var(--fix); }
.tag.new { color: var(--new); }
.tag.change { color: var(--change); border-color: var(--line); }

.note {
  margin: 10px 0; padding: 10px 12px;
  border-left: 2px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px; color: var(--text-2);
}
.note b {
  display: block; font: 500 10px var(--ui);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 4px;
}

.subhead {
  margin: 16px 0 6px;
  font: 600 15px var(--display); color: var(--text);
}
.card > .subhead:first-child { margin-top: 0; }

.para { margin: 6px 0; font-size: 13.5px; color: var(--text-2); }

.shot { margin: 10px 0; }
.shot img {
  max-width: 100%; border-radius: var(--radius-sm);
  border: 1px solid var(--line); display: block;
}
.shot figcaption {
  margin-top: 4px; font-size: 11.5px; color: var(--muted);
}

.tbl-wrap { overflow-x: auto; margin: 8px 0 10px; }

table {
  border-collapse: collapse; width: 100%; min-width: 340px;
  font-size: 12.5px; font-variant-numeric: tabular-nums;
}
th, td {
  padding: 5px 9px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}
thead th {
  font: 500 10px var(--ui); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line);
}
tbody tr:last-child td { border-bottom: 0; }
td.was { color: var(--muted); font-family: var(--mono); }
td.now { color: var(--text); font-family: var(--mono); }
td.what { color: var(--text-2); }
td.what img { width: 18px; height: 18px; border-radius: 3px; margin-right: 6px;
              vertical-align: -4px; }

.delta {
  font: 500 11px var(--mono); margin-left: 6px; white-space: nowrap;
}
.delta.up { color: var(--buff); }
.delta.down { color: var(--nerf); }

/* ---------------------------------------------------------------- tooltip */

.tip {
  position: fixed; z-index: 60; pointer-events: none;
  max-width: 260px; padding: 7px 10px;
  background: var(--surface-3); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 12px; line-height: 1.45;
  box-shadow: 0 6px 20px rgb(0 0 0 / .3);
}
.tip .tip-n {
  font-family: var(--mono); color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ global lab */

/* The lab chip carries a count of what is waiting, so it reads as news rather
   than as one more tab. */
.chips.views .lab-chip .n {
  margin-left: 5px; padding: 0 5px;
  border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--mono); font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
.chips.views .lab-chip.on .n {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

.lab-note {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 12.5px; line-height: 1.55; color: var(--text-2);
}
.lab-note p { margin: 0; }
.lab-note p + p { margin-top: 7px; }
.lab-note a { color: var(--accent); }

.ahead {
  flex: none;
  padding: 1px 7px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-soft); color: var(--accent);
  font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap;
}

.cls-lab {
  display: inline-block; margin-left: 6px;
  padding: 0 5px; border-radius: 3px;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .02em; vertical-align: 1px;
}

/* --------------------------------------------------------------- narrow */

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: static; height: auto; border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .roster {
    display: flex; gap: 6px; overflow-x: auto; padding: 8px;
  }
  .cls {
    grid-template-columns: 26px auto; width: auto; flex: none;
    padding: 6px 10px 6px 6px;
    border: 1px solid var(--line);
  }
  .cls-icon { width: 26px; height: 26px; }
  .cls-meta, .cls-count, .cls-lab { display: none; }
  .hero, .timeline { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.more {
  display: block; width: 100%; margin: 4px 0 40px;
  padding: 11px 14px; cursor: pointer;
  background: var(--surface); color: var(--text-2);
  border: 1px dashed var(--line); border-radius: var(--radius);
  font-size: 13px;
}
.more:hover { border-color: var(--accent); color: var(--accent); }

/* ------------------------------------------------------- net effect view */

.net { padding: 22px 28px 0; display: flex; flex-direction: column; gap: 18px; }

.net-note {
  margin: 0; max-width: 70ch;
  font-size: 13px; color: var(--muted);
}

.netskill { display: flex; flex-direction: column; gap: 2px; }

.netskill h3 {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 6px;
  font: 600 15px/1.3 var(--display); color: var(--text);
}
.netskill h3 .n {
  font: 400 11px var(--mono); color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.chain {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface);
}
.chain + .chain { margin-top: 4px; }

.chain > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center; gap: 12px;
  padding: 8px 12px; cursor: pointer;
  list-style: none;
}
.chain > summary::-webkit-details-marker { display: none; }
.chain > summary:hover { background: var(--surface-2); }
.chain[open] > summary { border-bottom: 1px solid var(--line-soft); }

.chain .metric {
  font-size: 13.5px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.chain .vals {
  font: 500 12.5px var(--mono); color: var(--text);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.chain .vals i { color: var(--muted); font-style: normal; padding: 0 2px; }

.chain .steps-n {
  font: 400 11px var(--mono); color: var(--muted);
  font-variant-numeric: tabular-nums; min-width: 26px; text-align: right;
}

.chain.back .vals { color: var(--muted); }

.steps {
  margin: 0; padding: 8px 12px 10px 28px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12.5px; color: var(--text-2);
}
.steps li { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.step-date {
  font: 400 11.5px var(--mono); color: var(--accent);
  font-variant-numeric: tabular-nums; min-width: 88px;
}
.step-val {
  font: 500 12px var(--mono); color: var(--text);
  font-variant-numeric: tabular-nums;
}
.steps a { color: var(--muted); text-decoration: none; font-size: 12px; }
.steps a:hover { color: var(--accent); text-decoration: underline; }

.warn {
  margin: 8px 12px; font-size: 12px; color: var(--muted);
  border-left: 2px solid var(--line); padding-left: 8px;
}

.reverted {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 4px 6px 8px;
}
.reverted > summary {
  padding: 8px 8px; cursor: pointer; font-size: 13px; color: var(--muted);
}
.reverted > summary:hover { color: var(--text); }
.reverted .chain { background: transparent; }

.views { margin-left: auto; }

.netfilter { margin: -6px 0 0; }
.netfilter .n {
  font: 500 11px var(--mono); color: var(--muted); margin-left: 5px;
  font-variant-numeric: tabular-nums;
}
.netfilter button.on .n { color: var(--accent); }

.since {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px 4px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface);
  font-size: 12px; color: var(--muted);
}
.since.on {
  color: var(--accent); background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.since input {
  background: transparent; border: 0; padding: 0;
  color: var(--text); font: 400 12px var(--mono);
  font-variant-numeric: tabular-nums;
}
.since.on input { color: var(--accent); }
.since input::-webkit-calendar-picker-indicator { filter: invert(.6); cursor: pointer; }
:root[data-theme="light"] .since input::-webkit-calendar-picker-indicator { filter: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .since input::-webkit-calendar-picker-indicator {
    filter: none;
  }
}

.chips.topics { flex-basis: 100%; }
.chips.topics .n {
  font: 500 11px var(--mono); color: var(--muted); margin-left: 5px;
  font-variant-numeric: tabular-nums;
}
.chips.topics button.on .n { color: var(--accent); }

/* ------------------------------------------------------ protected CC view */

.pcc-rank h3, .pcc-list h3 {
  display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px;
  font: 600 15px/1.3 var(--display); color: var(--text);
}
.pcc-rank h3 .n, .pcc-list h3 .n {
  font: 400 11px var(--mono); color: var(--muted);
  letter-spacing: .02em;
}

.pcc-rank ol {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 2px 18px;
}
.pcc-rank button {
  display: grid; grid-template-columns: 92px minmax(40px, 1fr) 26px;
  align-items: center; gap: 8px; width: 100%;
  padding: 3px 6px; cursor: pointer;
  background: transparent; border: 1px solid transparent;
  border-radius: var(--radius-sm); text-align: left;
}
.pcc-rank button:hover { background: var(--surface-2); }
.pcc-rank li.on button {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
}

.pcc-name {
  font-size: 12.5px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pcc-rank li.on .pcc-name { color: var(--accent); }

.pcc-bar { display: block; height: 7px; background: var(--surface-2);
           border-radius: 2px; overflow: hidden; }
.pcc-bar i {
  display: block; height: 100%; border-radius: 2px;
  background: color-mix(in srgb, var(--accent) 60%, transparent);
}
.pcc-rank li.on .pcc-bar i { background: var(--accent); }

.pcc-n {
  font: 500 12px var(--mono); color: var(--text-2); text-align: right;
  font-variant-numeric: tabular-nums;
}

.pcc-skill {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center; gap: 12px;
  padding: 7px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface);
}
.pcc-skill + .pcc-skill { margin-top: 4px; }
.pcc-skill b { font: 600 13.5px var(--display); color: var(--text); }

.pcc-eff { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.eff {
  padding: 1px 7px; border-radius: 4px;
  font: 500 10.5px var(--ui); letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid currentColor; white-space: nowrap;
}
.eff.cc { color: var(--nerf); }
.eff.prot { color: var(--fix); }
.eff-while { font-size: 11px; color: var(--muted); }

.pcc-src {
  font: 400 11px var(--mono); color: var(--muted); text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.pcc-src:hover { color: var(--accent); }

.eff.cc.pve { color: var(--muted); }
.eff.cc.pve i { font-style: normal; opacity: .8; }
.pcc-forms {
  font: 400 11px var(--mono); color: var(--muted); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pcc-src.quiet { opacity: .5; }
.pcc-skill { grid-template-columns: minmax(0, 1fr) auto auto auto auto; }

.pcc-spec {
  display: inline-block; margin-right: 8px; min-width: 34px;
  padding: 1px 5px; border-radius: 3px; text-align: center;
  font: 500 9.5px var(--ui); letter-spacing: .06em;
  border: 1px solid currentColor; vertical-align: 2px;
}
.pcc-spec.awakening { color: var(--nerf); }
.pcc-spec.succession { color: var(--fix); }
.pcc-spec.main { color: var(--muted); }
.pcc-stance {
  margin-left: 8px; padding: 1px 6px; border-radius: 3px;
  font: 500 10px var(--ui); letter-spacing: .04em;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.pcc-rank li.na .pcc-name, .pcc-rank li.na .pcc-n { opacity: .38; }
.pcc-rank li.na .pcc-bar { opacity: .25; }
