/* ============================================================
   VitalRecordsHub.com — Main Stylesheet
   Aesthetic: Authoritative Editorial / Government-Adjacent Trust
   Fonts: Playfair Display (headings) + Source Serif 4 (body)
   Colors: Deep Navy + Warm Ivory + Amber Accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- CSS Variables ---- */
:root {
  --navy:       #0f1e35;
  --navy-mid:   #1a3257;
  --navy-light: #2a4a7a;
  --ivory:      #faf7f2;
  --ivory-dark: #f0ebe2;
  --amber:      #c8862a;
  --amber-light:#e0a84a;
  --slate:      #4a5568;
  --slate-light:#718096;
  --white:      #ffffff;
  --red-warn:   #c0392b;
  --green-ok:   #27674a;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-mono:    'JetBrains Mono', monospace;

  --max-width: 1080px;
  --content-width: 740px;
  --radius: 4px;
  --shadow: 0 2px 12px rgba(15,30,53,0.10);
  --shadow-strong: 0 4px 24px rgba(15,30,53,0.18);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 17px; }
body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--navy);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-mid); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--amber); }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.4rem; }

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--navy);
}
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; margin-bottom: 1rem; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; margin: 2.5rem 0 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin: 2rem 0 0.75rem; }
h4 { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
p  { margin-bottom: 1.25rem; }
strong { font-weight: 600; }
em { font-style: italic; }
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--ivory-dark);
  padding: 0.15em 0.45em;
  border-radius: 3px;
  border: 1px solid #ddd;
}
blockquote {
  border-left: 4px solid var(--amber);
  padding: 1rem 1.5rem;
  background: var(--ivory-dark);
  margin: 2rem 0;
  font-style: italic;
  color: var(--slate);
}

/* ---- Header ---- */
.site-header {
  background: var(--navy);
  color: var(--ivory);
  border-bottom: 3px solid var(--amber);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ivory);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-logo span { color: var(--amber); }
.site-nav { display: flex; gap: 0.25rem; align-items: center; }
.site-nav a {
  color: rgba(250,247,242,0.82);
  text-decoration: none;
  font-size: 0.88rem;
  font-family: var(--font-body);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  transition: all 0.18s;
  letter-spacing: 0.01em;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--ivory);
  background: rgba(200,134,42,0.22);
}
.nav-cta {
  background: var(--amber) !important;
  color: var(--navy) !important;
  font-weight: 600 !important;
  padding: 0.5rem 1rem !important;
}
.nav-cta:hover { background: var(--amber-light) !important; }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ivory); margin: 5px 0; transition: 0.2s; }

/* ---- Breadcrumb ---- */
.breadcrumb {
  background: var(--navy-mid);
  padding: 0.6rem 0;
  font-size: 0.82rem;
}
.breadcrumb-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  color: rgba(250,247,242,0.65);
}
.breadcrumb a { color: rgba(250,247,242,0.75); text-decoration: none; }
.breadcrumb a:hover { color: var(--amber-light); }
.breadcrumb .sep { margin: 0 0.5rem; }

/* ---- Hero ---- */
.hero {
  background: var(--navy);
  background-image:
    radial-gradient(ellipse at 70% 50%, rgba(42,74,122,0.6) 0%, transparent 65%),
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(255,255,255,0.015) 40px, rgba(255,255,255,0.015) 41px),
    repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(255,255,255,0.015) 60px, rgba(255,255,255,0.015) 61px);
  color: var(--ivory);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
}
.hero h1 { color: var(--ivory); max-width: 800px; margin: 0 auto 1.25rem; }
.hero .subtitle {
  font-size: 1.15rem;
  color: rgba(250,247,242,0.80);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}
.hero-badges {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(200,134,42,0.18);
  border: 1px solid rgba(200,134,42,0.4);
  color: var(--amber-light);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.content-wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  align-items: start;
}
@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ---- Sidebar ---- */
.sidebar { position: sticky; top: 2rem; }
.sidebar-box {
  background: var(--white);
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.sidebar-box h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 1rem;
  margin-top: 0;
  border-bottom: 1px solid var(--ivory-dark);
  padding-bottom: 0.5rem;
}
.sidebar-box ul { list-style: none; padding: 0; }
.sidebar-box ul li { margin-bottom: 0.5rem; }
.sidebar-box ul li a {
  font-size: 0.9rem;
  color: var(--navy-mid);
  text-decoration: none;
}
.sidebar-box ul li a:hover { color: var(--amber); text-decoration: underline; }

/* ---- Cards Grid ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.card {
  background: var(--white);
  border: 1px solid #dde0e6;
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s, box-shadow 0.18s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
  border-color: var(--amber);
  text-decoration: none;
  color: inherit;
}
.card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}
.card h3 { font-size: 1.1rem; margin: 0 0 0.6rem; }
.card p  { font-size: 0.9rem; color: var(--slate); margin: 0; }

/* ---- Alert / Info Boxes ---- */
.alert {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
  align-items: flex-start;
}
.alert-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1.4; }
.alert-info    { background: #e8f0fe; border-left: 4px solid #4285f4; }
.alert-warning { background: #fff8e1; border-left: 4px solid var(--amber); }
.alert-success { background: #e6f4ea; border-left: 4px solid var(--green-ok); }
.alert-danger  { background: #fce8e6; border-left: 4px solid var(--red-warn); }
.alert p { margin: 0; font-size: 0.95rem; }

/* ---- Step List ---- */
.steps { list-style: none; padding: 0; counter-reset: steps; margin: 2rem 0; }
.steps li {
  counter-increment: steps;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--ivory-dark);
}
.steps li:last-child { border-bottom: none; }
.steps li::before {
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  background: var(--navy);
  color: var(--ivory);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.2rem;
}
.steps li strong { display: block; margin-bottom: 0.25rem; font-size: 1.02rem; }
.steps li p { margin: 0; color: var(--slate); font-size: 0.95rem; }

/* ---- FAQ ---- */
.faq-section { margin: 3rem 0; }
.faq-section h2 { border-bottom: 2px solid var(--amber); padding-bottom: 0.5rem; display: inline-block; }
.faq-item { border: 1px solid #dde0e6; border-radius: var(--radius); margin-bottom: 0.75rem; overflow: hidden; }
.faq-q {
  width: 100%;
  background: var(--white);
  border: none;
  cursor: pointer;
  padding: 1.1rem 1.5rem;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.15s;
}
.faq-q:hover { background: var(--ivory-dark); }
.faq-q .faq-arrow { font-size: 1.2rem; transition: transform 0.2s; flex-shrink: 0; color: var(--amber); }
.faq-q[aria-expanded="true"] .faq-arrow { transform: rotate(180deg); }
.faq-a {
  display: none;
  padding: 0 1.5rem 1.25rem;
  background: var(--white);
  font-size: 0.97rem;
  color: var(--slate);
  border-top: 1px solid var(--ivory-dark);
}
.faq-a.open { display: block; }
.faq-a p:last-child { margin-bottom: 0; }

/* ---- Data Table ---- */
.data-table-wrap { overflow-x: auto; margin: 2rem 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
thead {
  background: var(--navy);
  color: var(--ivory);
}
thead th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.02em;
}
tbody td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--ivory-dark);
  vertical-align: top;
}
tbody tr:nth-child(even) { background: var(--ivory); }
tbody tr:hover { background: #f0ebd7; }
.tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.tag-fast { background: #e6f4ea; color: var(--green-ok); }
.tag-slow { background: #fce8e6; color: var(--red-warn); }
.tag-med  { background: #fff8e1; color: #7a5a00; }

/* ---- CTA Banner ---- */
.cta-banner {
  background: var(--navy);
  background-image: linear-gradient(135deg, var(--navy) 60%, var(--navy-light));
  color: var(--ivory);
  padding: 3rem 2rem;
  text-align: center;
  border-radius: var(--radius);
  margin: 3rem 0;
  border: 1px solid rgba(200,134,42,0.3);
}
.cta-banner h2 { color: var(--ivory); margin-top: 0; }
.cta-banner p { color: rgba(250,247,242,0.8); margin-bottom: 1.75rem; }
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--amber);
  color: var(--navy);
  border-color: var(--amber);
}
.btn-primary:hover { background: var(--amber-light); border-color: var(--amber-light); color: var(--navy); text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--ivory);
  border-color: rgba(250,247,242,0.4);
}
.btn-outline:hover { border-color: var(--amber); color: var(--amber); text-decoration: none; }

/* ---- Related Articles ---- */
.related-articles { margin: 3rem 0; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.related-card {
  border: 1px solid #dde0e6;
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  display: block;
  transition: border-color 0.18s, transform 0.18s;
}
.related-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
  text-decoration: none;
}
.related-card .rc-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 0.4rem;
  font-family: var(--font-body);
}
.related-card .rc-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--navy);
  line-height: 1.4;
}

/* ---- Disclaimer ---- */
.disclaimer {
  background: var(--ivory-dark);
  border: 1px solid #ccc;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
  color: var(--slate);
  margin: 3rem 0 1rem;
}
.disclaimer strong { color: var(--navy); }

/* ---- Footer ---- */
.site-footer {
  background: var(--navy);
  color: rgba(250,247,242,0.65);
  padding: 4rem 1.5rem 2rem;
  margin-top: 5rem;
  border-top: 3px solid var(--amber);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}
@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.footer-brand .site-logo { font-size: 1.1rem; margin-bottom: 0.75rem; display: block; }
.footer-brand p { font-size: 0.88rem; line-height: 1.65; max-width: 280px; }
.footer-col h5 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  margin-bottom: 1rem;
  margin-top: 0;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a {
  color: rgba(250,247,242,0.65);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s;
}
.footer-col ul li a:hover { color: var(--amber-light); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
}
.footer-bottom a { color: rgba(250,247,242,0.55); text-decoration: none; }
.footer-bottom a:hover { color: var(--amber-light); }

/* ---- Highlight Box ---- */
.highlight-box {
  background: var(--ivory-dark);
  border: 1px solid #c8b89a;
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
}
.highlight-box h4 { margin-top: 0; color: var(--amber); font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.07em; }

/* ---- State Info Box ---- */
.state-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 600px) { .state-info-grid { grid-template-columns: 1fr 1fr; } }
.state-info-cell {
  background: var(--white);
  border: 1px solid #dde0e6;
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.state-info-cell .sic-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--slate-light); margin-bottom: 0.25rem; }
.state-info-cell .sic-value { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--navy); }
.state-info-cell .sic-sub { font-size: 0.8rem; color: var(--slate); margin-top: 0.2rem; }

/* ---- Tool Page ---- */
.tool-container {
  background: var(--white);
  border: 1px solid #dde0e6;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin: 2rem 0;
}
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.form-group select,
.form-group input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.97rem;
  color: var(--navy);
  background: var(--ivory);
  transition: border-color 0.15s;
}
.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(200,134,42,0.15);
}
.checklist-output {
  background: var(--ivory);
  border: 2px dashed var(--amber);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 2rem;
  display: none;
}
.checklist-output.visible { display: block; }
.checklist-output h3 { color: var(--navy); margin-top: 0; }
.checklist-output ul { list-style: none; padding: 0; }
.checklist-output ul li {
  padding: 0.6rem 0;
  border-bottom: 1px solid #ddd;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
}
.checklist-output ul li::before {
  content: '☐';
  font-size: 1.1rem;
  color: var(--amber);
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.checklist-meta {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
}
.checklist-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 0.75rem; }
.cm-item { font-size: 0.9rem; }
.cm-item strong { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--slate-light); margin-bottom: 0.1rem; }

/* ---- Print ---- */
@media print {
  .site-header, .site-footer, .breadcrumb, .sidebar, .related-articles, .cta-banner { display: none !important; }
  body { font-size: 12pt; }
  .two-col { grid-template-columns: 1fr; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 10pt; }
}

/* ---- Responsive ---- */
@media (max-width: 680px) {
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--navy);
    padding: 1rem 1.5rem;
    z-index: 100;
    gap: 0;
    border-bottom: 2px solid var(--amber);
  }
  .nav-toggle { display: block; }
  .header-inner { position: relative; }
  .hero { padding: 3rem 1.5rem 2.5rem; }
  .content-wrap { padding: 2rem 1.25rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .state-info-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero h1  { animation: fadeUp 0.5s ease both; }
.hero .subtitle { animation: fadeUp 0.5s 0.12s ease both; }
.hero .hero-badges { animation: fadeUp 0.5s 0.22s ease both; }

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-amber { color: var(--amber); }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ---- Analytics placeholder ---- */
/* GA4, GSC, AdSense, Clarity placeholders are in each page <head>, commented out */
