/* Craft Profit: a night-blue trade hall with gold filigree. Dark only, like the reference. */

@font-face { font-family: 'Cinzel'; src: url(fonts/cinzel-latin.woff2) format('woff2'); font-weight: 500 700; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url(fonts/cormorant-garamond-latin.woff2) format('woff2'); font-weight: 500 700; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url(fonts/source-sans-3-latin.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #08121c;
  --panel: rgba(13, 26, 40, 0.9);
  --panel-solid: #0e1c2b;
  --field: rgba(5, 13, 21, 0.6);
  --line: #20354a;
  --line-2: #2e4861;
  --line-gold: rgba(201, 163, 94, 0.45);
  --ink: #ece7da;
  --ink-2: #b6c1cc;
  --ink-3: #8597a9;
  --gold: #d9b36a;
  --gold-2: #f1d595;
  --gold-3: #a8864c;
  --teal-2: #4aa3c8;
  --sel-line: rgba(98, 176, 214, 0.55);
  --pos: #5fd68f;
  --neg: #ff7b7b;
  --warn: #e9b44c;
  --good: #3fbf6f;
  --bad: #e5484d;
  --off: #6b7d90;
  --route: #ff8a3d;
  --g-common: #d5d9df;
  --g-rare: #6ddc98;
  --g-legend: #6fb4ff;
  --g-unique: #f2c65a;
  --g-epic: #ec7d95;
  --g-mythic: #ff8f5e;
  --g-special: #c98bff;
  --display: 'Cinzel', 'Trajan Pro', 'Times New Roman', serif;
  --serif: 'Cormorant Garamond', Garamond, Georgia, serif;
  --sans: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --side-w: 228px;
  --top-h: 60px;
  --det-w: 540px;
  /* The content column: up to 1920px wide and centred in the main area, with at least --main-pad
     at either side. */
  --page-max: 1920px;
  --main-pad: 26px;
  /* A pinned table column sits on the panel's colour as it shows over the page, made opaque. */
  --pin: #0d1927;
  --pin-hover: #142030;
  --pin-open: #132737;
  --pin-selected: #1c3a4e;
}

* { box-sizing: border-box; scrollbar-color: #2e4861 transparent; scrollbar-width: thin; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  font: 400 15px/1.45 var(--sans);
  background:
    radial-gradient(1100px 520px at 62% -160px, rgba(74, 163, 200, 0.15), transparent 70%),
    radial-gradient(900px 600px at 100% 100%, rgba(201, 163, 94, 0.05), transparent 70%),
    linear-gradient(180deg, #0b1724 0%, #08121c 55%, #070f17 100%) fixed;
  background-color: var(--bg);
}
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--gold-2); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.boot { padding: 40px; color: var(--ink-3); font-family: var(--display); letter-spacing: 0.2em; }
.icon { flex: none; }
.icon.filled { fill: currentColor; }
.icon.spin { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- grades: the game's colours on item names and frames ---------- */
.grade-Common { color: var(--g-common); }
.grade-Rare { color: var(--g-rare); }
.grade-Legend { color: var(--g-legend); }
.grade-Unique { color: var(--g-unique); }
.grade-Epic { color: var(--g-epic); }
.grade-Mythic { color: var(--g-mythic); }
.grade-Special { color: var(--g-special); }

/* ---------- the shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: var(--top-h) auto; min-height: 100vh; }

.topbar {
  grid-column: 1 / -1; position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px; height: var(--top-h); padding: 0 18px 0 20px;
  background:
    linear-gradient(90deg, rgba(7, 16, 25, 0.94) 0%, rgba(7, 16, 25, 0.5) 26%, rgba(7, 16, 25, 0.12) 50%, rgba(7, 16, 25, 0.5) 70%, rgba(7, 16, 25, 0.94) 100%),
    url(img/sky.svg) center 66% / cover no-repeat,
    #0b1826;
  border-bottom: 1px solid var(--line-gold);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5), 0 10px 26px rgba(0, 0, 0, 0.3);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.emblem { display: block; width: 46px; height: 29px; filter: drop-shadow(0 0 6px rgba(240, 210, 140, 0.35)); }
.wordmark {
  font: 600 25px/1 var(--display); letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(180deg, #fcf0c8 0%, #e2bf72 55%, #b18a44 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6));
}
.brand-rule { width: 1px; height: 26px; margin: 0 6px; background: linear-gradient(180deg, transparent, var(--line-gold), transparent); }
.tagline { font: 500 13px/1 var(--display); letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.topbar-spacer { flex: 1; }
.nav-toggle { display: none !important; }

.hdr-field {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 0 0 10px;
  border: 1px solid var(--line-2); border-radius: 6px; background: rgba(6, 14, 22, 0.78); color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.hdr-field:hover { border-color: var(--gold-3); }
.hdr-field .icon { color: var(--gold); }
.hdr-field select {
  appearance: none; height: 100%; border: 0; background: transparent; color: var(--ink); cursor: pointer;
  font: 500 15.5px var(--sans); padding: 0 34px 0 4px; min-width: 0; max-width: 220px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: right 17px top 17px, right 12px top 17px; background-size: 5px 5px; background-repeat: no-repeat;
}
.hdr-field select:focus-visible { outline: none; }
.hdr-field:focus-within { outline: 2px solid var(--gold-2); outline-offset: 2px; }
select option, select optgroup { background: #0e1c2b; color: var(--ink); }

.sync-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px;
  border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink-2); font: 500 14.5px var(--sans); cursor: pointer; white-space: nowrap;
}
.sync-chip:hover, .sync-chip[aria-expanded="true"] { background: rgba(255, 255, 255, 0.05); border-color: var(--line); }
.sync-chip b { color: var(--ink); font-weight: 600; }
.sync-chip .note { color: var(--warn); }
.sync-chip .compact { display: none; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; flex: none;
  border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink-2); cursor: pointer; transition: color 140ms, background 140ms;
}
.icon-btn:hover:not(:disabled) { color: var(--gold-2); background: rgba(255, 255, 255, 0.05); }
.icon-btn:disabled { opacity: 0.55; cursor: default; }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.xs { width: 28px; height: 28px; }
.icon-btn .icon.filled { color: var(--gold); }
.icon-btn .badge { position: absolute; top: 2px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--gold); color: #1d1402; font: 700 11px/17px var(--sans); box-shadow: 0 0 8px rgba(217, 179, 106, 0.45); }

.bell-wrap { position: relative; }
.bell-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; width: 360px; max-height: 440px; overflow: auto; padding: 8px;
  background: var(--panel-solid); border: 1px solid var(--line-gold); border-radius: 10px; box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
}
.pop-head { padding: 6px 8px 8px; font: 600 12.5px var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.pop-head .muted { font-family: var(--sans); letter-spacing: 0; text-transform: none; font-weight: 400; margin-left: 6px; }
.alert-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.alert-row:hover { background: rgba(255, 255, 255, 0.05); }
.alert-row .txt { display: grid; font-size: 14px; color: var(--ink-2); }
.alert-row .txt b { color: var(--ink); font-weight: 600; }
.pop-empty { padding: 10px 8px 12px; color: var(--ink-3); font-size: 14px; }

/* ---------- sidebar ---------- */
.sidebar {
  grid-row: 2; position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto;
  display: flex; flex-direction: column; padding: 24px 14px 16px;
  border-right: 1px solid var(--line);
  background: url(img/cliffs.svg) center bottom / 100% auto no-repeat, linear-gradient(180deg, rgba(10, 21, 33, 0.97), rgba(7, 15, 24, 0.99));
}
.side-label { padding: 0 10px; text-align: center; font: 600 13px var(--display); letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink-2); }
.side-label::after { content: ''; display: block; width: 86%; height: 12px; margin: 10px auto 6px; background: url(img/rule.svg) center / 100% 100% no-repeat; opacity: 0.85; }
.side-nav { display: grid; gap: 4px; margin-top: 6px; }
.side-nav a, .side-link {
  white-space: nowrap; position: relative; display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 14px;
  border: 1px solid transparent; border-radius: 6px; color: var(--ink-2); text-decoration: none; font: 500 16.5px var(--sans); transition: background 140ms, color 140ms;
}
.side-nav a .icon, .side-link .icon { color: var(--gold-3); }
.side-nav a:hover, .side-link:hover { color: var(--ink); background: rgba(255, 255, 255, 0.04); }
.side-nav a[aria-current="page"], .side-link[aria-current="page"] {
  color: #fff; border-color: rgba(98, 176, 214, 0.3);
  background: linear-gradient(90deg, rgba(74, 163, 200, 0.34), rgba(74, 163, 200, 0.06));
}
.side-nav a[aria-current="page"] .icon, .side-link[aria-current="page"] .icon { color: var(--gold-2); }
.side-nav a[aria-current="page"]::before, .side-link[aria-current="page"]::before {
  content: ''; position: absolute; left: -15px; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: var(--teal-2); box-shadow: 0 0 12px var(--teal-2);
}
.side-nav .count { margin-left: auto; min-width: 28px; height: 23px; padding: 0 7px; border: 1px solid var(--line-2); border-radius: 6px; background: rgba(6, 14, 22, 0.5); font: 600 13px/21px var(--sans); text-align: center; color: var(--ink-2); }
.side-fill { flex: 1; min-height: 24px; }
.realm {
  display: grid; justify-items: center; gap: 4px; margin-bottom: 10px; padding: 16px 10px 14px; text-align: center;
  border: 1px solid var(--line-gold); border-radius: 10px; background: rgba(6, 14, 22, 0.66); backdrop-filter: blur(2px);
}
.realm .emblem { width: 44px; height: 28px; margin-bottom: 6px; }
.realm b { font: 600 17px var(--sans); color: var(--ink); }
.realm span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.realm span .icon { color: var(--gold); }
.side-account { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 12px 2px 0 8px; border-top: 1px solid var(--line); }
.avatar {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-gold); border-radius: 50%;
  background: rgba(6, 14, 22, 0.7); color: var(--gold-2); font: 600 15px/1 var(--display);
}
.side-account .who { flex: 1; display: grid; min-width: 0; }
.side-account .who b { overflow: hidden; color: var(--ink); font: 600 15px var(--sans); white-space: nowrap; text-overflow: ellipsis; }
.side-account .who span { color: var(--ink-3); font-size: 12.5px; }
.scrim { display: none; }

/* ---------- main area and page heads ---------- */
.main { grid-column: 2; grid-row: 2; min-width: 0; padding: 22px max(var(--main-pad), (100% - var(--page-max)) / 2) 44px; }
.narrow-page { max-width: 860px; margin-inline: auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.ph-actions { display: flex; gap: 10px; flex: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font: 600 12.5px var(--display); letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold); }
.eyebrow::before, .eyebrow::after { content: ''; width: 46px; height: 10px; background: url(img/rule.svg) left center / 100% 100% no-repeat; }
.eyebrow::after { transform: scaleX(-1); }
.page-head h1 { margin: 10px 0 6px; font: 600 40px/1.08 var(--serif); letter-spacing: 0.005em; color: #f3eee2; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); }
.page-head .sub { color: var(--ink-2); font-size: 16.5px; }
.serif { font: 600 25px/1.1 var(--serif); color: var(--ink); }

/* ---------- buttons, links and controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border: 1px solid var(--line-2); border-radius: 6px; background: rgba(14, 28, 43, 0.8); color: var(--ink);
  font: 600 15.5px var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color 140ms, color 140ms, background 140ms, filter 140ms;
}
.btn:hover:not(:disabled) { border-color: var(--gold-3); color: var(--gold-2); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.ghost { background: rgba(6, 14, 22, 0.42); border-color: rgba(201, 163, 94, 0.55); }
.btn.primary {
  border-color: rgba(150, 210, 238, 0.7); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  background: linear-gradient(180deg, #67bde0 0%, #3388b0 52%, #23678c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 0 20px rgba(74, 163, 200, 0.32);
}
.btn.primary:hover:not(:disabled) { color: #fff; filter: brightness(1.08); }
.btn.big { height: 52px; font-size: 18px; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13.5px; }
.link { padding: 0; border: 0; background: none; color: var(--gold-2); font: inherit; text-decoration: underline; text-decoration-color: rgba(241, 213, 149, 0.4); text-underline-offset: 3px; cursor: pointer; }
.link.plain { text-decoration: none; color: inherit; text-align: left; }
.link.plain:hover { color: var(--gold-2); }

.search {
  display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 12px; flex: 1 1 170px; max-width: 290px;
  border: 1px solid var(--line-2); border-radius: 6px; background: var(--field); color: var(--ink-3);
}
.search.grow { max-width: none; }
.search:focus-within { border-color: var(--gold-3); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15.5px; }
.search input::placeholder { color: var(--ink-3); }
.filters select, select.field-input {
  height: 40px; padding: 0 34px 0 12px; border: 1px solid var(--line-2); border-radius: 6px; background-color: var(--field); color: var(--ink); font: 500 15.5px var(--sans); appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: right 17px top 18px, right 12px top 18px; background-size: 5px 5px; background-repeat: no-repeat;
}
.filters select:hover, select.field-input:hover { border-color: var(--gold-3); }
input.field-input { height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--field); color: var(--ink); font-size: 15.5px; width: 100%; -moz-appearance: textfield; }
input.field-input:focus { outline: none; border-color: var(--gold-3); }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.check { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 15.5px; cursor: pointer; user-select: none; white-space: nowrap; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--field); color: transparent; transition: background 140ms, border-color 140ms; }
.check input:checked + .box { color: #fff; border-color: #79c4e2; background: linear-gradient(180deg, #4aa3c8, #2a6e90); }
.check input:focus-visible + .box { outline: 2px solid var(--gold-2); outline-offset: 2px; }

.stepper { display: inline-flex; align-items: stretch; height: 36px; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; background: var(--field); }
.stepper button { display: grid; place-items: center; width: 36px; border: 0; background: rgba(255, 255, 255, 0.04); color: var(--ink); cursor: pointer; }
.stepper button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); }
.stepper button:disabled { opacity: 0.4; cursor: default; }
.stepper input { width: 70px; border: 0; border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); background: transparent; color: var(--ink); text-align: center; font: 600 15.5px var(--sans); -moz-appearance: textfield; }
.stepper input:focus { outline: none; background: rgba(255, 255, 255, 0.04); }

.toggle { position: relative; flex: none; width: 48px; height: 27px; padding: 0; border: 1px solid var(--line-2); border-radius: 14px; background: var(--field); cursor: pointer; transition: background 160ms, border-color 160ms; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: var(--ink-3); transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), background 160ms; }
.toggle[aria-checked="true"] { border-color: #79c4e2; background: linear-gradient(180deg, #4aa3c8, #2a6e90); }
.toggle[aria-checked="true"] i { transform: translateX(21px); background: #fff; }

.lamp { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--off); }
.lamp.good { background: var(--good); box-shadow: 0 0 8px rgba(63, 191, 111, 0.65); }
.lamp.warn { background: var(--warn); box-shadow: 0 0 8px rgba(233, 180, 76, 0.55); }
.lamp.bad { background: var(--bad); box-shadow: 0 0 8px rgba(229, 72, 77, 0.55); }
.lamp.route { background: var(--route); box-shadow: 0 0 8px rgba(255, 138, 61, 0.55); }

/* ---------- panels and notices ---------- */
.panel {
  position: relative; margin-bottom: 18px; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 30px rgba(0, 0, 0, 0.28);
}
.orn { position: absolute; z-index: 2; width: 30px; height: 30px; background: url(img/corner.svg) center / contain no-repeat; pointer-events: none; }
.orn.tl { top: -2px; left: -2px; }
.orn.tr { top: -2px; right: -2px; transform: scaleX(-1); }
.orn.bl { bottom: -2px; left: -2px; transform: scaleY(-1); }
.orn.br { bottom: -2px; right: -2px; transform: scale(-1, -1); }
.notice {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; padding: 12px 16px;
  border: 1px solid var(--line-2); border-radius: 8px; background: rgba(13, 26, 40, 0.92); color: var(--ink-2); font-size: 14.5px;
}
.notice .lamp { margin-top: 6px; }
.notice b { color: var(--ink); font-weight: 600; }
.notice code { color: var(--ink); font-size: 13px; }
.notice.good { border-color: rgba(95, 214, 143, 0.35); }
.notice.bad { border-color: rgba(229, 72, 77, 0.45); }
.notice.what-if { border-color: rgba(255, 138, 61, 0.45); }
.notice-close { flex: none; margin: -4px -6px -4px auto; }
.empty { padding: 26px 16px; color: var(--ink-2); text-align: center; font-size: 15px; }
.empty .muted { display: block; margin-top: 6px; }
.empty-state { display: grid; justify-items: center; gap: 12px; padding: 44px 20px; text-align: center; color: var(--ink-2); }
.empty-state .icon { color: var(--gold); }
.empty-state p { max-width: 540px; }
.fine { margin-top: 8px; color: var(--ink-3); font-size: 13px; }
.err { margin-top: 6px; color: var(--neg); font-size: 13.5px; }

/* ---------- KPI band ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 2px 0 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)); }
.kpis.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpis.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { display: flex; align-items: center; gap: 18px; min-width: 0; padding: 15px 22px; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi-icon { color: var(--gold); filter: drop-shadow(0 0 6px rgba(217, 179, 106, 0.3)); }
.kpi-text { flex: 1; min-width: 0; }
.kpi-label { font: 600 12.5px var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; min-width: 0; }
.kpi-value .v { font: 600 31px/1.1 var(--sans); color: var(--ink); white-space: nowrap; }
.kpi-value .v.pos { color: var(--pos); }
.kpi-value .v.neg { color: var(--neg); }
.kpi-value .unit { color: var(--ink-2); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-note { margin-top: 2px; color: var(--ink-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A band squeezed beside the recipe panel or on a tablet drops its icons and lets units and notes
   wrap, rather than cutting them off. */
.kpis { container: kpis / inline-size; }
@container kpis (max-width: 760px) {
  .kpi { gap: 0; padding: 12px 14px; }
  .kpi-icon { display: none; }
  .kpi-value { flex-wrap: wrap; column-gap: 8px; row-gap: 0; }
  .kpi-value .unit, .kpi-note { overflow: visible; white-space: normal; }
}

/* ---------- tabs ---------- */
.tabbar { position: relative; z-index: 1; display: flex; margin-bottom: -1px; }
.tabbar button {
  height: 46px; padding: 0 30px; margin-right: -1px; border: 1px solid var(--line); border-radius: 8px 8px 0 0;
  background: rgba(8, 18, 28, 0.65); color: var(--ink-2); font: 500 17.5px var(--sans); cursor: pointer;
}
.tabbar button:hover { color: var(--ink); }
.tabbar button[aria-selected="true"] {
  color: #fff; border-color: rgba(98, 176, 214, 0.55); border-bottom-color: transparent;
  background: linear-gradient(180deg, rgba(74, 163, 200, 0.24), rgba(13, 26, 40, 0.96) 85%);
  box-shadow: inset 0 2px 0 rgba(120, 196, 228, 0.7);
}
.tabbar + .panel { border-top-left-radius: 0; }
.tabbar.small button { height: 40px; padding: 0 18px; font-size: 15.5px; }

/* ---------- tables ---------- */
.table-card { padding: 14px 16px 8px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 12px; }
/* A table wider than its box scrolls inside it: the box is also the containing block, so nothing
   absolutely placed in a cell (the hidden header labels) can stretch the page. */
.table-wrap { position: relative; overflow-x: auto; overscroll-behavior-x: contain; container-type: inline-size; }
.table-wrap[data-more-right] {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}
/* While it scrolls, the name column stays put, with a shadow once something passes under it. */
.table-wrap[data-scrolls] :is(.grid-table, .steps) > :is(thead, tbody) > tr:not(.detail-row) > :first-child { position: sticky; left: 0; z-index: 2; background: var(--pin); }
.table-wrap[data-more-left] :is(.grid-table, .steps) > :is(thead, tbody) > tr:not(.detail-row) > :first-child { box-shadow: inset -1px 0 0 var(--line-2), 12px 0 12px -12px rgba(0, 0, 0, 0.9); }
.table-wrap[data-scrolls] .grid-table > tbody > tr:hover > td:first-child { background: var(--pin-hover); }
.table-wrap[data-scrolls] .grid-table.gather > tbody > tr.open > td:first-child { background: var(--pin-open); }
.table-wrap[data-scrolls] .grid-table > tbody > tr.selected > td:first-child { background: var(--pin-selected); box-shadow: inset 1px 0 0 var(--sel-line), inset 0 1px 0 var(--sel-line), inset 0 -1px 0 var(--sel-line); }
.only-narrow { display: none; }
.grid-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.grid-table th { padding: 10px 10px; border-bottom: 1px solid var(--line-2); font: 600 12.5px var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); text-align: left; white-space: nowrap; }
.grid-table th.r, .grid-table td.r { text-align: right; }
.th { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.th .icon { opacity: 0.45; }
th[aria-sort] .th { color: var(--ink); }
th[aria-sort] .th .icon { opacity: 1; color: var(--gold); }
.grid-table td { padding: 8px 10px; border-bottom: 1px solid rgba(32, 53, 74, 0.7); vertical-align: middle; font-size: 15.5px; }
.grid-table tbody tr { transition: background 120ms; }
.grid-table.opp tbody tr, .grid-table tbody tr[tabindex] { cursor: pointer; }
.grid-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.grid-table tbody tr.selected { background: linear-gradient(90deg, rgba(74, 163, 200, 0.24), rgba(74, 163, 200, 0.1)); box-shadow: inset 0 0 0 1px var(--sel-line); }
.grid-table tbody tr.locked .rcp-name { color: var(--ink-2); }
.grid-table tbody tr.locked .item-icon img { filter: saturate(0.5) brightness(0.8); }
.rcp { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rcp-text { min-width: 0; }
.rcp-name { display: flex; align-items: center; gap: 8px; min-width: 0; font: 600 16px var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcp-name .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid-table.fixed { table-layout: fixed; }
.grid-table.fixed th.col-cost, .grid-table.fixed th.col-sale { width: 108px; }
.grid-table.fixed th.col-profit { width: 102px; }
.grid-table.fixed th.col-roi { width: 80px; }
.grid-table.fixed th.col-7d { width: 82px; }
.grid-table.fixed th.col-go { width: 30px; }
.grid-table.fixed td:first-child { overflow: hidden; }
.rcp-sub { display: flex; flex-wrap: wrap; gap: 0 10px; align-items: center; font-size: 13.5px; color: var(--ink-3); white-space: nowrap; }
/* A long name wraps rather than losing its end: the end often tells two items apart. */
.grid-table .rcp-name .t { white-space: normal; }
.rcp-sub .weak { display: inline-flex; align-items: center; gap: 5px; color: var(--warn); }
.rcp-sub .weak .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.rcp-sub .lockd { display: inline-flex; align-items: center; gap: 4px; }
.yield { flex: none; margin-left: 2px; padding: 0 7px; border: 1px solid var(--line-2); border-radius: 9px; background: rgba(255, 255, 255, 0.04); color: var(--ink-2); font: 600 12px/18px var(--sans); }
.ov-name b .yield, .rcp-name.link .yield { margin-left: 8px; }
.hero-yield { margin-top: 8px; color: var(--ink-2); font-size: 14.5px; }
/* ---------- gathering ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chips button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 17px; background: var(--field); color: var(--ink-2); font: 500 15px var(--sans); cursor: pointer; }
.chips button:hover { color: var(--ink); border-color: var(--gold-3); }
.chips button[aria-selected="true"] { color: #fff; border-color: var(--sel-line); background: rgba(74, 163, 200, 0.24); }
.chips .n { color: var(--ink-3); font-size: 12.5px; }
.chips button[aria-selected="true"] .n { color: var(--ink-2); }
.cell-sub { margin-top: 2px; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
.rcp.small { gap: 10px; }
.rcp.small .rcp-name { font-size: 15px; }
.use-badge { display: inline-block; padding: 3px 11px; border: 1px solid; border-radius: 6px; font: 700 13px var(--sans); letter-spacing: 0.04em; white-space: nowrap; }
.use-badge.craft { color: var(--pos); border-color: rgba(95, 214, 143, 0.5); background: rgba(95, 214, 143, 0.1); }
.use-badge.sell { color: var(--gold-2); border-color: rgba(201, 163, 94, 0.55); background: rgba(201, 163, 94, 0.1); }
.weak { display: inline-flex; align-items: center; gap: 5px; color: var(--warn); }
.weak .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }
.weak.off { color: var(--ink-3); }
.weak.off .dot { background: var(--off); }
.grid-table.gather { table-layout: fixed; }
.grid-table.gather th.col-mat { width: 27%; }
.grid-table.gather th.col-use { width: 10%; }
.grid-table.gather th.col-raw, .grid-table.gather th.col-crafted { width: 12%; }
.grid-table.gather th.col-craft { width: 29%; }
.grid-table.gather th.col-7d { width: 84px; }
.grid-table.gather th.col-go { width: 34px; }
.grid-table.gather td { overflow: hidden; }
.grid-table.gather tbody tr { cursor: pointer; }
.grid-table.gather tbody tr.open { background: rgba(74, 163, 200, 0.1); }
.grid-table.gather tr.detail-row { cursor: default; background: rgba(5, 13, 21, 0.45); }
.grid-table.gather tr.detail-row:hover { background: rgba(5, 13, 21, 0.45); }
/* Not clipped: a clipping cell would also hold its content in place while the table scrolls. */
.grid-table.gather tr.detail-row > td { overflow: visible; }
.detail-row td { padding: 12px 18px 14px 60px; white-space: normal; }
.uses-lead { margin-bottom: 10px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.uses-lead b { color: var(--pos); }
.use-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.use-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(32, 53, 74, 0.6); }
.use-list li:last-child { border-bottom: 0; }
.use-list li.locked .t { color: var(--ink-2); }
.use-list .nm { display: grid; min-width: 0; }
.use-list .nm .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.use-list .src { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--ink-3); font-size: 12.5px; }
.use-list .val { display: grid; justify-items: end; }
.gather-note { margin: 10px 4px 4px; }
.q-badge { padding: 0 6px; border-radius: 9px; background: rgba(74, 163, 200, 0.22); border: 1px solid rgba(98, 176, 214, 0.4); color: var(--ink); font: 600 11.5px/16px var(--sans); }
.profit { font-weight: 700; font-size: 16.5px; }
.col-go { width: 34px; padding-right: 8px !important; color: var(--ink-3); }
tr.selected .col-go { color: var(--ink); }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 4px 6px; font-size: 14.5px; }

.kina { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.coin { display: inline-block; flex: none; width: 15px; height: 15px; background: url(img/coin.svg) center / contain no-repeat; filter: drop-shadow(0 0 3px rgba(240, 200, 110, 0.35)); }

.item-icon {
  position: relative; display: inline-grid; place-items: center; flex: none; overflow: hidden; border-radius: 6px; color: var(--ink-3);
  border: 1px solid var(--line-2); background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.09), rgba(0, 0, 0, 0.3)), #0a1520;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45);
}
.item-icon img { width: 100%; height: 100%; object-fit: cover; }
.item-icon.g-Rare { border-color: rgba(109, 220, 152, 0.55); }
.item-icon.g-Legend { border-color: rgba(111, 180, 255, 0.6); }
.item-icon.g-Unique { border-color: rgba(242, 198, 90, 0.65); box-shadow: inset 0 0 10px rgba(242, 198, 90, 0.18); }
.item-icon.g-Epic { border-color: rgba(236, 125, 149, 0.6); box-shadow: inset 0 0 10px rgba(236, 125, 149, 0.16); }
.item-icon.g-Mythic { border-color: rgba(255, 143, 94, 0.65); box-shadow: inset 0 0 10px rgba(255, 143, 94, 0.18); }
.item-icon.g-Special { border-color: rgba(201, 139, 255, 0.6); }

.spark { display: inline-block; vertical-align: middle; }
.spark .line { fill: none; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.spark .area { stroke: none; opacity: 0.16; }
.spark.up .line { stroke: var(--pos); }
.spark.up .area { fill: var(--pos); }
.spark.down .line { stroke: var(--neg); }
.spark.down .area { fill: var(--neg); }
.spark.flat .line { stroke: var(--ink-3); }
.spark.flat .area { fill: var(--ink-3); }
.spark .none { stroke: var(--line-2); stroke-dasharray: 2 4; }

.change { display: inline-block; min-width: 62px; padding: 2px 8px; border: 1px solid; border-radius: 6px; font: 600 13.5px var(--sans); text-align: center; }
.change.good { color: var(--pos); border-color: rgba(95, 214, 143, 0.45); background: rgba(95, 214, 143, 0.1); }
.change.warn { color: var(--warn); border-color: rgba(233, 180, 76, 0.45); background: rgba(233, 180, 76, 0.1); }
.change.flat { color: var(--ink-3); border-color: var(--line-2); }

.pager { display: flex; align-items: center; gap: 6px; }
.pg { display: inline-grid; place-items: center; min-width: 32px; height: 30px; padding: 0 7px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--ink-2); font: 600 14.5px var(--sans); cursor: pointer; }
.pg:hover:not(:disabled) { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.pg:first-child, .pg:last-child { border-color: var(--line-2); }
.pg[aria-current="page"] { color: #fff; border-color: var(--sel-line); background: rgba(74, 163, 200, 0.24); }
.pg:disabled { opacity: 0.4; cursor: default; }
.pager .gap { padding: 0 2px; color: var(--ink-3); }

/* ---------- section heads and the materials strip ---------- */
/* Title and link share a baseline; the rule between them sits on the title's middle. */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 14px; }
.flourish { flex: 0 1 96px; min-width: 24px; align-self: center; height: 12px; background: url(img/rule.svg) left center / 100% 100% no-repeat; opacity: 0.9; }
.section-head .more { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 15px; text-decoration: none; }
.section-head .more:hover { color: var(--gold-2); }
.watch-strip { padding: 16px 20px 18px; }
.mat-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mat-card { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; padding: 4px 16px; }
.mat-card:first-child { padding-left: 0; }
.mat-card + .mat-card { border-left: 1px solid var(--line); }
.mc-text { min-width: 0; }
.mc-name { font: 600 16px var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-row { display: flex; align-items: center; gap: 12px; margin-top: 5px; font-size: 18px; }
.mc-note { margin-top: 3px; color: var(--ink-3); font-size: 12.5px; }
.mat-card .star { margin-left: auto; }

/* ---------- crafting profits layout and the details ---------- */
.crafts-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
.crafts-layout.has-details { grid-template-columns: minmax(0, 1fr) minmax(430px, var(--det-w)); }
.crafts-main { min-width: 0; }
.details {
  position: sticky; top: calc(var(--top-h) + 16px); display: flex; flex-direction: column; max-height: calc(100vh - var(--top-h) - 32px);
  margin-bottom: 0; padding: 0; border-color: var(--line-gold);
  background: linear-gradient(180deg, rgba(17, 33, 50, 0.96), rgba(11, 23, 36, 0.97));
}
.det-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px 20px; }
.det-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.det-actions { display: inline-flex; gap: 2px; }
.eyebrow-sm { font: 600 13px var(--display); letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-2); }
.hero { display: flex; align-items: center; gap: 16px; margin: 2px 0 14px; }
.hero-icon { position: relative; display: grid; place-items: center; flex: none; width: 116px; height: 116px; }
.hero-icon .rune { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-icon .item-icon { box-shadow: 0 0 26px rgba(242, 198, 90, 0.22), inset 0 0 0 1px rgba(0, 0, 0, 0.45); }
.hero-text { min-width: 0; }
.hero-text h2 { margin-bottom: 9px; font: 600 26px/1.15 var(--sans); color: var(--ink); }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--ink-2); font-size: 16px; }
.hero-meta .sep { width: 1px; height: 18px; background: var(--line-2); }
.hero-meta .prof { display: inline-flex; align-items: center; gap: 6px; }
.grade-badge { padding: 2px 11px; border: 1px solid currentColor; border-radius: 4px; background: rgba(0, 0, 0, 0.28); font: 700 13px var(--sans); letter-spacing: 0.1em; text-transform: uppercase; }
.grade-badge.g-Common { color: var(--g-common); }
.grade-badge.g-Rare { color: var(--g-rare); }
.grade-badge.g-Legend { color: var(--g-legend); }
.grade-badge.g-Unique { color: var(--g-unique); }
.grade-badge.g-Epic { color: var(--g-epic); }
.grade-badge.g-Mythic { color: var(--g-mythic); }
.grade-badge.g-Special { color: var(--g-special); }
.lock-note { display: flex; align-items: center; gap: 6px; margin-top: 9px; color: var(--warn); font-size: 13.5px; }
.profit-box { margin-bottom: 16px; padding: 12px 16px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(5, 13, 21, 0.5); }
.pb-label { font: 600 12.5px var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-2); text-align: center; }
.pb-row { position: relative; display: flex; align-items: center; justify-content: center; margin: 4px 0 8px; min-height: 52px; }
.pb-value { font: 700 46px/1.05 var(--sans); letter-spacing: -0.01em; text-shadow: 0 0 22px rgba(95, 214, 143, 0.25); }
.pb-value.neg { text-shadow: 0 0 22px rgba(255, 123, 123, 0.2); }
.roi-badge { position: absolute; right: 0; padding: 4px 10px; border: 1px solid; border-radius: 6px; font: 700 15px var(--sans); }
.roi-badge.pos { color: var(--pos); border-color: rgba(95, 214, 143, 0.55); background: rgba(95, 214, 143, 0.08); }
.roi-badge.neg { color: var(--neg); border-color: rgba(255, 123, 123, 0.5); background: rgba(255, 123, 123, 0.08); }
.pb-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 14px; color: var(--ink-3); font-size: 13.5px; }
.liq { display: inline-flex; align-items: center; gap: 6px; }
.liq.good { color: var(--pos); }
.liq.warn { color: var(--warn); }
.liq.bad { color: var(--neg); }
.liq .vr { width: 1px; height: 14px; margin: 0 4px; background: var(--line-2); }
.pb-warn { display: flex; gap: 9px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 13px; }
.pb-warn .lamp { margin-top: 5px; }
.pb-warn b { color: var(--warn); }
.outcome-pl { margin: -4px 0 16px; padding: 10px 14px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(5, 13, 21, 0.35); font-size: 14.5px; }
.opl-head { margin-bottom: 4px; color: var(--ink-2); font: 600 12px var(--sans); letter-spacing: 0.18em; text-transform: uppercase; }
.opl-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid rgba(32, 53, 74, 0.6); }
.opl-row:last-of-type { border-bottom: 0; }
.opl-p { color: var(--ink-2); text-align: right; }
.opl-what { min-width: 0; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opl-row .kina { font-weight: 600; }
.opl-note { display: flex; gap: 9px; margin-top: 8px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; }
.opl-note .lamp { margin-top: 5px; }
.opl-note b { color: var(--ink); }
.opl-note b:first-child { color: var(--warn); }
.tab-body { padding: 12px 14px 14px; border: 1px solid var(--line-gold); border-radius: 0 8px 8px 8px; background: rgba(6, 14, 22, 0.38); }
.tabbar.small button[aria-selected="true"] { border-color: var(--line-gold); border-bottom-color: transparent; }
.sub-h { margin: 4px 0 8px; font: 600 16px var(--sans); color: var(--ink); }
.sub-h .muted { font-weight: 400; font-size: 14px; }
.mats, .price-rows { margin: 0; padding: 0; list-style: none; }
.mats li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(32, 53, 74, 0.7); }
.price-rows li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto auto; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(32, 53, 74, 0.7); }
.mats .nm, .price-rows .nm { display: grid; min-width: 0; }
.mats .nm > span:first-child, .price-rows .nm > span:first-child { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mats .src, .price-rows .src { color: var(--ink-3); font-size: 12.5px; }
.mats .x { color: var(--ink-2); }
.sums { display: grid; gap: 5px; margin: 12px 0 14px; }
.sums div { display: flex; align-items: center; justify-content: space-between; color: var(--ink-2); font-size: 15px; }
.sums dt, .sums dd { margin: 0; }
.sums .strong { padding-top: 7px; border-top: 1px solid var(--line-2); color: var(--ink); font-size: 17px; font-weight: 700; }
.sums .strong + .strong { padding-top: 0; border-top: 0; }
.det-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 16px 0 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ctl { display: inline-flex; align-items: center; gap: 12px; }
.ctl-label { color: var(--ink-2); font-size: 15.5px; }
.info { display: inline-grid; place-items: center; color: var(--ink-3); cursor: help; }
.det-buttons { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.in-queue { padding: 1px 9px; border-radius: 10px; background: rgba(0, 0, 0, 0.25); font-size: 12.5px; font-weight: 600; }
.det-loading { padding: 40px 0; color: var(--ink-3); text-align: center; }

.outcome { display: flex; gap: 2px; height: 28px; overflow: hidden; border-radius: 4px; }
.outcome .part { display: grid; place-items: center; min-width: 0; font: 700 12px var(--sans); color: #08121c; }
.outcome .normal, .sw.normal { background: #b6c1cc; }
.outcome .combo, .sw.combo { background: var(--g-unique); }
.outcome .fail, .sw.fail { background: #c63a3c; color: #fff; }
.legend { display: grid; gap: 4px; margin: 8px 0 4px; padding: 0; list-style: none; font-size: 13.5px; color: var(--ink-2); }
.legend b { color: var(--ink); }
.sw { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 2px; }
.evidence-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.evidence-list li { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-2); font-size: 14px; }
.evidence-list .lamp { margin-top: 6px; }
.evidence-list b { color: var(--ink); }

.chart svg { display: block; touch-action: pan-y; }
.chart .grid line { stroke: rgba(46, 72, 97, 0.55); }
.chart .axis { fill: var(--ink-3); font: 500 11.5px var(--sans); }
.chart .series path { fill: none; stroke-width: 2.2; stroke-linejoin: round; }
.chart .series.gold path { stroke: #e8c06b; }
.chart .series.gold circle { fill: #e8c06b; }
.chart .series.blue path { stroke: #74b6ff; }
.chart .series.blue circle { fill: #74b6ff; }
.chart .series.green path { stroke: var(--pos); }
.chart .series.green circle { fill: var(--pos); }
.chart .cross { stroke: var(--ink-3); stroke-dasharray: 3 3; }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 6px; color: var(--ink-2); font-size: 13px; }
.chart-legend .key i { display: inline-block; width: 18px; height: 3px; margin-right: 7px; border-radius: 2px; vertical-align: middle; }
.chart-legend .gold i { background: #e8c06b; }
.chart-legend .blue i { background: #74b6ff; }
.chart-legend .green i { background: var(--pos); }
.chart-legend .read { margin-left: auto; color: var(--ink); }
.chart-empty { padding: 22px 8px; color: var(--ink-3); text-align: center; }

/* ---------- price details and the first prices ---------- */
.sync-wrap { position: relative; }
/* A floating box under the price chip, like the alerts: it covers the page instead of pushing it down. */
.sync-details {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; width: 460px; max-height: 70vh; overflow: auto; padding: 14px 18px 16px;
  background: var(--panel-solid); border: 1px solid var(--line-gold); border-radius: 10px; box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55); font-size: 14px; white-space: normal;
}
.sync-head { display: flex; align-items: center; gap: 10px; margin: 0 -8px 10px 0; }
.sync-head b { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); }
.sync-details dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; margin: 0; }
.sync-details dt { color: var(--ink-3); }
.sync-details dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.first-fetch { max-width: 720px; padding: 28px 30px; border-color: var(--line-gold); }
.first-fetch h2 { display: flex; align-items: center; gap: 10px; margin: 12px 0 8px; font: 600 28px/1.15 var(--serif); color: var(--ink); }
.first-fetch p { margin-bottom: 18px; color: var(--ink-2); font-size: 15.5px; }
.meter { position: relative; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.meter > span { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: linear-gradient(90deg, #3388b0, #8fd0ea); box-shadow: 0 0 12px rgba(74, 163, 200, 0.5); transition: width 400ms cubic-bezier(0.16, 1, 0.3, 1); }
.meter-scale { display: flex; justify-content: space-between; margin-top: 8px; color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- overview, watchlist, queue, inventory ---------- */
/* The overview: two zones on one 3:2 split, so the gutters line up; panels in a zone end level;
   rows share their list's column tracks, so icons, trends, badges and figures align down a list. */
.ov { container: ov / inline-size; }
.ov-zone { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.ov-zone + .ov-zone { margin-top: 30px; }
.ov-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.ov-panel { display: flex; flex-direction: column; margin: 0; isolation: isolate; container: ovp / inline-size; }
@container ovp (max-width: 400px) {
  .section-head .flourish { display: none; }
}
.ov-list { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; column-gap: 14px; }
.ov-cols, .ov-row { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; }
.ov-cols { align-items: end; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); color: var(--ink-3); font: 600 11.5px/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; }
.ov-cols .r { text-align: right; }
.ov-row { position: relative; align-items: first baseline; padding: 9px 0; border-bottom: 1px solid rgba(32, 53, 74, 0.7); color: inherit; text-decoration: none; }
.ov-row:last-child { border-bottom: 0; }
.ov-row::before { content: ''; position: absolute; inset: 0 -10px; z-index: -1; border-radius: 6px; transition: background 120ms; }
a.ov-row:hover::before { background: rgba(255, 255, 255, 0.035); }
.ov-row > .item-icon, .ov-row > .spark, .ov-row > .use-badge, .ov-row > .star { align-self: center; }
.ov-row > .use-badge { min-width: 72px; text-align: center; }
.ov-name { display: grid; gap: 2px; min-width: 0; }
.ov-name b { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--ink); font: 600 15.5px/1.3 var(--sans); }
.ov-sub { display: flex; flex-wrap: wrap; gap: 0 10px; color: var(--ink-3); font-size: 13.5px; }
.ov-fig { display: grid; justify-items: end; gap: 2px; text-align: right; white-space: nowrap; }
.ov-fig > b { color: var(--ink); font: 700 17px/1.3 var(--sans); }
.ov-fig > b.pos { color: var(--pos); }
.ov-empty { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.ov-note { margin-top: auto; padding-top: 12px; color: var(--ink-3); font-size: 13.5px; }
.ov-facts { display: grid; margin: 0; }
.ov-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid rgba(32, 53, 74, 0.6); }
.ov-facts > div:last-child { border-bottom: 0; }
.ov-facts dt { color: var(--ink-2); font-size: 14.5px; }
.ov-facts dd { margin: 0; color: var(--ink); font-size: 15.5px; font-weight: 600; text-align: right; }
.lv-read { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.lv-prof { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-2); font: 600 17px var(--sans); }
.lv-levels { display: inline-flex; align-items: baseline; gap: 8px; color: var(--ink-2); font: 600 22px/1 var(--sans); }
.lv-levels b { color: var(--route); font-size: 31px; }
.lv-levels .icon { align-self: center; color: var(--ink-3); }
.lv-dial { margin: 12px 0 4px; }
@container ov (min-width: 640px) {
  .ov-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container ov (min-width: 860px) {
  .ov-mat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container ov (min-width: 1000px) {
  .ov-craft, .ov-mat { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .ov-side { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
}
@container ov (max-width: 479px) {
  .ov-opps, .ov-gl { grid-template-columns: auto minmax(0, 1fr) auto; }
  .ov-opps .ov-trend { display: none; }
  .ov-gl .use-badge, .ov-gl .ov-cols > :nth-child(3) { display: none; }
  .ov-gl .ov-fig > .ov-sub { max-width: 7.5em; white-space: normal; }
  .ov-name b { -webkit-line-clamp: 3; }
}
.plain-list, .alert-list { margin: 0; padding: 0; list-style: none; }
.plain-list li, .alert-list li { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(32, 53, 74, 0.7); color: var(--ink-2); }
.plain-list b, .alert-list b { color: var(--ink); }
.inv-add { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ---------- mastery ---------- */
.advice-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.advice-card p { margin: 10px 0 12px; color: var(--ink-2); font-size: 16px; }
.advice-card b { color: var(--ink); }
.advice-card.route { border-color: rgba(255, 138, 61, 0.42); }
.advice-card p.econ { margin-top: -2px; font-size: 14.5px; }
.advice-card p.econ:empty { display: none; }
.dials { display: grid; gap: 14px; }
.dial-row { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; margin: 0; padding: 16px 18px 12px; }
.dial-side .prof { display: flex; align-items: center; gap: 8px; color: var(--gold-2); font: 600 17px var(--sans); }
.dial-side .level { margin: 6px 0 4px; font: 700 36px/1.1 var(--sans); }
.dial-side .level small { margin-left: 6px; color: var(--ink-3); font-size: 13px; font-weight: 500; }
.dial-side .best { margin-top: 4px; color: var(--ink-2); font-size: 13.5px; }
.dial-main { min-width: 0; }
.dial-empty { padding: 28px 0; color: var(--ink-3); }
.dial-svg { display: block; touch-action: pan-y; }
.dial-svg text { paint-order: stroke; stroke: var(--panel-solid); stroke-width: 4px; stroke-linejoin: round; }
.dial-svg .past { fill: rgba(255, 255, 255, 0.025); }
.dial-svg .grid { stroke: var(--line); }
.dial-svg .scale-label, .dial-svg .tick-label { fill: var(--ink-3); font: 500 11.5px var(--sans); }
.dial-svg .area { fill: rgba(217, 179, 106, 0.09); }
.dial-svg .curve { fill: none; stroke: var(--gold); stroke-width: 2; }
.dial-svg .axis { stroke: var(--line-2); }
.dial-svg .tick { stroke: var(--line-2); }
.dial-svg .tick.major { stroke: var(--ink-3); }
.dial-svg .target-line { stroke: var(--ink-3); stroke-dasharray: 3 3; }
.dial-svg .target-label { fill: var(--ink-2); font: 600 11.5px var(--sans); }
.dial-svg .target-mark { fill: var(--ink-3); }
.dial-svg .route-line { stroke: var(--route); stroke-width: 1.5; }
.dial-svg .route-label { fill: var(--route); font: 700 11.5px var(--sans); }
.dial-svg .route-mark { fill: var(--route); }
.dial-svg .station { fill: var(--panel-solid); stroke: var(--gold); stroke-width: 1.5; }
.dial-svg .station-line { stroke: var(--line-2); }
.dial-svg .plate { fill: var(--panel-solid); stroke: none; }
.dial-svg .station-label { fill: var(--ink-2); font: 500 11px var(--sans); stroke: none; }
.dial-svg .hover-line { stroke: var(--ink-3); stroke-dasharray: 2 3; }
.dial-svg .needle { stroke: var(--ink); stroke-width: 1.5; }
.dial-svg .dot { fill: var(--gold-2); }
.dial-svg .needle-value { fill: var(--ink); font: 700 12px var(--sans); }
.dial-svg .knob { fill: var(--gold-2); stroke: var(--panel-solid); stroke-width: 3; cursor: grab; }
.dial-svg .knob-group:focus { outline: none; }
.dial-svg .knob-group:focus-visible .knob { stroke: var(--teal-2); }
.dial-readout { display: flex; align-items: center; gap: 12px; height: 34px; color: var(--ink-2); font-size: 14px; }
.dial-readout .read-text { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dial-readout .read-text > span + span { margin-left: 12px; }
.dial-readout .read-actions { display: flex; flex: none; gap: 8px; }
.dial-readout .lvl { color: var(--gold-2); font-weight: 700; }
.dial-more summary { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--ink-2); cursor: pointer; list-style: none; }
.dial-more summary::-webkit-details-marker { display: none; }
.dial-more[open] summary .icon { transform: rotate(90deg); }
.steps .yield { margin-left: 6px; }
.steps .nm { white-space: nowrap; }
.steps .est { margin-left: 3px; color: var(--ink-3); font-size: 11.5px; font-weight: 500; }
.steps tr.quest td { color: var(--ink-3); }
.ways { margin: 10px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.ways-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-bottom: 10px; color: var(--ink-2); font-size: 14.5px; }
.ways-head b { color: var(--ink); }
.ways-head .muted { font-size: 13px; }
.ways .chips { margin-bottom: 10px; }
.ways-sum { margin: 0 0 4px; color: var(--ink-2); font-size: 14px; }
.ways-sum b { color: var(--ink); }
.ways-sum b.pos { color: var(--pos); }
.ways-sum b.neg { color: var(--neg); }
.ways-note { max-width: 1100px; margin-top: 14px; }
.ways-note a { color: var(--ink-2); }
.steps { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 13.5px; }
.steps th, .steps td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.steps th { color: var(--ink-2); font-weight: 600; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.steps .r { text-align: right; }
.mini-dial .track { stroke: var(--line-2); stroke-width: 3; stroke-linecap: round; }
.mini-dial .done { stroke: var(--ink-3); stroke-width: 3; stroke-linecap: round; }
.mini-dial .to { stroke: var(--route); stroke-width: 3; stroke-linecap: round; }
.mini-dial .here { fill: var(--ink); stroke: var(--panel-solid); stroke-width: 2; }
.mini-dial .target { fill: var(--route); }
.mini-dial text { fill: var(--ink-3); font: 500 11px var(--sans); }
.updating { opacity: 0.62; transition: opacity 160ms ease-out; }

/* ---------- forms ---------- */
.form { display: grid; gap: 22px; }
.field label, .field .label { display: block; margin-bottom: 8px; color: var(--ink-2); font: 600 12.5px var(--sans); letter-spacing: 0.16em; text-transform: uppercase; }
.field select.field-input { width: 100%; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.suffix { display: flex; align-items: center; gap: 8px; }
.suffix span { color: var(--ink-3); }
.hint { margin-top: 7px; color: var(--ink-3); font-size: 14px; }
.mastery-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.mastery-grid .m { margin: 0 !important; letter-spacing: 0 !important; text-transform: none !important; }
.mastery-grid .m span { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--ink); font: 500 14.5px var(--sans); }
.mastery-grid .m .icon { color: var(--gold); }
.field.narrow { max-width: 280px; }
.actions { display: flex; gap: 12px; }
.form-panel { padding: 28px 30px; border-color: var(--line-gold); }
.fine-panel p { margin-bottom: 6px; color: var(--ink-3); font-size: 14px; }

/* ---------- sign-in page ---------- */
.auth { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 440px; margin: 0; padding: 34px 34px 28px; border-color: var(--line-gold); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; }
.auth .wordmark { display: inline !important; font-size: 28px; }
.auth .tagline.auth-tagline { display: block; margin-top: 10px; text-align: center; }
.auth-pitch { margin: 16px auto 0; max-width: 330px; color: var(--ink-2); font: 500 19px/1.35 var(--serif); text-align: center; }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; margin: 24px 0 22px; border-bottom: 1px solid var(--line); }
.auth-switch button {
  height: 44px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none;
  color: var(--ink-2); font: 500 16.5px var(--sans); cursor: pointer; transition: color 140ms, border-color 140ms;
}
.auth-switch button:hover { color: var(--ink); }
.auth-switch button[aria-selected="true"] { color: var(--gold-2); border-bottom-color: var(--gold); }
.auth-form { gap: 18px; }
.auth-form .btn { width: 100%; margin-top: 4px; }
.auth-form-err { margin-top: 0; }
.auth-fine { margin-top: 0; text-align: center; }
input.field-input[aria-invalid="true"] { border-color: rgba(229, 72, 77, 0.7); }
@media (max-width: 480px) {
  .auth { place-items: start center; padding-top: 20px; }
  .auth-card { padding: 28px 20px 22px; }
  .auth .wordmark { font-size: 24px; }
}

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 70; display: grid; gap: 10px; justify-items: end; }
.toast {
  display: flex; align-items: center; gap: 10px; max-width: 420px; padding: 12px 16px;
  border: 1px solid var(--line-gold); border-radius: 8px; background: rgba(12, 24, 37, 0.97); color: var(--ink); font-size: 14.5px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5); animation: toast-in 240ms cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.good .icon { color: var(--pos); }
.toast.bad .icon { color: var(--neg); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.pane-enter-active { transition: opacity 180ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms cubic-bezier(0.16, 1, 0.3, 1); }
.pane-enter-from { opacity: 0; transform: translateX(14px); }

/* ---------- widths ---------- */
/* Beside the recipe panel the ranking keeps its deciding columns; the panel itself shows the costs. */
@media (min-width: 1361px) and (max-width: 1600px) {
  .crafts-layout.has-details .grid-table.opp .col-cost, .crafts-layout.has-details .grid-table.opp .col-sale { display: none; }
}
@media (max-width: 1700px) { :root { --det-w: 500px; } }
@media (max-width: 1560px) { :root { --det-w: 470px; } }
@media (max-width: 1400px) {
  :root { --side-w: 208px; }
  :root { --main-pad: 20px; }
  .main { padding-top: 20px; padding-bottom: 40px; }
  .crafts-layout.has-details { grid-template-columns: minmax(0, 1fr) minmax(400px, 440px); }
  .kpi { padding: 14px 16px; gap: 14px; }
  .kpi-value .v { font-size: 27px; }
  .kpi-label { letter-spacing: 0.14em; }
  .side-nav a, .side-link { gap: 12px; padding: 0 12px; font-size: 15.5px; }
}
@media (max-width: 1360px) {
  .crafts-layout.has-details { grid-template-columns: minmax(0, 1fr); }
  .details { position: fixed; top: var(--top-h); right: 0; bottom: 0; z-index: 35; width: min(560px, 100vw); max-height: none; border-radius: 0; border-width: 0 0 0 1px; box-shadow: -24px 0 44px rgba(0, 0, 0, 0.55); }
  .details .orn { display: none; }
}
@media (max-width: 980px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav-toggle { display: inline-grid !important; }
  .sidebar { position: fixed; top: var(--top-h); left: 0; bottom: 0; z-index: 45; width: 264px; height: auto; transform: translateX(-102%); transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 20px 0 40px rgba(0, 0, 0, 0.5); }
  .shell.nav-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: var(--top-h) 0 0 0; z-index: 40; background: rgba(0, 0, 0, 0.5); }
  .main { grid-column: 1; }
  .tagline, .brand-rule { display: none; }
  .kpis, .kpis.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(odd) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .advice-cards { grid-template-columns: minmax(0, 1fr); }
  .mat-cards { grid-template-columns: minmax(0, 1fr); }
  .mat-card { padding: 10px 0; }
  .mat-card + .mat-card { border-left: 0; border-top: 1px solid var(--line); }
  .dial-row { grid-template-columns: minmax(0, 1fr); }
  .page-head { flex-wrap: wrap; align-items: flex-start; }
}
@media (max-width: 760px) {
  :root { --top-h: 56px; }
  /* The reading takes its own line and the buttons the next, both always reserved. */
  .dial-readout { flex-wrap: wrap; height: 72px; align-content: flex-start; row-gap: 6px; }
  .dial-readout .read-text { flex-basis: 100%; }
  .topbar { gap: 4px; padding: 0 8px; }
  .brand { gap: 8px; }
  .emblem { width: 36px; height: 23px; }
  .wordmark, .hdr-refresh { display: none !important; }
  .hdr-field { height: 34px; }
  .hdr-field select { font-size: 14px; padding-right: 26px; max-width: 120px; }
  .hdr-field.faction .icon { display: none; }
  .hdr-field.world { display: none; }
  /* A phone shows one phrase that stands alone: "12 min old", "checking 5/12", "retry 17:53". */
  .sync-chip > :not(.lamp):not(.compact) { display: none; }
  .sync-chip > .compact { display: inline; color: var(--ink); font-weight: 600; }
  :root { --main-pad: 14px; }
  .main { padding-top: 16px; padding-bottom: 36px; }
  .page-head h1 { font-size: 31px; }
  .page-head .sub { font-size: 15px; }
  .kpis, .kpis.n4, .kpis.n2 { grid-template-columns: minmax(0, 1fr); }
  .kpi { border-left: 0 !important; }
  .kpi + .kpi { border-top: 1px solid var(--line); }
  .tabbar button { padding: 0 18px; font-size: 16px; }
  .only-wide { display: none !important; }
  .only-narrow { display: table-cell; }
  .table-card { padding: 12px 10px 6px; }
  /* A label longer than its column wraps instead of running into the next one. */
  .grid-table th { padding: 9px 8px; letter-spacing: 0.1em; white-space: normal; line-height: 1.25; vertical-align: bottom; }
  .grid-table td { padding: 8px 8px; font-size: 15px; }
  /* 168px for the pinned recipe column plus the fixed widths of the others. */
  .grid-table.opp.fixed { width: max(100%, 662px); }
  .grid-table:not(.fixed):not(.gather) { width: max-content; min-width: 100%; }
  .grid-table.gather { width: max(100%, 764px); }
  .grid-table.gather th.col-mat { width: 168px; }
  .grid-table.gather th.col-use { width: 90px; }
  .grid-table.gather th.col-raw { width: 96px; }
  .grid-table.gather th.col-crafted { width: 104px; }
  .grid-table.gather th.col-craft { width: 200px; }
  .grid-table.gather th.col-7d { width: 76px; }
  .grid-table.gather th.col-go { width: 30px; }
  /* The pinned name column: a fixed width, names wrapping instead of running under the numbers. */
  .grid-table td:first-child .rcp { width: 152px; gap: 9px; }
  .grid-table td:first-child .item-icon { width: 30px !important; height: 30px !important; }
  .grid-table td:first-child .rcp-name { display: block; white-space: normal; font-size: 14.5px; line-height: 1.25; }
  .grid-table td:first-child .rcp-name :is(.yield, .q-badge) { display: inline-block; margin-left: 6px; vertical-align: 1px; }
  .grid-table td:first-child .rcp-sub { flex-wrap: wrap; gap: 0 8px; white-space: normal; font-size: 12.5px; }
  .steps { min-width: 900px; }
  .steps.way { min-width: 620px; }
  .detail-row td { padding: 10px 10px 12px; }
  /* An opened gathering row reads within the screen while the table is scrolled sideways. */
  .table-wrap[data-scrolls] .detail-inner { position: sticky; left: 10px; width: calc(100cqw - 20px); padding-right: 22px; }
  .use-list li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .use-list li .btn { display: none; }
  .use-list .nm .t { white-space: normal; }
  .pager { flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
  .section-head { gap: 10px; }
  .pg { min-width: 30px; padding: 0 5px; }
  .grid-table.fixed th.col-profit { width: 92px; }
  .grid-table.fixed th.col-go { width: 24px; }
  .rcp-name .t { white-space: normal; }
  .search { max-width: none; flex-basis: 100%; }
  .details { width: 100vw; }
  .det-scroll { padding: 16px 16px 20px; }
  .pb-value { font-size: 38px; }
  .roi-badge { position: static; margin-left: 12px; }
  .det-buttons { grid-template-columns: minmax(0, 1fr); }
  .price-rows li { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .price-rows .spark, .price-rows .icon-btn { display: none; }
  .mastery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .form-panel { padding: 20px 18px; }
  .bell-pop { position: fixed; top: calc(var(--top-h) + 6px); left: 10px; right: 10px; width: auto; }
  .toasts { left: 14px; right: 14px; bottom: 14px; justify-items: stretch; }
  .sync-details { position: fixed; top: calc(var(--top-h) + 6px); left: 10px; right: 10px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; animation-iteration-count: 1 !important; }
}
