@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,500;8..60,600;8..60,700&display=swap");

:root {
  --maroon: #7b1e2e;
  --maroon-dark: #5a1522;
  --maroon-soft: #f7f0f1;
  --bg: #f7f4f2;
  --surface: #ffffff;
  --band: #f1eae7;
  --line: #e8ddd9;
  --line-strong: #d2c3bf;
  --ink: #241618;
  --ink-soft: #4a3a3d;
  --muted: #6e5c60;
  --green: #1c6b44;
  --green-ink: #145536;
  --green-bg: #eaf5ef;
  --green-line: #b9d9c6;
  --red: #8b1d1d;
  --red-bg: #fbeeee;
  --red-line: #e5bcbc;
  --amber: #7a4b00;
  --amber-bg: #fff6e4;
  --amber-line: #e5d0a0;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(36, 22, 24, 0.04), 0 8px 24px rgba(36, 22, 24, 0.04);
  --header-h: 72px;
  --page: min(1280px, calc(100% - 48px));
  --page-wide: min(1400px, calc(100% - 48px));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--maroon); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--maroon-dark); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--maroon) 55%, white); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; color: var(--ink); }
p { margin: 0; }

/* ---------- shell / header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  width: var(--page-wide);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 14px; min-width: 0;
  text-decoration: none; color: inherit;
}
a.brand:hover { color: inherit; }
.brand-logo {
  display: block;
  height: 52px;
  width: auto;
  max-width: min(240px, 42vw);
  object-fit: contain;
  flex-shrink: 0;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}
.brand-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-name span {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); line-height: 1.3;
}
.brand-title-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.nav-link {
  font-weight: 600; text-decoration: none; color: var(--ink-soft);
  padding: 8px 12px; border-radius: 999px; white-space: nowrap;
}
.nav-link:hover { background: var(--maroon-soft); color: var(--maroon); }

.page {
  width: var(--page);
  margin: 0 auto;
  padding: 28px 0 64px;
}
.page-wide {
  width: var(--page-wide);
  margin: 0 auto;
  padding: 28px 0 64px;
}

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 11px;
  border: 1.5px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--maroon); color: #fff; }
.btn-primary:hover { background: var(--maroon-dark); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--maroon); color: var(--maroon); }
.btn-danger { background: var(--surface); border-color: var(--red-line); color: var(--red); }
.btn-danger:hover { background: var(--red-bg); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 9px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 650; color: var(--ink-soft); }
.input {
  width: 100%; min-width: 0; height: 48px; padding: 0 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 11px;
}
.input::placeholder { color: #8a787c; }
.input:focus { outline: 2px solid color-mix(in srgb, var(--maroon) 45%, white); outline-offset: 1px; border-color: var(--maroon); }
select.input { padding-right: 8px; }
.input-sm { height: 40px; font-size: 15px; }
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.45; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.eyebrow {
  font-size: 12px; font-weight: 750; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--maroon);
}

.dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
.dl > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dl > div.full { grid-column: 1 / -1; }
.dl dt {
  font-size: 11px; font-weight: 750; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.dl dd { margin: 0; font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }

.chip {
  display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 750; background: var(--green-bg); color: var(--green-ink);
}
.chip.revoked { background: var(--red-bg); color: var(--red); }
.chip.superseded { background: var(--amber-bg); color: var(--amber); }
.chip.neutral { background: var(--band); color: var(--ink-soft); }

.msg { padding: 12px 14px; border-radius: 11px; font-size: 14px; }
.msg.error { background: var(--red-bg); border: 1px solid var(--red-line); color: var(--red); }
.msg.ok { background: var(--green-bg); border: 1px solid var(--green-line); color: var(--green-ink); }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}
.site-footer .inner {
  width: var(--page-wide);
  margin: 0 auto;
  padding: 18px 0 28px;
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  justify-content: space-between; align-items: center;
}

@media (max-width: 720px) {
  :root { --page: calc(100% - 32px); --page-wide: calc(100% - 32px); --header-h: 64px; }
  .site-header .inner { gap: 10px; }
  .brand-logo { height: 42px; }
  .brand-name span { font-size: 10px; max-width: 42vw; }
  .dl { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 18px; }
  .btn { min-height: 46px; }
}

@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
  .card, .banner { box-shadow: none !important; break-inside: avoid; }
}
