/* Colours and type from docs/brand.md. Nunito Black is the wordmark's typeface; text keeps the system font. */
@font-face {
  font-family: 'Nunito';
  font-weight: 900;
  font-display: swap;
  src: url('/fonts/Nunito-Black.ttf') format('truetype');
}

:root {
  --indigo: #3d4ed8;
  --navy: #1f2340;
  --gold: #ffb21e;
  --white: #ffffff;
  --paper: #f5f6fb;
  --muted: #4a4f6b;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--navy);
  background: var(--white);
  font: 1.0625rem/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

h1, h2, h3 {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2rem, 6vw, 3.25rem); max-width: 18ch; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

a { color: var(--indigo); }

a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* On indigo, the logo's tiles stand alone, as on the splash screen and the Play feature graphic. */
.hero {
  background: var(--indigo);
  color: var(--white);
  padding: 1.5rem 0 3.5rem;
}

.logo { display: block; height: 40px; width: auto; margin: 0 0 3rem -0.4rem; }

/* The symbol, large, beside the text on wide screens. */
.tiles { display: none; }

@media (min-width: 56rem) {
  .hero .wrap { position: relative; }
  .tiles { display: block; position: absolute; right: 1.25rem; top: 5.5rem; width: 280px; height: 280px; }
}

.lead { font-size: 1.1875rem; max-width: 38rem; opacity: 0.92; margin-bottom: 2rem; }

.button {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: 0.75rem;
}

.button:hover { background: #ffc24d; }

main > .wrap { padding-top: 3.5rem; }

.steps {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 2rem;
}

@media (min-width: 48rem) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

/* The answer tiles of the symbol: white with an indigo outline, and the last one picked in gold. */
.tile {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.8rem;
  border: 2px solid var(--indigo);
  color: var(--indigo);
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 900;
  font-size: 1.375rem;
  margin-bottom: 1rem;
}

.tile-picked { background: var(--gold); border-color: var(--gold); color: var(--navy); }

.steps p, .trust li { color: var(--muted); }

.trust ul { margin: 1.5rem 0 0; padding: 0; list-style: none; display: grid; gap: 1.25rem; }

@media (min-width: 48rem) {
  .trust ul { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2.5rem; }
}

.trust strong { display: block; color: var(--navy); }

.beta {
  background: var(--paper);
  margin-top: 3.5rem;
  padding: 3.5rem 0;
}

.beta p { max-width: 40rem; }

.beta .button { margin-top: 0.5rem; }

footer.wrap { padding-top: 2rem; padding-bottom: 3rem; color: var(--muted); font-size: 0.9375rem; }

footer p { margin: 0; }

/* Tall enough to tap on a phone (48 px rows), and wrapping onto more lines on narrow screens. */
.footer-links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-bottom: 0.5rem; }

.footer-links a { display: inline-block; padding: 0.7rem 0; }

/* Text pages (web/pages and the help articles): a shorter band, then text at a readable width. */
.page-hero { padding-bottom: 2.25rem; }

.page-hero .logo { margin-bottom: 2rem; }

.page-hero h1 { font-size: clamp(1.75rem, 5.5vw, 2.5rem); max-width: 24ch; }

.page-hero .lead { margin-bottom: 0; }

.doc { max-width: 46rem; padding-top: 2.5rem; overflow-wrap: break-word; }

.doc h2 { margin-top: 2.75rem; }

.doc h3 { margin-top: 2rem; }

.doc h2 + h3 { margin-top: 1.25rem; }

.doc ul, .doc ol { margin: 0 0 1rem; padding-left: 1.4rem; }

.doc li { margin-bottom: 0.4rem; }

.doc dt { font-weight: 700; margin-top: 1.25rem; }

.doc dd { margin: 0.25rem 0 0; color: var(--muted); }

.doc dl { margin: 0 0 1.5rem; }

/* The beta notice at the top of the legal pages. */
.notice {
  background: var(--paper);
  border-left: 4px solid var(--gold);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

.notice p:last-child { margin-bottom: 0; }

.doc .toc { background: var(--paper); border-radius: 0.75rem; padding: 1rem 1.25rem 1rem 2.6rem; }

.doc .toc li { margin-bottom: 0.25rem; }

/* The help center (/ajuda): the article list, the way back, and the previous and next articles. */
.crumbs { margin-bottom: 1.5rem; font-size: 0.9375rem; }

.crumbs a::before { content: '← '; }

.doc .articles { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 0.75rem; }

.doc .articles li { margin: 0; }

.articles a {
  display: block;
  padding: 1rem 1.25rem;
  border: 2px solid var(--paper);
  border-radius: 0.75rem;
  text-decoration: none;
  color: var(--muted);
}

.articles a:hover { border-color: var(--indigo); }

.articles strong { display: block; color: var(--indigo); font-size: 1.125rem; margin-bottom: 0.25rem; }

.pager { display: grid; gap: 0.75rem; margin: 3rem 0 2rem; }

@media (min-width: 40rem) {
  .pager { grid-template-columns: 1fr 1fr; }
  .pager .next { grid-column: 2; text-align: right; }
}

.pager a { display: block; padding: 0.85rem 1rem; background: var(--paper); border-radius: 0.75rem; text-decoration: none; font-weight: 700; }

.pager span { display: block; color: var(--muted); font-size: 0.875rem; font-weight: 400; }

.help-more { margin-top: 2rem; color: var(--muted); }

.manual-article { padding-top: 1rem; }

.manual-article > h2 { margin-top: 3rem; padding-top: 1.5rem; border-top: 2px solid var(--paper); }

/* The help assistant on /ajuda (#84): the conversation, then the question box. */
.assistant { margin: 2.5rem 0 0; padding: 1.25rem; background: var(--paper); border-radius: 0.75rem; }

.assistant h2 { margin-top: 0; font-size: 1.5rem; }

.assistant-note { color: var(--muted); font-size: 0.9375rem; }

.chat-log { display: grid; gap: 0.75rem; margin-bottom: 1rem; }

.chat-log:empty { display: none; }

.chat-question, .chat-answer, .chat-notice { padding: 0.75rem 1rem; border-radius: 0.75rem; overflow-wrap: break-word; }

.chat-question { justify-self: end; max-width: 85%; background: var(--indigo); color: var(--white); white-space: pre-wrap; }

.chat-answer { background: var(--white); }

.chat-answer p:last-child, .chat-answer ol:last-child, .chat-answer ul:last-child { margin-bottom: 0; }

.chat-notice { color: var(--muted); border: 2px solid var(--white); }

.chat-form label { display: block; font-weight: 700; margin-bottom: 0.25rem; }

.chat-form textarea {
  display: block;
  width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  border: 2px solid #d6d9ea;
  border-radius: 0.5rem;
  font: inherit;
  color: inherit;
  background: var(--white);
  resize: vertical;
}

.chat-form textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }

.chat-status:empty { display: none; }

.chat-form .button { border: 0; cursor: pointer; font: inherit; font-weight: 700; }

.chat-form .button:disabled { opacity: 0.6; cursor: wait; }

/* Printed or saved as PDF: dark text on white, without the site's navigation. */
@media print {
  body { font-size: 11pt; }
  .hero { background: none; color: var(--navy); padding: 0 0 1rem; }
  .hero .logo, footer, .crumbs, .pager, .no-print, .help-more, .button { display: none; }
  .hero .lead { opacity: 1; }
  .doc { max-width: none; padding-top: 0; }
  a { color: inherit; text-decoration: none; }
  .manual-article { break-before: page; }
  .manual-article > h2 { margin-top: 0; padding-top: 0; border-top: 0; }
  h2, h3, h4 { break-after: avoid; }
  li { break-inside: avoid; }
}

.notfound { min-height: 100vh; }

.notfound .lead { margin-bottom: 2rem; }
