:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbe3ee;
  --line-strong: #cbd5e1;
  --brand: #101827;
  --brand-soft: #eaf0ff;
  --accent: #2563eb;
  --success: #0f766e;
  --success-soft: #ecfdf5;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
textarea { resize: vertical; min-height: 96px; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  border-radius: 12px;
  z-index: 20;
}
.skip-link:focus { left: 8px; }

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(245, 247, 251, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.link-brand { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--brand);
  color: white;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.brand-title,
.brand-subtitle { margin: 0; }
.brand-title { font-weight: 800; font-size: 18px; }
.brand-subtitle { color: var(--muted); font-size: 13px; }
.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-left: auto;
}
.top-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-weight: 650;
  font-size: 14px;
}
.beta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  border: 1px solid #fde68a;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef3c7, #fbbf24);
  color: #78350f;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(180, 83, 9, 0.14);
}
.top-nav a {
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 12px;
}
.top-nav a:hover,
.top-nav a:focus { background: white; color: var(--ink); outline: none; }

.section { padding: 48px 0; }
.hero { padding-top: 52px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: stretch;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}
h2 { font-size: clamp(26px, 4vw, 42px); line-height: 1.08; letter-spacing: -0.04em; margin-bottom: 14px; }
h3 { font-size: 20px; margin-bottom: 10px; }
.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.75;
}
.pill,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 14px;
  color: #1d4ed8;
  background: var(--brand-soft);
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.eyebrow { background: transparent; border: none; padding: 0; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 16px;
  min-height: 46px;
  padding: 12px 18px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus { outline: 3px solid rgba(37, 99, 235, 0.25); outline-offset: 2px; }
.primary { background: var(--brand); color: white; }
.primary:hover { background: #1f2937; }
.secondary { background: white; color: var(--ink); border: 1px solid var(--line-strong); }
.ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.full { width: 100%; }

.notice-card,
.sidebar-card,
.wizard-panel,
.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.notice-card {
  padding: 28px;
  background: var(--brand);
  color: white;
}
.notice-card h2 { font-size: 28px; color: white; }
.notice-card p { color: #cbd5e1; }

.app-section { padding-top: 22px; }
.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.wizard-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}
.sidebar-card { padding: 20px; }
.sidebar-card.compact { box-shadow: none; }
.step-counter {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 0 0 12px;
}
.progress-track {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2563eb, #0f766e);
  border-radius: 999px;
  transition: width 200ms ease;
}
.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.step-list button {
  width: 100%;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 10px;
  border-radius: 14px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.step-list button:hover { background: var(--surface-2); color: var(--ink); }
.step-list button.status-empty { background: transparent; color: var(--muted); }
.step-list button.status-partial { background: var(--warn-soft); border-color: #fde68a; color: var(--warn); }
.step-list button.status-complete { background: var(--success-soft); border-color: #bbf7d0; color: var(--success); }
.step-list button.active { box-shadow: inset 0 0 0 2px var(--brand); }
.step-list button.active.status-empty { background: #eef2f7; color: var(--ink); }
.step-number {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(100, 116, 139, 0.14);
  font-size: 12px;
  font-weight: 900;
}
.step-list button.status-partial .step-number { background: #fde68a; color: #78350f; }
.step-list button.status-complete .step-number { background: #ccfbf1; color: #0f766e; }
.step-label { font-weight: 800; font-size: 13px; }
.step-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.22);
}
.step-list button.status-partial .step-status-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}
.step-list button.status-complete .step-status-dot {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.wizard-panel { padding: 28px; min-height: 620px; }
.wizard-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 22px;
}
.wizard-topbar h2 { margin: 0; }
.topbar-meta span {
  display: inline-flex;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.step-intro { color: var(--muted); max-width: 740px; margin-bottom: 22px; font-size: 16px; line-height: 1.7; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.field { display: grid; gap: 8px; }
.field.full-span { grid-column: 1 / -1; }
label, .field-label {
  font-size: 14px;
  font-weight: 800;
  color: #334155;
}
.hint { color: var(--muted); font-size: 13px; margin: 0; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: white;
  color: var(--ink);
  border-radius: 15px;
  padding: 12px 13px;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.field-error {
  display: none;
  min-height: 18px;
  margin: -2px 0 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 750;
}
.field.invalid .field-error { display: block; }
.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.10);
}
.radio-grid, .card-grid, .checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.choice-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
  padding: 16px;
  cursor: pointer;
  min-height: 122px;
}
.choice-card:hover { border-color: var(--line-strong); }
.choice-card.selected {
  border-color: var(--brand);
  background: #f1f5f9;
  box-shadow: inset 0 0 0 1px var(--brand);
}
.choice-card input { width: auto; }
.choice-card strong { font-size: 16px; }
.choice-card span { color: var(--muted); font-size: 14px; }

.inline-check,
.doc-check {
  display: flex;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 18px;
  padding: 14px;
}
.inline-check input,
.doc-check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.doc-check strong { display: block; margin-bottom: 4px; }
.doc-check span { display: block; color: var(--muted); font-size: 13px; }

.callout {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 18px;
  margin: 18px 0;
}
.callout.warn { background: var(--warn-soft); border-color: #fde68a; color: #78350f; }
.callout.success { background: var(--success-soft); border-color: #a7f3d0; color: #064e3b; }
.callout.danger { background: var(--danger-soft); border-color: #fecaca; color: #7f1d1d; }

.wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 28px;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.review-card {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 20px;
  padding: 16px;
}
.review-card h3 { font-size: 17px; margin-bottom: 12px; }
.review-list { margin: 0; padding-left: 18px; color: var(--muted); }
.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.summary-table th,
.summary-table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.summary-table th { width: 32%; color: var(--muted); }
.export-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.muted { background: #edf2f7; }
.two-column {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: center;
}
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.info-card { padding: 20px; box-shadow: none; }
.info-card strong { display: block; margin-bottom: 6px; }
.info-card span { color: var(--muted); }

.legal-page {
  max-width: 860px;
  padding: 56px 0;
}
.legal-page h1 { font-size: clamp(38px, 6vw, 64px); }
.legal-page h2 { font-size: 26px; margin-top: 32px; }
.legal-page p { color: var(--muted); line-height: 1.8; }

.site-footer {
  border-top: 1px solid var(--line);
  background: white;
  padding: 24px 0;
  color: var(--muted);
}
.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-links { display: flex; gap: 14px; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 700; }
.footer-links a:hover { color: var(--ink); }

.hidden { display: none !important; }

@media (max-width: 980px) {
  .hero-grid,
  .app-shell,
  .two-column { grid-template-columns: 1fr; }
  .wizard-sidebar { position: static; }
  .step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .container { width: min(100% - 22px, 1180px); }
  .header-grid,
  .wizard-topbar,
  .footer-grid { align-items: flex-start; flex-direction: column; }
  .top-nav { flex-wrap: wrap; }
  .section { padding: 32px 0; }
  .wizard-panel { padding: 18px; }
  .form-grid,
  .radio-grid,
  .card-grid,
  .checkbox-grid,
  .review-grid,
  .info-grid,
  .step-list { grid-template-columns: 1fr; }
  .wizard-actions { flex-direction: column; }
  .wizard-actions .button { width: 100%; }
  h1 { font-size: 42px; }
}

@media print {
  .site-header, .wizard-sidebar, .hero, .wizard-actions, .site-footer, .muted { display: none !important; }
  body { background: white; color: black; }
  .container { width: 100%; }
  .app-shell { display: block; }
  .wizard-panel { box-shadow: none; border: none; padding: 0; }
}

.firearm-list {
  display: grid;
  gap: 18px;
}

.repeat-card {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 22px;
  padding: 18px;
}

.repeat-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.repeat-card-head h3 {
  margin: 0;
}

.add-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 16px;
}

@media (max-width: 700px) {
  .repeat-card-head {
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .header-right {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }
  .beta-badge {
    min-width: auto;
    padding: 7px 11px;
  }
}


.doc-check-row {
  display: grid;
  gap: 8px;
}

.note-popup-button {
  justify-self: start;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.note-popup-button:hover,
.note-popup-button:focus {
  background: #dbeafe;
  outline: none;
}

.official-links {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.official-links a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 13px 14px;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.official-links a:hover,
.official-links a:focus {
  border-color: #bfdbfe;
  background: #eff6ff;
  outline: none;
}


.site-note-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.28);
  z-index: 1000;
}

.site-note-backdrop.open {
  display: flex;
}

.site-note-modal {
  width: min(440px, 100%);
  margin-top: 78px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  position: relative;
  border: 1px solid #bfdbfe;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
  padding: 20px 48px 20px 20px;
  animation: noteIn 160ms ease-out;
}

.site-note-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
  font-size: 18px;
}

.site-note-modal h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--ink);
}

.site-note-modal p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-note-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.site-note-close:hover,
.site-note-close:focus {
  background: #e2e8f0;
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

body.site-note-open {
  overflow: hidden;
}

@keyframes noteIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  .site-note-backdrop {
    align-items: flex-start;
    padding: 14px;
  }
  .site-note-modal {
    margin-top: 66px;
    grid-template-columns: 36px 1fr;
    padding: 18px 44px 18px 16px;
    border-radius: 20px;
  }
  .site-note-icon {
    width: 36px;
    height: 36px;
  }
}
