:root {
  --brand: #004aad;
  --brand-accent: #0ea5e9;
  --text: #0f172a;
  --muted: #64748b;
  --bg: #f8fafc;
  --white: #ffffff;
  --success: #16a34a;
  color-scheme: light dark;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; font-size: clamp(16px, 1.6vw, 18px); line-height: 1.6; }
h1, h2 { font-weight: 400; }
h3 { font-weight: 500; }
.site-header { flex-shrink: 0; }
main { flex: 1 0 auto; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.site-header { background: var(--white); border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 100; }
.site-header .brand a { color: var(--brand); font-weight: 500; text-decoration: none; font-size: 1.2rem; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { height: clamp(32px, 7vw, 58px); width: clamp(32px, 7vw, 58px); object-fit: contain; border-radius: 4px; display: inline-block; }
.brand-name { line-height: 1; }
.site-header nav a { margin-left: 16px; text-decoration: none; color: var(--text); padding: 10px 12px; border-radius: 6px; min-height: 44px; display: inline-flex; align-items: center; }
.site-header nav a:hover { background: #eef2ff; }
.site-header nav .cta { background: var(--brand); color: white; }
.site-header nav .cta:hover { background: #003a89; }
.hero { padding: 64px 0; }
.hero h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); margin: 0 0 12px; font-weight: 400;}
.hero p { color: var(--muted); margin: 0 0 24px; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.card { background: var(--white); border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px; }
.card h3 { margin-top: 0; }
.btn { display: inline-block; padding: 12px 18px; border-radius: 8px; text-decoration: none; cursor: pointer; border: none; min-height: 44px; }
.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: #003a89; }
.btn-secondary { background: var(--brand-accent); color: white; }
.btn-block { display: block; width: 100%; }
.alert { padding: 12px 14px; border-radius: 8px; margin: 12px 0; }
.alert.info { background: #e0f2fe; color: #075985; }
.alert.success { background: #dcfce7; color: #065f46; }
form .form-group { margin-bottom: 12px; }
form label { display: block; font-weight: 600; margin-bottom: 6px; }
form input[type="text"], form input[type="email"], form input[type="password"], form input[type="number"], form input[type="tel"], form select, form textarea { width: 100%; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 6px; min-height: 44px; background: var(--white); color: var(--text); }
form input:focus, form select:focus, form textarea:focus { outline: 2px solid #60a5fa; outline-offset: 1px; }
form .validation { color: #b91c1c; font-size: 0.9rem; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.small { color: var(--muted); font-size: 0.9rem; }
.site-footer { margin-top: 40px; padding: 20px 0; border-top: 1px solid #e2e8f0; background: var(--white); }
/* Media defaults */
img, video { max-width: 100%; height: auto; }
/* Accessible hide utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Grid column utilities */
.col-12 { grid-column: span 12; }
@media (min-width: 769px) {
  .md-col-4 { grid-column: span 4; }
  .md-col-5 { grid-column: span 5; }
  .md-col-6 { grid-column: span 6; }
  .md-col-7 { grid-column: span 7; }
  .md-col-8 { grid-column: span 8; }
}

/* Mobile navigation */
.nav-toggle { display: none; background: transparent; border: 0; padding: 8px; margin-left: 8px; border-radius: 6px; }
.nav-toggle:focus { outline: 2px solid #60a5fa; outline-offset: 2px; }
.nav-toggle .bar { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; }

/* Desktop nav layout */
.site-header > .container { gap: 16px; }
.site-header nav { display: flex; align-items: center; }

@media (max-width: 768px) {
  .grid { grid-template-columns: 1fr; }
  /* Collapse nav to a drawer */
  .nav-toggle { display: inline-block; }
  .site-header nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid #e2e8f0; display: none; flex-direction: column; padding: 8px 16px; }
  .site-header.open nav { display: flex; }
  .site-header nav a { margin: 4px 0; }
  /* Table horizontal scroll */
  .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table th, .table td { white-space: nowrap; }
  /* Tighten hero spacing on small screens */
  .hero { padding: 40px 0; }
}

@media (min-width: 1024px) {
  .container { max-width: 1200px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* Dark scheme variables */
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1020; --text: #e5e7eb; --white: #0f172a; --muted: #94a3b8; }
  .site-header, .site-footer { background: var(--white); }
  .site-header nav a:hover { background: rgba(255,255,255,0.06); }
}
