:root {
  --bg: #090b0e;
  --bg-2: #0e1115;
  --panel: #12161b;
  --panel-2: #181d24;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #eef1f4;
  --muted: #8d98a5;
  --accent: #ff6d10;
  --accent-soft: rgba(255, 109, 16, 0.14);
  --accent-ink: #160b03;
  --he: #f7a928;
  --set: #2ee6a6;
  --exotic: #ff4b33;
  --skill: #ffd23f;
  --proto: #d58cff;
  --red: #ff5252;
  --blue: #45aaf2;
  --yellow: #ffd23f;
  --ok: #2ee6a6;
  --s0: #ff8a3d;
  --s1: #45c8ff;
  --s2: #c792ff;
  --display: "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --cut: 10px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 14px/1.5 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* A slowly drifting grid and a breathing glow behind everything. */
body::before, body::after { content: ""; position: fixed; z-index: -1; pointer-events: none; }
body::before {
  inset: -40px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px) 0 0 / 100% 40px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px) 0 0 / 40px 100%;
  animation: drift 30s linear infinite;
}
body::after {
  inset: 0;
  background:
    radial-gradient(900px 520px at 10% -8%, rgba(255, 109, 16, 0.13), transparent 62%),
    radial-gradient(700px 500px at 100% 100%, rgba(69, 170, 242, 0.05), transparent 60%);
  animation: breathe 9s ease-in-out infinite alternate;
}

h1, h2, h3, h4, p, ul, dl { margin: 0; }
h1, h2, h3, h4, .eyebrow, .slot-kind, .btn, .seg-btn, .pill, .badge, .chip b, .slot-figure {
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.06em;
}
h1 { font-size: 22px; font-weight: 700; line-height: 1; }
h2 { font-size: 15px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 600; }
h4 { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; }
a { color: var(--accent); }
em { font-style: normal; color: var(--muted); }
.note { color: var(--muted); font-size: 12.5px; }
.note.warn { color: var(--he); }
.note b { color: var(--text); font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- start-up screen ---- */
#boot {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg);
  transition: opacity 0.4s, visibility 0.4s; animation: boot-timeout 0s 6s forwards; /* never blocks the page for good */
}
#boot.done { opacity: 0; visibility: hidden; }
.boot-core { display: grid; gap: 10px; justify-items: center; text-align: center; }
#boot svg { width: 128px; height: 128px; }
/* Everything that spins does so around its own centre, whatever size the drawing is shown at. */
#boot circle, .mark circle, .ring-spin { transform-box: fill-box; transform-origin: center; }
#boot circle { fill: none; stroke: var(--accent); }
#boot .b1 { stroke-width: 2; stroke-dasharray: 250 90; animation: spin 2.4s linear infinite; }
#boot .b2 { stroke-width: 1; stroke-opacity: 0.5; stroke-dasharray: 4 8; animation: spin 7s linear infinite reverse; }
#boot .b3 { stroke-width: 3; stroke-dasharray: 60 128; animation: spin 1.5s var(--ease) infinite; }
#boot .b4 { fill: var(--accent); stroke: none; animation: pulse 0.8s ease-in-out infinite alternate; }
.boot-title { font: 700 22px var(--display); letter-spacing: 0.32em; text-transform: uppercase; padding-left: 0.32em; }
.boot-line { font: 600 12px var(--display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.boot-bar { display: flex; gap: 4px; margin-top: 4px; }
.boot-bar i { width: 20px; height: 5px; background: rgba(255, 255, 255, 0.12); animation: light 0.01s linear forwards; }
.boot-bar i:nth-child(1) { animation-delay: 0.1s; } .boot-bar i:nth-child(2) { animation-delay: 0.2s; }
.boot-bar i:nth-child(3) { animation-delay: 0.3s; } .boot-bar i:nth-child(4) { animation-delay: 0.4s; }
.boot-bar i:nth-child(5) { animation-delay: 0.5s; } .boot-bar i:nth-child(6) { animation-delay: 0.6s; }
.boot-bar i:nth-child(7) { animation-delay: 0.7s; } .boot-bar i:nth-child(8) { animation-delay: 0.8s; }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px;
  padding: 12px 24px; background: rgba(9, 11, 14, 0.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); box-shadow: inset 0 2px 0 var(--accent);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent) 0 0 / 30% 100% no-repeat;
  animation: scan 7s linear infinite;
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.mark { width: 36px; height: 36px; color: var(--accent); flex: none; filter: drop-shadow(0 0 8px rgba(255, 109, 16, 0.45)); }
.mark circle:first-child { animation: spin 16s linear infinite; }
.mark circle:last-child { animation: pulse 2.4s ease-in-out infinite alternate; }
.sub { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.22em; font-size: 11px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.actions .btn { font-size: 12px; padding: 5px 10px; white-space: nowrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  border: 1px solid var(--line); background: var(--panel); font-size: 12px; color: var(--muted);
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.chip b { color: var(--text); font-size: 13px; font-weight: 600; }
.chip.live i { background: var(--ok); animation: ping 2.2s ease-out infinite; }
.chip.checking i { background: var(--he); animation: pulse 0.6s ease-in-out infinite alternate; }
.chip.offline i { background: var(--he); }

/* ---- tool switcher ---- */
.tools { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); background: var(--panel); }
.tools a {
  font: 600 14px var(--display); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  color: var(--muted); padding: 6px 14px; transition: color 0.15s, background-color 0.15s;
}
.tools a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.tools a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }

/* ---- seasonal calendar ---- */
.page { display: grid; gap: 12px; max-width: 980px; margin: 0 auto; padding: 20px 24px 8px; }
.season-head { gap: 6px; }
.season-pick { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px; }
.season-pick .field { margin: 0; min-width: 240px; }
.season-name { font-size: clamp(30px, 6vw, 44px); line-height: 1; color: var(--accent); text-shadow: 0 0 26px rgba(255, 109, 16, 0.35); }
.panel > h2.season-name::before { display: none; }
.event h3 a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.event h3 a:hover { color: var(--accent); }
.news { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.news-item { display: grid; gap: 4px; align-content: start; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line-2); color: var(--text); text-decoration: none; transition: border-color 0.15s, transform 0.2s var(--ease); }
.news-item:hover { border-left-color: var(--accent); transform: translateY(-2px); }
.news-item b { font: 700 17px/1.2 var(--display); letter-spacing: 0.02em; }
.next { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 12px 14px; background: var(--bg-2); border-left: 3px solid var(--accent); }
.next h3 { font-size: 22px; }
.section em { font: 700 14px var(--display); color: var(--accent); }
.timeline { display: grid; gap: 10px; padding-left: 18px; border-left: 1px solid var(--line-2); }
.event {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; align-items: start;
  padding: 14px 16px; background: var(--panel); border: 1px solid var(--line);
}
.event::before { content: ""; position: absolute; left: -23px; top: 22px; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.event.active { border-left: 3px solid var(--accent); background: linear-gradient(90deg, rgba(255, 109, 16, 0.07), transparent 40%), var(--panel); }
.event.active::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 109, 16, 0.2); animation: pulse 1.2s ease-in-out infinite alternate; }
.event.ended, .event.archive { opacity: 0.72; }
.event h3 { font-size: 21px; font-weight: 700; letter-spacing: 0.02em; text-transform: none; margin: 2px 0; }
.when { margin-top: 8px; font: 600 13px var(--display); letter-spacing: 0.08em; text-transform: uppercase; }
.when span, .when em { color: var(--muted); font-weight: 500; }
.when em { margin-left: 8px; }
.event-side { text-align: right; display: grid; gap: 2px; justify-items: end; }
.state { font: 600 12px var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.state::before { content: "● "; }
.state.live { color: var(--accent); }
.until { font: 600 11px var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.count-down { font-family: var(--display); color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.count-down b { font-size: 30px; font-weight: 700; line-height: 1; }
.count-down i { font-style: normal; font-size: 12px; font-weight: 700; text-transform: uppercase; margin-right: 4px; }
.progress { grid-column: 1; align-self: center; height: 3px; background: rgba(255, 255, 255, 0.1); }
.progress i { display: block; height: 100%; background: var(--accent); box-shadow: 0 0 10px rgba(255, 109, 16, 0.7); }
.pct { font: 600 12px var(--display); color: var(--muted); text-align: right; }
@media (max-width: 620px) {
  .page { padding: 14px 14px 8px; }
  .event { grid-template-columns: minmax(0, 1fr); }
  .event-side { text-align: left; justify-items: start; }
  .progress { grid-column: 1; }
}

/* ---- controls ---- */
.btn, .seg-btn, .pill {
  position: relative; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; line-height: 1.2;
  background: var(--panel-2); border: 1px solid var(--line-2); padding: 7px 14px;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s, transform 0.15s var(--ease), box-shadow 0.15s;
}
.btn:hover, .seg-btn:hover, .pill:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft), 0 6px 18px -8px rgba(255, 109, 16, 0.6); }
.btn:active, .seg-btn:active, .pill:active { transform: translateY(1px) scale(0.985); }
.btn.primary {
  border-color: var(--accent); color: var(--accent-ink);
  background: linear-gradient(105deg, var(--accent) 0 44%, #ffb37a 50%, var(--accent) 56% 100%) 100% 0 / 260% 100%;
  transition: background-position 0.6s var(--ease), transform 0.15s var(--ease), box-shadow 0.15s;
}
.btn.primary:hover { background-position: 0 0; }
.btn.ghost { background: transparent; }
.btn.danger:hover { border-color: var(--red); color: var(--red); box-shadow: none; }
.btn.small { font-size: 13px; padding: 5px 10px; }
.btn.icon { padding: 6px 10px; font-family: var(--body); }

.seg { display: flex; gap: 6px; }
.seg.wrap { flex-wrap: wrap; }
.seg-btn { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg.wrap .seg-btn { flex: 1 1 120px; }
.seg-btn::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: 0; height: 2px; background: var(--accent); transition: left 0.25s var(--ease), right 0.25s var(--ease); }
.seg-btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.seg-btn.on::after { left: 0; right: 0; }
.seg.mode .seg-btn { padding: 9px 14px; font-size: 15px; }

select, input[type="number"], input[type="text"], input[type="search"] {
  width: 100%; min-width: 0; font: inherit; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-2); padding: 7px 9px; border-radius: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
select:hover, input:hover { border-color: rgba(255, 255, 255, 0.3); }
select:focus, input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; margin: 2px 0 0; flex: none; }
.num { font-variant-numeric: tabular-nums; }
.field { display: grid; gap: 4px; min-width: 0; margin-top: 8px; }
.field > span:first-child { font-size: 12px; color: var(--muted); }
.field.inline { grid-template-columns: minmax(0, 1fr) 96px; align-items: center; gap: 10px; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; }
.pair > :only-child { grid-column: 1 / -1; }
.pair.save { grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin-top: 8px; }
.check b { color: var(--text); font-weight: 600; }
.check span { color: var(--muted); }
.extra { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: 8px; align-items: center; }

/* ---- layout ---- */
.layout {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 24px; max-width: 1480px; margin: 0 auto; padding: 20px 24px 8px; align-items: start;
}
.stats { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; display: grid; gap: 12px; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.board { display: grid; gap: 12px; }

.panel {
  position: relative; background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 120px), var(--panel);
  border: 1px solid var(--line); padding: 14px 16px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; min-width: 0;
}
.panel > h2, .panel > summary h2, .section { display: flex; align-items: center; gap: 8px; }
.panel > h2::before, .panel > summary h2::before, .section::before { content: ""; width: 4px; height: 14px; background: var(--accent); flex: none; box-shadow: 0 0 10px rgba(255, 109, 16, 0.7); }
.section { margin: 10px 0 -2px; color: var(--muted); font-size: 14px; }
.section::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
details.panel > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: "+"; font: 600 18px var(--display); color: var(--muted); transition: transform 0.25s var(--ease), color 0.15s; }
details.panel[open] > summary::after { transform: rotate(45deg); color: var(--accent); }
details.panel[open] > :not(summary) { animation: rise 0.3s var(--ease) both; }

/* ---- item art ---- */
.art { display: block; width: 100%; height: 100%; }
svg.art path { fill: currentColor; fill-opacity: 0.16; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
svg.art.emblem .plate { fill-opacity: 0.1; stroke-width: 1.8; }
svg.art.emblem .trim { fill: none; stroke-opacity: 0.45; stroke-dasharray: 3 3; stroke-width: 1; }
svg.art.emblem .ticks { fill: none; stroke-opacity: 0.75; stroke-width: 1.6; }
svg.art.emblem text { font: 700 21px var(--display); fill: currentColor; letter-spacing: 0.02em; }
svg.art.emblem .core { stroke: none; fill-opacity: 1; }
svg.art.emblem .core.c-offense { fill: var(--red); } svg.art.emblem .core.c-defense { fill: var(--blue); } svg.art.emblem .core.c-utility { fill: var(--yellow); }
img.art.photo { object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.55)); }

/* ---- slots ---- */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.slot {
  position: relative; isolation: isolate; overflow: hidden; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  background:
    linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.07) 50%, transparent 58%) 130% 0 / 260% 100% no-repeat,
    linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-left: 3px solid var(--q, var(--line-2)); padding: 12px 14px; min-height: 128px;
  display: grid; gap: 3px; align-content: start;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  transition: border-color 0.2s, transform 0.25s var(--ease), background-position 0.7s var(--ease), box-shadow 0.2s;
}
.slot:hover, .slot:focus-visible { border-color: var(--line-2); border-left-color: var(--q, var(--accent)); background-position: -30% 0, 0 0; transform: translateY(-2px); }
/* Target-lock brackets that close in on hover. */
.slot::before, .slot::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--q, var(--accent)); opacity: 0;
  transition: opacity 0.2s, transform 0.3s var(--ease); pointer-events: none;
}
.slot::before { top: 6px; left: 8px; border-right: 0; border-bottom: 0; transform: translate(8px, 8px); }
.slot::after { right: 8px; bottom: 6px; border-left: 0; border-top: 0; transform: translate(-8px, -8px); }
.slot:hover::before, .slot:hover::after, .slot:focus-visible::before, .slot:focus-visible::after { opacity: 0.9; transform: none; }
.slot.active { box-shadow: inset 0 -2px 0 var(--accent); }
.slot.empty { border-style: dashed; border-left-style: dashed; background: transparent; align-content: center; justify-items: start; }
.slot.empty .slot-cta { color: var(--muted); font-size: 13px; transition: color 0.15s, letter-spacing 0.25s var(--ease); }
.slot.empty:hover .slot-cta { color: var(--accent); letter-spacing: 0.04em; }
.q-high-end, .q-named { --q: var(--he); }
.q-gearset { --q: var(--set); }
.q-exotic { --q: var(--exotic); }
.q-skill { --q: var(--skill); }
.slot-art {
  position: absolute; z-index: -1; right: 12px; bottom: 10px; width: 78px; height: 78px; color: var(--q, var(--muted));
  opacity: 0.42; pointer-events: none; transition: opacity 0.25s, transform 0.4s var(--ease); transform-origin: 100% 100%;
}
.slot.wide .slot-art { width: 176px; height: 64px; right: 6px; bottom: 6px; opacity: 0.3; }
/* Gear and skill cards keep their text clear of the picture. */
.slot:not(.wide) { padding-right: 100px; }
.slot:not(.wide) .slot-name { padding-right: 0; }
.slot.empty .slot-art { opacity: 0.16; color: var(--muted); }
.slot:hover .slot-art, .slot:focus-visible .slot-art { opacity: 0.85; transform: scale(1.06); }
.slot.empty:hover .slot-art { opacity: 0.4; color: var(--accent); }
.slot-art:has(.photo) { opacity: 0.9; }
.slot-kind { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ico { width: 16px; height: 16px; fill: currentColor; flex: none; }
.slot-name { font: 700 19px/1.15 var(--display); letter-spacing: 0.02em; color: var(--q, var(--text)); padding-right: 46px; text-shadow: 0 0 18px color-mix(in srgb, var(--q, transparent) 35%, transparent); }
.slot-meta { font-size: 12.5px; color: var(--muted); }
.slot-figure { position: absolute; top: 12px; right: 14px; font-size: 11px; color: var(--muted); text-align: right; }
.slot-figure b { display: block; font-size: 18px; line-height: 1; color: var(--text); }
.pips { position: absolute; top: 14px; right: 16px; display: flex; gap: 4px; }
.pip { display: inline-block; width: 9px; height: 9px; transform: rotate(45deg); background: var(--muted); flex: none; }
.pip.c-offense, .corebar .c-offense { background: var(--red); box-shadow: 0 0 8px rgba(255, 82, 82, 0.6); }
.pip.c-defense, .corebar .c-defense { background: var(--blue); box-shadow: 0 0 8px rgba(69, 170, 242, 0.6); }
.pip.c-utility, .corebar .c-utility { background: var(--yellow); box-shadow: 0 0 8px rgba(255, 210, 63, 0.6); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag { font-size: 11.5px; padding: 2px 6px; background: rgba(20, 24, 30, 0.78); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tag.strong { color: var(--text); background: rgba(74, 36, 12, 0.85); border-color: rgba(255, 109, 16, 0.35); }
.tag.proto { color: #f0c2ff; background: rgba(62, 30, 80, 0.85); border-color: rgba(213, 140, 255, 0.4); }
.watch .watch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px 20px; }
.watch h3 { color: var(--muted); margin-top: 6px; }

/* ---- agent overview ---- */
.agent { gap: 12px; }
.agent-top { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 18px; align-items: center; }
.ring { position: relative; width: 132px; aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ring-spin { fill: none; stroke: var(--accent); stroke-opacity: 0.55; stroke-width: 1; stroke-dasharray: 2 7; animation: spin 40s linear infinite; animation-delay: calc(var(--t, 0) * -1s); }
.seg-arc { fill: none; stroke-width: 7; }
.seg-arc.c-offense { stroke: var(--red); filter: drop-shadow(0 0 4px rgba(255, 82, 82, 0.6)); }
.seg-arc.c-defense { stroke: var(--blue); filter: drop-shadow(0 0 4px rgba(69, 170, 242, 0.6)); }
.seg-arc.c-utility { stroke: var(--yellow); filter: drop-shadow(0 0 4px rgba(255, 210, 63, 0.6)); }
.seg-arc.c-none { stroke: rgba(255, 255, 255, 0.1); }
.ring-core { fill: rgba(0, 0, 0, 0.35); stroke: var(--line-2); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label span { font: 600 11px var(--display); letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); padding-left: 0.24em; }
.ring-label b { font: 700 27px/1 var(--display); font-variant-numeric: tabular-nums; }
.agent-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.agent-stats div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.agent-stats dt { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.agent-stats dd { margin: 0; font: 700 17px/1.1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.agent-stats dd b { font-weight: 700; }
.agent-stats dd em { font: 600 10px var(--display); letter-spacing: 0.12em; margin-left: 4px; }
.agent-stats dd.c-defense { color: var(--blue); } .agent-stats dd.c-utility { color: var(--yellow); }
.tier { display: inline-flex; gap: 2px; margin-left: 8px; vertical-align: 1px; }
.tier i { width: 6px; height: 11px; background: rgba(255, 255, 255, 0.12); }
.tier i.on { background: var(--yellow); box-shadow: 0 0 6px rgba(255, 210, 63, 0.7); }
.bump { animation: bump 0.55s var(--ease); }

/* ---- player tools ---- */
.checks, .gains { list-style: none; padding: 0; display: grid; gap: 6px; }
.checks li { display: flex; gap: 10px; align-items: baseline; font-size: 13px; }
.checks li i { width: 8px; height: 8px; flex: none; transform: rotate(45deg) translateY(-1px); background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.checks li.warn i { background: var(--he); box-shadow: 0 0 8px var(--he); }
.checks li.bad i { background: var(--red); box-shadow: 0 0 8px var(--red); }
.checks li.bad { color: #ffb3b3; }
.gains li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 5px 8px; font-size: 13px; background: var(--bg-2); overflow: hidden; }
.gains li span, .gains li b { position: relative; z-index: 1; }
.gains li b { font-variant-numeric: tabular-nums; }
.gains li i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(255, 109, 16, 0.38), rgba(255, 109, 16, 0.08)); border-right: 2px solid var(--accent); transition: width 0.4s var(--ease); }
.gains li:first-child b { color: var(--accent); }
.compare td.up { color: var(--ok); } .compare td.down { color: var(--red); }
.watch h3 em { font: 400 12px var(--body); letter-spacing: 0; text-transform: none; margin-left: 6px; }
.watch h3 em.over { color: var(--red); }

/* ---- stats ---- */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero div { position: relative; min-width: 0; background: var(--bg-2); border: 1px solid var(--line); padding: 10px 12px; overflow: hidden; }
.hero div::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); opacity: 0.5; }
.hero div:first-child::before { opacity: 1; box-shadow: 0 0 12px var(--accent); }
.hero span { display: block; font: 600 12px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hero strong { font: 700 28px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.hero strong b { font-weight: 700; }
.hero div:first-child strong { color: var(--accent); text-shadow: 0 0 22px rgba(255, 109, 16, 0.45); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.kv.wide { grid-template-columns: minmax(0, 1fr); }
.kv div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 4px; margin: 0 -4px; border-bottom: 1px solid var(--line); min-width: 0; transition: background-color 0.15s; }
.kv div:hover { background: rgba(255, 255, 255, 0.035); }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.kv.wide dd { white-space: normal; overflow-wrap: anywhere; }

.corebar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; height: 6px; }
.cores { display: flex; gap: 14px; font: 600 13px var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.cores .c-offense { color: var(--red); } .cores .c-defense { color: var(--blue); } .cores .c-utility { color: var(--yellow); }
.set { border-left: 2px solid var(--q); padding-left: 10px; }
.set h4 { color: var(--q); }
.set h4 span, .source h4 span, .talent h4 span { font: 400 12px var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); margin-left: 6px; }
.set ul { list-style: none; padding: 0; margin-top: 4px; display: grid; gap: 2px; }
.set li { font-size: 13px; color: var(--muted); opacity: 0.5; display: flex; gap: 8px; transition: opacity 0.2s, color 0.2s; }
.set li.on { color: var(--text); opacity: 1; }
.set li b { font: 700 13px var(--display); color: var(--q); width: 10px; flex: none; }
.source { border-top: 1px solid var(--line); padding-top: 8px; }
.source:first-of-type { border-top: 0; padding-top: 0; }
.source.on h4 { color: var(--accent); }
.count { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.count .check { margin-top: 4px; }
.stacks { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.stacks .num { width: 70px; padding: 4px 6px; }

.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); }
.chart .tick { fill: var(--muted); font-size: 11px; font-family: var(--body); }
.line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.line.s0 { stroke: var(--s0); filter: drop-shadow(0 0 4px rgba(255, 138, 61, 0.5)); } .line.s1 { stroke: var(--s1); stroke-dasharray: 7 3; } .line.s2 { stroke: var(--s2); stroke-dasharray: 2 3; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; }
.legend i { display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; }
.legend .s0 { background: var(--s0); } .legend .s1 { background: var(--s1); } .legend .s2 { background: var(--s2); }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 13px; }
th, td { text-align: right; padding: 6px 4px; border-bottom: 1px solid var(--line); }
th:first-child { text-align: left; font-weight: 500; }
thead th { color: var(--muted); font-weight: 500; font-size: 12px; }

/* ---- dialogs ---- */
dialog.sheet {
  width: min(780px, calc(100vw - 24px)); max-height: min(880px, calc(100vh - 24px));
  padding: 0; border: 1px solid var(--line-2); background: var(--panel); color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 109, 16, 0.12), inset 0 2px 0 var(--accent);
}
dialog.sheet[open] { animation: sheet-in 0.3s var(--ease); }
dialog.sheet.small { width: min(520px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(4, 5, 7, 0.74); backdrop-filter: blur(4px); animation: fade 0.25s ease-out; }
.sheet-inner { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: min(880px, calc(100vh - 26px)); overflow: hidden; }
/* One scan line sweeps down as the sheet opens. It sits on the dialog itself, so editing
   a value (which redraws the contents) does not replay it. */
dialog.sheet { overflow: hidden; }
dialog.sheet[open]::before {
  content: ""; position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 60px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255, 109, 16, 0.12) 70%, rgba(255, 150, 80, 0.45)); animation: sweep 0.6s var(--ease) both;
}
.sheet-head, .sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.sheet-head { border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 20px; }
.sheet-foot { border-top: 1px solid var(--line); background: var(--bg-2); }
.sheet-body { padding: 14px 18px 18px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.sheet-body.swap > * { animation: rise 0.32s var(--ease) both; }
.eyebrow { font-size: 11px; letter-spacing: 0.2em; color: var(--accent); font-weight: 600; }
h3.sub { margin: 18px 0 2px; font-size: 13px; letter-spacing: 0.12em; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 4px; }

.picker { display: grid; gap: 10px; }
.search { padding: 10px 12px; font-size: 15px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: 13px; padding: 4px 10px; background: transparent; }
.pill.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 14px -2px rgba(255, 109, 16, 0.7); }
.list { display: grid; gap: 4px; }
.row.static, button.row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; align-items: center;
  text-align: left; font: inherit; color: var(--text); background: var(--panel-2);
  border: 1px solid transparent; border-left: 3px solid var(--q, var(--line-2)); padding: 8px 12px;
}
button.row { cursor: pointer; grid-template-columns: 44px minmax(0, 1fr) auto; transition: border-color 0.15s, background-color 0.15s, transform 0.2s var(--ease), padding 0.2s var(--ease); }
button.row.wide { grid-template-columns: 104px minmax(0, 1fr) auto; }
button.row:hover, button.row:focus-visible { border-color: var(--q, var(--accent)); background: #1f252d; transform: translateX(3px); }
.row-art { grid-row: 1 / span 2; width: 44px; height: 44px; color: var(--q, var(--muted)); opacity: 0.85; transition: transform 0.3s var(--ease), opacity 0.2s; }
.row.wide .row-art { width: 104px; height: 38px; }
button.row:hover .row-art { opacity: 1; transform: scale(1.08); }
.row-name { font: 600 16px var(--display); letter-spacing: 0.02em; color: var(--q, var(--text)); align-self: end; }
.row-meta { grid-column: 2 / -1; font-size: 12.5px; color: var(--muted); align-self: start; }
.row.static .row-meta { grid-column: 1 / -1; }
.row-extra { grid-row: 1; grid-column: 3; font-size: 12px; color: var(--text); opacity: 0.85; text-align: right; align-self: end; }
.row-actions { display: flex; gap: 6px; }

.item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; border-left: 3px solid var(--q); padding: 4px 0 4px 12px; }
.item-art { width: 76px; height: 76px; color: var(--q); filter: drop-shadow(0 0 14px color-mix(in srgb, var(--q) 35%, transparent)); }
.item-art.wide { width: 168px; height: 62px; }
.item h3 { font-size: 24px; font-weight: 700; line-height: 1.1; color: var(--q); letter-spacing: 0.02em; }
.item > .btn { align-self: start; }
.badge { font-size: 11px; letter-spacing: 0.18em; color: var(--q); font-weight: 600; }
.talent { background: var(--bg-2); border: 1px solid var(--line); border-left: 2px solid var(--accent); padding: 10px 12px; margin-top: 8px; display: grid; gap: 4px; }
.talent h4 { color: var(--accent); }
.talent p { font-size: 13px; color: #c9d0d8; white-space: pre-line; }
.talent p.note { color: var(--muted); }
.fixed { list-style: none; padding: 0; display: grid; gap: 4px; margin-top: 8px; }
.fixed li, .fixed-line { font-size: 13px; display: flex; gap: 10px; margin-top: 8px; }
.fixed li b { font: 600 13px var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); width: 96px; flex: none; }
.fixed-line span { color: var(--muted); font-size: 12px; }
.scroll { overflow-x: auto; }
.tiers th, .tiers td { white-space: nowrap; padding: 6px 8px; font-size: 12.5px; }

.foot { max-width: 1480px; margin: 0 auto; padding: 18px 24px 32px; color: var(--muted); font-size: 12.5px; }
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100;
  background: var(--text); color: var(--bg); padding: 9px 16px; font-weight: 600; border-left: 4px solid var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
#toast:not([hidden]) { animation: toast-in 0.3s var(--ease); }

/* ---- the first reveal, right after the start-up screen ---- */
.booting .board > *, .booting .stats > *, .booting .slot { animation: rise 0.55s var(--ease) both; }
.booting .board > :nth-child(2), .booting .stats > :nth-child(2) { animation-delay: 0.06s; }
.booting .board > :nth-child(3), .booting .stats > :nth-child(3) { animation-delay: 0.12s; }
.booting .board > :nth-child(4), .booting .stats > :nth-child(4) { animation-delay: 0.18s; }
.booting .board > :nth-child(n + 5), .booting .stats > :nth-child(n + 5) { animation-delay: 0.24s; }
.booting .slot:nth-child(2) { animation-delay: 0.08s; } .booting .slot:nth-child(3) { animation-delay: 0.16s; }
.booting .slot:nth-child(4) { animation-delay: 0.24s; } .booting .slot:nth-child(5) { animation-delay: 0.32s; }
.booting .slot:nth-child(6) { animation-delay: 0.4s; }
.booting .seg-arc { animation: arc-in 0.45s var(--ease) both; animation-delay: calc(var(--i) * 80ms + 0.35s); }
.booting .line { stroke-dasharray: 2400; animation: draw 1.4s 0.5s var(--ease) both; }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes pulse { from { opacity: 0.45; } to { opacity: 1; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(46, 230, 166, 0.55); } 100% { box-shadow: 0 0 0 9px rgba(46, 230, 166, 0); } }
@keyframes drift { to { transform: translate3d(40px, 40px, 0); } }
@keyframes breathe { from { opacity: 0.65; } to { opacity: 1; } }
@keyframes scan { from { background-position: -40% 0; } to { background-position: 140% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(20px) scale(0.985); } }
@keyframes sweep { from { transform: translateY(-60px); opacity: 1; } to { transform: translateY(900px); opacity: 0; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
@keyframes bump { 0% { color: var(--accent); text-shadow: 0 0 16px rgba(255, 109, 16, 0.9); } }
@keyframes arc-in { from { stroke-dasharray: 0 999; } }
@keyframes draw { from { stroke-dashoffset: 2400; } to { stroke-dashoffset: 0; } }
@keyframes light { to { background: var(--accent); box-shadow: 0 0 10px rgba(255, 109, 16, 0.8); } }
@keyframes boot-timeout { to { opacity: 0; visibility: hidden; } }

@media (max-width: 1020px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 14px 14px 8px; }
  .stats { position: static; max-height: none; overflow: visible; padding-right: 0; }
  .topbar { padding: 10px 14px; position: static; }
  .foot { padding: 18px 14px 28px; }
}
@media (max-width: 520px) {
  .slots { grid-template-columns: minmax(0, 1fr); }
  .slot { min-height: 0; }
  .grid2, .kv, .agent-stats { grid-template-columns: minmax(0, 1fr); }
  .agent-top { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; }
  .ring { width: 104px; } .ring-label b { font-size: 22px; }
  .item { grid-template-columns: minmax(0, 1fr) auto; } .item-art { display: none; }
  button.row.wide { grid-template-columns: 64px minmax(0, 1fr) auto; } .row.wide .row-art { width: 64px; height: 26px; }
  dialog.sheet { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; border: 0; }
  .sheet-inner { max-height: 100vh; height: 100vh; }
  .hero strong { font-size: 24px; }
}
/* Animations off: the visitor's system asks for less motion, or they switched them off. */
[data-motion="off"] *, [data-motion="off"] *::before, [data-motion="off"] *::after { animation: none !important; transition: none !important; }
[data-motion="off"] #boot, [data-motion="off"] dialog.sheet[open]::before, [data-motion="off"] .topbar::after { display: none; }

/* Calendar: the live clock under the season name */
.live-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.live-line .chip b { font-variant-numeric: tabular-nums; }

/* Escalation rotation */
.esc-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.esc-refresh-btn { flex: none; width: 36px; height: 36px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); color: var(--muted); cursor: pointer; transition: color 0.15s, border-color 0.15s, transform 0.3s; }
.esc-refresh-btn svg { width: 18px; height: 18px; }
.esc-refresh-btn:hover { color: var(--accent); border-color: var(--accent); }
.esc-refresh-btn.spinning svg { animation: esc-spin 0.6s ease; }
@keyframes esc-spin { to { transform: rotate(360deg); } }
.esc-stale-banner { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px; background: rgba(255, 109, 16, 0.08); border: 1px solid rgba(255, 109, 16, 0.25); font-size: 13px; color: var(--accent); }
.esc-stale-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: esc-pulse 1.5s ease-in-out infinite; }
@keyframes esc-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }
.info-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-top: 10px; border: 1px solid var(--line); }
.info-bar > div { display: grid; gap: 4px; padding: 12px 16px; border-right: 1px solid var(--line); }
.info-bar b { font: 700 19px var(--display); font-variant-numeric: tabular-nums; }
.info-bar .reset b { color: var(--accent); }
.rotation, .caches { display: grid; gap: 8px; }
.caches { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.rotation-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 16px; align-items: center; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line-2); transition: border-color 0.15s; }
.caches .rotation-row { grid-template-columns: minmax(0, 1fr) auto; }
.rotation-row:hover { border-left-color: var(--accent); }
.rotation-row h3 { font-size: 20px; font-weight: 700; letter-spacing: 0.02em; text-transform: none; margin-top: 2px; overflow-wrap: anywhere; }
.esc-mission { display: flex; align-items: center; gap: 10px; min-width: 0; }
.esc-faction-icon { width: 32px; height: 32px; flex: none; filter: brightness(0) invert(1); opacity: 0.7; }
.esc-loot-icon { width: 40px; height: 40px; flex: none; filter: brightness(0) invert(1); opacity: 0.85; }
.esc-cache-icon { width: 36px; height: 36px; flex: none; filter: brightness(0) invert(1); opacity: 0.7; }
.rotation-row .loot { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rotation-row .loot .art { width: 44px; height: 44px; flex: none; color: var(--accent); }
.rotation-row .loot .art.gun { width: 72px; height: 28px; }
.seen { display: grid; grid-template-columns: repeat(2, minmax(96px, auto)); gap: 18px; padding-left: 16px; border-left: 1px solid var(--line); }
.seen div { display: grid; gap: 2px; }
.seen b { font: 700 17px var(--display); white-space: nowrap; }
.seen .when-seen { color: var(--accent); }
@media (max-width: 760px) { .rotation-row, .caches .rotation-row { grid-template-columns: minmax(0, 1fr); } .seen { padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--line); } .esc-faction-icon { width: 26px; height: 26px; } }
button.loot { font: inherit; color: inherit; text-align: left; background: none; border: 1px solid transparent; padding: 6px 8px; margin: -6px -8px; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
button.loot:hover, button.loot:focus-visible { border-color: var(--accent); background: rgba(255, 109, 16, 0.08); outline: none; }
button.loot h3 { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.sheet-head .loot { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sheet-head .loot .art { width: 44px; height: 44px; flex: none; color: var(--accent); }
.rows { display: grid; margin: 0; }
.rows div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rows dt { color: var(--muted); font-size: 13px; white-space: nowrap; }
.rows dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.detail-kind { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.detail-title { margin: 16px 0 2px; font-size: 15px; color: var(--muted); }
.detail-talent { display: grid; gap: 3px; margin-top: 10px; padding: 10px 12px; background: var(--bg-2); border-left: 3px solid var(--accent); }
.detail-talent h4 { font: 700 17px var(--display); letter-spacing: 0.02em; }
.detail-talent .note { font-size: 13px; line-height: 1.5; }

/* Language switch */
.lang { display: flex; padding: 3px; border: 1px solid var(--line); background: var(--panel); }
.lang button { font: 600 13px var(--display); letter-spacing: 0.1em; color: var(--muted); background: none; border: 0; padding: 6px 10px; cursor: pointer; transition: color 0.15s, background-color 0.15s; }
.lang button:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.lang button[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); cursor: default; }
/* A French page waits for its translation, so English is never flashed first. */
html[data-lang="fr"]:not([data-ready]) { background: #0a0c0f; }
html[data-lang="fr"]:not([data-ready]) body { visibility: hidden; }
/* ---- ISAC Player Intelligence System ---- */

.isac-page { max-width: 1200px; }

.isac-search-panel { gap: 16px; }

.isac-logo-row {
  display: flex; align-items: center; gap: 16px;
}
.isac-eye {
  width: 64px; height: 64px; flex: none;
  filter: drop-shadow(0 0 12px rgba(255, 109, 16, 0.5));
}
.isac-eye circle:first-child { animation: spin 12s linear infinite; }
.isac-eye circle:nth-child(3) { animation: spin 6s linear infinite reverse; }
.isac-eye circle:last-child { animation: pulse 2s ease-in-out infinite alternate; }

.isac-title {
  font: 700 clamp(22px, 5vw, 32px) var(--display);
  letter-spacing: 0.12em; text-transform: uppercase; line-height: 1;
  color: var(--accent); text-shadow: 0 0 20px rgba(255, 109, 16, 0.4);
}
.isac-title::before { display: none; }
.isac-sub {
  font: 600 11px var(--display); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-top: 4px;
}

.isac-bar { display: grid; gap: 10px; }
.isac-platform { flex-wrap: wrap; }
.isac-input-wrap {
  display: flex; gap: 8px;
}
.isac-input-wrap input {
  flex: 1; font-size: 15px; padding: 10px 14px;
  background: var(--bg); border: 1px solid var(--line-2);
}
.isac-input-wrap input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 24px -4px rgba(255, 109, 16, 0.3);
}
.isac-input-wrap .btn { white-space: nowrap; padding: 10px 20px; font-size: 15px; }

/* Search results */
.isac-results { display: grid; gap: 4px; }
.isac-result {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: var(--bg-2); border: 1px solid var(--line); cursor: pointer;
  font: inherit; color: var(--text); text-align: left;
  transition: border-color 0.15s, background-color 0.15s;
}
.isac-result:hover { border-color: var(--accent); background: var(--panel-2); }
.isac-result img { width: 36px; height: 36px; border-radius: 50%; flex: none; background: var(--panel); }
.isac-result b { font: 600 15px var(--display); letter-spacing: 0.04em; }

/* Scanning animation */
.isac-scanning {
  display: flex; align-items: center; gap: 14px; padding: 20px 0;
  font: 600 14px var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.isac-scan-ring {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}

/* Empty state */
.isac-empty {
  display: grid; gap: 12px; justify-items: center; text-align: center; padding: 60px 20px;
  color: var(--muted); font-size: 15px;
}
.isac-empty svg { width: 100px; height: 100px; opacity: 0.5; }
.isac-empty svg circle:first-child { animation: spin 20s linear infinite; }
.isac-empty svg circle:nth-child(2) { animation: spin 14s linear infinite reverse; }

/* Agent ID card */
.isac-id-card { overflow: hidden; }
.isac-agent-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
}
.isac-avatar {
  width: 80px; height: 80px; border-radius: 50%; flex: none;
  border: 2px solid var(--accent); box-shadow: 0 0 20px rgba(255, 109, 16, 0.3);
  background: var(--panel);
}
.isac-agent-info { flex: 1; min-width: 200px; }
.isac-agent-name {
  font: 700 clamp(24px, 5vw, 36px) var(--display);
  letter-spacing: 0.06em; text-transform: uppercase; line-height: 1;
}
.isac-agent-name::before { display: none; }
.isac-agent-sub {
  font: 600 13px var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-top: 6px;
}

/* Badges — shared with other pages */
.badge {
  display: inline-block; font: 600 12px var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 10px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted);
}
.badge.spec { color: var(--he); border-color: rgba(247, 169, 40, 0.3); }
.badge.gs { color: var(--accent); border-color: rgba(255, 109, 16, 0.3); }
.badge.merit { color: var(--blue); border-color: rgba(69, 170, 242, 0.3); background: rgba(69, 170, 242, 0.06); }
.badge.boosted { color: var(--he); border-color: rgba(247, 169, 40, 0.4); background: rgba(247, 169, 40, 0.08); }
.badge.flagged-badge { color: var(--red); border-color: rgba(255, 82, 82, 0.4); background: rgba(255, 82, 82, 0.08); }

/* Merits section */
.isac-merits-section { gap: 10px; }
.isac-merits-head {
  display: flex; align-items: center; justify-content: space-between;
}
.isac-merits-label {
  font: 700 14px var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.isac-guide-link {
  font: 600 12px var(--display); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); background: none; border: 1px solid var(--accent); padding: 4px 12px;
  cursor: pointer; transition: background 0.15s;
}
.isac-guide-link:hover { background: var(--accent-soft); }
.isac-merits { display: flex; flex-wrap: wrap; gap: 4px; }

/* Verdict badge in ID card */
.isac-verdict-area {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px;
  font: 700 16px var(--display); letter-spacing: 0.14em; text-transform: uppercase;
  border: 2px solid; margin-left: auto;
}
.isac-verdict-icon { width: 24px; height: 24px; flex: none; }
.isac-verdict-heading { font: 700 15px var(--display); letter-spacing: 0.1em; }
.isac-verdict-area.legit {
  color: var(--ok); border-color: var(--ok); background: rgba(46, 230, 166, 0.08);
  box-shadow: 0 0 20px rgba(46, 230, 166, 0.15);
}
.isac-verdict-area.suspect {
  color: var(--he); border-color: var(--he); background: rgba(247, 169, 40, 0.08);
  box-shadow: 0 0 20px rgba(247, 169, 40, 0.15);
}
.isac-verdict-area.flagged {
  color: var(--red); border-color: var(--red); background: rgba(255, 82, 82, 0.08);
  box-shadow: 0 0 20px rgba(255, 82, 82, 0.15);
  animation: pulse 1.5s ease-in-out infinite alternate;
}

/* Quick stats bar */
.isac-quickstats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.isac-qs {
  display: grid; gap: 2px; padding: 12px 16px; background: var(--panel); text-align: center;
}
.isac-qs-label {
  font: 600 10px var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.isac-qs-val {
  font: 700 20px var(--display); letter-spacing: 0.04em; color: var(--text);
}
.isac-qs-val.accent { color: var(--accent); }

/* Tab bar */
.isac-tabs {
  display: flex; gap: 0; overflow-x: auto; border-bottom: 1px solid var(--line);
  scrollbar-width: none; -ms-overflow-style: none;
}
.isac-tabs::-webkit-scrollbar { display: none; }
.isac-tab {
  flex: none; font: 600 13px var(--display); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); background: none; border: none; border-bottom: 2px solid transparent;
  padding: 12px 20px; cursor: pointer; white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.isac-tab:hover { color: var(--text); }
.isac-tab.on {
  color: var(--accent); border-bottom-color: var(--accent);
}

/* Tab panels */
.isac-tab-panel { padding: 20px 0; }

/* Two-column layout */
.isac-cols {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px;
}
.isac-col-main, .isac-col-side { display: grid; gap: 16px; align-content: start; }

/* ---- Section panels (ProtoTrack style) ---- */
.isac-sec {
  background: var(--panel); border: 1px solid var(--line);
  margin-bottom: 16px;
}
.isac-sec-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.isac-si {
  width: 20px; height: 20px; flex: none; color: var(--accent); opacity: 0.8;
}
.isac-sec-htitle {
  font: 700 13px var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text); flex: 1;
}
.isac-sec-hsub {
  font: 600 11px var(--display); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-left: auto; white-space: nowrap;
}
.isac-sec-body {
  padding: 16px;
}

/* Sub-label inside section body */
.isac-sec-sublabel {
  display: block; font: 600 11px var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin: 16px 0 8px;
}

/* ---- Multi-section grids ---- */
.isac-three-sections {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: 16px;
}
.isac-two-sections {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
  margin-top: 16px;
}
.isac-three-sections > .isac-sec,
.isac-two-sections > .isac-sec { margin-bottom: 0; }

/* ---- Legend ---- */
.isac-legend {
  display: flex; align-items: center; gap: 16px; justify-content: center;
  padding: 10px 0 4px; flex-wrap: wrap;
}
.isac-legend-item {
  display: flex; align-items: center; gap: 6px;
  font: 600 11px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.isac-legend-dot {
  width: 10px; height: 10px; border-radius: 2px; flex: none;
}

/* ---- Progression boxes ---- */
.isac-prog-boxes {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}

/* Stat box */
.isac-stat-box {
  display: grid; gap: 2px; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line);
}
.isac-stat-box-label {
  font: 600 10px var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.isac-stat-box-val {
  font: 700 20px var(--display); letter-spacing: 0.04em; color: var(--text); line-height: 1;
}

/* Donut chart */
.isac-donut-wrap {
  display: flex; justify-content: center; padding: 8px 0;
}
.isac-donut { width: 160px; height: 160px; }
.isac-donut-pct {
  font: 700 28px var(--display); fill: var(--text); letter-spacing: 0.02em;
}
.isac-donut-label {
  font: 600 10px var(--display); fill: var(--muted); letter-spacing: 0.16em;
}
.isac-donut-arc {
  transition: stroke-dasharray 0.8s var(--ease);
}

/* Hit stats grid */
.isac-hit-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}

/* Faction cards */
.isac-faction-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.isac-faction-card {
  display: grid; gap: 6px; justify-items: center; text-align: center;
  padding: 16px 10px; background: var(--bg-2); border: 1px solid var(--line);
  border-bottom: 3px solid var(--fc, var(--line));
}
.isac-fc-icon-wrap { width: 36px; height: 36px; }
.isac-fc-icon { width: 100%; height: 100%; }
.isac-fc-name {
  font: 600 11px var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.isac-fc-kills {
  font: 700 18px var(--display); letter-spacing: 0.04em; color: var(--text);
}

/* Time in field */
.isac-time-list { display: grid; gap: 6px; }
.isac-time-entry {
  display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 14px; background: var(--bg-2); border: 1px solid var(--line);
}
.isac-time-dot {
  width: 10px; height: 10px; border-radius: 2px; flex: none;
}
.isac-time-label {
  font: 600 13px var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.isac-time-val {
  font: 700 15px var(--display); letter-spacing: 0.04em; color: var(--text); text-align: right;
  font-variant-numeric: tabular-nums;
}

/* KV rows */
.isac-kv-list { display: grid; gap: 6px; }
.isac-kv {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line);
}
.isac-kv-label {
  font: 600 13px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.isac-kv-val {
  font: 700 15px var(--display); letter-spacing: 0.04em; color: var(--text);
}
.isac-mono {
  font-family: monospace; font-size: 11px; word-break: break-all; color: var(--muted);
}

/* ---- ISAC Profile tab ---- */
.isac-prof-header {
  margin-bottom: 20px;
}
.isac-prof-title {
  font: 700 22px var(--display); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin: 0;
}
.isac-prof-title::before { display: none; }
.isac-prof-sub {
  font: 600 11px var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-top: 4px;
}
.isac-prof-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.isac-prof-box {
  display: grid; gap: 6px; padding: 20px; background: var(--bg-2); border: 1px solid var(--line);
}
.isac-prof-box-label {
  font: 600 11px var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.isac-prof-box-val {
  font: 700 18px var(--display); letter-spacing: 0.04em; color: var(--text); word-break: break-all;
}

/* ---- Anti-cheat tab ---- */
.isac-ac-head-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.isac-ac-head-left {
  display: flex; align-items: center; gap: 10px;
}
.isac-ac-heading {
  font: 700 18px var(--display); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text); margin: 0;
}
.isac-ac-heading::before { display: none; }

/* Anti-cheat verdict box */
.isac-ac-verdict-box {
  display: flex; align-items: flex-start; gap: 14px; padding: 20px 24px;
  border: 2px solid; margin-bottom: 20px;
}
.isac-ac-verdict-icon { width: 32px; height: 32px; flex: none; margin-top: 2px; }
.isac-ac-verdict-heading {
  font: 700 20px var(--display); letter-spacing: 0.1em; text-transform: uppercase;
  display: block;
}
.isac-ac-verdict-desc {
  font: 400 13px/1.6 var(--body, var(--display)); color: inherit; opacity: 0.8;
  margin: 6px 0 0;
}
.isac-ac-verdict-box.legit {
  color: var(--ok); border-color: var(--ok); background: rgba(46, 230, 166, 0.06);
}
.isac-ac-verdict-box.suspect {
  color: var(--he); border-color: var(--he); background: rgba(247, 169, 40, 0.06);
}
.isac-ac-verdict-box.flagged {
  color: var(--red); border-color: var(--red); background: rgba(255, 82, 82, 0.06);
  animation: pulse 1.5s ease-in-out infinite alternate;
}

/* Anti-cheat 4-column card rows */
.isac-ac-row4 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-bottom: 12px;
}
.isac-ac-card {
  display: grid; gap: 4px; padding: 16px; background: var(--bg-2); border: 1px solid var(--line);
  text-align: center;
}
.isac-ac-card.yn {
  justify-items: center; gap: 8px; padding: 20px 16px;
}
.isac-ac-card-label {
  font: 600 10px var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.isac-ac-card-val {
  font: 700 22px var(--display); letter-spacing: 0.04em; color: var(--text);
}
.isac-ac-card-val.red { color: var(--red); }
.isac-ac-card-val.amber { color: var(--he); }
.isac-ac-card-val.green { color: var(--ok); }
.isac-ac-card-sub {
  font: 500 10px var(--body); color: var(--muted); letter-spacing: 0.02em;
}
.isac-ac-metrics-head {
  margin-top: 16px; margin-bottom: 8px;
}
.isac-ac-metrics-head h4 {
  font: 600 13px var(--display); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin: 0;
}
.isac-ac-metrics-head h4::before { display: none; }

/* YES / NO badges */
.isac-yn {
  display: inline-block; font: 700 16px var(--display); letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 18px; border: 2px solid;
}
.isac-yn.yes {
  color: var(--ok); border-color: var(--ok); background: rgba(46, 230, 166, 0.1);
}
.isac-yn.no {
  color: var(--red); border-color: var(--red); background: rgba(255, 82, 82, 0.1);
}

/* Anti-cheat metrics table */
.isac-ac-table-wrap {
  overflow-x: auto; margin-top: 16px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.isac-ac-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
  font-family: var(--display);
}
.isac-ac-table th {
  font: 600 10px var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); padding: 10px 12px; text-align: left;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.isac-ac-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums; color: var(--text);
  white-space: nowrap;
}
.isac-ac-table tbody tr:hover { background: var(--bg-2); }

/* Flag badges in table */
.isac-flag {
  display: inline-block; font: 600 10px var(--display); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 2px 8px; border: 1px solid;
}
.isac-flag.flag-normal {
  color: var(--ok); border-color: rgba(46, 230, 166, 0.4); background: rgba(46, 230, 166, 0.08);
}
.isac-flag.flag-mild {
  color: var(--he); border-color: rgba(247, 169, 40, 0.4); background: rgba(247, 169, 40, 0.08);
}
.isac-flag.flag-extreme {
  color: var(--red); border-color: rgba(255, 82, 82, 0.4); background: rgba(255, 82, 82, 0.08);
}

/* Rule banner */
.isac-ac-rule-banner {
  margin: 12px 0; padding: 14px 16px; border-left: 3px solid var(--red);
  background: rgba(255, 82, 82, 0.06); border-radius: 0 6px 6px 0;
}
.isac-ac-rule-label {
  font: 700 11px var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--red); margin-bottom: 6px;
}
.isac-ac-rule-desc {
  font: 400 13px/1.6 var(--body); color: var(--text); margin: 0;
}
.isac-ac-rule-desc code {
  font: 500 12px/1 monospace; background: var(--bg-2); padding: 2px 6px;
  border-radius: 3px; color: var(--accent);
}

/* Model score grid */
.isac-ac-model-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 12px;
}
@media (max-width: 900px) { .isac-ac-model-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .isac-ac-model-grid { grid-template-columns: repeat(2, 1fr); } }

/* Model score progress bar */
.isac-ac-model-bar-wrap { margin: 8px 0 20px; }
.isac-ac-model-bar {
  position: relative; height: 10px; background: var(--bg-2); border-radius: 5px; overflow: visible;
}
.isac-ac-model-fill {
  height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, var(--ok), var(--he), var(--red));
  transition: width 0.4s ease;
}
.isac-ac-model-cutoff {
  position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--fg);
  transform: translateX(-1px);
}
.isac-ac-model-cutoff span {
  position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%);
  font: 600 9px var(--display); color: var(--muted); letter-spacing: 0.08em;
  white-space: nowrap;
}
.isac-ac-model-bar-labels {
  display: flex; justify-content: space-between; margin-top: 6px;
  font: 500 10px var(--display); color: var(--muted); letter-spacing: 0.06em;
}

/* Merit guide items */
.isac-merit-item {
  padding: 10px 14px; border-left: 3px solid var(--accent);
  background: var(--bg-2); margin-bottom: 8px;
}
.isac-merit-item b {
  font: 700 14px var(--display); letter-spacing: 0.06em; display: block; margin-bottom: 2px;
}
.isac-merit-item p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .isac-cols { grid-template-columns: 1fr; }
  .isac-faction-cards { grid-template-columns: repeat(2, 1fr); }
  .isac-three-sections { grid-template-columns: 1fr; }
  .isac-two-sections { grid-template-columns: 1fr; }
  .isac-ac-row4 { grid-template-columns: repeat(2, 1fr); }
  .isac-prog-boxes { grid-template-columns: repeat(2, 1fr); }
  .isac-prof-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .isac-logo-row { flex-direction: column; text-align: center; }
  .isac-eye { width: 48px; height: 48px; }
  .isac-input-wrap { flex-direction: column; }
  .isac-agent-row { flex-direction: column; text-align: center; }
  .isac-verdict-area { margin: 0 auto; }
  .isac-quickstats { grid-template-columns: repeat(2, 1fr); }
  .isac-faction-cards { grid-template-columns: 1fr 1fr; }
  .isac-ac-row4 { grid-template-columns: 1fr 1fr; }
  .isac-prog-boxes { grid-template-columns: 1fr; }
  .isac-tab { padding: 10px 14px; font-size: 12px; }
}

/* ---- Vendor Reset Tracker v4 — sidebar + card grid ---- */

/* ---- Layout: sidebar + main ---- */
.vdr-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 60px);
  position: relative;
}

/* ---- Sidebar ---- */
.vdr-sidebar {
  position: sticky; top: 52px; align-self: start;
  height: calc(100vh - 52px); overflow-y: auto;
  background: var(--panel); border-right: 1px solid var(--line);
  padding: 0; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.vdr-sidebar-title {
  font: 700 18px var(--display); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text); padding: 20px 16px 12px;
}
.vdr-sidebar-title::before { display: none; }
.vdr-sidebar-nav { display: grid; gap: 0; }

.vdr-sidebar-btn {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 16px; border: none; background: none; text-align: left;
  cursor: pointer; border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  width: 100%;
}
.vdr-sidebar-btn:hover { background: rgba(255, 255, 255, 0.04); }
.vdr-sidebar-btn.active {
  background: rgba(255, 109, 16, 0.08);
  border-left-color: var(--accent);
}
.vdr-sidebar-btn-top {
  display: flex; align-items: center; gap: 8px;
}
.vdr-sidebar-btn-name {
  font: 600 14px var(--display); color: var(--text);
  letter-spacing: 0.02em;
}
.vdr-sidebar-btn-loc {
  font: 500 9px var(--display); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px; border-radius: 3px; white-space: nowrap;
}
.vdr-sidebar-btn.active .vdr-sidebar-btn-name { color: var(--accent); }
.vdr-sidebar-btn-sub {
  font: 500 11px var(--body); color: var(--muted);
}
.vdr-sidebar-btn.dz .vdr-sidebar-btn-name { color: var(--red); }
.vdr-sidebar-btn.dz .vdr-sidebar-btn-loc { color: var(--red); background: rgba(255, 82, 82, 0.12); }
.vdr-sidebar-btn.dz.active .vdr-sidebar-btn-name { color: var(--red); }
.vdr-sidebar-btn.dz.active { border-left-color: var(--red); background: rgba(255, 82, 82, 0.08); }

/* ---- Mobile sidebar toggle ---- */
.vdr-sidebar-toggle {
  display: none; position: fixed; bottom: 20px; left: 20px; z-index: 30;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); border: none; color: var(--bg); cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 109, 16, 0.4);
}
.vdr-sidebar-toggle svg { width: 20px; height: 20px; }

/* ---- Main content ---- */
.vdr-main {
  padding: 20px 24px;
  min-width: 0;
}

/* Top bar */
.vdr-top-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 20px;
}
.vdr-top-left { display: flex; align-items: baseline; gap: 14px; }
.vdr-view-title {
  font: 700 clamp(20px, 4vw, 28px) var(--display);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); line-height: 1;
}
.vdr-view-title::before { display: none; }
.vdr-offer-count {
  font: 500 14px var(--body); color: var(--muted);
}
.vdr-timer-area { display: grid; gap: 2px; text-align: right; }
.vdr-timer-label {
  font: 600 10px var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.vdr-countdown {
  font-family: var(--display); color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.vdr-countdown b { font-size: 20px; font-weight: 700; line-height: 1; }
.vdr-countdown i {
  font-style: normal; font-size: 10px; font-weight: 600; text-transform: uppercase;
  margin-right: 2px; color: var(--muted);
}

/* ---- Filters ---- */
.vdr-filters {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: end;
  margin-bottom: 20px; padding: 16px 20px;
  background: var(--panel); border: 1px solid var(--line);
}
.vdr-search-wrap { flex: 1; min-width: 220px; }
.vdr-search-wrap input {
  width: 100%; box-sizing: border-box;
  font: 400 14px var(--body); padding: 10px 14px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 0;
  outline: none; transition: border-color 0.15s;
}
.vdr-search-wrap input:focus { border-color: var(--accent); }
.vdr-search-wrap input::placeholder { color: var(--muted); }
.vdr-type-filter { display: grid; gap: 4px; min-width: 160px; }
.vdr-filter-label {
  font: 600 10px var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.vdr-type-filter select {
  font: 400 14px var(--body); padding: 10px 14px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 0;
  outline: none; cursor: pointer; appearance: auto;
}
.vdr-type-filter select:focus { border-color: var(--accent); }

/* Must Buy filter */
.vdr-must-buy-filter {
  display: flex; align-items: center; gap: 8px;
  font: 500 13px var(--body); color: var(--muted);
  cursor: pointer; padding-bottom: 2px; user-select: none;
}
.vdr-must-buy-filter input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--accent);
  cursor: pointer;
}
.vdr-must-buy-filter:hover span { color: var(--text); }

/* ---- States ---- */
.vdr-loading {
  display: flex; align-items: center; gap: 14px; justify-content: center; padding: 60px 20px;
  font: 600 13px var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.vdr-loading[hidden] { display: none; }
.vdr-status { text-align: center; padding: 40px 20px; color: var(--muted); }
.vdr-status[hidden] { display: none; }

/* ---- Section headers (Must Buy / All Items) ---- */
.vdr-section-header {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 0 10px; margin-top: 4px;
}
.vdr-section-header--regular { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 24px; }
.vdr-section-icon { font-size: 20px; line-height: 1; }
.vdr-section-title {
  font: 700 18px var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text);
}
.vdr-section-title::before { display: none; }
.vdr-section-count {
  font: 500 13px var(--body); color: var(--muted);
}

/* ---- Card grid ---- */
.vdr-grid { }
.vdr-grid-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ---- Item card ---- */
.vdr-card {
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.vdr-card:hover {
  border-color: var(--line-2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.vdr-card--must-buy {
  border-color: rgba(255, 109, 16, 0.3);
}
.vdr-card--must-buy:hover {
  border-color: rgba(255, 109, 16, 0.5);
  box-shadow: 0 4px 24px rgba(255, 109, 16, 0.15);
}

/* Card header */
.vdr-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.vdr-card-head-left { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.vdr-card-head-right { display: flex; align-items: center; gap: 8px; flex: none; }
.vdr-card-head-text { flex: 1; min-width: 0; }
.vdr-card-icon {
  width: 36px; height: 36px; object-fit: contain; flex: none;
  filter: brightness(0) invert(1); opacity: 0.85;
}
.vdr-card-brand-icon {
  width: 28px; height: 28px; object-fit: contain; flex: none;
  filter: brightness(0) invert(1); opacity: 0.6;
}
.vdr-card-name {
  font: 700 15px/1.25 var(--display); letter-spacing: 0.02em;
  display: block; word-break: break-word;
}
.vdr-card-name::before { display: none; }
.vdr-card-type {
  font: 500 11px var(--display); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); display: block; margin-top: 3px;
}
.vdr-card-badge {
  font: 700 9px var(--display); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 3px; white-space: nowrap; flex: none; margin-top: 2px;
}
.vdr-must-buy-badge {
  color: #fff; background: var(--accent); border: 1px solid var(--accent);
}
.vdr-card-badge.q-he { color: var(--he); background: rgba(247, 169, 40, 0.12); border: 1px solid rgba(247, 169, 40, 0.25); }
.vdr-card-badge.q-named { color: var(--he); background: rgba(247, 169, 40, 0.15); border: 1px solid rgba(247, 169, 40, 0.3); }
.vdr-card-badge.q-exotic { color: var(--red); background: rgba(255, 82, 82, 0.12); border: 1px solid rgba(255, 82, 82, 0.25); }
.vdr-card-badge.q-gearset { color: var(--ok); background: rgba(46, 230, 166, 0.12); border: 1px solid rgba(46, 230, 166, 0.25); }
.vdr-card-badge.mod-off { color: var(--red); background: rgba(255, 82, 82, 0.12); border: 1px solid rgba(255, 82, 82, 0.25); }
.vdr-card-badge.mod-def { color: var(--blue); background: rgba(69, 170, 242, 0.12); border: 1px solid rgba(69, 170, 242, 0.25); }
.vdr-card-badge.mod-util { color: var(--he); background: rgba(247, 169, 40, 0.12); border: 1px solid rgba(247, 169, 40, 0.25); }
.vdr-card-badge.mod-skill { color: var(--skill); background: rgba(255, 210, 63, 0.12); border: 1px solid rgba(255, 210, 63, 0.25); }

/* Card body */
.vdr-card-body {
  flex: 1; display: flex; flex-direction: column; gap: 0;
  padding: 0 16px;
}

/* Stat row with bar */
.vdr-stat-row {
  display: grid; gap: 4px; padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.vdr-stat-row:last-child { border-bottom: none; }
.vdr-stat-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.vdr-stat-label {
  font: 500 13px var(--body); color: var(--muted);
}
.vdr-stat-val {
  font: 700 14px var(--display); font-variant-numeric: tabular-nums;
  color: var(--red);
}
.vdr-stat-val.orange { color: var(--accent); }
.vdr-stat-val.green { color: var(--ok); }
.vdr-stat-val.yellow { color: var(--he); }
.vdr-stat-val.blue { color: var(--blue); }
.vdr-stat-bar {
  height: 3px; background: rgba(255, 255, 255, 0.08); border-radius: 2px; overflow: hidden;
}
.vdr-stat-bar i {
  display: block; height: 100%; border-radius: 2px;
  background: var(--red); box-shadow: 0 0 6px rgba(255, 82, 82, 0.3);
}
.vdr-stat-bar.orange i { background: var(--accent); box-shadow: 0 0 6px rgba(255, 109, 16, 0.3); }
.vdr-stat-bar.green i { background: var(--ok); box-shadow: 0 0 6px rgba(46, 230, 166, 0.3); }
.vdr-stat-bar.yellow i { background: var(--he); box-shadow: 0 0 6px rgba(247, 169, 40, 0.3); }
.vdr-stat-bar.blue i { background: var(--blue); box-shadow: 0 0 6px rgba(69, 170, 242, 0.3); }

/* Library max meta */
.vdr-stat-meta {
  font: 400 11px var(--body); color: var(--muted); opacity: 0.7;
}

/* Talent section */
.vdr-card-talent {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.vdr-talent-icon {
  width: 28px; height: 28px; flex: none; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.06); border-radius: 4px;
  font-size: 16px; margin-top: 1px;
}
.vdr-talent-text { flex: 1; min-width: 0; }
.vdr-talent-name {
  font: 700 13px var(--display); letter-spacing: 0.02em; color: var(--text);
  display: block;
}
.vdr-talent-desc-toggle {
  font: 500 11px var(--body); color: var(--accent); cursor: pointer;
  background: none; border: none; padding: 2px 0; display: block; margin-top: 2px;
  text-align: left;
}
.vdr-talent-desc-toggle:hover { text-decoration: underline; }
.vdr-talent-desc {
  font: 400 12px var(--body); color: var(--muted); line-height: 1.5;
  padding: 6px 0 2px; display: none;
}
.vdr-talent-desc.open { display: block; }

/* Price */
.vdr-card-price {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 8px 0;
}
.vdr-price-label {
  font: 500 12px var(--body); color: var(--muted);
}
.vdr-price-val {
  font: 600 13px var(--display); color: var(--he); font-variant-numeric: tabular-nums;
}

/* Card footer */
.vdr-card-foot {
  padding: 12px 16px; margin-top: auto;
  border-top: 1px solid var(--line);
}
.vdr-card-vendor-btn {
  display: block; width: 100%; padding: 9px 0; text-align: center;
  font: 600 12px var(--display); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line);
  border-radius: 4px; transition: background 0.15s, color 0.15s;
}
.vdr-card-vendor-btn:hover {
  background: rgba(255, 109, 16, 0.08); color: var(--accent);
  border-color: rgba(255, 109, 16, 0.3);
}

/* Expertise badge */
.vdr-card-expertise {
  margin: 8px 16px 0; padding: 5px 10px; text-align: center;
  font: 600 11px var(--display); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); background: rgba(255, 109, 16, 0.08);
  border: 1px solid rgba(255, 109, 16, 0.2); border-radius: 4px;
}

/* Expandable extras (weapon base values, set bonuses) */
.vdr-card-extra { margin: 8px 16px 0; }
.vdr-extra-toggle {
  display: block; width: 100%; text-align: left; padding: 6px 0;
  font: 500 12px var(--body); color: var(--accent); cursor: pointer;
  background: none; border: none; border-top: 1px solid var(--line);
}
.vdr-extra-toggle:hover { color: #ff8a3d; }
.vdr-extra-content {
  display: none; padding: 4px 0 6px;
}
.vdr-extra-content.open { display: block; }
.vdr-base-row {
  display: flex; justify-content: space-between; padding: 3px 0;
  font: 400 12px var(--body); color: var(--muted);
}
.vdr-base-row span:last-child { color: var(--fg); font-variant-numeric: tabular-nums; }

/* ---- Responsive ---- */
@media (max-width: 1200px) {
  .vdr-grid-section { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .vdr-layout { grid-template-columns: 1fr; }
  .vdr-sidebar {
    position: fixed; left: -280px; top: 0; bottom: 0; z-index: 40;
    width: 260px; height: 100vh;
    transition: left 0.25s ease;
    box-shadow: none;
  }
  .vdr-sidebar.open { left: 0; box-shadow: 4px 0 30px rgba(0, 0, 0, 0.6); }
  .vdr-sidebar-toggle { display: grid; place-items: center; }
  .vdr-grid-section { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .vdr-grid-section { grid-template-columns: 1fr; gap: 10px; }
  .vdr-main { padding: 14px 12px; }
  .vdr-filters { flex-direction: column; padding: 12px; }
  .vdr-search-wrap { min-width: 0; width: 100%; }
  .vdr-type-filter { min-width: 0; width: 100%; }
  .vdr-must-buy-filter { width: 100%; }
  .vdr-top-bar { flex-direction: column; align-items: flex-start; }
}
