/* Delta Team Tactical – Black Friday site change audit
   Style: forensic field report – paper, ink, one signal orange. */
:root {
  --paper: #f6f4ef;
  --paper-2: #efece4;
  --card: #fffdf8;
  --ink: #15181f;
  --ink-2: #3a3f4b;
  --muted: #6b7080;
  --rule: #d9d4c7;
  --signal: #e0561b;
  --p0: #b42318;
  --p0-bg: #fdecea;
  --p1: #b54708;
  --p1-bg: #fef3e2;
  --p2: #475467;
  --p2-bg: #eef0f3;
  --ok: #2f6b3a;
  --ok-bg: #e8f3ea;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", system-ui, -apple-system, Segoe UI, sans-serif;
  --rail: 240px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body);
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration-color: var(--signal); text-underline-offset: 3px; }
a:hover { color: var(--signal); }
code, .mono { font-family: var(--mono); font-size: 0.86em; }
code { background: var(--paper-2); padding: 1px 5px; border-radius: 3px; overflow-wrap: anywhere; }

/* ---------- layout ---------- */
.shell {
  display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(to right, var(--paper-2) calc(var(--rail) - 1px), var(--rule) calc(var(--rail) - 1px), var(--rule) var(--rail), transparent var(--rail));
}
.rail {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 28px 22px;
  border-right: 1px solid var(--rule); background: var(--paper-2);
}
.mark { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.mark-glyph {
  width: 34px; height: 34px; border: 2px solid var(--ink); display: grid; place-items: center;
  font-family: var(--head); font-weight: 700; font-size: 15px; letter-spacing: .5px; position: relative;
}
.mark-glyph::after { content: ""; position: absolute; right: -5px; bottom: -5px; width: 10px; height: 10px; background: var(--signal); }
.mark-text { font-family: var(--head); font-weight: 600; font-size: 15px; line-height: 1.1; text-transform: uppercase; letter-spacing: .8px; }
.mark-text small { display: block; color: var(--muted); font-weight: 500; letter-spacing: .4px; }
.rail nav ol { list-style: none; margin: 0; padding: 0; counter-reset: sec; }
.rail nav li { counter-increment: sec; }
.rail nav a {
  display: block; padding: 7px 0 7px 30px; position: relative; text-decoration: none; color: var(--ink-2);
  font-size: 15px; border-left: 2px solid transparent;
}
.rail nav a::before {
  content: counter(sec, decimal-leading-zero); position: absolute; left: 0; top: 8px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.rail nav a.active { color: var(--ink); font-weight: 600; }
.rail nav a.active::before { color: var(--signal); }
.rail .meta { margin-top: 28px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 14px; }

main { padding: 0 56px 80px; max-width: 1120px; }
section { padding: 56px 0 8px; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: 0; }
.kicker {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--signal);
  margin: 0 0 10px;
}
h1, h2, h3 { font-family: var(--head); line-height: 1.08; margin: 0; letter-spacing: .2px; }
h1 { font-size: clamp(40px, 5.4vw, 64px); font-weight: 700; text-transform: uppercase; max-width: 15ch; }
h2 { font-size: 36px; font-weight: 700; text-transform: uppercase; margin-bottom: 14px; }
h3 { font-size: 23px; font-weight: 600; margin-bottom: 6px; }
p { margin: 0 0 14px; max-width: 78ch; }
.lede { font-size: 20px; color: var(--ink-2); max-width: 70ch; }

/* ---------- hero ---------- */
.hero { padding-top: 48px; }
.hero-top { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.stamp {
  border: 2px solid var(--p0); color: var(--p0); font-family: var(--head); font-weight: 700; text-transform: uppercase;
  padding: 6px 12px; transform: rotate(-2deg); letter-spacing: 1px; font-size: 16px; margin-top: 8px; background: var(--card);
}
.hero h1 { margin: 6px 0 18px; }
.verdict {
  margin: 28px 0 8px; background: var(--ink); color: #f4f1ea; padding: 26px 30px; position: relative;
  border-left: 8px solid var(--signal);
}
.verdict h2 { font-size: 22px; color: #fff; margin-bottom: 10px; letter-spacing: 1px; }
.verdict p { color: #e3dfd5; max-width: none; }
.verdict p:last-child { margin-bottom: 0; }
.verdict strong { color: #fff; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; margin: 26px 0 10px; border-top: 2px solid var(--ink); }
.metric { padding: 16px 18px 14px 0; border-bottom: 1px solid var(--rule); }
.metric .num { font-family: var(--head); font-size: 44px; font-weight: 700; line-height: 1; }
.metric .num.bad { color: var(--p0); }
.metric .lbl { font-size: 14px; color: var(--ink-2); margin-top: 6px; line-height: 1.35; padding-right: 14px; }
.hero .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- findings ---------- */
.finding {
  display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 22px; padding: 22px 0; border-top: 1px solid var(--rule);
}
.finding:first-of-type { border-top: 2px solid var(--ink); }
.pri { font-family: var(--head); font-weight: 700; font-size: 34px; line-height: 1; }
.pri small { display: block; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 1px; margin-top: 6px; text-transform: uppercase; }
.pri.p0 { color: var(--p0); } .pri.p1 { color: var(--p1); } .pri.p2 { color: var(--p2); }
.finding dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 18px; margin: 10px 0 0; }
.finding dt { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); padding-top: 4px; }
.finding dd { margin: 0; }
.finding dd p { margin-bottom: 6px; }
.tag { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 2px; text-transform: uppercase; letter-spacing: .6px; vertical-align: middle; }
.tag.p0 { background: var(--p0-bg); color: var(--p0); } .tag.p1 { background: var(--p1-bg); color: var(--p1); }
.tag.p2 { background: var(--p2-bg); color: var(--p2); } .tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.unk { background: #f1ecff; color: #5b3fb0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 16px 0 18px; border: 1px solid var(--rule); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-2); background: var(--paper-2); position: sticky; top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td .url { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.chg-yes { color: var(--p0); font-weight: 600; } .chg-no { color: var(--ok); font-weight: 600; } .chg-unk { color: var(--p1); font-weight: 600; }

/* ---------- charts ---------- */
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 18px 0; }
.chart-card { background: var(--card); border: 1px solid var(--rule); padding: 16px 18px 12px; }
.chart-card.wide { grid-column: 1 / -1; }
.chart-card h3 { font-size: 19px; }
.chart-card .note { font-size: 13px; color: var(--muted); margin: 2px 0 10px; }
.chart-box { position: relative; height: 260px; }
.chart-box.tall { height: 420px; }

/* ---------- callouts ---------- */
.callout { border-left: 4px solid var(--ink); background: var(--card); padding: 14px 18px; margin: 16px 0; }
.callout.warn { border-color: var(--p1); }
.callout.ok { border-color: var(--ok); }
.callout p:last-child { margin-bottom: 0; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
ul.clean { padding-left: 18px; margin: 6px 0 14px; }
ul.clean li { margin-bottom: 6px; }
pre.diff { font-family: var(--mono); font-size: 12.5px; background: var(--card); border: 1px solid var(--rule); padding: 12px 14px; overflow-x: auto; margin: 6px 0 0; white-space: pre-wrap; word-break: break-all; }
.diff .del { color: var(--p0); } .diff .add { color: var(--ok); }

/* ---------- register ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 16px 0 10px; }
.filters label { display: flex; flex-direction: column; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-2); gap: 4px; }
.filters select, .filters input {
  font: inherit; font-family: var(--body); font-size: 15px; padding: 7px 9px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); min-width: 150px; border-radius: 0;
}
.filters input { min-width: 240px; }
.filters select:focus, .filters input:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.reg-count { font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }
#register td { font-size: 14px; }
#register td.desc { min-width: 300px; }
#reg { min-width: 1080px; table-layout: fixed; }
#reg th:nth-child(1) { width: 92px; } #reg th:nth-child(2) { width: 70px; } #reg th:nth-child(3) { width: 170px; }
#reg th:nth-child(4) { width: 230px; } #reg th:nth-child(6) { width: 210px; } #reg th:nth-child(7) { width: 86px; }
#reg td.mono { white-space: nowrap; }
#reg td .url { overflow-wrap: anywhere; word-break: normal; }
#noindex-table td:nth-child(2) code { white-space: nowrap; }
.btn {
  font: inherit; font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; padding: 5px 9px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap; border-radius: 0;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--signal); border-color: var(--signal); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pager { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; font-size: 14px; }
details.row-more summary { cursor: pointer; color: var(--ink-2); font-size: 13px; }

/* ---------- downloads ---------- */
.dl-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 14px 0; border-top: 2px solid var(--ink); }
.dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); align-items: center; }
.dl b { display: block; font-family: var(--mono); font-size: 13px; font-weight: 600; word-break: break-all; }
.dl span { font-size: 14px; color: var(--ink-2); }

footer { margin-top: 40px; font-size: 13px; color: var(--muted); }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(30px); background: var(--ink); color: var(--paper); padding: 9px 16px; font-size: 14px; opacity: 0; transition: all .25s ease; pointer-events: none; z-index: 30; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .shell { background: none; }
  .rail { position: sticky; top: 0; height: auto; z-index: 20; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: 14px; min-width: 0; }
  .mark { margin: 0; flex: none; }
  .mark-text small, .rail .meta { display: none; }
  .rail nav { overflow-x: auto; min-width: 0; flex: 1 1 auto; scrollbar-width: none; }
  main { min-width: 0; }
  .rail nav ol { display: flex; gap: 4px; white-space: nowrap; }
  .rail nav a { padding: 6px 10px; border: 1px solid var(--rule); font-size: 13.5px; }
  .rail nav a::before { display: none; }
  .rail nav a.active { border-color: var(--ink); }
  main { padding: 0 22px 60px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  h2 { font-size: 30px; }
  .chart-grid, .two-col, .dl-list { grid-template-columns: 1fr; }
  .finding { grid-template-columns: 1fr; gap: 6px; }
  .finding dl { grid-template-columns: 1fr; }
  .finding dt { padding-top: 6px; }
  .metric .num { font-size: 36px; }
  .hero .metrics, .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .verdict { padding: 20px; }
  .filters input, .filters select { min-width: 0; width: 100%; }
  .filters label { flex: 1 1 140px; }
  .mark-text { display: none; }
}
