/* Opecai: visual limpo, cores da logo (laranja e rosa), detalhes de linha do tempo de edição */
:root {
  --bg: #fffdfb;
  --surface: #ffffff;
  --surface-2: #fbf4f1;
  --ink: #1e1520;
  --muted: #5b5160;
  --line: #eadfe0;
  --orange: #f96a10;
  --orange-ink: #b34700;
  --orange-soft: #ffeddf;
  --pink: #ed77ab;
  --pink-ink: #a8366f;
  --pink-soft: #fde7f1;
  --on-orange: #1e1520;
  --ok: #17663a; --ok-bg: #def5e7;
  --beta: #8a4b00; --beta-bg: #fff0cc;
  --soon: #5a3f9c; --soon-bg: #ece6fb;
  --unk: #4d4553; --unk-bg: #ece8ee;
  --warn: #9b1c1c; --warn-bg: #fde4e4;
  --shadow: 0 1px 2px rgba(30, 21, 32, .06), 0 6px 18px rgba(30, 21, 32, .06);
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="light"]) { --bg: #151017; --surface: #1f1822; --surface-2: #261d2a; --ink: #f6eff3; --muted: #bdb0ba; --line: #392d3c; --orange: #ff8a3d; --orange-ink: #ffa46a; --orange-soft: #3a2415; --pink: #f58bba; --pink-ink: #f7a3c8; --pink-soft: #3a1b2b; --ok: #7be0a3; --ok-bg: #12301f; --beta: #ffd37a; --beta-bg: #3a2a08; --soon: #c8b6ff; --soon-bg: #2a2147; --unk: #cfc6d4; --unk-bg: #2f2733; --warn: #ffb0b0; --warn-bg: #3b1616; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35); color-scheme: dark; }
}
:root[data-tema="dark"] { --bg: #151017; --surface: #1f1822; --surface-2: #261d2a; --ink: #f6eff3; --muted: #bdb0ba; --line: #392d3c; --orange: #ff8a3d; --orange-ink: #ffa46a; --orange-soft: #3a2415; --pink: #f58bba; --pink-ink: #f7a3c8; --pink-soft: #3a1b2b; --ok: #7be0a3; --ok-bg: #12301f; --beta: #ffd37a; --beta-bg: #3a2a08; --soon: #c8b6ff; --soon-bg: #2a2147; --unk: #cfc6d4; --unk-bg: #2f2733; --warn: #ffb0b0; --warn-bg: #3b1616; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35); color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.65 var(--font); }
img { max-width: 100%; height: auto; }
a { color: var(--orange-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.85rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
.muted { color: var(--muted); }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--orange); color: var(--on-orange); padding: .6rem 1rem; border-radius: 8px; font-weight: 700; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
section { padding-block: clamp(2rem, 6vw, 3.5rem); }
.alt { background: var(--surface-2); }
main:focus { outline: none; }

/* Linha do tempo decorativa (trilho com marcas, como régua de edição) */
.timeline-strip { height: 10px; background:
  repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12px) bottom/100% 6px no-repeat,
  linear-gradient(90deg, var(--orange) 0 18%, var(--pink) 18% 34%, transparent 34%) top/100% 3px no-repeat; }

/* Cabeçalho */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand img { display: block; }
.main-nav { display: flex; align-items: center; gap: .75rem; }
.main-nav ul { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.main-nav li a:not(.btn) { display: block; padding: .5rem .7rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.main-nav li a:not(.btn):hover { background: var(--orange-soft); }
.main-nav a[aria-current="page"]:not(.btn) { background: var(--pink-soft); }
.menu-btn { display: none; }
.search-mini { display: flex; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); overflow: hidden; }
.search-mini input { border: 0; background: transparent; color: var(--ink); padding: .45rem .8rem; width: 8.5rem; font: inherit; font-size: .9rem; }
.search-mini input:focus { outline: none; }
.search-mini:focus-within { outline: 3px solid var(--pink); }
.search-mini button { border: 0; background: transparent; color: var(--ink); padding: 0 .8rem; font-size: 1.1rem; cursor: pointer; }
.theme-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; }

/* Botões e chips */
.btn { display: inline-block; background: var(--orange); color: var(--on-orange); font-weight: 700; padding: .8rem 1.3rem; border-radius: 999px; text-decoration: none; border: 2px solid var(--orange); cursor: pointer; font: inherit; font-weight: 700; line-height: 1.2; }
.btn:hover { filter: brightness(1.06); }
.btn-sm { padding: .5rem .95rem; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); filter: none; }
.chip { display: inline-block; font-size: .78rem; font-weight: 650; padding: .15rem .6rem; border-radius: 999px; background: var(--pink-soft); color: var(--pink-ink); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: .12rem .55rem; border-radius: 6px; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-beta { background: var(--beta-bg); color: var(--beta); }
.badge-soon { background: var(--soon-bg); color: var(--soon); }
.badge-unk { background: var(--unk-bg); color: var(--unk); }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); margin-bottom: .4rem; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--orange-ink); }
.meta { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; font-size: .85rem; color: var(--muted); margin: 0; }

/* Migalhas */
.breadcrumbs { padding-block: 1rem 0; font-size: .88rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: "/"; color: var(--muted); margin-right: .3rem; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* Cartões e grades */
.grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.25rem; box-shadow: var(--shadow); position: relative; display: flex; flex-direction: column; gap: .2rem; }
.card :is(h2, h3) { font-size: 1.15rem; font-weight: 700; margin-bottom: .3rem; }
.card :is(h2, h3) a { color: var(--ink); text-decoration: none; }
.card :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card:hover { border-color: var(--orange); }
.card:focus-within { border-color: var(--pink); }
.card .meta { margin-top: auto; padding-top: .6rem; }
.card .eyebrow a { position: relative; z-index: 2; }
.card-area { border-top: 4px solid var(--orange); }
.card-area:nth-child(even) { border-top-color: var(--pink); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: .3rem 0 0; }
.playhead { display: inline-block; width: 10px; height: 18px; margin-right: .5rem; vertical-align: -2px; background: var(--orange); clip-path: polygon(0 0, 100% 0, 100% 55%, 50% 100%, 0 55%); }

/* Início */
.hero { padding-block: clamp(2.5rem, 8vw, 5rem) clamp(2rem, 5vw, 3rem); }
.hero-grid { display: grid; gap: 2.5rem; grid-template-columns: 1.1fr .9fr; align-items: center; }
.hero h1 span { color: var(--orange-ink); }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.tl-deco { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.tl-deco .screen { aspect-ratio: 16/9; border-radius: 10px; background: linear-gradient(135deg, var(--orange-soft), var(--pink-soft)); display: grid; place-items: center; margin-bottom: .9rem; position: relative; }
.tl-deco .screen::after { content: ""; width: 54px; height: 54px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); }
.tl-deco .screen::before { content: ""; position: absolute; z-index: 2; border-left: 16px solid var(--orange); border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 5px; }
.tl-track { height: 22px; border-radius: 5px; background: var(--surface-2); position: relative; margin-bottom: 6px; }
.tl-clip { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; left: var(--l); width: var(--w); background: var(--c, var(--orange)); }
.tl-clip.p { --c: var(--pink); }
.tl-clip.n { --c: var(--line); }
.tl-ruler { height: 14px; margin-bottom: 8px; background: repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 28px) bottom/100% 7px no-repeat; opacity: .6; }
.tl-head { position: absolute; top: 0; bottom: 0; left: 46%; width: 2px; background: var(--pink); }
.tl-head::before { content: ""; position: absolute; top: 0; left: -6px; width: 14px; height: 12px; background: var(--pink); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.stat strong { display: block; font-size: 1.9rem; line-height: 1.1; color: var(--orange-ink); font-family: var(--mono); }

/* Formulários */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.8rem); box-shadow: var(--shadow); }
fieldset { border: 0; padding: 0; margin: 0 0 1.4rem; min-width: 0; }
legend { font-weight: 750; font-size: 1.05rem; margin-bottom: .6rem; padding: 0; }
.opts { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt span { display: block; border: 2px solid var(--line); border-radius: 12px; padding: .75rem .9rem; background: var(--surface); font-weight: 600; }
.opt input:checked + span { border-color: var(--orange); background: var(--orange-soft); }
.opt input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: 2px; }
.opt input:disabled + span { opacity: .45; }
.opt small { display: block; font-weight: 400; color: var(--muted); }
label.field { display: block; font-weight: 650; margin-bottom: .3rem; }
select, input[type=search], input[type=text] { font: inherit; padding: .6rem .8rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); max-width: 100%; }
select:focus, input[type=search]:focus, input[type=text]:focus { outline: 3px solid var(--pink); outline-offset: 1px; }
.filters { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; margin-bottom: 1.4rem; }
.filters > div { display: flex; flex-direction: column; }

/* Callouts */
.note { border-left: 5px solid var(--pink); background: var(--pink-soft); padding: .9rem 1.1rem; border-radius: 0 12px 12px 0; margin: 1.2rem 0; }
.note.warn { border-color: var(--orange); background: var(--orange-soft); }
.note p:last-child { margin-bottom: 0; }

/* Guia */
.page-head { padding-block: 1.2rem 1.6rem; }
.page-head .lead { font-size: 1.15rem; color: var(--muted); max-width: 46em; }
.article-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 3rem; align-items: start; padding-bottom: 3rem; }
.toc { position: sticky; top: 84px; font-size: .92rem; border-left: 2px solid var(--line); padding-left: 1rem; }
.toc h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--orange-ink); text-decoration: underline; }
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2.2rem; scroll-margin-top: 90px; padding-top: .3rem; }
.prose h2::before { content: ""; display: block; width: 44px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--orange) 0 60%, var(--pink) 60%); margin-bottom: .7rem; }
.prose ul li, .prose ol li { margin-bottom: .45em; }
.steps { list-style: none; padding: 0; margin: 1rem 0; counter-reset: passo; position: relative; }
.steps::before { content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.steps > li { counter-increment: passo; position: relative; padding: 0 0 1.5rem 3.2rem; margin: 0; }
.steps > li::before { content: counter(passo); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: var(--on-orange); font-weight: 800; font-family: var(--mono); }
.steps h3 { margin-bottom: .3rem; }
.example { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 1rem; background: var(--surface); }
.example h3 { font-size: 1rem; margin-bottom: .3rem; }
.pair { border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: .8rem; background: var(--surface); }
.pair strong { display: block; margin-bottom: .2rem; }
details { border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1.1rem; margin-bottom: .6rem; background: var(--surface); }
summary { cursor: pointer; font-weight: 650; }
details[open] summary { margin-bottom: .5rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.2rem; margin: 0 0 1rem; }
.kv dt { font-weight: 700; color: var(--muted); }
.kv dd { margin: 0; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.prevnext a { display: block; border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; text-decoration: none; color: var(--ink); background: var(--surface); }
.prevnext a:hover { border-color: var(--orange); }
.prevnext small { display: block; color: var(--muted); }
.prevnext .next { text-align: right; }

/* Tabelas (comparador, recursos) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; vertical-align: top; padding: .75rem .9rem; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface-2); position: sticky; top: 0; }
tbody th { font-weight: 700; background: var(--surface-2); min-width: 130px; }
.cmp th:first-child, .cmp td:first-child { position: sticky; left: 0; z-index: 1; }
.cmp td, .cmp thead th:not(:first-child) { min-width: 220px; }
.cmp ul { margin: 0; padding-left: 1.1em; }
tr:last-child > * { border-bottom: 0; }
.src { display: block; font-size: .8rem; color: var(--muted); margin-top: .3rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.chips a { text-decoration: none; }
.tag-link { display: inline-block; padding: .25rem .7rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); font-size: .9rem; }
.tag-link:hover { border-color: var(--orange); }
.tag-link span { color: var(--muted); font-size: .8rem; }

/* Resultado do seletor */
.route { list-style: none; padding: 0; margin: 0; position: relative; counter-reset: etapa; }
.route::before { content: ""; position: absolute; left: 17px; top: 10px; bottom: 10px; width: 3px; background: linear-gradient(var(--orange), var(--pink)); border-radius: 3px; }
.route > li { position: relative; padding-left: 3.3rem; margin-bottom: 1.1rem; counter-increment: etapa; }
.route > li::before { content: counter(etapa); position: absolute; left: 0; top: 4px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 3px solid var(--orange); font-weight: 800; font-family: var(--mono); }
.route .card h3 { margin-bottom: .2rem; }
.route .why { font-size: .9rem; color: var(--muted); margin: .2rem 0 0; }

/* Rodapé */
.site-footer { margin-top: 3rem; background: var(--surface-2); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; padding-block: 2.2rem 1.2rem; }
.foot-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.foot-grid a { color: var(--ink); }
.foot-note { border-top: 1px solid var(--line); padding-block: 1rem 2rem; font-size: .85rem; color: var(--muted); }
.foot-note p { margin-bottom: .4rem; }

/* Celular */
@media (max-width: 900px) {
  .hero-grid, .article-grid { grid-template-columns: 1fr; }
  .toc { position: static; border-left: 0; border-top: 2px solid var(--line); padding: .8rem 0 0; }
  .toc ol { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .js .menu-btn { display: inline-block; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: .5rem .9rem; border-radius: 999px; font: inherit; font-weight: 650; cursor: pointer; }
  .js .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 1rem 16px 1.2rem; box-shadow: var(--shadow); }
  .js .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .main-nav li a:not(.btn) { padding: .8rem; }
  .main-nav .btn { text-align: center; }
  .search-mini input { width: 100%; flex: 1; }
  .theme-btn { align-self: flex-start; }
  .no-js-fallback { display: none; }
  html:not(.js) .bar { flex-wrap: wrap; padding-block: .6rem; }
  html:not(.js) .main-nav { flex-wrap: wrap; }
  html:not(.js) .main-nav ul { flex-wrap: wrap; flex-direction: row; }
  .prevnext { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: .4rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
@media print { .site-header, .site-footer, .toc, .cta-row, .menu-btn { display: none; } body { background: #fff; color: #000; } }
