/* Bulas de Remédios — design system (tema claro e escuro)
 *
 * Todas as cores vêm dos tokens abaixo. O tema ativo é definido em <html data-theme="light|dark">:
 * o servidor escreve o padrão do painel e o script do <head> aplica a escolha do visitante.
 */

/* ---------- tokens: tema escuro ---------- */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #03131A;
  --bg-2: #061C25;
  --surface: #0B2933;
  --surface-2: #10343D;
  --surface-alpha: rgba(11, 41, 51, .72);
  --border: #164653;
  --border-soft: rgba(22, 70, 83, .7);
  --divider: rgba(22, 70, 83, .55);

  --text: #F2FAFA;
  --text-2: #A7C0C4;
  --text-3: #86A3A9;

  --acc: #00DDB5;
  --acc-2: #21D9D0;
  --acc-3: #14B8D4;
  --acc-text: #2BE3C2;
  --on-acc: #03131A;
  --acc-soft: rgba(0, 221, 181, .12);
  --acc-line: rgba(0, 221, 181, .35);
  --grad: linear-gradient(120deg, #00DDB5 0%, #21D9D0 55%, #14B8D4 100%);
  --grad-text: linear-gradient(100deg, #00E2BA 0%, #2BDCD3 60%, #3FC6E0 100%);

  --header-bg: rgba(3, 19, 26, .86);
  --field-bg: rgba(6, 28, 37, .9);
  --hero-wash: radial-gradient(60% 70% at 78% 30%, rgba(0, 221, 181, .10), transparent 70%),
               radial-gradient(50% 60% at 10% 0%, rgba(20, 184, 212, .08), transparent 70%),
               linear-gradient(180deg, #041821 0%, #03131A 100%);
  --dots: rgba(150, 215, 225, .07);

  --cta-bg: transparent;
  --cta-text: var(--acc-text);
  --cta-border: var(--acc-line);
  --cta-hover-bg: rgba(0, 221, 181, .08);

  --shadow-1: 0 1px 0 rgba(255, 255, 255, .02) inset, 0 12px 32px rgba(0, 0, 0, .28);
  --shadow-2: 0 30px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(33, 217, 208, .04);
  --glow: 0 0 24px rgba(0, 221, 181, .28);
  --hover-bg: rgba(255, 255, 255, .04);

  --warn: #F5C451;
  --warn-strong: #F7C948;
  --warn-text: #E9E2CC;
  --warn-bg: rgba(245, 196, 81, .06);
  --warn-border: rgba(245, 196, 81, .32);

  --tag-ref-bg: rgba(96, 165, 250, .14); --tag-ref: #93C5FD;
  --tag-gen-bg: rgba(0, 221, 181, .14);  --tag-gen: #5EEAD4;
  --tag-bio-bg: rgba(167, 139, 250, .15); --tag-bio: #C4B5FD;
  --tag-sim-bg: rgba(167, 192, 196, .12); --tag-sim: #C3D6D9;

  --deco: .9;
}

/* ---------- tokens: tema claro ---------- */
[data-theme="light"] {
  color-scheme: light;
  --bg: #FFFFFF;
  --bg-2: #F3F9F8;
  --surface: #FFFFFF;
  --surface-2: #EAF7F4;
  --surface-alpha: rgba(255, 255, 255, .86);
  --border: #D9E9E8;
  --border-soft: #E3EFEE;
  --divider: #E3EFEE;

  --text: #10252D;
  --text-2: #56707A;
  --text-3: #546D75;

  --acc: #00CDAA;
  --acc-2: #28C8D0;
  --acc-3: #14B8D4;
  --acc-text: #067A67;
  --on-acc: #04231D;
  --acc-soft: #E2F6F1;
  --acc-line: rgba(7, 141, 120, .35);
  --grad: linear-gradient(120deg, #00CDAA 0%, #28C8D0 100%);
  --grad-text: linear-gradient(100deg, #078D78 0%, #0A9F86 55%, #12A3AE 100%);

  --header-bg: rgba(255, 255, 255, .9);
  --field-bg: #F3F9F8;
  --hero-wash: radial-gradient(55% 70% at 80% 25%, rgba(0, 205, 170, .10), transparent 70%),
               linear-gradient(180deg, #EEF9F6 0%, #F5FBFA 60%, #FFFFFF 100%);
  --dots: rgba(16, 37, 45, .05);

  --cta-bg: #10252D;
  --cta-text: #FFFFFF;
  --cta-border: #10252D;
  --cta-hover-bg: #1A3540;

  --shadow-1: 0 1px 2px rgba(16, 37, 45, .04), 0 8px 24px rgba(16, 37, 45, .05);
  --shadow-2: 0 24px 60px rgba(16, 37, 45, .10), 0 2px 6px rgba(16, 37, 45, .04);
  --glow: 0 8px 20px rgba(0, 205, 170, .28);
  --hover-bg: #F3F9F8;

  --warn: #C2410C;
  --warn-strong: #B45309;
  --warn-text: #4A3511;
  --warn-bg: #FFF9EC;
  --warn-border: #F6DFA8;

  --tag-ref-bg: #E7EFFC; --tag-ref: #1E40AF;
  --tag-gen-bg: #DDF5EE; --tag-gen: #065F4F;
  --tag-bio-bg: #F1E8FB; --tag-bio: #5B2B8A;
  --tag-sim-bg: #EEF3F3; --tag-sim: #34474D;

  --deco: .55;
}

:root {
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Inter Tight", Inter, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --largura: 1200px;
  --gutter: 24px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; background: var(--bg); }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--acc-text); text-underline-offset: 3px; }
a:hover { color: var(--text); }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.025em; line-height: 1.12; margin: 0; color: var(--text); }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--acc); color: var(--on-acc); }

/* troca de tema: transição curta só durante a troca */
html.troca-tema *, html.troca-tema *::before, html.troca-tema *::after {
  transition: background-color .3s ease, border-color .3s ease, color .2s ease, fill .3s ease, box-shadow .3s ease !important;
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pular { position: absolute; left: -999px; top: 8px; background: var(--acc); color: var(--on-acc); padding: 10px 16px; border-radius: var(--r-sm); z-index: 99; font-weight: 700; }
.pular:focus { left: 8px; }
.container { max-width: var(--largura); margin: 0 auto; padding: 0 var(--gutter); }
.centro { margin-left: auto; margin-right: auto; }
.mono { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.acento { color: var(--acc-text); }
.acento-escuro { color: var(--acc-text); }

/* ---------- componentes base ---------- */

/* ícone em quadrado tingido */
.ico { width: 36px; height: 36px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); background: var(--acc-soft); color: var(--acc-text); border: 1px solid color-mix(in srgb, var(--acc) 22%, transparent); }
.ico svg { width: 18px; height: 18px; }
.ico-grad { background: var(--grad); color: var(--on-acc); border: 0; box-shadow: var(--glow); }

/* rótulo de seção com traço */
.olho { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--acc-text); }
.olho::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; opacity: .8; }

.sec-cab { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 24px; margin-bottom: 22px; }
.sec-cab h2 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 700; margin-top: 8px; }
.sec-cab > p { margin: 0; color: var(--text-2); font-size: 14px; }

/* cartões */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }

/* botões */
.botao, .botao-sec, .botao-contorno {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 20px;
  border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 15px; font-family: var(--sans); cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.botao { background: var(--grad); color: var(--on-acc); border: 0; box-shadow: var(--glow); }
.botao:hover { color: var(--on-acc); transform: translateY(-1px); }
.botao-sec { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.botao-sec:hover { color: var(--text); border-color: var(--acc-line); background: var(--surface-2); }
.botao-contorno { width: 100%; background: var(--cta-bg); color: var(--cta-text); border: 1px solid var(--cta-border); }
.botao-contorno:hover { color: var(--cta-text); background: var(--cta-hover-bg); }
.seta-dir { transition: transform .2s ease; }
a:hover .seta-dir, button:hover .seta-dir { transform: translateX(3px); }

/* chips */
.chip, .chip-escuro { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 13px; font-weight: 500; color: var(--text); padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-alpha); }
a.chip:hover, a.chip-escuro:hover { color: var(--text); border-color: var(--acc-line); background: var(--surface-2); }
.ponto-luz { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); flex: none; }

/* etiquetas */
.tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; padding: 4px 8px; border-radius: 6px; color: var(--acc-text); background: var(--acc-soft); border: 1px solid var(--acc-line); white-space: nowrap; }
.tag-cat { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; padding: 5px 10px; border-radius: 8px; background: var(--tag-sim-bg); color: var(--tag-sim); }
.tag-cat.ref { background: var(--tag-ref-bg); color: var(--tag-ref); }
.tag-cat.gen { background: var(--tag-gen-bg); color: var(--tag-gen); }
.tag-cat.bio { background: var(--tag-bio-bg); color: var(--tag-bio); }

/* campos de busca */
.busca { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--field-bg); color: var(--text-3); transition: border-color .2s ease, box-shadow .2s ease; }
.busca:focus-within { border-color: var(--acc-line); box-shadow: 0 0 0 4px var(--acc-soft); }
.busca input[type=search] { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; outline: none; }
.busca input::placeholder { color: var(--text-3); opacity: 1; }
.busca input[type=search]::-webkit-search-cancel-button { filter: grayscale(1); opacity: .6; }
.busca button { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.busca svg { flex: none; }
.busca.carregando button { opacity: .75; pointer-events: none; }
.busca.carregando button .seta-dir { display: none; }
.busca.carregando button::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: gira .7s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

.busca-grande { max-width: 600px; padding: 7px 7px 7px 18px; border-radius: 16px; background: var(--surface-alpha); box-shadow: var(--shadow-1); }
.busca-grande input[type=search] { height: 48px; font-size: 16px; }
.busca-grande button { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 11px; background: var(--grad); color: var(--on-acc); font-size: 15px; box-shadow: var(--glow); }
.busca-grande.compacta { margin-top: 22px; }

/* listas em linhas */
.lista-linhas { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); }
.lista-linhas > a, .lista-linhas > div { display: flex; align-items: center; gap: 14px 16px; padding: 15px 20px; border-bottom: 1px solid var(--divider); text-decoration: none; color: var(--text); transition: background-color .15s ease; }
.lista-linhas > :last-child { border-bottom: 0; }
.lista-linhas > a:hover { background: var(--hover-bg); color: var(--text); }
.ll-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ll-texto strong { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.ll-texto small { font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.ll-ico { width: 32px; height: 32px; border-radius: 9px; }
.ll-ico svg { width: 15px; height: 15px; }
.selo-data { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-2); font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; color: var(--text-2); white-space: nowrap; }
.selo-data::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 8px var(--acc); }

.link-mais { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--acc-text); }
.link-mais:hover { color: var(--acc-text); text-decoration: underline; }

/* aviso médico */
.aviso { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--warn-border); border-radius: var(--r-md); background: var(--warn-bg); padding: 16px 22px; color: var(--warn); }
.aviso p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--warn-text); }
.aviso strong { color: var(--warn-strong); font-weight: 700; }
.aviso svg { flex: none; margin-top: 1px; }

/* ---------- cabeçalho ---------- */
.topo { position: sticky; top: 0; z-index: 50; background: var(--header-bg); border-bottom: 1px solid var(--divider); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); }
.topo-in { max-width: var(--largura); margin: 0 auto; padding: 0 var(--gutter); height: 64px; display: flex; align-items: center; gap: 28px; }
.marca { display: inline-flex; align-items: center; gap: 11px; flex: none; text-decoration: none; color: var(--text); font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.marca:hover { color: var(--text); }
.marca-ico { width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--acc-soft); border: 1px solid color-mix(in srgb, var(--acc) 25%, transparent); }
.marca-ico img { width: 28px; height: 28px; display: block; }
.marca b { font-weight: 700; color: var(--acc-text); }
.busca-topo { flex: 0 1 300px; height: 38px; padding: 0 12px; border-radius: 999px; font-size: 14px; }
.busca-topo input[type=search] { height: 36px; font-size: 14px; }
.busca-topo button { display: none; }
.topo-acoes { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.menu { display: flex; align-items: center; gap: 2px; font-weight: 500; font-size: 14px; }
.menu a { color: var(--text); text-decoration: none; padding: 8px 14px; border-radius: 10px; }
.menu a:hover { background: var(--hover-bg); color: var(--text); }
.menu a[aria-current] { color: var(--acc-text); }
.menu-btn { display: none; }

/* botão de tema: sol no claro, lua no escuro */
.tema-btn { position: relative; width: 36px; height: 36px; flex: none; margin-left: 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-alpha); color: var(--text); cursor: pointer; padding: 0; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.tema-btn:hover { border-color: var(--acc-line); background: var(--surface-2); box-shadow: 0 0 0 4px var(--acc-soft); }
.tema-btn svg { width: 17px; height: 17px; display: block; }
.tema-btn .ic-sol { color: #E8A317; }
.tema-btn .ic-lua { color: var(--acc-text); }
[data-theme="light"] .tema-btn .ic-lua, [data-theme="light"] .tema-btn .so-escuro,
[data-theme="dark"] .tema-btn .ic-sol, [data-theme="dark"] .tema-btn .so-claro { display: none; }
.tema-btn.girando svg { animation: tema-gira .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes tema-gira { from { transform: rotate(-90deg) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
[data-theme="light"] .tema-btn::after { content: "Mudar para o tema escuro"; }
[data-theme="dark"] .tema-btn::after { content: "Mudar para o tema claro"; }
.tema-btn::after { position: absolute; top: calc(100% + 10px); right: 0; padding: 6px 10px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; opacity: 0; transform: translateY(-4px); transition: opacity .15s ease, transform .15s ease; }
.tema-btn:hover::after, .tema-btn:focus-visible::after { opacity: 1; transform: none; }

/* ---------- home: hero ---------- */
.hero { position: relative; background: var(--hero-wash); overflow: hidden; }
.hero::before, .hero-med::before, .cab-pagina::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--dots) 1px, transparent 1px); background-size: 24px 24px; -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%); mask-image: linear-gradient(180deg, #000 40%, transparent 100%); pointer-events: none; }
.hero-in { position: relative; max-width: var(--largura); margin: 0 auto; padding: 52px var(--gutter) 128px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 48px; }
.hero-texto { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; min-width: 0; }
.selo { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-alpha); font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; color: var(--text-2); }
.selo svg { color: var(--acc-text); }
.hero h1 { font-size: clamp(40px, 5.4vw, 66px); font-weight: 800; line-height: 1.02; letter-spacing: -.045em; max-width: 12ch; }
.grad-texto { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero-sub { margin: 0; font-size: 17px; line-height: 1.6; color: var(--text-2); max-width: 48ch; }
.hero .busca-grande { width: 100%; }
.chips-alta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 600px; }
.chips-alta .rot-alta { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--acc-text); }

/* ficha de destaque */
.ficha-palco { position: relative; justify-self: end; width: 100%; max-width: 390px; }
.ficha-deco { position: absolute; top: -70px; left: -110px; width: 560px; height: 510px; max-width: none; opacity: var(--deco); pointer-events: none; overflow: visible; }
.ficha-sombra { position: absolute; inset: 16px -14px -14px 16px; border: 1px solid var(--border-soft); border-radius: var(--r-xl); background: var(--surface-alpha); }
.ficha { position: relative; border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); padding: 22px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow-2); }
.ficha-topo { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ficha-topo .mono { color: var(--text-3); font-size: 10px; }
.ficha-id { display: flex; align-items: center; gap: 14px; }
.ficha-id .ico { width: 40px; height: 40px; border-radius: 12px; }
.ficha-id .ico svg { width: 20px; height: 20px; }
.ficha-nome { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -.025em; line-height: 1.1; }
.ficha-classe { color: var(--text-2); font-size: 13px; margin-top: 3px; }
.ficha-dl { margin: 0; display: flex; flex-direction: column; font-size: 14px; }
.ficha-dl div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--divider); }
.ficha-dl div:last-child { border-bottom: 1px solid var(--divider); }
.ficha-dl dt { color: var(--text-2); }
.ficha-dl dd { margin: 0; color: var(--text); font-weight: 700; text-align: right; display: inline-flex; align-items: center; gap: 6px; }
.ficha-dl dd.ok, .ficha-dl dd.preco { color: var(--acc-text); }
.ficha-dl dd.preco { font-size: 15px; }

/* ---------- home: pilares ---------- */
.pilares { position: relative; z-index: 2; max-width: var(--largura); margin: -72px auto 0; padding: 0 var(--gutter); }
.pilares-grade { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-2); overflow: hidden; }
.pilar { position: relative; padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.pilar + .pilar { border-left: 1px solid var(--divider); }
.pilar-topo { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.pilar-topo .mono { color: var(--text-3); font-size: 10px; }
.pilar strong { font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: -.015em; }
.pilar p { margin: 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }

/* ---------- home: acervo e seções ---------- */
.acervo { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 24px; margin: 0; padding: 26px 0 0; color: var(--text-2); font-size: 14px; }
.acervo .mono { color: var(--acc-text); font-weight: 600; margin-right: 4px; }
.acervo b { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.03em; color: var(--text); margin-right: 6px; }
.acervo span + span { padding-left: 24px; border-left: 1px solid var(--border); }

.secoes-home { padding-top: 0; padding-bottom: 72px; display: flex; flex-direction: column; gap: 76px; }
.secoes-home > .acervo + section { margin-top: -18px; }

/* A–Z */
.painel-letras { padding: 14px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); }
.grade-letras { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 8px; }
.grade-letras > a, .grade-letras > span { height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 16px; transition: border-color .15s ease, background-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.grade-letras a:hover { border-color: var(--acc-line); background: var(--surface-2); color: var(--text); transform: translateY(-1px); }
.grade-letras a[aria-current] { background: var(--grad); border-color: transparent; color: var(--on-acc); box-shadow: var(--glow); }
.grade-letras .inativa { color: var(--text-3); opacity: .45; background: transparent; border-color: var(--border-soft); }

/* categorias */
.grade-cat { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card-cat { --hue: var(--acc); position: relative; overflow: hidden; min-height: 168px; padding: 18px 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 6px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.card-cat::before { content: ""; position: absolute; top: -50px; right: -40px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--hue) 34%, transparent) 0%, transparent 68%); opacity: .75; transition: opacity .25s ease, transform .25s ease; pointer-events: none; }
[data-theme="light"] .card-cat::before { background: radial-gradient(circle, color-mix(in srgb, var(--hue) 20%, transparent) 0%, transparent 68%); }
.card-cat:hover { color: var(--text); transform: translateY(-3px); border-color: color-mix(in srgb, var(--hue) 45%, var(--border)); box-shadow: var(--shadow-2); }
.card-cat:hover::before { opacity: 1; transform: scale(1.1); }
.card-cat-topo { position: relative; display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.card-cat .ico { background: color-mix(in srgb, var(--hue) 16%, transparent); border-color: color-mix(in srgb, var(--hue) 30%, transparent); color: var(--hue); }
[data-theme="light"] .card-cat .ico { background: color-mix(in srgb, var(--hue) 12%, #fff); color: color-mix(in srgb, var(--hue) 78%, #10252D); }
.seta-circ { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--surface-alpha); color: var(--text-2); transition: color .2s ease, border-color .2s ease, transform .2s ease; }
.card-cat:hover .seta-circ { color: var(--text); border-color: color-mix(in srgb, var(--hue) 50%, var(--border)); transform: translate(2px, -2px); }
.card-cat strong { position: relative; font-family: var(--display); font-size: 15.5px; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; }
.card-cat .exemplos { position: relative; font-size: 13px; line-height: 1.5; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- páginas internas: topo ---------- */
.hero-med, .cab-pagina { position: relative; background: var(--hero-wash); border-bottom: 1px solid var(--divider); overflow: hidden; }
.hero-med-in { position: relative; max-width: var(--largura); margin: 0 auto; padding: 30px var(--gutter) 96px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); gap: 40px; align-items: end; }
.hero-med-texto { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.trilha { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); display: flex; gap: 10px; flex-wrap: wrap; }
.trilha a { color: var(--text-2); text-decoration: none; }
.trilha a:hover { color: var(--acc-text); }
.trilha [aria-current] { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-med h1 { font-size: clamp(38px, 6.4vw, 72px); font-weight: 800; line-height: 1; letter-spacing: -.045em; overflow-wrap: anywhere; }
.hero-med .hero-sub { font-size: 17px; }
.botoes { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
.ficha-tecnica { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); padding: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-2); }
.ficha-tecnica > .mono { font-size: 10px; color: var(--text-3); }
.ft-item { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--divider); }
.ft-item span, .ft-preco span { font-size: 12.5px; color: var(--text-2); }
.ft-item strong { font-size: 15px; font-weight: 600; color: var(--text); }
.ft-item a { color: var(--text); }
.ft-item a:hover { color: var(--acc-text); }
.ft-preco { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.ft-preco > div { display: flex; flex-direction: column; gap: 2px; }
.ft-preco strong { font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.ft-preco .mono { font-size: 10px; color: var(--text-3); }
.faixa-previa { background: #FFE08A; color: #4A3500; text-align: center; padding: 10px; font-weight: 700; font-size: 14px; }

.cab-pagina .container { position: relative; padding-top: 40px; padding-bottom: 44px; }
.cab-pagina h1 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; letter-spacing: -.04em; margin-top: 10px; }
.cab-pagina .sub { margin: 10px 0 0; color: var(--text-2); }
.letras-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; margin-top: 24px; max-width: 760px; }
.letras-nav > a, .letras-nav > span { height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-alpha); font-family: var(--display); font-weight: 700; font-size: 14px; text-decoration: none; color: var(--text); }
.letras-nav a:hover { border-color: var(--acc-line); color: var(--text); }
.letras-nav > span { color: var(--text-3); opacity: .45; background: transparent; border-color: var(--border-soft); }
.letras-nav a[aria-current] { background: var(--grad); color: var(--on-acc); border-color: transparent; box-shadow: var(--glow); }

/* ---------- página de medicamento ---------- */
.sobe { margin-top: -56px; position: relative; }
.sobe-pouco { margin-top: 20px; }
.resumo { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 26px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow-2); }
.resumo-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.resumo-cab h2 { font-size: 22px; font-weight: 700; }
.resumo-cab .mono { color: var(--text-3); font-size: 10.5px; }
.grade-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.card-resumo { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-2); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.card-resumo .icone { width: 34px; height: 34px; border-radius: 10px; background: var(--acc-soft); color: var(--acc-text); display: flex; align-items: center; justify-content: center; }
.card-resumo .mono { font-size: 10.5px; color: var(--acc-text); font-weight: 600; }
.card-resumo p { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.55; color: var(--text); }
.card-resumo.alerta { border-color: var(--warn-border); background: var(--warn-bg); }
.card-resumo.alerta .icone { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.card-resumo.alerta .mono { color: var(--warn-strong); }
.nota { margin: 0; font-size: 13px; color: var(--text-2); }

.layout-med { padding-top: 28px; padding-bottom: 64px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.coluna-principal { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.coluna-lateral { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.cartao { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 28px 30px; box-shadow: var(--shadow-1); }
.cartao > h2 { font-size: 24px; font-weight: 700; margin: 8px 0 14px; }
.cartao > p:first-child { margin-top: 0; }
.cartao > .mono, .rotulo { color: var(--acc-text); font-weight: 600; }
.intro p { color: var(--text-2); font-size: 16.5px; line-height: 1.75; }
.bula { padding-top: 24px; }
.bula-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 8px; }
.bula-cab h2 { font-size: 24px; font-weight: 700; margin: 8px 0 6px; }
.nota-bula { margin: 0; font-size: 13.5px; color: var(--text-2); }
.abas { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.abas button { border: 0; background: transparent; font: inherit; font-weight: 600; font-size: 14px; color: var(--text-2); padding: 9px 16px; border-radius: 9px; cursor: pointer; min-height: 40px; }
.abas button:hover { color: var(--text); }
.abas button[aria-selected="true"] { background: var(--grad); color: var(--on-acc); box-shadow: var(--glow); }
.versao-titulo { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--acc-text); font-weight: 600; margin: 18px 0 0; }
.js .versao[data-oculta] { display: none; }
.secao { display: flex; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--divider); }
.secao:last-of-type { border-bottom: 0; }
.secao .num { font-family: var(--mono); font-size: 12px; color: var(--acc-text); padding-top: 5px; flex: none; width: 22px; }
.secao-corpo { min-width: 0; flex: 1; }
.secao-corpo h4 { font-size: 20px; font-weight: 700; margin: 0 0 10px; letter-spacing: -.015em; }
.secao-corpo p { margin: 0 0 12px; font-size: 16.5px; line-height: 1.75; color: var(--text-2); }
.secao-corpo p.subtitulo { font-weight: 700; color: var(--text); margin-top: 16px; }
.secao-corpo ul { margin: 0 0 12px; padding-left: 20px; color: var(--text-2); font-size: 16.5px; line-height: 1.7; }

.lista-produtos { display: flex; flex-direction: column; gap: 10px; }
.linha-produto { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 15px 18px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-2); text-decoration: none; color: var(--text); transition: border-color .15s ease, background-color .15s ease; }
a.linha-produto:hover { border-color: var(--acc-line); background: var(--surface-2); color: var(--text); }
.lp-nome { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lp-nome strong { font-weight: 700; font-size: 16px; }
.lp-nome span { font-size: 13.5px; color: var(--text-2); }
.lp-preco { font-family: var(--display); font-weight: 800; font-size: 17px; min-width: 150px; text-align: right; letter-spacing: -.01em; }
.lp-preco small { font-family: var(--sans); font-weight: 500; font-size: 12px; color: var(--text-2); }

.tabela-dobra summary { cursor: pointer; font-weight: 700; padding: 12px 0; min-height: 44px; color: var(--text); }
.tabela-rolagem { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); margin-top: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
th { text-align: left; background: var(--bg-2); color: var(--text); font-weight: 700; padding: 11px 14px; white-space: nowrap; }
td { padding: 11px 14px; border-top: 1px solid var(--divider); vertical-align: top; color: var(--text); }
td small { display: block; color: var(--text-2); font-size: 12px; }
.dir { text-align: right; white-space: nowrap; }
.mono-td { font-family: var(--mono); font-size: 12px; }
.faq { border-top: 1px solid var(--divider); padding: 14px 0; }
.faq summary { font-weight: 700; font-size: 16.5px; cursor: pointer; min-height: 32px; }
.faq p { margin: 10px 0 0; color: var(--text-2); line-height: 1.7; }

.indice { border-radius: var(--r-xl); padding: 22px; display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-1); }
.indice > .mono { color: var(--text-3); font-size: 10px; padding-bottom: 8px; }
.indice a { display: flex; gap: 12px; padding: 8px 0; color: var(--text); text-decoration: none; font-weight: 500; font-size: 14.5px; line-height: 1.35; }
.indice a:hover { color: var(--acc-text); }
.indice a .mono { color: var(--acc-text); font-size: 11px; padding-top: 2px; flex: none; letter-spacing: .05em; }
.lateral-lista { padding: 22px; display: flex; flex-direction: column; }
.lateral-lista .rotulo { padding-bottom: 8px; font-size: 10.5px; }
.lateral-lista a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--divider); text-decoration: none; color: var(--text); font-weight: 600; font-size: 14.5px; }
.lateral-lista a:last-child { border-bottom: 0; }
.lateral-lista a:hover { color: var(--acc-text); }
.lateral-lista a span { color: var(--text-3); }

/* ---------- listas e páginas simples ---------- */
.conteudo-lista { padding-top: 30px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 18px; }
.contagem { margin: 0; color: var(--text-2); font-size: 14px; }
.grade-itens { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.item-med { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); box-shadow: var(--shadow-1); transition: border-color .15s ease, transform .15s ease; }
.item-med:hover { border-color: var(--acc-line); color: var(--text); transform: translateY(-2px); }
.item-med strong { font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.3; letter-spacing: -.01em; }
.item-med span { font-size: 13.5px; color: var(--text-2); }
.item-med .mono { font-size: 10px; color: var(--acc-text); font-weight: 600; margin-top: 4px; }
.h2-lista { font-size: 22px; font-weight: 700; margin-top: 12px; }
.vazio { margin: 0; padding: 22px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text-2); }
.texto-institucional { margin-top: 28px; margin-bottom: 72px; max-width: 820px; }
.texto-institucional h2 { font-size: 21px; font-weight: 700; margin: 26px 0 8px; }
.texto-institucional p, .texto-institucional li { font-size: 16.5px; line-height: 1.75; color: var(--text-2); }
.texto-institucional strong { color: var(--text); }

/* ---------- anúncios ---------- */
.anuncio { max-width: var(--largura); margin: 28px auto; padding: 0 var(--gutter); text-align: center; min-height: 90px; }
.coluna-lateral .anuncio, .secao + .anuncio, .bula .anuncio { padding: 0; margin: 8px 0; }
.anuncio-rotulo { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--text-3); text-transform: uppercase; margin-bottom: 4px; }
.anuncio-previa { border: 1px dashed var(--border); border-radius: 12px; background: var(--bg-2); color: var(--text-3); font-family: var(--mono); font-size: 12px; letter-spacing: .1em; display: flex; align-items: center; justify-content: center; }
.anuncio-topo.anuncio-previa, .anuncio-rodape.anuncio-previa { height: 90px; max-width: 728px; }
.anuncio-conteudo.anuncio-previa { height: 280px; max-width: 336px; margin-left: auto; margin-right: auto; }
.anuncio-lateral.anuncio-previa { height: 250px; }
.anuncio-lateral2.anuncio-previa { height: 600px; }
@media (min-width: 1000px) { .grudento { position: sticky; top: 84px; } }

/* ---------- rodapé ---------- */
.aviso-faixa { max-width: var(--largura); margin: 0 auto; padding: 0 var(--gutter) 64px; }
.rodape { position: relative; overflow: hidden; background: var(--bg-2); border-top: 1px solid var(--divider); color: var(--text-2); }
.rodape-onda { position: absolute; right: -40px; bottom: -10px; width: 520px; max-width: 70%; height: auto; color: var(--acc); opacity: calc(var(--deco) * .5); pointer-events: none; }
.rodape-in { position: relative; max-width: var(--largura); margin: 0 auto; padding: 44px var(--gutter) 28px; display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: flex-start; font-size: 14px; }
.rodape-marca { max-width: 360px; }
.rodape-marca p { margin: 14px 0 0; line-height: 1.6; font-size: 13.5px; }
.rodape nav { display: flex; flex-wrap: wrap; gap: 10px 26px; padding-top: 8px; }
.rodape nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 14px; }
.rodape nav a:hover { color: var(--acc-text); }
.rodape-base { position: relative; max-width: var(--largura); margin: 0 auto; padding: 18px var(--gutter) 30px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 12.5px; color: var(--text-3); }
.rodape-base::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--divider); }
.rodape-base p { margin: 0; }

/* ---------- responsivo ---------- */
@media (max-width: 1080px) {
  .grade-cat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-med { grid-template-columns: minmax(0, 1fr); }
  .coluna-lateral { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 960px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); padding-top: 40px; gap: 56px; }
  .ficha-palco { justify-self: center; max-width: 420px; }
  .hero h1 { max-width: none; }
  .pilares-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pilar:nth-child(3) { border-left: 0; }
  .pilar:nth-child(n+3) { border-top: 1px solid var(--divider); }
  .grade-letras { grid-template-columns: repeat(9, minmax(0, 1fr)); }
  .hero-med-in { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .topo-in { gap: 16px; }
  .busca-topo { flex-basis: 220px; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .topo-in { height: auto; min-height: 60px; flex-wrap: wrap; gap: 10px 8px; padding-top: 10px; padding-bottom: 10px; }
  .marca { font-size: 17px; }
  .busca-topo { order: 3; flex: 1 1 100%; max-width: none; }
  .topo-acoes { gap: 4px; }
  .js .menu-btn { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-alpha); color: var(--text); cursor: pointer; padding: 0; }
  .js .menu { display: none; position: absolute; top: calc(100% + 1px); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 14px; background: var(--bg); border-bottom: 1px solid var(--divider); box-shadow: var(--shadow-2); }
  .js .menu.aberto { display: flex; }
  .js .menu a { padding: 12px 8px; font-size: 16px; border-bottom: 1px solid var(--divider); border-radius: 0; }
  .js .menu a:last-child { border-bottom: 0; }
  .tema-btn::after { display: none; }
  .hero-in { padding-top: 32px; padding-bottom: 104px; gap: 40px; }
  .hero-sub { font-size: 16px; }
  .busca-grande { padding-left: 14px; }
  .busca-grande button { padding: 0 16px; }
  .ficha-deco { display: none; }
  .ficha-sombra { inset: 12px -8px -10px 12px; }
  .pilar { padding: 18px 16px 20px; }
  .acervo span + span { padding-left: 0; border-left: 0; }
  .secoes-home { gap: 56px; }
  .grade-letras { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
  .grade-letras > a, .grade-letras > span { height: 44px; }
  .painel-letras { padding: 10px; }
  .lista-linhas > a, .lista-linhas > div { flex-wrap: wrap; padding: 14px 16px; }
  .lista-linhas .selo-data { margin-left: 46px; }
  .cartao { padding: 22px 18px; }
  .resumo { padding: 20px 18px; }
  .secao { gap: 12px; }
  .secao-corpo h4 { font-size: 18px; }
  .secao-corpo p, .secao-corpo ul { font-size: 16px; }
  .lp-preco { text-align: left; min-width: 0; }
  .rodape-in { flex-direction: column; }
  .aviso { padding: 14px 16px; }
}
@media (max-width: 480px) {
  .pilares-grade { grid-template-columns: minmax(0, 1fr); }
  .pilar + .pilar { border-left: 0; border-top: 1px solid var(--divider); }
  .grade-cat { grid-template-columns: minmax(0, 1fr); }
  .card-cat { min-height: 0; }
  .busca-grande button { padding: 0 14px; }
  .marca-txt { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
