/* FILE: public_html/assets/css/site.css */
:root {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-muted: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --brand-primary: #0b57d0;
  --brand-primary-hover: #0842a0;
  --brand-dark: #16325c;
  --border-color: #cbd5e1;
  --accent-warn-bg: #fffbeb;
  --accent-warn-border: #d97706;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  color: var(--text-main);
  background-color: var(--bg-body);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-primary); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--brand-primary-hover); }

.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus {
  position: fixed; top: .5rem; left: .5rem; width: auto; height: auto; z-index: 9999;
  padding: .75rem 1rem; background: var(--bg-surface); color: var(--text-main);
  border: 2px solid var(--brand-primary); border-radius: .375rem; font-weight: 700;
}

.container { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }

/* Header & Popover Navigation (CLS = 0, Touch Target >= 44px) */
.site-header { background: var(--bg-surface); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 100; }
.header-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .625rem; padding-top: .625rem; padding-bottom: .625rem; }
.brand-logo { display: inline-flex; align-items: center; text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .375rem;
  min-height: 2.75rem; padding: .5rem 1.125rem; border-radius: 999px;
  font-weight: 700; font-size: .9375rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .15s ease;
}
.btn-primary { background: var(--brand-primary); color: #ffffff; }
.btn-primary:hover { background: var(--brand-primary-hover); color: #ffffff; }
.btn-outline { background: var(--brand-dark); color: #ffffff; }
.btn-outline:hover { background: #0f2342; color: #ffffff; }
.btn-ghost { background: var(--bg-muted); color: var(--text-main); border-color: var(--border-color); }
.btn-ghost:hover { background: #e2e8f0; color: var(--text-main); }

.icon { flex: none; width: 1.5rem; height: 1.5rem; }
.nav-toggle {
  display: none; align-items: center; gap: .375rem; min-height: 2.75rem; padding: 0 .75rem;
  background: var(--bg-surface); color: var(--text-main); border: 1px solid var(--border-color);
  border-radius: .375rem; font: inherit; font-weight: 600; cursor: pointer;
}

.site-nav { width: 100%; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: .25rem .375rem; margin: 0; padding: .25rem 0; list-style: none; border-top: 1px solid var(--bg-muted); }
.site-nav a {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: 0 .625rem;
  color: var(--text-main); text-decoration: none; font-size: .9375rem; font-weight: 500; border-radius: .375rem;
}
.site-nav a:hover { background: var(--bg-muted); color: var(--brand-primary); }
.site-nav [aria-current="page"] { font-weight: 700; color: var(--brand-primary); background: #eff6ff; }

@media (min-width: 64rem) {
  .site-nav[popover] {
    display: block; position: static; inset: auto; width: 100%; height: auto;
    margin: 0; padding: 0; border: 0; overflow: visible; background: transparent; color: inherit;
  }
}

@media (max-width: 63.99rem) {
  @supports selector(:popover-open) {
    .nav-toggle { display: inline-flex; }
    .site-nav[popover] {
      inset: 4.25rem 0 auto 0; width: 100%; max-height: calc(100vh - 4.25rem); overflow-y: auto;
      margin: 0; padding: .75rem 1rem; border: 0; border-bottom: 2px solid var(--border-color);
      background: var(--bg-surface); box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    }
    .site-nav[popover] ul { flex-direction: column; border-top: 0; }
    .site-nav[popover] a { width: 100%; }
  }
}

/* Breadcrumb */
.breadcrumb { padding-top: .75rem; padding-bottom: .25rem; font-size: .875rem; color: var(--text-muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .375rem; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: "›"; margin-right: .375rem; color: var(--text-muted); }

/* Main Article & Portal Cards */
.main-content { padding-top: 1.25rem; padding-bottom: 2.5rem; }
.main-content > article {
  background: var(--bg-surface); border: 1px solid var(--border-color);
  border-radius: .75rem; padding: 1.25rem;
}
@media (min-width: 48rem) {
  .main-content > article { padding: 2rem 2.5rem; }
}

.article-header { border-bottom: 1px solid var(--bg-muted); padding-bottom: 1rem; margin-bottom: 1.25rem; }
h1 { font-size: clamp(1.45rem, 2.8vw, 2rem); line-height: 1.25; margin: 0 0 .5rem; color: var(--brand-dark); }
h2 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); line-height: 1.3; margin: 2rem 0 .75rem; color: var(--brand-dark); scroll-margin-top: 5rem; }
h3 { font-size: 1.1rem; line-height: 1.35; margin: 1.25rem 0 .5rem; color: var(--text-main); }
.meta-byline { margin: 0; font-size: .875rem; color: var(--text-muted); }

.portal-box {
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #bfdbfe; border-radius: .625rem; padding: 1.25rem; margin-bottom: 1.5rem;
}
.portal-lead { margin: 0 0 1rem; font-size: 1rem; }
.portal-cta-row { display: flex; flex-wrap: wrap; gap: .625rem; margin-bottom: 1rem; }
.portal-note { margin: 0; font-size: .875rem; color: var(--text-muted); }

.callout-warn {
  background: var(--accent-warn-bg); border-left: 4px solid var(--accent-warn-border);
  padding: .875rem 1rem; border-radius: .375rem; margin: 1.25rem 0;
}
.callout-warn p { margin: 0; }

/* Responsive Data Tables */
.table-wrap { width: 100%; overflow-x: auto; margin: 1rem 0 1.5rem; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 34rem; font-size: .9375rem; }
caption { text-align: left; font-weight: 700; margin-bottom: .5rem; color: var(--text-muted); font-size: .875rem; }
th, td { border: 1px solid var(--border-color); padding: .625rem .75rem; text-align: left; vertical-align: top; }
th { background: var(--bg-muted); font-weight: 700; color: var(--brand-dark); }

/* Steps, FAQ, Author Card & Related Spoke Box */
.step-cards { padding-left: 1.25rem; }
.step-cards li { margin-bottom: .75rem; }
.faq-list dt { font-weight: 700; color: var(--brand-dark); margin-top: 1rem; }
.faq-list dd { margin: .375rem 0 0 0; padding-bottom: .75rem; border-bottom: 1px dashed var(--border-color); }

.author-bio-card {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
  background: var(--bg-muted); padding: 1.25rem; border-radius: .625rem; margin-bottom: 1.5rem;
}
.author-bio-card img { border-radius: 50%; border: 3px solid var(--bg-surface); flex: none; }
.author-bio-card > div { flex: 1 1 16rem; }

.related-box {
  margin-top: 2.25rem; padding: 1.25rem; background: var(--bg-muted);
  border-radius: .625rem; border: 1px solid var(--border-color);
}
.related-box h2 { margin-top: 0; font-size: 1.15rem; }
.related-box ul { margin: 0; padding-left: 1.25rem; }
.related-box li { margin-bottom: .4rem; }

/* Footer & Status Pages */
.site-footer { background: #0f172a; color: #e2e8f0; padding: 2.25rem 0 1.5rem; margin-top: 2rem; font-size: .9375rem; }
.site-footer h2 { color: #ffffff; font-size: 1.05rem; margin: 0 0 .75rem; }
.site-footer a { color: #93c5fd; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid #334155; }
.footer-cols ul { margin: 0; padding-left: 1.125rem; }
.footer-cols li { margin-bottom: .4rem; }
.footer-bottom { padding-top: 1rem; font-size: .85rem; color: #94a3b8; }
.status-box { padding: 3rem 1rem; text-align: center; }