/* Day91 — v4 component layer.
   Loaded last, after pop.css. Every colour here is a token from
   styles.css or color.css; nothing new is introduced. */

/* ============================================================
   1. THE ACTION BLOCK  (assets/action.js)
   Sits under a finding. Deliberately visually quieter than the
   finding itself — the document is the claim, this is the
   consequence, and the hierarchy should say so.
   ============================================================ */

.act {
  --tone: var(--c-teal);
  margin-top: .9rem;
  padding: .85rem 1rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--rule-soft);
  border-left: 3px solid var(--tone);
  background:
    radial-gradient(90% 120% at 0% 0%, color-mix(in oklab, var(--tone) 8%, transparent), transparent 65%),
    var(--paper-2);
}
.act-hard { --tone: var(--c-green); }
.act-soft { --tone: var(--c-amber); }

.act-h {
  display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap;
  margin-bottom: .5rem;
}
.act-k {
  font-family: var(--mono); font-size: .64rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: color-mix(in oklab, var(--tone) 82%, #000);
  background: color-mix(in oklab, var(--tone) 15%, #fff);
  border-radius: 999px; padding: .2rem .55rem;
}
.act-w { font-size: .74rem; color: var(--faint); }

.act-move { margin: 0; font-size: .93rem; line-height: 1.58; color: var(--ink); }

.act-lbl {
  display: block;
  font-family: var(--mono); font-size: .62rem; font-weight: 600;
  letter-spacing: .11em; text-transform: uppercase; color: var(--faint);
  margin-bottom: .25rem;
}

.act-ask { margin-top: .8rem; }
.act-q {
  margin: 0; padding: .55rem .8rem;
  background: var(--paper-3);
  border: 1px dashed var(--rule);
  border-radius: 9px;
  font-family: var(--body); font-size: .92rem; line-height: 1.5;
  color: var(--ink);
}
.act-watch { margin-top: .75rem; font-size: .84rem; color: var(--muted); }

/* ============================================================
   2. CORROBORATION  (assets/corroborate.js)
   ============================================================ */

.corr {
  --tone: var(--faint);
  margin-top: .9rem;
  padding: .8rem 1rem .95rem;
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
  background: var(--paper-2);
}
.corr-ok   { --tone: var(--pos); }
.corr-part { --tone: var(--warn); }
.corr-bad  { --tone: var(--neg); }
.corr-solo { --tone: var(--faint); }

.corr-h { display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap; }
.corr-n {
  font-family: var(--mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .06em; color: #fff; background: var(--tone);
  border-radius: 999px; padding: .18rem .6rem;
}
.corr-t { font-size: .82rem; color: color-mix(in oklab, var(--tone) 70%, var(--ink)); font-weight: 600; }

.corr-w { margin-top: .55rem; font-size: .82rem; color: var(--muted); display: flex; gap: .4rem; flex-wrap: wrap; align-items: baseline; }
.corr-w .corr-lbl { display: inline; margin: 0; }
.corr-sep { color: var(--rule); }

.corr-note { margin: .6rem 0 0; font-size: .86rem; line-height: 1.55; color: var(--muted); }

.corr-list { margin-top: .7rem; }
.corr-list ul { margin: 0; padding-left: 1.1rem; }
.corr-list li { font-size: .84rem; line-height: 1.5; color: var(--muted); margin-bottom: .2rem; }
.corr-list li b { font-family: var(--mono); font-size: .82rem; color: var(--ink); }

/* ============================================================
   3. EXPORT BUTTONS  (assets/export.js)
   Matches the existing PDF button furniture.
   ============================================================ */

.xp { display: inline-flex; gap: .4rem; align-items: center; }
.xp-btn {
  font-family: var(--mono); font-size: .68rem; font-weight: 600;
  letter-spacing: .04em;
  padding: .32rem .68rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper-3);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.xp-btn:hover:not(:disabled) { border-color: var(--c-green); color: var(--signal-ink); background: color-mix(in oklab, var(--c-green) 7%, #fff); }
.xp-btn:disabled { opacity: .38; cursor: not-allowed; }
.xp-btn.ok { border-color: var(--pos); color: var(--pos); }

/* ============================================================
   4. BATTLECARD
   ============================================================ */

.bc {
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--paper-3);
  overflow: hidden;
  margin-top: 1.4rem;
}
.bc-top {
  padding: 1.2rem 1.4rem 1.1rem;
  background: linear-gradient(96deg, color-mix(in oklab, var(--c-green) 10%, #fff), color-mix(in oklab, var(--c-teal) 7%, #fff));
  border-bottom: 1px solid var(--rule-soft);
}
.bc-co { font-family: var(--display); font-weight: 700; font-size: 1.6rem; letter-spacing: -.02em; margin: 0; }
.bc-meta { font-family: var(--mono); font-size: .72rem; color: var(--muted); margin-top: .35rem; letter-spacing: .03em; }
.bc-meta b { color: var(--signal-ink); }

.bc-sec { padding: 1.1rem 1.4rem; border-top: 1px solid var(--rule-soft); }
.bc-sec:first-of-type { border-top: 0; }
.bc-sec > h3 {
  font-family: var(--mono); font-size: .66rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase; color: var(--faint);
  margin: 0 0 .7rem;
}

.bc-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .8rem; }
.bc-num { border-left: 3px solid var(--c-green); padding-left: .7rem; }
.bc-num dt { font-size: .74rem; color: var(--muted); margin-bottom: .12rem; }
.bc-num dd { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.22rem; letter-spacing: -.02em; }
.bc-num .d { display: block; font-family: var(--mono); font-size: .68rem; font-weight: 500; color: var(--muted); margin-top: .12rem; letter-spacing: 0; }
.bc-num a { display: block; font-family: var(--mono); font-size: .66rem; margin-top: .25rem; }

.bc-q { list-style: none; margin: 0; padding: 0; }
.bc-q li {
  padding: .7rem .9rem;
  border: 1px dashed var(--rule);
  border-radius: 10px;
  margin-bottom: .55rem;
  background: var(--paper-2);
}
.bc-q .q { display: block; font-size: .95rem; line-height: 1.5; color: var(--ink); }
.bc-q .why { display: block; font-size: .8rem; color: var(--muted); margin-top: .38rem; }
.bc-q .why a { font-family: var(--mono); font-size: .74rem; }

.bc-tw { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--rule-soft); border-radius: 12px; overflow: hidden; }
@media (max-width: 45rem) { .bc-tw { grid-template-columns: 1fr; } }
.bc-tw > div { padding: .8rem .95rem; }
.bc-tw .they { background: color-mix(in oklab, var(--c-coral) 6%, #fff); border-right: 1px solid var(--rule-soft); }
.bc-tw .doc  { background: color-mix(in oklab, var(--c-green) 6%, #fff); }
@media (max-width: 45rem) { .bc-tw .they { border-right: 0; border-bottom: 1px solid var(--rule-soft); } }
.bc-tw h4 {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .12em;
  text-transform: uppercase; margin: 0 0 .4rem; font-weight: 700;
}
.bc-tw .they h4 { color: #A0421F; }
.bc-tw .doc h4 { color: var(--signal-ink); }
.bc-tw p { margin: 0; font-size: .89rem; line-height: 1.55; }

.bc-empty {
  padding: 1rem 1.2rem; border: 1px dashed var(--rule); border-radius: 12px;
  background: var(--paper-2); color: var(--muted); font-size: .9rem; line-height: 1.6;
}

/* ============================================================
   5. THE WIRE  (filings.html)
   ============================================================ */

.wire { display: grid; gap: .55rem; margin-top: 1.2rem; }
.wire-row {
  display: grid;
  grid-template-columns: 5.4rem 1fr auto;
  gap: .9rem; align-items: baseline;
  padding: .75rem .95rem;
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
  background: var(--paper-3);
  transition: border-color .22s ease, transform .22s ease;
}
.wire-row:hover { border-color: color-mix(in oklab, var(--c-green) 40%, var(--rule)); transform: translateX(2px); }
@media (max-width: 45rem) {
  .wire-row { grid-template-columns: 1fr; gap: .3rem; }
}
.wire-form {
  font-family: var(--mono); font-size: .7rem; font-weight: 700;
  letter-spacing: .04em;
  padding: .2rem .5rem; border-radius: 6px;
  background: color-mix(in oklab, var(--c-teal) 14%, #fff);
  color: #06655A; text-align: center;
  justify-self: start;
}
.wire-form.f8k  { background: color-mix(in oklab, var(--c-coral) 15%, #fff); color: #9B3A16; }
.wire-form.f10q { background: color-mix(in oklab, var(--c-green) 15%, #fff); color: var(--signal-ink); }
.wire-form.f10k { background: color-mix(in oklab, var(--c-plum) 14%, #fff); color: #6B2A83; }
.wire-form.fs1  { background: color-mix(in oklab, var(--c-amber) 18%, #fff); color: #7A4C07; }

.wire-co { font-weight: 620; letter-spacing: -.01em; }
.wire-co small { display: block; font-family: var(--mono); font-size: .7rem; color: var(--faint); font-weight: 400; margin-top: .1rem; letter-spacing: .02em; }
.wire-when { font-family: var(--mono); font-size: .72rem; color: var(--muted); white-space: nowrap; }
.wire-new { color: var(--neg); font-weight: 700; }

.wire-load {
  padding: 1rem 1.2rem; border: 1px dashed var(--rule); border-radius: 12px;
  color: var(--muted); font-size: .89rem; background: var(--paper-2);
}
.wire-bar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }

/* ============================================================
   6. COVERAGE LEDGER  (coverage.html)
   ============================================================ */

.led { display: grid; gap: 0; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; margin-top: 1.4rem; }
.led-row {
  display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem;
  padding: .95rem 1.2rem; border-top: 1px solid var(--rule-soft);
  background: var(--paper-3); align-items: baseline;
}
.led-row:first-child { border-top: 0; }
.led-n {
  font-family: var(--display); font-weight: 700; font-size: 1.55rem;
  letter-spacing: -.03em; color: var(--signal-ink); text-align: right;
  font-variant-numeric: tabular-nums;
}
.led-n.zero { color: var(--faint); }
.led-b strong { display: block; font-weight: 620; letter-spacing: -.01em; }
.led-b span { display: block; font-size: .85rem; color: var(--muted); line-height: 1.55; margin-top: .2rem; }

.honest {
  margin-top: 1.6rem; padding: 1.1rem 1.3rem;
  border: 1px solid color-mix(in oklab, var(--c-amber) 35%, var(--rule));
  border-left: 3px solid var(--c-amber);
  border-radius: 12px;
  background: color-mix(in oklab, var(--c-amber) 6%, #fff);
}
.honest h3 { font-size: 1.02rem; margin: 0 0 .5rem; }
.honest p { margin: 0 0 .6rem; font-size: .92rem; line-height: 1.6; }
.honest p:last-child { margin-bottom: 0; }

/* ============================================================
   7. COMPANY PAGES  (co/*.html, companies.html)
   ============================================================ */

.cofilter {
  display: flex; gap: .6rem; flex-wrap: wrap; align-items: center;
  margin: 1.2rem 0 .4rem;
}
.cofilter input {
  flex: 1 1 16rem; min-width: 12rem;
  font: inherit; font-size: .95rem;
  padding: .55rem .8rem;
  border: 1px solid var(--rule); border-radius: 10px;
  background: var(--paper-3); color: var(--ink);
}
.cofilter input:focus-visible { border-color: var(--c-green); }

.colist { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .5rem; margin-top: 1rem; }
.coitem {
  display: block; padding: .7rem .85rem;
  border: 1px solid var(--rule-soft); border-radius: 11px;
  background: var(--paper-3); text-decoration: none; color: inherit;
  transition: border-color .2s ease, transform .2s ease;
}
.coitem:hover { border-color: color-mix(in oklab, var(--c-green) 45%, var(--rule)); transform: translateY(-1px); color: inherit; }
.coitem b { display: block; font-weight: 620; letter-spacing: -.01em; font-size: .93rem; }
.coitem span { display: block; font-family: var(--mono); font-size: .68rem; color: var(--faint); margin-top: .15rem; letter-spacing: .03em; }
.coitem .tierdot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; margin-right: .35rem; vertical-align: baseline; }
.tier-a { background: var(--pos); }
.tier-b { background: var(--warn); }
.tier-c { background: var(--rule); }

.cohead { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .8rem; }
.cotag {
  font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .05em;
  padding: .22rem .6rem; border-radius: 999px;
  border: 1px solid var(--rule); color: var(--muted); background: var(--paper-3);
}
.cotag.on { border-color: var(--pos); color: var(--pos); background: color-mix(in oklab, var(--pos) 8%, #fff); }
.cotag.off { border-style: dashed; }

.cofacts { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .9rem; }
.cofacts th, .cofacts td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--rule-soft); vertical-align: baseline; }
.cofacts th { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.cofacts td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.cofacts a { font-family: var(--mono); font-size: .74rem; }

.coroutes { display: grid; gap: .4rem; margin-top: 1rem; }
.coroute {
  display: flex; justify-content: space-between; gap: .8rem; align-items: baseline;
  padding: .6rem .85rem; border: 1px solid var(--rule-soft); border-radius: 10px;
  background: var(--paper-3); text-decoration: none; color: inherit;
  transition: border-color .2s ease;
}
.coroute:hover { border-color: var(--c-green); color: inherit; }
.coroute b { font-weight: 600; font-size: .9rem; }
.coroute span { font-family: var(--mono); font-size: .66rem; color: var(--faint); }

/* ============================================================
   8. THE CHATGPT COMPARISON  (index.html)
   ============================================================ */

.vsx { width: 100%; border-collapse: collapse; margin-top: 1.3rem; font-size: .93rem; }
.vsx th, .vsx td { padding: .75rem .85rem; border-bottom: 1px solid var(--rule-soft); text-align: left; vertical-align: top; }
.vsx thead th {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint); font-weight: 700;
  border-bottom: 1px solid var(--rule);
}
.vsx thead th:last-child { color: var(--signal-ink); }
.vsx tbody th { font-weight: 620; font-family: var(--body); font-size: .9rem; width: 26%; }
.vsx td:last-child { background: color-mix(in oklab, var(--c-green) 5%, transparent); }
.vsx td small { display: block; color: var(--faint); font-size: .78rem; margin-top: .2rem; }
@media (max-width: 45rem) {
  .vsx, .vsx tbody, .vsx tr, .vsx td, .vsx th { display: block; width: auto; }
  .vsx thead { display: none; }
  .vsx tr { border: 1px solid var(--rule-soft); border-radius: 11px; margin-bottom: .6rem; padding: .3rem .2rem; background: var(--paper-3); }
  .vsx td, .vsx tbody th { border-bottom: 0; padding: .45rem .8rem; }
  .vsx td::before { content: attr(data-l); display: block; font-family: var(--mono); font-size: .6rem; letter-spacing: .11em; text-transform: uppercase; color: var(--faint); margin-bottom: .18rem; }
}

/* ============================================================
   9. CANNOT-DO PANEL
   ============================================================ */

.cant { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .7rem; margin-top: 1.3rem; }
.cant-i {
  padding: .9rem 1rem;
  border: 1px solid var(--rule-soft); border-left: 3px solid var(--neg);
  border-radius: 11px; background: var(--paper-3);
}
.cant-i b { display: block; font-weight: 620; letter-spacing: -.01em; margin-bottom: .3rem; font-size: .93rem; }
.cant-i span { font-size: .85rem; color: var(--muted); line-height: 1.55; }

/* ============================================================
   10. CUSTOM GRID COLUMN  (grid.html)
   ============================================================ */

.gcustom { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; align-items: center; }
.gcustom input {
  flex: 1 1 18rem; font: inherit; font-size: .92rem;
  padding: .48rem .75rem; border: 1px solid var(--rule); border-radius: 9px;
  background: var(--paper-3); color: var(--ink);
}
.gcustom button {
  font: inherit; font-size: .88rem; padding: .48rem .9rem;
  border: 1px solid var(--rule); border-radius: 9px;
  background: var(--paper-3); color: var(--ink); cursor: pointer;
}
.gcustom button:hover { border-color: var(--c-green); color: var(--signal-ink); }
.gchip.custom { border-style: dashed; }
.gchip.custom::before { content: "\002B  "; font-family: var(--mono); opacity: .6; }
.ghint { font-size: .8rem; color: var(--faint); margin-top: .45rem; line-height: 1.5; }

/* ============================================================
   11. MCP PAGE
   ============================================================ */

.mcpcmd {
  font-family: var(--mono); font-size: .82rem;
  padding: .85rem 1rem; border-radius: 11px;
  background: var(--ink-band); color: #8FD3AE;
  overflow-x: auto; white-space: pre; margin-top: 1rem;
  border: 1px solid #2A2E36;
}
.mcpcmd .c { color: #6B7280; }
.mcptools { display: grid; gap: .5rem; margin-top: 1.2rem; }
.mcptool {
  padding: .75rem .95rem; border: 1px solid var(--rule-soft);
  border-radius: 11px; background: var(--paper-3);
}
.mcptool code {
  font-family: var(--mono); font-size: .82rem; font-weight: 600;
  color: var(--signal-ink); background: color-mix(in oklab, var(--c-green) 9%, #fff);
  padding: .12rem .4rem; border-radius: 5px;
}
.mcptool p { margin: .4rem 0 0; font-size: .87rem; color: var(--muted); line-height: 1.55; }

/* ============================================================
   12. PRINT — new components carry through to PDF
   ============================================================ */

@media print {
  .act, .corr, .bc, .wire-row { break-inside: avoid; }
  .act { background: #fff !important; border-left-width: 3px; }
  .corr { background: #fff !important; }
  .xp, .cofilter, .wire-bar { display: none !important; }
  .bc-top { background: #fff !important; }
}
