/* ===========================================================================
   GovExam — shared components added on the 2026-08-18 quality pass.
   Loaded after portal.css and reuses its design tokens (--navy, --line, …)
   so nothing here forks the brand palette.

   Covers: the crawlable A–Z exam index, the homepage FAQ / help blocks and
   the 404 page.
   =========================================================================== */

/* ---------- crawlable exam index ----------
   exam-directory.js owns [data-exam-list] and rewrites its innerHTML on every
   keystroke. This index therefore lives in its own container that JS never
   touches, so the full 228-page list is in the served HTML for crawlers and
   stays usable for students with JS disabled or a slow connection. */

.gx-index {
  margin: 46px 0 0;
  padding-top: 30px;
  border-top: 1px solid var(--line, #e2e8f0);
}
.gx-index > h2 { margin: 0 0 6px; font-size: 1.35rem; color: var(--navy, #0b2a4a); }
.gx-index > p { margin: 0 0 18px; color: var(--muted, #5a6b7d); font-size: .95rem; max-width: 70ch; }

.gx-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.gx-jump a {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-strong, #c5d0dc);
  background: var(--card, #ffffff); color: var(--navy, #0b2a4a); text-decoration: none;
  font-size: .86rem; font-weight: 600;
}
.gx-jump a:hover { border-color: var(--blue, #0b5fbf); background: var(--blue-soft, #eef5ff); }

.gx-cat { margin-bottom: 30px; scroll-margin-top: 80px; }
.gx-cat h3 {
  margin: 0 0 4px; font-size: 1.05rem; color: var(--navy, #0b2a4a);
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.gx-cat h3 .gx-count { font-size: .8rem; font-weight: 500; color: var(--muted, #5a6b7d); }
.gx-cat > p { margin: 0 0 12px; font-size: .88rem; color: var(--muted, #5a6b7d); }

.gx-idx-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 7px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.gx-idx-list a {
  display: block; padding: 10px 13px; border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius-sm, 10px); background: var(--card, #ffffff);
  text-decoration: none; color: var(--ink, #12233a); font-size: .9rem; font-weight: 600;
  box-shadow: var(--shadow-sm, 0 2px 8px rgba(11,42,74,.05));
}
.gx-idx-list a:hover { border-color: var(--blue, #0b5fbf); background: var(--blue-soft, #eef5ff); }
.gx-idx-list a span {
  display: block; margin-top: 3px;
  font-weight: 400; font-size: .78rem; color: var(--muted, #5a6b7d);
}

/* ---------- inline header nav for pages with a bespoke header ----------
   daily.html carries its own Tailwind-built header rather than .site-header,
   so it gets the same link set in a self-contained class instead of a second
   copy of the site header. */
.gx-inline-nav {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 2px; justify-content: flex-end;
}
.gx-inline-nav a {
  font-size: .84rem; font-weight: 600; text-decoration: none;
  color: var(--muted, #5a6b7d); padding: 5px 9px; border-radius: 6px;
  white-space: nowrap;
}
.gx-inline-nav a:hover { color: var(--navy, #0b2a4a); background: var(--soft, #f4f7fb); }
.gx-inline-nav a[aria-current="page"] { color: #fff; background: var(--saffron, #e85d04); }

@media (max-width: 720px) {
  .gx-inline-nav { justify-content: flex-start; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
}

/* ---------- FAQ accordion ---------- */
.gx-faq-list { display: grid; gap: 10px; max-width: 80ch; }
.gx-faq-list details {
  border: 1px solid var(--line, #e2e8f0); border-radius: var(--radius-sm, 10px);
  background: var(--card, #ffffff); padding: 12px 16px; box-shadow: var(--shadow-sm, 0 2px 8px rgba(11,42,74,.05));
}
.gx-faq-list summary {
  cursor: pointer; font-weight: 650; color: var(--navy, #0b2a4a); font-size: .96rem;
}
.gx-faq-list summary::marker { color: var(--saffron, #e85d04); }
.gx-faq-list p { margin: 10px 0 2px; color: var(--muted, #5a6b7d); font-size: .92rem; line-height: 1.6; }

/* ---------- "how to use this portal" steps ---------- */
.gx-steps {
  display: grid; gap: 14px; margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  list-style: none; padding: 0; counter-reset: gxstep;
}
.gx-steps li {
  counter-increment: gxstep;
  background: var(--card, #ffffff); border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius, 14px); padding: 18px 18px 20px; box-shadow: var(--shadow-sm, 0 2px 8px rgba(11,42,74,.05));
}
.gx-steps li::before {
  content: counter(gxstep);
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--saffron, #e85d04); color: #fff; font-weight: 700; font-size: .95rem;
  margin-bottom: 10px;
}
.gx-steps strong { display: block; color: var(--navy, #0b2a4a); margin-bottom: 5px; font-size: 1rem; }
.gx-steps p { margin: 0; color: var(--muted, #5a6b7d); font-size: .9rem; line-height: 1.55; }
.gx-steps a { color: var(--blue, #0b5fbf); font-weight: 600; }

/* ---------- long-form trust pages (about, privacy, terms, editorial) ---------- */
.gx-crumb-inline {
  font-size: .82rem; color: var(--muted, #5a6b7d);
  margin: 18px 0 6px;
}
.gx-crumb-inline a { color: var(--blue, #0b5fbf); text-decoration: none; }
.gx-crumb-inline a:hover { text-decoration: underline; }

.gx-prose { max-width: 74ch; margin: 0 0 60px; }
.gx-prose h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--navy, #0b2a4a); margin: 6px 0 14px; line-height: 1.2; }
.gx-prose h2 {
  font-size: 1.2rem; color: var(--navy, #0b2a4a);
  margin: 34px 0 10px; padding-top: 14px;
  border-top: 1px solid var(--line, #e2e8f0);
}
.gx-prose p { line-height: 1.7; color: var(--ink, #12233a); margin: 0 0 14px; }
.gx-prose .lede { font-size: 1.06rem; color: var(--muted, #5a6b7d); }
.gx-prose ul { padding-left: 20px; margin: 0 0 16px; }
.gx-prose li { line-height: 1.7; margin-bottom: 8px; color: var(--ink, #12233a); }
.gx-prose a { color: var(--blue, #0b5fbf); }
.gx-prose code {
  background: var(--soft, #f4f7fb); border: 1px solid var(--line, #e2e8f0);
  border-radius: 5px; padding: 1px 6px; font-size: .88em;
}
.gx-prose strong { color: var(--navy, #0b2a4a); }
.gx-updated { font-size: .84rem; color: var(--muted, #5a6b7d); margin-top: 30px; font-style: italic; }

/* Tables carry the factual claims on these pages, so they need to stay legible
   and must scroll rather than push the page sideways on a phone. */
.gx-table {
  width: 100%; border-collapse: collapse; margin: 4px 0 20px;
  font-size: .93rem; display: block; overflow-x: auto;
}
.gx-table th, .gx-table td {
  border: 1px solid var(--line, #e2e8f0); padding: 9px 12px;
  text-align: left; vertical-align: top;
}
.gx-table thead th { background: var(--soft, #f4f7fb); color: var(--navy, #0b2a4a); }
.gx-table tbody th {
  background: var(--soft, #f4f7fb); color: var(--navy, #0b2a4a);
  font-weight: 650; white-space: nowrap;
}

/* ---------- footer trust nav (every page) ---------- */
.gx-foot-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.gx-foot-nav a { font-size: .88rem; font-weight: 600; }

/* ---------- exam-page fact block ---------- */
.gx-facts { margin: 0 0 22px; }
.gx-facts table { width: 100%; border-collapse: collapse; font-size: .89rem; }
.gx-facts th, .gx-facts td {
  border: 1px solid var(--line, #e2e8f0); padding: 8px 11px; text-align: left;
}
.gx-facts th { background: var(--soft, #f4f7fb); color: var(--navy, #0b2a4a); white-space: nowrap; font-weight: 650; }

/* ---------- 404 ---------- */
.gx-404 { text-align: center; padding: 70px 20px 60px; }
.gx-404 .gx-404-code {
  font-size: 4.4rem; font-weight: 800; color: var(--navy, #0b2a4a);
  line-height: 1; margin: 0 0 6px; letter-spacing: -2px;
}
.gx-404 h1 { font-size: 1.5rem; margin: 0 0 10px; color: var(--ink, #12233a); }
.gx-404 p { color: var(--muted, #5a6b7d); max-width: 56ch; margin: 0 auto 26px; line-height: 1.6; }
.gx-404 .gx-404-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 640px) {
  .gx-idx-list { grid-template-columns: 1fr; }
  .gx-404 .gx-404-code { font-size: 3.2rem; }
}
