/* Hallmark · genre: editorial with the v5 night · macrostructure: Workbench (three drafts, each with its sources) · design-system: design.md · designed-as-app
 * Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V4 · contrast: pass (40-41) · tokens: pass (48) · mobile: pass (34, 49, 50-57)
 * "Textos a partir do seu site": only this page's result. The page, the address card, the progress, the fictional site and
 * the service band are in /site/capi/paginas/demos.css. Every text that comes from a site or from the model is written by
 * the script as text, never as markup. Each draft is a split section on computers (its name, what it is for and its
 * state on the left, the text on the right), the facts numbered with their page, what the site does not say in a dashed
 * note, the warnings before publishing in an accent note, and where each fact came from in a fold-out list. */

/* ---------- The header: the verdict, the site read, the pages, the way to each draft ---------- */
.resultado-cabeca { padding-bottom: var(--space-lg); border-bottom: 1px solid var(--color-rule); }
.resultado-cabeca h2 {
  max-width: 24ch;
  font-size: clamp(1.75rem, 1.15rem + 1.6vw, 3rem);
  font-weight: var(--wght-display);
  font-stretch: var(--wdth-display);
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-wrap: balance;
}
.resultado-cabeca > p { max-width: 48ch; margin-top: var(--space-sm); color: var(--color-ink-2); }
.resultado-cabeca > p + p { margin-top: var(--space-2xs); color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--wght-small); line-height: 1.5; }
/* The pages read: the site's own titles, one ruled line each on a phone, side by side on computers */
.paginas-lidas { display: grid; margin: var(--space-sm) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--color-rule); }
.paginas-lidas li { min-width: 0; border-bottom: 1px solid var(--color-rule); color: var(--color-ink-2); font-size: 0.9375rem; }
.paginas-lidas a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-block: var(--space-2xs);
  color: var(--color-ink);
  font-weight: var(--wght-small);
  line-height: 1.35;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  overflow-wrap: anywhere;
  transition: text-decoration-color var(--dur-color) var(--ease-out);
}
@media (min-width: 40rem) {
  .paginas-lidas { display: flex; flex-wrap: wrap; gap: 0 var(--space-lg); border-top: 0; }
  .paginas-lidas li { border-bottom: 0; }
}
.indice a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: var(--wght-ui);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.3em;
  transition: text-decoration-color var(--dur-color) var(--ease-out);
}
.indice { display: flex; flex-wrap: wrap; gap: 0 var(--space-lg); margin-top: var(--space-sm); padding-top: var(--space-xs); border-top: 1px solid var(--color-rule); }
.indice a { white-space: nowrap; }
.indice a span { margin-left: 0.25em; color: var(--color-accent); font-weight: var(--wght-small); }
@media (hover: hover) and (pointer: fine) { .paginas-lidas a:hover, .indice a:hover { text-decoration-color: var(--color-accent); } }
/* On a phone the drafts follow right away and carry their own warning counts */
@media (max-width: 39.99rem) { .indice { display: none; } }

/* ---------- A draft: under an ink rule; on computers its name on the left (it stays while the text scrolls) ---------- */
.rascunhos { display: grid; gap: clamp(var(--space-2xl), 6vw, var(--space-3xl)); margin-top: var(--space-xl); }
.rascunho { padding-top: var(--space-md); border-top: 2px solid var(--color-ink); scroll-margin-top: calc(var(--header-h) + var(--space-md)); }
@media (min-width: 64rem) {
  .rascunho { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--col-gap); align-items: start; }
  .rascunho > * { grid-column: 2; max-width: 48rem; }
  .rascunho > .rascunho-cabeca { grid-column: 1; grid-row: 1 / span 40; position: sticky; top: calc(var(--header-h) + var(--space-md)); padding-right: var(--space-lg); }
  .rascunho > .rascunho-cabeca + * { margin-top: 0; }
}
.rascunho-cabeca { display: grid; justify-items: start; gap: var(--space-2xs); }
.rascunho-cabeca h3 { font-size: var(--text-title); font-weight: var(--wght-ui); letter-spacing: var(--track-title); line-height: 1.2; text-wrap: balance; }
.rascunho-cabeca p { max-width: 46ch; color: var(--color-ink-2); font-size: 0.9375rem; line-height: 1.5; }
.rascunho-cabeca .rascunho-estado { margin-top: var(--space-3xs); }

/* The fictional review a reply answers: an incoming message on crema-2 */
.avaliacao { max-width: 46rem; margin-top: var(--space-md); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-media); background: var(--color-paper-2); }
.avaliacao p { color: var(--color-ink); line-height: 1.55; overflow-wrap: anywhere; }
.avaliacao .avaliacao-cabeca { margin-bottom: var(--space-3xs); color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--wght-small); line-height: 1.45; }

/* The draft's fields: a small label, the text set for reading, the facts numbered with their source */
.rascunho-campo { margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.rascunho-cabeca + .rascunho-campo, .avaliacao + .rascunho-campo { border-top: 0; padding-top: 0; }
.rascunho-campo h4 { margin-bottom: var(--space-2xs); color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--wght-ui); line-height: 1.4; }
.campo-texto { max-width: 45ch; font-size: 1.0625rem; line-height: 1.65; overflow-wrap: anywhere; }
@media (min-width: 64rem) { .campo-texto { font-size: 1.125rem; } }
.campo-texto + .campo-texto { margin-top: var(--space-sm); }
.campo-lista { display: grid; gap: var(--space-2xs); max-width: 45ch; margin: 0; padding-left: 1.15em; line-height: 1.6; overflow-wrap: anywhere; }
.campo-lista li::marker { color: var(--color-muted); }
.rascunho-campo[data-ideia] .campo-texto { color: var(--color-ink-2); font-size: 1rem; }
/* A part without a source: dotted in the accent, and said in words */
.parte[data-sem-fonte] { text-decoration: underline dotted var(--color-accent); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.sem-fonte { margin-left: 0.25em; color: var(--color-accent); font-size: var(--text-sm); font-weight: var(--wght-ui); white-space: nowrap; }
.sem-fonte::before { content: "("; }
.sem-fonte::after { content: ")"; }

/* What the site does not say (dashed, like the neutral tag) and the warnings before publishing (the accent, like the
   attention tag): the only two notes of a draft */
.faltando, .avisos { max-width: 46rem; margin-top: var(--space-md); padding: var(--space-sm) var(--space-md); border: 1px dashed var(--color-rule-strong); border-radius: var(--radius-input); color: var(--color-ink-2); font-size: 0.9375rem; line-height: 1.5; }
.avisos { border-style: solid; border-color: var(--color-accent); }
.faltando strong, .avisos strong { display: block; margin-bottom: var(--space-3xs); color: var(--color-ink); font-size: 1rem; font-weight: var(--wght-ui); }
.avisos strong { color: var(--color-accent); }
.faltando ul, .avisos ul { display: grid; gap: var(--space-2xs); margin: var(--space-2xs) 0 0; padding-left: 1.15em; overflow-wrap: anywhere; }
.faltando p { margin-top: var(--space-2xs); color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--wght-small); }
.aviso-grupo { margin-right: 0.25em; color: var(--color-ink); font-weight: var(--wght-ui); }
.aviso-grupo::after { content: ":"; }

/* Where each fact came from: a fold-out list, open on computers */
.citacoes { max-width: 46rem; margin-top: var(--space-md); border-top: 1px solid var(--color-rule); border-bottom: 1px solid var(--color-rule); }
.citacoes > summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: var(--space-xs) var(--space-xl) var(--space-xs) 0;
  font-weight: var(--wght-ui);
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
}
.citacoes > summary::-webkit-details-marker { display: none; }
.citacoes > summary::before, .citacoes > summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: var(--space-2xs);
  width: 14px;
  height: 2px;
  margin-top: -1px;
  background: currentColor;
  transition: transform var(--dur-short) var(--ease-out);
}
.citacoes > summary::after { transform: rotate(90deg); }
.citacoes[open] > summary::after { transform: rotate(0deg); }
@media (hover: hover) and (pointer: fine) {
  .citacoes > summary:hover { text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 1.5px; text-underline-offset: 0.22em; }
}
.citacoes ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--color-rule); }
.citacao { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: var(--space-2xs); align-items: baseline; padding-block: var(--space-sm); border-bottom: 1px solid var(--color-rule); scroll-margin-top: calc(var(--header-h) + var(--space-md)); }
.citacao:last-child { border-bottom: 0; }
.citacao:target { background: var(--color-paper-2); }
.citacao-onde { color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--wght-ui); line-height: 1.4; overflow-wrap: anywhere; }
.citacao-onde a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--color-ink);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.25em;
  transition: text-decoration-color var(--dur-color) var(--ease-out);
}
@media (pointer: coarse) { .citacao-onde a { min-height: 44px; } }
@media (hover: hover) and (pointer: fine) { .citacao-onde a:hover { text-decoration-color: var(--color-accent); } }
.citacao blockquote { margin-top: var(--space-3xs); color: var(--color-ink-2); font-size: 0.9375rem; line-height: 1.6; overflow-wrap: anywhere; }
.citacao-aviso { margin-top: var(--space-2xs); color: var(--color-accent); font-size: var(--text-sm); font-weight: var(--wght-ui); line-height: 1.45; }

/* Copy, and what the server took out */
.rascunho-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-md); margin-top: var(--space-md); }
.rascunho-acoes p { color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--wght-small); }
.rascunho-nota { max-width: 50ch; margin-top: var(--space-sm); color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--wght-small); line-height: 1.5; }
@media (max-width: 39.99rem) { .rascunho-acoes .btn, .dados .btn { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .citacoes > summary::before, .citacoes > summary::after { transition: none; } }
