/* =====================================================================
 * RotMG chrome. The game's UI has no rounded corners and no flat 1px
 * outlines — every surface is a square panel with a 2px bevel: a lit edge
 * top-left, a shadowed edge bottom-right. Two variables drive all of it:
 *   --bev-hi  the lit edge      --bev-lo  the shadowed edge
 * Raised (panels, buttons, chips):  border-color: hi lo lo hi
 * Sunken (inputs, slots, bars):     border-color: lo hi hi lo
 * They're per-theme because the light schemes need a much stronger
 * highlight and a softer shadow to read as bevels rather than as dirt.
 * ===================================================================== */
:root {
  /* theme-independent */
  --green: #6fcf6f;
  --red: #e06666;
  --blue: #6fb0e0;
  /* item-tier colours — RealmEye/in-game convention */
  --t-low: #cfd6de;    /* T0–T7   plain white-silver */
  --t-high: #ffd76a;   /* T8+     gold */
  --t-ut: #ff9d3d;     /* UT      orange */
  --t-st: #6fe3e1;     /* ST      cyan */
  /* --gold is the accent for FILLS (bars, curve, dots); --gold-ink is the same
     accent for TEXT. They diverge on the light schemes, where a bright accent
     is fine as a bar but unreadable as 12px type. */
  --gold-ink: var(--gold);
  font-size: 15px;

  /* bevels (dark schemes) */
  --bev-hi: rgba(255, 255, 255, 0.13);
  --bev-lo: rgba(0, 0, 0, 0.62);
  --slot: #100d09;      /* inventory-slot well: darker than the page */
  /* The bevel itself. Drawn as INSET shadows, not thicker borders, so turning a
     surface raised/sunken costs no layout: the 1px outline and the box size are
     untouched, which is what keeps the dense sidebar from reflowing. */
  --raise: inset 2px 2px 0 var(--bev-hi), inset -2px -2px 0 var(--bev-lo);
  --sink:  inset 2px 2px 0 var(--bev-lo), inset -2px -2px 0 var(--bev-hi);

  /* default scheme — Amber (--gold is "the accent", whatever the hue) */
  --bg: #14110c;
  --panel: #1f1a12;
  --panel-2: #2a2318;
  --ink: #ece3d0;
  --muted: #9c8f74;
  --gold: #e8b34a;
  --gold-dim: #b3892f;
  --border: #3a3122;
  --glow: #221b11;
  --topbar-bg: rgba(31, 26, 18, 0.92);
  --accent-glow: rgba(232, 179, 74, 0.35);
}
/* ---- alternate colour schemes (set via data-theme on <html>) ---- */
:root[data-theme="ocean"] {
  --bg: #0c1016; --panel: #131b25; --panel-2: #1c2735; --ink: #dce7f2; --muted: #7e91a6;
  --gold: #46b8e6; --gold-dim: #2b7ea8; --border: #243444; --glow: #122232;
  --topbar-bg: rgba(19, 27, 37, 0.92); --accent-glow: rgba(70, 184, 230, 0.35);
  --slot: #070a0e;
}
:root[data-theme="forest"] {
  --bg: #0d130f; --panel: #151d17; --panel-2: #1f2b22; --ink: #dfe9de; --muted: #83967e;
  --gold: #5ccf7c; --gold-dim: #399653; --border: #243528; --glow: #152a1b;
  --topbar-bg: rgba(21, 29, 23, 0.92); --accent-glow: rgba(92, 207, 124, 0.32);
  --slot: #070b08;
}
:root[data-theme="ember"] {
  --bg: #150f0f; --panel: #211616; --panel-2: #2e2020; --ink: #f1dede; --muted: #a58a8a;
  --gold: #e56a52; --gold-dim: #a83f30; --border: #3a2726; --glow: #2a1512;
  --topbar-bg: rgba(33, 22, 22, 0.92); --accent-glow: rgba(229, 106, 82, 0.35);
  --slot: #0d0808;
}
:root[data-theme="amethyst"] {
  --bg: #120f18; --panel: #1b1626; --panel-2: #261f37; --ink: #e7dff2; --muted: #948aa8;
  --gold: #a97ee8; --gold-dim: #7a4fb8; --border: #2f2642; --glow: #211534;
  --topbar-bg: rgba(27, 22, 38, 0.92); --accent-glow: rgba(169, 126, 232, 0.35);
  --slot: #0b0910;
}
:root[data-theme="slate"] {
  --bg: #0f1114; --panel: #171a1f; --panel-2: #222730; --ink: #e3e7ed; --muted: #8892a0;
  --gold: #8aa9cf; --gold-dim: #587ba3; --border: #2a2f37; --glow: #1a2230;
  --topbar-bg: rgba(23, 26, 31, 0.92); --accent-glow: rgba(138, 169, 207, 0.30);
  --slot: #08090b;
}
:root[data-theme="rose"] {
  --bg: #160f13; --panel: #21171c; --panel-2: #2f2029; --ink: #f2dde7; --muted: #a88a99;
  --gold: #e678a6; --gold-dim: #b04b78; --border: #3a2732; --glow: #2a1520;
  --topbar-bg: rgba(33, 23, 28, 0.92); --accent-glow: rgba(230, 120, 166, 0.35);
  --slot: #0d080b;
}
/* ---- light schemes (panels lighter than the page; darker ink + accents;
   semantic +/- colours darkened so stat chips stay legible on a light bg) ---- */
:root[data-theme="parchment"] {
  --bg: #e8dfcb; --panel: #f4eee0; --panel-2: #dccfb2; --ink: #38301f; --muted: #857857;
  --gold: #a9760f; --gold-dim: #855a0b; --border: #cabf9d; --glow: #f2ecdb;
  --topbar-bg: rgba(244, 238, 224, 0.9); --accent-glow: rgba(169, 118, 15, 0.20);
  --green: #2f9142; --red: #c0453e; --blue: #2d72b0;
  --bev-hi: rgba(255,255,255,0.95); --bev-lo: rgba(92,74,40,0.40); --slot: #d3c6a6;
  --gold-ink: #6b4700; --muted: #6b6042;
  --t-low: #3f3a2a; --t-high: #6b4700; --t-ut: #7d3405; --t-st: #0a5250;
}
:root[data-theme="daylight"] {
  --bg: #e6eaf0; --panel: #f7f9fc; --panel-2: #d9e0ea; --ink: #232c3a; --muted: #64707f;
  --gold: #2777bd; --gold-dim: #1c5a91; --border: #c8d1dd; --glow: #eef2f8;
  --topbar-bg: rgba(247, 249, 252, 0.9); --accent-glow: rgba(39, 119, 189, 0.20);
  --green: #2f9142; --red: #c94b45; --blue: #2777bd;
  --bev-hi: rgba(255,255,255,0.95); --bev-lo: rgba(40,55,75,0.32); --slot: #ccd5e1;
  --gold-ink: #1b4f7d; --muted: #525c69;
  --t-low: #2b3340; --t-high: #5f4600; --t-ut: #7c3300; --t-st: #08544f;
}
:root[data-theme="sage"] {
  --bg: #e2e8dd; --panel: #f1f4ec; --panel-2: #d3dcc8; --ink: #2a3324; --muted: #6c7862;
  --gold: #3f8f52; --gold-dim: #2f6d3e; --border: #c6d0b9; --glow: #edf1e7;
  --topbar-bg: rgba(241, 244, 236, 0.9); --accent-glow: rgba(63, 143, 82, 0.20);
  --green: #2f8f45; --red: #c0453e; --blue: #2d72b0;
  --bev-hi: rgba(255,255,255,0.95); --bev-lo: rgba(45,60,40,0.32); --slot: #c9d3bd;
  --gold-ink: #2c5c39; --muted: #59654f;
  --t-low: #2b3428; --t-high: #5a4300; --t-ut: #743206; --t-st: #095150;
}

* { box-sizing: border-box; }

/* =====================================================================
 * CHROME — which surfaces are raised and which are sunken.
 * Grouped here (rather than repeated per component) so the whole UI's
 * depth model is one thing you can read. Components that draw their own
 * box-shadow (.combo-list, .bar-track, .theme-swatch) are handled at
 * their own rule instead, since they need the bevel COMBINED with it.
 * ===================================================================== */
.panel, .build-card, .result-strip, .sbox, .chip, .istat, .ench-block, .ench-awk,
.minion, .toggle, .mini-btn, .btab, .chip-toggle span, .data-badge, .imp-char,
.dps-badge {
  box-shadow: var(--raise);
}
input[type="number"], input[type="text"], textarea, select, .gear-box, .class-icon-lg,
.build-name, .btab-rename, .imp-code, .istat-chip, .minion-stats {
  box-shadow: var(--sink);
}
/* Buttons physically press in: the bevel flips and the face drops a pixel. */
.toggle:active, .mini-btn:active, .btab:active, .chip-toggle:active span, .imp-char:active {
  box-shadow: var(--sink);
  transform: translateY(1px);
}
/* Focus reads as a lit gold edge rather than a browser outline. */
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

body {
  margin: 0;
  /* the page glow, over a faint 4px pixel weave — texture at a sprite's scale */
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.045) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.045) 0 1px, transparent 1px 4px),
    radial-gradient(1400px 700px at 70% -10%, var(--glow), var(--bg));
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.45;
}

/* Pixel art must never be smoothed, and in game every sprite carries a hard
   1px black outline — rebuild it with four offset drop-shadows. */
.item-icon, .class-icon, .class-icon-lg, .gear-box img {
  image-rendering: pixelated;
  filter:
    drop-shadow(1px 0 0 rgba(0,0,0,0.9)) drop-shadow(-1px 0 0 rgba(0,0,0,0.9))
    drop-shadow(0 1px 0 rgba(0,0,0,0.9)) drop-shadow(0 -1px 0 rgba(0,0,0,0.9));
}

/* Chunky square checkbox with a gold tick — the native control is round-ish
   and themed by the OS, which broke the illusion everywhere it appeared. */
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; flex: none; margin: 0 2px 0 0;
  background: var(--slot); border: 1px solid var(--border);
  box-shadow: var(--sink); cursor: pointer; position: relative;
}
input[type="checkbox"]:checked { background: color-mix(in srgb, var(--gold) 22%, var(--slot)); }
input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid var(--gold); border-width: 0 2px 2px 0; transform: rotate(40deg);
}

/* Native number spinners render as bright OS-themed boxes that read as a web
   form on every dark scheme — drop them. Arrow keys still step the value. */
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Chunky square scrollbars (Firefox + WebKit). */
* { scrollbar-width: thin; scrollbar-color: var(--gold-dim) var(--slot); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--slot); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border: 1px solid var(--border); box-shadow: var(--raise); }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 22px;
  background: var(--topbar-bg);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}
.brand { display: flex; align-items: center; gap: 10px; }
/* The logo is inlined into index.html by embed-logo.py (see its docstring: a
   referenced SVG can't read these vars, so it could never follow the theme).
   Every fill inside derives from --logo-accent; --gold-ink rather than --gold
   because the wordmark is lettering, and the bright fill accent is illegible as
   type on the three light schemes. Height only — the viewBox keeps the ratio. */
/* 44px is deliberate: the art is a 9.2-unit pixel grid, so this lands ~2.0 device
   px per cell and the blocks stay square. Dropping to ~30px puts it on a 1.4x grid,
   which softens every edge and makes the THEORYCRAFTER subtitle mush. */
.brand-logo { height: 44px; width: auto; flex: none; display: block;
  --logo-accent: var(--gold-ink); }
.brand-tag { font-size: 0.78rem; color: var(--muted); border-left: 1px solid var(--border); padding-left: 10px; }
.data-badge { font-size: 0.72rem; color: var(--muted); border: 1px solid var(--border); background: var(--panel-2); padding: 2px 9px; white-space: nowrap; cursor: default; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.theme-picker { display: flex; gap: 7px; }
/* Concentric swatch: the scheme's accent as a solid disc inside a ring of its page
   colour. Reads as a clean circle even when the ring colour matches the current
   page (a diagonal split left a lone accent half-moon "slipping" into the bg). */
.theme-swatch { width: 20px; height: 20px; padding: 0; cursor: pointer; flex: none;
  box-sizing: border-box; background: var(--sw); border: 3px solid var(--sw2, var(--sw));
  box-shadow: var(--raise), 0 0 0 1px var(--border); transition: transform .1s, box-shadow .1s; }
.theme-swatch:hover { transform: translateY(-1px); }
.theme-swatch.active { box-shadow: var(--raise), 0 0 0 2px var(--ink); }

/* ---- layout ---- */
.layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  max-width: 1720px;
  margin: 18px auto;
  padding: 0 18px;
  align-items: start;
}
.stage { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 16px 18px;
}
.panel h2 {
  margin: 0 0 12px;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gold-ink);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
  display: flex; align-items: center; justify-content: space-between;
}
.panel h3 { margin: 16px 0 8px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }

label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 10px; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 0.9rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

input[type="number"], input[type="text"], select {
  width: 100%; margin-top: 4px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--ink); padding: 8px 10px; font-size: 0.95rem;
}
input[type="number"]:focus, input[type="text"]:focus, select:focus { outline: none; border-color: var(--gold-dim); }
/* gear combobox — a type-to-filter clickable list layered over a hidden <select>.
   The native select stays in the DOM (value source) but is not shown. */
.combo { position: relative; }
/* Selected item's sprite, overlaid on the closed field. top:4px matches the
   input's margin-top so it centres on the box, not on the wrapper. pointer-events
   are off so clicks still land on the input and open the list. */
.combo-sel-ico { position: absolute; left: 9px; top: 4px; bottom: 0; width: 24px;
  display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 1; }
.combo.has-ico .combo-input { padding-left: 41px; }
.combo-native { display: none; }
.combo-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 40;
  margin-top: 3px; max-height: 260px; overflow-y: auto;
  background: var(--panel-2); border: 1px solid var(--border);
  box-shadow: var(--raise), 0 8px 22px rgba(0, 0, 0, 0.55); display: none;
}
.combo.open .combo-list { display: block; }
.combo-opt {
  padding: 5px 10px; font-size: 0.9rem; color: var(--ink); cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}
/* Ellipsis lives on the text span, not the row: the row is a flex container now
   (sprite + label), and text-overflow does nothing on a flex parent. */
.combo-txt { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.combo-opt:hover, .combo-opt.active { background: color-mix(in srgb, var(--gold) 22%, transparent);
  box-shadow: inset 2px 0 0 var(--gold); }
.combo-opt.none { color: var(--muted); font-style: italic; }
/* Row-cap footer. Not a .combo-opt, so it can never be picked or keyboard-focused. */
.combo-more { padding: 6px 10px; font-size: 0.78rem; color: var(--muted);
  font-style: italic; border-top: 1px solid var(--border); }
/* Fixed-width sprite gutter: every row reserves it whether or not a sprite
   exists, so labels stay on one left edge and the list doesn't jitter as you
   filter. The sprite itself is nearest-neighbour — these are pixel art. */
.combo-ico { flex: none; width: 24px; height: 24px; display: inline-flex;
  align-items: center; justify-content: center; }
.combo-ico .item-icon, .combo-ico img { image-rendering: pixelated; }
.combo-empty { padding: 8px 10px; font-size: 0.85rem; color: var(--muted); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--gold); }
.note { font-size: 0.78rem; color: var(--muted); margin: 8px 0 0; }
/* Marks an assumption we don't actually trust (see the note under it). --gold-ink,
   not --gold: this is 11px type, and the fill accent is unreadable as text on the
   three light schemes. */
.unsure { color: var(--gold-ink); font-weight: 700; font-size: 0.82em; vertical-align: super;
  line-height: 0; margin-left: 1px; cursor: help; text-decoration: none; border: 0; }
.set-note { color: var(--gold-ink); font-size: 0.74rem; margin: 6px 0 0; line-height: 1.5; }

/* ================= SIDEBAR / BUILD CARD ================= */
.sidebar { min-width: 0; }
.side-top { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 10px; }
.side-title { font-size: 0.95rem; font-weight: 700; color: var(--ink); letter-spacing: 0.4px; }
.dps-badge { background: color-mix(in srgb, var(--gold) 15%, transparent); border: 1px solid var(--gold-dim); color: var(--gold); padding: 3px 12px; font-size: 0.95rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.build-name { flex: 1; min-width: 0; width: auto; margin: 0; background: var(--panel-2); border: 1px solid var(--border); color: var(--ink); font-size: 1rem; font-weight: 700; padding: 5px 8px; letter-spacing: 0.3px; font-family: inherit; }
.build-name:hover { border-color: var(--gold-dim); }
.build-name:focus { outline: none; border-color: var(--gold); background: var(--panel); }
.build-name::placeholder { color: var(--muted); font-weight: 500; }
.build-bar { display: flex; gap: 6px; align-items: center; margin: 0 2px 12px; }
.build-bar .mini-btn { flex: 1; padding: 6px 8px; }
.build-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 2px 8px; }
.build-tabs:empty { display: none; }
.btab { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--border); padding: 4px 10px; cursor: pointer; color: var(--muted); font-size: 0.8rem; }
.btab:hover { border-color: var(--gold-dim); }
.btab.active { border-color: var(--gold-dim); background: var(--panel-2); color: var(--ink); }
.btab-dot { width: 9px; height: 9px; flex: none; }
.btab-name { font-weight: 600; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btab-dps { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.72rem; }
.btab-rename { width: 96px; font: inherit; font-size: 0.8rem; font-weight: 600; padding: 1px 4px;
  border: 1px solid var(--gold); background: var(--bg); color: var(--ink); }
.btab-rename:focus { outline: none; }

.build-card { background: var(--panel); border: 1px solid var(--border); padding: 16px; }
.build-card label { margin-bottom: 8px; }

.gear-icons { display: flex; gap: 6px; margin: 12px 0; }
/* an inventory cell: dark well, sunken bevel, sprite floating inside */
.gear-box { width: 46px; height: 46px; flex: 0 0 46px; display: flex; align-items: center; justify-content: center;
  background: var(--slot); border: 1px solid var(--border); overflow: hidden; }
.gear-empty { width: 18px; height: 18px; border: 1px dashed var(--border); opacity: 0.4; }

.statboxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 4px; }
.sbox { background: var(--panel-2); border: 1px solid var(--border); padding: 8px 3px; text-align: center; }
.sbox-val { text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5); }
.sbox-lbl { display: block; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
.sbox-val { display: block; font-size: 1.1rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 3px; }
.sbox-val.v-att { color: var(--gold-ink); }
.sbox-val.v-dex { color: var(--blue); }

.field-list { display: grid; gap: 10px; margin-top: 10px; }
.field-list label { margin-bottom: 0; }
.gear-item { display: flex; flex-direction: column; }
.ench-collapse { margin-top: 5px; }
.ench-collapse > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); padding: 2px 0; }
.ench-collapse > summary::-webkit-details-marker { display: none; }
.ench-collapse > summary::before { content: "▸"; color: var(--gold-dim); font-size: 0.6rem; }
.ench-collapse[open] > summary::before { content: "▾"; }
.ench-collapse[open] > summary { color: var(--gold-dim); }
.ench-collapse .ench-block { margin-top: 5px; }
.ail { display: flex; gap: 6px; align-items: center; margin-top: 10px; }
.ail-in { flex: 1; min-width: 0; margin: 0; padding: 6px 8px; font-size: 0.8rem;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--ink); }
.ail-slot { flex: 0 0 auto; width: auto; margin: 0; padding: 6px 6px; font-size: 0.78rem; }
.ail-btn { flex: 0 0 auto; }
#aiStatus { margin-top: 6px; }
#aiStatus:empty { display: none; }

.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 8px;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.9px; color: var(--gold-ink); font-weight: 700;
  border-bottom: 1px solid var(--border); padding-bottom: 4px; text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45); }
.sec-actions { display: flex; gap: 6px; }
.mini-btn { background: var(--panel-2); border: 1px solid var(--border); color: var(--gold-ink);
  padding: 2px 9px; font-size: 0.64rem; letter-spacing: 0.5px; cursor: pointer; text-transform: uppercase; }
.mini-btn:hover { color: var(--gold); border-color: var(--gold-dim); background: color-mix(in srgb, var(--gold) 12%, var(--panel-2)); }
.mini-btn { font-weight: 700; text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45); font-family: inherit; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-toggle { display: inline-flex; margin: 0; cursor: pointer; }
.chip-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.chip-toggle span { padding: 5px 11px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--muted); font-size: 0.78rem; transition: background .12s, color .12s, border-color .12s; }
.chip-toggle:hover span { border-color: var(--gold-dim); }
.chip-toggle input:checked + span { background: color-mix(in srgb, var(--gold) 18%, transparent);
  border-color: var(--gold-dim); color: var(--gold); box-shadow: var(--sink); text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5); }

.sec { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.sec > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 7px;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.9px; color: var(--muted); font-weight: 700; }
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary::before { content: "▸"; color: var(--gold-dim); font-size: 0.68rem; }
.sec[open] > summary::before { content: "▾"; }
.sec[open] > summary { color: var(--gold-dim); margin-bottom: 8px; }

/* ---- minions ---- */
#minionPanel:empty { display: none; }
.sec-note { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--gold-ink); font-size: 0.66rem; }
.minion { border: 1px solid var(--border); padding: 8px 10px; margin-bottom: 6px; background: rgba(0, 0, 0, 0.12); }
.minion.on { border-color: var(--gold-dim); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.minion-head { display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.minion-name { color: var(--ink); font-weight: 600; font-size: 0.88rem; }
/* the stat line sits in its own well, so it needs full ink — muted text on a
   recessed panel fell under 3:1 on all three light schemes */
.minion-stats { font-size: 0.72rem; color: var(--ink);
  margin: 4px 0 6px; background: var(--slot); border: 1px solid var(--border); padding: 3px 6px; }
.minion-fields { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.minion-rate { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.75rem; color: var(--muted); }
.minion-rate input { width: 72px; margin: 0; padding: 4px 6px; }
.minion-count input { width: 56px; }
.minion-hit input { width: 64px; }

/* ---- sprites / icons ---- */
.class-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.class-row select { margin-top: 0; }
.class-icon-lg { width: 46px; height: 46px; flex: 0 0 46px; image-rendering: pixelated;
  background: var(--slot); border: 1px solid var(--border); padding: 3px; object-fit: contain; }
.class-icon { image-rendering: pixelated; vertical-align: middle; object-fit: contain; }
.item-icon { display: inline-block; image-rendering: pixelated; vertical-align: middle; flex: none;
  background-repeat: no-repeat; filter: drop-shadow(0 0 1px rgba(0,0,0,0.6)); }

/* ---- loadout bits ---- */
.exalts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.exalts label { font-size: 0.72rem; text-align: center; margin-bottom: 0; }
.exalts input { padding: 6px 4px; text-align: center; }
.weapon-summary { margin: 10px 0 0; font-size: 0.82rem; color: var(--gold-ink); font-variant-numeric: tabular-nums; }
.onhit { margin: 4px 0 0; font-size: 0.8rem; color: var(--blue); }
.onhit:empty { display: none; }
.stat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.stat-chips:empty { display: none; }
.chip { background: var(--panel-2); border: 1px solid var(--border);
  padding: 5px 9px; font-size: 0.9rem; display: flex; align-items: baseline; gap: 6px; }
.chip b { color: var(--gold-ink); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.5px; }
.chip-sub { color: var(--muted); font-size: 0.66rem; }

/* ---- enchantments ---- */
#enchPanel { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.ench-block { border: 1px solid var(--border); padding: 10px; background: rgba(0, 0, 0, 0.12); }
.ench-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ench-gear { color: var(--ink); font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; }
.ench-rarity { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--muted); margin: 0; }
.ench-rarity select { width: auto; margin: 0; padding: 4px 6px; font-size: 0.8rem; }
.ench-slots { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.ench-row { display: flex; align-items: center; gap: 6px; }
.ench-row .ench-sel { flex: 1 1 auto; min-width: 0; }
.ench-row .tier-sel { flex: 0 0 46px; }
.ench-row select { margin: 0; padding: 5px 6px; font-size: 0.82rem; }
.ench-active-lbl { display: flex; align-items: center; gap: 3px; font-size: 0.72rem; color: var(--gold-dim); white-space: nowrap; }
.ench-eff { flex: 0 1 auto; font-size: 0.76rem; color: var(--gold-ink); font-variant-numeric: tabular-nums; text-align: right; }
.ench-awk:empty { display: none; }
.ench-awk { background: color-mix(in srgb, var(--gold) 9%, transparent); border: 1px solid var(--gold-dim); padding: 8px 10px; margin: 8px 0; }
.ench-awk-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--gold); font-weight: 600; font-size: 0.85rem; }
.ench-awk-head .awk-sel { width: auto; margin: 0; padding: 4px 6px; font-size: 0.8rem; max-width: 60%; }
.awk-slot-note { color: var(--muted); font-weight: 400; font-size: 0.7rem; }
.ench-awk-desc { font-size: 0.74rem; color: var(--ink); margin: 4px 0 0 22px; }
.ench-awk-note { font-size: 0.7rem; color: var(--muted); font-style: italic; margin: 2px 0 0 22px; }
.ench-awk-proc { display: flex; align-items: center; gap: 6px; margin: 6px 0 0 22px; cursor: pointer; }
.awk-p-name { color: var(--blue); font-size: 0.78rem; font-weight: 500; }

/* ---- import ---- */
.imp-steps { font-size: 0.8rem; color: var(--muted); margin: 4px 0 8px; padding-left: 18px; }
.imp-steps li { margin: 4px 0; }
.bm-link { display: inline-block; background: var(--gold-dim); color: #14110c; font-weight: 700; padding: 2px 8px; text-decoration: none; cursor: grab; }
.imp-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.imp-row textarea { flex: 1; margin: 0; background: var(--panel-2); border: 1px solid var(--border); color: var(--ink); padding: 8px; font-family: monospace; font-size: 0.78rem; resize: vertical; }
.imp-code { flex: 1; margin: 0; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); padding: 6px 8px; font-family: monospace; font-size: 0.7rem; }
.imp-row .toggle { flex: 0 0 auto; white-space: nowrap; }
.imp-chars { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.imp-chars:empty { display: none; }
.imp-char { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; background: var(--panel-2); border: 1px solid var(--border); color: var(--ink); padding: 8px 10px; cursor: pointer; font-size: 0.9rem; }
.imp-char-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.imp-char .class-icon, .imp-char .item-icon { flex: none; }
.imp-char .item-icon { margin-left: auto; }
.imp-char:hover { border-color: var(--gold-dim); }
.imp-char.sel { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.imp-char b { color: var(--gold-ink); }
.imp-char span { color: var(--muted); font-size: 0.8rem; }
#impName { flex: 1; margin: 0; background: var(--panel-2); border: 1px solid var(--border); color: var(--ink); padding: 8px 10px; font-size: 0.9rem; }
.imp-diag { display: block; margin-top: 5px; font-family: monospace; font-size: 0.68rem; opacity: 0.65; word-break: break-word; }
.imp-fallback { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.imp-fallback summary { cursor: pointer; color: var(--muted); font-size: 0.8rem; list-style: revert; }
.imp-fallback[open] summary { color: var(--gold-dim); margin-bottom: 6px; }

.toggle { background: var(--panel-2); border: 1px solid var(--border); color: var(--gold-ink);
  padding: 6px 14px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  cursor: pointer; text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5); font-family: inherit; }
.toggle:hover { border-color: var(--gold-dim); background: color-mix(in srgb, var(--gold) 12%, var(--panel-2)); }

/* ================= STAGE ================= */
.result-strip { display: flex; background: var(--panel); border: 1px solid var(--border); overflow: hidden; }
.rs { flex: 1; padding: 12px 20px; display: flex; flex-direction: column; }
.rs + .rs { border-left: 2px solid var(--border); box-shadow: inset 2px 0 0 var(--bev-hi); }
.rs-lbl { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.rs-val { font-size: 1.7rem; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; margin-top: 2px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55); letter-spacing: 0.5px; }

.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.panel-head h2 { border: none; padding: 0; margin: 0; }
.panel-sub { font-size: 0.8rem; color: var(--muted); margin: 3px 0 0; }
.legend { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.legend-dot { width: 10px; height: 10px; background: var(--gold); display: inline-block; }

.chart-panel .dps-curve { margin-top: 8px; }

/* comparison table */
.cmp-wrap { overflow-x: auto; }
table.cmp { width: 100%; border-collapse: collapse; font-size: 0.9rem; white-space: nowrap; }
table.cmp th { text-align: right; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted);
  font-weight: 700; padding: 4px 14px 8px; border-bottom: 1px solid var(--border); }
table.cmp th:first-child, table.cmp th:nth-child(2) { text-align: left; }
table.cmp td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
table.cmp td:first-child, table.cmp td:nth-child(2) { text-align: left; }
table.cmp tr:last-child td { border-bottom: none; }
table.cmp tr.cmp-active td { background: color-mix(in srgb, var(--gold) 8%, transparent); }

/* Full stat sheet (#cmpSheet): builds are COLUMNS, stats run down the left. Shares
   table.cmp's type, borders and tabular numerals; only the row-header column, the
   group bands and the winner mark are new. The nth-child(2) overrides exist because
   table.cmp left-aligns its first two columns (Build, Weapon) — here column 2 is a
   build, so it must line up with the numbers under it. Equal specificity, so these
   must stay AFTER the .cmp rules above. */
/* The stat sheet is CARDS, not a table. As a full-width table each build got a
   ~337px column to hold "91" or "4k": the label sat at the far left and its value
   floated 400px away, over 31 bordered rows. A card caps that distance at the card's
   own width — the same tight label/value shape as table.breakdown, which reads well.
   Cards are capped and packed from the left, so adding builds wraps to a new line
   instead of stretching each card wider. */
/* Only shown once there are more builds than the sheet can compare; empty and
   therefore invisible (no margin from an empty flex box) below that. */
.cmp-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.cmp-pick:not(:empty) { margin-bottom: 12px; }
.cmp-pick-lbl { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); margin-right: 3px; }
.cmp-chip:disabled { opacity: 0.4; cursor: not-allowed; }
.cmp-chip:disabled:hover { border-color: var(--border); }

/* auto-fit + 1fr, so cards SHARE the row's full width instead of being capped and
   packed left (two 300px cards left ~600px of bare panel beside them). The label ->
   value distance is kept short not by narrowing the card but by .sc-body below. */
.sheet-cards { display: grid; gap: 14px; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.sheet-card { background: var(--panel-2); box-shadow: var(--sink); padding: 10px 12px; min-width: 0; }
.sheet-card.sc-active { box-shadow: var(--sink), inset 0 0 0 2px var(--gold); }
.sc-head { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; font-weight: 700;
  color: var(--ink); border-bottom: 2px solid var(--border); padding-bottom: 7px; margin-bottom: 4px; }
.sc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A wide card flows its SECTIONS into extra columns rather than stretching each row,
   so the card fills the space it's given while every value stays ~200px from its
   label. Sections are whole blocks, so a heading never parts from its rows. */
/* 170px is deliberately tight. These columns are 1fr, so a card that fits only ONE
   gives it the card's whole width and the label -> value gap blows out (413px card,
   1 column, 359px gap — measured). A low minimum makes the card add a column instead
   of stretching the one it has, which is the whole point of flowing sections. */
.sc-body { display: grid; align-items: start; gap: 0 16px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.sc-sec { min-width: 0; }
.sc-group { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--gold-ink); margin: 10px 0 2px; }
.sc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 0.76rem; padding: 3px 0; border-bottom: 1px solid var(--border); }
.sc-row:last-child { border-bottom: none; }
/* The LABEL is what gives way in a squeeze, never the value: a truncated "Avg damage
   / shot (mai…" is still readable, a truncated number is a wrong number. So the label
   shrinks and ellipsises (full text on its title=) and the value never shrinks. */
.sc-k { color: var(--muted); white-space: nowrap;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sc-v { color: var(--ink); font-variant-numeric: tabular-nums; text-align: right;
  flex: none; max-width: 72%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A gear row carries its sprite. text-overflow does NOTHING on a flex parent, so the
   ellipsis lives on the inner .sc-vt and the icon is pinned at flex:none. */
.sc-v.has-ico { display: inline-flex; align-items: center; gap: 6px; }
.sc-v.has-ico .item-icon, .sc-v.has-ico .class-icon { flex: none; }
.sc-vt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* A panel whose body folds away. The summary is styled as the panel's own <h2> —
   same type, same 2px rule — plus a caret, so an OPEN fold is visually identical to
   the heading it replaces and only the marker is new. */
.fold > summary { cursor: pointer; list-style: none; margin: 0;
  font-size: 0.92rem; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--gold-ink); text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
  border-bottom: 2px solid var(--border); padding-bottom: 8px;
  display: flex; align-items: center; gap: 8px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "▾"; font-size: 0.62rem; color: var(--gold-dim); }
.fold:not([open]) > summary::before { content: "▸"; }
.fold[open] > summary { margin-bottom: 12px; }
.fold > summary .legend, .fold > summary .sec-note { margin-left: auto; }
/* Accent as TEXT, so --gold-ink (not --gold): the light schemes are unreadable
   otherwise. A background tint may be a color-mix; a text colour may not. */
.sc-best { color: var(--gold-ink); font-weight: 700; }
.b-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }

.detail-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
/* Grid items stretch by default, which is what keeps three OPEN panels the same
   height. A COLLAPSED one was stretched too, so folding "Buff impact" away left a
   full-height slab of empty panel behind it. Un-stretch only those. */
.detail-row > .panel:has(> details.fold:not([open])) { align-self: start; }
.panel-wide { grid-column: 1 / -1; }

/* ---- per-item stat breakdown ---- */
.item-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
/* The in-game item tooltip: dark slab, sprite in a slot, tier-tinted name,
   a rule under the header, then the stat lines. */
.istat { background: var(--slot); border: 1px solid var(--border); padding: 10px 12px;
  box-shadow: var(--raise); }
.istat-head { border-bottom: 1px solid var(--border); padding-bottom: 7px; }
.istat-head .item-icon { background-color: rgba(0, 0, 0, 0.35); padding: 2px; }
.istat-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 9px; }
.istat-head .item-icon { flex: none; margin-top: 1px; }
.istat-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.istat-slot { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.7px; color: var(--muted); }
.istat-name { font-size: 0.9rem; color: var(--ink); font-weight: 700; line-height: 1.2;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.6); }
.istat-tier { flex: none; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.5px; color: var(--gold-ink);
  font-variant-numeric: tabular-nums; padding: 1px 5px; background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border); align-self: flex-start; }

/* Item-tier tints (app.js tierClass) — used on the tooltip name, its tier badge
   and every row of the gear dropdown, so an ST reads as an ST at a glance. */
.t-low  { color: var(--t-low)  !important; }
.t-high { color: var(--t-high) !important; }
.t-ut   { color: var(--t-ut)   !important; }
.t-st   { color: var(--t-st)   !important; }
.istat-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.istat-chip { font-size: 0.72rem; padding: 2px 7px; background: var(--panel);
  border: 1px solid var(--border); color: var(--ink); font-variant-numeric: tabular-nums;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45); }
.istat-chip.pos { color: var(--green); }
.istat-chip.neg { color: var(--red); }
.istat-chip.dmg { color: var(--gold-ink); }
.istat-chip.ap { color: var(--blue); }
/* Cast cost. Deliberately left the default ink: it is a COST, so it must not wear the
   green of the `+50 MP` stat bonus that can sit two chips along, and a new accent
   colour would have to be re-measured across all 10 themes for contrast. The "/ cast"
   wording carries the distinction instead. */
.istat-chip.mp { font-variant-numeric: tabular-nums; }
.istat-chip.muted { color: var(--muted); }
.istat-name.muted, .muted { color: var(--muted); }

/* ---- editable character stats ---- */
.char-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.char-stats label { display: flex; flex-direction: column; gap: 4px; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); margin: 0; }
.char-stats input { padding: 8px 6px; text-align: center; font-size: 1rem; color: var(--ink);
  font-variant-numeric: tabular-nums; }

table.breakdown { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.breakdown td { padding: 6px 4px; border-bottom: 1px solid var(--border); }
table.breakdown td:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
table.breakdown td:first-child { color: var(--muted); }
table.breakdown tr:last-child td { border-bottom: none; }
/* "70% hit" tag on a damage-source row whose hit rate is below 100% */
.row-hit { color: var(--gold-ink); font-size: 0.72rem; margin-left: 6px; white-space: nowrap; }

.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: flex; flex-direction: column; gap: 4px; }
.bar-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.82rem; gap: 8px; }
.bar-lbl { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row.on .bar-lbl { color: var(--ink); font-weight: 600; }
.bar-track { display: block; width: 100%; background: var(--slot); height: 12px; overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--sink); }
/* solid fill with a lit top edge — how the in-game bars are drawn */
.bar-fill { display: block; height: 100%; min-width: 3px; background: var(--gold-dim);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.22), inset 0 -2px 0 rgba(0, 0, 0, 0.3);
  transition: width .15s ease; }
.bar-row.on .bar-fill { background: var(--gold); }
.bar-val { font-variant-numeric: tabular-nums; color: var(--muted); flex: none; }
.bar-row.on .bar-val { color: var(--gold-ink); font-weight: 600; }

/* ---- DPS vs Defense curve ---- */
.dps-curve svg { width: 100%; height: auto; display: block; touch-action: none; }
.dps-curve .grid { stroke: var(--border); stroke-width: 1; opacity: 0.4; }
.dps-curve .axis { stroke: var(--muted); stroke-width: 1; opacity: 0.55; }
.dps-curve .area { fill: url(#dpsGrad); }
.dps-curve .curve { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; opacity: 0.55; }
.dps-curve .curve.active { stroke-width: 2.75; opacity: 1; }
.dps-curve .marker { stroke: var(--gold-dim); stroke-width: 1; stroke-dasharray: 4 4; }
.dps-curve .dot { fill: var(--gold); stroke: var(--bg); stroke-width: 1.5; }
.dps-curve .hmarker { stroke: var(--blue); stroke-width: 1; }
/* Crossover: where one build overtakes another. Hollow, so it reads as a point ON
   the curves rather than a data dot belonging to either of them. */
.dps-curve .xdot { fill: var(--bg); stroke: var(--gold-ink); stroke-width: 2.25; }
.dps-curve .hmarker.snapped { stroke: var(--gold-ink); stroke-width: 1.75; }
.dps-curve .hdot { fill: var(--blue); stroke: var(--bg); stroke-width: 1.5; }
.dps-curve text { fill: var(--muted); font-size: 12px; font-family: inherit; }
.dps-curve .axttl { fill: var(--muted); font-size: 12px; letter-spacing: 0.5px; }
.dps-curve .hlbl { fill: var(--ink); font-size: 13px; font-weight: 700; paint-order: stroke; stroke: var(--bg); stroke-width: 3.5px; }
.dps-curve .curve { shape-rendering: geometricPrecision; }

footer { text-align: center; color: var(--muted); font-size: 0.78rem; padding: 14px 16px 32px; }

@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .detail-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .brand-tag { display: none; }
  .brand-logo { height: 33px; }   /* 1.5x grid — still readable once the tag is gone */
  .result-strip { flex-direction: column; }
  .rs + .rs { border-left: none; border-top: 1px solid var(--border); }
}
