:root {
  --brand: #0b4f8a;
  --brand-dark: #083a66;
  --accent: #e8f1fa;
  --text: #1d2733;
  --muted: #5b6876;
  --line: #d9e1ea;
  --bg: #f6f8fb;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px; line-height: 1.6; color: var(--text); background: var(--bg);
}
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .95em; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--line); padding: .45em .6em; text-align: left; vertical-align: top; }
th { background: var(--accent); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { background: var(--brand); color: #fff; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 16px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { color: #fff; text-decoration: none; display: flex; flex-direction: column; line-height: 1.2; }
.brand:hover { color: #fff; }
.brand-name { font-weight: 700; font-size: 1.15rem; }
.brand-sub { font-size: .9rem; opacity: .85; }
.search { display: flex; flex: 1 1 320px; max-width: 460px; }
.search input { flex: 1; min-width: 0; padding: .55em .8em; font-size: 1rem; border: 1px solid var(--line); border-radius: 8px 0 0 8px; }
.search button { padding: .55em 1em; font-size: 1rem; border: 0; background: var(--brand-dark); color: #fff; border-radius: 0 8px 8px 0; cursor: pointer; }
.site-header .search button { background: #062b4c; }
.main-nav ul { list-style: none; margin: 0; padding: 0 0 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.main-nav a { color: #fff; text-decoration: none; padding: .3em .8em; border-radius: 999px; display: inline-block; }
.main-nav a:hover, .main-nav a[aria-current] { background: rgba(255,255,255,.18); }

/* Layout */
main.wrap { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }
h1 { font-size: 1.9rem; line-height: 1.25; margin: .2em 0 .6em; }
h2 { font-size: 1.3rem; }
.crumbs ol { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin: 0 .5em; }
.crumbs a { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-bottom: 24px; }
.card, .panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card h2 { margin-top: 0; font-size: 1.2rem; }
.card h2 a { text-decoration: none; }
.topic-list, .q-list { list-style: none; padding: 0; margin: 0; }
.topic-list li, .q-list li { padding: .35em 0; border-bottom: 1px solid #eef2f6; }
.topic-list li:last-child, .q-list li:last-child { border-bottom: 0; }
.count { float: right; color: var(--muted); font-size: .85em; background: var(--accent); border-radius: 999px; padding: 0 .6em; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel h2 { margin-top: 0; }
.section-title { margin-top: 1.6em; }

/* Hero */
.hero { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 24px; text-align: center; }
.hero h1 { margin-top: 0; }
.hero p { color: var(--muted); margin-top: 0; }
.search-hero { margin: 16px auto 0; max-width: 560px; }
.search-hero button { background: var(--brand); }

/* Q&A */
.topic-intro { background: #fff; border-left: 4px solid var(--brand); padding: 4px 18px; border-radius: 6px; margin-bottom: 18px; }
.qa { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.qa summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; position: relative; padding-right: 44px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; position: absolute; right: 18px; top: 10px; font-size: 1.4em; color: var(--brand); }
.qa[open] summary::after { content: "–"; }
.qa .answer { padding: 0 18px 12px; border-top: 1px solid #eef2f6; }
.permalink { font-size: .85rem; }
.answer-page { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 18px; }
.updated { color: var(--muted); font-size: .85rem; margin-top: 2em; }

/* Search results */
.result { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.result h2 { font-size: 1.1rem; margin: 0 0 .2em; }
.result .where { color: var(--muted); font-size: .85rem; }
.result p { margin: .3em 0 0; }
mark { background: #fff2a8; }

/* Footer */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 24px 0 12px; font-size: .95rem; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 28px; }
.copyright { color: var(--muted); font-size: .85rem; margin-top: 16px; }

@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
  .footer-links { columns: 1; }
  h1 { font-size: 1.55rem; }
  .answer-page { padding: 16px; }
}
@media print {
  .site-header, .site-footer, .crumbs, .permalink, aside { display: none; }
  body { background: #fff; }
}
