:root {
  --bg: #0b0d10;
  --panel: #13171c;
  --line: #232a32;
  --text: #e8e6e1;
  --muted: #8e959d;
  --accent: #d9a441;   /* tusk gold */
  --ok: #4fbf7a;
  --warn: #e0a43a;
  --bad: #e5605a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  background:
    radial-gradient(1200px 600px at 50% -10%, #1c2430 0%, transparent 60%),
    radial-gradient(800px 400px at 100% 110%, #2a1d10 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.center { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.card {
  width: 100%; max-width: 440px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.hero { text-align: center; }
.crest { width: 112px; height: 112px; border-radius: 50%; border: 2px solid var(--line); background: #000; }
.eyebrow { margin: 20px 0 4px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
h1 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.01em; }
.lede { color: var(--muted); margin: 10px 0 24px; }
.sso { display: inline-block; border-radius: 6px; transition: transform .12s ease, filter .12s ease; }
.sso:hover { transform: translateY(-1px); filter: brightness(1.08); }
.sso:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sso img { display: block; max-width: 100%; height: auto; }
.fine { color: var(--muted); font-size: 13px; margin: 18px 0 0; }
.alert { background: rgba(229,96,90,.12); border: 1px solid rgba(229,96,90,.4); color: #f3b3af; border-radius: 10px; padding: 10px 12px; font-size: 14px; }

.status { margin: 0 0 20px; font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 999px; display: inline-block; }
.status.ok { color: var(--ok); background: rgba(79,191,122,.12); }
.status.warn { color: var(--warn); background: rgba(224,164,58,.12); }
.who { display: flex; gap: 18px; align-items: center; }
.portrait { width: 96px; height: 96px; border-radius: 12px; border: 1px solid var(--line); flex: none; }
.name { font-size: 24px; }
.aff { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.aff img { border-radius: 4px; flex: none; }
.facts dt { white-space: nowrap; }
.tick { color: var(--text); opacity: .8; }
.facts { margin: 24px 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--panel); }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; font-variant-numeric: tabular-nums; font-size: 14px; text-align: right; }
.btn { display: block; text-align: center; padding: 12px; border-radius: 10px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.foot { text-align: center; color: #5d646c; font-size: 12px; padding: 16px; }
@media (max-width: 380px) {
  .who { flex-direction: column; text-align: center; }
  .aff { justify-content: center; }
}

/* ---------------------------------------------------------- app shell */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: rgba(11,13,16,.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.brand img { border-radius: 50%; }
.me { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.me img { border-radius: 50%; }
.badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.badge.ok { color: var(--ok); background: rgba(79,191,122,.12); }
.badge.warn { color: var(--warn); background: rgba(224,164,58,.12); }
.signout { color: var(--muted); text-decoration: none; }
.signout:hover { color: var(--accent); }
@media (max-width: 560px) { .me-name, .brand span { display: none; } }

.dash { width: 100%; max-width: 1180px; margin: 0 auto; padding: 20px 16px 8px; display: grid; gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; min-width: 0; }
.panel h2 { margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.muted, .more { color: var(--muted); font-size: 13px; }
.more { text-decoration: none; } .more:hover { color: var(--accent); }
.empty { color: var(--muted); margin: 0; font-size: 14px; }
.alert.soft { background: rgba(224,164,58,.10); border-color: rgba(224,164,58,.35); color: #ecd3a3; margin: 0; }
a { color: inherit; }

/* corp card */
.corp { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 18px; align-items: center; }
.corp-logo { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--line); background: #000; }
.corp h1 { font-size: 26px; }
.corp-ally { margin: 6px 0 0; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.corp-ally img { border-radius: 3px; }
.corp-facts { grid-column: 1 / -1; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.corp-facts div { background: var(--panel); padding: 10px 12px; min-width: 0; }
.corp-facts dt { color: var(--muted); font-size: 12px; }
.corp-facts dd { margin: 2px 0 0; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.corp-facts a { text-decoration: none; } .corp-facts a:hover { color: var(--accent); }
@media (max-width: 560px) { .corp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .corp h1 { font-size: 22px; } }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; position: relative; overflow: hidden; }
.tile::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--line); }
.tile.k::before { background: var(--ok); } .tile.l::before { background: var(--bad); }
.tile-label { color: var(--muted); font-size: 12px; letter-spacing: .04em; }
.tile-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.tile-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.up { color: var(--ok); } .down { color: var(--bad); }
@media (max-width: 400px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile-value { font-size: 22px; } }

/* chart */
.chart, .heatmap { display: block; width: 100%; height: auto; }
.gridline { stroke: var(--line); stroke-width: 1; }
.axis { fill: var(--muted); font-size: 11px; font-family: inherit; }
.bar-kill { fill: var(--ok); } .bar-loss { fill: var(--bad); }
.legend { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.lg { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-left: 8px; }
.lg.k { background: var(--ok); } .lg.l { background: var(--bad); }

/* columns */
.cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: grid; gap: 16px; }
@media (max-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr); } }

/* top lists */
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rank li { display: grid; grid-template-columns: 18px 32px minmax(0, 1fr) auto; grid-template-rows: auto 4px; column-gap: 10px; row-gap: 4px; align-items: center; }
.rank .pos { color: var(--muted); font-size: 12px; text-align: right; grid-row: 1 / 3; }
.rank img, .rank .sysdot { grid-row: 1 / 3; width: 32px; height: 32px; border-radius: 6px; }
.rank img.round { border-radius: 50%; }
.rank .sysdot { background: radial-gradient(circle, var(--accent) 0 4px, transparent 5px), #1b2027; }
.rank a { text-decoration: none; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank a:hover { color: var(--accent); }
.rank .count { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
.rank .meter { grid-column: 3 / 5; width: 100%; height: 4px; display: block; }
.meter-bg { fill: #1d232b; } .meter-fg { fill: var(--accent); }

/* kill feed */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.feed li { border-radius: 10px; border: 1px solid var(--line); border-left: 3px solid var(--ok); background: #10141a; }
.feed li.loss { border-left-color: var(--bad); }
.feed-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; text-decoration: none; }
.feed-row:hover { background: #151a21; border-radius: 10px; }
.feed-row img { border-radius: 6px; background: #000; }
.feed-main { min-width: 0; }
.feed-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 1px 5px; border-radius: 4px; margin-right: 4px; color: var(--ok); background: rgba(79,191,122,.12); vertical-align: 1px; }
.loss .tag { color: var(--bad); background: rgba(229,96,90,.12); }
.feed-side { text-align: right; }
.feed-isk { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.feed-time { color: var(--muted); font-size: 12px; }
.sec { font-weight: 700; font-variant-numeric: tabular-nums; }
.sec.hs { color: #4fbf7a; } .sec.ls { color: #e0a43a; } .sec.ns { color: #e5605a; }

/* heatmap */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.heat { fill: var(--accent); } .heat-empty { fill: #181d24; }

/* all time */
.alltime { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px 16px; }
.alltime dt { color: var(--muted); font-size: 12px; }
.alltime dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.updated { text-align: center; color: #5d646c; font-size: 12px; margin: 4px 0 0; }

/* wide vs narrow renders of the SVG charts */
.chart.wide { max-height: 300px; margin: 0 auto; }
.heatmap.wide { max-width: 780px; margin: 0 auto; }
.narrow, .only-narrow { display: none !important; }
@media (max-width: 560px) {
  .wide, .only-wide { display: none !important; }
  .narrow { display: block !important; }
  .only-narrow { display: inline !important; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------- tabs */
.tabs { display: flex; gap: 4px; margin-right: auto; margin-left: 12px; }
.tabs a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 8px; }
.tabs a:hover { color: var(--text); background: #171c22; }
.tabs a.on { color: var(--text); background: #1c222a; box-shadow: inset 0 -2px 0 var(--accent); }
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .tabs { order: 3; width: 100%; margin: 0; justify-content: space-between; }
  .tabs a { flex: 1; text-align: center; }
  .me-name, .brand span, .tabs .only-wide { display: none !important; }
  .tabs .only-narrow { display: inline !important; }
}

/* ---------------------------------------------------------- shared bits */
.btn.small { display: inline-block; padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.ghost { background: transparent; }
.btn.danger { color: #f3b3af; border-color: rgba(229,96,90,.35); background: transparent; }
.btn.danger:hover { color: var(--bad); border-color: var(--bad); }
button.btn { font: inherit; cursor: pointer; background: transparent; }
.ok-t { color: var(--ok); } .bad-t { color: var(--bad); } .hl { color: var(--accent); }
.small { font-size: 13px; }
.pbar { display: block; width: 100%; height: 6px; }
.pbar-bg { fill: #1d232b; } .pbar-fg { fill: var(--accent); }
.count-badge { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 6px; border-radius: 999px; background: rgba(229,96,90,.15); color: var(--bad); font-size: 11px; letter-spacing: 0; vertical-align: 1px; }

/* ---------------------------------------------------------- home */
.home { width: 100%; max-width: 1240px; margin: 0 auto; padding: 20px 16px 8px; display: grid; gap: 16px; }
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hello .eyebrow { margin: 0 0 2px; }
.hello h1 { font-size: 32px; }
.chips { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.chips div { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; min-width: 92px; }
.chips dt { color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.chips dd { margin: 0; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.chips .clock { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); min-width: 118px; }
.chips .clock dt { color: var(--accent); }
.chips .clock dd.clock-sub { font-weight: 400; font-size: 11px; color: var(--muted); }
@media (max-width: 560px) { .chips .clock { grid-column: 1 / -1; } }
@media (max-width: 560px) { .chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; } }

.home-cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.home-main, .home-side { display: grid; gap: 16px; min-width: 0; }
@media (max-width: 980px) { .home-cols { grid-template-columns: minmax(0, 1fr); } }

/* attention */
.attn { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.attn li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: #10141a; border: 1px solid var(--line); border-left: 3px solid var(--muted); }
.attn li.bad { border-left-color: var(--bad); } .attn li.warn { border-left-color: var(--warn); }
.attn li.good { border-left-color: var(--ok); } .attn li.info { border-left-color: #5b8def; }
.attn img { border-radius: 50%; }
.attn-text { font-weight: 600; font-size: 14px; }
.attn-sub { color: var(--muted); font-size: 12px; }
.allgood { margin: 0; color: var(--ok); font-size: 14px; }

/* character cards */
.chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.char { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.char.alert-edge { border-color: rgba(229,96,90,.45); }
.char.reauth { opacity: .85; }
.char-head { display: flex; gap: 12px; align-items: center; }
.char-portrait { width: 56px; height: 56px; border-radius: 12px; border: 1px solid var(--line); flex: none; }
.char-id { min-width: 0; }
.char-name { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-star { color: var(--accent); font-size: 13px; }
.char-sub { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #4a525b; display: inline-block; margin-right: 2px; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(79,191,122,.18); }
.char-where { display: grid; gap: 4px; }
.char-line { font-size: 13px; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.char-line img { border-radius: 4px; }
.char-note { margin: 0; color: var(--muted); font-size: 13px; }
.char-note a { color: var(--accent); }

.train { background: #10141a; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.train.empty { border-color: rgba(229,96,90,.45); background: rgba(229,96,90,.06); }
.train.paused { border-color: rgba(224,164,58,.4); }
.train-label { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.train.empty .train-skill { color: #f3b3af; }
.train-skill { font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.train-eta { color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.train-meta { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cstats { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cstat { background: var(--panel); padding: 8px 10px; min-width: 0; }
.cstat dt { color: var(--muted); font-size: 11px; }
.cstat dd { margin: 1px 0 0; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cstat dd.cstat-sub { font-weight: 400; font-size: 11px; color: var(--muted); white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }

.char.add { border-style: dashed; place-content: center; justify-items: center; text-align: center; text-decoration: none; color: var(--text); min-height: 180px; gap: 4px; }
.char.add:hover { border-color: var(--accent); }
.char.add .plus { font-size: 34px; line-height: 1; color: var(--accent); }
.char.add .muted { font-size: 12px; }

/* side panels */
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.events li { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; background: #10141a; border: 1px solid var(--line); }
.events li.important { border-left: 3px solid var(--accent); }
.ev-day { font-size: 12px; color: var(--muted); }
.ev-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.ev-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-sub { color: var(--muted); font-size: 12px; }
.minis { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.minis dt { color: var(--muted); font-size: 11px; }
.minis dd { margin: 2px 0 0; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.rankline, .herdline { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.rankline strong, .herdline strong { color: var(--text); }
.herdline { margin: 0 0 12px; }

/* ---------------------------------------------------------- characters page */
.narrow-page { width: 100%; max-width: 860px; margin: 0 auto; padding: 24px 16px 8px; display: grid; gap: 16px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; }
.page-head p { margin: 4px 0 0; }
.page-head .btn { display: inline-block; }
.clist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.crow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.crow img { border-radius: 50%; }
.crow-name { font-weight: 700; }
.crow-sub { color: var(--muted); font-size: 13px; }
.crow-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.crow-actions form { margin: 0; }
.pill { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.pill.ok { color: var(--ok); background: rgba(79,191,122,.12); }
.pill.warn { color: var(--warn); background: rgba(224,164,58,.12); }
.pill.bad { color: var(--bad); background: rgba(229,96,90,.12); }
@media (max-width: 640px) {
  .crow { grid-template-columns: 44px minmax(0, 1fr); }
  .crow-status { grid-column: 2; }
  .crow-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.hero .btn { margin-top: 4px; }

.attn-more { margin-top: 8px; }
.attn-more summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 2px; list-style: none; }
.attn-more summary::-webkit-details-marker { display: none; }
.attn-more summary::before { content: '▸ '; }
.attn-more[open] summary::before { content: '▾ '; }
.attn-more summary:hover { color: var(--accent); }
.attn-more .attn { margin-top: 4px; }

/* ---------------------------------------------------------- alert groups */
form.inline { display: inline; margin: 0; }
.attn li.attn-grp { grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; }
.faces { display: flex; padding-top: 2px; }
.faces img { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #10141a; }
.faces.stack img + img { margin-left: -14px; }
.faces.stack img:nth-child(n+3) { display: none; }
.attn-body { min-width: 0; }
.attn-n { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 4px; }
.attn-sub { overflow-wrap: anywhere; }
.attn-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.attn-btn { font: inherit; font-size: 12px; font-weight: 600; color: var(--text); background: #1a2028; border: 1px solid var(--line); border-radius: 7px; padding: 4px 10px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.attn-btn:hover { border-color: var(--accent); color: var(--accent); }
.attn-btn.subtle { color: var(--muted); background: transparent; }
.link-btn { font: inherit; font-size: 12px; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--accent); }
.attn-each { margin-top: 6px; }
.attn-each summary { cursor: pointer; color: var(--muted); font-size: 12px; list-style: none; }
.attn-each summary::-webkit-details-marker { display: none; }
.attn-each summary::before { content: '▸ '; } .attn-each[open] summary::before { content: '▾ '; }
.attn-each ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.attn-each li { display: grid; grid-template-columns: 20px auto minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 12px; padding: 4px 0; border-top: 1px solid var(--line); }
.attn-each li img { border-radius: 50%; }
.attn-each li .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-btn { font: inherit; font-size: 12px; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.x-btn:hover { color: var(--bad); background: rgba(229,96,90,.1); }
.attn-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 12px; }
@media (max-width: 560px) {
  .attn li.attn-grp { grid-template-columns: auto minmax(0, 1fr); }
  .attn-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---------------------------------------------------------- card extras */
.char-name a { color: inherit; text-decoration: none; } .char-name a:hover { color: var(--accent); }
.char-portrait-link { flex: none; line-height: 0; }
.char-sub2 { color: #6b737c; font-size: 12px; }
.char-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; margin-top: -2px; }
.char-foot .muted { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.char-foot .more { white-space: nowrap; }
.ev-main, .moon-main { min-width: 0; }

/* moons */
.moons { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.moons li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: #10141a; border: 1px solid var(--line); }
.moons li.soon { border-color: rgba(217,164,65,.5); }
.moon-dot { width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e9e4d6, #8b8778 60%, #4c4a42); }
.moon-sys { font-weight: 700; font-size: 13px; }
.moon-name { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.moon-when { text-align: right; }
.moon-in { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--accent); white-space: nowrap; }
.moon-at { color: var(--muted); font-size: 11px; white-space: nowrap; }
@media (min-width: 561px) { .chips div { min-width: 0; } }

/* ---------------------------------------------------------- character detail */
.cd { width: 100%; max-width: 1180px; margin: 0 auto; padding: 16px 16px 8px; display: grid; gap: 16px; }
.crumbs { margin: 0; font-size: 13px; } .crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--accent); }
.cd-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.cd-portrait { width: 112px; height: 112px; border-radius: 14px; border: 1px solid var(--line); }
.cd-id h1 { font-size: 28px; }
.cd-id p { margin: 4px 0 0; font-size: 14px; }
.cd-where { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cd-links a { color: var(--muted); font-size: 13px; text-decoration: none; } .cd-links a:hover { color: var(--accent); }
@media (max-width: 560px) { .cd-head { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; } .cd-where { justify-content: center; } .cd-portrait { width: 96px; height: 96px; } }
.cd-strip { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cd-strip div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.cd-strip dt { color: var(--muted); font-size: 12px; }
.cd-strip dd { margin: 2px 0 0; font-weight: 700; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-strip dd.cd-sub { font-weight: 400; font-size: 12px; color: var(--muted); white-space: normal; }
@media (max-width: 760px) { .cd-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.trends { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.spark { margin: 0; } .spark figcaption { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.spark svg { display: block; width: 100%; height: 60px; } .spark-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.cd-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cd-col { display: grid; gap: 16px; min-width: 0; }
@media (max-width: 900px) { .cd-cols { grid-template-columns: minmax(0, 1fr); } }
.sub-h { margin: 14px 0 8px; font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

.queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 520px; overflow-y: auto; }
.queue li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 6px; border-bottom: 1px solid var(--line); }
.queue li.cur { background: rgba(217,164,65,.07); border-radius: 8px; }
.q-pos { color: var(--muted); font-size: 12px; text-align: right; }
.q-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.q-lvl { color: var(--accent); }
.q-when { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.q-when .muted { font-size: 11px; }

.attrs { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.attrs li { display: grid; grid-template-columns: 96px minmax(0, 1fr) 28px; gap: 10px; align-items: center; font-size: 13px; }
.a-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12px; background: #1a2028; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }
.jclones { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.jclones li { padding: 8px 10px; background: #10141a; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.jc-loc { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.jc-imp { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

.minis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
.income { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.income li { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.i-cat { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.i-bars { display: grid; gap: 2px; } .i-bars svg { display: block; width: 100%; height: 5px; }
.i-in { fill: var(--ok); } .i-out { fill: var(--bad); }
.i-net { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 420px) { .income li { grid-template-columns: 96px minmax(0, 1fr) auto; } }

.journal, .rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.journal li, .rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.journal li:last-child, .rows li:last-child { border-bottom: 0; }
.j-what, .r-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.j-note, .r-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.j-side, .r-side { text-align: right; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.j-side .muted, .r-side .muted { font-size: 11px; font-weight: 400; }
.r-title .pill { font-size: 10px; padding: 1px 6px; margin-right: 4px; }
.char-line > .muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.char-line > img, .char-line > .sec { flex: none; }

/* ---------- admin ---------- */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.tool { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; color: var(--text); text-decoration: none; min-width: 0; }
.tool:hover { border-color: var(--accent); }
.tool-title { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.tool-value { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 4px; }
.tool-value span { font-size: 14px; font-weight: 600; color: var(--muted); }
.tool-sub { font-size: 13px; color: var(--muted); }
.pill:not(.ok):not(.warn):not(.bad) { color: var(--muted); background: #1c222a; }

/* ---------- presence ---------- */
.syschips { display: flex; flex-wrap: wrap; gap: 8px; }
.syschip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); text-decoration: none; font-size: 13px; white-space: nowrap; }
.syschip:hover { border-color: var(--accent); }
.syschip b { color: var(--accent); }
.seg { display: flex; gap: 4px; flex-wrap: wrap; }
.seg a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); }
.seg a.on { color: var(--text); border-color: var(--accent); }
.atabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; min-width: 0; }
.atabs::-webkit-scrollbar { display: none; }
.atabs a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; margin-bottom: -1px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; }
.atabs a:hover { color: var(--text); }
.atabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.atabs b { font-size: 11px; color: var(--accent); background: #1c222a; padding: 1px 7px; border-radius: 999px; }
.r-main { min-width: 0; }
.r-sub { overflow-wrap: anywhere; }
.gold { color: var(--accent); }
.panel .plist + .syschips { margin-top: 14px; }
@media (max-width: 760px) {
  .atabs { flex-wrap: wrap; gap: 6px; overflow: visible; border-bottom: 0; }
  .atabs a { flex: 1 1 auto; justify-content: center; padding: 8px 10px; margin: 0; font-size: 13px; gap: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
  .atabs a.on { border-color: var(--accent); background: #1c222a; }
  .atabs b { padding: 1px 5px; }
}
.psearch { display: flex; gap: 6px; min-width: 0; }
.psearch input[type=search] { min-width: 0; width: 200px; max-width: 100%; background: #0f1317; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; }
.plist { list-style: none; margin: 0; padding: 0; display: grid; }
.prow { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.3fr) 92px; gap: 14px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.prow:last-child { border-bottom: 0; }
.prow:not(.on) { opacity: .72; }
.prow .muted { font-size: 12px; }
.p-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.p-who img { border-radius: 50%; flex: none; }
.p-name { min-width: 0; }
.p-name > a { font-weight: 600; color: var(--text); text-decoration: none; }
.p-name > a:hover { color: var(--accent); }
.p-name, .p-ship > div, .p-sys, .p-dock { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-ship { display: flex; align-items: center; gap: 8px; min-width: 0; }
.p-ship img { border-radius: 4px; flex: none; }
.p-where { min-width: 0; }
.p-sys a { color: var(--text); text-decoration: none; font-weight: 600; }
.p-dock { color: var(--muted); margin-top: 2px; }
.p-dock .pill { font-size: 10px; padding: 1px 6px; }
.p-session { text-align: right; }
.p-time { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .prow { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; grid-template-areas: "who who session" "ship where where"; row-gap: 6px; column-gap: 10px; }
  .p-who { grid-area: who; } .p-session { grid-area: session; } .p-ship { grid-area: ship; } .p-where { grid-area: where; }
  .psearch { width: 100%; } .psearch input[type=search] { flex: 1; width: auto; }
}

/* ---------- recruitment landing ---------- */
.btn.big { display: inline-block; padding: 14px 28px; font-size: 16px; border-radius: 12px; }
.gold-btn { background: var(--accent); border-color: var(--accent); color: #17120a; }
.gold-btn:hover { background: #e6b65a; color: #17120a; border-color: #e6b65a; }
button.btn.gold-btn { color: #17120a; background: var(--accent); }
button.btn.gold-btn:hover { background: #e6b65a; }
.discord-btn { background: #5865f2; border-color: #5865f2; color: #fff; }
.discord-btn:hover { background: #6b77f5; border-color: #6b77f5; color: #fff; }
.join-link { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.join-link a { color: var(--accent); font-weight: 600; text-decoration: none; }
.join { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px 8px; display: grid; gap: 20px; }
.join-hero { text-align: center; padding: 56px 8px 28px; position: relative; }
.join-hero::before { content: ""; position: absolute; inset: 0 -16px; background: radial-gradient(600px 300px at 50% 30%, rgba(217,164,65,.16), transparent 70%); pointer-events: none; }
.join-hero > * { position: relative; }
.join-crest { width: 160px; height: 160px; border-radius: 50%; border: 2px solid rgba(217,164,65,.5); background: #000; box-shadow: 0 0 0 8px rgba(217,164,65,.06), 0 20px 60px rgba(0,0,0,.5); }
.join-hero h1 { font-size: clamp(34px, 7vw, 56px); letter-spacing: -.02em; margin-top: 6px; }
.join-hero h1 .tick { font-size: .45em; vertical-align: middle; color: var(--muted); }
.join-tag { font-size: clamp(16px, 2.4vw, 20px); color: #cfccc5; max-width: 620px; margin: 14px auto 26px; }
.join-cta { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: center; }
.join-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.join-stats div { background: var(--panel); padding: 18px; text-align: center; min-width: 0; }
.join-stats b { display: block; font-size: 28px; font-variant-numeric: tabular-nums; color: var(--accent); }
.join-stats span { font-size: 13px; color: var(--muted); }
.join-pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.pillar { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-width: 0; }
.pillar-n { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--accent); }
.pillar h2 { margin: 6px 0 6px; font-size: 20px; }
.pillar p { margin: 0; color: var(--muted); font-size: 14px; }
.how { list-style: none; counter-reset: how; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.how li { counter-increment: how; display: grid; gap: 4px; padding: 14px 14px 14px 52px; position: relative; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.how li::before { content: counter(how); position: absolute; left: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: rgba(217,164,65,.14); color: var(--accent); }
.how b { font-size: 15px; } .how span { font-size: 13px; color: var(--muted); }
.join-how .join-cta { justify-content: flex-start; }
.join-scopes summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.join-scopes p { margin: 10px 0 0; }

/* ---------- application steps ---------- */
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stepper li { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); min-width: 0; }
.stepper li span { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: #1c222a; }
.stepper li.on { color: var(--text); border-color: var(--accent); }
.stepper li.on span { background: var(--accent); color: #17120a; }
.stepper li.done span { background: rgba(79,191,122,.18); color: var(--ok); }
.apply .panel h2 { color: var(--text); font-size: 15px; letter-spacing: .02em; text-transform: none; }
.apply .panel > p { margin: 0 0 14px; font-size: 14px; }
.step-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.step-actions .btn { display: inline-block; }
.grant-list { margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 10px; }
.grant-list ul { margin: 6px 0 8px; padding-left: 18px; font-size: 14px; columns: 2 220px; }
.appform { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field-label { font-size: 14px; font-weight: 600; }
.field-hint { font-size: 12px; color: var(--muted); }
.field input[type=text], .field textarea { width: 100%; background: #0f1317; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 15px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 120px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.cchip img { border-radius: 50%; }
.done-card { text-align: center; display: grid; justify-items: center; gap: 4px; padding: 28px 20px; }
.done-card h1 { margin-top: 12px; }
.done-card .facts { width: 100%; text-align: left; }
.done-card .facts dd { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .join-hero { padding-top: 36px; }
  .join-crest { width: 120px; height: 120px; }
}

/* ---------- admin: applicants ---------- */
.applist li { padding: 0; }
.arow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 2px; color: var(--text); text-decoration: none; }
.arow:hover .r-title { color: var(--accent); }
.arow img { border-radius: 50%; }
.apphead { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 18px; align-items: start; }
.apphead img { border-radius: 12px; }
.apphead-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.apphead-title h2 { margin: 0; font-size: 22px; letter-spacing: 0; text-transform: none; color: var(--text); }
.apphead .minis { margin-top: 10px; }
.apphead-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.about-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font-size: 14px; line-height: 1.6; }
.appchars { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 14px; }
.appchar-head { display: flex; gap: 12px; align-items: center; min-width: 0; }
.appchar-head img { border-radius: 10px; flex: none; }
.appchar-id { min-width: 0; }
.appchar-name { font-weight: 700; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.appchar-links { display: flex; gap: 12px; font-size: 12px; margin-top: 2px; }
.appchar-links a { color: var(--accent); text-decoration: none; }
.appfacts { margin-top: 12px; }
.appcorps { margin-top: 10px; }
.appcorps summary { cursor: pointer; font-size: 13px; color: var(--muted); }
@media (max-width: 640px) {
  .apphead { grid-template-columns: 64px minmax(0, 1fr); }
  .apphead img { width: 64px; height: 64px; }
  .apphead-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.apphead .minis { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.apphead .minis dd { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.appfacts { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); }
.appfacts dd { font-size: 15px; }

/* ---------- Discord identity ---------- */
.dcard { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #10141a; }
.dcard img { border-radius: 50%; flex: none; }
.dcard > div { min-width: 0; flex: 1; }
.dcard-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcard .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcard.empty { border-style: dashed; }
.dlogo { width: 44px; height: 44px; flex: none; border-radius: 50%; background: #5865f2; position: relative; }
.dlogo::after { content: ""; position: absolute; inset: 13px 10px; border-radius: 8px 8px 12px 12px; background: #fff; opacity: .9; }
.ident { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.ident-cell { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.ident-cell .inline, .ident-cell .link-btn { justify-self: start; }
.ident-cell > .link-btn + .inline, .ident-cell .inline + .link-btn { margin-left: 0; }
.ident-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ident-cell .btn.small { justify-self: start; }
.list-head { margin: 4px 0 -4px; }
img.round { border-radius: 50%; }
.idline { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--muted); text-decoration: none; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; max-width: 100%; }
.idline img { border-radius: 50%; }
.idline:hover { border-color: var(--accent); color: var(--text); }
.idline.warn { padding-left: 10px; color: #ecd3a3; border-color: rgba(224,164,58,.4); background: rgba(224,164,58,.08); }
.dchip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; min-width: 0; max-width: 100%; }
.dchip img { border-radius: 50%; flex: none; }
.dcard + .inline { margin-top: -2px; }

/* ---------- admin: roster ---------- */
.roster-nav { margin: 0; }
.rform { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; max-width: 100%; }
.rform select, .psearch select { background: #0f1317; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; max-width: 260px; min-width: 0; }
.rrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.rrow > .r-main:first-child { grid-column: 1 / 3; }
.rrow-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rows li.rrow { grid-template-columns: auto minmax(0, 1fr) auto; }
.rows li.rrow > .r-main:first-child { grid-column: 1 / 3; }
.r-title .dchip { vertical-align: middle; }
.acct { border: 1px solid var(--line); border-radius: 12px; background: #10141a; margin-bottom: 8px; }
.acct[open] { border-color: #2e3742; }
.acct > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 40px minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; }
.acct > summary::-webkit-details-marker { display: none; }
.acct > summary:hover .acct-name { color: var(--accent); }
.acct > summary img { border-radius: 50%; }
.acct-id { min-width: 0; }
.acct-name { font-weight: 700; }
.acct-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-disc { min-width: 0; overflow: hidden; }
.acct-pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.acct-body { border-top: 1px solid var(--line); padding: 12px; }
.acct-body h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.acct-body section + section h3, .acct-body h3 + * + h3 { margin-top: 14px; }
.acct-body section > h3 ~ h3 { margin-top: 16px; }
.acct-body p { margin: 0 0 8px; }
.acct-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; }
.rows li.rchar { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rchar img { border-radius: 50%; }
.rchar-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rchar .r-sub a { color: var(--muted); }
@media (max-width: 760px) {
  .acct > summary { grid-template-columns: 40px minmax(0, 1fr); }
  .acct-disc, .acct-pills { grid-column: 2; justify-content: flex-start; }
  .acct-grid { grid-template-columns: minmax(0, 1fr); }
  .rows li.rchar { grid-template-columns: 28px minmax(0, 1fr); }
  .rchar-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .rows li.rrow, .rrow { grid-template-columns: auto minmax(0, 1fr); }
  .rrow-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .rform select { max-width: 100%; flex: 1; }
}
.stepper { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 760px) { .stepper { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ident-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* ---------- leaderboards ---------- */
.lb-controls { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.lb-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.lb-boards a.on { background: rgba(217,164,65,.12); }
.lb-leader { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.5; }
.lb-board .panel-head { margin-bottom: 18px; }
.podium { display: grid; gap: 12px; align-items: end; margin-bottom: 14px; }
.podium-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.podium-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 66%; margin-left: auto; margin-right: auto; }
.podium-1 { grid-template-columns: minmax(0, 1fr); max-width: 34%; margin-left: auto; margin-right: auto; }
.pod { position: relative; text-align: center; background: #10141a; border: 1px solid var(--line); border-radius: 14px; padding: 18px 12px 14px; min-width: 0; }
.pod-1 { padding-top: 26px; padding-bottom: 22px; border-color: rgba(217,164,65,.55); background: linear-gradient(180deg, rgba(217,164,65,.10), #10141a 60%); }
.pod-2 { border-color: rgba(192,200,210,.35); }
.pod-3 { border-color: rgba(205,127,50,.4); }
.pod.is-me { box-shadow: 0 0 0 2px rgba(79,191,122,.45); }
.pod-rank { position: absolute; top: 10px; left: 12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #17120a; background: #c0c8d2; }
.pod-1 .pod-rank { background: var(--accent); }
.pod-3 .pod-rank { background: #cd7f32; }
.pod-img { width: 88px; height: 88px; border-radius: 50%; border: 3px solid #c0c8d2; background: #000; }
.pod-1 .pod-img { width: 104px; height: 104px; border-color: var(--accent); }
.pod-3 .pod-img { border-color: #cd7f32; }
.pod-name { margin-top: 10px; font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-sub, .pod-extra { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-value { margin-top: 8px; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pod-1 .pod-value { color: var(--accent); font-size: 26px; }
.llist { list-style: none; margin: 0; padding: 0; display: grid; }
.lrow { display: grid; grid-template-columns: 32px 36px minmax(0, 1fr) auto; grid-template-areas: "rank img who val" "rank img bar bar"; column-gap: 12px; row-gap: 6px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.lrow:last-child { border-bottom: 0; }
.lrow.is-me { background: rgba(79,191,122,.07); border-radius: 10px; }
.lrank { grid-area: rank; text-align: right; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.lrow img { grid-area: img; border-radius: 50%; }
.lwho { grid-area: who; min-width: 0; }
.lname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lval { grid-area: val; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.lbar { grid-area: bar; width: 100%; height: 4px; display: block; }
.meter-top { fill: var(--accent); }
.llist.pinned { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.you { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ok); background: rgba(79,191,122,.12); padding: 1px 6px; border-radius: 999px; vertical-align: middle; }
.lb-empty h2 { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 18px; }
.lb-foot { margin: 0; }
.standings .rows li { padding: 0; }
.stand { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 2px; color: var(--text); text-decoration: none; }
.stand:hover .stand-name { color: var(--accent); }
.stand-rank { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }
.stand-rank.r1 { color: var(--accent); } .stand-rank.r2 { color: #c0c8d2; } .stand-rank.r3 { color: #cd7f32; }
.stand-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stand-name .muted { font-weight: 400; font-size: 12px; }
.stand-val { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .podium-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .podium-2, .podium-1 { max-width: none; }
  .pod { padding: 14px 6px 10px; }
  .pod-img { width: 56px; height: 56px; border-width: 2px; }
  .pod-1 .pod-img { width: 68px; height: 68px; }
  .pod-rank { width: 22px; height: 22px; font-size: 12px; top: 6px; left: 6px; }
  .pod-name { font-size: 13px; }
  .pod-value, .pod-1 .pod-value { font-size: 16px; }
  .pod-extra { display: none; }
  .lrow { grid-template-columns: 24px 32px minmax(0, 1fr) auto; column-gap: 10px; }
  .lrow img { width: 32px; height: 32px; }
}
@media (max-width: 560px) {
  .tabs a { padding: 6px 4px; font-size: 13px; }
}

/* ---------------------------------------------------------- admin finance */
.fin-controls { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; align-items: center; }
.cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .cols.even { grid-template-columns: minmax(0, 1fr); } }
.r { text-align: right; } .nowrap { white-space: nowrap; }
.chip { display: inline-block; font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; vertical-align: 1px; }
.hit { fill: transparent; } .hit:hover { fill: rgba(255,255,255,.04); }
.bal-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.bal-area { fill: var(--accent); opacity: .08; }
.bal-dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.bar-in { fill: var(--ok); } .bar-out { fill: var(--bad); }
.zero { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.lg.in { background: var(--ok); } .lg.out { background: var(--bad); }
.fill-in { fill: var(--ok); } .fill-out { fill: var(--bad); }

.fin-cats, .fin-divs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.fin-cats a, .fin-divs a { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 12px; row-gap: 5px; align-items: baseline;
  padding: 8px 10px; margin: 0 -10px; border-radius: 8px; color: inherit; text-decoration: none; }
.fin-cats a:hover, .fin-divs a:hover { background: #171c22; }
.fc-name, .fd-name { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-val, .fd-val { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.fc-share, .fd-chg { font-size: 12px; min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.fc-bar { grid-column: 1 / -1; display: block; width: 100%; height: 6px; }

.fin-entries { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.fin-entry { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.fin-entry:last-child { border-bottom: 0; }
.fe-main { display: grid; min-width: 0; }
.fe-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fe-sub { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fe-amt { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; flex: none; }

.fin-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fin-people li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.fin-people img { border-radius: 50%; background: #000; }
.fin-people a { font-size: 14px; font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-people a:hover { color: var(--accent); }
.fp-val { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; min-width: 56px; text-align: right; }

.fin-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.fin-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.fin-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fin-table th.r, .fin-table td.r { text-align: right; }
.fin-table tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--line); }
.fin-table td .small { font-size: 12px; margin-top: 2px; }

.fin-setup ol { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.fin-setup p { font-size: 14px; }
.fin-setup code { font-size: 12px; background: #0f1317; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }

/* transparency report */
.fin-report { padding: 28px; max-width: 900px; width: 100%; margin: 0 auto; }
.fin-report h2 { margin: 0; font-size: 22px; letter-spacing: 0; text-transform: none; color: var(--text); }
.fin-report h3 { margin: 28px 0 8px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fr-head { display: flex; gap: 16px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.fr-head img { border-radius: 12px; background: #000; flex: none; }
.fr-head .eyebrow { margin: 0 0 2px; }
.fr-head p.muted { margin: 4px 0 0; font-size: 14px; }
.fr-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.fr-summary div { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.fr-summary span { font-size: 12px; }
.fr-summary b { font-size: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fr-net { font-size: 15px; margin: 16px 0 0; }
.fr-foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); }
.fr-foot p { margin: 4px 0; }
@media (max-width: 700px) { .fr-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fin-report { padding: 18px; } }

/* ledger */
.fin-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.fin-filter label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.fin-filter label.grow { flex: 1 1 200px; }
.fin-filter select, .fin-filter input { background: #0f1317; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; min-width: 0; }
.fin-filter select:focus, .fin-filter input:focus { outline: none; border-color: var(--accent); }
.fin-ledger-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; font-size: 14px; font-variant-numeric: tabular-nums; padding: 10px 0; border-top: 1px solid var(--line); }
.fin-ledger-sum .more { margin-left: auto; }
.ledger { list-style: none; margin: 0; padding: 0; }
.lg-head, .lg-row { display: grid; grid-template-columns: 96px minmax(0, 1.2fr) minmax(0, 1.6fr) 110px 120px 70px; gap: 12px; align-items: baseline; }
.lg-head { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--line); }
.lg-row { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.lg-row.internal { opacity: .6; }
.lg-date { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-what { min-width: 0; }
.lg-type { font-weight: 600; }
.lg-party { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-desc { min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.lg-desc b { color: var(--text); font-weight: 600; }
.lg-div { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-bal { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.pager { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; }
@media (max-width: 760px) {
  .lg-head { display: none; }
  .lg-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "what amt" "desc desc" "date bal" ; row-gap: 3px; }
  .lg-what { grid-area: what; } .lg-amt { grid-area: amt; } .lg-desc { grid-area: desc; }
  .lg-date { grid-area: date; font-size: 12px; } .lg-div { display: none; } .lg-bal { grid-area: bal; }
  .fin-filter label:not(.grow) { flex: 1 1 40%; }
  .fin-filter select { width: 100%; }
}

@media print {
  body { background: #fff; color: #111; }
  .topbar, .atabs, .page-head, .no-print, .foot, .alert { display: none !important; }
  .dash { padding: 0; max-width: none; }
  .panel, .fin-report { border: 0; background: #fff; padding: 0; box-shadow: none; }
  .fin-report h2, .fr-summary b, .fin-table td { color: #111; }
  .muted, .fin-table th, .fin-report h3 { color: #555 !important; }
  .fin-table th, .fin-table td, .fr-head, .fr-foot, .fr-summary div { border-color: #ccc !important; }
  .up { color: #17663a; } .down { color: #a12a24; }
  .fin-table tr { break-inside: avoid; }
}
.fr-pay td:first-child, .fr-pay td:nth-child(2) { white-space: nowrap; }
@media (max-width: 700px) { .fr-pay td:first-child { white-space: normal; } .fr-pay td:nth-child(3) { min-width: 180px; } }

/* ---------------------------------------------------------- doctrines and fits */
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.head-actions .btn { display: inline-block; }
.pre { white-space: pre-line; }
.refresh { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; margin: 0; }
.dr-bar { display: flex; gap: 10px 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* readiness badges: green ready, gold queued, amber under a week, red further, grey otherwise */
.rd { display: inline-block; font-size: 12px; font-weight: 700; line-height: 1; padding: 5px 8px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; border: 1px solid transparent; }
.rd.sm { font-size: 11px; padding: 3px 6px; }
.rd-ready { color: var(--ok); background: rgba(79,191,122,.12); border-color: rgba(79,191,122,.3); }
.rd-queued { color: var(--accent); background: rgba(217,164,65,.12); border-color: rgba(217,164,65,.3); }
.rd-close { color: var(--warn); background: rgba(224,164,58,.08); border-color: rgba(224,164,58,.25); }
.rd-far { color: #e89a96; background: rgba(229,96,90,.08); border-color: rgba(229,96,90,.22); }
.rd-omega, .rd-nodata { color: var(--muted); background: #171c22; border-color: var(--line); }
.rbar { display: block; width: 100%; height: 6px; } .rbar-fg { fill: var(--ok); }

.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.dcard { display: grid; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; color: inherit; text-decoration: none; align-content: start; }
.dcard:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.dc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.dc-head h2 { margin: 0; font-size: 18px; }
.dc-desc { margin: 0; font-size: 14px; }
.dc-ships { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dc-ships img { border-radius: 6px; background: #000; border: 1px solid var(--line); }
.dc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.dc-stats div { display: grid; gap: 3px; align-content: start; }
.dc-stats b { font-size: 20px; font-variant-numeric: tabular-nums; }

.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 3px; border: 1px solid var(--line); border-radius: 999px; background: #10141a; max-width: 100%; }
.pchip img { border-radius: 50%; background: #000; flex: none; }
.pc-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 140px; }

.frows, .pcards, .crows, .needs { list-style: none; margin: 0; padding: 0; }
.frow { display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(0, 2fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.frow:last-child { border-bottom: 0; }
.fr-ship { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; min-width: 0; }
.fr-ship img { border-radius: 8px; background: #000; flex: none; }
.fr-ship > span { display: grid; min-width: 0; }
.fr-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-ship:hover .fr-name { color: var(--accent); }
.fr-mine { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.fr-corp { text-align: right; white-space: nowrap; }
@media (max-width: 760px) { .frow { grid-template-columns: minmax(0, 1fr); gap: 10px; } .fr-corp { text-align: left; } }

.mx { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
.mx th, .mx td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.mx thead th { font-weight: 600; vertical-align: bottom; min-width: 96px; }
.mx thead th a { display: grid; justify-items: center; gap: 4px; color: var(--text); text-decoration: none; font-size: 12px; }
.mx thead th a span { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx thead th img { border-radius: 6px; background: #000; }
.mx tbody th { text-align: left; white-space: nowrap; position: sticky; left: 0; background: var(--panel); font-weight: 600; }
.mx tbody th img { border-radius: 50%; vertical-align: middle; margin-right: 8px; background: #000; }
.mx tbody th .muted { margin-left: 6px; }
.mx thead th:first-child { text-align: left; position: sticky; left: 0; background: var(--panel); }
.mx-who { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-inline: auto; }

.fit-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.fit-render { border-radius: 14px; background: #000; border: 1px solid var(--line); width: 128px; height: 128px; }
.fh-main h1 { font-size: 26px; margin: 2px 0 0; }
.fh-main p.muted { margin: 2px 0 0; }
.fit-notes { margin: 10px 0 0; font-size: 14px; color: var(--text); background: #10141a; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
@media (max-width: 700px) { .fit-head { grid-template-columns: auto minmax(0, 1fr); } .fit-head .head-actions { grid-column: 1 / -1; } .fit-render { width: 88px; height: 88px; } .fh-main h1 { font-size: 22px; } }
.fitcols { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
@media (max-width: 900px) { .fitcols { grid-template-columns: minmax(0, 1fr); } }

.pcards { display: grid; gap: 10px; }
.pcard { border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 10px; padding: 12px; background: #10141a; display: grid; gap: 10px; }
.pcard.rd-b-ready { border-left-color: var(--ok); } .pcard.rd-b-queued { border-left-color: var(--accent); }
.pcard.rd-b-close { border-left-color: var(--warn); } .pcard.rd-b-far { border-left-color: var(--bad); }
.pc-top { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.pc-top img { border-radius: 8px; background: #000; }
.pc-title { font-weight: 700; }
.pc-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.pcard details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.pcard details summary:hover { color: var(--text); }
.pcard details[open] summary { margin-bottom: 8px; }
.miss { display: grid; gap: 10px; }

.mtable { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.mtable th { text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); padding: 5px 6px; border-bottom: 1px solid var(--line); }
.mtable td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mtable .c { text-align: center; } .mtable .r { text-align: right; }
.mtable td.why { max-width: 220px; }
@media (max-width: 560px) { .mtable .why { display: none; } }
.chip.q { color: var(--accent); border-color: rgba(217,164,65,.4); }

.copybox { display: grid; gap: 6px; }
.cb-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cb-text { width: 100%; resize: vertical; background: #0b0e12; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.cb-text:focus { outline: none; border-color: var(--accent); }
.copybox p, #eft p { margin: 0; }

.rack + .rack { margin-top: 14px; }
.rack h3 { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.rack ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rack li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 14px; }
.rack img { border-radius: 4px; background: #000; }
.it-name { min-width: 0; }
.it-charge { display: block; font-size: 12px; }

.needs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 2px 18px; }
.needs li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.needs b { color: var(--accent); font-variant-numeric: tabular-nums; }
h3.sub { margin: 16px 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); }

/* doctrine page: what your closest character needs */
.fr-need { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 6px 14px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 8px; background: #10141a; font-size: 13px; color: var(--muted); text-decoration: none; }
.fr-need b { color: var(--text); font-weight: 600; }
.fr-need.ok { border-left-color: var(--ok); }
.fr-need:hover { border-color: var(--accent); }
.fr-need:hover .more { color: var(--accent); }

.pchip.link { color: inherit; text-decoration: none; }
.pchip.link:hover { border-color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.need-links { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
.need-links a { color: var(--accent); text-decoration: none; }
.need-links a:hover { text-decoration: underline; }

/* doctrines index: link to What can I fly */
.flystrip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 18px; align-items: center; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 14px; background: var(--panel); color: inherit; text-decoration: none; }
.flystrip:hover { border-color: var(--accent); }
.flystrip:hover .more { color: var(--accent); }
.fs-title { display: grid; gap: 2px; }
.fs-title b { font-size: 15px; }
.fs-chars { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.fs-char { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border: 1px solid var(--line); border-radius: 999px; background: #10141a; font-size: 13px; max-width: 100%; }
.fs-char img { border-radius: 50%; background: #000; }
.fs-char b { color: var(--accent); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .flystrip { grid-template-columns: minmax(0, 1fr); } }

/* what can I fly */
.flypick { display: grid; gap: 8px; }
.fp-all { justify-self: start; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); }
.fp-all.on { color: var(--text); border-color: var(--accent); background: #1a1f26; }
.flycards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 8px; }
.flycard { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: inherit; text-decoration: none; min-width: 0; }
.flycard:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.flycard.on { border-color: var(--accent); background: #1a1f26; box-shadow: inset 0 0 0 1px var(--accent); }
.fc-top { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; }
.fc-top img { border-radius: 8px; background: #000; }
.fc-id { display: grid; min-width: 0; }
.fc-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-sub { font-size: 13px; color: var(--muted); }
.fc-sub b { font-size: 14px; }
.fc-next { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1em; }
#plan { scroll-margin-top: 120px; }
.plan-hint { margin: 0; }
@media (max-width: 560px) {
  .flycards { gap: 6px; }
  .flycard { gap: 4px; padding: 8px 10px; }
  .flycard .rbar { display: none; }
  .fc-top { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; }
  .fc-top img { width: 30px; height: 30px; }
  .fc-id { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 8px; }
  .fc-next { padding-left: 38px; }
}
.fly-for { margin: 4px 0 0; font-size: 15px; font-weight: 400; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.fly-tip { margin: 0; }
.n-badge { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 6px; border-radius: 999px; background: #1c222a; color: var(--text); font-size: 11px; letter-spacing: 0; text-align: center; vertical-align: 1px; }
.fly-ready h2 .n-badge { background: rgba(79,191,122,.15); color: var(--ok); }
.fly-soon h2 .n-badge { background: rgba(224,164,58,.15); color: var(--warn); }
.flyform { display: grid; gap: 16px; }
.flylist { list-style: none; margin: 0; padding: 0; display: grid; }
.flyrow { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 1.4fr); gap: 10px 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.flyrow:first-child { border-top: 0; padding-top: 0; }
.fl-ship { display: flex; gap: 12px; align-items: center; min-width: 0; color: inherit; text-decoration: none; }
.fl-ship img { border-radius: 8px; background: #000; flex: none; }
.fl-id { display: grid; min-width: 0; }
.fl-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.fl-ship:hover .fl-name, .fl-link:hover .fl-name { color: var(--accent); }
.fl-chars { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.flyrow.one { grid-template-columns: 28px minmax(0, 1fr); gap: 8px; }
.fl-pick { display: grid; place-items: center; align-self: stretch; cursor: pointer; }
.fl-pick input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.fl-link { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, auto); gap: 8px 16px; align-items: center; color: inherit; text-decoration: none; padding: 4px 8px; margin: -4px -8px; border-radius: 10px; }
.fl-link:hover { background: #151a21; }
.fl-status { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; align-items: center; }
.fl-detail { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-status .rbar { grid-column: 1 / -1; }
.planbar { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--accent); border-radius: 12px; background: color-mix(in srgb, var(--panel) 94%, transparent); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
@media (max-width: 760px) {
  .flyrow { grid-template-columns: minmax(0, 1fr); }
  .fl-link { grid-template-columns: minmax(0, 1fr); }
  .planbar .btn { width: 100%; }
}

/* corp readiness (FCs) */
.warn-t { color: var(--warn); }
.corpready { display: grid; gap: 10px; }
.corpready h3.sub { margin: 8px 0 0; display: flex; align-items: baseline; gap: 4px 6px; flex-wrap: wrap; }
.cr-hint { font-weight: 400; margin-left: 6px; }
.cr-sum { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.cr-sum b { font-size: 18px; color: var(--text); margin-right: 4px; font-variant-numeric: tabular-nums; }
.cr-sum b.ok-t { color: var(--ok); } .cr-sum b.warn-t { color: var(--warn); }
.creadys { display: flex; flex-wrap: wrap; gap: 6px; }
.cready { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border: 1px solid rgba(79,191,122,.3); border-radius: 999px; background: rgba(79,191,122,.06); font-size: 13px; max-width: 100%; }
.cready img { border-radius: 50%; background: #000; flex: none; }
.cready b { font-weight: 600; }
.cwait { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cwait > li + li { border-top: 1px solid var(--line); }
.cdet summary { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 12px; cursor: pointer; list-style: none; background: #10141a; }
.cdet summary::-webkit-details-marker { display: none; }
.cdet summary::after { content: "▸"; color: var(--muted); font-size: 12px; grid-column: 5; }
.cdet[open] summary::after { content: "▾"; }
.cdet summary:hover { background: #151a21; }
.cdet summary img { border-radius: 50%; background: #000; }
.cd-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.cd-who b { font-weight: 600; }
.cd-n { font-size: 12px; color: var(--muted); white-space: nowrap; }
.cd-body { padding: 10px 12px 12px; display: grid; gap: 8px; background: #0e1216; border-top: 1px solid var(--line); }
.cd-sum, .cd-others { margin: 0; color: var(--muted); }
.cd-others { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cmiss { list-style: none; margin: 0; padding: 0; display: grid; }
.cmiss li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 4px 12px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.cmiss li:last-child { border-bottom: 0; }
.cm-name b { color: var(--accent); }
.cm-why { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.cm-time { color: var(--muted); font-size: 12px; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.cfit-pick { display: grid; gap: 10px; }
.cfit-pick h2 { margin: 0; }
.cfit-group { display: grid; gap: 6px; }
.cfg-name { font-size: 12px; color: var(--muted); font-weight: 600; }
.cfits { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 6px; }
.cfit { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #10141a; color: inherit; text-decoration: none; }
.cfit:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.cfit.on { border-color: var(--accent); background: #1a1f26; }
.cfit img { border-radius: 6px; background: #000; }
.cf-id { display: grid; min-width: 0; }
.cf-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-sub { font-size: 12px; color: var(--muted); }
.h2-icon { vertical-align: middle; border-radius: 4px; margin-right: 4px; background: #000; }
@media (max-width: 560px) {
  .cdet summary { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 6px 10px; }
  .cd-n { grid-column: 2; grid-row: 2; }
  .cdet summary .rd { grid-column: 3; grid-row: 1 / 3; }
  .cdet summary::after { display: none; }
  .cmiss li { grid-template-columns: minmax(0, 1fr) auto; }
  .cm-why { grid-column: 1; grid-row: 2; }
  .cm-time { grid-column: 2; grid-row: 1; }
}

/* fit page: character picker */
.ppick { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.ppick a { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #10141a; color: inherit; text-decoration: none; }
.ppick a:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.ppick a.on { border-color: var(--accent); background: #1a1f26; }
.ppick img { border-radius: 8px; background: #000; }
.pp-main { display: grid; min-width: 0; }
.pp-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* fit page: exactly what one character needs */
.need { display: grid; gap: 10px; scroll-margin-top: 120px; }
.need .panel-head { margin-bottom: 0; }
.need h3.sub { margin: 6px 0 0; }
.need-sum { margin: 0; font-size: 14px; color: var(--muted); }
.need-sum b { color: var(--text); }
.need-sum.ok b { color: var(--ok); }
.sklist { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sklist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 12px; background: #10141a; border-top: 1px solid var(--line); }
.sklist li:first-child { border-top: 0; }
.sk-main { display: grid; gap: 2px; min-width: 0; }
.sk-name { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.sk-why { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.q-t { color: var(--accent); }
.sk-side { display: grid; justify-items: end; gap: 3px; }
.sk-lv { display: inline-flex; align-items: center; gap: 6px; }
.sk-lv b { font-size: 12px; color: var(--accent); min-width: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.sk-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 9px; height: 9px; border-radius: 2px; border: 1px solid #39414b; }
.pips i.h { background: var(--muted); border-color: var(--muted); }
.pips i.n { border-color: var(--accent); background: rgba(217,164,65,.18); }
.sklist.done li { padding: 6px 12px; }
.sklist.done .sk-name { font-weight: 400; font-size: 13px; }
.sklist.done .pips i.h { background: var(--ok); border-color: var(--ok); }
.need-done summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.need-done summary:hover { color: var(--text); }
.need-done[open] summary { margin-bottom: 8px; }
.need-done .copybox { margin-top: 10px; }
@media (max-width: 420px) { .sklist li { padding: 8px 10px; gap: 8px; } .pips i { width: 7px; height: 7px; } }

.crows { display: grid; gap: 8px; }
.crows li { display: grid; grid-template-columns: minmax(140px, auto) minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.cr-who { display: flex; gap: 8px; align-items: center; min-width: 0; font-size: 14px; }
.cr-who img { border-radius: 50%; background: #000; }
.cr-chars { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 560px) { .crows li { grid-template-columns: minmax(0, 1fr); } }

/* forms */
.form { display: grid; gap: 16px; }
.frm-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 700px) { .frm-row { grid-template-columns: minmax(0, 1fr); } }
.form select, .form input[type=text], .inline-form select, .inline-form input[type=text] { background: #0f1317; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 15px; min-width: 0; }
.form select:focus, .form input:focus, .inline-form select:focus, .inline-form input:focus { outline: none; border-color: var(--accent); }
.form textarea.mono, textarea.mono { font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.field textarea { width: 100%; }
.narrow-field input { max-width: 120px; }
.frm-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.danger-zone { display: flex; gap: 12px 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-color: rgba(229,96,90,.3); }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.inline-form input[type=text] { flex: 1 1 220px; }
.fitpick { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 12px; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 6px 16px; }
.fitpick legend { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 6px; }
.fitpick .check { align-items: center; }
.fitpick .check input { margin-top: 0; }
.fitpick .check img { border-radius: 4px; background: #000; }
.fitpick .check span:not(.rd) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) {
  .tabs { overflow-x: auto; scrollbar-width: none; gap: 2px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: 1 0 auto; padding: 6px 6px; font-size: 13px; }
}
.mx thead th a span { display: block; }

/* ---------------------------------------------------------- background checks */
.bg-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; }
.bg-portrait { border-radius: 14px; background: #000; border: 1px solid var(--line); }
.bg-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bg-title h1 { font-size: 24px; margin: 0; }
.bg-corp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 14px; }
.bg-corp img { border-radius: 4px; background: #000; }
.bg-facts { margin-top: 12px; }
.bg-links { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0 0; font-size: 13px; }
.bg-alts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bg-alts a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--text); background: var(--panel); }
.bg-alts a.on { border-color: var(--accent); }
.bg-alts img { border-radius: 50%; background: #000; }
@media (max-width: 560px) { .bg-head { grid-template-columns: minmax(0, 1fr); } .bg-portrait { width: 72px; height: 72px; } }
.atabs a.off { opacity: .45; }

.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.findings li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #10141a; font-size: 14px; }
.fd-i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: #1c222a; color: var(--muted); }
.fd-bad { border-color: rgba(229,96,90,.4) !important; } .fd-bad .fd-i { background: rgba(229,96,90,.18); color: var(--bad); }
.fd-warn { border-color: rgba(224,164,58,.35) !important; } .fd-warn .fd-i { background: rgba(224,164,58,.15); color: var(--warn); }
.grants { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 16px; }
.grants li { display: flex; justify-content: space-between; font-size: 14px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.grants .yes b { color: var(--ok); } .grants .no b { color: var(--muted); }

.bg-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 6px; }
.bg-filter select, .bg-filter input[type=search] { background: #0f1317; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; min-width: 0; max-width: 100%; }
.bg-filter input[type=search] { flex: 1 1 200px; }
.bg-filter select:focus, .bg-filter input:focus { outline: none; border-color: var(--accent); }
.check.inline { align-items: center; font-size: 13px; color: var(--muted); }
.check.inline input { margin-top: 0; }
.seg.wrap { flex-wrap: wrap; }
.bgcols { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .bgcols { grid-template-columns: minmax(0, 1fr); } }

.bt { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.bt th { text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.bt td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.bt th.r, .bt td.r { text-align: right; }
.bt td.wrap { min-width: 200px; max-width: 420px; overflow-wrap: anywhere; }
.bt tbody tr:hover td { background: #141920; }
.ico { width: 20px; height: 20px; border-radius: 4px; background: #000; vertical-align: middle; margin-right: 8px; flex: none; }
.ico.r { border-radius: 50%; } .ico.ph { display: inline-block; background: #1c222a; }
.it { display: flex; align-items: flex-start; gap: 0; } .it .ico { width: 24px; height: 24px; margin-top: 1px; }
.block { display: block; }
b.txt { color: var(--text); font-weight: 600; }

.stv { font-weight: 700; font-variant-numeric: tabular-nums; }
.st-hi { color: #6aa8ff; } .st-pos { color: #9cc3ff; } .st-0 { color: var(--muted); } .st-neg { color: #f0a49f; } .st-lo { color: var(--bad); }

.mails { list-style: none; margin: 12px 0 0; padding: 0; }
.ml-row a { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 6px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.ml-row a:hover { background: #141920; }
.ml-row img { border-radius: 50%; background: #000; }
.ml-main { display: grid; min-width: 0; }
.ml-who { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.ml-subj { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-row.unread .ml-subj { font-weight: 700; } .ml-row.unread .ml-who { color: var(--text); }
.mail-read .ml-h { margin: 6px 0 10px; font-size: 20px; letter-spacing: 0; text-transform: none; color: var(--text); }
.ml-meta { display: grid; gap: 4px; margin: 0 0 14px; font-size: 13px; }
.ml-meta div { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 8px; } .ml-meta dt { color: var(--muted); } .ml-meta dd { margin: 0; overflow-wrap: anywhere; }
.ml-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.6; background: #0f1317; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }

.skg { border-bottom: 1px solid var(--line); padding: 8px 0; }
.skg summary { display: flex; justify-content: space-between; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; }
.skg[open] summary { margin-bottom: 8px; }
.imps { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.imps li { display: flex; align-items: center; gap: 6px; } .imps img { border-radius: 4px; background: #000; }
.tile-value.sm { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.feed li.ff { border-left-color: var(--bad); box-shadow: inset 0 0 0 1px rgba(229,96,90,.35); }
@media (max-width: 560px) { .bg-facts { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } .bg-facts dd { font-size: 15px; } }

/* member sync panel (Admin → Roster) */
.msync { display: flex; gap: 12px 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.msync-text { display: grid; gap: 3px; min-width: 0; flex: 1 1 320px; font-size: 14px; }

/* FC readiness: tabs, clickable pilots, copy actions, pilot page */
.cr-top { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.cr-tabs { margin: 2px 0; }
.cr-tabs .n-badge { margin-left: 4px; }
.seg a.on .n-badge { background: rgba(217,164,65,.18); color: var(--accent); }
.cready.link { color: inherit; text-decoration: none; }
.cready.link:hover { border-color: var(--ok); background: rgba(79,191,122,.12); }
.cd-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cd-others .pchip { padding-left: 8px; }
.mx-cell { display: block; padding: 4px; margin: -4px; border-radius: 8px; color: inherit; text-decoration: none; }
.mx-cell:hover { background: #1a1f26; }
.mx-cell:hover .rd { border-color: var(--accent); }
a.fr-corp.link { color: inherit; text-decoration: none; border-radius: 8px; }
a.fr-corp.link:hover b, a.fr-corp.link:hover .muted { color: var(--accent); }
.rx-pick { margin-bottom: 12px; }
.rx-all { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; background: #000; color: var(--muted); font-size: 16px; }
.rx-fit { margin: 4px 0 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 16px; }
.rx-fit a { color: var(--accent); text-decoration: none; }
.pl-title { display: flex; align-items: center; gap: 12px; }
.pl-title img { border-radius: 50%; background: #000; }

/* daily reports */
.rp .zero { stroke: #3a424c; stroke-width: 1; }
.rp .hit { fill: transparent; }
.rp .axis.on { fill: var(--accent); font-weight: 700; }
.bar-rat { fill: var(--accent); }
.fill-rat { fill: var(--accent); } .fill-min { fill: #5b8def; }
.rp-today { fill: rgba(217,164,65,.08); stroke: rgba(217,164,65,.35); }
.rp-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.rp-pt { fill: var(--panel); stroke: var(--accent); stroke-width: 2; } .rp-pt.on { fill: var(--accent); }
.rp-headline { margin: 0; font-size: 18px; font-weight: 600; }
.rp-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-nav .btn, .rp .head-actions form .btn { display: inline-block; }
.rp .head-actions form { margin: 0; }
.rp-cols { align-items: stretch; }
.rp-cols.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .rp-cols.three { grid-template-columns: minmax(0, 1fr); } }
.rp h3.sub { margin: 14px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.rp-ans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 4px 24px; }
.rp-an h3.sub { margin-top: 0; }
.rp-an ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.rp-an.act { border-left: 3px solid var(--warn); padding-left: 12px; }
.rp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.rp-dot.good { background: var(--ok); } .rp-dot.even { background: var(--warn); } .rp-dot.bad { background: var(--bad); }
.rp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rp-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rp-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rp-table th.r, .rp-table td.r { text-align: right; font-variant-numeric: tabular-nums; }
.rp-table a { color: inherit; text-decoration: none; } .rp-table a:hover { color: var(--accent); }
.rp-out { display: block; font-size: 11px; }
.rp-logo { vertical-align: middle; margin-right: 6px; border-radius: 4px; background: #000; }
.rp-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rp-rank li { display: grid; grid-template-columns: 20px 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rp-rank.sm li { grid-template-columns: 20px 28px minmax(0, 1fr) auto; }
.rp-rank .pos { color: var(--muted); font-size: 12px; text-align: right; }
.rp-rank img { border-radius: 50%; background: #000; }
.rr-main { display: grid; gap: 3px; min-width: 0; }
.rr-main b, .rr-main a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.rr-main a { color: inherit; text-decoration: none; } .rr-main a:hover { color: var(--accent); }
.rr-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-meter { display: block; width: 100%; height: 5px; }
.rp-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.rp-rows li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rp-rows li:last-child { border-bottom: 0; }
.rp-rows li > span:first-child:not(.sysdot) { grid-column: 1 / 3; }
.rp-rows img { border-radius: 50%; background: #000; }
.rp-rows a { color: inherit; text-decoration: none; } .rp-rows a:hover { color: var(--accent); }
.rp-rows b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-rows .sysdot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.rp-notable { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rp-notable li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; }
.rp-notable li > span { display: grid; gap: 1px; min-width: 0; }
.rp-notable img { border-radius: 6px; background: #000; }
.rp-notable a { color: inherit; text-decoration: none; } .rp-notable a:hover { color: var(--accent); }
.rp-hulls { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-hull { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border: 1px solid var(--line); border-radius: 999px; background: #10141a; font-size: 13px; }
.rp-hull img { border-radius: 50%; background: #000; }
.rp-stack { display: block; width: 100%; height: 10px; border-radius: 5px; overflow: hidden; margin: 6px 0 4px; }
.rp-keys { margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.rp-key { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.k-ice { fill: #7fd3f0; background: #7fd3f0; } .k-moon { fill: #b48cf0; background: #b48cf0; } .k-ore { fill: #d9a441; background: #d9a441; } .k-gas { fill: #4fbf7a; background: #4fbf7a; }
.rp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rp-list a { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #10141a; color: inherit; text-decoration: none; }
.rp-list a:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.rp-list a:hover .more { color: var(--accent); }
.rpl-date { display: grid; } .rpl-date b { font-size: 16px; }
.rpl-main { display: grid; gap: 2px; min-width: 0; }
.rpl-head { font-weight: 600; font-size: 14px; }
.rpl-sub { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rpl-side { display: flex; gap: 8px; align-items: center; }
@media (max-width: 560px) { .rp-list a { grid-template-columns: 56px minmax(0, 1fr); } .rpl-side { display: none; } }

/* admin: re-auth list */
.reauth .rrow { flex-wrap: wrap; }
.ra-discord { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 13px; font-weight: 400; }
.ra-char { display: inline-block; margin: 2px 10px 2px 0; padding-left: 8px; border-left: 3px solid var(--line); font-size: 13px; color: var(--text); }
.ra-char.bad { border-left-color: var(--bad); } .ra-char.warn { border-left-color: var(--warn); }

/* JF freight */
.jf-st { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; color: var(--muted); background: #151a21; }
.jf-st.open { color: var(--ok); border-color: rgba(79,191,122,.35); background: rgba(79,191,122,.08); }
.jf-st.closed { color: var(--accent); border-color: rgba(217,164,65,.35); background: rgba(217,164,65,.08); }
.jf-st.departed { color: #8fb0f5; border-color: rgba(91,141,239,.35); background: rgba(91,141,239,.08); }
.jf-st.cancelled { color: var(--bad); border-color: rgba(229,96,90,.35); }
.jf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 12px; }
.jf-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #10141a; color: inherit; text-decoration: none; border-left: 3px solid var(--line); }
.jf-card.open { border-left-color: var(--ok); } .jf-card.closed { border-left-color: var(--accent); } .jf-card.departed { border-left-color: #5b8def; }
.jf-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.jfc-top { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.jfc-top img, .jfs-head img { border-radius: 8px; background: #000; }
.jfc-ico { width: 36px; height: 36px; display: grid; place-items: center; font-size: 20px; }
.jfc-id { display: grid; gap: 2px; min-width: 0; } .jfc-id b { font-size: 15px; }
.jfc-when { font-size: 14px; }
.jfc-cap { display: grid; gap: 4px; }
.jfc-mine { font-size: 13px; color: var(--ok); }
.jf-bar { display: block; width: 100%; height: 8px; }
.jf-full { fill: var(--bad); }
.jf-tv { font-size: 16px; }
.jf-big { margin: 0 0 8px; font-size: 16px; }
.jf-instr { display: grid; gap: 4px; margin-top: 12px; padding: 10px 12px; border: 1px solid rgba(217,164,65,.3); border-radius: 10px; background: rgba(217,164,65,.05); font-size: 14px; }
.ji-row { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; } .ji-row .muted:first-child { min-width: 96px; }
.jf-change { margin-top: 10px; } .jf-change summary { cursor: pointer; color: var(--accent); font-size: 13px; }
.jf-form { margin-top: 8px; }
.jf-ship { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.jf-ship:last-of-type { border-bottom: 0; }
.jfs-head { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.jfs-head > div { display: grid; gap: 1px; }
.jfs-free { font-size: 13px; color: var(--muted); } .jfs-free b { color: var(--ok); font-size: 15px; }
.jf-res { list-style: none; margin: 0; padding: 0; display: grid; }
.jf-res li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto 26px auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid #1a2028; font-size: 14px; }
.jf-res img { border-radius: 50%; background: #000; }
.jr-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-vol, .jr-col { font-variant-numeric: tabular-nums; white-space: nowrap; } .jr-col { color: var(--muted); font-size: 13px; }
.jr-c { text-align: center; }
.jr-act { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.jr-act form { display: inline-flex; gap: 4px; margin: 0; } .jr-act select { padding: 4px 6px; font-size: 12px; }
.jf-ctl { display: flex; flex-wrap: wrap; gap: 8px; }
.jf-ctl form { margin: 0; }
.jf-delay { margin-top: 12px; } .jf-delay input { padding: 5px 8px; }
.jf .btn.gold { color: #17120a; background: var(--accent); border-color: var(--accent); }
.jf-shiprow { grid-template-columns: 1.2fr 1fr 1fr 1fr; }
.jf-check { align-self: end; padding-bottom: 10px; }
.jf h2 { margin-top: 4px; }
@media (max-width: 640px) {
  .jf-res li { grid-template-columns: 24px minmax(0, 1fr) auto 26px; }
  .jr-col { display: none; } .jr-act { grid-column: 2 / -1; justify-content: flex-start; }
  .jf-shiprow { grid-template-columns: 1fr 1fr; }
}
.jf .field input[type=date], .jf-delay input { background: #0f1317; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 15px; color-scheme: dark; }
.jf .field input[type=date] { width: 100%; }
.jf-delay input[type=text] { width: 70px; }
.jf-mine-p .r-title { white-space: normal; overflow: visible; }

/* knowledge base */
.kb-search { display: flex; gap: 8px; flex-wrap: wrap; }
.kb-search input[type=search] { flex: 1 1 320px; min-width: 0; background: #0f1317; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font: inherit; font-size: 15px; }
.kb-search select { background: #0f1317; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; }
.kb-search input:focus, .kb-search select:focus { outline: none; border-color: var(--accent); }
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 10px; }
.kb-card { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #10141a; color: inherit; text-decoration: none; }
.kb-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.kbc-title { font-weight: 700; font-size: 15px; } .kbc-sum { color: var(--muted); font-size: 13px; }
.kbc-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.kb-cols { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.kb-list { list-style: none; margin: 0; padding: 0; display: grid; }
.kb-list li { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kb-list li:last-child { border-bottom: 0; }
.kb-list a { display: grid; gap: 2px; color: inherit; text-decoration: none; min-width: 0; }
.kb-list a:hover b { color: var(--accent); }
.kb-list.compact li { padding: 7px 0; }
.kb-sugg { display: flex; gap: 6px; flex-wrap: wrap; } .kb-sugg form { margin: 0; }
.chip.warn { color: var(--warn); border-color: rgba(224,164,58,.35); }
.kb-by { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.kb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .kb-layout { grid-template-columns: minmax(0, 1fr); } .kb-side { order: -1; } .kb-toc { display: none; } }
.kb-side { position: sticky; top: 76px; }
.kb-body { font-size: 15.5px; line-height: 1.65; max-width: 80ch; overflow-wrap: anywhere; }
.kb-body > :first-child { margin-top: 0; }
.kb-body h1 { font-size: 26px; margin: 0 0 8px; }
.kb-body h2 { font-size: 20px; margin: 28px 0 8px; padding-top: 4px; border-top: 1px solid var(--line); text-transform: none; letter-spacing: 0; color: var(--text); scroll-margin-top: 80px; }
.kb-body h3 { font-size: 17px; margin: 20px 0 6px; scroll-margin-top: 80px; } .kb-body h4 { font-size: 15px; margin: 16px 0 4px; }
.kb-body p, .kb-body ul, .kb-body ol { margin: 0 0 12px; }
.kb-body ul, .kb-body ol { padding-left: 22px; } .kb-body li { margin: 3px 0; }
.kb-body a { color: var(--accent); } .kb-body a:hover { text-decoration: underline; }
.kb-body code { background: #0b0e12; border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: .9em; }
.kb-code { background: #0b0e12; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-size: 13px; line-height: 1.5; margin: 0 0 14px; }
.kb-code code { border: 0; padding: 0; background: none; }
.kb-body hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.kb-body mark { background: rgba(217,164,65,.25); color: inherit; padding: 0 3px; border-radius: 3px; }
.kb-lede { font-size: 17px; color: var(--muted); }
.kb-quote { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--line); background: #10141a; border-radius: 0 10px 10px 0; }
.kb-quote p:last-child { margin-bottom: 0; }
.kb-quote.tip { border-left-color: var(--ok); } .kb-quote.note { border-left-color: #5b8def; } .kb-quote.warning, .kb-quote.danger { border-left-color: var(--bad); background: rgba(229,96,90,.06); }
.kb-table { border-collapse: collapse; margin: 0 0 14px; font-size: 14px; min-width: 50%; }
.kb-table th, .kb-table td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.kb-table th { background: #10141a; }
.kb-img { max-width: 100%; border-radius: 6px; vertical-align: middle; }
.kb-missing { color: var(--muted); border-bottom: 1px dashed var(--muted); }
.kb-task { list-style: none; margin-left: -20px; }
.kb-box { display: inline-block; width: 13px; height: 13px; border: 1px solid var(--muted); border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.kb-box.on { background: var(--ok); border-color: var(--ok); }
.kb-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.kb-toc li.l3 { padding-left: 14px; font-size: 13px; }
.kb-toc a { color: var(--muted); text-decoration: none; } .kb-toc a:hover { color: var(--accent); }
.kb-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; } .kb-tags .chip { text-decoration: none; }
.kb-edit { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
@media (max-width: 900px) { .kb-edit { grid-template-columns: minmax(0, 1fr); } }
.kb-edit textarea { min-height: 420px; font-size: 14px; line-height: 1.5; }
.kb-help pre { background: #0b0e12; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.6; white-space: pre-wrap; margin: 6px 0; }
.kb-preview { border-color: rgba(217,164,65,.4); }
.kb .form input[type=text], .kb .form textarea, .kb .form select { width: 100%; }

.kb-video { margin: 0 0 16px; }
.kbv-frame { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.kbv-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kb-video figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }

.kb-up { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.kb-body .kb-img { display: block; max-width: 100%; height: auto; margin: 6px 0 14px; border: 1px solid var(--line); border-radius: 8px; }
.kb-body p .kb-img { display: inline-block; margin: 0; border: 0; }
