/* Medical Helper website. Phone-first; brand colours match the app icon. */
:root {
  --brand: #0a5c8a;
  --brand-2: #13a89e;
  --coral: #e5383b;
  --bg: #f6f9fb;
  --surface: #ffffff;
  --text: #11212d;
  --muted: #52646f;
  --line: #dde6ec;
  --shadow: 0 10px 30px rgba(10, 60, 90, .10);
  --radius: 18px;
  --max: 1080px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c151b;
    --surface: #142129;
    --text: #e8f1f5;
    --muted: #9fb3bd;
    --line: #22343e;
    --brand: #3aa7d8;
    --brand-2: #33c7b8;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 .35rem; }
p { margin: 0 0 1rem; }
code { font: .92em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--line); padding: .1em .35em; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Header + nav (hamburger drawer below 760 px) */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-toggle {
  display: none; min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--text);
  font-size: 1.6rem; cursor: pointer; border-radius: 10px;
}
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 500;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--line); }
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav { position: fixed; inset: 60px 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); display: none; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .site-nav a { font-size: 1.1rem; }
}

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 14px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); color: var(--text); background: var(--surface);
}
.button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.button.disabled { opacity: .75; cursor: default; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.25rem 0; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #0a5c8a, #13a89e);
  color: #fff; padding: 48px 0 56px;
}
.hero .wrap { display: grid; gap: 32px; align-items: center; }
.hero p.lead { font-size: 1.2rem; opacity: .95; max-width: 34em; }
.hero .button { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.12); color: #fff; }
.hero .button.primary { background: #fff; color: #0a5c8a; border-color: #fff; }
.hero-note { color: rgba(255,255,255,.85); font-size: .95rem; }
.last { margin-bottom: 0; }
.hero-icon { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 12px 30px rgba(0,0,0,.25); margin-bottom: 18px; }
.hero-shot { justify-self: center; width: min(320px, 80vw); border-radius: 38px; box-shadow: 0 30px 60px rgba(2,37,58,.45); }
@media (min-width: 860px) { .hero .wrap { grid-template-columns: 1.2fr .8fr; } }

/* Sections */
section { padding: 56px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
section.alt .card { background: var(--bg); box-shadow: none; }
.card .icon { font-size: 1.6rem; line-height: 1; margin-bottom: 10px; }
.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.steps .card::before {
  counter-increment: step; content: counter(step); display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 10px;
}
.notice {
  border-left: 5px solid var(--coral); background: var(--surface); padding: 16px 18px; border-radius: 12px; box-shadow: var(--shadow);
}
.shots { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: start; }
.shots figure { margin: 0; }
.shots img { border-radius: 26px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.shots figcaption { font-size: .92rem; color: var(--muted); margin-top: 8px; text-align: center; }
.wide-shot img { border-radius: 14px; box-shadow: var(--shadow); }

/* Guide + legal pages */
.page { padding: 40px 0 64px; }
.page .wrap { max-width: 820px; }
.page h2 { margin-top: 2.4rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.page h3 { margin-top: 1.4rem; }
.page li { margin-bottom: .4rem; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc a { display: inline-block; min-height: 32px; padding: 4px 0; }
.guide-shot { float: right; width: min(220px, 42%); margin: 0 0 16px 20px; border-radius: 22px; border: 1px solid var(--line); }
@media (max-width: 560px) { .guide-shot { float: none; width: min(260px, 80%); margin: 12px auto 20px; } }
.clear { clear: both; }
table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; font-size: .95rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; margin-bottom: 10px; }
summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 10px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer a { color: var(--muted); display: inline-flex; min-height: 44px; align-items: center; }
