/*
  Configurador de contas GitHub · marca Seicho v3.1
  Tokens copiados de seicho-v2-1/app/(site)/[locale]/site.css.
  Regra do verde: --brand (#00D28D) só preenchimento/logótipo; verde lido em fundo claro
  é sempre --green (#00704B). Logótipo original só sobre --deep. Cor plana.
*/

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --bg: #ffffff;
  --tint: #f1f8f4;
  --ink: #0f1a16;
  --ink-2: #4a5a53;
  --annot: #5c6b64;
  --line: #dce7e1;
  --line-strong: #84948d;
  --brand: #00d28d;
  --green: #00704b;
  --green-hover: #005a3c;
  --green-tile: #dcf3e8;
  --amber: #985009;
  --amber-tile: #fbeedc;
  --graph: #3e4a45;
  --graph-tile: #e6ebe8;
  --deep: #0b2b22;
  --deep-hover: #164a3a;
  --deep-tile: #154234;
  --deep-line: #1a4a3b;
  --on-deep-2: #a9c7ba;
  --deep-annot: #8fb3a4;
  --err: #b42318;
  --max: 1200px;
  --pad: 32px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --f: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --m: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--f);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
code { font-family: var(--m); font-size: 0.875em; background: var(--graph-tile); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.noscript { margin: 0; padding: 14px var(--pad); background: var(--amber-tile); color: var(--amber); font-weight: 500; }

.wrap { max-width: calc(var(--max) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .code pre:focus-visible { outline-color: #fff; }
.code pre:focus-visible { outline-offset: -4px; }

.skip-link {
  position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; background: #fff; color: var(--ink);
  font-weight: 500; text-decoration: none;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; overflow: visible; clip-path: none; padding: 12px 16px; border-radius: 6px; outline: 2px solid var(--ink); }

/* ── Tipografia ─────────────────────────────────────────────────────────── */
h1 { font-size: 56px; line-height: 1.06; font-weight: 600; letter-spacing: -0.028em; max-width: 14em; }
h2 { font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 18px; line-height: 1.35; font-weight: 600; }
.lead { font-size: 20px; line-height: 1.55; color: var(--ink-2); max-width: 36em; margin-top: 20px; }
.mono { font-family: var(--m); font-size: 12px; line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: var(--annot); }
.annot { font-size: 14px; color: var(--annot); }
.idx {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
  font-family: var(--m); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--annot);
}
.idx b { font-weight: 500; color: var(--green); }
.idx::after { content: ""; flex: 0 0 64px; height: 1px; background: currentColor; opacity: 0.5; }

/* ── Botões e links ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 6px; border: 1px solid var(--green);
  background: var(--green); color: #fff; font: 500 15px/1 var(--f); cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { background: var(--green-hover); border-color: var(--green-hover); }
.btn--line { background: #fff; color: var(--green); border-color: var(--line-strong); }
.btn--line:hover { background: var(--tint); border-color: var(--green); }
.btn:disabled { cursor: not-allowed; background: var(--graph-tile); border-color: var(--line); color: #66736d; }
.btn.ok { background: var(--deep); border-color: var(--deep); }
.link { color: var(--green); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.link:hover { color: var(--green-hover); text-decoration-thickness: 2px; }

.tile { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; flex: none; }
.tile .i { width: 22px; height: 22px; }
.tile .num { font-family: var(--m); font-size: 14px; font-weight: 500; }
.t-green { background: var(--green-tile); color: var(--green); }
.t-amber { background: var(--amber-tile); color: var(--amber); }
.t-graph { background: var(--graph-tile); color: var(--graph); }
.t-deep { background: var(--deep); color: var(--brand); }

/* ── Navegação ──────────────────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 20; background: var(--deep); border-bottom: 1px solid var(--deep-line); color: #fff; }
.nav-bar { display: flex; align-items: center; height: 72px; gap: 24px; }
.logo { display: inline-flex; align-items: center; min-height: 44px; margin-right: auto; }
.logo img { height: 20px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  color: #fff; text-decoration: none; font-size: 15px;
}
.nav-links a:not(.lang)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1.5px; background: var(--brand);
  transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); }
.lang {
  justify-content: center; min-width: 44px; padding: 0 10px; border: 1px solid #6f9486; border-radius: 6px;
  font-family: var(--m); font-size: 14px;
}
.lang:hover { border-color: var(--brand); color: var(--brand); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { padding: 88px 0 56px; }
.promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 48px; }
.promises li { display: flex; gap: 16px; align-items: flex-start; padding-top: 20px; border-top: 1px solid var(--line); }
.promises h2 { font-size: 16px; line-height: 1.4; font-weight: 600; letter-spacing: 0; }
.promises p { font-size: 15px; color: var(--ink-2); margin-top: 4px; }

/* ── Configurador ───────────────────────────────────────────────────────── */
.tool { padding: 24px 0 96px; }
.tool:focus { outline: none; }
.tool-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.form {
  position: sticky; top: 96px; background: var(--tint); border-color: var(--line);
  /* mais alto que a janela: rola por dentro em vez de cortar o fundo */
  max-height: calc(100vh - 96px - 24px); max-height: calc(100dvh - 96px - 24px);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
}
.form > .annot { margin: 6px 0 20px; }
.field { margin-top: 18px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; padding: 0; }
.req { color: var(--err); }
.opt { font-family: var(--m); font-size: 12px; font-weight: 400; color: var(--annot); margin-left: 4px; }
.field input:not([type="radio"]) {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 6px;
  background: #fff; color: var(--ink); font: 15px/1.4 var(--m);
}
.field input::placeholder { color: #7a8781; opacity: 1; }
.field input:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); border-radius: 6px; }
.field input[aria-invalid="true"] { border-color: var(--err); box-shadow: inset 0 0 0 1px var(--err); }
.hint { font-size: 13px; color: var(--annot); margin-top: 6px; line-height: 1.5; }
.err { font-size: 13px; color: var(--err); font-weight: 500; margin-top: 4px; }
.err:empty, .status:empty { display: none; }
.status { font-size: 13px; margin-top: 6px; padding: 8px 10px; border-radius: 6px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.status.ok { border-color: var(--green); color: var(--green); }
.status.warn { border-color: var(--amber); color: var(--amber); background: #fff; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; min-width: 0; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; background: #fff; }
.seg label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; margin: 0; cursor: pointer; font-weight: 500; }
.seg label + label { border-left: 1px solid var(--line-strong); }
.seg input { accent-color: var(--green); width: 16px; height: 16px; margin: 0; }
.seg label:has(input:checked) { background: var(--green-tile); color: var(--green); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: -2px; }

.steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.panel, .code, .how-grid > * { min-width: 0; }
.step > p { margin-top: 12px; color: var(--ink-2); }
.step > p.annot { color: var(--annot); }
.step-head { display: flex; align-items: center; gap: 14px; }
.step-head h2 { font-size: 20px; }

.code { margin-top: 16px; }
.code pre {
  margin: 0; max-height: 26rem; overflow: auto; padding: 18px 18px 20px; border-radius: 8px;
  background: var(--deep); color: #e6f2ec; font: 13px/1.6 var(--m); white-space: pre; tab-size: 2;
  scrollbar-color: var(--deep-annot) var(--deep);
}
.code pre .c { color: var(--deep-annot); }
.code-empty { display: none; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--annot); font-size: 14px; background: #fff; }
.code:not(.is-ready) .code-empty { display: block; }
.code-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.copy-status { font-size: 13px; color: var(--green); font-weight: 500; }

/* ── Como funciona ──────────────────────────────────────────────────────── */
.how { background: var(--tint); padding: 96px 0; border-top: 1px solid var(--line); }
.how > .wrap > h2 { font-size: 40px; line-height: 1.12; letter-spacing: -0.02em; max-width: 18em; }
.layers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 48px; }
.layers li { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.layers h3 { margin-top: 16px; }
.layers p { margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.how-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.how-grid p { margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.ts-title { margin-top: 56px; font-size: 24px; }
.table-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ts { width: 100%; border-collapse: collapse; font-size: 15px; }
.ts th, .ts td { text-align: left; vertical-align: top; padding: 14px 18px; border-top: 1px solid var(--line); }
.ts thead th { border-top: 0; font-family: var(--m); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--annot); }
.ts tbody th { font-weight: 500; width: 38%; }
.ts td { color: var(--ink-2); }

/* ── Rodapé ─────────────────────────────────────────────────────────────── */
.footer { background: var(--deep); color: #fff; padding: 64px 0 56px; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.f-brand p { margin-top: 12px; color: var(--on-deep-2); max-width: 30em; font-size: 15px; }
.f-links { display: flex; flex-direction: column; align-items: flex-start; }
.f-links a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; text-decoration: none; font-size: 15px; }
.f-links a:hover { color: var(--brand); }

/* ── Responsivo ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .form { position: static; max-height: none; overflow: visible; }
  .how-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .promises, .layers { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 44px; }
  .how > .wrap > h2 { font-size: 32px; }
}
@media (max-width: 560px) {
  :root { --pad: 16px; }
  .nav-bar { height: 64px; gap: 12px; }
  .logo img { height: 16px; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 14px; }
  .hero { padding: 48px 0 32px; }
  h1 { font-size: 34px; }
  .lead { font-size: 17px; }
  .promises { margin-top: 32px; gap: 16px; }
  .panel { padding: 20px 16px; }
  .row { flex-wrap: wrap; }
  .row .btn { width: 100%; }
  .code pre { font-size: 12px; padding: 14px; max-height: 22rem; }
  .how { padding: 64px 0; }
  .how > .wrap > h2 { font-size: 28px; }
  .ts, .ts tbody, .ts tr, .ts th, .ts td { display: block; width: auto; }
  .ts thead { display: none; }
  .ts tbody tr + tr { border-top: 1px solid var(--line); }
  .ts th, .ts td { border-top: 0; padding: 12px 16px 0; }
  .ts td { padding-bottom: 14px; }
  .ts tbody th { width: auto; }
}
@media (max-width: 359px) {
  .nav-links a:not(.lang) { display: none; }
}
