/* Stockline — internal NSN research tool.
   Built for scanning: dense tables, monospace figures, hard-aligned numbers,
   and a summary block that answers "what is this and what does it cost" before
   you scroll. Layout follows the FLIS research tools the shop already uses. */

:root {
  --bg:          #eef1f5;
  --panel:       #ffffff;
  --ink:         #14181d;
  --ink-2:       #3d4650;
  --muted:       #6b7683;
  --line:        #ccd4dd;
  --line-2:      #e3e8ee;

  --navy:        #123a5e;
  --navy-2:      #1d5285;
  --blue:        #1667a8;
  --blue-ink:    #0f4f80;
  --blue-tint:   #eaf2f9;
  --blue-tint-2: #dae8f4;
  --hdr:         #dde7f0;

  --green:       #1a7f42;
  --green-tint:  #e4f4e8;
  --red:         #bd2130;
  --red-tint:    #fdecec;
  --amber:       #8a5a00;
  --amber-tint:  #fdf4e3;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow: 0 1px 2px rgba(16,32,48,.06), 0 1px 8px rgba(16,32,48,.04);
  --radius: 7px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10141a; --panel: #171c23; --ink: #e7ebef; --ink-2: #b9c2cc;
    --muted: #8a95a1; --line: #2f3742; --line-2: #232a33;
    --navy: #0f2c47; --navy-2: #17405f; --blue: #63aee6; --blue-ink: #8cc6f2;
    --blue-tint: #182430; --blue-tint-2: #1d2c3a; --hdr: #22303d;
    --green: #58c07f; --green-tint: #16281d; --red: #f08a8a; --red-tint: #2a1a1c;
    --amber: #e0a850; --amber-tint: #2a2317;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  --bg: #10141a; --panel: #171c23; --ink: #e7ebef; --ink-2: #b9c2cc;
  --muted: #8a95a1; --line: #2f3742; --line-2: #232a33;
  --navy: #0f2c47; --navy-2: #17405f; --blue: #63aee6; --blue-ink: #8cc6f2;
  --blue-tint: #182430; --blue-tint-2: #1d2c3a; --hdr: #22303d;
  --green: #58c07f; --green-tint: #16281d; --red: #f08a8a; --red-tint: #2a1a1c;
  --amber: #e0a850; --amber-tint: #2a2317;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14.5px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: .94em; }
h1, h2, h3 { margin: 0; font-weight: 650; }

/* ───────────────────────── masthead ───────────────────────── */
.masthead {
  background: linear-gradient(180deg, var(--navy), var(--navy-2));
  color: #fff; padding: 11px 18px; display: flex; align-items: center; gap: 14px;
}
.masthead .brand {
  font-size: 21px; font-weight: 750; letter-spacing: .5px; color: #fff;
}
.masthead .brand span { opacity: .55; font-weight: 400; }
.masthead .tagline {
  margin-left: auto; font-size: 12.5px; letter-spacing: 2.5px;
  text-transform: uppercase; opacity: .7;
}

.navstrip {
  background: var(--panel); border-bottom: 1px solid var(--line);
  padding: 0 14px; display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 20; box-shadow: var(--shadow);
}
.navstrip a {
  color: var(--ink-2); padding: 10px 14px; font-size: 14.5px; font-weight: 550;
  border-bottom: 2px solid transparent;
}
.navstrip a:hover { color: var(--blue); text-decoration: none; border-bottom-color: var(--line); }
.navstrip a.on { color: var(--blue); border-bottom-color: var(--blue); }
.navstrip form { margin-left: auto; display: flex; gap: 6px; padding: 6px 0; }
.navstrip input {
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 5px;
  min-width: 300px; font-size: 14.5px; background: var(--bg); color: var(--ink);
  font-family: var(--sans);
}
.navstrip input:focus { outline: 2px solid var(--blue); outline-offset: -1px; background: var(--panel); }
.navstrip button {
  padding: 6px 15px; border: 0; border-radius: 5px; cursor: pointer;
  background: var(--blue); color: #fff; font-weight: 600; font-size: 14.5px;
}
.navstrip button:hover { background: var(--blue-ink); }

main { padding: 16px; max-width: 1900px; margin: 0 auto; }

/* ───────────────────────── item summary card ───────────────────────── */
.idcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px;
}
.idcard-top {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start;
  padding: 14px 18px; border-bottom: 1px solid var(--line-2);
}
.idcard .eyebrow {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 650;
}
.idcard h1 {
  font-family: var(--mono); font-size: 27px; letter-spacing: -.5px;
  margin: 2px 0 3px; line-height: 1.1;
}
.idcard .itemname { font-size: 17px; font-weight: 650; color: var(--ink); }
.idcard .sub { margin-top: 5px; font-size: 13.5px; color: var(--muted); }
.idcard .sub a { color: var(--blue); }

.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.chip {
  font-size: 12.5px; font-weight: 650; padding: 2px 9px; border-radius: 3px;
  background: var(--blue-tint); color: var(--blue-ink); border: 1px solid transparent;
  white-space: nowrap;
}
.chip.ok   { background: var(--green-tint); color: var(--green); }
.chip.bad  { background: var(--red-tint);   color: var(--red); }
.chip.warn { background: var(--amber-tint); color: var(--amber); }

.copy-btn {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  width: 20px; height: 20px; margin-left: 5px; padding: 0; line-height: 1;
  border: 1px solid var(--line); border-radius: 3px; background: var(--panel); color: var(--muted);
  font-family: var(--sans); cursor: pointer;
}
.copy-btn:hover { color: var(--blue-ink); border-color: var(--blue); }
.copy-btn svg { width: 12px; height: 12px; pointer-events: none; }
.copy-btn.copied, .copy-btn.copy-failed {
  width: auto; padding: 2px 8px; font-size: 11px; font-weight: 650; white-space: nowrap;
}
.copy-btn.copied { color: var(--green); border-color: var(--green); background: var(--green-tint); }
.copy-btn.copy-failed { color: var(--red); border-color: var(--red); background: var(--red-tint); }

.figures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0; border-top: 1px solid var(--line-2);
}
.fig { padding: 9px 16px; border-right: 1px solid var(--line-2); }
.fig:last-child { border-right: 0; }
.fig span {
  display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 650; margin-bottom: 2px;
}
.fig strong { font-size: 17px; font-family: var(--mono); font-weight: 650; }
.fig strong.money { color: var(--green); }

/* ───────────────────────── tabs ───────────────────────── */
.tabs {
  display: flex; flex-wrap: wrap; gap: 3px; margin: 0 0 14px;
  border-bottom: 2px solid var(--line);
}
.tabs button {
  border: 1px solid var(--line); border-bottom: 0; background: var(--bg);
  color: var(--ink-2); padding: 7px 15px; font-size: 14px; cursor: pointer;
  border-radius: 5px 5px 0 0; font-family: var(--sans); font-weight: 550;
  margin-bottom: -2px;
}
.tabs button:hover { background: var(--blue-tint); color: var(--blue-ink); }
.tabs button[aria-selected="true"] {
  background: var(--panel); color: var(--blue-ink); font-weight: 700;
  border-color: var(--line); border-bottom: 2px solid var(--panel);
}
.tabs .count { opacity: .6; font-weight: 400; margin-left: 4px; font-size: 12.5px; }

/* ───────────────────────── sections ───────────────────────── */
.block {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden;
}
.block > header {
  display: flex; align-items: baseline; gap: 10px; padding: 9px 14px;
  background: var(--hdr); border-bottom: 1px solid var(--line);
}
.block > header h2 { font-size: 15px; font-weight: 700; color: var(--ink); }
.block > header .src {
  margin-left: auto; font-size: 12.5px; color: var(--muted); font-weight: 500;
}
.block > .body { padding: 12px 14px; }
.block > .body.flush { padding: 0; }
.legend { font-size: 13px; color: var(--muted); padding: 8px 14px 0; }

/* ───────────────────────── tables ───────────────────────── */
.tablewrap { overflow-x: auto; max-height: 78vh; overflow-y: auto; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.grid thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--hdr); color: var(--ink-2);
  padding: 7px 9px; font-weight: 700; font-size: 12.5px; text-align: left;
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
table.grid tbody td {
  padding: 5px 9px; border-bottom: 1px solid var(--line-2); vertical-align: top;
}
table.grid tbody tr:nth-child(even) { background: var(--blue-tint); }
table.grid tbody tr:hover { background: var(--blue-tint-2); }
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid.kv td:first-child { width: 32%; font-weight: 600; color: var(--ink-2); }
table.grid td.wrap { white-space: normal; min-width: 200px; }

.r { text-align: right; font-family: var(--mono); white-space: nowrap; }
.c { text-align: center; font-family: var(--mono); }
th.r, th.c { text-align: inherit; }
thead th.r { text-align: right; }
thead th.c { text-align: center; }
.strong { font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pos { color: var(--green); font-weight: 650; }
.neg { color: var(--red); font-weight: 650; }
th[title] { cursor: help; border-bottom: 1px dotted var(--muted); }

/* ───────────────────────── stat strip ───────────────────────── */
.stats {
  display: flex; flex-wrap: wrap; gap: 0;
  border-bottom: 1px solid var(--line);
}
.stats > div {
  padding: 8px 14px; border-right: 1px solid var(--line-2); flex: 1 1 auto; min-width: 110px;
}
.stats > div:last-child { border-right: 0; }
.stats span {
  display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 650;
}
.stats strong { font-size: 15.5px; font-family: var(--mono); font-weight: 650; }

/* ───────────────────────── misc ───────────────────────── */
.empty { color: var(--muted); font-style: italic; padding: 14px; text-align: center; }
.notice {
  background: var(--amber-tint); border-left: 3px solid var(--amber); color: var(--ink);
  padding: 9px 13px; margin: 0 0 14px; font-size: 14px; border-radius: 0 5px 5px 0;
}
.notice.info { background: var(--blue-tint); border-left-color: var(--blue); }
.notice.success { background: var(--green-tint); border-left-color: var(--green); }
.notice.error { background: var(--red-tint); border-left-color: var(--red); }
.pagetitle { font-size: 19px; margin: 2px 0 14px; font-weight: 700; }
.pagesub { color: var(--muted); font-size: 14px; margin: -8px 0 14px; }

.hero { text-align: center; padding: 58px 0 30px; }
.hero h1 { font-size: 26px; margin-bottom: 7px; }
.hero p { margin: 0 0 20px; color: var(--muted); font-size: 15px; }
.bigsearch { display: flex; gap: 8px; max-width: 660px; margin: 0 auto; }
.bigsearch input {
  flex: 1; padding: 12px 15px; font-size: 16px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow);
}
.bigsearch input:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.bigsearch button {
  padding: 12px 24px; border: 0; border-radius: 6px; background: var(--blue);
  color: #fff; font-weight: 650; font-size: 16px; cursor: pointer;
}
.examples { margin-top: 16px; font-size: 14px; color: var(--muted); }
.examples a { margin: 0 5px; }
.wrapnarrow { max-width: 1000px; margin: 0 auto; }

.speclist { list-style: none; padding: 0; margin: 0; }
.speclist li {
  padding: 7px 0; border-bottom: 1px solid var(--line-2);
  display: flex; gap: 14px; align-items: baseline;
}
.speclist li:last-child { border-bottom: 0; }
a.ext { font-size: 13px; font-weight: 650; white-space: nowrap; }
.pageapi { text-align: right; font-size: 13px; margin: 14px 0 0; }
.toolbar { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.btn {
  padding: 4px 11px; border: 1px solid var(--line); border-radius: 5px;
  background: var(--panel); color: var(--ink-2); font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: var(--sans);
}
.btn:hover { background: var(--blue-tint); color: var(--blue-ink); text-decoration: none; }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn.danger:hover { background: var(--red-tint); color: var(--red); }

footer {
  margin-top: 28px; padding: 16px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 3px;
  max-width: 1900px; margin-left: auto; margin-right: auto;
}

@media (max-width: 900px) {
  .navstrip form { flex-basis: 100%; }
  .navstrip input { min-width: 0; flex: 1; }
  .masthead .tagline { display: none; }
  .idcard h1 { font-size: 22px; }
  .theme-picker { max-width: 120px; font-size: 12.5px; }
}
@media (max-width: 480px) {
  .masthead .brand { font-size: 17px; }
  .theme-picker { display: none; }
}

@media print {
  .navstrip, .masthead, .tabs, footer, .toolbar, .pageapi { display: none !important; }
  .block, .idcard { box-shadow: none; border-color: #999; break-inside: avoid; }
  .tablewrap { max-height: none; overflow: visible; }
  section[data-panel] { display: block !important; }
  body { background: #fff; font-size: 12px; }
}

/* ───────────────────────── decisions, filters, misc (v0.3) ───────────────────────── */
form.decide { display: flex; gap: 3px; white-space: nowrap; }
.dbtn {
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  font-size: 12.5px; font-weight: 650; padding: 2px 7px; border-radius: 4px; cursor: pointer;
  font-family: var(--sans);
}
.dbtn:hover { border-color: var(--blue); color: var(--blue-ink); }
.dbtn.bid.on   { background: var(--green); border-color: var(--green); color: #fff; }
.dbtn.watch.on { background: var(--amber); border-color: var(--amber); color: #fff; }
.dbtn.nobid.on { background: var(--red);   border-color: var(--red);   color: #fff; }
.dbtn.clear { padding: 2px 6px; }
tr.dec-bid   > td:first-child { box-shadow: inset 3px 0 0 var(--green); }
tr.dec-watch > td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
tr.dec-nobid { opacity: .55; }
tr.hl { background: var(--green-tint) !important; }
tr.pref td { background: var(--green-tint) !important; box-shadow: inset 3px 0 0 var(--green); }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -1px; margin-right: 4px; }
.swatch.pref { background: var(--green-tint); box-shadow: inset 2px 0 0 var(--green); border: 1px solid var(--green); }

.filters { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.filters input, .filters select, .body input, .body select {
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 5px;
  background: var(--bg); color: var(--ink); font-size: 14.5px; font-family: var(--sans);
}
.filters input:focus, .body input:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.chk { font-size: 14px; color: var(--ink-2); display: inline-flex; gap: 5px; align-items: center; }
.btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn.primary:hover { background: var(--blue-ink); }

.tabs a.tab {
  border: 1px solid var(--line); border-bottom: 0; background: var(--bg); color: var(--ink-2);
  padding: 7px 15px; font-size: 14px; border-radius: 5px 5px 0 0; font-weight: 550; margin-bottom: -2px;
}
.tabs a.tab:hover { background: var(--blue-tint); text-decoration: none; }
.tabs a.tab.on { background: var(--panel); color: var(--blue-ink); font-weight: 700; border-bottom: 2px solid var(--panel); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }
.figures.strip { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; box-shadow: var(--shadow); }
.hero.compact { padding: 26px 0 8px; }
.note { padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.note:last-of-type { border-bottom: 0; }
.prose { white-space: pre-wrap; font-size: 14px; line-height: 1.55; max-height: 60vh; overflow: auto; }
kbd { font-family: var(--mono); font-size: 12.5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 0 5px; background: var(--bg); }
th.sorted::after { content: " ▾"; color: var(--blue); }
th[data-dir="asc"].sorted::after { content: " ▴"; }

details.inline { display: inline-block; text-align: left; }
details.inline summary { cursor: pointer; list-style: none; text-decoration: underline dotted; }
details.inline summary::-webkit-details-marker { display: none; }
ul.plain { list-style: none; margin: 4px 0 0; padding: 0; }
ul.plain li { padding: 1px 0; white-space: nowrap; }


/* ===== NSN-Recon tactical look ===========================================
   Matches the nsnrecon.com landing page: dark ground, Air Force Blue accent,
   Oswald for headings/brand, IBM Plex Mono for data, Public Sans for body
   copy, sharp corners, hairline borders. Still a dense research tool first -
   tables stay tight and scannable, this isn't a marketing page. */
:root {
  color-scheme: dark;
  --bg: #0a0e13; --panel: #10161f; --panel-2: #141c27; --ink: #e9eef3; --ink-2: #b9c2cc; --muted: #7d8a99;
  --line: #25313f; --line-2: #1a232e;
  --navy: #0a2247; --navy-2: #123a91; --blue: #2f6fed; --blue-ink: #7fa8ff;
  --blue-tint: rgba(47,111,237,.14); --blue-tint-2: rgba(47,111,237,.26); --hdr: #141c27;
  --green: #33d17a; --green-tint: rgba(51,209,122,.14);
  --red: #ff5a5a; --red-tint: rgba(255,90,90,.14);
  --amber: #f2b134; --amber-tint: rgba(242,177,52,.14);
  --display: 'Oswald', 'Arial Narrow', sans-serif;
  --sans: 'Public Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --shadow: 0 2px 14px rgba(0,0,0,.5); --radius: 2px;
}

/* ---- branch themes: same dark structure, just the accent family changes -- */
:root[data-theme="army"] {
  --navy: #1c2414; --navy-2: #3c4a2e; --blue: #c9a227; --blue-ink: #e8c766;
  --blue-tint: rgba(201,162,39,.14); --blue-tint-2: rgba(201,162,39,.26);
}
:root[data-theme="navy"] {
  --navy: #00142e; --navy-2: #00265c; --blue: #c5a253; --blue-ink: #e3c579;
  --blue-tint: rgba(197,162,83,.14); --blue-tint-2: rgba(197,162,83,.26);
}
:root[data-theme="marines"] {
  --navy: #2b0808; --navy-2: #6b1414; --blue: #d4af37; --blue-ink: #f0cf6b;
  --blue-tint: rgba(212,175,55,.14); --blue-tint-2: rgba(212,175,55,.26);
}
:root[data-theme="space-force"] {
  --navy: #04060b; --navy-2: #101a30; --blue: #5ec9e8; --blue-ink: #9fe3f5;
  --blue-tint: rgba(94,201,232,.14); --blue-tint-2: rgba(94,201,232,.26);
}
:root[data-theme="coast-guard"] {
  --navy: #00203f; --navy-2: #00478f; --blue: #ff6a3d; --blue-ink: #ff9569;
  --blue-tint: rgba(255,106,61,.14); --blue-tint-2: rgba(255,106,61,.26);
}

/* ---- fully distinct themes ------------------------------------------- */
:root[data-theme="stealth"] {
  --bg: #050505; --panel: #0c0c0c; --panel-2: #121212; --ink: #d6d6d6; --ink-2: #a3a3a3; --muted: #6b6b6b;
  --line: #232323; --line-2: #181818; --hdr: #121212;
  --navy: #000000; --navy-2: #1c1c1c; --blue: #c9c9c9; --blue-ink: #efefef;
  --blue-tint: rgba(255,255,255,.06); --blue-tint-2: rgba(255,255,255,.1);
}
:root[data-theme="night-vision"] {
  --bg: #020a02; --panel: #031403; --panel-2: #041d04; --ink: #c8ffc8; --ink-2: #8fd98f; --muted: #4d804d;
  --line: #144d14; --line-2: #0d330d; --hdr: #041d04;
  --navy: #020f02; --navy-2: #0a2e0a; --blue: #39ff14; --blue-ink: #93ff6e;
  --blue-tint: rgba(57,255,20,.12); --blue-tint-2: rgba(57,255,20,.22);
  --green: #39ff14; --green-tint: rgba(57,255,20,.14);
}
:root[data-theme="light"] {
  color-scheme: light;
  /* --panel-2 needs to read clearly against --panel (#fff) for table row
     banding - #eef1f5 was reported hard to follow line to line, so this is
     pulled a step darker than the original NSN-Now-style value. */
  --bg: #f4f6f9; --panel: #ffffff; --panel-2: #e3e8ee; --ink: #14181d; --ink-2: #3d4650; --muted: #6b7683;
  --line: #ccd4dd; --line-2: #e3e8ee; --hdr: #dde7f0;
  --navy: #123a5e; --navy-2: #1d5285; --blue: #1667a8; --blue-ink: #0f4f80;
  --blue-tint: #eaf2f9; --blue-tint-2: #dae8f4;
  --green: #1a7f42; --green-tint: #e4f4e8; --red: #bd2130; --red-tint: #fdecec; --amber: #8a5a00; --amber-tint: #fdf4e3;
  --shadow: 0 1px 2px rgba(16,32,48,.06), 0 1px 8px rgba(16,32,48,.04);
}

body { font: 14.5px/1.55 var(--sans); background: var(--bg); color: var(--ink); }
main { padding: 8px 10px 16px; max-width: none; }
a { color: var(--blue-ink); }
h1, h2, h3, .pagetitle, .block > header h2, .thero-title span { font-family: var(--display); letter-spacing: .02em; }

/* banner + menu - re-themes automatically with --navy/--navy-2/--blue */
.masthead { background: linear-gradient(180deg, var(--bg) 0%, var(--navy) 55%, var(--navy-2) 100%); padding: 10px 18px; min-height: 58px; border-bottom: 1px solid var(--navy-2); display: flex; align-items: center; gap: 14px; }
.masthead .brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 22px; font-weight: 700; font-style: normal; letter-spacing: .04em; text-transform: uppercase; color: #fff; text-shadow: none; }
.masthead .brand span { opacity: 1; color: var(--blue-ink); font-weight: 700; }
.masthead .brand-mark { width: 26px; height: 26px; color: var(--blue-ink); flex-shrink: 0; }
.masthead .tagline { display: none; }
.mast-account { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.account-link {
  color: #fff; font-size: 14px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .03em; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis;
}
.account-link:hover { color: var(--blue-ink); text-decoration: none; }
.logout-btn {
  background: transparent; border: 1px solid rgba(255,255,255,.45); color: #fff;
  font: 600 12px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 2px; cursor: pointer; white-space: nowrap;
}
.logout-btn:hover { border-color: var(--blue-ink); color: var(--blue-ink); }
.theme-picker {
  /* Solid background, not a translucent white overlay - a <select>'s native
     closed-box rendering doesn't reliably composite alpha the same way across
     browsers, and white-on-translucent-white was reported unreadable. */
  background: var(--navy-2); border: 1px solid rgba(255,255,255,.35); color: #fff;
  font-size: 13px; padding: 5px 8px; border-radius: 2px; font-family: var(--sans); max-width: 160px;
}
.theme-picker:hover { background: var(--navy); }
.theme-picker option { background: var(--panel); color: var(--ink); }
.navstrip { background: var(--navy-2); border-bottom: 1px solid var(--line); box-shadow: none; padding: 0 6px; }
.navstrip a { color: rgba(255,255,255,.78); font-size: 14px; font-weight: 500; padding: 9px 14px; border-bottom: 2px solid transparent; text-transform: uppercase; letter-spacing: .04em; }
.navstrip a:hover, .navstrip a.on { background: transparent; color: #fff; border-bottom-color: var(--blue-ink); text-decoration: none; }
.navstrip input { min-width: 320px; border-radius: 2px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); padding: 5px 9px; font-family: var(--sans); }
.navstrip input::placeholder { color: var(--muted); }
.navstrip button { background: var(--blue); border-radius: 2px; }

/* NSN header table */
table.nsnhead { border-collapse: collapse; width: 100%; margin: 6px 0 8px; font-size: 14.5px; }
table.nsnhead th { background: var(--panel-2); border: 1px solid var(--line); padding: 6px 8px; font-weight: 700; text-align: center; color: var(--ink); font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
table.nsnhead td { border: 1px solid var(--line); padding: 7px 8px; vertical-align: top; background: var(--panel); color: var(--ink-2); }
table.nsnhead td.nsn { font-weight: 700; font-size: 16px; white-space: nowrap; font-family: var(--mono); color: var(--blue-ink); }
.recall { margin: 4px 0 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.recall .btn { background: var(--panel-2); border: 1px solid var(--line); border-radius: 2px; color: var(--ink-2); padding: 3px 10px; font-size: 13.5px; }
.recall .btn:hover { background: var(--blue-tint); color: var(--ink); }
.recall .btn.primary { background: var(--blue); color: #fff; border-color: var(--blue); }

/* tabs */
.tabs { border-bottom: 1px solid var(--line); gap: 0; margin-bottom: 10px; }
.tabs button { background: var(--panel-2); border: 1px solid var(--line); border-bottom: 0; border-radius: 0; margin: 0 -1px -1px 0; padding: 6px 13px; font-size: 13.5px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }
.tabs button:hover { background: var(--blue-tint); color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--panel); color: #fff; font-weight: 700; border-bottom: 1px solid var(--panel); border-top: 2px solid var(--blue); }
.tabs button[disabled] { color: #46505c; cursor: default; background: var(--panel-2); }
.tabs .count { opacity: .65; }

/* section label */
.block { border: 1px solid var(--line); border-radius: 0; margin-bottom: 14px; background: var(--panel); }
.block > header { background: var(--panel); border-bottom: 1px solid var(--line); padding: 0; align-items: center; gap: 12px; }
.block > header h2 { background: var(--blue); color: #fff; font-size: 15px; font-weight: 600; text-transform: uppercase; padding: 6px 18px; border-radius: 0; }
.block > header .src { color: var(--muted); font-size: 13px; padding-right: 10px; font-family: var(--mono); }
.block > header form { display: inline; }
.legend { color: var(--red); font-weight: 600; font-size: 13.5px; }

/* tables */
table.grid { border-collapse: collapse; font-size: 14.5px; }
table.grid thead th { background: var(--hdr); color: var(--ink); text-transform: uppercase; letter-spacing: .03em; font-size: 12.5px; font-weight: 700; border: 1px solid var(--line); padding: 6px 7px; text-align: center; }
table.grid tbody td { border: 1px solid var(--line-2); padding: 4px 7px; color: var(--ink-2); }
table.grid tbody tr:nth-child(even) td { background: var(--panel-2); }
table.grid tbody tr:nth-child(odd) td { background: var(--panel); }
table.grid tbody tr:hover td { background: var(--blue-tint); }
table.grid tbody tr.mine td, table.grid tbody tr.mine:nth-child(even) td { background: var(--green-tint); }
table.grid tbody tr.pref td { background: var(--green-tint) !important; box-shadow: none; }
table.grid tbody tr.hl td { background: var(--green-tint) !important; }
table.grid td.c a.cage, table.grid a.cage, td .cage { color: var(--green); font-weight: 700; }
.viewbtn { display: inline-block; background: var(--panel-2); border: 1px solid var(--line); border-radius: 2px; padding: 0 6px; font-size: 12.5px; color: var(--ink-2); margin-right: 6px; line-height: 17px; vertical-align: middle; }
.viewbtn:hover { background: var(--blue-tint); color: var(--ink); text-decoration: none; }
.pos { color: var(--green); font-weight: 700; }
.neg { color: var(--red); font-weight: 700; }
.chip { border-radius: 2px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-2); font-weight: 600; }
.chip.ok { background: var(--green-tint); color: var(--green); border-color: var(--green); }
.chip.warn { background: var(--amber-tint); color: var(--amber); border-color: var(--amber); }
.chip.bad { background: var(--red-tint); color: var(--red); border-color: var(--red); }
.btn { border-radius: 2px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); }
.btn:hover { background: var(--blue-tint); }
.stats { background: var(--panel-2); border-bottom: 1px solid var(--line); }
footer { color: var(--muted); }

/* menu dropdowns, buttons */
.navstrip .menu { position: relative; display: inline-block; }
.navstrip .menu > a { display: inline-block; }
.navstrip .menu .sub { display: none; position: absolute; left: 0; top: 100%; background: var(--panel); border: 1px solid var(--line); min-width: 210px; z-index: 30; box-shadow: 0 10px 28px rgba(0,0,0,.55); }
.navstrip .menu:hover .sub { display: block; }
.navstrip .menu .sub a { display: block; color: var(--ink-2); padding: 8px 12px; font-size: 14px; font-weight: 400; text-transform: none; letter-spacing: normal; border-bottom: 1px solid var(--line-2); }
.navstrip .menu .sub a:hover { background: var(--blue-tint); color: #fff; border-bottom-color: transparent; }
.btn.primary, .recall .btn.primary, .navstrip button { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; border-radius: 2px; }
.btn.primary:hover { filter: brightness(1.15); }
table.nsnhead th, table.nsnhead td { border-color: var(--line); }

/* no inner scrolling: tables grow with the page; the Summary shows 20 rows per section */
.tablewrap { max-height: none; overflow-y: visible; }
table.grid thead th { position: static; }
tr.trimmed { display: none; }
.morebar { padding: 6px 10px; background: var(--panel-2); border-top: 1px solid var(--line); font-size: 13.5px; }
.morebar a { font-weight: 700; margin-left: 8px; }
.summary-note { color: var(--amber); font-size: 13.5px; margin: -6px 0 8px; }

/* compact empty sections */
.block p.empty, .block .body p.empty { padding: 5px 12px; margin: 0; text-align: left; font-size: 13.5px; color: var(--muted); font-style: italic; }
.block > .body:has(> p.empty:only-child) { padding: 0; }

/* awards page: two blocks side by side, key/value summary strip */
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .cols2 { grid-template-columns: 1fr; } }
table.grid.kv th { background: var(--panel-2); text-align: left; white-space: nowrap; }
table.grid.kv td { white-space: nowrap; }

/* ---------- Target competitors tab ---------- */
.thero { background: linear-gradient(120deg, #060a10 0%, #0a2247 55%, #123a91 100%); color: #fff; border-radius: 0; border: 1px solid var(--navy-2); padding: 16px 20px 12px; margin-bottom: 14px; box-shadow: 0 8px 22px rgba(0,0,0,.5); }
.thero-title span { font-weight: 700; letter-spacing: .14em; font-size: 14.5px; text-transform: uppercase; }
.thero-title small { display: block; color: var(--ink-2); font-size: 13.5px; margin-top: 2px; font-family: var(--sans); letter-spacing: normal; }
.thero .figs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 14px 0 8px; }
.thero .figs div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: 0; padding: 8px 10px; }
.thero .figs b { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.01em; font-family: var(--mono); }
.thero .figs span { font-size: 12.5px; color: var(--ink-2); }
.thero-foot { font-size: 12.5px; color: var(--ink-2); } .thero-foot a { color: #fff; text-decoration: underline; }
@media (max-width: 900px) { .thero .figs { grid-template-columns: repeat(3, 1fr); } }
.hint { font-size: 12.5px; color: var(--muted); margin-left: auto; }
.bubble { width: 100%; height: auto; display: block; }
.bubble a.bpt { cursor: pointer; } .bubble a.bpt:hover circle { fill-opacity: 1; stroke: #fff; }
table.grid.wt th { text-align: left; white-space: nowrap; width: 110px; } table.grid.wt td:nth-child(2) { width: 120px; }
.wbar { height: 9px; background: var(--panel-2); border-radius: 2px; overflow: hidden; } .wbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--navy-2)); }
.scorebar { position: relative; width: 92px; height: 18px; background: var(--panel-2); border-radius: 2px; overflow: hidden; }
.scorebar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--blue-ink), var(--blue)); }
.scorebar b { position: relative; display: block; text-align: center; font-size: 13px; line-height: 18px; color: #fff; text-shadow: 0 0 3px rgba(0,0,0,.7); font-family: var(--mono); }
.badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 1px 6px; border-radius: 2px; margin: 2px 3px 0 0; border: 1px solid transparent; white-space: nowrap; }
.badge.k-h2h { background: var(--red-tint); color: var(--red); border-color: var(--red); }
.badge.k-lane { background: var(--blue-tint); color: var(--blue-ink); border-color: var(--blue); }
.badge.k-peer { background: var(--green-tint); color: var(--green); border-color: var(--green); }
.badge.k-up { background: var(--green-tint); color: var(--green); } .badge.k-down { background: var(--panel-2); color: var(--muted); }
.badge.k-open { background: var(--amber-tint); color: var(--amber); border-color: var(--amber); }
.badge.k-demand { background: var(--blue-tint); color: var(--blue-ink); border-color: var(--blue); }
.badge.k-price { background: var(--amber-tint); color: var(--amber); border-color: var(--amber); }
.badge.k-dealer { background: var(--panel-2); color: var(--ink-2); } .badge.k-local { background: var(--blue-tint); color: var(--blue-ink); } .badge.k-focus { background: var(--blue-tint); color: var(--blue-ink); }
.spark { width: 64px; height: 24px; vertical-align: middle; margin-right: 4px; }
table.targets td { vertical-align: top; }
tr.trow.flash td { background: var(--amber-tint) !important; transition: background .3s; }
tr.drow > td { background: var(--panel-2); padding: 10px 12px 12px; }
.plan-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.plan-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.fscchip { display: inline-block; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; padding: 1px 6px; margin-left: 4px; font-size: 13px; font-family: var(--mono); }
.gap-up { color: var(--green); font-weight: 700; } .gap-down { color: var(--red); font-weight: 700; }

.contactcard .lbl { display: inline-block; min-width: 58px; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.contactcard div { margin: 2px 0; }

.linkbtn { background: none; border: 0; padding: 0; color: var(--blue-ink); cursor: pointer; font: inherit; text-decoration: underline; }

.hc { cursor: help; } .hc .hl { color: var(--ink-2); } .hc:hover .hl { text-decoration: underline dotted; }

/* search: item-name groups and FSC facets */
.facets { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.facets .chip b { margin-left: 4px; font-weight: 700; }
.namegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 12px; }
.namegrid a { display: flex; justify-content: space-between; gap: 8px; padding: 3px 6px; border-radius: 2px; text-decoration: none; color: var(--ink); }
.namegrid a:hover { background: var(--blue-tint); }
.namegrid a b { color: var(--blue-ink); font-weight: 600; }

/* narrow screens: NSNs, dates and codes never break across lines; tables scroll instead */
table.grid td.mono, table.grid td.c, table.grid th { white-space: nowrap; }

/* ───────────────────────── help center ───────────────────────── */
.help-search { margin: 4px 0 26px; }
.help-search input {
  width: 100%; max-width: 480px; padding: 10px 14px; font-size: 15px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink);
}
.help-search input:focus { outline: 2px solid var(--blue); outline-offset: -1px; }

.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 0 0 34px; }
.help-card {
  display: block; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s;
}
.help-card:hover { border-color: var(--blue); transform: translateY(-1px); text-decoration: none; }
.help-card-num { font-family: var(--mono); font-size: 12.5px; color: var(--blue); font-weight: 700; letter-spacing: .05em; }
.help-card h3 { margin: 7px 0 4px; font-size: 15.5px; }
.help-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.4; }
.help-card[hidden] { display: none; }

.faq-list { max-width: 780px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; background: var(--panel); overflow: hidden; }
.faq-item[hidden] { display: none; }
.faq-item summary {
  cursor: pointer; padding: 13px 16px; font-weight: 600; font-size: 15px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 19px; line-height: 1; color: var(--muted); flex: none; transition: transform .15s; }
.faq-item[open] summary { border-bottom: 1px solid var(--line-2); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 12px 16px 15px; margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.help-empty { display: none; color: var(--muted); font-style: italic; padding: 4px 0 20px; }
.help-quick {
  max-width: 780px; margin: 0 0 30px; padding: 16px 20px 6px; border: 1px solid var(--line);
  border-left: 4px solid var(--blue); border-radius: var(--radius); background: var(--panel);
}
.help-quick h2 { margin: 0 0 8px; font-size: 16px; }
.help-quick ol { margin: 0 0 10px; padding-left: 20px; line-height: 1.6; font-size: 15px; color: var(--ink-2); }
.help-guide { max-width: 780px; margin: 0 0 34px; padding-top: 6px; scroll-margin-top: 14px; }
.help-guide[hidden] { display: none; }
.help-guide > h2 { margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); font-size: 18px; }
.help-guide:target > h2 { color: var(--blue-ink); border-bottom-color: var(--blue); }
.help-guide h3 { margin: 18px 0 4px; font-size: 15px; }
.help-guide p, .help-guide li { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.help-guide p { margin: 0 0 10px; }
.help-guide ol, .help-guide ul { margin: 0 0 12px; padding-left: 22px; }
.help-guide li { margin-bottom: 4px; }
.help-guide code, .help-guide kbd {
  font-family: var(--mono); font-size: 13.5px; padding: 1px 5px; border: 1px solid var(--line-2);
  border-radius: 3px; background: var(--blue-tint); color: var(--ink);
}
.help-tip {
  margin: 12px 0; padding: 10px 14px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2);
  border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: var(--radius); background: var(--amber-tint);
}
.help-tip strong { color: var(--ink); }
.help-top { margin: 6px 0 0; font-size: 13.5px; }
.help-contact { max-width: 780px; margin: 22px 0 6px; font-size: 15px; color: var(--ink-2); }
table.grid td.mono.wrap { white-space: normal; }
