/* Bancada de testes: páginas como folhas de especificação sobre grafite, com a interface real do
   app em destaque. Cores e fontes vêm do sistema de design do app (ui/design/XdTheme.kt);
   o tema escuro é o da marca, o claro é para leitura longa. */
:root {
  /* cor (escuro, padrão) */
  --bg: #0f1214;
  --panel: #15191c;
  --panel-2: #1b2024;
  --panel-3: #252b30;
  --line: rgba(205, 220, 232, .10);
  --line-2: rgba(205, 220, 232, .19);
  --fg: #edf1f3;
  --fg-2: #b6c1c8;
  --fg-3: #8b979e;
  --accent: #74d863;
  --accent-ink: #062a08;
  --accent-text: #8fe57f;
  --accent-soft: rgba(116, 216, 99, .14);
  --ok: #7bd77d;
  --warn: #e8c55a;
  --err: #ff9ea2;
  --info: #80b8ff;
  --changed: #c7a0ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --stage: #0b0e0f;
  /* tipo */
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-display: "Barlow Semi Condensed", "Barlow", "Arial Narrow", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --step--1: .875rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.2rem + 1.8vw, 2.35rem);
  --step-4: clamp(2.5rem, 1.6rem + 4vw, 4.4rem);
  /* espaço */
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 14px;
  --radius-s: 9px;
  --max: 1180px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2f4f1;
    --panel: #ffffff;
    --panel-2: #e8ebe7;
    --panel-3: #dce0db;
    --line: rgba(19, 23, 26, .11);
    --line-2: rgba(19, 23, 26, .21);
    --fg: #12161a;
    --fg-2: #39434a;
    --fg-3: #56626a;
    --accent: #74d863;
    --accent-ink: #062a08;
    --accent-text: #23701a;
    --accent-soft: rgba(56, 150, 40, .12);
    --ok: #2e7d32;
    --warn: #8a6100;
    --err: #b3261e;
    --info: #1f5fbf;
    --changed: #6b3fb5;
    --shadow: 0 16px 40px rgba(20, 30, 25, .14);
    --stage: #0f1214;
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f2f4f1;
  --panel: #ffffff;
  --panel-2: #e8ebe7;
  --panel-3: #dce0db;
  --line: rgba(19, 23, 26, .11);
  --line-2: rgba(19, 23, 26, .21);
  --fg: #12161a;
  --fg-2: #39434a;
  --fg-3: #56626a;
  --accent: #74d863;
  --accent-ink: #062a08;
  --accent-text: #23701a;
  --accent-soft: rgba(56, 150, 40, .12);
  --ok: #2e7d32;
  --warn: #8a6100;
  --err: #b3261e;
  --info: #1f5fbf;
  --changed: #6b3fb5;
  --shadow: 0 16px 40px rgba(20, 30, 25, .14);
  --stage: #0f1214;
  color-scheme: light;
}

/* Fontes do próprio app (app/src/main/res/font, OFL), recortadas no build */
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/barlow-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/barlow-semi-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/barlow-semi-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 600; font-style: normal; font-display: swap; src: url("../fonts/jetbrains-mono.woff2") format("woff2"); }

/* ---------- base ----------
   As regras de elementos (títulos, links, código, tabelas) não valem dentro do simulador (.sim),
   que traz o próprio CSS do app; por isso o :not(.sim *). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--step-0)/1.62 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }

:where(h1, h2, h3, h4):not(.sim *) { font-family: var(--f-display); font-weight: 700; line-height: 1.08; letter-spacing: .005em; text-wrap: balance; margin: 0; }
:where(h1):not(.sim *) { font-size: var(--step-4); }
:where(h2):not(.sim *) { font-size: var(--step-3); }
:where(h3):not(.sim *) { font-size: var(--step-2); font-weight: 600; line-height: 1.15; }
:where(h4):not(.sim *) { font-size: var(--step-1); font-weight: 600; line-height: 1.2; }
:where(p):not(.sim *) { margin: 0; }
:where(img):not(.sim *) { height: auto; }
:where(a):not(.sim *) { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:where(a):not(.sim *):hover { text-decoration-thickness: 2px; }
:where(code, kbd, samp, pre):not(.sim *) { font-family: var(--f-mono); font-size: .9em; }
:where(:not(pre) > code):not(.sim *) {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .08em .38em;
  overflow-wrap: anywhere;
}
:where(kbd):not(.sim *) {
  display: inline-block;
  min-width: 1.6em;
  padding: .05em .4em;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--panel);
  color: var(--fg);
  font-size: .82em;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}
:where(hr):not(.sim *) { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
:where(table):not(.sim *) { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }

/* foco sempre visível para teclado */
:focus { outline: none; }
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-s);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.xi { display: inline-block; flex: none; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.u-mono { font-family: var(--f-mono); font-size: .9em; }
.u-muted { color: var(--fg-3); }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

[hidden] { display: none !important; }

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

/* ---------- cabeçalho ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.2) blur(10px); }
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--fg);
  text-decoration: none;
  font: 700 1.32rem/1 var(--f-display);
  letter-spacing: .01em;
  white-space: nowrap;
}
.brand img { width: 34px; height: 34px; }
.brand .plus { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-s);
  color: var(--fg-2);
  font-weight: 600;
  font-size: .97rem;
  text-decoration: none;
}
.site-nav a:hover { color: var(--fg); background: var(--panel-2); }
.site-nav a[aria-current="page"] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--accent); border-radius: var(--radius-s) var(--radius-s) 0 0; }
.site-nav .ext .xi { opacity: .6; }
.header-tools { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
}
.icon-btn:hover { color: var(--fg); background: var(--panel-2); }
.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  background: var(--panel);
  color: var(--fg-3);
  font: 500 .92rem var(--f-body);
  cursor: pointer;
}
.search-btn:hover { color: var(--fg-2); border-color: var(--fg-3); }
.search-btn kbd { font-size: .74rem; }
.menu-btn { display: none; }
@media (max-width: 1040px) { .header-tools .header-dl { display: none; } }

@media (max-width: 880px) {
  .menu-btn { display: inline-grid; }
  .site-nav {
    position: fixed;
    inset: calc(61px + env(safe-area-inset-top, 0px)) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px var(--gutter) 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--line-2);
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; font-size: 1.05rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
  .search-btn .label, .search-btn kbd { display: none; }
  .search-btn { width: 40px; padding: 0; justify-content: center; }
}

/* ---------- rodapé ---------- */
.site-footer { margin-top: clamp(48px, 8vw, 96px); border-top: 1px solid var(--line); background: var(--panel); }
.site-footer .wrap { padding-block: 40px 28px; display: grid; gap: 28px; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; }
.footer-cols h2 { font: 700 .8rem/1 var(--f-body); text-transform: uppercase; letter-spacing: .14em; color: var(--fg-3); margin-bottom: 12px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-cols a { color: var(--fg-2); text-decoration: none; }
.footer-cols a:hover { color: var(--fg); text-decoration: underline; }
.footer-legal { display: grid; gap: 8px; color: var(--fg-3); font-size: var(--step--1); max-width: 90ch; }
.footer-meta { font-family: var(--f-mono); font-size: .78rem; color: var(--fg-3); }

/* fileira de pinos do chip: separador discreto */
.pins {
  height: 7px;
  background: var(--line-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='7'%3E%3Crect x='0' y='0' width='15' height='7' rx='2.5'/%3E%3C/svg%3E") left center / 26px 7px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='7'%3E%3Crect x='0' y='0' width='15' height='7' rx='2.5'/%3E%3C/svg%3E") left center / 26px 7px repeat-x;
}

main:focus { outline: none; }

/* ---------- idioma ---------- */
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--radius-s);
  color: var(--fg-2);
  font: 600 .9rem var(--f-body);
  letter-spacing: .04em;
  text-decoration: none;
}
.lang-btn:hover { color: var(--fg); background: var(--panel-2); }
.footer-lang { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: var(--step--1); color: var(--fg-3); }
.footer-lang a { color: var(--fg-2); }
.footer-lang a[aria-current="true"] { color: var(--fg); font-weight: 600; text-decoration: none; }
.lang-hint {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  font-size: var(--step--1);
}
.lang-hint .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-height: 44px; padding-block: 6px; }
.lang-hint p { margin: 0; color: var(--fg-2); }
.lang-hint .icon-btn { width: 32px; height: 32px; margin-left: auto; }

/* ---------- botões ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--panel);
  color: var(--fg);
  font: 600 1rem/1.15 var(--f-body);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.button:hover { background: var(--panel-2); border-color: var(--fg-3); }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.button.quiet { border-color: transparent; background: transparent; color: var(--accent-text); padding-inline: 8px; }
.button.quiet:hover { background: var(--accent-soft); }
.button.small { min-height: 36px; padding: 6px 13px; font-size: .92rem; }
.button[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* bloco de download: o botão e, embaixo, o que está sendo baixado */
.download { display: grid; gap: 8px; justify-items: start; }
.download .button.primary { min-height: 54px; padding-inline: 22px; font-size: 1.08rem; }
.download-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--step--1); color: var(--fg-3); }
.download-meta .u-mono { color: var(--fg-2); }

/* ---------- selos de estado ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font: 600 .74rem/1.5 var(--f-body);
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
}
.tag.ok { color: var(--ok); }
.tag.warn { color: var(--warn); }
.tag.info { color: var(--info); }
.tag.dev { color: var(--changed); }
.tag.plain { color: var(--fg-3); }

/* ---------- caixas de destaque ---------- */
.callout {
  margin: 1.4rem 0;
  padding: 14px 18px 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--c, var(--info));
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  background: color-mix(in srgb, var(--c, var(--info)) 7%, var(--panel));
}
.callout > :last-child { margin-bottom: 0; }
.callout-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px !important; font-weight: 700; color: var(--c, var(--info)); }
.callout.nota { --c: var(--info); }
.callout.aviso { --c: var(--warn); }
.callout.dica { --c: var(--ok); }
.callout.version.stable { --c: var(--accent-text); }
.callout.version.dev { --c: var(--changed); }

/* ---------- tabelas ---------- */
.table-wrap { max-width: 100%; overflow-x: auto; margin: 1.2rem 0; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel); }
.table-wrap:focus-visible { outline-offset: 3px; }
.table-wrap table { min-width: 100%; font-size: .95rem; }
.table-wrap th, .table-wrap td { padding: 9px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-wrap th { font: 700 .78rem/1.3 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); background: var(--panel-2); white-space: nowrap; }
.table-wrap tbody th { font: 600 .95rem/1.45 var(--f-body); letter-spacing: 0; text-transform: none; color: var(--fg); background: transparent; white-space: normal; }
.table-wrap tr:last-child td, .table-wrap tr:last-child th { border-bottom: 0; }
.table-wrap td code { white-space: nowrap; }
code.long, .table-wrap td code.long { white-space: normal; overflow-wrap: anywhere; }

/* ---------- código ---------- */
.code { position: relative; margin: 1.2rem 0; }
.code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--stage);
  color: #dfe7ea;
  font-size: .88rem;
  line-height: 1.6;
  tab-size: 2;
}
.code[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: -9px;
  left: 14px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--panel-3);
  color: var(--fg-2);
  font: 600 .7rem/1.5 var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 7px;
  background: rgba(21, 25, 28, .92);
  color: #c9d3d8;
  font: 600 .78rem var(--f-body);
  cursor: pointer;
}
.copy-btn:hover { color: #fff; border-color: rgba(255, 255, 255, .3); }
.t-c { color: #8a979e; }
.t-s { color: #9fd98f; font-weight: 600; }
.t-k { color: #9cc8ff; }
.t-v { color: #f0d58c; }

/* âncora dos títulos */
.anchor { margin-left: .3em; color: var(--fg-3); text-decoration: none; opacity: 0; font-weight: 400; transition: opacity .15s; }
:is(h2, h3, h4):hover > .anchor, .anchor:focus-visible { opacity: 1; }
@media (hover: none) { .anchor { opacity: .5; } }

/* detalhes recolhíveis */
details.more { margin: 1.2rem 0; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel); }
details.more > summary { padding: 12px 16px; cursor: pointer; font-weight: 600; list-style-position: inside; }
details.more[open] > summary { border-bottom: 1px solid var(--line); }
details.more > :not(summary) { margin-inline: 16px; }
details.more > :last-child { margin-bottom: 14px; }

/* ---------- placa de especificação (requisitos, dados de uma release) ---------- */
.spec { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin: 0; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--panel); overflow: hidden; }
.spec dt, .spec dd { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--fg-3); font: 600 .78rem/1.5 var(--f-body); letter-spacing: .08em; text-transform: uppercase; background: var(--panel-2); }
.spec dd { min-width: 0; font-weight: 500; }
.spec dt:last-of-type, .spec dd:last-of-type { border-bottom: 0; }
.spec .u-mono { font-size: .88em; }

/* ---------- prints reais do app ---------- */
.shot { margin: 0; display: grid; gap: 10px; }
.shot-frame {
  position: relative;
  padding: 8px;
  border-radius: 22px;
  background: linear-gradient(150deg, #1f2528, #090b0c 64%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), var(--shadow);
}
.shot-frame img { display: block; width: 100%; border-radius: 15px; background: #0f1214; }
.shot.portrait { max-width: 320px; }
.shot figcaption { font-size: var(--step--1); color: var(--fg-3); }
.shot figcaption b { color: var(--fg-2); font-weight: 600; }

/* ---------- busca ---------- */
.search-dialog {
  width: min(680px, calc(100% - 24px));
  max-height: min(78vh, 720px);
  margin: max(8vh, 12px) auto auto;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--fg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.search-dialog::backdrop { background: rgba(5, 8, 9, .62); }
.search-dialog[open] { display: flex; flex-direction: column; }
.search-field { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.search-field input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  outline: none;
}
.search-field input::placeholder { color: var(--fg-3); }
.search-results { overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.search-results ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.search-results a { display: block; padding: 10px 12px; border-radius: var(--radius-s); color: var(--fg); text-decoration: none; }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--panel-2); }
.search-results .r-page { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.search-results .r-title { display: block; font-weight: 600; }
.search-results .r-text { display: block; margin-top: 2px; color: var(--fg-2); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-results mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-empty, .search-hint { padding: 18px 14px; color: var(--fg-3); }
.search-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--fg-3); font-size: .8rem; }

/* ---------- avisos curtos (copiado, erro) ---------- */
.toast-site {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  translate: -50% 0;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  box-shadow: var(--shadow);
}

/* ---------- landing ---------- */
.section { padding-block: clamp(56px, 9vw, 104px); }
.section + .section { border-top: 1px solid var(--line); }
.eyebrow { display: block; margin-bottom: 14px; font: 600 .78rem/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.section-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head p { color: var(--fg-2); font-size: var(--step-1); line-height: 1.5; }

/* herói: texto e download à esquerda, a biblioteca real à direita */
.hero { padding-block: clamp(36px, 6vw, 72px) clamp(48px, 7vw, 88px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero h1 { font-size: clamp(3.2rem, 2rem + 6vw, 6.2rem); line-height: .92; letter-spacing: -.01em; }
.hero h1 .plus { color: var(--accent); }
.hero .lead { font-size: var(--step-1); line-height: 1.5; color: var(--fg-2); max-width: 36em; }
.hero .lead strong { color: var(--fg); font-weight: 600; }
.hero-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hero-links a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.hero-links a:hover { text-decoration: underline; }
.hero-note { display: flex; gap: 10px; align-items: flex-start; max-width: 36em; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel); color: var(--fg-2); font-size: var(--step--1); }
.hero-note .xi { color: var(--warn); margin-top: 2px; }
.hero-shot { min-width: 0; }
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-shot { order: 2; }
}

/* tour pelas telas reais */
.tour { display: grid; gap: 22px; }
.tour-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); scrollbar-width: none; justify-self: start; max-width: 100%; }
.tour-tabs::-webkit-scrollbar { display: none; }
.tour-tabs button {
  flex: none;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--fg-2);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.tour-tabs button:hover { color: var(--fg); }
.tour-tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.tour-panel { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(22px, 4vw, 48px); align-items: start; }
.tour-panel h3 { margin-bottom: 12px; }
.tour-panel ul { margin: 0 0 18px; padding-left: 1.1em; display: grid; gap: 8px; color: var(--fg-2); }
.tour-panel li::marker { color: var(--accent-text); }
.tour-panel .more-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.tour-panel .more-links a { font-weight: 600; }
@media (max-width: 880px) { .tour-panel { grid-template-columns: minmax(0, 1fr); } }

/* o que é diferente: folha de especificação, um item por linha */
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.facts li { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto; gap: 8px 32px; align-items: baseline; padding-block: 22px; border-bottom: 1px solid var(--line); }
.facts .fig { font: 700 clamp(2rem, 1.4rem + 2vw, 2.8rem)/1 var(--f-display); color: var(--fg); font-variant-numeric: tabular-nums; }
.facts .fig small { display: block; margin-top: 6px; font: 600 .74rem/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.facts h3 { font-size: var(--step-1); margin-bottom: 6px; }
.facts p { color: var(--fg-2); max-width: 62ch; }
.facts .src { font-size: var(--step--1); white-space: nowrap; }
@media (max-width: 760px) {
  .facts li { grid-template-columns: minmax(0, 1fr); }
  .facts .src { white-space: normal; }
}

/* desempenho medido */
.measured { display: grid; gap: 16px; }
.measured .context { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--fg-2); }
.measured td:nth-child(3) { font-family: var(--f-mono); font-size: .9em; white-space: nowrap; color: var(--fg); }

/* requisitos e limitações */
.req-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.req-grid h3 { margin-bottom: 14px; }
.limits { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.limits li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; color: var(--fg-2); }
.limits li .xi { margin-top: 3px; color: var(--warn); }
.limits li b { color: var(--fg); font-weight: 600; }
.planned { margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--line-2); }
.planned h4 { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.planned ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; color: var(--fg-2); }
@media (max-width: 860px) { .req-grid { grid-template-columns: minmax(0, 1fr); } }

/* entradas para a documentação e o simulador */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--line-2); }
.split > section { display: grid; gap: 14px; align-content: start; padding: clamp(22px, 3.4vw, 36px); background: var(--panel); }
.split h3 { display: flex; align-items: center; gap: 10px; }
.split p { color: var(--fg-2); }
.split ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.split ul a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--fg); text-decoration: none; font-weight: 500; }
.split ul a:hover { color: var(--accent-text); }
.split ul a .xi { color: var(--fg-3); }
@media (max-width: 820px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* projeto */
.project { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); }
.project p { color: var(--fg-2); max-width: 60ch; }
.project p + p { margin-top: 12px; }
.link-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.link-list a { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 13px 2px; border-bottom: 1px solid var(--line); color: var(--fg); text-decoration: none; }
.link-list a:hover { background: var(--panel); }
.link-list small { display: block; color: var(--fg-3); font-size: var(--step--1); }
.link-list .xi { color: var(--fg-3); }
@media (max-width: 820px) { .project { grid-template-columns: minmax(0, 1fr); } }

/* ---------- documentação ---------- */
.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr) 220px; gap: clamp(24px, 3vw, 48px); align-items: start; padding-block: 28px 0; }
.docs-side, .docs-toc { position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }

/* barra lateral */
.docs-side nav { display: grid; gap: 18px; padding-bottom: 24px; }
.docs-side h2 { font: 700 .74rem/1.3 var(--f-body); letter-spacing: .13em; text-transform: uppercase; color: var(--fg-3); margin: 0 0 6px 10px; }
.docs-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.docs-side a { display: block; padding: 6px 10px; border-radius: var(--radius-s); color: var(--fg-2); text-decoration: none; font-size: .96rem; line-height: 1.35; }
.docs-side a:hover { color: var(--fg); background: var(--panel); }
.docs-side a[aria-current="page"] { color: var(--fg); background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); font-weight: 600; }
.docs-side .home { font-weight: 600; color: var(--fg); }
.docs-side-toggle { display: none; }

/* conteúdo */
.docs-main { min-width: 0; max-width: 780px; padding-bottom: 40px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; font-size: var(--step--1); color: var(--fg-3); }
.crumbs a { color: var(--fg-3); }
.docs-main > header { display: grid; gap: 14px; padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.docs-main > header h1 { font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.2rem); }
.docs-main > header .desc { font-size: var(--step-1); line-height: 1.5; color: var(--fg-2); }
.page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: var(--step--1); color: var(--fg-3); }
.page-meta a { color: var(--fg-3); }
.page-meta a:hover { color: var(--fg-2); }

/* texto corrido em Markdown */
.prose { font-size: 1.04rem; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 2.4em; padding-top: .2em; font-size: clamp(1.55rem, 1.3rem + 1vw, 1.95rem); }
.prose h3 { margin-top: 1.9em; font-size: var(--step-1); font-weight: 700; }
.prose h4 { margin-top: 1.5em; font-size: 1.05rem; font-weight: 700; font-family: var(--f-body); }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .7em; }
.prose p, .prose li { max-width: 72ch; overflow-wrap: break-word; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose li > ul, .prose li > ol { margin-top: .35em; }
.prose li::marker { color: var(--fg-3); }
.prose strong { font-weight: 650; color: var(--fg); }
.prose blockquote { margin-inline: 0; padding-left: 16px; border-left: 3px solid var(--line-2); color: var(--fg-2); }
.prose a.ext::after { content: "↗"; display: inline-block; margin-left: 2px; font-size: .78em; text-decoration: none; color: var(--fg-3); }
.prose dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; }
.prose dt { font-weight: 600; }
.prose dd { margin: 0; color: var(--fg-2); }
.prose .shot { margin-block: 1.6em; }
.prose .table-wrap { margin-block: 1.3em; }

/* referência gerada: um ajuste por bloco */
.setting { padding: 16px 0; border-bottom: 1px solid var(--line); }
.setting:first-of-type { border-top: 1px solid var(--line); }
.setting h4 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 0 0 4px; font-family: var(--f-body); font-size: 1.05rem; }
.setting .key { font: 500 .82rem/1.4 var(--f-mono); color: var(--fg-3); min-width: 0; overflow-wrap: anywhere; }
.setting p { color: var(--fg-2); }
.setting .facts-line { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: .88rem; color: var(--fg-3); }
.setting .facts-line b { color: var(--fg-2); font-weight: 600; }
.setting .opts { margin-top: 6px; font-size: .9rem; color: var(--fg-2); }

/* índice da página */
.docs-toc h2 { font: 700 .74rem/1.3 var(--f-body); letter-spacing: .13em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 8px; }
.docs-toc ol { list-style: none; margin: 0; padding: 0 0 24px; border-left: 1px solid var(--line); }
.docs-toc a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--fg-3); text-decoration: none; font-size: .9rem; line-height: 1.35; }
.docs-toc .l3 a { padding-left: 24px; font-size: .86rem; }
.docs-toc a:hover { color: var(--fg); }
.docs-toc a.on { color: var(--fg); border-left-color: var(--accent); }

/* anterior / próxima */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; }
.pager a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-s); color: var(--fg); text-decoration: none; }
.pager a:hover { border-color: var(--fg-3); }
.pager small { color: var(--fg-3); font-size: .82rem; }
.pager .next { text-align: right; grid-column: 2; }

/* página de entrada da documentação */
.doc-index { display: grid; gap: 34px; margin-top: 8px; }
.doc-index section h2 { font-size: var(--step-1); margin-bottom: 10px; }
.doc-index ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.doc-index a { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--fg); text-decoration: none; }
.doc-index a:hover b { color: var(--accent-text); }
.doc-index a span { color: var(--fg-2); }
@media (max-width: 640px) { .doc-index a { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 1180px) {
  .docs { grid-template-columns: 230px minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
  .docs-side { position: static; max-height: none; overflow: visible; }
  .docs-side-toggle {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    padding: 11px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-s);
    background: var(--panel); color: var(--fg); font-weight: 600; cursor: pointer;
  }
  .docs-side-toggle .xi { transition: transform .15s; }
  .docs-side-toggle[aria-expanded="true"] .xi { transform: rotate(180deg); }
  .docs-side nav { display: none; margin-top: 10px; padding: 14px 6px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel); }
  .docs-side nav.open { display: grid; }
}
