/* USA-Patriot shared design system. Tokens and components are documented in brand/style-guide.json.
   Every page links this file; pages add no colors, fonts or radii of their own. */
@import url("https://fonts.googleapis.com/css2?family=Spectral:wght@600;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --ink: #0b0c0d;          /* page black */
  --panel: #16181a;        /* raised black */
  --steel: #2a2d30;        /* gunmetal */
  --steel-2: #4a4f54;      /* light gunmetal */
  --line: #33373b;
  --fg: #f2f2f0;           /* off-white */
  --muted: #9da3a8;
  --paper: #f3f3f1;        /* photo backdrop, matches the studio white of the product shots */
  --display: "Spectral", Georgia, serif;
  --head: "Spectral", Georgia, serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --brushed: repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(0,0,0,.12) 0 2px, transparent 2px 7px), linear-gradient(180deg, #4a4f54, #2a2d30);
  --halftone: radial-gradient(circle, #4a4f54 1.6px, transparent 1.8px) 0 0 / 10px 10px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 84px; }
body { margin: 0; background: var(--ink); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
h2 { font-weight: 700; }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
section { padding-block: 88px; }

/* Header */
header.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(11,12,13,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: .14em; white-space: nowrap; }
.logo svg { flex: none; }
.links { display: flex; gap: 28px; margin-left: 16px; font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: 15px; }
.links a { color: var(--muted); transition: color .15s; }
.links a:hover, .links a[aria-current="page"] { color: var(--fg); }
.icons { margin-left: auto; display: flex; gap: 6px; }
.icon-btn { background: none; border: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 4px; position: relative; }
.icon-btn:hover { background: var(--steel); }
.count { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--fg); color: var(--ink); font-family: var(--mono); font-size: 11px; display: grid; place-items: center; font-weight: 500; }
.menu-btn { display: none; }
.mobile-links { display: none; }

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: 15px; padding: 15px 28px; border: 1.5px solid var(--fg); border-radius: 2px; transition: background .15s, color .15s; }
.btn-solid { background: linear-gradient(180deg, #ffffff, #c9cdd0); border-color: #c9cdd0; color: var(--ink); }
.btn-solid:hover { background: var(--brushed); color: var(--fg); border-color: #8a9096; }
.btn-ghost:hover { background: var(--fg); color: var(--ink); }
.filter { display: flex; gap: 6px; flex-wrap: wrap; }
.filter button { background: transparent; border: 1px solid var(--steel-2); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 8px 12px; }
.filter button[aria-pressed="true"] { background: var(--fg); color: var(--ink); border-color: var(--fg); }

/* Textures */
.brushed { background: var(--brushed); }
.halftone-up { position: relative; overflow: hidden; }
.halftone-up::before { content: ""; position: absolute; inset: 0; background: var(--halftone); -webkit-mask-image: linear-gradient(0deg, #000, transparent 70%); mask-image: linear-gradient(0deg, #000, transparent 70%); pointer-events: none; }
.halftone-up > .wrap { position: relative; }

/* Inner page hero */
.page-hero { position: relative; overflow: hidden; padding-block: 72px 56px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, var(--ink) 30%, var(--steel)); }
.page-hero::before { content: ""; position: absolute; inset: 0; background: var(--halftone); -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 95%); mask-image: linear-gradient(90deg, transparent 30%, #000 95%); pointer-events: none; }
.page-hero .wrap { position: relative; }
.page-hero h1 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; line-height: 1; font-size: clamp(40px, 6vw, 72px); margin-top: 14px; }
.page-hero .lead { color: var(--muted); font-size: 19px; max-width: 52ch; margin: 18px 0 0; }

/* Inner page layout: help nav + prose */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; align-items: start; }
.doc-nav { position: sticky; top: 100px; display: grid; gap: 2px; }
.doc-nav .label { margin-bottom: 10px; }
.doc-nav a { font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 15px; color: var(--muted); padding: 8px 0 8px 14px; border-left: 2px solid var(--line); transition: color .15s, border-color .15s; }
.doc-nav a:hover { color: var(--fg); }
.doc-nav a[aria-current="page"] { color: var(--fg); border-color: var(--fg); }
.prose { max-width: 68ch; min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-family: var(--head); text-transform: uppercase; letter-spacing: .03em; font-size: 26px; line-height: 1.1; margin: 56px 0 14px; padding-top: 24px; border-top: 1px solid var(--line); }
.prose h3 { font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 18px; margin: 28px 0 8px; }
.prose p, .prose li { color: #c9cdd0; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--steel-2); }
.prose a:not(.btn) { color: var(--fg); border-bottom: 1px solid var(--steel-2); transition: border-color .15s; }
.prose a:not(.btn):hover { border-color: var(--fg); }
.prose strong { color: var(--fg); font-weight: 600; }
.prose .filter { margin-bottom: 14px; }
.prose .updated { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 48px; }

/* Fact strip: the answer people came for */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: var(--panel); margin-bottom: 8px; }
.facts > div { padding: 22px 20px; border-left: 1px solid var(--line); }
.facts > div:first-child { border-left: 0; }
.facts b { display: block; font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.facts > div > span { display: block; margin-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* Table */
.spec-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); font-variant-numeric: tabular-nums; margin: 6px 0 12px; }
.spec-table th { background: var(--panel); font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 12px 16px; }
.spec-table td { padding: 13px 16px; border-top: 1px solid var(--line); color: #c9cdd0; }
.spec-table td:first-child { font-family: var(--head); font-weight: 700; color: var(--fg); letter-spacing: .04em; }
.spec-table tbody tr:hover td { background: var(--panel); }
.note { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Accordion */
details.qa { border-bottom: 1px solid var(--line); }
details.qa:first-of-type { border-top: 1px solid var(--line); }
details.qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 17px; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; font-family: var(--mono); font-weight: 400; font-size: 22px; color: var(--muted); transition: transform .15s; }
details.qa[open] summary::after { transform: rotate(45deg); color: var(--fg); }
details.qa > div { padding: 0 0 18px; }
details.qa > div p:last-child { margin-bottom: 0; }

/* Contact card */
.contact { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; padding: 28px; border: 1px solid var(--line); background: var(--brushed); margin-top: 8px; }
.contact .big { font-family: var(--display); font-weight: 700; font-size: clamp(20px, 3vw, 28px); letter-spacing: .02em; word-break: break-all; }
.contact p { margin: 6px 0 0; color: #c9cdd0; }

/* Footer */
footer { background: #070708; border-top: 1px solid var(--line); padding-block: 64px 32px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.foot-grid h4 { font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: 14px; margin: 0 0 16px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.foot-grid li a { color: var(--muted); font-size: 15px; }
.foot-grid li a:hover { color: var(--fg); }
.foot-about p { color: var(--muted); max-width: 34ch; margin: 14px 0 20px; }
.foot-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--fg); color: var(--ink); font-family: var(--head); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 12px 20px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .links { display: none; }
  .menu-btn { display: grid; }
  .mobile-links[data-open="true"] { display: grid; gap: 4px; padding: 8px 20px 20px; border-top: 1px solid var(--line); font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: 18px; }
  .mobile-links a { padding: 10px 0; }
  .foot-grid { grid-template-columns: 1fr 1fr 1fr; }
  .foot-about { grid-column: 1 / -1; }
  .doc { grid-template-columns: 1fr; gap: 32px; }
  .doc-nav { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .doc-nav .label { width: 100%; margin-bottom: 4px; }
  .doc-nav a { border: 1px solid var(--steel-2); padding: 7px 12px; font-size: 13px; }
  .doc-nav a[aria-current="page"] { background: var(--fg); color: var(--ink); border-color: var(--fg); }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  section { padding-block: 64px; }
  .page-hero { padding-block: 48px 40px; }
  .logo { font-size: 20px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts > div { border-left: 0; border-top: 1px solid var(--line); }
  .facts > div:first-child { border-top: 0; }
  .spec-table th, .spec-table td { padding: 11px 10px; }
  .contact { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
