/* MedRise design system — shared by the hub and every product.
   Clean, high-contrast, one accent. System fonts only (no third-party requests). */
:root {
  --bg: #ffffff;
  --surface: #f6f7f8;
  --surface-2: #eceef0;
  --text: #0b1f3a;
  --muted: #5b6878;
  --line: #e1e4e8;
  --accent: #00756d;
  --accent-ink: #ffffff;
  --accent-soft: #e3f4f2;
  --danger: #c2362b;
  --warn: #9a6400;
  --ok: #157a3c;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(11, 31, 58, 0.06), 0 8px 24px rgba(11, 31, 58, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f14; --surface: #121821; --surface-2: #1a222d; --text: #eef2f6; --muted: #9aa6b4;
    --line: #253041; --accent: #2cc6b8; --accent-ink: #04201d; --accent-soft: #0f2b29;
    --danger: #ff6b5e; --warn: #f0b44c; --ok: #4fd18b; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f14; --surface: #121821; --surface-2: #1a222d; --text: #eef2f6; --muted: #9aa6b4;
  --line: #253041; --accent: #2cc6b8; --accent-ink: #04201d; --accent-soft: #0f2b29;
  --danger: #ff6b5e; --warn: #f0b44c; --ok: #4fd18b; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 16px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); font-weight: 800; font-size: 15px; }
.nav { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 640px) { .nav a:not(.btn) { display: none; } }

/* Type */
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 12px; }
h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 750; }
h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 700; }
h3 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 14px; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 640px; }
.eyebrow { font-size: 13px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Sections */
.hero { padding: clamp(56px, 10vw, 112px) 0 clamp(40px, 6vw, 72px); }
.section { padding: clamp(40px, 7vw, 80px) 0; border-top: 1px solid var(--line); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 650; border: 0; cursor: pointer; font: inherit; font-weight: 650; }
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn.secondary { background: var(--surface-2); color: var(--text); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Cards & grids */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; color: var(--text); }
a.card:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow); }
.product-card { display: flex; flex-direction: column; gap: 6px; min-height: 210px; }
.product-card p { color: var(--muted); flex: 1; }
.card-foot { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.card-foot strong { color: var(--text); }
.pill { align-self: flex-start; font-size: 12px; font-weight: 650; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.empty { text-align: left; }

/* Pricing */
.pricing { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 8px; }
.plan.featured { border: 2px solid var(--accent); background: var(--bg); box-shadow: var(--shadow); }
.price { font-size: 40px; font-weight: 750; letter-spacing: -0.03em; }
.price small { font-size: 16px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 8px 0 20px; flex: 1; }
.plan li { padding: 6px 0 6px 26px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 10px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* Forms */
form { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; min-height: 48px; width: 100%; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 20px; min-height: 20px; height: 20px; margin-top: 2px; flex: none; }
.hidden { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.row2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

/* Notices */
.notice { border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.notice strong { color: var(--text); }
.notice.warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { color: var(--muted); }

/* Prose (legal pages) */
.prose h2 { font-size: 22px; margin-top: 36px; }
.prose li { margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Inner pages (no inline styles allowed under the CSP) */
.page { padding: clamp(40px, 7vw, 80px) 0; }
.page-title { font-size: clamp(32px, 5vw, 48px); }
.nav a.btn, .nav a.btn:hover { color: var(--accent-ink); }
p a, li a, .check a { text-decoration: underline; text-underline-offset: 2px; }
