/* Tickmark: a quiet reader for SEC filings. Plain CSS, light and dark. */
:root {
  /* No greys anywhere: every neutral leans toward the brand's indigo (light) or midnight blue (dark). */
  --bg: #eef2fe; --surface: #ffffff; --surface-2: #f3f6ff; --fg: #121a4a; --muted: #4a5694; --faint: #7d89cc;
  --line: #dde4fb; --line-strong: #c5d0f6;
  --accent: #2f5bea; --accent-soft: #e6ecff; --accent-fg: #ffffff;
  --red: #c2410c; --red-soft: #fff1e8; --green: #0f8a5f; --green-soft: #e6f6ef; --amber-soft: #fff6dc;
  --ins: #e2f5ea; --del: #fde6e1; --mark: #dfe6ff;
  /* filing kinds: routine ones (8-K) soft, rare ones saturated */
  --k10k: #2f5bea; --k10q: #6f9bff; --k8k: #0369a1; --k8k-bar: #a9dcf7; --k8k-bg: #e0f2fe; --kother: #e0559b;
  --kaud: #c2410c; --krest: #b91c1c; --kofficer: #be185d; --klate: #d97706; --kbuy: #10a35e; --kcluster: #0d9488; --krisk: #7c3aed; --kletter: #0e7490;
  --ours: #2f5bea; --ours-soft: #f1f5ff; --ours-line: #d3ddfb;
  --hero: #0f1a52; --hero-top: #0a1240; --hero-fg: #ffffff; --hero-muted: #b6c3ff; --hero-line: rgba(182, 195, 255, .14);
  --glass: rgba(182, 195, 255, .06); --glass-line: rgba(182, 195, 255, .14);
  --shadow: 0 1px 2px rgba(30, 50, 160, .07), 0 4px 14px rgba(30, 50, 160, .06);
  --radius: 14px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
/* dark theme ("midnight"): set on <html> by base.html from the visitor's choice or their device */
:root[data-theme="dark"] {
    --bg: #070b1f; --surface: #0f1736; --surface-2: #0c1430; --fg: #eef1ff; --muted: #a3b3ff; --faint: #6f80d6;
    --line: #1c2858; --line-strong: #2b3a7c;
    --accent: #5b84ff; --accent-soft: #16224f; --accent-fg: #ffffff;
    --red: #ff7a6b; --red-soft: #3a1424; --green: #2ee6a0; --green-soft: #0c3326; --amber-soft: #3a2e12;
    --ins: #0c3a2a; --del: #43172a; --mark: #22306e;
    --k10k: #5b84ff; --k10q: #9bb6ff; --k8k: #7dd3fc; --k8k-bar: #1d5f86; --k8k-bg: rgba(125, 211, 252, .12); --kother: #f472b6;
    --kaud: #ffa178; --krest: #ff6b6b; --kofficer: #f9a8d4; --klate: #fcd34d; --kbuy: #22e58f; --kcluster: #2dd4bf; --krisk: #c084fc; --kletter: #5ccfe6;
    --ours: #5b84ff; --ours-soft: #111b42; --ours-line: #2a3a80;
    --hero: #0a1233; --hero-top: #050920; --hero-muted: #a3b3ff;
    --shadow: 0 0 0 1px rgba(91, 132, 255, .10), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.015em; font-family: var(--display); }
h1 { font-size: 32px; margin: 0 0 6px; font-weight: 600; }
h2 { font-size: 20px; margin: 0 0 12px; font-weight: 600; }
h3 { font-size: 15px; margin: 22px 0 8px; font-weight: 600; }
p { margin: 0 0 10px; }
code { background: var(--surface-2); border: 1px solid var(--line); padding: 0 5px; border-radius: 4px; font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1120px; margin: 0 auto; padding: 10px 24px; display: flex; gap: 22px; align-items: center; }
.brand { font-weight: 600; font-size: 16px; color: var(--fg); letter-spacing: -0.02em; display: flex; gap: 8px; align-items: center; }
.brand:hover { text-decoration: none; }
.mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--accent);
  color: var(--accent-fg); font-size: 14px; }
.top nav { display: flex; gap: 4px; }
.top nav a { color: var(--muted); padding: 6px 10px; border-radius: 6px; font-weight: 500; }
.top nav a:hover { background: var(--surface); color: var(--fg); text-decoration: none; }
.top nav a.on { color: var(--fg); background: var(--surface); box-shadow: var(--shadow); }
.search { margin-left: auto; }
.search input { width: 260px; }

main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 56px; }
footer { color: var(--faint); font-size: 13px; text-align: center; padding: 28px 24px 40px; border-top: 1px solid var(--line); }

/* form controls */
input[type=text], input[type=search], select {
  font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 8px 12px; outline: none; }
input[type=text]:focus, input[type=search]:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
button, .button { font: inherit; font-weight: 600; background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 6px;
  padding: 8px 16px; cursor: pointer; display: inline-block; }
button:hover, .button:hover { filter: brightness(1.08); text-decoration: none; }
button.quiet, .button.quiet { background: var(--surface); color: var(--fg); border: 1px solid var(--line-strong); font-weight: 500; }

/* page header */
.page-head { margin-bottom: 22px; }
.page-head .lede { color: var(--muted); font-size: 16px; max-width: 70ch; }
.back { display: inline-block; font-size: 14px; margin-bottom: 10px; color: var(--muted); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 18px 20px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.card-head h2 { margin: 0; }
.card-body { padding: 14px 20px 18px; }
.empty { color: var(--muted); padding: 6px 0; }

/* chips (filters, topics) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--fg); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip.on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.chip .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.on .n { color: inherit; opacity: .8; }

/* event kind labels */
.kind { display: inline-block; min-width: 54px; text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .02em;
  border-radius: 6px; padding: 2px 6px; color: var(--c, var(--muted));
  background: color-mix(in srgb, var(--c, var(--muted)) 13%, transparent); white-space: nowrap; }
.k-10-K { --c: var(--k10k); } .k-10-Q { --c: var(--k10q); } .k-8-K { --c: var(--k8k); background: var(--k8k-bg); }
/* warnings in reds, purchases in greens; each its own shade so the legend tells them apart */
.k-auditor { --c: var(--kaud); } .k-restatement { --c: var(--krest); } .k-officer { --c: var(--kofficer); } .k-late { --c: var(--klate); }
.k-purchase { --c: var(--kbuy); } .k-cluster { --c: var(--kcluster); } .k-risk { --c: var(--krisk); }
.k-letter { --c: var(--kletter); }

/* home: feed + companies */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.feed-day { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint);
  padding: 14px 20px 6px; border-top: 1px solid var(--line); }
.feed-day:first-child { border-top: 0; padding-top: 4px; }
.feed-item { display: grid; grid-template-columns: 64px 62px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 7px 20px; }
.feed-item:hover { background: var(--surface-2); }
.feed-item .tk { font-weight: 600; color: var(--fg); }
.feed-item .what { min-width: 0; }
.feed-item .what a { color: var(--fg); }
.feed-item .sub { color: var(--muted); font-size: 13px; }
.feed-more { padding: 10px 20px 16px; font-size: 14px; }

.side .card-head { padding-bottom: 8px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 10px; }
.filters select { padding: 5px 8px; font-size: 14px; }
.co-group { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint);
  padding: 12px 16px 4px; }
.co { display: flex; align-items: center; gap: 10px; padding: 6px 16px; color: var(--fg); }
.co:hover { background: var(--surface-2); text-decoration: none; }
.co .tk { font-weight: 600; width: 52px; flex: none; }
.co .nm { flex: 1; min-width: 0; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co .new { flex: none; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px;
  padding: 0 8px; }
.side-foot { padding: 10px 16px 14px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* company page */
.co-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.co-head h1 .tk { margin-right: 10px; }
.co-head h1 .nm { font-weight: 400; color: var(--muted); font-size: 24px; }
.co-meta { color: var(--muted); font-size: 14px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 20px 0 6px; }
.fact { padding: 14px 16px; }
.fact .label { font-size: 12px; color: var(--muted); font-weight: 500; }
.fact .value { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; }
.fact .value small { font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.fact .note { font-size: 13px; color: var(--muted); margin-top: 2px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 22px 0 22px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px;
  white-space: nowrap; }
.tabs a:hover { color: var(--fg); text-decoration: none; }
.tabs a.on { color: var(--fg); border-bottom-color: var(--accent); }
.tabs .count { font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 7px; margin-left: 4px; font-weight: 500; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }

/* event list */
.events { list-style: none; margin: 0; padding: 0; }
.events li { display: grid; grid-template-columns: 92px 62px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 8px 0;
  border-top: 1px solid var(--line); }
.events li:first-child { border-top: 0; }
.events .date { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.events .what a { color: var(--fg); font-weight: 500; }
.events .sub { color: var(--muted); font-size: 13px; }

/* one-line timeline */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.legend .sw { display: inline-block; width: 9px; height: 9px; border-radius: 4px; background: var(--c); margin-right: 5px; }
.ranges { display: inline-flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px; }
.ranges a { padding: 2px 10px; border-radius: 6px; color: var(--muted); font-size: 13px; }
.ranges a.on { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.strip { position: relative; height: 84px; margin: 18px 10px 6px; }
.strip .axis { position: absolute; left: 0; right: 0; top: 54px; border-top: 2px solid var(--line-strong); }
.strip .pin { position: absolute; top: calc(48px - var(--level, 0) * 13px); margin-left: -6px; width: 12px; height: 12px;
  border-radius: 4px; background: var(--c); border: 2px solid var(--surface); }
.strip .pin.k-10-K { width: 16px; height: 16px; margin-left: -8px; top: calc(46px - var(--level, 0) * 13px); border-radius: 4px; z-index: 2; }
.strip .pin.k-auditor, .strip .pin.k-restatement, .strip .pin.k-late, .strip .pin.k-purchase, .strip .pin.k-officer, .strip .pin.k-cluster { z-index: 3; }
.strip .pin:hover, .strip .pin:focus { transform: scale(1.45); z-index: 5; }
.strip .tick { position: absolute; top: 62px; font-size: 12px; color: var(--faint); border-left: 1px solid var(--line-strong);
  padding: 6px 0 0 4px; height: 20px; }

/* quoted filing text */
.quote { font-family: var(--serif); font-size: 16px; line-height: 1.65; padding: 16px 20px 14px; }
.quote { margin: 0 0 12px; }
.quote p { margin: 0 0 8px; }
.quote p.lead { font-weight: 600; }
.quote .cite { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-bottom: 6px; display: flex; gap: 8px;
  flex-wrap: wrap; align-items: baseline; }
.quote .cite .tk { color: var(--fg); font-weight: 600; }
.quote .go { font-family: var(--sans); font-size: 13px; }
.quote .peers { font-family: var(--sans); font-size: 13px; color: var(--muted); margin: -4px 0 10px; }
.quote.unverified { border-color: var(--red); background: var(--red-soft); }
.quote.compact { font-size: 15px; padding: 12px 16px; }
details.more > summary { cursor: pointer; color: var(--accent); font-weight: 500; margin: 14px 0; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "＋ "; }
details.more[open] > summary::before { content: "－ "; }

mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 4px; }

/* glossary tips */
.term { border-bottom: 1px dotted var(--faint); cursor: help; position: relative; }
.term:hover::after, .term:focus::after {
  content: attr(data-tip); position: absolute; left: 0; top: 1.7em; z-index: 30; width: max-content; max-width: min(340px, 80vw);
  background: var(--fg); color: var(--bg); font: 400 13px/1.45 var(--sans); padding: 9px 11px; border-radius: 6px;
  white-space: normal; box-shadow: var(--shadow-pop); }

/* accounting checks */
.check { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.check:first-child { border-top: 0; }
.check .icon { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.check.flag .icon { background: var(--red-soft); color: var(--red); }
.check.ok .icon { background: var(--green-soft); color: var(--green); }
.check.na .icon { background: var(--surface-2); color: var(--faint); border: 1px solid var(--line); }
.check .title { font-weight: 600; }
.source { font-size: 13px; color: var(--muted); word-break: break-word; margin-top: 4px; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; font-weight: 600; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar { display: inline-block; width: 90px; height: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px;
  vertical-align: middle; overflow: hidden; margin-right: 6px; }
.bar span { display: block; height: 100%; background: var(--accent); }

.diff { font-family: var(--serif); font-size: 16px; line-height: 1.7; padding: 16px 20px; }
.diff ins { background: var(--ins); text-decoration: none; border-radius: 4px; }
.diff del { background: var(--del); color: var(--red); border-radius: 4px; }
/* the redline on the 10-K change tab: one section per card, the most changed open */
.rl-sec { margin: 0 0 10px; padding: 0; overflow: hidden; }
.rl-sec > summary { cursor: pointer; padding: 12px 18px; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.rl-sec[open] > summary { border-bottom: 1px solid var(--line); }
.rl-sec .rl-body { padding: 14px 18px 4px; }
.rl-sec .source { padding: 0 18px 12px; margin: 0; }
.rl-sec del, del.rl-key { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.rl-key { padding: 0 3px; border-radius: 4px; }
del.rl-key { background: var(--del); color: var(--red); }
ins.rl-key { background: var(--ins); text-decoration: none; }

/* AI */
.ai { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; background: var(--surface-2); }
.ai-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 4px; }
.ask { display: flex; gap: 8px; flex-wrap: wrap; }
.ask select { flex: 0 0 auto; }
.ask input[type=text] { flex: 1 1 300px; }
.answer { font-size: 16px; line-height: 1.65; }
.verified { color: var(--green); font-weight: 600; }
.warn { background: var(--red-soft); color: var(--red); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; }
.note-box { background: var(--amber-soft); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; font-size: 14px; }
.warn-text { color: var(--red); font-family: var(--sans); font-size: 13px; }

/* search */
.searchbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.searchbar input[type=search] { flex: 1 1 320px; font-size: 16px; padding: 11px 14px; }
.searchbar button { padding: 10px 20px; }
.result-meta { margin-bottom: 12px; color: var(--muted); font-size: 14px; }

/* peers */
.mentions { display: grid; grid-template-columns: 60px minmax(0, 1fr) 90px; gap: 6px 12px; align-items: center; font-size: 14px; }
.mentions .tk { font-weight: 600; }
.mentions .track { height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; position: relative; overflow: hidden; }
.mentions .now { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 6px; }
.mentions .then { position: absolute; top: -1px; bottom: -1px; width: 2px; background: var(--fg); opacity: .45; }
.mentions .nums { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.peer-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; margin-top: 16px; }
.peer-cards .card-head { padding-bottom: 4px; }

/* glossary */
.glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.glossary .card { padding: 14px 18px; }
.glossary h3 { margin: 0 0 4px; font-size: 15px; }
.glossary .aka { font-size: 13px; color: var(--faint); margin-bottom: 6px; }

@media (max-width: 900px) {
  .home { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top-inner { flex-wrap: wrap; gap: 8px 14px; padding: 10px 16px; }
  .top nav { order: 3; width: 100%; overflow-x: auto; }
  .search { margin-left: auto; }
  .search input { width: 150px; }
  main { padding: 20px 16px 40px; }
  h1 { font-size: 24px; }
  .co-head h1 .nm { display: block; font-size: 16px; margin-top: 2px; }
  .feed-item { grid-template-columns: 52px minmax(0, 1fr); padding: 8px 16px; row-gap: 3px; }
  .feed-item .kind { grid-column: 2; justify-self: start; }
  .feed-item .what { grid-column: 2; }
  .feed-day { padding-left: 16px; }
  .events li { grid-template-columns: 62px minmax(0, 1fr); row-gap: 3px; }
  .events li .what { grid-column: 2; }
  .quote, .diff { font-size: 16px; padding: 14px 16px; }
  .card-head, .card-body { padding-left: 16px; padding-right: 16px; }
  .mentions { grid-template-columns: 50px minmax(0, 1fr) 70px; }
}

/* ---- screener (home) ---- */
main.wide { max-width: 1440px; }
.scr-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.scr-head h1 { margin: 0; font-size: 24px; }
.scr-find { margin-left: auto; }
.scr-find input { width: 220px; }
.scr-filters { padding: 12px 16px 10px; margin-bottom: 14px; }
.flt-group + .flt-group { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.flt-group.ours { background: var(--ours-soft); margin-left: -16px; margin-right: -16px; padding: 10px 16px; border-top: 1px solid var(--ours-line); }
.flt-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.flt-title .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.scr-presets { margin: 0; }
@media (max-width: 640px) { .scr-presets { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; } .scr-presets .chip { white-space: nowrap; } }
.flt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.flt { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 6px; font-size: 13px; }
.flt span { color: var(--muted); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flt select { width: 100%; font: inherit; font-size: 13px; padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--surface); color: var(--fg); }
.flt.set select { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.flt.set span { color: var(--fg); font-weight: 600; }
.flt-foot { display: flex; gap: 14px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.rng-rows { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.rng { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.rng select, .rng input { font: inherit; font-size: 13px; padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--fg); }
.rng select { max-width: 190px; }
.rng input { width: 72px; }
.rng-go { font: inherit; font-size: 13px; padding: 3px 12px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg); cursor: pointer; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: none; color: var(--ours);
  border: 1px solid var(--ours-line); background: var(--surface); border-radius: 999px; padding: 0 7px; margin-left: 4px; vertical-align: 1px; }
.views { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 0; overflow-x: auto; }
.views a { padding: 7px 14px; color: var(--muted); font-weight: 500; font-size: 14px; border: 1px solid transparent; border-bottom: 0;
  border-radius: 6px 6px 0 0; white-space: nowrap; }
.views a:hover { color: var(--fg); text-decoration: none; }
.views a.on { color: var(--fg); background: var(--surface); border-color: var(--line); margin-bottom: -1px; }
.views a.ours { color: var(--ours); }
.scr-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
table.scr { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.scr th, .scr td { padding: 4px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; text-align: left; }
.scr th { position: sticky; top: 0; background: var(--surface-2); font-weight: 600; font-size: 12px; color: var(--muted); }
.scr th a { color: inherit; display: block; }
.scr th.sorted { color: var(--fg); }
.scr th .arr { font-size: 11px; margin-left: 3px; }
.scr .num { text-align: right; }
.scr tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.scr tbody tr:hover td { background: var(--accent-soft); }
.scr td.tkr a { font-weight: 600; }
.scr td.nm { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.scr td.nm a { color: var(--fg); }
.scr td.txt { max-width: 200px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.scr .ours { background: var(--ours-soft) !important; }
.scr th.ours { color: var(--ours); border-bottom-color: var(--ours-line); }
.scr td.ours .kind { min-width: 40px; font-size: 11px; padding: 0 4px; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.newb { display: inline-block; background: var(--ours); color: var(--surface); font-weight: 600; font-size: 11px; border-radius: 999px; padding: 0 7px; }
.newb:hover { text-decoration: none; opacity: .9; }
a.warnn { color: var(--red); font-weight: 600; }
.scr .empty { text-align: center; padding: 30px; color: var(--muted); }
.scr-note { margin-top: 10px; max-width: 900px; }

/* ---- company snapshot ---- */
.co-price { text-align: right; }
.co-price .px { font-size: 32px; font-weight: 600; margin-right: 8px; font-variant-numeric: tabular-nums; }
.co-price .pos, .co-price .neg { font-weight: 600; }
.snap-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; margin: 16px 0 12px; }
.chart { margin: 0; padding: 12px 14px 8px; }
.chart svg { width: 100%; height: 170px; display: block; }
.chart .line { fill: none; stroke-width: 1.8; }
.chart .line.up { stroke: var(--green); } .chart .line.down { stroke: var(--red); }
.chart .area.up { fill: var(--green-soft); } .chart .area.down { fill: var(--red-soft); }
.chart .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .axis { fill: var(--faint); font-size: 11px; }
.tv-chart { min-height: 250px; }
.tv-chart .tradingview-widget-copyright { margin-top: 4px; }
.ours-box { background: var(--ours-soft); border-color: var(--ours-line); padding: 10px 12px; display: grid;
  grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.ours-title { grid-column: 1 / -1; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ours-cell { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--ours-line); border-radius: 6px;
  padding: 8px 10px; color: var(--fg); min-width: 0; }
.ours-cell:hover { text-decoration: none; border-color: var(--ours); }
.ours-cell .label { font-size: 12px; color: var(--muted); }
.ours-cell .value { font-size: 24px; font-weight: 600; color: var(--ours); }
.ours-cell .value small { font-size: 12px; color: var(--muted); font-weight: 500; }
.ours-cell .note { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.snapshot { width: 100%; border-collapse: collapse; font-size: 13px; padding: 0; overflow: hidden; font-variant-numeric: tabular-nums; }
.snapshot td { padding: 4px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.snapshot tr:last-child td { border-bottom: 0; }
.snapshot td.k { color: var(--muted); }
.snapshot td.v { text-align: right; font-weight: 600; border-right: 1px solid var(--line); }
.snapshot td.v:last-child { border-right: 0; }
.snapshot td.v[title] { cursor: help; }
.snap-note { margin: 6px 0 0; }

@media (max-width: 900px) {
  .snap-row { grid-template-columns: minmax(0, 1fr); }
  .snapshot, .snapshot tbody, .snapshot tr { display: block; }
  .snapshot tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr) auto); }
  .snapshot td.v { border-right: 0; }
  .scr-find { margin-left: 0; width: 100%; }
  .scr-find input { width: 100%; }
}

/* ---- H++ "Ledger": navy header and hero, white cards that overlap it ---- */
.top { background: linear-gradient(180deg, var(--hero-top) 0%, var(--hero) 100%); backdrop-filter: none;
  border-bottom: 1px solid var(--hero-line); color: var(--hero-fg); }
.top-inner { max-width: 1344px; padding: 12px 32px; gap: 28px; }
.brand { color: #fff; font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -0.025em; gap: 10px; }
.brand svg { flex: none; }
.top nav { gap: 2px; font-size: 14px; flex-wrap: wrap; }
.top nav a { color: var(--hero-muted); display: flex; align-items: center; gap: 7px; padding: 8px 11px; }
.top nav a .ic { opacity: .85; }
.top nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.top nav a.on { color: #fff; background: rgba(255, 255, 255, .09); box-shadow: none; }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid #27346a; border-radius: 6px; padding: 0 10px;
  background: rgba(255, 255, 255, .04); color: #8b96c2; }
.search:focus-within { border-color: #6f8cff; }
.top .search input { width: 220px; border: 0; background: transparent; color: #fff; padding: 8px 0; box-shadow: none; font-size: 14px; }
.top .search input::placeholder { color: #8b96c2; }

main { max-width: 1344px; padding: 0 32px 56px; }
main.wide { max-width: 1440px; }

/* the first heading block of each page sits on the navy band, full width */
main > .back, main > .page-head, main > .scr-head, main > .co-head {
  background: var(--hero); box-shadow: 0 0 0 100vmax var(--hero); clip-path: inset(0 -100vmax);
  color: var(--hero-fg); margin: 0; padding-top: 30px; padding-bottom: 72px; }
main > .back { display: block; padding-bottom: 8px; color: var(--hero-muted); }
main > .back + * { padding-top: 0; margin-top: -1px; }
main > .page-head + *, main > .scr-head + *, main > .co-head + * { margin-top: -44px; position: relative; }
main > .page-head h1, main > .scr-head h1, main > .co-head h1 { color: #fff; font-size: 32px; font-weight: 600; letter-spacing: -0.025em; }
main > .page-head .lede, main > .scr-head .muted, main > .co-head .co-meta, main > .co-head .muted { color: var(--hero-muted); }
main > .page-head a, main > .co-head .co-meta a { color: #c4d0ff; }
main > .co-head h1 .tk { color: #fff; }
main > .co-head h1 .nm { color: var(--hero-muted); font-weight: 400; font-family: var(--sans); }
main > .co-head .pos { color: #6fe3b6; } main > .co-head .neg { color: #ffb27f; }
main > .co-head button, main > .co-head .button { background: rgba(255, 255, 255, .06); color: #fff; border: 1px solid #2c3a74; }
main > .co-head button.on { background: #fff; color: var(--hero); }
main > .scr-head .scr-find input { background: rgba(255, 255, 255, .06); border-color: #2c3a74; color: #fff; }
main > .scr-head .scr-find input::placeholder { color: #8b96c2; }
/* chips and plain text that land on the band need a surface behind them */
main > .page-head + .chips, main > .page-head + .searchbar, main > .page-head + .tabs { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; }
main > .page-head + p, main > .page-head + .result-meta { margin-top: 0; }
main > .page-head + .tabs { padding: 4px 10px 0; margin-bottom: 18px; }

/* cards, tables, tabs */
.card { border-radius: var(--radius); }
.card-head h2, .ours-title { font-family: var(--display); }
.facts .fact, .ours-cell { border-radius: var(--radius); }
.fact .value, .ours-cell .value, .co-price .px { font-family: var(--display); letter-spacing: -0.02em; }
.ours-box { background: var(--surface); border-color: var(--line); }
.ours-cell { background: var(--ours-soft); }
.tabs { gap: 4px; }
.tabs a { font-weight: 500; }
.tabs a.on { color: var(--accent); }
.tabs .count { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.chip.on { box-shadow: var(--shadow); }
.scr-filters { border-radius: var(--radius); }
.views { border-bottom-color: var(--line); padding-top: 12px; }
.views a.on { color: var(--accent); }
.scr-wrap { border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); }
.scr th, .scr td { padding: 6px 10px; }
.scr th { background: var(--surface-2); color: var(--muted); }
.scr tbody tr:nth-child(even) td { background: transparent; }
.scr tbody tr:hover td { background: #f7f9ff; }
.scr td.tkr a { font-family: var(--display); letter-spacing: -0.01em; }
.quote mark, .diff mark, mark { background: linear-gradient(180deg, transparent 55%, var(--mark) 55%); padding: 0 1px; border-radius: 0; }
.quote { border-left: 3px solid var(--accent); }
.quote.unverified { border-left-color: var(--red); }

footer { border-top: 1px solid var(--line); color: var(--muted); text-align: left; font-size: 13px; padding: 22px 32px 36px; }
.foot-inner, footer p.disclaimer { max-width: 1280px; margin: 0 auto; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.foot-src { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
footer p.disclaimer { color: var(--faint); }

/* SEC letters tab (templates/_letters.html) */
.review { margin: 0 0 18px; }
.review-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.review-head h2 { margin: 0 0 2px; }
.status { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.status.done { color: var(--kbuy); background: color-mix(in srgb, var(--kbuy) 12%, transparent); }
.status.open { color: var(--kaud); background: color-mix(in srgb, var(--kaud) 12%, transparent); }
.topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.topic { font-size: 12px; color: var(--kletter); background: color-mix(in srgb, var(--kletter) 11%, transparent);
  border-radius: 6px; padding: 2px 8px; }
.round-head { font-size: 14px; margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.round-head:first-of-type { border-top: 0; padding-top: 0; margin-top: 4px; }
.qa { margin: 0 0 16px; }
.qa-where { margin: 0 0 6px; }
.qa-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; align-items: start; }
.qa-row .who { font-size: 12px; font-weight: 600; padding-top: 13px; }
.who.sec { color: var(--kletter); } .who.co { color: var(--muted); }
.qa .quote { margin-bottom: 8px; }
.quote.q { border-left-color: var(--kletter); }
.quote.a { border-left-color: var(--line-strong); }
.qa-none { margin: 10px 0 12px; }
.more-text summary { font-family: var(--sans); font-size: 13px; color: var(--accent); cursor: pointer; margin-top: 6px; }
.more-text p { margin: 8px 0 0; }
ul.plain { padding-left: 18px; }
ul.plain li { margin: 4px 0; }
@media (max-width: 640px) {
  .qa-row { grid-template-columns: 1fr; gap: 2px; }
  .qa-row .who { padding-top: 0; }
}

/* dark theme: set on <html> by base.html from the visitor's choice or their device */
:root[data-theme="dark"] .scr tbody tr:hover td { background: #172045; }
:root[data-theme="dark"] main > .co-head button.on { background: var(--accent); color: var(--accent-fg); }
@media (max-width: 900px) {
  .top-inner { flex-wrap: wrap; gap: 8px 14px; }
  .top nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
}
@media (max-width: 640px) {
  .top-inner { padding: 10px 16px; }
  .top .search input { width: 130px; }
  main { padding: 0 16px 40px; }
  main > .page-head h1, main > .scr-head h1, main > .co-head h1 { font-size: 24px; }
  main > .page-head, main > .scr-head, main > .co-head { padding-top: 20px; padding-bottom: 60px; }
  main > .back { padding-top: 16px; }
  main > .back + * { padding-top: 0; }
  footer { padding: 20px 16px 32px; }
}

/* Thesis tracker and archive (tracker_web.py) */
.sub-h { font-size: 16px; margin: 26px 0 10px; }
.thesis-form textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--bg); color: var(--fg); resize: vertical; }
.thesis-form .row, .rule-forms .row, .alert-form .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.rule-forms { margin-top: 14px; }
.rule-forms select { max-width: 100%; }
.rules .state { font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 8px; background: var(--surface-2); }
.rules .st-ok .state { background: var(--green-soft); color: var(--green); }
.rules .st-broken .state { background: var(--red-soft); color: var(--red); }
button.link { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; box-shadow: none; }
button.link:hover { color: var(--red); }
.thesis-log { list-style: none; margin: 0; padding: 0; }
.thesis-log li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.thesis-log li:first-child { border-top: 0; }
.thesis-log .date { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.thesis-log blockquote { margin: 6px 0 0; }
.thesis-log .ev-broke strong { color: var(--red); }
.thesis-log .ev-recovered strong { color: var(--green); }
.thesis-log .ev-start strong, .thesis-log .ev-update strong { font-weight: 500; }
.arc-page { margin-bottom: 12px; }
.arc-head { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; word-break: break-all; }
.arc-versions { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.plus, .arc-diff .ins { color: var(--green); }
.minus, .arc-diff .del { color: var(--red); }
.arc-diff p, .arc-text p { margin: 0 0 4px; font-size: 14px; word-break: break-word; }
.arc-diff p.ins { background: var(--green-soft); padding: 2px 6px; border-radius: 4px; }
.arc-diff p.del { background: var(--red-soft); padding: 2px 6px; border-radius: 4px; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--red) 40%, transparent); }
.arc-diff p.same { color: var(--muted); }
.arc-diff p.gap { color: var(--faint); }
@media (max-width: 720px) { .rule-forms { grid-template-columns: 1fr; } .thesis-log li { grid-template-columns: 1fr; gap: 2px; } }

/* Company profile (Overview), Financials, Filings and Insider trades tabs */
.profile { margin-bottom: 16px; }
.profile .desc { margin: 0 0 12px; max-width: 80ch; }
.profile-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 18px; margin: 0; }
.profile-facts div { min-width: 0; }
.profile-facts dt { font-size: 12px; color: var(--muted); }
.profile-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.profile-facts dd[title] { cursor: help; }
.fin-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 44%), 1fr)); gap: 12px; margin-bottom: 16px; }
.fin-chart { margin: 0; padding: 12px 14px 8px; min-width: 0; }
.fin-chart figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.fin-chart .label { font-size: 13px; color: var(--muted); }
.fin-chart .value { font-weight: 600; font-family: var(--display); font-variant-numeric: tabular-nums; }
.fin-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.fin-chart rect.pos { fill: var(--accent); } .fin-chart rect.neg { fill: var(--red); }
.fin-chart rect.computed { opacity: .55; }
.fin-chart .zero { stroke: var(--line-strong); stroke-width: 1; }
.fin-chart .axis { fill: var(--faint); font-size: 11px; }
.fin-table { margin-bottom: 16px; }
.fin-table table { font-size: 13px; }
.fin-table th[scope=row] { font-size: 13px; font-weight: 500; color: var(--fg); white-space: nowrap; position: sticky; left: 0; background: var(--surface); }
.fin-table td, .fin-table th { padding: 6px 10px; }
.fin-table td[title] { cursor: help; }
.fin-table td.computed { font-style: italic; color: var(--muted); }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 14px 0; }
.trade-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.trade-summary .ours-cell { padding: 12px 14px; }
.trade { font-size: 12px; font-weight: 600; border-radius: 6px; padding: 2px 6px; color: var(--muted); background: var(--surface-2); }
.trade.t-P { color: var(--green); background: var(--green-soft); }
.trade.t-S { color: var(--red); background: var(--red-soft); }
.trade-summary .value.pos { color: var(--green); } .trade-summary .value.neg { color: var(--red); }
.seg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-bottom: 16px; }
.seg { min-width: 0; }
.seg .card-head .small { white-space: nowrap; }
.seg-change { margin-bottom: 12px; } .seg-change .card-body > p:first-child { margin-top: 0; }
.seg-table { width: 100%; font-size: 13px; }
.seg-table td, .seg-table th { padding: 5px 6px; }
.seg-table td:first-child { width: 100%; min-width: 120px; }
.seg-name { display: block; }
.seg-bar { display: block; height: 4px; width: var(--w); background: var(--accent); border-radius: 4px; margin-top: 3px; opacity: .7; }
/* A number linked to its filing in SEC's Inline XBRL viewer: looks like the number until hovered. */
a.src-num { color: inherit; text-decoration: none; }
a.src-num:hover, a.src-num:focus-visible { color: var(--accent); text-decoration: underline dotted; text-underline-offset: 3px; }
/* Cash flow chart on the Cash & buybacks tab (tickmark/capital_flow.py) */
.flow-card { margin-bottom: 16px; }
.flow-card .card-head { flex-wrap: wrap; }
svg.flow { display: block; box-sizing: border-box; width: 100%; height: auto; padding: 8px 20px 4px; overflow: visible; }
svg.flow .band { opacity: .28; } svg.flow .band:hover { opacity: .5; }
svg.flow .band.in, svg.flow .node.in { fill: var(--kbuy); }
svg.flow .band.out, svg.flow .node.out { fill: var(--k10k); }
svg.flow .band.cash, svg.flow .node.cash { fill: var(--kletter); }
svg.flow .band.other, svg.flow .node.other { fill: var(--faint); }
svg.flow .node.mid { fill: var(--fg); }
svg.flow text { font-size: 13px; fill: var(--fg); } svg.flow .val { fill: var(--muted); font-variant-numeric: tabular-nums; }
.flow-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; padding: 8px 20px; }
.flow-lists h3 { margin: 6px 0; font-size: 14px; }
.flow-lists .sw { display: inline-block; width: 10px; height: 10px; border-radius: 4px; margin-right: 8px; background: var(--faint); }
.flow-lists .sw.in { background: var(--kbuy); } .flow-lists .sw.out { background: var(--k10k); } .flow-lists .sw.cash { background: var(--kletter); }
.flow-lists table { width: 100%; } .flow-lists td { padding: 6px 0; border-top: 1px solid var(--line); vertical-align: top; }
.flow-lists .source { margin: 2px 0 0; word-break: break-word; }
.ceo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 20px; }
.ceo h3 { margin: 0 0 2px; }
.ceo dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 12px 0; font-size: 14px; }
.ceo dt { color: var(--muted); } .ceo dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .flow-lists { grid-template-columns: 1fr; } svg.flow { padding: 8px 4px; } svg.flow text { display: none; } }
/* "In 60 seconds" card at the top of the Overview (tickmark/triage.py) */
.triage { margin-bottom: 16px; }
.triage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 8px 0 4px; }
.triage-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.triage .tq { padding: 8px 20px 16px; border-left: 1px solid var(--line); min-width: 0; }
.triage .tq:first-child { border-left: 0; }
.triage h3 { margin: 0 0 8px; font-size: 14px; color: var(--muted); font-weight: 600; }
.triage .big { font-size: 32px; font-weight: 600; margin: 0; font-variant-numeric: tabular-nums; }
.triage .tflag { display: flex; gap: 8px; margin: 0 0 10px; }
.triage .tflag .icon { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--kaud); color: #fff; font-size: 12px;
  font-weight: 600; display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
.triage .tflag > span:last-child { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.triage .quote { margin: 10px 0; }
@media (max-width: 760px) { .triage-grid, .triage-grid.two { grid-template-columns: 1fr; } .triage .tq { border-left: 0; border-top: 1px solid var(--line); }
  .triage .tq:first-child { border-top: 0; } }


/* Earnings releases tab */
.adj-card { margin: 12px 0 16px; } .adj-table { width: 100%; font-size: 13px; margin-bottom: 8px; } .adj-card .card-body > p:first-child { margin-top: 0; }
.rel-find { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0 16px; }
.rel-find input { flex: 1 1 260px; min-width: 0; font: inherit; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--fg); }
.rel-find button { font: inherit; padding: 7px 14px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg); cursor: pointer; }
.rel-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 12px; }
.rel-list { display: flex; flex-direction: column; max-height: 80vh; overflow-y: auto; padding: 6px; }
.rel-list a { display: flex; flex-wrap: wrap; gap: 2px 6px; padding: 7px 8px; border-radius: 6px; color: var(--fg); font-size: 13px; }
.rel-list a:hover { background: var(--surface-2); text-decoration: none; }
.rel-list a.on { background: var(--accent-soft); }
.rel-list .t { flex-basis: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kind-tag { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.kind-tag.k-transcript, .kind-tag.k-remarks { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.rel-doc h2 { margin: 6px 0 0; font-size: 16px; }
.rel-text p { max-width: 75ch; line-height: 1.6; }
.rel-text p:target { background: var(--accent-soft); outline: 4px solid var(--accent-soft); border-radius: 4px; }
.rel-full { white-space: pre-wrap; font-size: 12px; max-height: 70vh; overflow: auto; background: var(--surface-2); padding: 10px; border-radius: 6px; }
@media (max-width: 760px) { .rel-layout { grid-template-columns: 1fr; } .rel-list { max-height: 260px; } }
.tv-quote { min-width: 230px; }
.tv-tickers { padding: 6px 12px; margin-bottom: 14px; }

/* /archive: what changed across every company, by day */
.arc-stats { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-bottom: 6px; }
.arc-stats div { display: flex; flex-direction: column; min-width: 120px; }
.arc-stats strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.arc-stats span { color: var(--muted); font-size: 13px; }
@media (max-width: 600px) { .arc-stats { display: grid; grid-template-columns: 1fr 1fr; } .arc-stats div { min-width: 0; } .arc-stats strong { font-size: 16px; } }
.arc-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; }
.arc-day { margin-bottom: 18px; }
.arc-table { table-layout: fixed; }
.arc-table th:nth-child(1) { width: 30%; } .arc-table th:nth-child(3) { width: 26%; }
.arc-table td { vertical-align: top; overflow-wrap: anywhere; }
.arc-filter select { width: auto; }

/* Watchlist: risks the companies share (tickmark/overlap.py) */
.sr-topic { border-top: 1px solid var(--line); padding: 8px 0; }
.sr-topic:first-of-type { border-top: 0; }
.sr-topic summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.sr-n { font-size: 13px; font-variant-numeric: tabular-nums; }
.sr-bar { display: inline-block; width: 70px; height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.sr-bar i { display: block; height: 100%; background: var(--accent, #3557e0); }
.sr-list { list-style: none; margin: 8px 0 0; padding: 0; }
.sr-list li { display: block; margin: 0 0 10px; }
.sr-quote { margin: 4px 0 0; padding: 4px 0 4px 10px; border-left: 3px solid var(--line); font-size: 14px; }

/* /newsletter */
.nl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 820px) { .nl-grid { grid-template-columns: 1fr; } .nl-grid aside { order: -1; } }
.nl-item { margin-bottom: 12px; }
.nl-item h3 { margin: 2px 0 4px; font-size: 16px; }
.nl-item p { margin: 4px 0; }
.nl-kind { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.nl-quote { margin: 6px 0; padding: 2px 0 2px 10px; border-left: 3px solid var(--line-strong); }
.nl-signup form { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.nl-signup input { flex: 1 1 160px; min-width: 0; }
.nl-past { list-style: none; margin: 0; padding: 0; }
.nl-past li { margin: 4px 0; }
.nl-grid aside > .card { margin-bottom: 12px; }

/* "From EDGAR" on blocks of numbers taken from the filings (_from_edgar.html) */
.edg-chip { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; white-space: nowrap; cursor: help; }
/* screener: a toolbar with the filters folded behind a button, and dense rows (Finviz, TradingView) */
main > .scr-head { padding-top: 18px; padding-bottom: 56px; }
.scr-filters { position: relative; padding: 10px 14px; z-index: 5; }
.scr-bar { display: flex; align-items: center; gap: 10px; min-width: 0; }
.scr-bar .scr-presets { flex: 1 1 auto; min-width: 0; }
.scr-more > summary { list-style: none; cursor: pointer; }
.scr-more > summary::-webkit-details-marker { display: none; }
.tb-btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: 6px; padding: 5px 12px; font-weight: 600; font-size: 13px; color: var(--fg); min-height: 32px; }
.tb-btn:hover, .scr-more[open] > .tb-btn { border-color: var(--accent); color: var(--accent); }
.tb-btn .n { background: var(--accent); color: var(--accent-fg); border-radius: 999px; font-size: 11px; padding: 0 6px; }
.tb-btn .caret { font-size: 11px; color: var(--muted); }
.tb-sep { width: 1px; align-self: stretch; background: var(--line); }
.scr-bar .chip { min-height: 30px; padding: 2px 11px; font-size: 13px; }
.scr-panel { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: 12px 16px 10px; max-height: 75vh; overflow: auto; }
.scr-panel .flt-group:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.scr-pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.pill { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.pill:hover { text-decoration: none; box-shadow: inset 0 0 0 1px var(--accent); }
.pill-clear { font-size: 12px; color: var(--muted); margin-left: 4px; }
.views { padding-top: 8px; }
.views a { padding: 5px 12px; font-size: 13px; }
.pager { margin: 6px 0; }
.pager a { min-width: 28px; padding: 2px 8px; font-size: 13px; border-radius: 6px; }
.scr th, .scr td { padding: 3px 8px; font-size: 12px; }
.scr th { font-size: 11px; }
.scr td.spark svg { height: 16px; vertical-align: middle; }
@media (max-width: 640px) {
  .scr-bar { flex-wrap: wrap; }
  .scr-bar .tb-sep { display: none; }
  .scr-bar .scr-presets { flex-basis: 100%; }
  .scr-panel { position: static; border: 0; box-shadow: none; padding: 10px 0 0; max-height: none; }
  .views a { min-height: 36px; }
}
