/* ============================================================
   TP Medical Billing × SolvaraCare — Shared Styles
   Navy #0B1120 · Blue #0066FF · Amber #EAB308
   ============================================================ */

:root {
  --navy: #0B1120;
  --navy-800: #111A33;
  --navy-700: #16224a;
  --navy-600: #1E2C5C;
  --blue: #0066FF;
  --blue-600: #0052CC;
  --blue-100: #E6F0FF;
  --amber: #EAB308;
  --amber-50: #FEF9E7;
  --ink: #1A2333;
  --body: #4B5563;
  --muted: #6B7280;
  --line: #E5E9F2;
  --bg: #F6F8FC;
  --white: #FFFFFF;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 17, 32, .06), 0 8px 24px rgba(11, 17, 32, .08);
  --shadow-lg: 0 2px 4px rgba(11, 17, 32, .08), 0 16px 48px rgba(11, 17, 32, .14);
  --font-head: 'Cabinet Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.25;
  font-weight: 700;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============ TOP BAR ============ */
.topbar {
  background: var(--navy);
  color: #9FB0D4;
  font-size: 12.5px;
  padding: 6px 0;
  letter-spacing: .04em;
}
.topbar .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.topbar a { color: #C7D2EE; }
.topbar strong { color: var(--amber); font-weight: 600; }

/* ============ HEADER ============ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--navy-600));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-family: var(--font-head);
  font-size: 18px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 17px; color: var(--navy); line-height: 1.2; }
.brand-sub { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.brand-divider {
  width: 1px; height: 34px; background: var(--line);
  margin: 0 4px;
}
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-700);
  transition: background .15s, color .15s;
}
.main-nav a:hover { background: var(--blue-100); color: var(--blue); text-decoration: none; }
.main-nav a.active {
  background: var(--navy);
  color: #fff;
}
.main-nav a.active:hover { background: var(--navy-800); color: #fff; }

/* ============ HERO (landing) ============ */
.hero {
  background:
    radial-gradient(1000px 400px at 85% -10%, rgba(0,102,255,.22), transparent 60%),
    radial-gradient(700px 350px at -10% 20%, rgba(234,179,8,.14), transparent 55%),
    var(--navy);
  color: #E6ECF9;
  padding: 88px 0 76px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--amber);
  background: rgba(234,179,8,.1);
  border: 1px solid rgba(234,179,8,.35);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  color: #fff;
  letter-spacing: -.02em;
  max-width: 900px;
  margin: 0 auto 18px;
}
.hero h1 .accent { color: var(--amber); }
.hero p.lede {
  font-size: 18px;
  color: #A9B8DA;
  max-width: 720px;
  margin: 0 auto 0;
}
.hero .meta-row {
  display: flex; justify-content: center; gap: 28px; flex-wrap: wrap;
  margin-top: 28px;
  font-size: 13.5px; color: #8FA3CC;
}
.hero .meta-row strong { color: #fff; }

/* ============ CARDS (landing) ============ */
.cards-section { padding: 56px 0 80px; }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  max-width: 960px;
  margin: 0 auto;
}
.doc-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
  position: relative;
  overflow: hidden;
}
.doc-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--amber));
}
.doc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.doc-card .card-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}
.doc-card.audit .card-icon { background: var(--blue-100); }
.doc-card.growth .card-icon { background: var(--amber-50); }
.doc-card h2 { font-size: 24px; margin-bottom: 10px; }
.doc-card p { font-size: 15px; color: var(--body); margin-bottom: 20px; flex: 1; }
.doc-card .card-tag {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  color: var(--navy-600);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px;
  margin-bottom: 16px;
  align-self: flex-start;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 10px;
  transition: background .15s;
}
.btn:hover { background: var(--blue-600); text-decoration: none; }
.btn.ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--line);
}
.btn.ghost:hover { background: var(--bg); }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ============ DOC LAYOUT ============ */
.doc-layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 44px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  align-items: start;
}

/* TOC sidebar */
.toc {
  position: sticky;
  top: 88px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.toc-title {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted);
  padding: 0 8px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.toc ol { list-style: none; }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 6px 8px;
  font-size: 13.5px;
  color: var(--navy-700);
  border-radius: 7px;
  border-left: 2px solid transparent;
}
.toc a:hover { background: var(--blue-100); color: var(--blue); text-decoration: none; }
.toc a.level-3 { padding-left: 22px; font-size: 13px; color: var(--muted); }

/* ============ DOC CONTENT ============ */
.doc-content {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 48px 56px;
  min-width: 0;
}
.doc-content h1 {
  font-size: 32px;
  letter-spacing: -.015em;
  margin-bottom: 8px;
}
.doc-content h2 {
  font-size: 24px;
  margin: 44px 0 16px;
  padding-top: 8px;
  position: relative;
}
.doc-content h2::before {
  content: '';
  display: block;
  width: 44px; height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--blue), var(--amber));
  margin-bottom: 14px;
}
.doc-content h3 { font-size: 19px; margin: 30px 0 12px; }
.doc-content h4 { font-size: 16.5px; margin: 24px 0 10px; }
.doc-content p { margin-bottom: 16px; }
.doc-content ul, .doc-content ol { margin: 0 0 18px 22px; }
.doc-content li { margin-bottom: 7px; }
.doc-content li > ul, .doc-content li > ol { margin-top: 7px; margin-bottom: 4px; }
.doc-content strong { color: var(--navy); font-weight: 650; }
.doc-content hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}
.doc-content em { color: var(--muted); }

/* Document header block inside content */
.doc-meta {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 24px;
  font-size: 14px;
}
.doc-meta .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.doc-meta .v { color: var(--navy); font-weight: 600; }

.callout {
  background: var(--amber-50);
  border: 1px solid #F2DF8A;
  border-left: 4px solid var(--amber);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 15px;
  color: #6B5408;
}
.callout.blue {
  background: var(--blue-100);
  border-color: #B9D4FF;
  border-left-color: var(--blue);
  color: #0A3D8C;
}
.callout p:last-child { margin-bottom: 0; }

/* ============ TABLES ============ */
.table-wrap { overflow-x: auto; margin: 18px 0 26px; border-radius: 10px; border: 1px solid var(--line); }
.doc-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 560px;
}
.doc-content thead th {
  background: var(--navy);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13.5px;
  text-align: left;
  padding: 12px 16px;
  white-space: nowrap;
}
.doc-content tbody td {
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink);
}
.doc-content tbody tr:nth-child(even) { background: #FAFBFE; }
.doc-content tbody tr:hover { background: var(--blue-100); }
.doc-content td strong, .doc-content th strong { color: inherit; }

/* ============ CODE ============ */
.doc-content code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
  background: var(--navy);
  color: #7DD3FC;
  padding: 2px 7px;
  border-radius: 6px;
}
.doc-content pre {
  background: var(--navy);
  border: 1px solid var(--navy-700);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 18px 0 24px;
  overflow-x: auto;
}
.doc-content pre code { background: none; padding: 0; color: #E2E8F0; font-size: 13.5px; line-height: 1.65; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--navy);
  color: #8FA3CC;
  padding: 36px 0;
  font-size: 13.5px;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer .f-brand { font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 15px; }
.site-footer a { color: #C7D2EE; }
.footer-note { max-width: 560px; font-size: 12.5px; color: #6E82AC; line-height: 1.6; }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .doc-layout { grid-template-columns: 1fr; padding-top: 24px; }
  .toc { position: static; max-height: none; }
  .doc-content { padding: 36px 28px; }
  .doc-content h1 { font-size: 27px; }
  .doc-content h2 { font-size: 21px; }
  .header-inner { flex-wrap: wrap; }
}
@media (max-width: 620px) {
  .doc-content { padding: 28px 18px; border-radius: 10px; }
  .hero { padding: 64px 0 56px; }
  .hero h1 { font-size: 30px; }
  .brand-sub { display: none; }
  .main-nav { width: 100%; justify-content: flex-start; overflow-x: auto; }
}

/* ============ PRINT ============ */
@media print {
  body { background: #fff; font-size: 12pt; }
  .topbar, .site-header, .toc, .site-footer, .btn, .print-hide { display: none !important; }
  .doc-layout { display: block; padding: 0; }
  .doc-content { border: none; box-shadow: none; padding: 0; }
  .doc-content a { color: inherit; }
  .doc-content h2 { break-after: avoid-page; }
  .doc-content table { font-size: 10.5pt; }
  .table-wrap { overflow: visible; }
  .doc-content pre { white-space: pre-wrap; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
