@import url('./tokens.css');
@import url('./components.css');

/* Base and low-specificity defaults. Page layout belongs to the page stylesheet. */
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 0; scroll-padding-block-start: var(--space-5); }
body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--w-book);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: anywhere;
}
:where(h1, h2, h3, h4, p, figure) { margin: 0; }
:where(h1, h2, h3, h4) { line-height: var(--lh-titulo); text-wrap: balance; }
:where(h1) { font-size: clamp(1.625rem, 1.3rem + 1vw, 2rem); font-weight: 800; letter-spacing: -0.025em; }
:where(h2) { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.015em; }
:where(h3) { font-size: 1rem; font-weight: 700; }
:where(p + p) { margin-block-start: var(--space-3); }
:where(a) { color: var(--accent-ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:where(a:hover) { text-decoration-thickness: 2px; }
:where(button, input, select, textarea) { font: inherit; }
:where(button) { touch-action: manipulation; }
:where(img, svg) { max-width: 100%; vertical-align: middle; }
:where(img) { height: auto; }
:where(ul, ol) { padding-inline-start: var(--space-5); }
:where(hr) { margin-block: var(--space-5); border: 0; border-block-start: 1px solid var(--border); }
:where(code, pre) { font-family: var(--font-mono); font-size: 0.9em; }
:where(pre) { overflow-x: auto; }
:where(:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
:where([id]) { scroll-margin-block: var(--space-5); }
::selection { background: var(--selection-bg); color: var(--selection-text); }
[hidden] { display: none !important; }

.container { width: min(var(--content-width), calc(100% - 48px)); margin-inline: auto; }
.stack { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.stack--sm { gap: var(--space-3); }
.stack--lg { gap: var(--space-6); }
.cluster, .split { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3); min-width: 0; }
.split { justify-content: space-between; }
.divider { border-block-start: 1px solid var(--border); }
.eyebrow { color: var(--accent-ink); font-size: var(--fs-legenda); font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.page-title { font-size: clamp(1.625rem, 1.3rem + 1vw, 2rem); letter-spacing: -0.025em; font-weight: 800; }
.section-title { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.015em; }
.text-muted { color: var(--muted); }
.text-small { font-size: var(--fs-small); }
.text-mono { font-family: var(--font-mono); }
.tabular-nums { font-variant-numeric: lining-nums tabular-nums; }
.status-success { color: var(--success); font-weight: 700; }
.status-error { color: var(--danger); font-weight: 700; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-logo { display: block; width: 116px; height: auto; flex-shrink: 0; object-fit: contain; }
.brand-symbol { width: 36px; height: auto; object-fit: contain; }
.brand-logo--dark { display: none; }
:is(.theme-dark, [data-theme='dark']) .brand-logo--light { display: none; }
:is(.theme-dark, [data-theme='dark']) .brand-logo--dark { display: block; }
:is(.theme-light, [data-theme='light']) .brand-logo--light { display: block; }
:is(.theme-light, [data-theme='light']) .brand-logo--dark { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: var(--space-3); left: var(--space-3); z-index: 100; padding: var(--space-3) var(--space-4); background: var(--surface); color: var(--accent-ink); border: 2px solid var(--focus); border-radius: var(--r-sm); transform: translateY(calc(-100% - 24px)); font-weight: 700; }
.skip-link:focus { transform: translateY(0); }

@media (max-width: 600px) { .container { width: calc(100% - 32px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  :where(:focus-visible) { outline-color: Highlight; }
  .skip-link { border-color: Highlight; }
  .brand-logo { forced-color-adjust: none; }
  .brand-logo--light { background-color: #ffffff; }
  .brand-logo--dark { background-color: #0e1622; }
}
@media print {
  :root, .theme-dark, [data-theme='dark'], .theme-light, [data-theme='light'] {
    color-scheme: light;
    --branco: #ffffff;
    --preto: #231f20;
    --azul: #00aae0;
    --azul-claro: #e4f6fc;
    --azul-escuro: #0089b8;
    --cinza-escuro: #7f8082;
    --cinza-claro: #e0e0e0;
    --bg: #ffffff;
    --bg-alt: #f5f6f7;
    --surface: #ffffff;
    --surface-2: #f0f2f4;
    --text: #231f20;
    --muted: #5c6169;
    --border: #c0c5cb;
    --border-strong: #848d98;
    --accent-ink: #006d94;
    --action: #00769b;
    --danger: #ad291b;
    --danger-bg: #fff0ed;
    --danger-border: #e9b7ad;
    --success: #186641;
    --success-bg: #eaf6ef;
    --success-border: #aed7bf;
    --warning: #805000;
    --warning-bg: #fff6df;
    --warning-border: #ddc38a;
    --info: #006d94;
    --info-bg: #e4f6fc;
    --info-border: #a8d8e8;
    --neutral-bg: #edf0f3;
    --neutral-border: #cdd3da;
    --fg: var(--text);
    --fg-muted: var(--muted);
    --ink: var(--text);
    --ink-soft: var(--muted);
  }
  body { background: #ffffff; color: #231f20; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .skip-link, .toast-region, dialog { display: none !important; }
  .surface, .card { box-shadow: none; break-inside: avoid; }
  .btn, .btn:hover { background: transparent; color: var(--text); border-color: var(--border-strong); box-shadow: none; }
  .table-wrap { overflow: visible; }
  .brand-logo--light, :is(.theme-dark, [data-theme='dark']) .brand-logo--light { display: block; }
  .brand-logo--dark, :is(.theme-dark, [data-theme='dark']) .brand-logo--dark { display: none; }
}
