@font-face {
  font-family: Quantico;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/quantico-400.woff2") format("woff2");
}
@font-face {
  font-family: Quantico;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/quantico-700.woff2") format("woff2");
}
:root {
  --ink: #1a2836;
  --muted: #5c6b78;
  --paper: #e8eef3;
  --sheet: #f5f8fb;
  --panel: #d7e3ec;
  --rule: #c3d0db;
  --iron: #1c4e6e;
  --stamp: #b85c38;
  --line: #d0dbe3;
  --cond: Quantico, "Arial Narrow", "Avenir Next Condensed", "Segoe UI", sans-serif;
  --sans: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.5 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, .brand-name, .price, .part-price, .family-head h2 {
  font-family: var(--cond);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
::selection { background: #1c4e6e; color: #f5f8fb; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--iron);
  color: var(--sheet);
  padding: 8px 12px;
  z-index: 30;
}
.skip:focus { top: 12px; }

.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.mast {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 22px 14px;
  background: var(--sheet);
  border-bottom: 3px solid var(--iron);
}
.brand { text-decoration: none; color: inherit; }
.brand-name { display: block; font-size: 26px; line-height: 1; letter-spacing: 0.12em; }
.brand-place {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav-links { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: flex-end; }
.nav-links a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--stamp); }
.menu { display: none; }

.site-footer {
  margin-top: 48px;
  border-top: 3px solid var(--iron);
  padding: 22px 0 32px;
  color: var(--muted);
  font-size: 14px;
}
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; }
.foot strong {
  display: block;
  color: var(--ink);
  font-family: var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: start; }
.foot a { color: var(--ink); }

.landing-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 28px;
  align-items: center;
  padding: 32px 0 22px;
}
.landing-hero { max-width: 38rem; }
.landing-hero h1 {
  font-size: clamp(42px, 5vw, 64px);
  line-height: 0.9;
  margin-top: 8px;
}
.lede { margin-top: 16px; font-size: 19px; max-width: 38rem; }
.landing-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.landing-photo { margin: 0; }
.landing-photo img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--rule);
}
.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.fact-grid article, .landing-note {
  background: var(--sheet);
  border: 1px solid var(--rule);
  padding: 18px;
}
.fact-grid h2, .landing-note h2 { font-size: 22px; margin-bottom: 8px; }
.landing-note { margin-top: 18px; }
.catalog-intro { padding: 36px 0 8px; max-width: 40rem; }
.catalog-intro h1, .page-intro h1 {
  font-size: clamp(44px, 7vw, 68px);
  line-height: 0.9;
  margin-top: 6px;
}
.catalog-intro p:last-child { margin-top: 14px; max-width: 38rem; }
.kicker {
  color: var(--stamp);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.page-intro { padding: 32px 0 8px; }
.page-intro.split { display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.bench-page { padding-top: 28px; }

.bench {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: start;
  padding: 18px 0 28px;
}
.ledger { grid-column: 1; grid-row: 1; }
.spec-pane {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  overflow: auto;
}
.family-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.family-nav a {
  text-decoration: none;
  border: 1px solid var(--ink);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.family-nav a.is-on { background: var(--iron); color: var(--sheet); }
.family-head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin: 8px 0 0; }
.family-head h2 { font-size: 22px; }
.family-head p { color: var(--muted); font-size: 14px; }
.family-block + .family-block { margin-top: 22px; }
.part-list { margin-top: 8px; border-bottom: 1px solid var(--rule); }
.part-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: baseline;
  padding: 12px 10px 12px 12px;
  border-top: 1px solid var(--rule);
  text-decoration: none;
}
.part-row.is-on { background: var(--panel); box-shadow: inset 3px 0 0 var(--stamp); }
.part-name { font-weight: 700; }
.part-variant { color: var(--muted); }
.part-price { font-size: 20px; }
.empty-note { color: var(--muted); }

.spec-pane .stage, .spec-empty {
  background: var(--sheet);
  border: 1px solid var(--rule);
  padding: 16px;
}
.spec-empty { color: var(--muted); }
.product-plate { background: #121a22; padding: 10px; }
.product-buy { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; }
.product-buy h1, .product-buy h2 { font-size: clamp(32px, 4vw, 46px); line-height: 0.92; }
.variant { color: var(--muted); }
.price { color: var(--stamp); font-size: 32px; line-height: 1; }
.sku { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.summary { margin-top: 6px; }
.note { color: var(--muted); font-size: 14px; }
table.spec { width: 100%; border-collapse: collapse; margin-top: 8px; }
table.spec th, table.spec td {
  text-align: left;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
  vertical-align: top;
  font-weight: 500;
}
table.spec th { width: 42%; color: var(--muted); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }

.buy { display: flex; gap: 10px; align-items: end; margin-top: 8px; }
.qty { width: 92px; }
label.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
input, select, textarea {
  width: 100%;
  border: 1px solid #aebfcc;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  border-radius: 0;
}
textarea { min-height: 120px; resize: vertical; }
.button, .text-link {
  appearance: none;
  border: 1px solid var(--iron);
  background: var(--iron);
  color: var(--sheet);
  border-radius: 0;
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 700;
  padding: 14px 16px;
  cursor: pointer;
  display: inline-block;
  text-align: center;
}
.button.full { width: 100%; }
.button.ghost, a.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--iron);
}
.button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--stamp);
  outline-offset: 3px;
}
.button:disabled { opacity: 0.6; cursor: wait; }

.cart-layout, .check-layout, .about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr);
  gap: 28px;
  align-items: start;
  padding-bottom: 28px;
}
.line {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  align-items: center;
}
.line img { width: 88px; height: 88px; object-fit: cover; background: #121a22; }
.line h2 { font-size: 24px; }
.line h2 a { text-decoration: none; }
.line-actions { display: flex; gap: 8px; align-items: end; margin-top: 8px; }
.summary-box, .form-card {
  background: var(--sheet);
  border: 1px solid var(--rule);
  padding: 18px;
}
.summary-box { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; justify-content: space-between; gap: 12px; }
.total { font-size: 28px; padding-top: 8px; border-top: 1px solid var(--rule); font-family: var(--cond); text-transform: uppercase; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
  color: var(--ink);
}
.check input { width: auto; margin-top: 4px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.banner { padding: 12px 14px; border: 1px solid #d7a79d; background: #f6e4de; color: #6d2a22; }
.banner.ok { background: #e5f0e6; color: #1d4a32; border-color: #b7d4c0; }
.prose { max-width: 42rem; display: flex; flex-direction: column; gap: 14px; padding-bottom: 12px; }
.prose h2 { font-size: 28px; margin-top: 10px; }
.about-photo img { width: 100%; border: 1px solid var(--rule); }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-bottom: 40px; }
.order-id { font-family: var(--mono); font-size: 20px; }
.pill {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 2px 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.subhead, .messages-title { font-size: 28px; margin: 28px 0 12px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--rule); background: var(--sheet); }
table.sheet { width: 100%; border-collapse: collapse; min-width: 760px; }
table.sheet th, table.sheet td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  font-size: 14px;
}
table.sheet th { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-actions button { padding: 8px 10px; font-size: 12px; }
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0 0 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.admin-nav a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.admin-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--stamp); }
.admin-lead { margin: 0 0 18px; max-width: 42rem; }
.admin-form { max-width: 760px; margin-bottom: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.span-2 { grid-column: 1 / -1; }
.row-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.admin-form + form { margin-bottom: 48px; }
.admin-cards { display: none; list-style: none; margin: 0; padding: 0; }
.admin-card {
  display: grid;
  gap: 3px;
  padding: 14px;
  border: 1px solid var(--rule);
  border-bottom: 0;
  background: var(--sheet);
  color: inherit;
  text-decoration: none;
}
.admin-cards li:last-child .admin-card { border-bottom: 1px solid var(--rule); }
.admin-card strong { font-size: 16px; color: var(--ink); }
.admin-card .meta { color: var(--muted); font-size: 13px; }
.admin-card form { margin-top: 8px; }
.narrow { max-width: 420px; }
.note.end, .table-wrap.end, .narrow { margin-bottom: 48px; }

@media (max-width: 800px) {
  .bench, .cart-layout, .check-layout, .about-grid, .fact-grid, .landing-top { grid-template-columns: minmax(0, 1fr); }
  .landing-photo img { height: 200px; }
  .ledger, .spec-pane { grid-column: 1; position: static; max-height: none; overflow: visible; }
  .ledger { grid-row: 1; }
  .spec-pane { grid-row: 2; }
  .summary-box { position: static; }
  .nav-links { display: none; }
  .menu { display: block; position: relative; }
  .menu summary {
    list-style: none;
    cursor: pointer;
    border: 1px solid var(--ink);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .menu summary::-webkit-details-marker { display: none; }
  .nav-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    background: var(--sheet);
    border: 1px solid var(--ink);
    display: flex;
    flex-direction: column;
    z-index: 30;
  }
  .nav-panel a {
    text-decoration: none;
    padding: 12px 14px;
    border-top: 1px solid var(--rule);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .nav-panel a:first-child { border-top: 0; }
}

@media (max-width: 640px) {
  .wrap { width: min(1120px, calc(100% - 28px)); }
  .mast { padding-left: 14px; padding-right: 14px; }
  .part-row { grid-template-columns: minmax(0, 1fr) auto; }
  .part-variant { grid-column: 1; }
  .part-price { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
  .family-head { flex-direction: column; gap: 2px; }
  .line { grid-template-columns: 72px minmax(0, 1fr); }
  .line .price { grid-column: 2; }
  .buy, .line-actions, .form-grid { flex-direction: column; align-items: stretch; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .qty { width: 100%; }
  .admin-cards { display: block; margin-bottom: 48px; }
  .admin-table { display: none; }
}
