/* Right to Know — California Police Records Desk
   Visual language follows the LIONESS dashboard reference: near-black canvas,
   rounded charcoal cards, hairline borders, gold accent, circular icon rail. */

:root {
  --bg: #09090a;
  --bg-2: #0d0d0f;
  --panel: #141416;
  --panel-2: #191a1d;
  --panel-3: #1f2024;
  --line: #26272b;
  --line-soft: #1e1f22;
  --text: #f4f3f0;
  --text-2: #c9c8c4;
  --muted: #85858c;
  --muted-2: #63646b;
  --gold: #e3c193;
  --gold-2: #c9a06a;
  --gold-ink: #2a2013;
  --green: #86c48a;
  --red: #d97b6c;
  --blue: #8fb4d9;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; overflow-x: hidden; }

::selection { background: rgba(227, 193, 147, .28); }

/* ---------------------------------------------------------------- layout */

.app {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 22px 0 20px;
  border-right: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #0b0b0c 0%, #08080a 100%);
}

.rail-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 25%, #2c2a25, #14130f 70%);
  border: 1px solid #35322a;
  color: var(--gold);
  box-shadow: inset 0 0 0 3px rgba(227, 193, 147, .06);
}

.rail-mark svg { width: 20px; height: 20px; }

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.rail-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: #131316;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .18s ease;
}

.rail-btn svg { width: 19px; height: 19px; }

.rail-btn:hover { color: var(--text); background: #1b1b1f; }

.rail-btn.is-active {
  background: #f1efe9;
  color: #101011;
  border-color: #f1efe9;
  box-shadow: 0 8px 22px rgba(241, 239, 233, .12);
}

.rail-exit {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.rail-exit:hover { color: var(--gold); border-color: #3a362d; }

.canvas {
  padding: 20px 26px 30px 26px;
  max-width: 1560px;
  width: 100%;
}

/* ---------------------------------------------------------------- top bar */

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.stamp {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--muted);
  min-width: 176px;
}

.stamp b { color: var(--text-2); font-weight: 600; font-size: 13px; }

.searchwrap {
  flex: 1;
  max-width: 620px;
  position: relative;
}

.searchwrap svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted-2);
}

.searchwrap input {
  width: 100%;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #101012;
  color: var(--text);
  padding: 0 64px 0 42px;
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: .2s ease;
}

.searchwrap input::placeholder { color: var(--muted-2); }

.searchwrap input:focus {
  border-color: #3b372e;
  background: #121214;
  box-shadow: 0 0 0 4px rgba(227, 193, 147, .06);
}

.searchwrap .kbd {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 6px;
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-btn {
  height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: .18s ease;
}

.ghost-btn:hover { border-color: #3a362d; color: var(--text); }
.ghost-btn svg { width: 14px; height: 14px; }

.gold-btn {
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, #f0d3a6, #d8b184 55%, #c79a64);
  color: #241a0d;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(199, 154, 100, .18);
}

.gold-btn:hover { filter: brightness(1.04); }
.gold-btn svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- headings */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 20px;
}

.page-head h1 {
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 620;
  margin: 0 0 6px;
}

.page-head .sub { font-size: 12.5px; color: var(--muted); }
.page-head .sub b { color: var(--text-2); font-weight: 600; }

/* ---------------------------------------------------------------- cards */

.card {
  background: linear-gradient(180deg, #161618 0%, #121214 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-title {
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--text-2);
  font-weight: 600;
}

.card-sub { font-size: 10.5px; color: var(--muted-2); }

.dot-menu {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #17171a;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.dot-menu svg { width: 13px; height: 13px; }

/* ---------------------------------------------------------------- command grid */

.command {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr) 344px;
  gap: 16px;
  align-items: start;
}

.col { display: grid; gap: 16px; align-content: start; }

/* spotlight */
.spotlight { padding: 16px 16px 18px; }

.spotlight-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #131315;
}

.pill.live { color: #8fd2a1; border-color: #274232; background: #101a14; }
.pill.gold { color: var(--gold); border-color: #3a3226; background: #191510; }
.pill.force { color: #e0b48d; border-color: #3b3025; background: #1a1511; }
.pill.shooting { color: #e79a8c; border-color: #452725; background: #1c1211; }
.pill.misconduct { color: #acb7d8; border-color: #2b3247; background: #12141c; }

.spot-mono {
  height: 150px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 100% at 20% 0%, rgba(227, 193, 147, .16), transparent 60%),
    linear-gradient(160deg, #1c1c1f, #101012);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.spot-mono::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 22px);
  pointer-events: none;
}

.mono-mark {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--gold);
  background: #14130f;
  border: 1px solid #3a3428;
  box-shadow: 0 0 0 6px rgba(227, 193, 147, .04);
}

.spot-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: 4px;
}

.spot-meta { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.spot-meta b { color: var(--text-2); font-weight: 500; }

.spot-foot {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  align-items: center;
}

.spot-foot .ghost-btn { height: 34px; font-size: 11px; }

/* mini stats */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.stat-card { padding: 16px; }

.stat-num {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1;
  margin: 10px 0 6px;
  font-variant-numeric: tabular-nums;
}

.stat-label { font-size: 11px; color: var(--muted); }

/* constellation */
.constellation svg { display: block; width: 100%; max-height: 208px; height: auto; margin: 0 auto; }
.constellation .node-label { font-size: 7.6px; fill: #9b9ba2; }

/* feed */
.feed { padding: 16px; }

#feed-list {
  max-height: 580px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #2c2d32 transparent;
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 18px), transparent 100%);
}

#feed-list::-webkit-scrollbar { width: 5px; }
#feed-list::-webkit-scrollbar-thumb { background: #2c2d32; border-radius: 999px; }

.feed-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: .16s ease;
}

.feed-row:hover { background: #191a1d; border-color: #26272b; }

.feed-date {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.feed-date b { display: block; font-size: 13px; color: var(--text-2); font-weight: 600; }

.feed-main { min-width: 0; }

.feed-agency {
  font-size: 12.8px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-meta {
  font-size: 10.6px;
  color: var(--muted);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.feed-officers { color: var(--muted-2); }

.feed-right { text-align: right; }

.feed-pages {
  font-size: 12px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.feed-pages span { display: block; font-size: 9.5px; color: var(--muted-2); letter-spacing: .06em; text-transform: uppercase; }

.skeleton {
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(90deg, #17171a 25%, #1d1d21 37%, #17171a 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s infinite linear;
  margin: 8px 0;
}

@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 8px 2px;
  border-top: 1px solid var(--line-soft);
  margin-top: 10px;
}

.pager-info { font-size: 11px; color: var(--muted); }
.pager-btns { display: flex; gap: 6px; }

.pager-btns button {
  height: 28px;
  min-width: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #151517;
  color: var(--text-2);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.pager-btns button:disabled { opacity: .38; cursor: not-allowed; }
.pager-btns button:not(:disabled):hover { border-color: #3a362d; color: var(--text); }

/* ring + chart */
.ring-wrap { display: flex; align-items: center; gap: 16px; }
.ring-mid { text-align: center; }
.ring-mid b { font-size: 18px; font-weight: 600; }
.ring-mid span { display: block; font-size: 9.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .08em; }

.legend { display: grid; gap: 8px; flex: 1; }

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.legend-row i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.legend-row b { margin-left: auto; color: var(--text-2); font-weight: 500; font-variant-numeric: tabular-nums; }

.chart-wrap { position: relative; }
.chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-axis { font-size: 8.4px; fill: #63646b; }
.chart-axis-line { stroke: #232427; stroke-width: 1; }
.chart-bar { fill: #2a2b30; transition: fill .15s ease; }
.chart-bar.is-hot { fill: #e3c193; }
.chart-bar:hover { fill: #3a3b41; }
.chart-bar.is-hot:hover { fill: #f0d3a6; }

.chart-tip {
  position: absolute;
  transform: translate(-50%, -120%);
  background: #f1efe9;
  color: #16161a;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .12s ease;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .5);
}

.chart-tip.show { opacity: 1; }

/* filters */
.filter-group { margin-bottom: 16px; }
.filter-group:last-child { margin-bottom: 0; }

.filter-label {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 9px;
}

.type-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: #131315;
  margin-bottom: 7px;
  cursor: pointer;
  transition: .16s ease;
}

.type-toggle:hover { border-color: #333026; }

.type-toggle .tick {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1px solid #3a3b40;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #14130f;
}

.type-toggle .tick svg { width: 10px; height: 10px; opacity: 0; }

.type-toggle.on { border-color: #3f382b; background: #1a1712; }
.type-toggle.on .tick { background: var(--gold); border-color: var(--gold); }
.type-toggle.on .tick svg { opacity: 1; }

.type-toggle .tbody { min-width: 0; display: block; }
.type-toggle .tname { font-size: 12px; color: var(--text-2); display: block; }
.type-toggle .tdesc { font-size: 9.8px; color: var(--muted-2); line-height: 1.4; margin-top: 3px; display: block; }

select, input[type="date"] {
  width: 100%;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #111113;
  color: var(--text-2);
  font: inherit;
  font-size: 11.5px;
  padding: 0 10px;
  outline: none;
}

select:focus, input[type="date"]:focus { border-color: #3b372e; }

.date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.filter-actions { display: flex; gap: 8px; margin-top: 4px; }
.filter-actions .ghost-btn { flex: 1; justify-content: center; height: 34px; font-size: 11px; }

/* agency list */
.agency-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: var(--text-2);
  cursor: pointer;
}

.agency-row:last-child { border-bottom: 0; }
.agency-row:hover { color: var(--text); }
.agency-row .rank { width: 16px; font-size: 10px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.agency-row .count { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.agency-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* promo */
.promo {
  background: linear-gradient(150deg, #3a2f20 0%, #241f18 46%, #1a1712 100%);
  border-color: #3b3224;
}

.promo-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }

.promo-badge {
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid #4a3e2b;
  border-radius: 999px;
  padding: 4px 9px;
}

.promo h3 {
  font-size: 17px;
  margin: 0 0 6px;
  letter-spacing: -.01em;
  font-weight: 600;
}

.promo p { font-size: 11px; color: #b3a48d; margin: 0 0 14px; line-height: 1.55; }
.promo .gold-btn { height: 34px; font-size: 11px; }

/* ---------------------------------------------------------------- drawer */

.drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 5, .62);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
  z-index: 40;
}

.drawer-scrim.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(720px, 94vw);
  background: #0f0f11;
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(102%);
  transition: transform .28s cubic-bezier(.32, .72, 0, 1);
  z-index: 41;
  display: flex;
  flex-direction: column;
}

.drawer.open { transform: translateX(0); }

.drawer-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.drawer-head h2 { font-size: 17px; margin: 0 0 6px; letter-spacing: -.01em; font-weight: 600; }
.drawer-head .sub { font-size: 11.5px; color: var(--muted); }

.drawer-body { padding: 18px 20px 40px; overflow-y: auto; flex: 1; }

.close-btn {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #151517;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.close-btn:hover { color: var(--text); }

.dossier-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.dossier-stat {
  background: #141416;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.dossier-stat b { display: block; font-size: 20px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dossier-stat span { font-size: 9.6px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .07em; }

.section-title {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 22px 0 10px;
}

.officer-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #141416;
  font-size: 11.5px;
  color: var(--text-2);
  margin: 0 6px 6px 0;
  cursor: pointer;
}

.officer-chip:hover { border-color: #3a362d; color: var(--text); }
.officer-chip .av { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; background: #232428; color: var(--gold); }

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  margin-bottom: 8px;
  background: #131315;
}

.file-row:hover { border-color: #333026; }

.file-ico {
  width: 30px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid #343027;
  background: #1b1712;
  color: var(--gold-2);
  display: grid;
  place-items: center;
  font-size: 8px;
  letter-spacing: .06em;
  flex: 0 0 auto;
}

.file-meta { font-size: 11.5px; color: var(--text-2); min-width: 0; }
.file-meta span { display: block; font-size: 10px; color: var(--muted-2); margin-top: 2px; }
.file-act { margin-left: auto; font-size: 11px; color: var(--gold); text-decoration: none; white-space: nowrap; }

.highlight {
  border-left: 2px solid #3f382b;
  padding: 2px 0 2px 12px;
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-2);
}

.highlight mark { background: rgba(227, 193, 147, .18); color: var(--gold); padding: 0 2px; border-radius: 3px; }
.highlight .src { display: block; font-size: 10px; color: var(--muted-2); margin-top: 6px; }

.notice {
  border: 1px solid #3a3226;
  background: #191510;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 11px;
  line-height: 1.6;
  color: #c4b39a;
}

/* ---------------------------------------------------------------- analysis */

.analysis-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }
.analysis-grid.tight { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.analysis-grid .card.wide { grid-column: 1 / -1; }

.bars { display: grid; gap: 9px; }

.bar-row { display: grid; grid-template-columns: 168px 1fr 54px; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); }
.bar-row .track { display: block; height: 8px; border-radius: 999px; background: #1d1e21; overflow: hidden; }
.bar-row .fill { display: block; height: 100%; min-width: 2px; border-radius: 999px; background: linear-gradient(90deg, #5a4a33, var(--gold-2)); }
.bar-row b { text-align: right; color: var(--text-2); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- about */

.about-body { max-width: 820px; font-size: 13px; line-height: 1.75; color: var(--text-2); }
.about-body h2 { font-size: 15px; margin: 26px 0 8px; color: var(--text); letter-spacing: -.01em; }
.about-body p { margin: 0 0 12px; }
.about-body ul { margin: 0 0 14px; padding-left: 18px; }
.about-body li { margin-bottom: 6px; }
.about-body a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(227, 193, 147, .3); }
.about-body code { background: #17171a; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 11.5px; }

/* ---------------------------------------------------------------- misc */

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #f1efe9;
  color: #17171a;
  font-size: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: .22s ease;
  z-index: 60;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

.view { display: none; }
.view.active { display: block; }

.hidden { display: none !important; }

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #3a3b40;
  border-top-color: var(--gold);
  animation: spin .7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1240px) {
  .command { grid-template-columns: 260px minmax(0, 1fr); }
  .col-right { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .command { grid-template-columns: minmax(0, 1fr); }
  .col-right { grid-template-columns: minmax(0, 1fr); }
  .analysis-grid, .analysis-grid.tight { grid-template-columns: minmax(0, 1fr); }
  .app { grid-template-columns: 68px minmax(0, 1fr); }
  .canvas { padding: 16px 16px 26px; }
}

@media (max-width: 720px) {
  .app { grid-template-columns: 58px minmax(0, 1fr); }
  .rail { gap: 14px; padding: 14px 0 16px; }
  .rail-btn { width: 38px; height: 38px; }
  .rail-btn svg { width: 16px; height: 16px; }
  .rail-mark { width: 34px; height: 34px; }
  .canvas { padding: 14px 12px 26px; }
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .stamp { min-width: 0; order: 1; flex: 1; }
  .top-actions { order: 2; margin-left: auto; width: 100%; }
  .top-actions .ghost-btn, .top-actions .gold-btn { flex: 1; justify-content: center; min-width: 0; }
  .searchwrap { order: 3; flex-basis: 100%; max-width: none; }
  .page-head h1 { font-size: 22px; }
  .spot-mono { height: 118px; }
  .bar-row { grid-template-columns: 96px minmax(0, 1fr) 44px; }
  .dossier-stats { grid-template-columns: 1fr 1fr; }
  .drawer { width: 100vw; }
  #feed-list { max-height: none; mask-image: none; }
}

#big-type-legend { max-width: 540px; }
#big-type-legend .legend-row { font-size: 12px; }

.split-2 { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: center; }
.mini-facts { display: grid; gap: 2px; }
.fact { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.fact:last-child { border-bottom: 0; }
.fact b { display: block; font-size: 19px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.fact span { font-size: 10.6px; color: var(--muted); line-height: 1.5; }
@media (max-width: 980px) { .split-2 { grid-template-columns: minmax(0,1fr); } }

@media (max-width: 560px) {
  .top-actions { gap: 8px; }
  .top-actions .ghost-btn, .top-actions .gold-btn { padding: 0 10px; font-size: 11px; }
  .col, .card, .command, .analysis-grid { min-width: 0; }
  .spot-name { font-size: 15px; }
  .page-head h1 { font-size: 21px; }
}
