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

:root {
  --paper: #E8EBE9;
  --sheet: #F5F7F6;
  --ink: #1C2320;
  --graphite: #4F5853;
  --rule: #BFC7C2;
  --green: #1D6E45;
  --green-tint: #D3E5DA;
  --sans: "Plex Sans", "Segoe UI", system-ui, sans-serif;
  --cond: "Plex Condensed", "Arial Narrow", "Plex Sans", sans-serif;
  --mono: "Plex Mono", ui-monospace, Consolas, monospace;
  --measure: 64ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
code { font-family: var(--mono); font-size: 0.92em; }
a { color: var(--green); text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--sheet); padding: 0.5rem 0.75rem; z-index: 10; }

/* Cabeçalho */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 72rem; margin: 0 auto; padding: 1.25rem 1.5rem;
}
.brand {
  font: 700 1.5rem/1 var(--cond); color: var(--ink); text-decoration: none; letter-spacing: 0.01em;
}
.top nav { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.top nav a { color: var(--graphite); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.top nav a:hover { color: var(--ink); }
.top nav .nav-cta { color: var(--green); }

/* Seções */
main > section { max-width: 72rem; margin: 0 auto; padding: 4.5rem 1.5rem; }
main > section + section { border-top: 1px solid var(--rule); }
h1, h2 { font-family: var(--cond); font-weight: 700; line-height: 1.08; margin: 0; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); max-width: 16ch; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); max-width: 24ch; margin-bottom: 2rem; }
h3 { font: 600 1.0625rem/1.35 var(--sans); margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; max-width: var(--measure); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: 3.5rem; align-items: center;
  padding-top: 3rem;
}
.lead { font-size: 1.1875rem; color: var(--graphite); margin-top: 1.5rem; max-width: 46ch; }
.actions { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; margin: 2rem 0 1.25rem; }
.fine { font-size: 0.9rem; color: var(--graphite); }

.btn {
  display: inline-block; background: var(--green); color: #F5F7F6; border: 0; border-radius: 4px;
  font: 600 1rem/1 var(--sans); padding: 0.95rem 1.35rem; text-decoration: none; cursor: pointer;
}
.btn:hover { background: #175A38; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-quiet { font-weight: 600; color: var(--ink); }

/* A matriz: o elemento marcante da página */
.matrix {
  margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px;
  padding: 1.25rem 1.25rem 1rem;
}
.matrix figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.m-title { font: 700 1.25rem/1.2 var(--cond); }
.m-sub { font-size: 0.85rem; color: var(--graphite); }
.cells {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
}
.cells li {
  display: flex; flex-direction: column; gap: 2px; padding: 0.55rem 0.6rem 0.6rem;
  border-radius: 3px; min-height: 3.6rem;
}
.cells b { font: 600 0.86rem/1.15 var(--sans); }
.cells span { font-size: 0.78rem; line-height: 1.25; }
.cells .on { background: var(--green-tint); color: #0F3D26; box-shadow: inset 3px 0 0 var(--green); }
.cells .off { background: transparent; color: var(--graphite); border: 1px dashed var(--rule); }
.cells .off b { color: var(--graphite); }
.legend { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 1rem; font-size: 0.85rem; color: var(--graphite); }
.k { display: inline-block; width: 0.9rem; height: 0.9rem; vertical-align: -0.12rem; margin-right: 0.45rem; border-radius: 2px; }
.k.on { background: var(--green-tint); box-shadow: inset 3px 0 0 var(--green); }
.k.off { border: 1px dashed var(--graphite); }

@media (prefers-reduced-motion: no-preference) {
  .cells li { animation: fill 380ms ease-out both; }
  .cells li:nth-child(1) { animation-delay: 120ms; }  .cells li:nth-child(2) { animation-delay: 170ms; }
  .cells li:nth-child(3) { animation-delay: 220ms; }  .cells li:nth-child(4) { animation-delay: 270ms; }
  .cells li:nth-child(5) { animation-delay: 320ms; }  .cells li:nth-child(6) { animation-delay: 370ms; }
  .cells li:nth-child(7) { animation-delay: 420ms; }  .cells li:nth-child(8) { animation-delay: 470ms; }
  .cells li:nth-child(9) { animation-delay: 520ms; }  .cells li:nth-child(10) { animation-delay: 570ms; }
  .cells li:nth-child(11) { animation-delay: 620ms; } .cells li:nth-child(12) { animation-delay: 670ms; }
  .cells li:nth-child(13) { animation-delay: 720ms; } .cells li:nth-child(14) { animation-delay: 770ms; }
  .cells li:nth-child(15) { animation-delay: 820ms; } .cells li:nth-child(16) { animation-delay: 870ms; }
  .cells li:nth-child(17) { animation-delay: 920ms; }
  @keyframes fill { from { opacity: 0; transform: translateY(4px); } }
}

/* Comparação */
.cols { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 3rem; }
.plain { margin: 0; padding-left: 1.1rem; color: var(--graphite); }
.plain li { margin-bottom: 0.4rem; }
.found { list-style: none; margin: 0; padding: 0; }
.found li { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); max-width: var(--measure); }
.found li:first-child { padding-top: 0; }
.found code { color: var(--green); font-weight: 500; margin-right: 0.5rem; }
.tally { margin-top: 1.25rem; font-weight: 600; }

/* Passos: são de fato uma sequência */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.steps li { counter-increment: s; border-top: 3px solid var(--ink); padding-top: 1rem; }
.steps li::before { content: counter(s); display: block; font: 700 1.6rem/1 var(--cond); color: var(--green); margin-bottom: 0.75rem; }
.steps p { color: var(--graphite); font-size: 0.98rem; }

/* Cadastro */
.signup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.signup h2 { margin-bottom: 1rem; }
.signup form label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.field { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.field input {
  flex: 1 1 16rem; min-width: 0; font: 400 1.05rem/1.2 var(--sans); padding: 0.85rem 0.9rem;
  border: 1px solid var(--graphite); border-radius: 4px; background: var(--sheet); color: var(--ink);
}
.status { margin-top: 1rem; min-height: 1.6em; }
.status.ok { color: #0F3D26; }
.status.err { color: #8A1C1C; }
.status code { word-break: break-all; background: var(--sheet); padding: 0.15rem 0.35rem; border: 1px solid var(--rule); }

/* Instalação */
.install-steps { padding-left: 1.2rem; margin: 0 0 2.5rem; max-width: 46rem; }
.install-steps li { margin-bottom: 1.25rem; }
.install-steps p { margin-bottom: 0.5rem; }
.cmd {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--ink); color: #E8EBE9; border-radius: 4px; padding: 0.7rem 0.75rem 0.7rem 1rem;
}
.cmd code { font-size: 0.95rem; overflow-x: auto; white-space: nowrap; min-width: 0; }
.copy {
  flex: none; font: 600 0.85rem/1 var(--sans); background: transparent; color: #E8EBE9;
  border: 1px solid #6F7A74; border-radius: 3px; padding: 0.45rem 0.7rem; cursor: pointer;
}
.copy:hover { border-color: #E8EBE9; }
.commands { border-collapse: collapse; width: 100%; max-width: 46rem; font-size: 0.98rem; }
.commands caption { text-align: left; font-weight: 600; margin-bottom: 0.5rem; }
.commands th, .commands td { text-align: left; padding: 0.65rem 0.75rem 0.65rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.commands th { font-size: 0.85rem; color: var(--graphite); font-weight: 600; }
.commands td:first-child { white-space: nowrap; padding-right: 1.5rem; }

.book p, .privacy p { color: var(--graphite); }
main > section.book, main > section.privacy { padding-top: 3rem; padding-bottom: 3rem; }
.book h2, .privacy h2 { margin-bottom: 1rem; }

.foot { max-width: 72rem; margin: 0 auto; padding: 2rem 1.5rem 3rem; border-top: 1px solid var(--rule); font-size: 0.85rem; color: var(--graphite); }
.foot p { margin: 0 0 0.25rem; }

@media (max-width: 860px) {
  .hero, .cols, .signup { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main > section { padding: 3.25rem 1.25rem; }
}
@media (max-width: 520px) {
  .commands { table-layout: fixed; }
  .commands td:first-child { width: 42%; }
  .top nav a:not(.nav-cta) { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commands td:first-child { white-space: normal; }
}
.commands code { overflow-wrap: anywhere; }

/* Páginas de texto: segurança e privacidade */
.foot-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
.doc > section { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.doc > section:first-child { padding-top: 3rem; }
.doc h1 { max-width: 20ch; }
.doc h2 { margin-bottom: 1rem; max-width: 32ch; }
.doc p, .doc li { max-width: var(--measure); }
.plain-list { margin: 0; padding-left: 1.2rem; }
.plain-list li { margin-bottom: 0.6rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1rem; }
.doc table { border-collapse: collapse; width: 100%; min-width: 36rem; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 0.65rem 0.9rem 0.65rem 0; border-bottom: 1px solid var(--rule); }
.doc th { font-size: 0.85rem; color: var(--graphite); font-weight: 600; }
.doc td:first-child { font-weight: 600; }
.doc code { white-space: nowrap; }
@media (max-width: 640px) {
  .doc table { min-width: 0; }
  .doc thead { display: none; }
  .doc tr { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
  .doc td { display: block; border: 0; padding: 0.15rem 0; }
  .doc td[data-label]:not(:first-child)::before { content: attr(data-label) ": "; color: var(--graphite); font-size: 0.85rem; }
  .doc code { white-space: normal; overflow-wrap: anywhere; }
}
