/*
  Estilos base dos painéis novos (biblioteca comum). Usa apenas os tokens de css/tokens.css.
  Não sobrescrever estilos internos dos componentes Fluent com seletores frágeis (CLAUDE.md da raiz, seção 5).
*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

/* Garante a rolagem normal da página mesmo que algum estilo padrão do Fluent fixe a altura do body. */
html body {
    height: auto;
    min-height: 100%;
    overflow: visible;
}

body {
    margin: 0;
    font-family: var(--pe-font-family);
    font-size: var(--pe-text-body-size);
    line-height: var(--pe-text-body-line);
    font-weight: var(--pe-font-weight-regular);
    color: var(--pe-color-text);
    background-color: var(--pe-color-canvas);
    -webkit-font-smoothing: antialiased;
}

/* Títulos: escala definida, caixa de frase (nunca caixa alta) */
h1,
h2,
h3 {
    margin: 0 0 var(--pe-space-4);
    font-weight: var(--pe-font-weight-semibold);
    color: var(--pe-color-text);
    text-transform: none;
}

h1 {
    font-size: var(--pe-text-title-size);
    line-height: var(--pe-text-title-line);
}

h2 {
    font-size: var(--pe-text-subtitle-size);
    line-height: var(--pe-text-subtitle-line);
}

h3 {
    font-size: var(--pe-text-body-lg-size);
    line-height: var(--pe-text-body-lg-line);
}

p {
    margin: 0 0 var(--pe-space-4);
}

a {
    color: var(--pe-color-link);
    text-underline-offset: 2px;
}

code {
    font-family: var(--pe-font-family-mono);
}

/* Foco de teclado sempre visível, e só para teclado */
:focus-visible {
    outline: none;
    box-shadow: var(--pe-focus-ring);
    border-radius: var(--pe-radius-sm);
}

/* Texto corrido limitado a cerca de 80 caracteres por linha */
.pe-prose {
    max-width: var(--pe-measure);
}

.pe-text-secondary {
    color: var(--pe-color-text-secondary);
}

.pe-text-caption {
    font-size: var(--pe-text-caption-size);
    line-height: var(--pe-text-caption-line);
    color: var(--pe-color-text-muted);
}

/* Visível só para leitores de tela */
.pe-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
