:root { --bg:#16212b; --card:#2b3d4d; --text:#f0f3f6; --muted:#9aa4b2; --accent:#32b5ff; --site-header-h: 60px; }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji';
  background: var(--bg); color: var(--text); }
/* Sticky footer layout: header + main + footer */
html, body { height: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; }
main.wrap { flex: 1 0 auto; width: 100%; padding-top: var(--site-header-h); }
.wrap { max-width: 980px; margin: 0 auto; padding: 4px 16px 4px; }
.wrap.small { max-width: 980px; opacity:.7; font-size: 14px; }
.site-header { background: #16212b; border-bottom: 1px solid #1c212b; position: fixed; top:0; left:0; right:0; z-index: 1000; }
.site-header .wrap,
.site-header .site-header-inner { display:flex; align-items:center; justify-content: space-between; gap:12px; padding: 6px 25px; }
.brand { color: var(--text); font-weight: 700; text-decoration: none; margin-right: 16px; display:inline-flex; align-items:center; gap:8px; }
.brand img { height: 48px; display:block; }
.nav { display:flex; flex-direction:column; align-items:flex-end; gap:2px; }
.nav-auth { line-height: 1.1; }
.nav-links { display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:flex-end; }
.nav-links a { color: #fff; text-decoration: none; font-weight: 600; transition: color .15s ease; }
.nav-links a:visited { color: #fff; }
.nav-links a:hover { color: #2563eb; text-decoration: none; }
.nav-links a.active { color: #fff; }
.nav-auth { display:flex; align-items:center; gap:8px; font-size:13px; color: var(--muted); white-space:nowrap; }
.nav-auth-status { color: var(--accent); }
.nav-signout { background:none; border:none; color: var(--muted); cursor:pointer; font: inherit; padding:0; }
.nav-signout:hover { color: var(--text); }
.nav-signout:disabled { opacity:0.65; cursor:default; }
.nav-auth-error { font-size:12px; color:#f87171; }
.card { background: var(--card); border: 1px solid #1c212b; border-radius: 8px; padding: 16px; margin: 12px 0; }
/* Normalize inner spacing: remove extra top/bottom margins from first/last child */
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.btn { display:inline-flex; align-items:center; gap:8px; padding: 8px 12px; border-radius: 6px; border:1px solid #2563eb; background:#2563eb; color:#fff; cursor:pointer; text-decoration: none; font-weight: 600; }
.btn:visited { text-decoration: none; color:#fff; }
.btn:hover { background:#1b2e55; text-decoration: none; }
.btn.primary { background:#2563eb; border-color:#2563eb; color:#fff; }
.btn.primary:hover { background:#1b2e55; }
/* Danger (destructive) button */
.btn.danger { background:#6b2b2b; border-color:#8a3838; color:#fff; }
.btn.danger:hover { background:#7b3232; }
/* Icon links row on Contact page */
.icon-row { display:flex; gap:12px; align-items:center; justify-content:center; }
.icon-link { display:inline-flex; align-items:center; justify-content:center; width:48px; height:48px; border-radius:8px; background:#2563eb; border:1px solid #2563eb; color:#fff; text-decoration:none; }
.icon-link:hover { background:#1b2e55; border-color:#1d4ed8; }
.icon-link svg { width:26px; height:26px; display:block; }
input, textarea, select { background:#0f1117; color:var(--text); border:1px solid #2a3340; border-radius:6px; padding:8px 10px; width:100%; }
label { display:block; margin: 10px 0 6px; color: var(--muted); font-size: 14px; }
.row { display:flex; gap:12px; flex-wrap: wrap; }
.row > * { flex:1; }
.row.account-summary { flex-wrap: nowrap; gap:12px; align-items:stretch; }
.row.account-summary > .card { margin:0; flex:1 1 0; min-width:0; }
@media (max-width: 720px) {
  .row.account-summary { flex-wrap: wrap; }
  .row.account-summary > .card { margin:8px 0; }
}
.muted { color: var(--muted); }
.kpi { display:flex; gap:12px; align-items:center; }
.kpi .num { font-weight:700; font-size:22px; }
/* Reduce global H1 spacing by ~50% on main site */
h1 { margin-top: 0.33em; margin-bottom: 0.33em; }
code { background:#0f1117; border:1px solid #2a3340; border-radius:12px; padding:0 4px; }
.site-footer { border-top: 1px solid #1c212b; padding: 0; margin-top: auto; }
/* Reduce inner footer padding on the wrap container */
.site-footer .wrap { padding-top: 6px; padding-bottom: 6px; }
/* Match docs footer size */
.site-footer .wrap.small { font-size: 0.75rem; text-align: right; }

/* Form layout helpers */
.radio-row { display:flex; gap:16px; align-items:center; flex-wrap: wrap; }
.inline-label { display:inline-flex; align-items:center; gap:6px; margin-right:12px; }
.checkbox-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap:8px 16px; align-items:center; }
.checkbox-grid label { display:inline-flex; align-items:center; gap:6px; }
.checkbox-grid input[type=checkbox] { inline-size:auto; }
.answer-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap:12px 16px; }
.answer-grid h4 { margin: 0 0 6px; font-size: 14px; color: var(--muted); }

/* Highlight text is emphasis only, not a link */
.highlight { color: var(--accent); text-decoration: none; cursor: default; }
.highlight:hover,
.highlight:visited,
.highlight:link,
.highlight:active,
.highlight:focus { color: var(--accent); text-decoration: none; }
/* If used on <a>, make it inert (we have a separate class for real links) */
a.highlight { pointer-events: none; }

/* Full-bleed hero banner (rendered outside .wrap) */
.full-bleed { width: 100vw; margin-left: calc(50% - 50vw); }
.hero { position: relative; height: clamp(320px, 64vh, 900px); min-height: 320px; overflow: hidden; margin: 0 0 0; z-index: 0; }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-pos, 50% 50%); display:block; }
.hero-overlay { position: absolute; inset: 0; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding: 0 16px; background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.65) 100%); z-index: 0; }
.hero-overlay h1 { margin: 0 0 12px; max-width: 980px; font-size: clamp(24px, 4vw, 44px); line-height: 1.2; hyphens: none; }
.hero-cta .btn { font-size: 18px; padding: 12px 18px; border-radius: 12px; }
@media (max-width: 720px) {
  .hero { height: clamp(380px, 56vh, 800px); min-height: 380px; }
}

/* CTA grid on home card */
.cta-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap:12px; }
@media (max-width: 900px) {
  .cta-grid { grid-template-columns: 1fr; }
}
.cta-item { display:flex; flex-direction:column; align-items:stretch; }
.cta-item .btn.soft { width:55%; justify-content:center; border-radius: 12px; padding: 10px 16px; font-size: 1.1rem; font-weight:700; margin: 0 auto; }
.cta-item p { margin: 8px 0 0; text-align:center; }

/* Reduce space between hero and first card only */
main.wrap > .card:first-child { margin-top: 6px; }
/* When a page renders a hero slot, remove main's top padding and offset the hero instead */
.has-hero main.wrap { padding-top: 0; }
.has-hero .hero { margin-top: var(--site-header-h); }
