/*
 * Raid Check.
 *
 * The design prototype styles everything inline because its runtime requires
 * it. Those values are lifted here verbatim -- the palette, type scale and
 * spacing are the design, and are not to be improvised on.
 *
 * The three signals must never share a severity scale:
 *   --coral  a fix: wrong, correct it tonight
 *   --teal   an upgrade: progression status, not a failure
 *   --amber  controls
 */

:root {
  --bg: #101214;
  --surface: #16191d;
  --surface-2: #131518;
  --border: #22262c;
  --border-bright: #2b313a;
  --border-hover: #3a424d;
  --hairline: #1c2025;
  --text: #e6e9ec;
  --text-2: #aab2bc;
  --text-3: #8a93a0;
  --text-4: #565f6b;
  --text-5: #4d5560;
  --coral: #f08b80;
  --coral-dim: rgba(232, 106, 95, 0.12);
  --coral-edge: rgba(232, 106, 95, 0.45);
  --teal: #63bfae;
  --teal-bright: #7fd8c5;
  --teal-text: #9ed3c8;
  --teal-dim: rgba(99, 191, 174, 0.1);
  --amber: #e0a83e;
  --amber-bright: #edc06a;
  --amber-ink: #181103;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--amber-bright); text-decoration: underline; }

/* Item names link to Wowhead but keep their rarity colour -- the global
   amber would erase the one visual carrying item quality. */
.item-link, .item-link:hover { color: inherit; }
.item-link:hover { text-decoration: underline; }
input::placeholder { color: var(--text-4); }
::selection { background: rgba(224, 168, 62, 0.28); }

@keyframes rcfade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

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

/* ------------------------------------------------------------------ landing */

.landing {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.landing__inner { width: 100%; max-width: 600px; display: flex; flex-direction: column; gap: 14px; }
.landing__title { display: flex; align-items: baseline; gap: 10px; }
.landing__title h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.landing__title span { font-size: 13px; color: var(--text-3); }
.landing__lede { font-size: 15px; color: var(--text-2); line-height: 1.5; margin: 0 0 6px; }
.landing__form { display: flex; gap: 8px; flex-wrap: wrap; }
.landing__hint { font-family: var(--mono); font-size: 12px; color: var(--text-4); }

.input {
  flex: 1;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
  outline: none;
}
.input:focus { border-color: var(--amber); }

.button {
  background: var(--amber);
  color: var(--amber-ink);
  border: none;
  border-radius: 8px;
  padding: 14px 22px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.button:hover { background: var(--amber-bright); }
.button[disabled] { opacity: 0.55; cursor: default; }
.button--small { padding: 6px 14px; font-size: 13px; margin-left: 8px; }
.controls__right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* On the roster the phase is context, not a control -- DECISIONS #25. */
.phase-fixed {
  font-size: 13px; font-weight: 600; color: var(--amber);
  border: 1px solid rgba(224, 168, 62, 0.4); border-radius: 6px; padding: 4px 11px;
}
.slot__gems { font-size: 12px; margin-left: 8px; }

/* Column headers explain themselves on click. */
.thead__cell {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  color: inherit; border-bottom: 1px dotted transparent;
}
.thead__cell:hover { color: var(--text-2); border-bottom-color: currentColor; }
.thead__cell[aria-expanded='true'] { color: var(--amber); }
.thead__col { display: flex; align-items: center; gap: 5px; min-width: 0; }
.thead__sort {
  background: none; border: none; padding: 0 2px; cursor: pointer;
  font-size: 11px; color: var(--text-4); line-height: 1;
}
.thead__sort:hover { color: var(--text-2); }
.thead__sort--active { color: var(--amber); }
.table__explain {
  font-size: 13px; line-height: 1.55; color: var(--text-3);
  padding: 10px 14px; border-top: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.02); max-width: 70ch;
}

.notice { border-radius: 8px; padding: 12px 14px; font-size: 13px; line-height: 1.5; }
.notice--error { border: 1px solid #4a3a40; background: #221a1c; color: #e0a0a0; }
.notice--warn { border: 1px solid #4a4234; background: #211d15; color: #d8c294; }
.notice--muted { border: 1px solid var(--border-bright); background: var(--surface); color: var(--text-3); }
.notice code { font-family: var(--mono); color: var(--text); }

/* ------------------------------------------------------------------- roster */

.roster { max-width: 1080px; margin: 0 auto; padding: 0 20px 80px; }

.roster__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding: 22px 0 6px;
}
.roster__head h1 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.roster__meta { font-size: 13.5px; color: var(--text-3); }
.roster__meta code { font-family: var(--mono); font-size: 12.5px; }

/* The most consequential control on the page, so it never scrolls away. */
.controls {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg);
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.controls__group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  color: var(--text-3); text-transform: uppercase;
}
.phases {
  display: flex; background: var(--surface);
  border: 1px solid var(--border-bright); border-radius: 8px; padding: 3px; gap: 2px;
}
.phases button {
  border: none; border-radius: 6px; padding: 7px 13px;
  font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer;
  background: transparent; color: var(--text-3);
}
.phases button:hover { color: var(--text); }
.phases button[aria-pressed='true'] { background: var(--amber); color: var(--amber-ink); }
.phases__note { font-size: 12px; color: var(--text-4); }

/* Which raid to look at, when the night covered more than one. Above the
   sticky controls rather than inside it: it scopes the whole page, and the
   controls bar is already the busiest strip on screen. DECISIONS #57. */
.raidbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 0 2px;
}

/* On the landing screen the phase sits under the url, because it has to be
   decided before anything is simulated. */
.landing__phase { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }


/* Per-row, because a global progress bar tells you the raid is still working
   and nothing about whether the line you are reading is finished. */
.sim-pending {
  font-size: 12px; color: var(--text-4);
  animation: sim-pulse 1.6s ease-in-out infinite;
}
@keyframes sim-pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

/* Lives in the sticky bar. A progress line that scrolls away is no progress
   line at all once the table is longer than a screen. */
.sim-status { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); }
.sim-status__dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--amber);
  animation: sim-pulse 1.6s ease-in-out infinite;
}
.sim-status__track { width: 80px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.sim-status__fill { height: 100%; background: var(--amber); border-radius: 2px; transition: width 0.3s ease; }
.sim-banner { margin: 14px 0 2px; }
.summary { font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }

.banner--clean {
  margin: 16px 0 4px; border: 1px solid #33402f; background: #161b14;
  border-radius: 10px; padding: 18px 20px;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.banner--clean strong { font-size: 15px; font-weight: 600; color: #9fce8f; }
.banner--clean span { font-size: 13.5px; color: var(--text-3); }

/* --------------------------------------------------------------- the table */

.table__scroll { overflow-x: auto; }
.table { min-width: 780px; }

.grid {
  display: grid;
  grid-template-columns: minmax(170px, 1.5fr) 70px minmax(120px, 1fr) 120px 120px 130px 26px;
  gap: 10px;
}
.thead {
  padding: 12px 12px 7px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-4);
}
.row { border-top: 1px solid var(--hairline); }
/* The entrance plays ONCE per report. Every update rebuilds the whole tree
   (DECISIONS #1), so leaving the animation on `.row` replayed it on every sim
   tick -- measured opacity 0 -> 1 across all 40 rows, which is the flicker
   that reads as the page "jumping". DECISIONS #55. */
.row--enter { animation: rcfade 0.25s ease both; }
/* A row that lands under the sticky controls bar is not readable. */
.row { scroll-margin-top: 64px; }
.row__main {
  align-items: center; padding: 9px 12px; cursor: pointer;
  background: transparent; width: 100%; border: none; text-align: left;
  font-family: var(--sans); color: inherit;
}
.row__main:hover { background: #15181c; }
.row__name { display: flex; align-items: center; gap: 7px; }
.row__name b {
  font-size: 14.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row__class { font-size: 12px; color: var(--text-4); }
.row__role { font-size: 10.5px; font-weight: 600; letter-spacing: 0.09em; color: var(--text-3); }
.row__caret { color: var(--text-4); font-size: 12px; text-align: right; }

.badge--ench {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; color: var(--text-3);
  border: 1px solid var(--border-bright); border-radius: 4px; padding: 1px 4px;
}

/* This raider wore more than one materially different outfit tonight -- a
   control indicator (amber family), never a finding. DECISIONS #53. */
.badge--worn {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; color: var(--amber);
  border: 1px solid rgba(224, 168, 62, 0.4); border-radius: 4px; padding: 1px 4px;
}

/* A worn set only ever seen on sub-minute pulls -- likely mid-swap, not a set. */
.chip__note--warn { color: var(--coral); }

/*
 * The spec control in the row. Amber when WCL could not infer a spec, because
 * that is the one thing on the page the officer must act on before the
 * raider's audit means anything -- the states doc labels it "Pick spec".
 */
.spec-chip {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  color: var(--text-2);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 12.5px;
  white-space: nowrap;
}
.spec-chip--needed { border-color: rgba(224, 168, 62, 0.5); color: #eebd5e; }

/* Coral. A failure someone should correct tonight. */
.pill--fix {
  display: inline-block; background: var(--coral-dim);
  border: 1px solid var(--coral-edge); color: var(--coral);
  border-radius: 6px; padding: 3px 9px;
  font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.muted { font-size: 12.5px; color: var(--text-5); }

/* Teal. Progression status, never mixed into the fix count. */
.upgrades { font-size: 12.5px; color: var(--teal); font-variant-numeric: tabular-nums; }
/* Same border the simmed slot badges carry, so "measured by simulation" looks
   identical whether it is a whole raider or one item. */
.upgrades--simmed {
  border: 1px solid rgba(99, 191, 174, 0.45);
  color: var(--teal-bright);
  border-radius: 4px;
  padding: 1px 5px;
  cursor: help;
}

.bis { display: flex; align-items: center; gap: 9px; }
.bis__text { font-family: var(--mono); font-size: 12.5px; color: #d3dae3; }
.bis__bar { width: 52px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.bis__fill { height: 100%; background: #5b6b85; }

/* ------------------------------------------------------------- gear detail */

.detail { background: var(--surface-2); border-top: 1px solid var(--hairline); padding: 16px 14px 20px; }
.detail__controls { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 0 2px 14px; }
.detail__label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--text-4);
}

.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip {
  background: transparent; border: 1px solid var(--border-bright); color: var(--text-3);
  border-radius: 6px; padding: 5px 11px;
  font-family: var(--sans); font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.chip:hover { border-color: var(--border-hover); }
/* A worn-set chip names every boss the set was worn on, which for a main set
   is a long line. Wrap it inside the chip and cap the width so one set cannot
   stretch the row; the notes sit under the names rather than beside them.
   DECISIONS #53. */
.chip--worn { text-align: left; max-width: 34ch; line-height: 1.45; }
.chip--worn .chip__note { margin-left: 0; display: block; }
.chip[aria-pressed='true'] {
  background: rgba(224, 168, 62, 0.14); border-color: rgba(224, 168, 62, 0.5); color: #eebd5e;
}
.chip__note { font-size: 11px; color: var(--text-4); margin-left: 6px; }

.toggle {
  display: flex; align-items: center; gap: 7px;
  background: none; border: 1px solid var(--border-bright); border-radius: 6px;
  padding: 5px 11px; font-family: var(--sans); font-size: 12.5px;
  color: var(--text-2); cursor: pointer;
}
.toggle:hover { border-color: var(--border-hover); }
.toggle__box {
  display: inline-block; width: 13px; height: 13px; border-radius: 3px;
  border: 1px solid var(--border-bright); color: var(--amber-ink);
  font-size: 10px; font-weight: 700; line-height: 13px; text-align: center;
}
.toggle[aria-pressed='true'] .toggle__box { background: var(--amber); border-color: var(--amber); }

.slots { columns: 2 380px; column-gap: 28px; }
.slot {
  break-inside: avoid; display: grid; grid-template-columns: 78px 1fr;
  gap: 10px; padding: 7px 2px; border-bottom: 1px solid #1a1e23;
}
.slot__name {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-4); padding-top: 2px;
}
.slot__body { min-width: 0; }
.slot__item { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.slot__item b { font-size: 14.5px; font-weight: 500; }
.badge--bis {
  font-size: 10px; font-weight: 600; letter-spacing: 0.07em; color: var(--text-5);
  border: 1px solid #262b32; border-radius: 4px; padding: 0 4px;
}

.slot__up { font-size: 13px; margin-top: 2px; line-height: 1.45; }
.slot__up strong { font-weight: 600; color: var(--teal); }
.slot__up span { color: var(--teal-text); }
.slot__impact {
  font-family: var(--mono); font-size: 11.5px; font-weight: 400; color: var(--teal);
  background: var(--teal-dim); border-radius: 4px; padding: 1px 5px; margin-left: 2px;
}
.slot__impact--strong { font-weight: 600; color: var(--teal-bright); }
/* A simulated delta is the strongest claim on the row -- the only number that
   has priced a proc -- so it is the only badge that gets a border. */
/* Deliberately quiet. It is there for the one person in the guild who does not
   believe a number, and invisible to everyone else until they look for it. */
.slot__verify {
  font-family: var(--mono); font-size: 10.5px;
  color: var(--text-4); margin-left: 7px; text-decoration: none;
}
.slot__verify:hover { color: var(--teal); text-decoration: underline; }

.slot__impact--simmed {
  border: 1px solid rgba(99, 191, 174, 0.45);
  color: var(--teal-bright);
}
/* No percentage, and why. Never blank -- "already ahead" and "cannot score
   this" are different facts and the reader cannot infer either from silence. */
.slot__impact--note { background: none; color: var(--text-4); cursor: help; }

/* The list's pick is not better. Not an upgrade, so not teal. */
.slot__up--ahead strong { color: var(--text-4); }
.slot__up--ahead span { color: var(--text-4); }

.slot__ench { font-size: 12px; margin-top: 2px; }
.slot__ench--ok { color: var(--text-5); }
/* The BiS enchant, beside what they have. Dimmer than the enchant itself:
   it is context, not a correction. */
/* The wanted enchant, on its own line under the one they have. Same grammar
   as the item BiS line above it, a step quieter -- an enchant swap is a
   smaller thing than replacing the piece. */
.slot__up--ench { font-size: 12.5px; }
.slot__up--ench strong { color: var(--teal); opacity: 0.9; }
.slot__up--ench span { color: var(--teal-text); opacity: 0.9; }

/* The stat numbers behind the name. Present only when the name is real. */
.slot__ench-detail { color: var(--text-4); opacity: 0.75; }

/* Marks a line that is a description rather than a name. Dim, but present --
   an unreadable enchant should not pass for a readable one. */
.slot__ench-unnamed {
  font-family: var(--mono); font-size: 11px;
  color: var(--text-4); opacity: 0.7; cursor: help;
}
.slot__ench--bad { color: var(--coral); font-weight: 500; }

.slot__sockets { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.dots { display: flex; gap: 3px; }
.dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid #4b5563; background: #4b5563; }
.dot--empty { background: transparent; border-color: var(--coral); }
.slot__gemtext { font-size: 11.5px; color: var(--text-4); }
.slot__gemtext--bad { color: var(--coral); }

.slot--cosmetic .slot__name, .slot--cosmetic .slot__body { color: #3a414a; font-size: 12px; }

/* --------------------------------------------------------------------- ads */

/*
 * Kept out of the content column entirely. The rail sits beside the roster on
 * wide screens and vanishes below 1400px rather than narrowing the table; the
 * footer unit sits under the last raider. Both reserve their space, so a
 * blocked or slow ad never moves the page under someone's cursor.
 */
.shell {
  display: flex; align-items: flex-start; justify-content: center; gap: 28px;
}
.shell > #app { flex: 1 1 auto; min-width: 0; }

/* Unconfigured ads cost no pixels; filled ones take their reserved box. */
.ad:empty { display: none; }

.ad {
  position: relative;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.ad__label {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-5);
}

.ad--rail {
  width: 160px; height: 600px;
  position: sticky; top: 76px; margin-top: 84px;
}
.ad--footer {
  width: 100%; max-width: 728px; height: 90px;
  margin: 26px auto 0;
}

/* Below this the rail would eat the table, so it goes rather than the data. */
@media (max-width: 1399px) {
  .ad--rail { display: none; }
}
@media (max-width: 767px) {
  .ad--footer { height: 100px; max-width: 320px; }
}

/* -------------------------------------------------------------------- misc */

/*
 * The whole-screen loading state -- its only use (app.ts renders it alone
 * while `busy`). Centred rather than tucked under the header, because it is
 * the only thing on screen: reading the log is one request, but reading the
 * night's pulls is ~30 and can hold here for seconds (#60), and a lone line
 * of text in the top-left reads like a page that failed rather than one that
 * is working. Column, so the bar sits over the text and both share a centre.
 */
.progress {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; min-height: 70vh; padding: 14px 2px; text-align: center;
  font-size: 13.5px; color: var(--text-2);
}
.progress__track { width: 120px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress__fill { height: 100%; background: var(--amber); border-radius: 2px; }

/*
 * DECISIONS.md #6. Ten lines that tell you in one second whether you are
 * debugging logic or looking at four-month-old data.
 */
.footer {
  max-width: 1080px; margin: 0 auto; padding: 24px 20px 40px;
  font-size: 12px; color: var(--text-4);
  display: flex; gap: 16px; flex-wrap: wrap;
}
.footer code { font-family: var(--mono); }

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

/* Auto could not place the zone: the phase on screen is a default, not a
   reading of the report, and must not pass for one. */
.phase-warn {
  font-size: 12px; color: #eebd5e;
  border: 1px solid rgba(224, 168, 62, 0.45); border-radius: 6px; padding: 2px 8px;
}

/* Slots the sim rates above the list's own pick. Muted: it is information,
   not a fix, and never competes with the coral of something actually wrong. */
.bis__ahead { font-size: 11.5px; color: var(--text-3); cursor: help; white-space: nowrap; }

/* ---------------------------------------------------------------- sim detail
   What "verify" opens. The badge says how much; this says compared to what.
   A <dialog> rather than a positioned panel: the slot rows sit inside a
   scrolling grid, and anything anchored to one of them either clips or drags
   the row's layout around when it opens. DECISIONS #38. */
.simx {
  border: 1px solid var(--border-bright);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 20px 22px;
  max-width: 480px;
  width: calc(100vw - 32px);
  font-family: var(--sans);
}
.simx::backdrop { background: rgba(0, 0, 0, 0.55); }

.simx__title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
}

.simx__rows { display: grid; gap: 2px; margin-bottom: 14px; }
.simx__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.simx__row:last-child { border-bottom: none; }
.simx__label { color: var(--text-3); font-size: 13px; }
.simx__value { font-family: var(--mono); font-size: 14px; white-space: nowrap; }

/* The verdict line, in the same two colours the rest of the page uses: teal
   is an upgrade, muted is "what they have is better". Never coral -- being
   ahead of the list is not a failure. */
.simx__row--better .simx__value { color: var(--teal-bright); font-weight: 600; }
.simx__row--worse .simx__value { color: var(--text-4); font-weight: 600; }

.simx__note { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.simx__fine { margin: 0; font-size: 11.5px; line-height: 1.55; color: var(--text-4); }

.simx__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.simx__btn {
  background: none;
  border: 1px solid var(--border-bright);
  border-radius: 7px;
  color: var(--text-2);
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 12.5px;
  cursor: pointer;
}
.simx__btn:hover { border-color: var(--border-hover); color: var(--text); }
.simx__btn--primary { border-color: var(--teal); color: var(--teal-bright); }

@media (max-width: 700px) {
  .simx__row { flex-direction: column; align-items: flex-start; gap: 2px; }
}
/* Inside the simulator's own margin: no winner, so neither colour. */
.simx__row--even .simx__value { color: var(--text-2); font-weight: 600; }

/* What the swap moves on the character sheet -- the "why" under the "how
   much". Teal for gained, muted for lost: never coral, since losing a stat in
   a net upgrade is not a fault. */
.simx__stats { margin: 0 0 14px; }
.simx__statshead {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-4); margin-bottom: 7px;
}
.simx__stat {
  display: flex; gap: 8px; align-items: baseline;
  font-family: var(--mono); font-size: 12.5px; padding: 2px 0;
}
.simx__stat--up > span:first-child { color: var(--teal-bright); min-width: 52px; }
.simx__stat--down > span:first-child { color: var(--text-4); min-width: 52px; }
.simx__stat--ilvl > span:first-child { color: var(--text-3); min-width: 52px; }
.simx__statname { font-family: var(--sans); color: var(--text-2); font-size: 12.5px; }

/* Procs and on-use effects. The half of a trinket swap the stat list cannot
   show, and often the whole reason the number moved. DECISIONS #40. */
.simx__fx {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 12.5px; padding: 3px 0; line-height: 1.45;
}
.simx__fxtag {
  font-family: var(--mono); font-size: 11px; min-width: 52px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.simx__fx--up .simx__fxtag { color: var(--teal-bright); }
.simx__fx--down .simx__fxtag { color: var(--text-4); }
.simx__fx--none .simx__fxtag { color: var(--text-4); }
.simx__fx--none span:last-child { color: var(--text-4); }

/* "How this was simulated" -- folded away, because it answers questions nobody
   opened the panel to ask, and every one of them is read out of the request
   rather than asserted beside it. DECISIONS #42. */
.simx__setup { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.simx__setup summary {
  cursor: pointer; font-size: 12px; color: var(--text-3);
  list-style: none; user-select: none;
}
.simx__setup summary::-webkit-details-marker { display: none; }
.simx__setup summary::before { content: '▸ '; color: var(--text-4); }
.simx__setup[open] summary::before { content: '▾ '; }
.simx__setup summary:hover { color: var(--text-2); }
.simx__setuprows { display: grid; gap: 5px; margin-top: 10px; }
.simx__setuprow { display: flex; gap: 10px; align-items: baseline; font-size: 12px; line-height: 1.45; }
.simx__setuplabel {
  font-family: var(--mono); font-size: 11px; color: var(--text-4);
  min-width: 92px; text-transform: uppercase; letter-spacing: 0.04em;
}
.simx__setuprow > span:last-child { color: var(--text-2); }
/* Stats this spec does not care about: present, findable, and not competing
   with the ones that explain the number. DECISIONS #44. */
.simx__stat--minor { color: var(--text-4); font-size: 11.5px; padding-top: 6px; }
.simx__stat--minor > span:first-child { color: var(--text-4); min-width: 52px; }
.simx__stat--minor .simx__statname { color: var(--text-4); font-size: 11.5px; }

/* ------------------------------------------------------------- item card
   Hover (and focus) card for an item name, built from the vendored database.
   Wowhead's tooltip script would do this and is the runtime third-party
   dependency DECISIONS #2 exists to keep out. DECISIONS #45. */
.icard {
  position: fixed;
  z-index: 60;
  display: none;
  max-width: 320px;
  padding: 11px 13px;
  border: 1px solid var(--border-bright);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.45;
  pointer-events: none;   /* never steals the hover it was opened by */
}
.icard--on { display: block; }

.icard__name { font-weight: 600; font-size: 13px; margin-bottom: 3px; }
.icard__meta { color: var(--text-4); font-size: 11.5px; margin-bottom: 7px; }
.icard__set { color: var(--text-3); font-size: 11.5px; margin: -4px 0 7px; }
.icard__stat { color: var(--text); font-family: var(--mono); font-size: 12px; }
.icard__stat--minor { color: var(--text-4); }

.icard__sockets { display: flex; align-items: center; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.icard__socket {
  width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg);
  border: 1px solid var(--border-hover);
}
.icard__socket--red { background: #b3413f; }
.icard__socket--yellow { background: #b39a3f; }
.icard__socket--blue { background: #3f6fb3; }
.icard__socket--meta { background: #8a8a8a; }
.icard__socketbonus { color: var(--text-4); font-size: 11px; margin-left: 4px; }

.icard__effect { color: var(--teal); font-size: 11.5px; margin-top: 7px; }

/* Touch has no hover. The card is additive -- the name is still a link and the
   expanded row still carries every number -- so it simply does not appear.
   See CONTINUE.md item 17 for the mobile layout this belongs with. */
@media (hover: none) { .icard { display: none !important; } }
/* Where it drops, what it says, and what it takes to get it. DECISIONS #46. */
.icard__source { color: var(--amber); font-size: 11.5px; margin: -4px 0 7px; }
.icard__note { color: var(--text-2); font-size: 11.5px; margin-top: 8px; line-height: 1.45; }
.icard__req { color: var(--text-4); font-size: 11px; margin-top: 4px; }
/* Enchants with no link target still get a card, so they need a host. */
.icard__anchor { cursor: help; border-bottom: 1px dotted var(--border-hover); }

/* Share. One builder for the roster link and the per-raider one. #47. */
.share { display: inline-flex; align-items: center; gap: 6px; }
.share__fallback {
  font-family: var(--mono); font-size: 11px;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border-bright); border-radius: 6px;
  padding: 5px 7px; width: 230px;
}
.toggle--ok { border-color: var(--teal); color: var(--teal-bright); }
.toggle--quiet { padding: 5px 10px; font-size: 12px; }
.roster__head-right { display: flex; align-items: center; gap: 12px; }
/* Outside the roster, so a sim landing cannot delete the confirmation. #47. */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(8px);
  z-index: 70; opacity: 0; pointer-events: none;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--teal); border-radius: 8px;
  padding: 9px 16px; font-family: var(--sans); font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: opacity 120ms ease, transform 120ms ease;
}
.toast--on { opacity: 1; transform: translateX(-50%) translateY(0); }
/* A gem the vendored database cannot name. Marked rather than hidden: "Gem
   28458" reads like a name. The link still goes to Wowhead. DECISIONS #48. */
.slot__gem--unknown { font-style: italic; border-bottom: 1px dotted var(--text-4); }
/* What the list gems this slot with. Teal like every other upgrade line, and
   never coral -- gemming differently is not a failure. */
.slot__gemswanted { font-size: 11.5px; color: var(--teal); margin-top: 3px; }
.slot__gemswanted strong { font-weight: 600; }

/* The example-audit link and the what-it-checks list. Both exist so a first
   visit has something to read and something to click -- see DECISIONS #67. */
.landing__demo { margin-top: 10px; font-size: 13.5px; }
.landing__demo a { color: var(--amber); }
.landing__checks { margin-top: 26px; }
.landing__checks ul { margin: 8px 0 0; padding-left: 18px; }
.landing__checks li {
  font-size: 13.5px; color: var(--text-3); line-height: 1.6; margin-bottom: 4px;
}
.progress__flavour { font-size: 15px; color: var(--text); }
.progress__status { color: var(--text-3); }
