*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--ds-bg); color: var(--ds-text); }
body {
  font-family: var(--ds-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  min-height: 100vh;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }
.container-sm { max-width: 560px; margin: 0 auto; padding: 0 24px; width: 100%; }
.container-md { max-width: 800px; margin: 0 auto; padding: 0 24px; width: 100%; }

h1, h2, h3, h4 { font-family: var(--ds-display); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 700; letter-spacing: -0.022em; line-height: 1.05; }
h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 600; letter-spacing: -0.016em; line-height: 1.1; }
h3 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; letter-spacing: -0.012em; line-height: 1.2; }
h4 { font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.006em; }
p { margin: 0; }

/* Display — para títulos de impacto (hero, resultado) */
.display {
  font-family: var(--ds-display); font-weight: 900;
  font-size: clamp(40px, 7vw, 72px); line-height: 1.02; letter-spacing: -0.03em;
}
.accent { color: var(--mi-cobalto); }
.editorial { font-family: var(--ds-italic); font-style: italic; font-weight: 400; color: var(--mi-celeste); letter-spacing: 0; }
/* Body utilities (escala do DS) */
.body-l { font-size: 18px; line-height: 1.6; font-weight: 300; }
.body-s { font-size: 14px; line-height: 1.55; font-weight: 300; }
.text-mute { color: var(--ds-text-mute); }
.text-soft { color: var(--ds-text-soft); }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }

.section-title { font-family: var(--ds-display); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 20px; }
.subsection-title { font-family: var(--ds-display); font-size: 16px; font-weight: 600; letter-spacing: -0.008em; margin-bottom: 14px; }

/* ===== Accessibility ===== */
:focus-visible {
  outline: 2px solid var(--mi-celeste);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Keyboard focus inside the test alternatives */
.alt-option input:focus-visible + .alt-card {
  outline: 2px solid var(--mi-celeste);
  outline-offset: 2px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--mi-cobalto); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ===== Responsive (tablet & mobile) ===== */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }
}
@media (max-width: 768px) {
  body { font-size: 15px; }
  .dashboard-header { flex-wrap: wrap; gap: 12px; }
  .section-head { gap: 10px; }
  table { font-size: 13px; }
  th, td { padding: 10px 12px; }
}
@media (max-width: 600px) {
  .container, .container-sm, .container-md { padding: 0 16px; }
  /* Nav: smaller logo, hide long name, tighter buttons */
  .nav-top-inner { padding: 10px 0; }
  .nav-top-inner img { height: 40px; }
  .nav-user-name { display: none; }
  .nav-right { gap: 6px; }
  .nav-right .btn-sm, .nav-user-link { padding: 7px 10px; font-size: 12px; }
  /* Team cards: drop mini-radar to avoid cramping */
  .team-card .mini-radar { display: none; }
  .team-card-right .user-title-badge { max-width: none; }
  /* Meu Espaço header stacks */
  .me-header { flex-direction: column; text-align: center; }
  .me-meta { justify-content: center; }
  /* Toolbars wrap full-width */
  .team-toolbar { width: 100%; }
  .toolbar-field { flex: 1; }
  .toolbar-field select { flex: 1; }
}
