/* HomiLabs Medical Apps: one stylesheet, no build step. Palette shared with homilabs.org. */
:root {
  --bg: #f5f1ea;
  --band: #ece6db;
  --surface: #fffdf9;
  --text: #1b1c18;
  --muted: #5d5f57;
  --line: #ddd5c7;
  --accent: #1f6f5c;
  --accent-ink: #ffffff;
  --warn-bg: #fdf0e3;
  --warn-line: #e8b98f;
  --warn-text: #7a3a0a;
  --radius: 16px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121310;
    --band: #191a16;
    --surface: #20221d;
    --text: #ece8df;
    --muted: #a4a69c;
    --line: #313329;
    --accent: #5cc4a6;
    --accent-ink: #0d1411;
    --warn-bg: #2a1d12;
    --warn-line: #6b4220;
    --warn-text: #f3c49b;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1, h2 { font-family: "Fraunces", Georgia, serif; font-weight: 650; letter-spacing: -0.01em; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
.narrow { max-width: 780px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font: 650 19px "Fraunces", Georgia, serif; color: var(--text); text-decoration: none; }
.brand small { font: 500 13px "Inter", system-ui, sans-serif; color: var(--muted); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; padding: 6px 10px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: var(--band); }
@media (max-width: 560px) { .nav a { padding: 4px 6px; font-size: 14px; } .top-row { padding-block: 8px; } }

/* Hero */
.hero { padding: 64px 16px 48px; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 14px; }
.hero h1 { font-size: clamp(32px, 5.5vw, 54px); max-width: 18ch; }
.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 62ch; margin: 18px 0 0; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.btn { display: inline-block; padding: 11px 18px; border-radius: 12px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Sections */
section.band { background: var(--band); border-block: 1px solid var(--line); }
.sec { padding: 56px 0; }
.sec h2 { font-size: clamp(26px, 3.6vw, 36px); margin-bottom: 10px; }
.sec > .wrap > p.sub { color: var(--muted); max-width: 64ch; margin: 0 0 28px; }

.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: 20px; }
.card h3 { font-size: 18px; margin-bottom: 6px; }
.card p { margin: 0; color: var(--muted); }

/* App cards */
.app { display: flex; flex-direction: column; gap: 12px; }
.app-head { display: flex; gap: 14px; align-items: center; }
.app-head img { width: 64px; height: 64px; border-radius: 16px; flex: none; }
.app-head h3 { margin: 0; }
.tag { display: inline-block; white-space: nowrap; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--band); color: var(--muted); border: 1px solid var(--line); }
.tag.soon { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.links { display: flex; gap: 14px; flex-wrap: wrap; font-weight: 500; font-size: 15px; }

/* Notices */
.notice { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-text); border-radius: 12px; padding: 14px 16px; margin: 20px 0; }
.notice strong { color: inherit; }

/* Document pages (policy, disclaimer, app detail) */
.doc { padding: 40px 0 64px; }
.doc h1 { font-size: clamp(28px, 4.4vw, 42px); margin-bottom: 8px; }
.doc h2 { font-size: 22px; margin: 32px 0 8px; }
.doc .meta { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
.crumbs { font-size: 14px; color: var(--muted); padding-top: 18px; }
.crumbs a { color: var(--muted); }

.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 14px 52px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 13px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px; display: grid; place-items: center; }

.tiers { display: grid; gap: 8px; }
.tier { display: flex; gap: 12px; align-items: baseline; }
.tier b { flex: none; width: 12px; height: 12px; border-radius: 50%; transform: translateY(1px); }

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