:root{
  --bg:#f3f5f8;
  --panel:#ffffff;
  --panel2:#f7f9fc;

  --text:#0f172a;
  --muted:#475569;

  --line:#d7dde6;

  /* patriotic palette */
  --navy:#0b2a5b;
  --navy2:#0a224a;
  --dmvBlue:#0b5cab;
  --dmvBlue2:#084a8a;
  --flagRed:#b91c1c;

  --accent: var(--dmvBlue);
  --accent2: var(--dmvBlue2);

  --good:#0f9d58;
  --bad:#d93025;
  --warn:#f9ab00;

  --shadow: 0 10px 30px rgba(15,23,42,.10);
  --radius: 16px;
  --focus: rgba(11,92,171,.20);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(11,92,171,.10), transparent 60%),
    radial-gradient(900px 420px at 85% 0%, rgba(11,42,91,.10), transparent 55%),
    var(--bg);
  color:var(--text);
}

a{ color:var(--dmvBlue); text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{ width:min(1040px, 92vw); margin:0 auto; padding:22px 0 48px; }

/* Topbar + Navbar */
.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  padding:14px 16px;
  background: linear-gradient(180deg, rgba(11,42,91,.98), rgba(10,34,74,.98));
  color:#fff;
  border:1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(2,8,23,.20);
}

.brand{ display:flex; flex-direction:column; line-height:1.15; }
.brand strong{ font-size:14px; letter-spacing:.3px; }
.brand span{ font-size:12px; color: rgba(255,255,255,.78); }

.brand-row{ display:flex; align-items:center; gap:12px; }
.brand-text{ display:flex; flex-direction:column; }

.brand-logo{
  width:46px;
  height:46px;
  border-radius: 999px;
  background: #fff;
  padding:4px;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

.nav{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }

.nav-link{
  padding:8px 10px;
  border-radius: 10px;
  color: rgba(255,255,255,.90);
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  font-weight:800;
  font-size:13px;
}

.nav-link:hover{ text-decoration:none; filter:brightness(1.05); }
.nav-link.active{
  background: linear-gradient(180deg, rgba(11,92,171,1), rgba(8,74,138,1));
  border-color: rgba(255,255,255,.20);
}

/* Cards */
.card{
  margin-top:18px;
  background: var(--panel);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.card-header{
  padding:16px 18px;
  border-bottom:1px solid var(--line);
  background: linear-gradient(180deg, var(--panel2), #fff);
}

.card-header::before{
  content:"";
  display:block;
  height:4px;
  width:100%;
  background: linear-gradient(90deg, var(--navy), var(--dmvBlue), var(--flagRed));
  border-radius: 999px;
  margin-bottom:12px;
}

.card-header h1, .card-header h2{ margin:0; font-size:18px; }
.card-header p{ margin:6px 0 0; font-size:13px; color:var(--muted); }

.card-body{ padding:18px; }

.center{ display:flex; min-height: calc(100vh - 120px); align-items:center; justify-content:center; padding:22px 0; }
.hero{ width:min(820px, 92vw); text-align:center; }

.hero h1{
  margin:0 0 10px;
  font-size:30px;
  letter-spacing:.2px;
  color: var(--navy);
}

.hero p{ margin:0 0 18px; color:var(--muted); }

/* Inputs */
.input-row{
  display:flex; gap:12px; justify-content:center; flex-wrap:wrap;
  margin-top:10px;
}

input[type="text"], input[type="password"], textarea, select{
  width:min(360px, 90vw);
  padding:12px 14px;
  border-radius: 12px;
  border:1px solid var(--line);
  background: #fff;
  color:var(--text);
  outline:none;
  box-shadow: 0 1px 0 rgba(15,23,42,.04);
}

input::placeholder, textarea::placeholder{ color: rgba(71,85,105,.75); }

input:focus, textarea:focus, select:focus{
  border-color: rgba(11,92,171,.65);
  box-shadow: 0 0 0 4px var(--focus);
}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:12px 16px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.15);
  background: linear-gradient(180deg, rgba(11,92,171,1), rgba(8,74,138,1));
  color:white;
  cursor:pointer;
  font-weight:900;
  letter-spacing:.2px;
  box-shadow: 0 10px 18px rgba(11,92,171,.20);
}

.btn:hover{ filter:brightness(1.03); }
.btn:disabled{ opacity:.6; cursor:not-allowed; }

.btn.secondary{
  border:1px solid var(--line);
  background: #fff;
  color: var(--navy);
  box-shadow: none;
}

.btn.secondary:hover{ background: rgba(11,92,171,.05); }

/* Badges */
.badge{
  display:inline-flex;
  padding:6px 10px;
  border-radius: 999px;
  font-size:12px;
  border:1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight:900;
}

.badge.good{ color: var(--good); border-color: rgba(15,157,88,.25); background: rgba(15,157,88,.06); }
.badge.bad{ color: var(--bad); border-color: rgba(217,48,37,.25); background: rgba(217,48,37,.06); }
.badge.warn{ color: var(--warn); border-color: rgba(249,171,0,.25); background: rgba(249,171,0,.08); }

/* Questions / Choices */
.grid{ display:grid; grid-template-columns: 1fr; gap:14px; }

.q{
  padding:16px;
  border:1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.q h3{ margin:0 0 10px; font-size:15px; color: var(--navy); }

.choices{ display:grid; gap:10px; }

.choice{
  display:flex; gap:10px; align-items:flex-start;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius: 12px;
  background: rgba(11,42,91,.03);
}

.choice input{ margin-top:3px; }

.small{ font-size:12px; color:var(--muted); }
.error{ color: var(--bad); font-weight:900; margin-top:10px; }
.ok{ color: var(--good); font-weight:900; margin-top:10px; }

/* Tables */
.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 14px;
  border:1px solid var(--line);
  background:#fff;
}

.table th, .table td{
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  text-align:left;
  font-size:13px;
}

.table th{
  color: var(--navy);
  background: rgba(11,42,91,.06);
  font-weight:900;
}

.table tr:hover td{ background: rgba(11,92,171,.05); }

/* Rules page */
.rules-hero{
  display:flex;
  gap:14px;
  align-items:stretch;
  justify-content:space-between;
  border:1px solid var(--line);
  border-radius: 14px;
  padding:14px;
  background: linear-gradient(180deg, rgba(11,92,171,.06), #fff);
}

.rules-hero-left h3{
  margin:0 0 8px;
  color: var(--navy);
  font-size:16px;
}

.rules-hero-left p{ margin:0; color: var(--muted); }

.rules-hero-right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:space-between;
  min-width: 220px;
}

.flag-stripe{
  width: 220px;
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--flagRed) 0 33%, #ffffff 33% 66%, var(--dmvBlue) 66% 100%);
  border:1px solid rgba(255,255,255,.35);
  box-shadow: 0 8px 18px rgba(2,8,23,.12);
}

.rules-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:14px;
  margin-top:14px;
}

.rule{
  border:1px solid var(--line);
  border-radius: 14px;
  padding:14px;
  background: #fff;
}

.rule h3{
  margin:0 0 8px;
  color: var(--navy);
  font-size:15px;
}

.rule ul{ margin:0; padding-left:18px; color: var(--muted); }
.rule li{ margin:6px 0; }

.callout{
  margin-top:14px;
  border:1px solid rgba(185,28,28,.20);
  background: rgba(185,28,28,.06);
  border-radius: 14px;
  padding:14px;
}

.callout-title{
  font-weight:900;
  color: var(--flagRed);
  margin-bottom:6px;
}

.callout-text{ color: var(--muted); }

/* Footer */
.footer{
  margin-top:20px;
  text-align:center;
  color: rgba(71,85,105,.9);
  font-size:12px;
}

/* Responsive */
@media (max-width: 920px){
  .rules-hero{ flex-direction:column; }
  .rules-hero-right{ align-items:flex-start; min-width: 0; }
}

@media (max-width: 820px){
  .rules-grid{ grid-template-columns: 1fr; }
  .nav{ justify-content:flex-start; }
}

mark.hl{
  background: rgba(249,171,0,.35);
  color: inherit;
  padding: 0 2px;
  border-radius: 6px;
}
