:root {
  --navy: #0b1f3a;
  --navy-2: #14325c;
  --saffron: #e87722;
  --green: #1f7a3a;
  --gold: #c9a227;
  --paper: #f4f1ea;
  --ink: #1c2430;
  --muted: #5b6573;
  --line: #d7d0c4;
  --white: #fff;
  --shadow: 0 10px 30px rgba(11, 31, 58, .12);
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --display: "Libre Franklin", "Segoe UI", sans-serif;
  --touch: 44px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.55; }
img { max-width: 100%; }
a { color: var(--navy-2); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #000; color: #fff; padding: 8px 12px; z-index: 20; }
.wrap { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.kicker { letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; color: var(--saffron); font-weight: 700; margin: 0 0 8px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; }
.legal-line { font-size: .92rem; color: #6a3a00; background: #fff4e5; border-left: 4px solid var(--saffron); padding: 10px 12px; }
.hint { color: var(--muted); font-size: .9rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--touch); padding: 0 16px; border-radius: 6px; border: 1px solid transparent; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--navy); }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.flash { margin: 12px 0; padding: 12px 14px; border-radius: 8px; }
.flash-success { background: #e8f6ec; }
.flash-error { background: #fdecea; }
.flash-warn { background: #fff4e5; }

.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.badge-green { background: #e5f6ea; color: #145c2a; }
.badge-yellow { background: #fff6cc; color: #6a5300; }
.badge-orange { background: #ffe4cc; color: #8a3d00; }
.badge-red { background: #fde2e0; color: #8a1510; }
.badge-blue { background: #e3eefc; color: #123a72; }
.badge-gray { background: #ececec; color: #333; }

.form { display: grid; gap: 12px; }
.form-grid { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.field em { color: #b42318; font-style: normal; }
.field input, .field select, .field textarea { min-height: var(--touch); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font: inherit; background: #fff; }
.field-full { grid-column: 1 / -1; }
.form-h { grid-column: 1 / -1; margin: 18px 0 0; }
.yn { border: 0; padding: 0; display: grid; gap: 8px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.table-wrap { overflow-x: auto; background: #fff; border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.section { padding: 28px 0 48px; }
.page-head { background: var(--navy); color: #fff; padding: 28px 0; }
.page-head a { color: #ffd7b0; }
.prose { background: #fff; padding: 22px; border-radius: 12px; }
.form-narrow { max-width: 520px; }
.faq { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; }
.stat-grid { display: grid; gap: 12px; margin: 16px 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-decoration: none; color: inherit; }
.stat span { display: block; color: var(--muted); font-size: .85rem; }
.progress-list { display: grid; gap: 8px; margin: 16px 0 24px; }
.prog { display: grid; grid-template-columns: 160px 1fr 48px; gap: 8px; align-items: center; }
.bar { height: 10px; background: #e6e0d6; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); }
.map { height: 280px; border-radius: 12px; margin-top: 12px; background: #d9e4d4; }
.map-lg { height: 520px; }
.photo-grid { display: grid; gap: 12px; }
.check { list-style: none; padding: 0; }
.cert { background: #fff; border: 8px solid var(--navy); padding: 28px; margin: 16px 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filters input, .filters select { min-height: var(--touch); padding: 8px; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.check-grid { display: grid; gap: 8px; margin: 12px 0; }
.check-item { background: #fff; padding: 12px; border-radius: 8px; min-height: var(--touch); }
.hero { background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff; padding: 36px 0 42px; }
.hero .lead { font-size: 1.05rem; max-width: 58ch; }
.hero-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 18px; }
.steps { margin: 0; padding-left: 18px; }
.cards-4 { display: grid; gap: 12px; }
.site-foot { background: #071526; color: #d7dde6; padding: 28px 0 16px; }
.site-foot a { color: #ffd7b0; }
.copy { text-align: center; opacity: .7; }
.app-pad { padding: 18px 0 48px; }
.app-user { font-size: .9rem; }

/* ===== DESKTOP ===== */
@media (min-width: 981px) {
  .nav-toggle { display: none; }
  .topbar { background: #071526; color: #d7dde6; font-size: .82rem; }
  .topbar-inner { display: flex; justify-content: space-between; padding: 8px 0; }
  .brandbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
  .logo { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--navy); }
  .logo strong { background: var(--navy); color: #fff; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 10px; }
  .nav { display: flex; gap: 16px; align-items: center; }
  .nav a { text-decoration: none; font-weight: 650; color: var(--navy); }
  .nav-cta { background: var(--saffron); color: #fff !important; padding: 8px 12px; border-radius: 6px; }
  .hero-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 28px; align-items: start; }
  .cards-4 { grid-template-columns: repeat(4, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
  .app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
  .sidenav { background: var(--navy); color: #fff; padding: 18px 12px 40px; position: sticky; top: 0; height: 100vh; overflow: auto; }
  .sidenav a { display: block; color: #e8eef7; text-decoration: none; padding: 8px 10px; border-radius: 6px; min-height: 36px; }
  .sidenav a[aria-current="page"], .sidenav a:hover { background: rgba(255,255,255,.1); }
  .logo-app { color: #fff !important; margin-bottom: 12px; }
  .nav-label { opacity: .6; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; margin: 14px 10px 4px; }
  .app-top { display: flex; justify-content: flex-end; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); }
  .sticky-actions { position: sticky; bottom: 12px; }
}

/* ===== MOBILE ===== */
@media (max-width: 980px) {
  .hide-mobile { display: none; }
  .topbar { background: #071526; color: #fff; padding: 8px 0; font-size: .78rem; }
  .brandbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; position: relative; }
  .logo { display: flex; gap: 8px; align-items: center; text-decoration: none; color: var(--navy); }
  .logo strong { background: var(--navy); color: #fff; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; }
  .logo span { font-size: .82rem; }
  .nav-toggle { min-width: var(--touch); min-height: var(--touch); border: 1px solid var(--line); background: #fff; border-radius: 8px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; z-index: 30; flex-direction: column; }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; text-decoration: none; color: var(--navy); font-weight: 700; min-height: var(--touch); }
  .hero h1 { font-size: 1.7rem; }
  .cta-row .btn { width: 100%; }
  .stat-grid, .cards-4, .photo-grid { grid-template-columns: 1fr; }
  .prog { grid-template-columns: 1fr; }
  .foot-grid { display: grid; gap: 16px; }
  .app-shell { display: block; }
  .sidenav { display: none; background: var(--navy); color: #fff; padding: 12px; }
  .sidenav.is-open { display: block; position: fixed; inset: 0; z-index: 40; overflow: auto; }
  .sidenav a { display: block; color: #fff; text-decoration: none; padding: 12px; min-height: var(--touch); }
  .app-top { display: flex; justify-content: space-between; align-items: center; padding: 10px; background: #fff; position: sticky; top: 0; z-index: 10; }
  .sticky-actions { position: sticky; bottom: 0; background: var(--paper); padding: 10px 0; }
  .table { font-size: .9rem; }
}

@media print {
  .site-head, .sidenav, .app-top, .btn, .site-foot, .nav-toggle { display: none !important; }
  .app-shell { display: block; }
  body { background: #fff; }
}

.logo-mark {
  display: grid;
  place-items: center;
  min-width: 52px;
  height: 52px;
  background: var(--navy, #0b1f3a);
  color: #fff;
  font-weight: 800;
  letter-spacing: .04em;
  border-radius: 10px;
}

.brandbar { display: flex; align-items: center; gap: 12px; }
.brandbar .logo { margin-right: auto; }
.header-emblem { margin-left: auto; flex: 0 0 auto; }
.header-emblem img { height: 72px; width: auto; max-width: 180px; object-fit: contain; display: block; }
@media (max-width: 980px) {
  .header-emblem img { height: 48px; max-width: 110px; }
}
@media (min-width: 981px) {
  .brandbar { display: flex; align-items: center; gap: 12px; }
  .brandbar .nav { margin-left: auto; }
  .brandbar .header-emblem { margin-left: 12px; }
}
