/* drvictor.org v2 — folha única para a home nova E para as 45 páginas existentes
   (mantém o vocabulário de classes atual: .card, .btn, .page-title, .key-takeaways…).

   Layout: "ficha clínica". Coluna única no celular; no desktop, grade editorial alinhada
   à esquerda, seções separadas por fios e rótulos em mono. O único ornamento é a espiral
   de Arquimedes, o desenho usado no exame do tremor. */

:root {
  /* cor */
  --bg: #FCFAF6;
  --bg-sunk: #F4F0E8;
  --surface: #FFFFFF;
  --ink: #1B1815;
  --ink-2: #3A352F;
  --muted: #665C50;
  --line: #E1DAD0;
  --line-2: #C9C0B3;
  --accent: #2F7D6B;
  --accent-hover: #256058;
  --accent-fg: #FFFFFF;
  --accent-ink: #256058;
  --accent-soft: #E4F1EC;
  --navy: #163C54;
  --navy-soft: #E4EDF2;
  --link: #1F4E6B;
  --inv-bg: #0A1F2E;
  --inv-fg: #FCFAF6;
  --inv-muted: #B7C3CC;
  --inv-line: #21405A;
  --inv-accent: #6DBBA9;
  --spiral: #2F7D6B;
  --spiral-ghost: #D9D1C4;
  --band-off: #F7E6CF; --band-on: #E4F1EC; --band-dys: #E9E4F5;
  --line-off: #B0641C; --line-dys: #6550A8;
  --shadow: 0 1px 2px rgba(27, 24, 21, .05), 0 10px 28px rgba(27, 24, 21, .08);

  /* tipo */
  --font-display: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* forma */
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 18px;
  --wrap: 1120px;
  --narrow: 720px;
  --header-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1721; --bg-sunk: #101E2A; --surface: #142636;
    --ink: #F2EFE9; --ink-2: #D6D0C6; --muted: #A3ADB5;
    --line: #22384A; --line-2: #36526B;
    --accent: #5CAE9C; --accent-hover: #74C2B0; --accent-fg: #06211C; --accent-ink: #7FCBB9; --accent-soft: #12332F;
    --navy: #9CCBE3; --navy-soft: #16303F; --link: #9CCBE3;
    --inv-bg: #071019; --inv-fg: #F2EFE9; --inv-muted: #A3ADB5; --inv-line: #1B3143; --inv-accent: #6DBBA9;
    --spiral: #5CAE9C; --spiral-ghost: #2A4153; --band-off: #33281A; --band-on: #12332F; --band-dys: #26223D; --line-off: #E2A25E; --line-dys: #A898E6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1721; --bg-sunk: #101E2A; --surface: #142636;
  --ink: #F2EFE9; --ink-2: #D6D0C6; --muted: #A3ADB5;
  --line: #22384A; --line-2: #36526B;
  --accent: #5CAE9C; --accent-hover: #74C2B0; --accent-fg: #06211C; --accent-ink: #7FCBB9; --accent-soft: #12332F;
  --navy: #9CCBE3; --navy-soft: #16303F; --link: #9CCBE3;
  --inv-bg: #071019; --inv-fg: #F2EFE9; --inv-muted: #A3ADB5; --inv-line: #1B3143; --inv-accent: #6DBBA9;
  --spiral: #5CAE9C; --spiral-ghost: #2A4153; --band-off: #33281A; --band-on: #12332F; --band-dys: #26223D; --line-off: #E2A25E; --line-dys: #A898E6;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 40; background: var(--bg); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); font-weight: 600; line-height: 1.15; letter-spacing: -.012em; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: calc(var(--header-h) + 20px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--r-s); }
.skip:focus { top: calc(8px + env(safe-area-inset-top, 0px)); }

.wrap {
  max-width: var(--wrap); margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.app-shell { display: flex; flex-direction: column; min-height: 100%; }
.main-content { flex: 1; }

/* ============ Cabeçalho ============ */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  display: flex; align-items: center; gap: 10px 20px; flex-wrap: wrap;
  min-height: var(--header-h); padding-block: 8px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand-mark { display: flex; flex-direction: column; align-items: flex-start; margin-right: auto; padding: 0; background: none; border: 0; cursor: pointer; text-decoration: none; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; line-height: 1.15; color: var(--ink); }
.brand-role { font-size: .625rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.site-nav { display: flex; align-items: center; gap: 4px 24px; flex-wrap: wrap; }
.nav-link {
  background: none; border: 0; padding: 6px 0; cursor: pointer; text-decoration: none;
  font-size: .9375rem; font-weight: 500; color: var(--muted);
  border-bottom: 2px solid transparent; transition: color .15s;
}
.nav-link:hover, .nav-link.is-active { color: var(--ink); }
.nav-link.is-active { border-bottom-color: var(--accent); }
.nav-toggle { display: none; }

/* celular: o menu vira um painel sob o cabeçalho (só com JS; sem JS ele quebra em linhas, como hoje) */
@media (max-width: 860px) {
  .js .site-header { flex-wrap: nowrap; gap: 10px; }
  .js .brand-name { white-space: nowrap; }
  .js .header-cta { min-height: 44px; padding: 0 12px; font-size: .8125rem; white-space: nowrap; }
  .js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 4px max(20px, env(safe-area-inset-right, 0px)) 20px max(20px, env(safe-area-inset-left, 0px));
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .js .site-nav.is-open { display: flex; }
  .js .site-nav .nav-link { padding: 15px 0; font-size: 1.125rem; color: var(--ink); border-bottom: 1px solid var(--line); text-align: left; }
  .js .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    background: none; border: 1px solid var(--line-2); border-radius: var(--r-m); cursor: pointer; flex: none;
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .nav-toggle span { position: relative; }
  .nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
  .nav-toggle span::before { top: -6px; }
  .nav-toggle span::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] span { background: transparent; }
  .nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
}

/* ============ Botões, chips ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-m); border: 1px solid transparent;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600; line-height: 1.1; text-decoration: none; text-align: center;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn-md { min-height: 40px; padding: 0 16px; font-size: .9375rem; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.0625rem; }
.btn-accent { background: var(--accent); color: var(--accent-fg); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-primary { background: var(--navy); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-inv { background: transparent; color: var(--inv-fg); border-color: var(--inv-muted); }
.btn-inv:hover { border-color: var(--inv-fg); }
.btn svg { width: 20px; height: 20px; flex: none; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px;
  font-size: .9375rem; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"], .chip.is-current { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip .n { font-family: var(--font-mono); font-size: .75rem; opacity: .7; }

.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 12px; border-radius: 999px; font-size: .8125rem; font-weight: 500; }
.badge-teal { background: var(--accent-soft); color: var(--accent-ink); }
.badge-navy { background: var(--navy-soft); color: var(--navy); }
.badge-neutral { background: var(--bg-sunk); color: var(--muted); border: 1px solid var(--line); }

/* controle segmentado (modalidade, espiral) */
.seg { display: inline-flex; max-width: 100%; padding: 4px; gap: 4px; background: var(--bg-sunk); border: 1px solid var(--line); border-radius: 999px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: .9375rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

/* ============ Seções (home) ============ */
.sec { padding-block: clamp(44px, 7vw, 88px); border-top: 1px solid var(--line); }
.sec-sunk { background: var(--bg-sunk); }
.sec-head { display: grid; gap: 10px; max-width: 40rem; margin-bottom: clamp(24px, 4vw, 40px); }
.sec-label { font-family: var(--font-mono); font-size: .75rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.sec h2 { font-size: clamp(1.625rem, 3.6vw, 2.375rem); }
.sec-head p:not(.sec-label) { color: var(--muted); }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }
.split { display: grid; gap: clamp(24px, 5vw, 64px); }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; }
  .split > .sec-head { position: sticky; top: calc(var(--header-h) + 28px); margin-bottom: 0; }
}

/* ============ Hero ============ */
.hero { position: relative; overflow: hidden; padding-block: clamp(24px, 5vw, 64px) clamp(36px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "pic id" "main main"; gap: 22px 16px; align-items: center; }
.hero-visual { grid-area: pic; }
.hero-id { grid-area: id; position: relative; z-index: 1; display: grid; gap: 4px; }
.hero-main { grid-area: main; position: relative; z-index: 1; display: grid; gap: 20px; }
.hero-pic { position: relative; z-index: 1; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.hero-spiral { position: absolute; z-index: 0; top: -96px; right: -120px; width: 300px; height: 300px; pointer-events: none; }
.hero-id h1 { font-size: 1.375rem; }
.hero-id p { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); letter-spacing: .01em; }
.hero-claim { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: clamp(2.125rem, 6.4vw, 3.75rem); line-height: 1.05; letter-spacing: -.022em; text-wrap: balance; }
.hero-lead { font-size: clamp(1.0625rem, 1.6vw, 1.1875rem); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .btn { flex: 1 1 200px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 6px 0 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-rows: 1fr auto; gap: 2px; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: .8125rem; color: var(--muted); }
.facts dd { margin: 0; font-family: var(--font-mono); font-weight: 500; font-size: .9375rem; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); grid-template-areas: "id pic" "main pic"; grid-template-rows: auto 1fr; gap: 20px 72px; }
  .hero-visual { position: relative; justify-self: center; width: min(100%, 380px); align-self: center; }
  .hero-pic { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: var(--r-l); box-shadow: var(--shadow); }
  .hero-spiral { inset: 6% auto auto 98%; width: 150%; height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); }
  .hero-id { align-self: end; }
  .hero-id h1 { font-size: 1.5rem; }
  .hero-main { align-self: start; }
  .hero-actions .btn { flex: 0 0 auto; }
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facts > div { border-bottom: 0; }
}

/* ============ Por onde começar (acordeão exclusivo, <details name>) ============ */
.acc { border-top: 1px solid var(--line-2); }
.acc details { border-bottom: 1px solid var(--line-2); }
.acc summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 2px; cursor: pointer; list-style: none; font-family: var(--font-display); font-weight: 600; font-size: 1.1875rem; line-height: 1.25; color: var(--ink); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; }
.acc details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.acc summary:hover { color: var(--accent-ink); }
.acc-body { display: grid; gap: 14px; padding: 0 2px 22px; max-width: 38rem; }
.acc-body .btn { justify-self: start; }
.links { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.links a { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; text-decoration: none; color: var(--ink); font-weight: 500; }
.links a:hover span:last-child { text-decoration: underline; }
.links .kind { flex: none; width: 4.25rem; font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ============ Consulta ============ */
.consulta-panel { display: grid; gap: 24px; margin-top: 22px; padding: clamp(20px, 3.4vw, 36px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); }
@media (min-width: 900px) { .consulta-panel { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 48px; } }
.consulta-side h3 { font-size: 1.375rem; }
.kv { display: grid; margin: 0; }
.kv > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .9375rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); }
.consulta-side { display: grid; gap: 18px; align-content: start; }
.consulta-main { display: grid; gap: 14px; align-content: start; }
.consulta-main h3 { font-size: 1.1875rem; }
.units { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.units li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.units b { font-family: var(--font-display); font-size: 1.125rem; color: var(--ink); }
.units span { grid-column: 1; font-size: .9375rem; color: var(--muted); }
.units a { grid-column: 2; grid-row: 1 / span 2; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: s; border-top: 1px solid var(--line); }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 2px 8px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s); grid-row: 1 / span 2; font-family: var(--font-mono); font-size: .875rem; color: var(--accent-ink); padding-top: 3px; }
.steps b { color: var(--ink); font-weight: 600; }
.steps span { grid-column: 2; font-size: .9375rem; color: var(--muted); }
.fine { font-size: .875rem; color: var(--muted); }
.included { display: grid; gap: 18px 40px; margin-top: 30px; padding: 0; list-style: none; }
@media (min-width: 700px) { .included { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .included { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.included li { display: grid; gap: 4px; padding-top: 14px; border-top: 2px solid var(--ink); font-size: .9375rem; }
.included b { font-family: var(--font-display); font-size: 1.0625rem; color: var(--ink); }

/* ============ Condições ============ */
.filter { display: grid; gap: 14px; margin-bottom: 8px; }
@media (min-width: 900px) { .filter { grid-template-columns: minmax(0, 1fr) 20rem; align-items: center; } }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.search { position: relative; display: block; }
.search input { width: 100%; min-height: 44px; padding: 0 14px 0 40px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; font-size: 1rem; }
.search input::placeholder { color: var(--muted); }
.search::before { content: ""; position: absolute; left: 16px; top: 50%; width: 12px; height: 12px; margin-top: -8px; border: 2px solid var(--muted); border-radius: 50%; }
.search::after { content: ""; position: absolute; left: 27px; top: 50%; width: 2px; height: 7px; margin-top: 3px; background: var(--muted); transform: rotate(-45deg); border-radius: 2px; }
.cond-list { display: grid; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .cond-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; } }
.cond-list li { border-bottom: 1px solid var(--line); }
.cond { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 18px 2px; text-decoration: none; color: inherit; height: 100%; }
.cond h3 { font-size: 1.1875rem; }
.cond p { grid-column: 1; font-size: .9375rem; color: var(--muted); }
.cond .go { grid-column: 2; grid-row: 1 / span 2; font-size: 1.25rem; color: var(--accent-ink); transition: transform .15s; }
a.cond:hover h3 { color: var(--accent-ink); }
a.cond:hover .go { transform: translateX(4px); }
.empty { padding: 28px 0; color: var(--muted); }

/* ============ Sobre ============ */
.about { display: grid; gap: clamp(28px, 5vw, 64px); }
@media (min-width: 900px) { .about { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; } }
.about-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.about-photos img { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 14%; border-radius: var(--r-m); border: 1px solid var(--line); }
@media (min-width: 900px) {
  .about-photos { position: sticky; top: calc(var(--header-h) + 28px); grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
  .about-photos img:first-child { grid-column: 1 / span 5; grid-row: 1; border-radius: var(--r-l); }
  .about-photos img:last-child { grid-column: 3 / span 4; grid-row: 2; margin-top: -34%; aspect-ratio: 1; border: 6px solid var(--bg); border-radius: var(--r-l); box-shadow: var(--shadow); }
}
.about-body { display: grid; gap: 28px; }
.about-body .sec-head { margin-bottom: 0; }
.about-bio { font-size: 1.125rem; line-height: 1.7; }
.about-body h3 { font-size: 1.25rem; margin-bottom: 4px; }
.timeline { display: grid; margin: 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 6.75rem minmax(0, 1fr); gap: 2px 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.timeline time { grid-row: 1 / span 2; font-family: var(--font-mono); font-size: .8125rem; color: var(--muted); padding-top: 3px; font-variant-numeric: tabular-nums; }
.timeline b { color: var(--ink); font-weight: 600; }
.timeline span { grid-column: 2; font-size: .9375rem; color: var(--muted); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ Artigos ============ */
.posts { display: grid; gap: 0; margin: 0 0 26px; padding: 0; list-style: none; }
@media (min-width: 860px) { .posts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }
.post { display: grid; gap: 10px; align-content: start; height: 100%; padding: 20px 0; border-top: 2px solid var(--ink); text-decoration: none; color: inherit; }
.post .sec-label { color: var(--muted); }
.post h3 { font-size: 1.3125rem; line-height: 1.22; }
.post p { font-size: .9375rem; color: var(--muted); }
.post:hover h3 { color: var(--accent-ink); }

/* ============ Dúvidas ============ */
.faq-tools { margin-bottom: 14px; max-width: 26rem; }
.acc.faq summary { font-family: var(--font-body); font-size: 1.0625rem; }
.acc.faq .acc-body { padding-bottom: 20px; }

/* ============ Agendar ============ */
.cta-band { background: var(--inv-bg); color: var(--inv-muted); border-top: 0; }
.cta-band h2 { color: var(--inv-fg); }
.cta-band .sec-label { color: var(--inv-accent); }
.cta-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .cta-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 72px; align-items: center; } }
.cta-copy { display: grid; gap: 14px; }
.cta-actions { display: grid; gap: 12px; }
.cta-actions p { font-size: .9375rem; }
.cta-actions b { color: var(--inv-fg); font-family: var(--font-mono); font-weight: 500; user-select: all; }

/* ============ Rodapé ============ */
.site-footer {
  background: var(--inv-bg); color: var(--inv-muted); border-top: 1px solid var(--inv-line);
  padding-block: 44px 40px; font-size: .9375rem;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.site-footer a { color: var(--inv-fg); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-inner { max-width: calc(var(--wrap) - 40px); margin-inline: auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 28px 48px; }
.footer-brand { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; color: var(--inv-fg); }
.footer-role { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--inv-accent); margin-top: 2px; }
.footer-credentials { font-family: var(--font-mono); font-size: .8125rem; margin-top: 12px; }
.footer-desc { max-width: 24rem; line-height: 1.7; }
.footer-cols { max-width: calc(var(--wrap) - 40px); margin: 32px auto 0; padding-top: 28px; border-top: 1px solid var(--inv-line); display: grid; gap: 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.footer-cols h2 { font-family: var(--font-mono); font-size: .75rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--inv-muted); margin-bottom: 10px; }
.footer-cols ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer-nav { max-width: calc(var(--wrap) - 40px); margin: 28px auto 0; padding-top: 24px; border-top: 1px solid var(--inv-line); font-size: .875rem; line-height: 2.1; color: var(--inv-line); }

/* ============ Barra de ação fixa (celular) ============ */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; gap: 10px;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .25s ease; visibility: hidden;
}
.actionbar.is-on { transform: none; visibility: visible; }
.actionbar .btn-accent { flex: 1; }
.actionbar .btn-ghost { flex: none; padding: 0 16px; background: var(--surface); }
@media (min-width: 861px) { .actionbar { display: none; } }
@media (max-width: 860px) { .has-actionbar .site-footer { padding-bottom: 104px; } }

.progress { position: fixed; left: 0; right: 0; top: env(safe-area-inset-top, 0px); z-index: 50; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }

/* ============ Páginas existentes (condições, teleconsulta, artigos) — mesmo HTML de hoje ============ */
.page { display: none; }
.page.is-active { display: block; }
.container, .container-narrow {
  max-width: calc(var(--wrap)); margin-inline: auto; padding-block: clamp(24px, 5vw, 56px);
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.container-narrow { max-width: calc(var(--narrow) + 40px); }
.container-narrow > p:first-child { margin-bottom: 18px !important; font-size: .9375rem; }
.container-narrow > p:first-child a { text-decoration: none; color: var(--muted); font-weight: 500; }
.page-title { font-size: clamp(2rem, 5.4vw, 2.875rem); line-height: 1.08; letter-spacing: -.02em; margin-bottom: 14px; }
.page-lead { font-size: clamp(1.0625rem, 2vw, 1.1875rem); color: var(--muted); max-width: 36rem; margin-bottom: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; }
.card h3 { font-size: clamp(1.3125rem, 2.8vw, 1.5625rem); line-height: 1.2; margin-bottom: 12px; }
.card p { line-height: 1.7; }
.card p + p { margin-top: 14px; }
/* no texto corrido, os cartões deixam de ser caixas: viram seções separadas por um fio */
.container-narrow > .card { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 28px 0 30px; }
.container-narrow > .card[style*="border-left"] { margin-block: 4px 30px; padding: 22px 22px 24px; background: var(--bg-sunk); border-top: 0; border-radius: 0 var(--r-m) var(--r-m) 0; }
.container-narrow > .card.card-cta { margin-block: 8px 30px; padding: 28px 24px; background: var(--accent-soft); border: 0; border-radius: var(--r-l); }
.card-cta .btn { margin-top: 16px; }
.card-cta b { font-weight: inherit; }
.card p[style*="color:#555"] { color: var(--muted) !important; }
.key-takeaways { background: var(--accent-soft); border-radius: var(--r-l); padding: 22px 24px; margin: 0 0 28px; }
.key-takeaways h2 { font-family: var(--font-mono); font-size: .75rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 10px; }
.key-takeaways p { font-size: 1rem; line-height: 1.75; color: var(--ink); }
.teaser-link { font-weight: 600; text-decoration: none; }

/* índice "Nesta página" gerado a partir dos <h3> dos cartões */
.toc { position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); z-index: 20; display: flex; gap: 8px; margin-bottom: 6px; padding-block: 10px; overflow-x: auto; scrollbar-width: none; background: var(--bg); border-bottom: 1px solid var(--line); }
.toc::-webkit-scrollbar { display: none; }
.toc .chip { min-height: 34px; padding: 0 13px; font-size: .875rem; }
.toc + .card, .toc + .key-takeaways + .card { border-top: 0; }

/* ============ Módulo da espiral ============ */
.spiral-mod { display: grid; gap: 18px; grid-template-areas: "head" "stage" "foot"; margin-block: 6px 30px; padding: clamp(20px, 3.4vw, 32px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); }
.spiral-head { grid-area: head; display: grid; gap: 12px; }
.spiral-head h3 { font-size: 1.375rem; }
.spiral-stage { grid-area: stage; justify-self: center; width: min(100%, 13.5rem); }
.spiral-stage canvas { display: block; width: 100%; aspect-ratio: 1; }
.spiral-foot { grid-area: foot; display: grid; gap: 10px; }
.spiral-cap { min-height: 4.9em; color: var(--ink); }
.spiral-mod .seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
.spiral-mod .seg button { min-height: 44px; padding: 6px 8px; font-size: .875rem; line-height: 1.15; white-space: normal; }
@media (min-width: 640px) {
  .spiral-mod { grid-template-columns: minmax(0, 1fr) 15rem; grid-template-areas: "head stage" "foot stage"; column-gap: 32px; align-items: center; }
  .spiral-stage { width: 100%; }
  .spiral-head { align-self: end; }
  .spiral-foot { align-self: start; }
}

/* ============ Módulos didáticos ============ */
.mod { display: grid; gap: 18px; margin-block: 6px 30px; padding: clamp(20px, 3.4vw, 32px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); }
.mod h3 { font-size: 1.375rem; margin: 0; }
.mod-head, .mod-foot { display: grid; gap: 12px; justify-items: start; }
.mod-head p:not(.sec-label) { color: var(--ink-2); }
.mod .seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; }
.mod .seg button { min-height: 44px; padding: 6px 10px; font-size: .875rem; line-height: 1.15; white-space: normal; hyphens: manual; overflow-wrap: anywhere; }
.chart { margin: 0; }
.chart svg { display: block; width: 100%; height: auto; max-width: 600px; margin-inline: auto; overflow: visible; font-family: var(--font-body); }
.chart .b-off { fill: var(--band-off); } .chart .b-on { fill: var(--band-on); } .chart .b-dys { fill: var(--band-dys); }
.chart .bl { font-size: 10px; font-weight: 600; fill: var(--muted); }
.chart .l-off { fill: var(--line-off); } .chart .l-dys { fill: var(--line-dys); } .chart .l-on { fill: var(--accent-ink); }
.chart path { fill: none; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.chart .c-on { stroke: var(--accent); } .chart .c-off { stroke: var(--line-off); } .chart .c-dys { stroke: var(--line-dys); }
.chart .area { fill: var(--band-on); stroke: none; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .dose { fill: var(--ink); stroke: none; }
.chart .tick { font-size: 10px; fill: var(--muted); text-anchor: middle; font-family: var(--font-mono); }
.chart .dose-l { text-anchor: end; }
.chart .cursor { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 10px; font-size: .8125rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 12px; height: 12px; border-radius: 3px; }
.legend .k-dys::before { background: var(--band-dys); border: 2px solid var(--line-dys); }
.legend .k-on::before { background: var(--band-on); border: 2px solid var(--accent); }
.legend .k-off::before { background: var(--band-off); border: 2px solid var(--line-off); }
.legend .k-dose::before { width: 0; height: 0; border-radius: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 9px solid var(--ink); }
.chart-stats { font-size: .9375rem; color: var(--muted); }
.chart-stats b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-cap { min-height: 4.9em; color: var(--ink); }
.range { display: block; }
.range input { width: 100%; height: 44px; accent-color: var(--accent); margin: 0; }

.tips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tips li { padding: 6px 12px; border-radius: 999px; background: var(--bg-sunk); border: 1px solid var(--line); font-size: .8125rem; color: var(--ink-2); }
.film-steps { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.film-steps::-webkit-scrollbar { display: none; }
.film-steps button { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 6px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); cursor: pointer; font-size: .875rem; font-weight: 500; color: var(--ink-2); }
.film-steps .n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-sunk); font-family: var(--font-mono); font-size: .8125rem; color: var(--ink); }
.film-steps .lbl { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.film-steps button[aria-selected="true"] { border-color: var(--ink); color: var(--ink); }
.film-steps button[aria-selected="true"] .n { background: var(--ink); color: var(--bg); }
.film-steps button.is-done .n { background: var(--accent); color: var(--accent-fg); }
.film-steps button.is-done .n::before { content: "✓"; }
.film-steps button.is-done .n { font-size: 0; }
.film-steps button.is-done .n::before { font-size: .875rem; }
@media (max-width: 640px) { .film-steps .lbl { display: none; } .film-steps button { padding: 0 6px; } .film-steps button[aria-selected="true"] .lbl { display: inline; } .film-steps button[aria-selected="true"] { padding-right: 14px; } }
.film-panel { display: grid; gap: 18px; align-items: center; }
@media (min-width: 640px) { .film-panel { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 28px; } }
.film-fig { width: 100%; max-width: 17rem; justify-self: center; height: auto; }
.film-fig .ph { fill: var(--bg-sunk); stroke: var(--ink); stroke-width: 2.5; }
.film-fig .ph-dot { fill: var(--ink); }
.film-fig .fig { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.film-fig .fig .tr { stroke: var(--accent); stroke-width: 2.5; }
.film-fig .fig .thin { stroke-width: 2; stroke: var(--accent); }
.film-fig .fig .dash { stroke-dasharray: 5 6; stroke-width: 2; stroke: var(--accent); }
.film-fig .fig .fill { fill: var(--accent); stroke: none; }
.film-text { display: grid; gap: 10px; justify-items: start; }
.film-k { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.film-text h4 { font-family: var(--font-display); font-size: 1.1875rem; color: var(--ink); margin: 0; }
.film-d { min-height: 6.4em; }
.film-check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; color: var(--ink); cursor: pointer; }
.film-check input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; }
.film-nav { display: flex; gap: 8px; }
.film-nav .btn:disabled { opacity: .4; cursor: default; }
.film-foot { display: grid; gap: 12px; justify-items: start; padding-top: 16px; border-top: 1px solid var(--line); }
.film-prog { font-weight: 600; color: var(--ink); }

/* -- pálpebra -- */
.palp-body { display: grid; gap: 18px; align-items: center; }
@media (min-width: 640px) { .palp-body { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 28px; } }
.face { width: 100%; max-width: 15rem; justify-self: center; height: auto; }
.face .head { fill: var(--bg-sunk); stroke: var(--line-2); stroke-width: 2; }
.face .eye-w { fill: var(--surface); }
.face .iris { fill: var(--navy); } .face .pupil { fill: var(--ink); }
.face .lid { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; }
.face .brow, .face .nose, .face .fold, .face .mouth, .face .crease { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.face .fold, .face .crease { stroke-width: 1.6; stroke: var(--muted); }
.face .hint { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 3; }
.palp-info { display: grid; gap: 12px; }
.palp-info .kv > div { grid-template-columns: 8rem minmax(0, 1fr); }
/* -- Huntington -- */
.hd-tree { display: grid; justify-items: center; gap: 0; }
.hd-row { display: flex; justify-content: center; gap: 10px; width: 100%; }
.hd-parents { align-items: center; gap: 14px; }
.hd-x { font-size: 1.25rem; color: var(--muted); }
.hd-line { width: 2px; height: 22px; background: var(--line-2); }
.hd-kids { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 14px; border-top: 2px solid var(--line-2); }
@media (min-width: 560px) { .hd-kids { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hd-p { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 12px 8px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); text-align: center; min-width: 0; }
.hd-parents .hd-p { width: min(46%, 11rem); }
.hd-p.is-carrier { border-color: var(--line-dys); background: var(--band-dys); }
.hd-sym { width: 26px; height: 26px; border: 2.5px solid var(--ink); background: var(--surface); }
.hd-sym.f { border-radius: 50%; }
.is-carrier .hd-sym { background: var(--line-dys); border-color: var(--line-dys); }
.hd-genes { display: inline-flex; gap: 4px; }
.hd-genes .g { width: 9px; height: 22px; border-radius: 3px; background: var(--line-2); }
.hd-genes .g.alt { background: var(--line-dys); }
.hd-l { font-size: .8125rem; font-weight: 600; color: var(--ink); line-height: 1.25; }
.hd-next { font-size: .75rem; color: var(--muted); line-height: 1.25; }
.hd-p.pop { animation: hdpop .35s ease both; }
@keyframes hdpop { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }
/* -- sono -- */
.mod-sono .chart .tick.st { text-anchor: end; font-family: var(--font-body); font-size: 10.5px; }
.mod-sono .chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.mod-sono .chart .hyp { stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: miter; stroke-linecap: butt; }
.mod-sono .chart .rem { fill: var(--line-dys); opacity: .45; stroke: none; }
.mod-sono .chart .rem.on, .mod-sono .chart .deep.on { opacity: 1; }
.mod-sono .chart .deep { fill: var(--accent); stroke: none; }
.mod-sono .chart .wake { fill: var(--line-off); stroke: var(--surface); stroke-width: 2; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
