/* pilot-intel — Plum Noir theme (BRGD family) */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: #060409; }
body {
  background: linear-gradient(180deg, #0d0816 0%, #060409 45%);
  background-attachment: fixed;
  color: #ece8f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: #8b5cf6; text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.muted { color: #9a92ad; }
#app { min-height: 100vh; display: flex; flex-direction: column; max-width: 1180px; margin: 0 auto; padding: 0 16px; width: 100%; }

/* ---------- header (matches brgd.gg topbar exactly) ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid #2c2140;
  background: #0b0712;
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; font-weight: 700; font-size: 16px; letter-spacing: 0.2px; cursor: pointer; white-space: nowrap; text-decoration: none; color: inherit; }
.brand span { color: #8b5cf6; }
.brand small { color: #9a92ad; font-weight: 700; font-size: 12px; margin-left: 6px; letter-spacing: 1.5px; }
/* Split header: BRGD -> brgd.gg, · FILES -> files home (Canaan 2026-10-07) */
.brand-sub { color: #9a92ad; font-weight: 700; font-size: 12px; margin-left: 6px; letter-spacing: 1.5px; text-decoration: none; }
.brand-sub:hover { text-decoration: none; }
.brand:hover { text-decoration: none; }
.topbar .spacer { flex: 1; min-width: 0; }
.search-form { display: flex; gap: 8px; align-items: center; min-width: 0; }
.search-form input {
  background: #100b18; border: 1px solid #2c2140; color: #ece4f4;
  border-radius: 8px; padding: 8px 12px; font-size: 13px; width: min(420px, 40vw); min-width: 0; outline: none;
}
.search-form input:focus { border-color: #8b5cf6; }
/* header search button: ghost, like brgd.gg's topbar Go */
.topbar .btn {
  flex: none; background: transparent; color: #ece4f4; border: 1px solid #2c2140;
  border-radius: 8px; padding: 8px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.topbar .btn:hover { border-color: #8b5cf6; color: #8b5cf6; }
/* match brgd.gg's topbar tightening on small screens (keeps · FILES visible — it's the product name) */
@media (max-width: 620px) {
  .topbar { padding: 10px 12px; gap: 10px; }
  .topbar .btn { padding: 8px 10px; }
}
.btn {
  background: #8b5cf6; color: #0d0a14; border: 0; border-radius: 8px;
  padding: 8px 18px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.btn:hover { background: #8b5cf6; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- landing ---------- */
.hero { text-align: center; padding: 140px 16px 40px; }
.hero h1 { font-size: 34px; margin: 0 0 10px; font-weight: 700; letter-spacing: -0.5px; }
.hero h1 span { color: #8b5cf6; }
.hero h1 .cursor { animation: blink 1.1s steps(1) infinite; font-weight: 400; }
.hero p.hero-sub { font-size: 46px; margin: 12px 0 0; font-weight: 700; letter-spacing: -0.5px; color: inherit; }
.hero-sub .gd-purple { color: #8b5cf6; }
@keyframes blink { 50% { opacity: 0; } }
/* shimmer ported from brgd.gg's .magic-shimmer (same 2.8s sweep, same palette —
   brgd.gg's --blue is #8b5cf6, identical to this theme's accent) */
.hero h1 .magic-shimmer {
  background: linear-gradient(110deg, #8b5cf6 30%, #ffffff 50%, #8b5cf6 70%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: magic-shimmer 2.8s linear infinite;
}
@keyframes magic-shimmer { to { background-position: 200% center; } }
@media (prefers-reduced-motion: reduce) { .hero h1 .magic-shimmer { animation: none; } }
.hero p { color: #9a92ad; margin: 0 0 26px; font-size: 15px; }
.hero-form { display: flex; gap: 10px; max-width: 640px; margin: 0 auto; }
.hero-form input {
  flex: 1; background: #171223; border: 1px solid #2b2242; color: #ece8f5;
  border-radius: 10px; padding: 13px 16px; font-size: 16px; outline: none;
}
.hero-form input:focus { border-color: #8b5cf6; }
.hero-form .btn { padding: 13px 22px; color: #fff; }

/* ---------- panels ---------- */
.panel {
  background: #171223; border: 1px solid #2b2242; border-radius: 12px;
  padding: 16px 18px; margin-bottom: 14px; min-width: 0;
}
.panel h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; color: #9a92ad; font-weight: 700; }
.panel h3 .tag { float: right; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; }
/* collapsible panel header: full-width toggle, separate hit area from the ⠿ drag handle */
.panel-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; margin: 0 0 12px; padding: 2px 34px 2px 0; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: #9a92ad; text-align: left;
}
.panel-toggle .panel-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-toggle .panel-title .tag { margin-left: 8px; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; }
.panel-toggle:hover .panel-title { color: #cfc6e6; }
.panel-toggle:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 2px; border-radius: 6px; }
.panel-chev { color: #8b5cf6; font-size: 14px; flex: none; }
.panel-body[hidden] { display: none; }
/* masonry board: heatmap strip pinned above, panels stack directly under each
   other in 3 columns — a tall panel no longer stretches its row-mates */
#panel-board, #corp-board, #sys-board { display: flex; flex-direction: column; gap: 14px; }
.board-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.bcol { display: flex; flex-direction: column; gap: 14px; min-height: 120px; min-width: 0; }
.bcol > .panel-wrap { break-inside: avoid; }
@media (max-width: 900px) { .board-cols { grid-template-columns: 1fr; } }

/* rearrangeable panels: the wrap is the grid cell, the panel inside is static.
   The whole wrap is the drag surface (8px press-and-move threshold); pan-y
   keeps vertical touch scrolling working — the browser takes the gesture
   and the pending drag cancels. */
.panel-wrap { position: relative; min-width: 0; touch-action: pan-y; }
.panel-wrap > .panel { margin-bottom: 0; }
.drag-handle {
  position: absolute; top: 9px; right: 9px; z-index: 6;
  cursor: grab; color: #6f6387; font-size: 13px; letter-spacing: 1px; line-height: 1;
  padding: 5px 7px; border-radius: 6px;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.drag-handle:hover, .drag-handle:focus-visible { color: #8b5cf6; background: #221a35; outline: none; }
.panel-drag {
  position: fixed; left: 0; top: 0; z-index: 200; margin: 0 !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55); border-radius: 12px;
  pointer-events: none; opacity: 0.97; cursor: grabbing;
}
.drop-ph { border: 2px dashed #8b5cf6; border-radius: 12px; background: rgba(139, 92, 246, 0.06); }
body.dragging-panels, body.dragging-panels .drag-handle { cursor: grabbing; }
body.dragging-panels { user-select: none; -webkit-user-select: none; }
.dossier-foot {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 24px;
}
.dossier-foot .src-line { margin-top: 0; }
.link-btn { background: none; border: 0; color: #8b5cf6; font-size: 12px; cursor: pointer; padding: 4px 2px; }
.link-btn:hover { text-decoration: underline; }

/* pilot header */
.pilot-head { display: flex; gap: 18px; align-items: flex-start; }
.avatar {
  width: 84px; height: 84px; border-radius: 14px; flex: none;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border: 1px solid #2b2242; overflow: hidden;
  position: relative;
}
.avatar span.fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800; color: #fff;
}
.avatar img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.pilot-head h2 { margin: 0 0 4px; font-size: 24px; }
.pilot-org { color: #9a92ad; font-size: 13px; margin-bottom: 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: #221a35; border: 1px solid #352a52; border-radius: 20px;
  padding: 5px 14px; font-size: 12px; font-weight: 600; color: #d8cff0;
  white-space: nowrap; letter-spacing: .02em;
}
.chip b { color: #ece8f5; }
.chip.good { border-color: #1f5c40; color: #7fe0ae; }
.chip.warn { border-color: #6b4d16; color: #e8bd6a; }
.chip.bad { border-color: #6e2b2b; color: #f09393; }
.chip .v { color: #8b5cf6; font-weight: 700; }
/* wormhole class colors — difficulty ramp, C1 (green) → C6 (red) */
.chip.whc1, span.whc1 { color: #4ade80; }
.chip.whc2, span.whc2 { color: #a3e635; }
.chip.whc3, span.whc3 { color: #facc15; }
.chip.whc4, span.whc4 { color: #fb923c; }
.chip.whc5, span.whc5 { color: #fb7185; }
.chip.whc6, span.whc6 { color: #ef4444; }
.chip.whc1 { border-color: rgba(74,222,128,.45); background: rgba(74,222,128,.07); }
.chip.whc2 { border-color: rgba(163,230,53,.45); background: rgba(163,230,53,.07); }
.chip.whc3 { border-color: rgba(250,204,21,.45); background: rgba(250,204,21,.07); }
.chip.whc4 { border-color: rgba(251,146,60,.45); background: rgba(251,146,60,.07); }
.chip.whc5 { border-color: rgba(251,113,133,.45); background: rgba(251,113,133,.07); }
.chip.whc6 { border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.08); }
span.whc1, span.whc2, span.whc3, span.whc4, span.whc5, span.whc6,
span.whhs, span.whls, span.whns { font-weight: 700; }
/* k-space static destinations — sec-status colors */
span.whhs { color: #4ade80; }
span.whls { color: #facc15; }
span.whns { color: #ef4444; }

/* "did you mean" suggestions on the lookup-failed box */
.did-you-mean { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin: 4px 0 14px; }
.dym-label { font-size: 13px; }
.sug-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: #1b1430; border: 1px solid #352a52; border-radius: 10px; padding: 8px 12px; cursor: pointer; color: #ece8f5; transition: border-color .15s; font: inherit; }
.sug-card:hover { border-color: #8b5cf6; }
.sug-card b { font-size: 14px; }
.sug-card .muted { font-size: 12px; }

/* heatmap */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 96px; }
.bars .bar { flex: 1; background: #3b2d5e; border-radius: 2px 2px 0 0; min-height: 3px; position: relative; }
.bars .bar.peak { background: #8b5cf6; }
.bars .bar:hover { background: #8b5cf6; }
.axis { display: flex; justify-content: space-between; color: #9a92ad; font-size: 10px; margin-top: 4px; }
.week { display: flex; gap: 6px; margin-top: 12px; }
.week .day { flex: 1; text-align: center; }
.week .day .wb { display: block; height: 34px; background: #221a35; border-radius: 4px; position: relative; overflow: hidden; }
.week .day .wb i { position: absolute; bottom: 0; left: 0; right: 0; background: #3b2d5e; display: block; }
.week .day.peak .wb i { background: #8b5cf6; }
.week .day span { font-size: 10px; color: #9a92ad; white-space: nowrap; }

/* interactive heatmap: drill-down, y-axis, peak counts */
.hm-chart { display: flex; gap: 8px; align-items: stretch; }
.hm-plot { flex: 1; min-width: 0; }
.hm-yaxis { display: flex; flex-direction: column; justify-content: space-between; height: 96px; font-size: 10px; color: #9a92ad; text-align: right; flex: none; }
.bar-num { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #a78bfa; white-space: nowrap; }
.week button.day { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.week button.day .wb { transition: outline-color .15s, box-shadow .15s; }
.week button.day:hover .wb { outline: 1px solid #6d5a94; }
.week button.day.sel .wb { outline: 2px solid #4ade80; box-shadow: 0 0 10px rgba(74, 222, 128, .45); }
.hm-drillbar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }

/* rows with bars */
.kv-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #221a35; font-size: 13px; }
.kv-row:last-child { border-bottom: 0; }
.kv-row .nm { flex: none; width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Structures panel: long sentences must WRAP, never truncate. */
.kv-row .struct-line { flex: 1; min-width: 0; white-space: normal; }
.kv-row .barwrap { flex: 1; height: 8px; background: #221a35; border-radius: 4px; overflow: hidden; }
.kv-row .barwrap i { display: block; height: 100%; background: linear-gradient(90deg, #8b5cf6, #8b5cf6); border-radius: 4px; }
.kv-row .ct { width: 64px; text-align: right; color: #9a92ad; font-size: 12px; flex: none; }
.kv-row .ct.wide { width: 96px; } /* kills/losses pairs in the system dossier */
/* system dossier: pilot's corp between the name and the counts */
.sys-corp {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #9a92ad; font-size: 12px;
}
.mini-avatar {
  width: 26px; height: 26px; border-radius: 7px; flex: none;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: #fff;
}
.badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.6px; border-radius: 4px; padding: 2px 6px; flex: none;
}
.badge.corp { background: rgba(139, 92, 246, 0.18); color: #a78bfa; }
.badge.ally { background: rgba(63, 214, 140, 0.14); color: #7fe0ae; }
.badge.neutral { background: rgba(232, 189, 106, 0.14); color: #e8bd6a; }

/* fits */
.fit { margin-bottom: 14px; }
.fit:last-child { margin-bottom: 0; }
.fit h4 { margin: 0 0 8px; font-size: 14px; }
.fit h4 .muted { font-weight: 400; font-size: 12px; }
.slot-group { margin-bottom: 8px; }
.slot-group > span { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #9a92ad; display: block; margin-bottom: 4px; }
.mod {
  display: inline-block; background: #221a35; border: 1px solid #2b2242; border-radius: 6px;
  padding: 3px 9px; margin: 0 6px 6px 0; font-size: 12px; color: #cfc6e6;
}
.mod i { font-style: normal; margin-right: 6px; }
.mod .drop { color: #7fe0ae; } .mod .dest { color: #f09393; }

/* summary hero */
.sum-hero { margin-bottom: 14px; }
.sum-lines { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.sum-line { font-size: 13px; color: #cfc6e6; }
.sum-label { display: inline-block; width: 76px; flex: none; color: #9a92ad; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }

/* fight factor: skirmisher <-> care bear estimate */
.fight-wrap { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fight-meter {
  display: inline-block; width: 110px; height: 8px; background: #221a35;
  border-radius: 4px; overflow: hidden; vertical-align: middle;
}
.fight-meter i { display: block; height: 100%; background: linear-gradient(90deg, #f09393, #e8bd6a 45%, #7fe0ae 80%); border-radius: 4px; }
.fight-ev { font-size: 11px; color: #6f6387; margin: 3px 0 2px 76px; }
.tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
  color: #9a92ad; border: 1px solid #2b2242; border-radius: 4px; padding: 1px 6px; white-space: nowrap;
}
.tag.est { color: #a78bfa; border-color: rgba(139, 92, 246, 0.45); }
.tag.bash { color: #f87171; border-color: rgba(248, 113, 113, 0.55); }
.tag.home-pick { color: #4ade80; border-color: rgba(74, 222, 128, 0.45); }
.sig-row.home-pick .zkb-link b { color: #4ade80; }
.kv-row.home-pick .nm { color: #4ade80; }
.sum-line b.home-pick { color: #4ade80; }

/* collapsible heatmap strip */
.hm-strip { margin-bottom: 14px; }
.hm-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: #9a92ad; text-align: left;
}
.hm-toggle .tag { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; }
.hm-chev { color: #8b5cf6; font-size: 14px; flex: none; }
.hm-body { margin-top: 12px; }

/* loss-fit accordions */
.fit-acc { border: 1px solid #2b2242; border-radius: 8px; margin: 8px 0; }
.fit-acc summary { cursor: pointer; padding: 10px 12px; list-style: none; font-size: 14px; }

/* intel brief: the prose summary at the top of the hero */
.intel-brief {
  margin: 10px 0 6px; padding: 10px 14px;
  background: #1d1530; border: 1px solid #3a2c5e; border-radius: 10px;
}
.intel-brief .brief-line { margin: 9px 0; font-size: 13.5px; line-height: 1.7; color: #e6def7; }
.intel-brief .brief-line:first-of-type { margin-top: 8px; }
.intel-brief .brief-line:last-of-type { margin-bottom: 2px; }
.intel-brief .brief-line strong { color: #ffffff; font-weight: 700; }

/* collapsed detail subsections inside existing panels */
.sub-acc { border: 1px solid #2b2242; border-radius: 8px; margin: 10px 0 2px; }
.sub-acc summary {
  cursor: pointer; padding: 8px 12px; list-style: none;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #9a92ad;
}
.sub-acc summary::-webkit-details-marker { display: none; }
.sub-acc summary::before { content: '▸'; color: #8b5cf6; margin-right: 8px; }
.sub-acc[open] summary::before { content: '▾'; }
.sub-acc .sub-body { padding: 2px 12px 10px; font-size: 12.5px; }
.sub-acc .src-line { margin-top: 8px; }
.sig-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 4px 0; border-bottom: 1px solid #221a35; }
.sig-row:last-child { border-bottom: 0; }
.sig-row > span:first-child { flex: none; white-space: nowrap; }

/* bait recommendation cards */
.bait-card { padding: 12px 2px; border-top: 1px solid #2b2242; }
.bait-card:first-of-type { border-top: 0; padding-top: 4px; }
.bait-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.bait-play { font-size: 15px; font-weight: 700; color: #ece8f5; }
.bait-tactic { font-size: 12px; color: #a89cc9; font-style: italic; }
.bait-proven {
  font-size: 11.5px; font-weight: 700; color: #a78bfa; white-space: nowrap;
  background: rgba(139, 92, 246, 0.12); border: 1px solid rgba(139, 92, 246, 0.45); border-radius: 20px; padding: 3px 10px;
}
.bait-hulls { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.bait-stats { margin-top: 10px; display: grid; gap: 4px; }
.bait-stat { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.5; }
.bait-stat-k { color: #9a92ad; flex: 0 0 96px; }
.bait-stat-v { color: #d6d0e8; }

/* likely same-operator evidence sub-line (the name itself carries the
   orange-bold signal now — no bubble, no highlight) */
.alt-ev { font-size: 11px; padding: 2px 0 6px 36px; }
/* wingman names link to zKillboard; plain names inherit row styling */
.kv-row a.nm { color: inherit; text-decoration: none; }
.kv-row a.nm:hover { text-decoration: underline; }
.kv-row a.nm.alt-name { color: #f0a35c; font-weight: 700; }
.kv-row a.nm.main-name { color: #4ade80; font-weight: 700; }
/* inline zkb links (fit headers, system names): invisible until hover */
a.zkb-link { color: inherit; text-decoration: none; }
a.zkb-link:hover { text-decoration: underline; }
.fit-acc summary::-webkit-details-marker { display: none; }
.fit-acc summary::before { content: '▸'; color: #8b5cf6; margin-right: 8px; }
.fit-acc[open] summary::before { content: '▾'; }
.fit-acc summary .muted { font-weight: 400; font-size: 12px; }
.fit-acc .fit-body { padding: 2px 12px 10px 26px; }
/* bait clock: 24h dial with peak arc + glowing now-marker + state word */
.act-clock { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; vertical-align: middle; }
.act-clock svg { flex: none; filter: drop-shadow(0 0 3px rgba(0,0,0,.6)); }
.act-state { font-size: 12px; font-weight: 800; letter-spacing: 1.2px; }
.act-now .act-state { color: #7fe0ae; text-shadow: 0 0 10px rgba(127,224,174,.55); }
.act-soon .act-state { color: #e8bd6a; text-shadow: 0 0 10px rgba(232,189,106,.5); }
.act-no .act-state { color: #f87171; }
.act-maybe .act-state { color: #c9a45c; }
.act-sleepy .act-state { color: #6f74c9; }
/* bait brief verdict — same state palette as the activity clock */
.bait-v[data-s="NOW"] { color: #7fe0ae; }
.bait-v[data-s="SOON"] { color: #e8bd6a; }
.bait-v[data-s="NO"] { color: #f87171; }
.bait-v[data-s="MAYBE"] { color: #c9a45c; }
.bait-v[data-s="SLEEPY"] { color: #6f74c9; }

/* fitting-archetype chips + inference "why" line */.arch-chip {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.4px;
  padding: 2px 9px; margin-left: 7px; border-radius: 11px; vertical-align: 1px;
  background: rgba(139, 92, 246, 0.16); border: 1px solid rgba(139, 92, 246, 0.45); color: #a78bfa;
  white-space: nowrap;
}
/* abyssal modules get their own red badge (zkb shows abyssal mods in red);
   bling stays faction/deadspace/officer only */
.arch-chip.abyss {
  background: rgba(240, 147, 147, 0.14); border-color: rgba(240, 147, 147, 0.5); color: #f09393;
}
/* timeline */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: #2b2242; }
.tl-item { position: relative; padding: 6px 0 6px 8px; font-size: 13px; }
.tl-item::before {
  content: ""; position: absolute; left: -17px; top: 12px; width: 8px; height: 8px;
  border-radius: 50%; background: #8b5cf6; border: 2px solid #171223;
}
.tl-item .dur { color: #9a92ad; font-size: 12px; }
.tl-item.current::before { background: #3fd68c; }

/* recruit */
.rec-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #221a35; font-size: 13px; }
.rec-row:last-child { border-bottom: 0; }
.rec-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.rec-ico.ok { background: rgba(63, 214, 140, 0.15); color: #7fe0ae; }
.rec-ico.warn { background: rgba(232, 189, 106, 0.15); color: #e8bd6a; }
.rec-ico.bad { background: rgba(240, 147, 147, 0.15); color: #f09393; }
.rec-row .ev { color: #9a92ad; font-size: 12px; display: block; }

/* loading / error */
.loading { text-align: center; padding: 80px 20px; }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 18px; border-radius: 50%;
  border: 3px solid #2b2242; border-top-color: #8b5cf6; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.load-steps { color: #9a92ad; font-size: 13px; margin-top: 8px; min-height: 20px; }
.error-box { max-width: 560px; margin: 80px auto; text-align: center; }
.error-box .panel { padding: 32px; }
.partial-note {
  background: rgba(232, 189, 106, 0.08); border: 1px solid #6b4d16; color: #e8bd6a;
  border-radius: 8px; padding: 8px 14px; font-size: 12px; margin-bottom: 14px;
}
.src-line { color: #6f6387; font-size: 11px; margin-top: 10px; }

footer {
  text-align: center; color: #6f6387; font-size: 12px; padding: 28px 16px 40px; line-height: 1.8;
  margin-top: auto;
}
footer a { color: #8b5cf6; }
@media (max-width: 640px) {
  .topbar { padding: 10px 12px; gap: 10px; }
  .search-form input { width: 140px; }
  .hero h1 { font-size: 26px; }
  .pilot-head h2 { font-size: 20px; }
}

/* corp dossier: 7x24 activity grid */
.corp-hm { display: grid; grid-template-columns: 44px repeat(24, 22px); gap: 4px; align-items: center; margin: 8px 0 12px; overflow-x: auto; padding-bottom: 4px; }
.corp-hm .hm-day { font-size: 11px; color: #9a92ad; white-space: nowrap; }
.corp-hm .hm-h { font-size: 9px; color: #6f6387; text-align: center; }
.corp-hm .hm-cell { width: 22px; height: 22px; background: #221a35; border-radius: 3px; }
.corp-hm .hm-cell:hover { outline: 1px solid #8b5cf6; }
/* pilot-dossier links inside corp rows: same look as wingman names */
.kv-row a.nm.pilot-link:hover { color: #a78bfa; }

/* Corp/alliance dossier hero */
.corp-hero { padding: 20px; }
.corp-hero-main { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.corp-logo { width: 64px; height: 64px; border-radius: 8px; }
.corp-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.corp-name { font-size: 24px; font-weight: 700; color: #fff; text-decoration: none; }
.corp-name:hover { color: #8b5cf6; }
.corp-kind { font-size: 13px; color: #888; margin-top: 4px; }
.corp-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.corp-stat { display: flex; flex-direction: column; align-items: center; }
.corp-stat-v { font-size: 20px; font-weight: 700; }
.corp-stat-l { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }

/* Top ships grid */
.ship-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; margin: 8px 0; }
.ship-card { background: #1a1430; border-radius: 8px; padding: 10px; text-align: center; }
.ship-card img { width: 64px; height: 64px; object-fit: contain; }
.ship-card-name { font-size: 12px; font-weight: 600; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ship-card-count { font-size: 16px; font-weight: 700; color: #8b5cf6; margin: 2px 0; }
.ship-card-bar { height: 4px; background: #221a35; border-radius: 2px; overflow: hidden; }
.ship-card-bar i { display: block; height: 100%; background: #8b5cf6; }

/* Structures panel readability + collapsible per-system sections (Canaan 2026-10-06) */
[data-cpanel="corp-structures"] .struct-line,
[data-cpanel="sys-structures"] .struct-line { font-size: 14px; line-height: 1.5; }
[data-cpanel="corp-structures"] .src-line,
[data-cpanel="sys-structures"] .src-line { font-size: 13px; }
.struct-sys { border-bottom: 1px solid #221a35; }
.struct-sys-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; background: none; border: 0; padding: 8px 0; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.struct-chev { color: #9a92ad; flex: none; }
.struct-sys-body { padding-bottom: 4px; }

/* Structure intel inputs (Canaan 2026-10-06): on-theme dark inputs */
.si-input, .si-triff-text {
  background: #1a1430; border: 1px solid #3b2d5e; border-radius: 6px;
  color: #e8e2f5; padding: 7px 10px; font-size: 13px; font-family: inherit;
  width: 100%; max-width: 420px; box-sizing: border-box;
}
.si-input::placeholder, .si-triff-text::placeholder { color: #6f6387; }
.si-input:focus, .si-triff-text:focus { outline: none; border-color: #8b5cf6; }
.si-triff-text { max-width: 360px; }
.btn-sm {
  background: #8b5cf6; color: #0d0a14; border: 0; border-radius: 6px;
  padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.btn-sm:hover { filter: brightness(1.12); }
.btn-sm:disabled { opacity: 0.5; cursor: default; }

/* Readability pass (Canaan 2026-10-06): POCO rows brighter + bigger, residents timeline bigger */
.poco-row { font-size: 14px; color: #c9c2da; }
[data-cpanel="sys-residents"] .tl-item { font-size: 14px; }
[data-cpanel="sys-residents"] .tl-item .dur { font-size: 13px; }
[data-cpanel="sys-residents"] .kv-row .nm { width: 190px; }
.resident-now { color: #4ade80; }
.tag.triff { color: #4ade80; border-color: rgba(74, 222, 128, 0.45); }
.tag.warn { color: #fbbf24; border-color: rgba(251, 191, 36, 0.5); }
a.dossier-link { color: inherit; text-decoration: none; }
a.dossier-link:hover { text-decoration: underline; }
.confirmed-now { color: #4ade80; }
.destroyed-now { color: #f87171; }
/* Structure death rows: one scannable line — bold type, muted meta, breathing room. */
.struct-death { padding: 9px 0; }
.struct-death .struct-type { font-weight: 700; color: #fff; }
.struct-death .struct-meta { color: #9a92ad; }
/* Corp hero: alliance badge top-right (Canaan 2026-10-06). */
.corp-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.corp-hero-top .corp-hero-main { margin-bottom: 0; }
.corp-alliance { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; text-decoration: none; color: inherit; }
.corp-alliance img { width: 72px; height: 72px; border-radius: 10px; }
.corp-alliance-name { font-size: 14px; font-weight: 700; text-align: center; }
.corp-alliance:hover .corp-alliance-name { text-decoration: underline; }
.age-hl { color: #a78bfa; }
.dossier-link.resident { color: #4ade80; }
.dossier-link.pilot { color: #a78bfa; }
.corp-hero-text .corp-stats { margin-top: 12px; }
