/* Hidden Costs, Cat vs Mono, Crewed Charter Budgets: dark, dense, colourful. Uses the shell tokens (shell.css)
   and the shared swarm/control/legend/detail styles (dist.css). */
.cst-wrap h2 { margin-top: 26px; }

/* ---- Hidden Costs headline + reporting coverage ---- */
.cst-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 10px; }
.cst-big { background: var(--sc-panel); border: 1px solid var(--sc-line); border-top: 4px solid #e8b448; border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cst-big:nth-child(1) { border-top-color: #4ecdc4; } .cst-big:nth-child(3) { border-top-color: #c79bf2; }
.cst-big b { font-size: 34px; font-weight: 800; color: #fff; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cst-big span { font-size: 13px; color: var(--sc-text-2); line-height: 1.4; }
.cst-states { background: var(--sc-panel); border: 1px solid var(--sc-line); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; }
.cst-bar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; background: #1a2b47; margin-bottom: 8px; }
.cst-bar i, .cst-mini i { display: block; min-width: 0; }
.cst-bar i.rep, .cst-mini i.rep, .cst-keys i.rep { background: #e8b448; }
.cst-bar i.zero, .cst-mini i.zero, .cst-keys i.zero { background: #8aa3c0; }
.cst-bar i.unk, .cst-mini i.unk, .cst-keys i.unk { background: repeating-linear-gradient(45deg, #f4cf85 0 3px, #1a2b47 3px 6px); }
.cst-keys { list-style: none; display: grid; gap: 4px; padding: 0; font-size: 13px; color: var(--sc-text-2); }
.cst-keys li { display: flex; gap: 8px; align-items: baseline; }
.cst-keys li b { color: #fff; font-variant-numeric: tabular-nums; }
.cst-keys i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; flex: none; }
.cst-recon { font-size: 13px; color: var(--sc-text-2); margin: 0 0 10px; line-height: 1.5; max-width: 120ch; }
.cst-mini { display: inline-flex; width: 120px; height: 8px; border-radius: 4px; overflow: hidden; background: #1a2b47; flex: none; }
.cst-rowbar { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding: 3px 10px 0; }
.cst-rowbar .dst-fine { color: var(--sc-text-2); font-size: 12px; }
.cst-up b { color: #f4cf85; }

/* ---- pairs: fee ring -> total dot ---- */
.cst-svg .cst-pair { cursor: pointer; outline: none; }
.cst-svg .hit { stroke: transparent; stroke-width: 11; stroke-linecap: round; }
.cst-svg .link { stroke: #e8b448; stroke-width: 2.2; stroke-linecap: round; opacity: .85; }
.cst-svg .fee { fill: #0a1628; stroke: #9fb4cc; stroke-width: 1.8; }
.cst-svg .tot { fill: #e8b448; stroke: #0a1628; stroke-width: .8; }
.cst-svg .zero { fill: #8aa3c0; stroke: #0a1628; stroke-width: .8; }
.cst-svg .unk { fill: #0a1628; stroke: #f4cf85; stroke-width: 1.8; stroke-dasharray: 2.5 2; }
.cst-svg .cst-pair:hover .link, .cst-svg .cst-pair:focus-visible .link, .cst-svg .cst-pair.sel .link { stroke: #fff; stroke-width: 3; opacity: 1; }
.cst-svg .cst-pair:hover .tot, .cst-svg .cst-pair:focus-visible .tot, .cst-svg .cst-pair.sel .tot { stroke: #fff; stroke-width: 2; }
.cst-svg .cst-pair:focus-visible .hit { stroke: rgba(255,209,102,.35); stroke-width: 13; }
.cst-lg-link { stroke: #e8b448; stroke-width: 2.2; } .cst-lg-fee { fill: #0a1628; stroke: #9fb4cc; stroke-width: 1.8; } .cst-lg-tot { fill: #e8b448; }
.cst-lg-zero { fill: #8aa3c0; } .cst-lg-unk { fill: #0a1628; stroke: #f4cf85; stroke-width: 1.8; stroke-dasharray: 2.5 2; }

/* ---- tables, lists, panels ---- */
.cst-tscroll { overflow-x: auto; max-width: 100%; background: var(--sc-panel); border: 1px solid var(--sc-line); border-radius: 12px; }
.cst-table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 13px; color: var(--sc-text-2); }
.cst-table caption { text-align: left; padding: 10px 12px 4px; font-size: 13px; font-weight: 700; color: var(--sc-text-2); caption-side: top; }
.cst-table th, .cst-table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid #1c2e4a; font-variant-numeric: tabular-nums; vertical-align: top; }
.cst-table thead th { color: var(--sc-text-3); font-weight: 600; white-space: nowrap; }
.cst-table tbody th { color: var(--sc-text); font-weight: 600; }
.cst-table td.gap { color: var(--sc-text-3); } .cst-table small { color: var(--sc-text-3); font-size: 12px; }
.cst-table b { color: #fff; }
.cst-link { font: inherit; font-size: 13px; font-weight: 700; color: var(--sc-accent); background: transparent; border: 1px solid var(--sc-line); border-radius: 8px; min-height: 44px; padding: 0 10px; cursor: pointer; margin: 2px 4px 2px 0; }
.cst-link:hover { border-color: var(--sc-accent); } .cst-link:focus-visible { outline: 3px solid var(--sc-focus); outline-offset: 2px; }
.cst-more { margin: 10px 0 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.cst-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cst-topcol { background: var(--sc-panel); border: 1px solid var(--sc-line); border-top: 4px solid #e8b448; border-radius: 12px; padding: 10px 12px; min-width: 0; }
.cst-topcol:nth-child(2) { border-top-color: #c79bf2; }
.cst-topcol h3 { font-size: 13px; font-weight: 700; color: var(--sc-text-2); margin-bottom: 6px; }
.cst-q { display: flex; width: 100%; align-items: baseline; gap: 10px; text-align: left; font: inherit; font-size: 13px; color: var(--sc-text); background: transparent; border: 0; border-bottom: 1px solid #1c2e4a; padding: 8px 2px; min-height: 44px; cursor: pointer; }
.cst-q:last-child { border-bottom: 0; } .cst-q:hover { background: rgba(232,180,72,.08); } .cst-q:focus-visible { outline: 3px solid var(--sc-focus); outline-offset: -2px; }
.cst-q b { font-size: 16px; color: #fff; min-width: 70px; font-variant-numeric: tabular-nums; }
.cst-q span { color: var(--sc-text-2); min-width: 0; overflow-wrap: anywhere; }
.cst-topcol .bgt-empty { color: var(--sc-text-3); font-size: 13px; padding: 6px 2px; }

.cst-incl { background: var(--sc-panel); border: 1px solid var(--sc-line); border-radius: 12px; overflow-x: auto; margin-bottom: 10px; }
.cst-incl table { border-collapse: collapse; width: 100%; min-width: 600px; font-size: 13px; color: var(--sc-text-2); }
.cst-incl caption { text-align: left; padding: 10px 12px 4px; font-weight: 700; }
.cst-incl th, .cst-incl td { text-align: left; padding: 6px 10px; border-bottom: 1px solid #1c2e4a; vertical-align: top; }
.cst-incl thead th { color: var(--sc-text-3); font-weight: 600; } .cst-incl tbody th { color: var(--sc-text); font-weight: 600; white-space: nowrap; }
.cst-st { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 10px; border: 1px solid var(--sc-line); white-space: nowrap; }
.cst-st.ok { color: #7be0b1; border-color: #3a9d77; } .cst-st.part { color: #f4cf85; border-color: var(--sc-amber); } .cst-st.miss { color: var(--sc-text-2); border-style: dashed; }
.cst-unavail, .cst-ok { padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; color: var(--sc-text-2); background: var(--sc-panel); max-width: 120ch; }
.cst-unavail { border: 1px dashed var(--sc-amber); } .cst-unavail b { color: #f4cf85; }
.cst-ok { border: 1px solid #3a9d77; } .cst-ok b { color: #7be0b1; }
.cst-sum { font-size: 15px; font-weight: 700; color: #fff; background: #13243e; border-radius: 8px; padding: 8px 12px; margin: 8px 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cst-sum b { color: var(--sc-amber); }

/* ---- Cat vs Mono ---- */
.ct-row { padding-bottom: 8px; }
.ct-diff { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; padding: 6px 10px 2px; font-size: 14px; color: var(--sc-text-2); }
.ct-dword { font-weight: 800; color: #fff; }
.ct-dnum b { font-size: 20px; color: var(--sc-amber); font-variant-numeric: tabular-nums; }
.ct-dnum .lbl { font-size: 12px; color: var(--sc-text-3); }
.ct-diff[data-direction="cat_lower"] .ct-dnum b { color: #7bd3ff; }
.ct-sub { padding-top: 2px; }
.ct-subhead { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: baseline; padding: 4px 10px 0; font-size: 13px; color: var(--sc-text-2); }
.ct-subhead i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: -6px; align-self: center; }
.ct-subhead > b { color: #fff; font-size: 14px; }
.ct-subhead .dst-st { flex: 1 1 320px; }
.ct-mix { font-size: 13px; color: var(--sc-text-2); padding: 4px 10px 2px; line-height: 1.5; max-width: 120ch; }
.ct-mix .mono { color: #9ccdf7; } .ct-mix .cat { color: #8fe6df; }

/* ---- Crewed ---- */
.cw-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 4px; }
.cw-card { background: var(--sc-panel); border: 1px solid var(--sc-line); border-top: 5px solid var(--c); border-radius: 12px; padding: 10px 14px; min-width: 0; }
.cw-card h3 { font-size: 17px; font-weight: 800; color: #fff; }
.cw-card p { font-size: 12px; color: var(--sc-text-2); margin: 2px 0 6px; line-height: 1.4; }
.cw-n { font-size: 13px; color: var(--sc-text-2); } .cw-n b { color: #fff; font-size: 18px; font-variant-numeric: tabular-nums; }
.cw-med { margin-top: 6px; font-size: 13px; color: var(--sc-text-2); } .cw-med b { font-size: 24px; color: var(--c); font-variant-numeric: tabular-nums; }
.cw-med small { display: block; font-size: 12px; color: var(--sc-text-3); }
.cw-sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; }
.cw-none { padding: 14px 12px; font-size: 13px; color: var(--sc-text-2); }
.cw-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
.cw-pc { background: #13243e; border-radius: 10px; padding: 10px 14px; font-size: 14px; color: var(--sc-text-2); }
.cw-pc h4 { font-size: 15px; color: #fff; margin-bottom: 4px; } .cw-pc b { color: #fff; font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .cst-top, .cw-pair { grid-template-columns: 1fr; }
  .cst-big b { font-size: 28px; }
  .ct-diff { font-size: 13px; }
  .cst-table { min-width: 560px; }
}

.cst-table[data-qa="matched-table"] td { white-space: nowrap; }
.cst-table[data-qa="matched-table"] td:last-child { white-space: normal; min-width: 150px; }
