/* roque — tema próprio. Sem fontes remotas, sem JS. Monocromático por escolha: a máscara é um tabuleiro. */

:root {
  --papel: #ffffff;
  --tinta: #000000;
  --meio: #5f5f5f;
  --linha: #d4d4d4;
  --fundo-codigo: #f2f2f2;
  --medida: 44rem;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papel: #000000;
    --tinta: #ffffff;
    --meio: #a8a8a8;
    --linha: #333333;
    --fundo-codigo: #141414;
  }
}

* { box-sizing: border-box; }

html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--serif);
  line-height: 1.65;
  max-width: calc(var(--medida) + 3rem);
  padding: 0 1.5rem 4rem;
  margin-inline: auto;
}

/* Acessibilidade */
.pular {
  position: absolute; left: -999px; top: 0;
  background: var(--tinta); color: var(--papel); padding: .5rem 1rem;
}
.pular:focus { left: 1rem; top: 1rem; z-index: 10; }
:focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Cabeçalho */
.topo {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem 1.75rem;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--linha);
}
.marca {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: 1.35rem; letter-spacing: .02em; text-decoration: none; color: var(--tinta);
}
.tabuleiro {
  display: inline-block; width: 1.25rem; height: 1.25rem;
  background: repeating-conic-gradient(var(--tinta) 0 25%, var(--papel) 0 50%);
  background-size: 50% 50%;
  border: 1px solid var(--tinta);
}
.topo nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-left: auto; }
.topo nav a { color: var(--tinta); text-decoration: none; }
.topo nav a:hover, .topo nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .25em; }

/* Tipografia */
h1, h2, h3 { font-weight: 400; line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: 2.4rem; letter-spacing: -.01em; }
h2 { font-size: 1.6rem; margin-top: 2.2em; }
h3 { font-size: 1.2rem; margin-top: 1.6em; }
p, ul, ol, dl, table, pre { margin: 0 0 1.1em; }
a { color: var(--tinta); text-underline-offset: .18em; }
small { color: var(--meio); font-size: .9em; }
code, kbd, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--fundo-codigo); padding: .1em .3em; overflow-wrap: anywhere; }
pre { background: var(--fundo-codigo); padding: 1rem; overflow-x: auto; line-height: 1.45; }
pre code { background: none; padding: 0; }
blockquote { margin: 0 0 1.1em; padding-left: 1rem; border-left: 3px solid var(--tinta); color: var(--meio); }
hr { border: 0; border-top: 1px solid var(--linha); margin: 2.5rem 0; }
img { max-width: 100%; height: auto; }

/* Abertura */
.abertura { padding: 4.5rem 0 2.5rem; }
.abertura h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); max-width: 22ch; }
.abertura .sub { font-size: 1.2rem; color: var(--meio); max-width: 40ch; }
.acoes { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.acao {
  display: inline-block; padding: .65rem 1.2rem;
  background: var(--tinta); color: var(--papel); text-decoration: none;
  border: 1px solid var(--tinta);
}
.acao--leve { background: transparent; color: var(--tinta); }
.acao:hover { text-decoration: underline; }

/* O único elemento decorativo: uma fileira de casas do tabuleiro */
.faixa {
  height: .5rem; margin: 0 0 2.5rem;
  background: repeating-linear-gradient(90deg, var(--tinta) 0 .5rem, var(--papel) .5rem 1rem);
  border: 1px solid var(--tinta);
}

/* Fundações */
.fundacoes dl { display: grid; grid-template-columns: 1fr; gap: .2rem 1.5rem; }
.fundacoes dt { font-size: 1.1rem; margin-top: .9rem; }
.fundacoes dd { margin: 0; color: var(--meio); }
@media (min-width: 40rem) {
  .fundacoes dl { grid-template-columns: max-content 1fr; align-items: baseline; }
  .fundacoes dt, .fundacoes dd { margin-top: .6rem; }
}

/* Tabelas de serviços */
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; vertical-align: top; padding: .6rem .5rem .6rem 0; border-bottom: 1px solid var(--linha); }
thead th { font-weight: 400; color: var(--meio); }
tbody th { font-weight: 400; }
td.sats { font-family: var(--mono); white-space: nowrap; }
td form { margin: 0; }
button {
  font: inherit; font-size: .9rem; cursor: pointer;
  background: var(--tinta); color: var(--papel); border: 1px solid var(--tinta);
  padding: .35rem .8rem;
}
button:hover { text-decoration: underline; }
.nota { color: var(--meio); }
.linha { margin-top: 2.5rem; }

@media (max-width: 40rem) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  /* Stacked, this rule is the only thing separating one service from the next,
     so it uses --meio (6.4:1) instead of the decorative --linha (1.5:1). */
  tr { border-bottom: 1px solid var(--meio); padding: .75rem 0; }
  th, td { border: 0; padding: .15rem 0; }
  tbody th { font-size: 1.05rem; }
  /* The header row is hidden when stacked, so the hours cell needs its own label.
     Prefix, not suffix: "1 horas" would be wrong, "Horas: 1" reads for any value. */
  td:nth-of-type(2)::before { content: "Horas: "; color: var(--meio); }
  td.sats::after { content: " sats"; }
}

/* Tutoriais */
.lista-tutoriais { list-style: none; padding: 0; }
.lista-tutoriais li { padding: .9rem 0; border-bottom: 1px solid var(--linha); }
.lista-tutoriais time, .meta { color: var(--meio); font-size: .9rem; }
.lista-tutoriais p { margin: .2rem 0 0; }
.sumario { border: 1px solid var(--linha); padding: .8rem 1rem; margin: 0 0 1.5rem; }
.sumario ol { margin: 0; padding-left: 1.2rem; }
.assinatura { color: var(--meio); margin-top: 2.5rem; }

/* Rodapé */
.rodape { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--linha); color: var(--meio); font-size: .9rem; }
.rodape code { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media print {
  .topo nav, .acoes, .faixa, button { display: none; }
  body { max-width: none; }
}
