:root {
  --navy: #0a2352;
  --navy-2: #123a82;
  --blue: #1f5fd6;
  --blue-dark: #1749a8;
  --sky: #e8f0ff;
  --paper: #f4f7fd;
  --line: #d3e0f7;
  --ink: #10203c;
  --muted: #5a6b8a;
  --ok-bg: #e3f6ec;
  --ok: #0b6b3f;
  --err-bg: #fdeaea;
  --err: #a21b1b;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family:
    "Public Sans",
    system-ui,
    -apple-system,
    "Segoe UI",
    Arial,
    sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}
a {
  color: var(--blue);
}
:focus-visible {
  outline: 3px solid #8db4ff;
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 14px rgba(10, 35, 82, 0.35);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}
.seal {
  width: 44px;
  height: 44px;
  flex: none;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-text strong {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 21px;
  letter-spacing: 0.2px;
}
.brand-text small {
  color: #aac4f5;
  font-size: 12.5px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nav a {
  color: #dbe7ff;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 15px;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav a:hover,
.nav a.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.nav a.nav-btn {
  background: var(--blue);
  color: #fff;
  margin-left: 4px;
}
.nav a.nav-btn:hover {
  background: #3b79ec;
}

/* ---------- Main / hero ---------- */
.main {
  flex: 1;
}
.hero {
  background:
    radial-gradient(
      circle at 85% 20%,
      rgba(94, 150, 255, 0.35),
      transparent 45%
    ),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 56px 0 110px;
  text-align: center;
}
.hero h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  margin: 0 0 12px;
}
.hero p {
  margin: 0 auto;
  max-width: 560px;
  color: #c9dbff;
  font-size: 17px;
}
.hero.small {
  padding: 40px 0 90px;
}
.hero.small h1 {
  font-size: clamp(24px, 4vw, 32px);
}

/* ---------- Cards ---------- */
.panel-wrap {
  max-width: 560px;
  margin: -70px auto 26px;
  padding: 0 20px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 14px 40px rgba(16, 40, 92, 0.14);
}
.card h2 {
  font-family: "Source Serif 4", Georgia, serif;
  color: var(--navy);
  margin: 0 0 4px;
  font-size: 24px;
}
.card .sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Forms ---------- */
label {
  display: block;
  margin: 16px 0 6px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--navy);
}
input[type="text"],
input[type="password"],
input[type="date"],
input[type="file"] {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fbfdff;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(31, 95, 214, 0.15);
}
input[type="file"] {
  padding: 10px;
  background: var(--sky);
  border-style: dashed;
}
input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 14px;
  border: 0;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
}
button,
.btn {
  display: inline-block;
  margin-top: 22px;
  padding: 13px 22px;
  border: 0;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition:
    background 0.15s,
    transform 0.05s;
}
button:hover,
.btn:hover {
  background: var(--blue-dark);
}
button:active,
.btn:active {
  transform: translateY(1px);
}
button.full,
.btn.full {
  width: 100%;
}

/* ---------- Messages ---------- */
.msg {
  padding: 12px 14px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 500;
  margin: 18px 0 0;
}
.msg.success {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid #b5e5cc;
}
.msg.error {
  background: var(--err-bg);
  color: var(--err);
  border: 1px solid #f3c1c1;
}

/* ---------- Result ---------- */
.result {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}
.result table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
.result td {
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.result td:first-child {
  color: var(--muted);
  width: 42%;
}
.result td:last-child {
  font-weight: 600;
  color: var(--navy);
}
.verified {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ok);
  font-weight: 600;
  margin-top: 14px;
}
.verified svg {
  width: 22px;
  height: 22px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #c5d6f7;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding-top: 34px;
  padding-bottom: 28px;
  flex-wrap: wrap;
}
.footer-inner strong {
  color: #fff;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 19px;
}
.footer-inner p {
  margin: 8px 0 0;
  max-width: 380px;
  font-size: 14.5px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-links a {
  color: #c5d6f7;
  text-decoration: none;
  font-size: 15px;
}
.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 0;
  font-size: 13.5px;
  color: #93aee3;
}

@media (max-width: 600px) {
  .header-inner {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .brand-text small {
    display: none;
  }
  .card {
    padding: 22px;
  }
  .hero {
    padding: 40px 0 100px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Validation ---------- */
.field-meta{display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-top:6px}
.field-meta:has(.field-error:empty):not(:has(.counter)){display:none}
.field-error{color:var(--err); font-size:13.5px; font-weight:500}
.field-error:empty{display:none}
.counter{margin-left:auto; font-size:13px; color:var(--muted); font-variant-numeric:tabular-nums; white-space:nowrap}
.counter.ok{color:var(--ok); font-weight:600}
input.invalid{border-color:#d33!important; box-shadow:0 0 0 4px rgba(211,51,51,.12)}
