/* MedSpora public site. One stylesheet for the landing page and every legal page (DRY).
   Palette matches the admin portal (index.css) and the mobile tokens. WCAG 2.2 AA: body text
   #193438 on #ffffff / #f5f8f8 is > 12:1; muted #4c6466 is > 6:1; links are underlined. */
:root {
  --ink: #193438;
  --muted: #4c6466;
  --brand: #0b5f66;
  --brand-dark: #084a50;
  --accent: #1f9d6b;
  --bg: #f5f8f8;
  --line: #d5e4e2;
  --card: #ffffff;
  --warn-bg: #fff6e0;
  --warn-ink: #5b4200;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; }
img { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }

/* header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 20px; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.site-nav a { text-decoration: none; color: var(--ink); padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }
.site-nav a:hover { background: var(--bg); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 10px; font-weight: 700; text-decoration: none; border: 2px solid var(--brand); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--brand); }
.site-nav .btn { min-height: 44px; padding: 0 16px; color: #fff; }

/* hero */
.hero { padding: 72px 0 56px; background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%); }
.hero .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 800; color: var(--brand); margin: 0 0 12px; }
h1 { font-size: clamp(32px, 5vw, 50px); line-height: 1.1; margin: 0 0 18px; letter-spacing: -0.02em; }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 28px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 12px 32px rgba(25, 52, 56, .08); }
.hero-card h2 { font-size: 15px; margin: 0 0 12px; color: var(--muted); font-weight: 700; }
.offer { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.offer strong { font-size: 16px; }
.offer .price { text-align: right; font-weight: 800; }
.chip { display: inline-block; background: #e3f4ec; color: #125a3d; font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.fine { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

/* sections */
section { padding: 64px 0; }
section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
.section-lead { color: var(--muted); font-size: 18px; margin: 0 0 32px; max-width: 720px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
section.alt .card { background: var(--bg); }
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p, .card li { color: var(--muted); margin: 0; }
.card ul { padding-left: 20px; margin: 8px 0 0; }
.card li + li { margin-top: 6px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; counter-increment: step; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 10px; }
.steps strong { display: block; margin-bottom: 4px; }
.steps span { color: var(--muted); }
.stat { font-size: 30px; font-weight: 800; color: var(--brand); display: block; }

.notice { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #f0d58c; border-radius: 10px; padding: 14px 18px; margin: 0 0 28px; }
.notice strong { color: var(--warn-ink); }

details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0 18px; margin-bottom: 10px; }
details summary { cursor: pointer; font-weight: 700; padding: 16px 0; min-height: 44px; }
details p { color: var(--muted); margin: 0 0 16px; }

/* legal pages */
.legal { padding: 0 0 72px; }
.legal h1 { font-size: clamp(30px, 4vw, 40px); }
.legal h2 { font-size: 22px; margin: 36px 0 10px; }
.legal h3 { font-size: 17px; margin: 22px 0 6px; }
.legal p, .legal li { color: #29474b; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li + li { margin-top: 6px; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 15px; }
.legal th, .legal td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
.legal th { background: #eef4f3; }
.meta { color: var(--muted); font-size: 15px; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 22px; margin: 20px 0 8px; }
.toc ol { margin: 6px 0 0; columns: 2; column-gap: 32px; }

/* footer */
.site-footer { background: #0f2a2d; color: #d7e6e4; padding: 48px 0 28px; }
.site-footer a { color: #ffffff; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.site-footer h2 { font-size: 15px; color: #fff; margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 8px; }
.site-footer p { margin: 0 0 8px; color: #c3d6d4; font-size: 15px; }
.site-footer .bottom { border-top: 1px solid #2b4a4d; margin-top: 28px; padding-top: 18px; font-size: 14px; color: #b3c9c7; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero .wrap, .grid, .grid.two, .steps, .site-footer .cols { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  .site-header { position: static; }
  .toc ol { columns: 1; }
  .site-nav a:not(.btn) { padding: 8px 8px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
html { scroll-behavior: smooth; }
@media print { .site-header, .site-footer, .skip { display: none; } body { background: #fff; } }

/* multi-page additions */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page-hero { padding: 56px 0 40px; background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.page-hero .lead { max-width: 760px; }
.site-nav a[aria-current="page"]:not(.btn) { color: var(--brand); box-shadow: inset 0 -3px 0 var(--brand); border-radius: 0; }
.link-card { display: block; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.link-card:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(25, 52, 56, .08); color: inherit; }
.link-card .more { display: inline-block; margin-top: 12px; color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.center { text-align: center; }
.center-row { justify-content: center; }
.h3 { font-size: 19px; margin: 0 0 8px; }
.plan { display: flex; flex-direction: column; gap: 12px; }
.plan .btn { align-self: flex-start; margin-top: auto; }
.steps.three { grid-template-columns: repeat(3, 1fr); }
table.data { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
table.data th, table.data td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; }
table.data td { text-align: right; }
.legal .wrap { padding-top: 48px; }
@media (max-width: 900px) { .steps.three { grid-template-columns: 1fr; } }
