/* UHL Consulting LLC — styles carried over from the original single-page site,
   adapted for separate pages. No external fonts or icon libraries. */

:root {
  --primary-color: #0d253f; /* UHL Navy */
  --primary-hover: #1a3c5e;
  --bg-color: #f4f4f4;
  --text-color: #333;
  --muted: #666;
  --ok: #1e7b34;
  --ok-bg: #eaf6ec;
  --caution: #8a5a00;
  --caution-bg: #fff4dc;
  --stop: #b02a37;
  --stop-bg: #fdecee;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
  background-color: var(--bg-color); color: var(--text-color); line-height: 1.5;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid #4d90fe; outline-offset: 2px; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 12px; z-index: 2000; }
.skip-link:focus { left: 8px; }

/* --- Header & navigation --- */
.site-header {
  background: #fff; padding: 15px 40px; display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000;
}
.nav-logo { display: flex; align-items: center; }
.header-logo-svg { width: 160px; height: auto; display: block; }
.header-logo-svg path { fill: var(--primary-color); }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px 30px; list-style: none; }
.nav-links a { text-decoration: none; color: #555; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--primary-color); font-weight: 700; }

/* --- Main --- */
main { flex: 1; width: 100%; }
.page { padding: 60px 20px; max-width: 1200px; margin: 0 auto; animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .page { animation: none; } }

.page-title { text-align: center; margin-bottom: 50px; color: var(--primary-color); }
.page-title h1 { font-size: 2.5rem; margin-bottom: 10px; line-height: 1.2; }
.page-title p { color: var(--muted); max-width: 600px; margin: 0 auto; }

/* --- Home & services --- */
.hero-box { text-align: center; padding: 80px 20px; background: white; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.hero-box h1 { font-size: 48px; color: var(--primary-color); margin-bottom: 20px; line-height: 1.15; }
.hero-box h2 { font-size: 28px; color: var(--primary-color); margin-bottom: 20px; }
.hero-box p { font-size: 20px; color: var(--muted); margin-bottom: 30px; }
.hero-box.text-left { text-align: left; padding: 50px; }
.hero-box.text-left p { font-size: 16px; margin-bottom: 0; }
.spaced { margin-top: 30px; }
.services-grid.spaced { margin-top: 50px; }
.cta-btn { display: inline-block; padding: 15px 30px; background-color: var(--primary-color); color: white; border-radius: 5px; font-weight: bold; text-decoration: none; transition: background 0.3s; }
.cta-btn:hover { background-color: var(--primary-hover); }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.service-card {
  display: block; background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: transform 0.3s; border-top: 4px solid var(--primary-color); text-decoration: none;
}
a.service-card:hover { transform: translateY(-5px); }
.service-icon { width: 40px; height: 40px; color: var(--primary-color); margin-bottom: 20px; display: block; }
.service-card h2 { margin-bottom: 15px; color: var(--primary-color); font-size: 1.2rem; }
.service-card p { color: var(--muted); line-height: 1.6; }

.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.value-box { background: #f9f9f9; padding: 20px; border-left: 4px solid var(--primary-color); }
.value-box h3 { color: var(--primary-color); margin-bottom: 10px; font-size: 1rem; }
.value-box p { font-size: 14px; color: var(--muted); }

/* --- Contact --- */
.contact-container { display: flex; flex-wrap: wrap; gap: 40px; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.contact-form { flex: 2; padding: 50px; min-width: 300px; }
.contact-form h2 { color: var(--primary-color); margin-bottom: 20px; }
.contact-info-panel { flex: 1; background: var(--primary-color); color: #fff; padding: 50px; min-width: 250px; }
.contact-info-panel h2 { margin-bottom: 20px; font-size: 22px; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 10px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #555; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 16px; background-color: #f9f9f9; }
.form-group textarea { height: 150px; resize: vertical; }
.submit-btn { background-color: var(--primary-color); color: white; border: none; padding: 12px 30px; font-size: 16px; border-radius: 4px; cursor: pointer; transition: background 0.3s; }
.submit-btn:hover { background-color: var(--primary-hover); }
.form-note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.form-error { color: var(--stop); background: var(--stop-bg); border-radius: 6px; padding: 10px 12px; margin-top: 15px; font-size: 14px; }
.info-item { margin-bottom: 25px; display: flex; align-items: flex-start; gap: 15px; }
.info-item .icon { width: 22px; height: 22px; flex-shrink: 0; margin-top: 3px; color: #aab6c2; }
.info-item p { line-height: 1.6; color: #e0e0e0; }
.info-item a { color: #e0e0e0; }
.info-item a:hover { color: #fff; }

/* --- Legal --- */
.legal-content { background: #fff; padding: 60px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.legal-content h2 { color: var(--primary-color); margin-top: 30px; margin-bottom: 15px; font-size: 24px; border-bottom: 2px solid #f0f2f5; padding-bottom: 10px; }
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content p, .legal-content ul { color: #555; line-height: 1.8; margin-bottom: 20px; font-size: 16px; }
.legal-content ul { padding-left: 20px; }
.legal-content li { margin-bottom: 10px; }

/* --- Clinical tools --- */
.dosing-container { max-width: 900px; margin: 0 auto; background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.calc-nav { margin-bottom: 25px; }
.calc-nav-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; background: #f0f2f5; border-radius: 12px; padding: 8px; list-style: none; }
.calc-nav-item { display: block; padding: 10px 20px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; transition: all 0.2s; }
.calc-nav-item:hover { color: var(--primary-color); background-color: rgba(13, 37, 63, 0.05); }
.calc-nav-item[aria-current="page"] { background: white; color: var(--primary-color); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

.hcp-banner, .risk-notice { font-size: 14px; border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.hcp-banner { background: #eef4ff; color: #22324a; }
.risk-notice { background: var(--caution-bg); color: #5c3d00; }
.risk-notice a { color: inherit; }

.tool-list { list-style: none; display: grid; gap: 12px; }
.tool-card { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid #e3e6ea; border-radius: 10px; text-decoration: none; transition: border-color 0.2s, box-shadow 0.2s; }
.tool-card:hover { border-color: var(--primary-color); box-shadow: 0 2px 8px rgba(13,37,63,0.08); }
.tool-name { font-weight: 700; color: var(--primary-color); }
.tool-summary { color: var(--muted); font-size: 14px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #f0f2f5; color: #444; }

.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.dosing-label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; margin-top: 15px; }
.input-wrapper { display: flex; }
.calc-input, .calc-select { width: 100%; height: 50px; background: #f9f9f9; border: 1px solid #c9ccd1; border-radius: 8px; padding: 0 12px; font-size: 16px; color: #000; }
.input-wrapper .calc-input { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: none; }
.input-wrapper .calc-select.unit { width: 100px; flex-shrink: 0; background: #ececec; border-top-left-radius: 0; border-bottom-left-radius: 0; font-weight: 600; color: var(--primary-color); }
.help { font-size: 12px; color: #777; margin-top: 4px; }

.btn-group { display: flex; gap: 10px; margin-top: 25px; }
.action-btn { flex: 1; height: 50px; border-radius: 8px; border: none; font-size: 16px; font-weight: 700; cursor: pointer; transition: background 0.2s; }
.btn-calc { background-color: var(--primary-color); color: white; }
.btn-calc:hover { background-color: var(--primary-hover); }
.btn-reset { background-color: #e9e9e9; color: #333; }
.btn-reset:hover { background-color: #dcdcdc; }

.result-box { margin-top: 25px; background: #f8f9fa; border: 1px solid #e9ecef; border-left-width: 6px; border-radius: 12px; padding: 20px; }
.result-box.level-ok { border-left-color: var(--ok); }
.result-box.level-caution { border-left-color: #d99a00; }
.result-box.level-stop { border-left-color: var(--stop); background: var(--stop-bg); }
.result-heading { font-size: 17px; color: var(--primary-color); margin-bottom: 10px; }
.result-box.level-stop .result-heading { color: var(--stop); }
.label-table { margin-top: 18px; overflow-x: auto; }
.label-table table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; border-radius: 8px; overflow: hidden; }
.label-table caption { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding-bottom: 6px; }
.label-table th, .label-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e6e8eb; vertical-align: top; }
.label-table thead th { font-size: 12px; text-transform: uppercase; color: var(--muted); background: #f4f6f8; }
.label-table tbody th { font-weight: 600; color: #333; }
.label-table tr.is-patient { background: #fff4dc; outline: 2px solid #d99a00; outline-offset: -2px; }
.label-table tr.is-patient th, .label-table tr.is-patient td { font-weight: 700; color: #222; }
.this-patient { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; background: #d99a00; color: #fff; border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.intended-use { font-size: 14px; background: #f4f6f8; color: #333; border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.time-notice { font-size: 14px; background: var(--stop-bg); color: var(--stop); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.about h2 { font-size: 15px; color: var(--primary-color); margin: 16px 0 6px; }
.history { margin: 6px 0 0 20px; }
.history > li + li { margin-top: 12px; }
.history ul { margin: 4px 0 4px 18px; }
.result-version { margin-top: 12px; font-size: 12px; color: #666; }
.about p { margin-top: 6px; }
.res-rows { margin: 0; }
.res-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid #e0e0e0; font-size: 15px; }
.res-row dt { color: var(--muted); }
.res-row dd { font-weight: 700; text-align: right; color: var(--primary-color); }
.clinical-notes { font-size: 14px; color: #444; margin: 12px 0 0; padding: 10px 10px 10px 28px; background: #fff; border-radius: 6px; border: 1px solid #eee; }
.clinical-notes li + li { margin-top: 4px; }
.math { margin-top: 12px; font-size: 14px; }
.math summary, .method summary { cursor: pointer; font-weight: 600; color: var(--primary-color); }
.math ul { margin: 8px 0 0 20px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.method { margin-top: 25px; padding-top: 15px; border-top: 1px solid #eee; font-size: 14px; }
.method ul { margin: 10px 0 0 20px; }
.method li + li { margin-top: 6px; }
.sources-heading { font-size: 14px; margin-top: 14px; color: var(--primary-color); }
.version { color: #777; font-size: 12px; margin-top: 12px; }
.disclaimer { font-size: 12px; color: #888; text-align: center; margin-top: 30px; line-height: 1.4; }

/* --- Accounts --- */
.access-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: #eef4ff; color: #22324a; border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; font-size: 14px; }
.access-note .btn-row { display: flex; gap: 8px; }
.small-btn { display: inline-block; padding: 8px 16px; border-radius: 5px; font-size: 14px; font-weight: 700; text-decoration: none; border: 1px solid var(--primary-color); cursor: pointer; background: #fff; color: var(--primary-color); }
.small-btn.primary { background: var(--primary-color); color: #fff; }
.small-btn:hover { background: var(--primary-hover); color: #fff; }
.small-btn[disabled] { opacity: 0.5; cursor: default; }
.account-box { max-width: 560px; margin: 0 auto; background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.account-box h2 { color: var(--primary-color); margin-bottom: 16px; font-size: 22px; }
.account-box p + p { margin-top: 10px; }
.form-group select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 16px; background-color: #f9f9f9; }
.form-group .help { font-size: 13px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: 15px; color: #444; }
.check-row input { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; }
.form-ok { color: var(--ok); background: var(--ok-bg); border-radius: 6px; padding: 10px 12px; margin-top: 15px; font-size: 14px; }
.account-links { margin-top: 20px; font-size: 14px; color: var(--muted); }
.account-links a { color: var(--primary-color); }
.status-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #f0f2f5; color: #444; }
.status-approved { background: var(--ok-bg); color: var(--ok); }
.status-pending { background: var(--caution-bg); color: var(--caution); }
.status-rejected, .status-disabled { background: var(--stop-bg); color: var(--stop); }
.calc-error { color: var(--stop); background: var(--stop-bg); border-radius: 8px; padding: 12px 14px; margin-top: 15px; font-size: 14px; }
.calc-error a { color: inherit; font-weight: 700; }

.turnstile { margin: 14px 0; min-height: 65px; }
.section-h { margin-top: 28px; padding-top: 18px; border-top: 1px solid #eee; font-size: 18px; }
.steps { margin: 0 0 12px 20px; }
.steps li + li { margin-top: 6px; }
.qr { display: flex; justify-content: center; margin: 12px 0; }
.qr svg { border: 1px solid #ddd; border-radius: 6px; max-width: 100%; height: auto; }
.setup-key { font-family: ui-monospace, Consolas, monospace; font-size: 14px; background: #f4f6f8; padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.backup-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; margin: 12px 0 12px 24px; font-family: ui-monospace, Consolas, monospace; font-size: 16px; }
.link-btn { background: none; border: none; padding: 0; color: var(--primary-color); text-decoration: underline; cursor: pointer; font-size: 14px; }

/* --- Admin --- */
.admin-wrap { max-width: 1200px; margin: 0 auto; }
.admin-section { background: #fff; padding: 24px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); margin-bottom: 24px; overflow-x: auto; }
.admin-section h2 { color: var(--primary-color); font-size: 20px; margin-bottom: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid #eee; }
.admin-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.admin-table input[type="text"] { width: 100%; min-width: 140px; padding: 6px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.registry { font-size: 13px; line-height: 1.5; }
.registry .match { color: var(--ok); font-weight: 700; }
.registry .mismatch { color: var(--stop); font-weight: 700; }
.muted { color: var(--muted); }

/* --- Research --- */
.eyebrow { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.eyebrow a { color: var(--muted); text-decoration: none; }
.eyebrow a:hover { color: var(--primary-color); text-decoration: underline; }
.page-title .byline { font-size: 14px; margin-top: 14px; max-width: 720px; }
.research-article { max-width: 900px; margin: 0 auto; background: #fff; padding: 48px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.research-article h2 { color: var(--primary-color); font-size: 22px; margin: 36px 0 12px; }
.research-article > h2:first-child { margin-top: 0; }
.research-article p, .research-article li { color: #444; line-height: 1.7; }
.research-article p { margin-bottom: 14px; }
.research-article ul, .research-article ol { padding-left: 22px; margin-bottom: 14px; }
.research-article li { margin-bottom: 8px; }
.research-article a { color: var(--primary-color); }
.research-article .cta-btn { color: #fff; margin-top: 10px; }
.research-article .label-table { margin: 8px 0 18px; }
.research-article .tool-list { padding-left: 0; }
.key-facts { background: #f4f7fa; border-left: 4px solid var(--primary-color); border-radius: 6px; padding: 20px 24px; margin-bottom: 8px; }
.key-facts h2 { margin-top: 0; font-size: 18px; }
.key-facts ul { margin-bottom: 0; }
.research-card .research-status { font-size: 13px; font-weight: 600; color: var(--caution); }
.research-card .tool-summary { color: var(--muted); }
.figure-scroll { margin: 18px 0; overflow-x: auto; }
.figure-scroll svg { display: block; width: 100%; height: auto; min-width: 600px; }
.figure-scroll figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.research-note { font-size: 14px; color: var(--muted) !important; border-top: 1px solid #e6e8eb; padding-top: 14px; margin-top: 24px; }
.pub-list li { margin-bottom: 12px; }
.sim { display: grid; grid-template-columns: 260px 1fr; gap: 24px 32px; align-items: start; }
.sim-controls { display: grid; gap: 18px; }
.sim-field label { display: block; font-weight: 600; color: var(--primary-color); }
.sim-field input[type="range"] { width: 100%; margin-top: 6px; accent-color: var(--primary-color); }
.sim-field output { display: block; font-weight: 700; color: #333; }
.sim-field .help { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.sim-chart { margin: 0; min-width: 0; }
.sim-svg { display: block; width: 100%; height: auto; background: #fff; }
.sim-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: #444; margin-top: 8px; }
.swatch { display: inline-block; width: 22px; height: 0; border-top: 3px solid; vertical-align: middle; margin-right: 6px; }
.swatch-truth { border-top: 3px dashed #56626E; }
.swatch-naive { border-color: #9A5A00; }
.swatch-corrected { border-color: #0C6B77; }
.sim-results { grid-column: 1 / -1; }
.sim-results .label-table { margin-top: 0; }

/* --- Footer --- */
.site-footer { background-color: var(--primary-color); color: #fff; padding: 60px 0 20px 0; font-size: 15px; line-height: 1.6; margin-top: auto; }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer-col { flex: 1; min-width: 250px; }
.footer-logo-svg { width: 180px; height: auto; margin-bottom: 20px; display: block; }
.footer-logo-svg path { fill: #fff; }
.footer-about { color: #e0e0e0; max-width: 350px; }
.footer-heading { font-size: 16px; font-weight: 700; text-transform: uppercase; margin-bottom: 25px; letter-spacing: 0.5px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { text-decoration: none; color: #e0e0e0; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.contact-info p { margin-bottom: 15px; color: #e0e0e0; }
.contact-info a { color: #e0e0e0; }
.social-icons { margin-top: 20px; }
.social-icons a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: #fff; color: var(--primary-color); border-radius: 4px; font-weight: 600; text-decoration: none; }
.social-icons a:hover { background: #ccc; }
.icon-sm { width: 16px; height: 16px; }
.footer-bottom { max-width: 1200px; margin: 50px auto 0; padding: 20px 20px 0; border-top: 1px solid rgba(255,255,255,0.1); color: #aab6c2; font-size: 14px; }
.footer-legal-link { color: #aab6c2; }
.footer-legal-link:hover { color: #fff; }

@media (max-width: 768px) {
  .site-header { flex-direction: column; gap: 14px; padding: 15px 20px; position: static; }
  .nav-links { justify-content: center; gap: 8px 18px; }
  .page { padding: 36px 16px; }
  .page-title h1 { font-size: 2rem; }
  .hero-box { padding: 50px 20px; }
  .hero-box h1 { font-size: 34px; }
  .hero-box.text-left, .legal-content, .contact-form, .contact-info-panel, .account-box { padding: 28px; }
  .research-article { padding: 24px 18px; }
  .sim { grid-template-columns: 1fr; }
  .key-facts { padding: 16px 16px; }
  .dosing-container { padding: 20px; }
  .contact-container { flex-direction: column; gap: 0; }
  .footer-container { flex-direction: column; }
}
