:root {
  --emerald: #06301f;
  --emerald-light: #0b4a30;
  --gold: #c9a13b;
  --cream: #faf6ea;
  --card: #ffffff;
  --text: #17251f;
  --muted: #5a6b62;
  --border: #dcd4bd;
  --danger: #b23a2e;
  --radius: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.55;
}
h1, h2, h3, .brand-text strong, .brand-text-footer {
  font-family: Georgia, Cambria, "Times New Roman", serif;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 234, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { color: var(--emerald); font-size: 0.95rem; }
.brand-text small { color: var(--muted); font-size: 0.65rem; letter-spacing: .02em; }
.main-nav { display: flex; align-items: center; gap: 24px; font-size: 0.9rem; }
.main-nav a { color: var(--muted); transition: color .15s; }
.main-nav a:hover, .main-nav a.active { color: var(--emerald); }
@media (max-width: 640px) {
  .main-nav a:not(.btn) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 8px; cursor: pointer;
  font-weight: 600; font-size: 0.9rem;
  padding: 12px 20px;
  transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(0.98); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-primary { background: var(--emerald); color: #f4ead0; }
.btn-primary:hover { opacity: .92; }
.btn-accent { background: var(--gold); color: #221a06; }
.btn-accent:hover { opacity: .92; }
.btn-outline { background: transparent; border: 1px solid rgba(244,234,208,0.35); color: inherit; }
.btn-outline:hover { background: rgba(244,234,208,0.1); }
.btn-ghost { background: transparent; color: var(--emerald); border: 1px solid var(--border); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- Hero / gradient sections ---------- */
.emerald-gradient {
  background: linear-gradient(135deg, #06301f 0%, #0b4a30 55%, #7a5c1e 100%);
  color: #f4ead0;
}
.hero { padding: 90px 0 100px; text-align: center; }
.hero .seal { margin-bottom: 20px; }
.badge {
  display: inline-block; background: var(--gold); color: #221a06;
  font-size: 0.75rem; font-weight: 700; padding: 5px 14px; border-radius: 999px;
  margin-bottom: 18px; letter-spacing: .02em;
}
.hero h1 { font-size: 2.5rem; max-width: 760px; margin: 0 auto 20px; line-height: 1.2; }
.hero p { font-size: 1.1rem; color: rgba(244,234,208,0.85); max-width: 620px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Section layout ---------- */
section { padding: 80px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head h2 { color: var(--emerald); font-size: 2rem; margin-bottom: 10px; }
.section-head p { color: var(--muted); }
.section-alt { background: #f0ece0; }

/* ---------- Cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; position: relative; overflow: hidden;
}
.card-accent-top::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--gold);
}
.icon-circle {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(6,48,31,0.08); display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px; color: var(--emerald); font-size: 1.2rem;
}
.card h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--emerald); }
.card p { color: var(--muted); font-size: 0.92rem; margin: 0; }

.feature-row { display: flex; gap: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.feature-row .icon-circle { flex-shrink: 0; margin-bottom: 0; }
.feature-row h4 { margin: 0 0 6px; font-size: 1rem; }
.feature-row p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- CTA ---------- */
.cta-box { border-radius: 20px; padding: 60px 40px; text-align: center; max-width: 860px; margin: 0 auto; }
.cta-box h2 { font-size: 2rem; margin-bottom: 12px; }
.cta-box p { color: rgba(244,234,208,0.85); max-width: 560px; margin: 0 auto 28px; }
.cta-box a.inline-link { color: #f4ead0; text-decoration: underline; text-decoration-color: var(--gold); }
.trust-row { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin-top: 24px; font-size: 0.88rem; color: rgba(244,234,208,0.75); }
.trust-row span { display: flex; align-items: center; gap: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: linear-gradient(135deg, #06301f, #0b4a30); color: rgba(244,234,208,0.75); margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 48px 24px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-heading { color: var(--gold); font-weight: 700; font-size: 0.85rem; margin-bottom: 8px; }
.footer-grid p { font-size: 0.88rem; margin: 0; }
.brand-text-footer { color: var(--gold); font-weight: 700; }
.knot-divider {
  height: 8px; opacity: .35;
  background-image: radial-gradient(circle at 8px 8px, #c9a13b 1.5px, transparent 1.6px);
  background-size: 16px 16px;
}
.footer-copy { text-align: center; font-size: 0.78rem; padding: 16px 24px; color: rgba(244,234,208,0.6); }

/* ---------- Search tool page ---------- */
.tool-hero { padding: 56px 0; text-align: center; }
.tool-hero h1 { font-size: 2rem; margin-bottom: 10px; }
.tool-hero p { color: rgba(244,234,208,0.85); }

.tool-wrap { max-width: 880px; margin: 0 auto; padding: 40px 24px; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 28px; }
.form-row { margin-bottom: 18px; }
.form-row label { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.form-row input, .form-row select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.92rem; background: #fff; color: var(--text);
}
.form-row .hint { font-size: 0.78rem; color: var(--muted); margin-top: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.saved-searches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f0ece0; border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px; font-size: 0.82rem; cursor: pointer;
}
.chip:hover { background: #e6e0cc; }
.chip .chip-remove { color: var(--danger); font-weight: 700; margin-left: 4px; }

.result-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.result-card .result-title { color: var(--emerald); font-weight: 700; margin: 0 0 4px; }
.result-card .result-agency { color: var(--muted); font-size: 0.88rem; margin: 0 0 10px; }
.result-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.78rem; color: var(--muted); margin-bottom: 10px; }
.result-link { color: var(--emerald); font-weight: 600; font-size: 0.88rem; }
.badge-outline {
  display: inline-block; border: 1px solid var(--border); border-radius: 999px;
  padding: 2px 10px; font-size: 0.72rem; color: var(--muted);
}
.alert-box {
  border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; font-size: 0.9rem;
  border: 1px solid; display: none;
}
.alert-error { background: #fbe9e7; border-color: #e6b3ab; color: #7a2a1f; }
.alert-info { background: #eaf3ee; border-color: #b9d9c7; color: var(--emerald); }
.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.5); border-top-color: #fff;
  border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Nav course-progress badge ---------- */
.nav-progress-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f0ece0; border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 12px; font-size: 0.78rem; font-weight: 600; color: var(--emerald) !important;
}
.nav-progress-badge:hover { background: #e6e0cc; }
.nav-progress-badge .badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold); display: inline-block;
}
@media (max-width: 640px) {
  .nav-progress-badge { display: none !important; }
}

/* ---------- Nav badge first-appearance animation ---------- */
@keyframes govconBadgePop {
  0%   { transform: scale(0.3); opacity: 0; }
  55%  { transform: scale(1.2); opacity: 1; }
  75%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}
.nav-progress-badge.badge-pop {
  animation: govconBadgePop 0.6s cubic-bezier(.34,1.56,.64,1);
}
