/* Central de ajuda da série Machine. Identidade "Luz acesa" do Agency Machine, versão clara como padrão. */
@font-face { font-family: "Bricolage"; src: url("/assets/fonts/bricolage-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope-400-800.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono-400-700.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #fbf7f2;
  --surface: #ffffff;
  --band: #f5ede4;
  --band-2: #ebe0d3;
  --ink: #1a120d;
  --ink-2: #43352c;
  --dim: #6f5f53;
  --line: #e6d9cb;
  --line-2: #d3c2b0;
  --accent: #c2320a;
  --accent-ink: #ffffff;
  --accent-soft: #fff0e6;
  --amber: #ffb224;
  --fire: #ff4d1f;
  --code-bg: #1c1410;
  --code-ink: #f5ede4;
  --code-bar: #2e211a;
  --chip: #f3e9de;
  --ok-bg: #e8f6ee; --ok-line: #9fd8b8; --ok-ink: #14613f;
  --warn-bg: #fff3d6; --warn-line: #f0c25a; --warn-ink: #7a4b00;
  --tip-bg: #e9f5f3; --tip-line: #9ed3ca; --tip-ink: #125e54;
  --shadow: 0 1px 2px rgba(26, 18, 13, .05), 0 8px 24px rgba(26, 18, 13, .06);
  --grad-fire: linear-gradient(95deg, #ffb224 0%, #ff7a2e 45%, #ff4d1f 100%);
  --sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage", "Manrope", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 14px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0a08;
  --surface: #1c1410;
  --band: #140e0b;
  --band-2: #1c1410;
  --ink: #f5ede4;
  --ink-2: #dccfc2;
  --dim: #b3a394;
  --line: #2e211a;
  --line-2: #4a3226;
  --accent: #ff8a5b;
  --accent-ink: #1a120d;
  --accent-soft: #2a160d;
  --code-bg: #140e0b;
  --code-bar: #241914;
  --chip: #241914;
  --ok-bg: #10261c; --ok-line: #1f6a49; --ok-ink: #8fe3b9;
  --warn-bg: #2b2008; --warn-line: #7a5a12; --warn-ink: #ffd88a;
  --tip-bg: #0e2421; --tip-line: #1c6a5f; --tip-ink: #8fe0d3;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
html:has(.progress) { scroll-padding-top: 150px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16.5px/1.65 var(--sans); text-rendering: optimizeLegibility; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
:root[data-theme="dark"] :focus-visible, .code :focus-visible { outline-color: var(--amber); }
::selection { background: var(--fire); color: #0e0a08; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p, li { text-wrap: pretty; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 12px; }

/* topo */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.logo { height: 40px; width: auto; display: block; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.brand-tag { font-size: 13px; font-weight: 700; color: var(--dim); border-left: 1px solid var(--line-2); padding-left: 10px; white-space: nowrap; }
.theme { margin-left: auto; flex-shrink: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.theme:hover { border-color: var(--line-2); color: var(--ink); }
.top .search { flex: 1; max-width: 420px; margin-left: auto; }
.top .search + .theme { margin-left: 0; }

/* busca */
.search { position: relative; }
.search input { width: 100%; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; padding: 0 14px 0 42px; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--dim); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--dim); display: grid; pointer-events: none; }
.search-lg input { height: 60px; font-size: 17px; border-radius: 16px; padding-left: 54px; box-shadow: var(--shadow); border-color: var(--line); }
.search-lg .search-icon { left: 19px; }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; max-height: min(60vh, 460px); overflow: auto; z-index: 40; text-align: left; }
.result { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.result[aria-selected="true"], .result:hover { background: var(--accent-soft); }
.result-where { display: block; font-size: 12px; font-weight: 700; color: var(--dim); letter-spacing: .02em; }
.result-title { display: block; font-weight: 700; line-height: 1.35; }
.result-text { display: block; font-size: 14px; color: var(--ink-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.result-none { padding: 14px 12px; color: var(--ink-2); font-size: 15px; }
.result-none a { font-weight: 700; }

/* início */
.hero { background: radial-gradient(900px 320px at 50% -80px, color-mix(in srgb, var(--amber) 34%, transparent), transparent 70%), var(--band); border-bottom: 1px solid var(--line); }
.hero-in { padding-block: 72px 80px; text-align: center; max-width: 760px; }
.hero h1 { font: 800 clamp(34px, 6vw, 54px)/1.05 var(--display); letter-spacing: -0.035em; }
.hero-sub { margin: 14px 0 30px; color: var(--ink-2); font-size: 18px; }
.block { padding-block: 48px 72px; }
.block-title { font: 800 13px/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card { display: flex; gap: 16px; align-items: flex-start; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card-icon { flex-shrink: 0; width: 56px; height: 56px; border-radius: 14px; background: #0e0a08; display: grid; place-items: center; overflow: hidden; }
.card-icon img { width: 44px; height: 44px; object-fit: contain; }
.card-body { display: flex; flex-direction: column; gap: 4px; }
.card-title { font: 800 20px/1.2 var(--display); letter-spacing: -0.02em; }
.card-desc { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.card-count { font-size: 13px; font-weight: 700; color: var(--accent); margin-top: 4px; }

/* páginas internas */
.page { padding-block: 28px 80px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14px; color: var(--dim); margin-bottom: 26px; }
.crumbs a { color: var(--dim); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--ink-2); font-weight: 600; }
.crumb-sep { display: grid; color: var(--line-2); }
.meta { color: var(--dim); font-size: 14px; margin: 6px 0 0; }
.col-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 36px; }
.col-head h1 { font: 800 clamp(30px, 5vw, 40px)/1.1 var(--display); letter-spacing: -0.03em; }
.col-head p { margin: 8px 0 0; color: var(--ink-2); }
.section { max-width: 820px; margin-bottom: 40px; }
.section h2 { font: 800 13px/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; }
.rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.rows li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 16px; padding: 18px 20px; text-decoration: none; color: var(--ink); }
.row:hover { background: var(--accent-soft); }
.row-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-weight: 800; font-size: 17px; line-height: 1.35; }
.row-desc { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.row-go { color: var(--dim); display: grid; }
.row:hover .row-go { color: var(--accent); }

/* artigo */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; align-items: start; }
.article { min-width: 0; max-width: 760px; }
.article-head h1 { font: 800 clamp(30px, 5vw, 42px)/1.08 var(--display); letter-spacing: -0.03em; }
.lead { font-size: 18.5px; color: var(--ink-2); margin: 14px 0 0; line-height: 1.55; }
.article-head { padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.article p { margin: 0 0 14px; }
.article ol, .article ul { margin: 0 0 14px; padding-left: 24px; }
.article li { margin-bottom: 7px; }
.article li::marker { color: var(--accent); font-weight: 700; }
.article strong { font-weight: 800; }
.article code { font: 500 .88em var(--mono); background: var(--chip); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.intro { margin-bottom: 8px; }

.progress { position: sticky; top: 64px; z-index: 5; background: var(--bg); padding: 12px 0 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.progress-text { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.progress-bar { height: 6px; border-radius: 99px; background: var(--band-2); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--grad-fire); border-radius: 99px; transition: width .25s ease; }
.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 18px 0; box-shadow: var(--shadow); }
.step-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.step-n { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 800 17px/1 var(--display); }
.step-head h2 { flex: 1; font: 800 21px/1.25 var(--display); letter-spacing: -0.02em; }
.step-body { padding: 20px 20px 8px; }
.done { flex-shrink: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 99px; user-select: none; }
.done input { width: 17px; height: 17px; accent-color: #1f8a5b; margin: 0; cursor: pointer; }
.step.is-done { border-color: var(--ok-line); }
.step.is-done .step-n { background: #1f8a5b; color: #fff; }
.step.is-done .done { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }

.plain { margin: 36px 0 0; }
.plain > h2 { font: 800 25px/1.2 var(--display); letter-spacing: -0.025em; margin-bottom: 14px; padding-top: 6px; }
.issue { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 8px; margin: 14px 0; }
.issue h3 { font: 800 18px/1.35 var(--sans); margin-bottom: 12px; }
.step-body .issue { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 18px 0 0; }

.code { background: var(--code-bg); border-radius: 12px; margin: 0 0 16px; overflow: hidden; border: 1px solid var(--code-bar); }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 14px; background: var(--code-bar); color: #b3a394; font: 600 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.copy { font: 700 13px/1 var(--sans); text-transform: none; letter-spacing: 0; color: #1a120d; background: var(--amber); border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; min-width: 84px; }
.copy:hover { background: #ffc24d; }
.copy.is-copied { background: #3ddc97; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.article .code code { font: 500 14.5px/1.6 var(--mono); color: var(--code-ink); background: none; border: 0; padding: 0; white-space: pre; overflow-wrap: normal; }

.note { border: 1px solid; border-radius: 12px; padding: 13px 16px; margin: 0 0 16px; }
.note p { margin: 0; }
.note-ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.note-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.note-tip { background: var(--tip-bg); border-color: var(--tip-line); color: var(--tip-ink); }
.note a { color: inherit; font-weight: 700; }
.note code { background: color-mix(in srgb, currentColor 10%, transparent); border-color: color-mix(in srgb, currentColor 22%, transparent); color: inherit; }

.path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.path span { background: var(--chip); border: 1px solid var(--line); border-radius: 7px; padding: 2px 9px; font-weight: 600; }
.path .path-label { background: none; border: 0; padding: 0 2px 0 0; color: var(--dim); font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.path .path-sep { background: none; border: 0; padding: 0; color: var(--dim); }

.button { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 15px; text-decoration: none; padding: 11px 18px; border-radius: 11px; }
.button:hover { filter: brightness(1.08); }
.button[target="_blank"]::after { content: "↗"; font-size: 14px; }

.help { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; background: var(--band); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-top: 40px; }
.help h2 { font: 800 21px/1.2 var(--display); letter-spacing: -0.02em; }
.help p { margin: 4px 0 0; color: var(--ink-2); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.pager a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 800; line-height: 1.35; }
.pager a:hover { border-color: var(--accent); }
.pager a span { display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.nav-next { text-align: right; }

.toc { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow: auto; padding: 4px 4px 8px 0; }
.toc-title { font: 800 12px/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin: 0 0 12px; }
.toc ol, .toc ul { list-style: none; margin: 0; padding: 0; }
.toc ol { border-left: 2px solid var(--line); }
.toc a { display: flex; gap: 8px; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; font-size: 14px; line-height: 1.4; }
.toc a:hover { color: var(--accent); }
.toc a.is-current { color: var(--accent); border-left-color: var(--accent); font-weight: 700; }
.toc ul a { padding-left: 26px; font-size: 13.5px; color: var(--dim); }
.toc-n { flex-shrink: 0; font-weight: 800; color: var(--dim); min-width: 14px; }
.toc a.is-done .toc-n { color: #1f8a5b; }

.notfound { text-align: center; padding-block: 90px; }
.notfound h1 { font: 800 36px/1.1 var(--display); letter-spacing: -0.03em; margin-bottom: 12px; }

.foot { border-top: 1px solid var(--line); background: var(--band); }
.foot-in { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-block: 22px; font-size: 14px; color: var(--dim); }
.foot a { font-weight: 700; }

@media (max-width: 960px) {
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-tag { display: none; }
  .top-in { gap: 10px; }
  .logo { height: 34px; }
  .hero-in { padding-block: 48px 56px; }
  .step-head { flex-wrap: wrap; padding: 16px; }
  .step-head h2 { flex-basis: calc(100% - 50px); font-size: 19px; }
  .done { margin-left: 50px; }
  .step-body { padding: 16px 16px 4px; }
  .issue { padding: 16px 16px 4px; }
  .pager { grid-template-columns: 1fr; }
  .nav-next { text-align: left; }
  .col-head { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .top, .toc, .foot, .progress, .copy, .done, .pager, .help { display: none !important; }
  body { background: #fff; }
  .step, .issue { box-shadow: none; break-inside: avoid; }
}
