/* ============================================================
   Project Immunity — Submission (polished)
   PortSwigger brand: navy + orange, light
   ============================================================ */
:root {
  color-scheme: light;
  --navy: #1c2e7a;
  --navy-deep: #0f1a4a;
  --navy-soft: #e8ebf4;
  --navy-line: #c5cce0;

  --orange: #ff6633;
  --orange-soft: #fff0eb;
  --orange-line: #ffd4c4;

  --bg: #ffffff;
  --surface: #fafbfc;
  --surface-2: #f4f6fa;
  --border: #e3e6ee;
  --border-soft: #eef0f5;

  --ink: #0f1a4a;
  --text: #1a2348;
  --text-soft: #404a72;
  --text-muted: #6a738f;
  --text-faint: #9aa1b8;

  --pass: #2f9e6c;
  --pass-soft: #e3f5ec;
  --fail: #d94a3d;
  --fail-soft: #fbeae8;

  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 14px;

  --content-max: 920px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-padding-top: 96px;
  forced-color-adjust: none;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--orange-soft); color: var(--orange); }

/* ============================================================
   Top brand bar — PortSwigger-style
   ============================================================ */
.brandbar {
  background: var(--bg);
  border-bottom: 2px solid var(--orange);
  padding: 18px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.brandbar .left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark {
  width: 36px; height: 36px;
  background: var(--orange);
  border-radius: 6px;
  display: grid; place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 17px;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.brand-title .sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.brandbar .right {
  display: flex;
  gap: 26px;
  font-size: 14px;
  color: var(--navy);
}
.brandbar .right a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
}
.brandbar .right a:hover { color: var(--orange); }
.brandbar .doc-tag {
  background: var(--orange);
  color: #fff;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
@media (max-width: 720px) {
  .brandbar { padding: 14px 22px; }
  .brandbar .right { display: none; }
}

/* ============================================================
   Layout
   ============================================================ */
.doc {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 48px 160px;
}
@media (max-width: 720px) {
  .doc { padding: 0 22px 120px; }
}

/* Hero */
.hero {
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}
.hero .crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 24px;
}
.hero .crumb::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--orange);
}
.hero h1 {
  font-family: var(--serif);
  font-size: 64px;
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 22px;
  text-wrap: balance;
  max-width: 16ch;
}
.hero .lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 56ch;
  font-weight: 400;
}
.hero-meta {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-meta > div {
  padding: 18px 22px;
  border-right: 1px solid var(--border);
  background: var(--bg);
}
.hero-meta > div:last-child { border-right: 0; }
.hero-meta .k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.hero-meta .v {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--navy);
  font-weight: 500;
}
@media (max-width: 780px) {
  .hero h1 { font-size: 44px; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .hero-meta > div:nth-child(2) { border-right: 0; }
  .hero-meta > div:nth-child(1), .hero-meta > div:nth-child(2) { border-bottom: 1px solid var(--border); }
}
