/* Base comum do cadastro e do Painel IHIT.
 * Regra: este arquivo só LÊ as variáveis --ihit-* geradas em tokens.css. Nenhum hex, rgb() ou hsl() solto.
 * Fontes: Archivo, Atkinson Hyperlegible Next e Martian Mono (OFL 1.1), as mesmas já usadas no site (infra/docker/site/publico/f/).
 * Só existem duas instâncias da Archivo no repositório: 125/800 (títulos grandes e números) e 100/600 (títulos menores).
 */

@font-face { font-family: "Archivo"; src: url("../fontes/archivo-125-800.v2.woff2") format("woff2"); font-weight: 800; font-stretch: 125%; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fontes/archivo-100-600.v2.woff2") format("woff2"); font-weight: 600; font-stretch: 100%; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../fontes/atkinson-400.v2.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("../fontes/atkinson-700.v2.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url("../fontes/martian-mono-400.v2.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--ihit-space-4);
  scroll-padding-bottom: 9.5rem;  /* a barra de ações fixa (até duas linhas de botões) não cobre o campo em foco (WCAG 2.2, 2.4.11) */
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ihit-color-background);
  color: var(--ihit-color-text);
  font-family: var(--ihit-font-text);
  font-size: var(--ihit-size-body);
  line-height: var(--ihit-leading-relaxed);
}
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-family: var(--ihit-font-display); text-wrap: balance; }
h1 { font-weight: var(--ihit-weight-extrabold); font-stretch: var(--ihit-width-display); line-height: var(--ihit-leading-snug); }
h2 { font-weight: var(--ihit-weight-semibold); font-size: var(--ihit-size-title-2); line-height: 1.2; }
h3 { font-weight: var(--ihit-weight-semibold); font-size: var(--ihit-size-body-lg); line-height: 1.25; }
h4 { font-weight: var(--ihit-weight-semibold); font-size: var(--ihit-size-body); line-height: 1.3; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--ihit-color-link); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
strong, b { font-weight: var(--ihit-weight-bold); }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
table { border-collapse: collapse; }

:focus-visible { outline: 2px solid var(--ihit-color-focus); outline-offset: 3px; }
main:focus, h1:focus, [tabindex="-1"]:focus { outline: none; }
main:focus-visible, h1:focus-visible { outline: 2px solid var(--ihit-color-focus); outline-offset: 6px; }

/* ------------------------------------------------------------------ utilidades */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--ihit-space-4); top: var(--ihit-space-2); z-index: 100; padding: var(--ihit-space-3) var(--ihit-space-4); background: var(--ihit-color-background); color: var(--ihit-color-text); border: 2px solid var(--ihit-color-focus); border-radius: var(--ihit-radius-md); transform: translateY(-300%); }
.skip-link:focus { transform: none; }
.muted { color: var(--ihit-color-text-secondary); }
.small { font-size: var(--ihit-size-body-sm); line-height: 1.45; }
.mono { font-family: var(--ihit-font-mono); font-size: var(--ihit-size-mono); line-height: var(--ihit-leading-code); letter-spacing: 0; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.center { text-align: center; }
.stack > * + * { margin-top: var(--ihit-space-4); }
.stack-lg > * + * { margin-top: var(--ihit-space-6); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ihit-space-3); }
.icon { width: 1.25rem; height: 1.25rem; flex: none; max-width: none; vertical-align: -0.2em; }
[data-icon] { display: inline-flex; flex: none; align-items: center; }
.icon--lg { width: 1.75rem; height: 1.75rem; }
.icon--sm { width: 1rem; height: 1rem; }

/* ------------------------------------------------------------------ marca */
.ihit-pecas, .ihit-letras { fill: var(--ihit-pecas); }
.ihit-ponto { fill: var(--ihit-ponto); }
.ihit-ia { fill: var(--ihit-color-ai); }
.logo { display: block; width: 7.25rem; height: auto; }  /* 116 px: acima do mínimo de 104 px do logotipo horizontal */
a.logo-link { display: inline-flex; align-items: center; min-height: 2.75rem; border-radius: var(--ihit-radius-sm); }

.eyebrow {
  font-family: var(--ihit-font-mono); font-size: var(--ihit-size-mono); line-height: 1.3;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ihit-color-link); margin: 0;
}

/* ------------------------------------------------------------------ botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ihit-space-2);
  min-height: 3rem; padding: 0 var(--ihit-space-6);
  border: 2px solid transparent; border-radius: var(--ihit-radius-encounter);
  font-weight: var(--ihit-weight-bold); font-size: var(--ihit-size-body); line-height: 1.2; text-align: center; text-decoration: none;
  background: transparent; color: var(--ihit-color-text); cursor: pointer;
  transition: transform var(--ihit-duration-fast) var(--ihit-ease-standard), filter var(--ihit-duration-fast) var(--ihit-ease-standard), background-color var(--ihit-duration-fast) var(--ihit-ease-standard);
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--ihit-color-action); color: var(--ihit-color-on-action); }
.btn--secondary { border-color: var(--ihit-color-control-border); color: var(--ihit-color-text); }
.btn--ghost { color: var(--ihit-color-link); }
.btn--danger { border-color: var(--ihit-color-error); color: var(--ihit-color-text); }
.btn--small { min-height: 2.5rem; padding: 0 var(--ihit-space-4); font-size: var(--ihit-size-body-sm); }
.btn--block { width: 100%; }
.btn[aria-disabled="true"], .btn:disabled { cursor: not-allowed; border-style: dashed; background: transparent; color: var(--ihit-color-text-secondary); border-color: var(--ihit-color-control-border); }
@media (hover: hover) {
  .btn--primary:hover { filter: brightness(1.07); }
  .btn--secondary:hover, .btn--danger:hover, .btn--ghost:hover { background: var(--ihit-color-surface-raised); }
}
.link-button {
  display: inline-block; padding: 0.15rem 0; border: 0; background: none; cursor: pointer;
  color: var(--ihit-color-link); text-decoration: underline; text-underline-offset: 0.2em; font: inherit;
}
.link-button:hover { text-decoration-thickness: 2px; }
.link-button--block { display: inline-flex; align-items: center; gap: var(--ihit-space-2); min-height: 2.75rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; flex: none;
  border: 1px solid transparent; border-radius: var(--ihit-radius-md); background: transparent; color: var(--ihit-color-text); cursor: pointer;
}
@media (hover: hover) { .icon-btn:hover { background: var(--ihit-color-surface-raised); } }
.icon-btn--access { border-color: var(--ihit-color-control-border); }
.back-button {
  display: inline-flex; align-items: center; gap: var(--ihit-space-2); min-height: 2.75rem; margin-left: calc(-1 * var(--ihit-space-2)); padding: 0 var(--ihit-space-2);
  border: 0; border-radius: var(--ihit-radius-sm); background: none; color: var(--ihit-color-link); font-weight: var(--ihit-weight-bold); cursor: pointer;
}

/* ------------------------------------------------------------------ campos */
.field { display: grid; gap: var(--ihit-space-2); }
.field + .field, .field + .choices-set, .choices-set + .field { margin-top: var(--ihit-space-5); }
.field__label { font-weight: var(--ihit-weight-bold); }
.field__label .optional { font-weight: var(--ihit-weight-regular); color: var(--ihit-color-text-secondary); }
.field__hint { color: var(--ihit-color-text-secondary); font-size: var(--ihit-size-body-sm); line-height: 1.45; margin: 0; }
.field__error { display: flex; gap: var(--ihit-space-2); align-items: flex-start; margin: 0; color: var(--ihit-color-error); font-weight: var(--ihit-weight-bold); font-size: var(--ihit-size-body-sm); line-height: 1.4; }
.field__error .icon { margin-top: 0.1rem; }
.field__ok { display: flex; gap: var(--ihit-space-2); align-items: flex-start; margin: 0; color: var(--ihit-color-success); font-weight: var(--ihit-weight-bold); font-size: var(--ihit-size-body-sm); line-height: 1.4; }
.field__ok .icon { margin-top: 0.1rem; }

.input, .select, .textarea {
  width: 100%; min-height: 3.25rem; padding: 0.75rem 1rem;
  border: 2px solid var(--ihit-color-control-border); border-radius: var(--ihit-radius-md);
  background: var(--ihit-color-background); color: var(--ihit-color-text);
  font-size: var(--ihit-size-body-lg); line-height: 1.3;   /* 19 px: sem zoom automático no iPhone */
}
.textarea { min-height: 7rem; resize: vertical; line-height: 1.45; }
.select { appearance: none; padding-right: 2.75rem; background-image: linear-gradient(45deg, transparent 50%, var(--ihit-color-text) 50%), linear-gradient(135deg, var(--ihit-color-text) 50%, transparent 50%); background-position: calc(100% - 1.4rem) 55%, calc(100% - 1.05rem) 55%; background-size: 0.35rem 0.35rem; background-repeat: no-repeat; }
.input::placeholder, .textarea::placeholder { color: var(--ihit-color-text-secondary); opacity: 1; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--ihit-color-focus); outline-offset: 2px; border-color: var(--ihit-color-focus); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--ihit-color-error); }
.input--code { font-family: var(--ihit-font-mono); letter-spacing: 0.2em; text-transform: uppercase; font-size: var(--ihit-size-title-2); }
.input--otp { font-family: var(--ihit-font-mono); letter-spacing: 0.35em; font-size: var(--ihit-size-title-1); text-align: center; }

.input-group { display: flex; align-items: stretch; border: 2px solid var(--ihit-color-control-border); border-radius: var(--ihit-radius-md); background: var(--ihit-color-background); }
.input-group:focus-within { outline: 2px solid var(--ihit-color-focus); outline-offset: 2px; border-color: var(--ihit-color-focus); }
.input-group.is-invalid { border-color: var(--ihit-color-error); }
.input-group .input { border: 0; border-radius: 0; outline: 0; min-width: 0; flex: 1; background: transparent; }
.input-group .input:focus-visible { outline: 0; }
.input-group__affix { display: inline-flex; align-items: center; padding: 0 0.875rem; background: var(--ihit-color-surface); color: var(--ihit-color-text-secondary); font-family: var(--ihit-font-mono); font-size: var(--ihit-size-mono); white-space: nowrap; }
.input-group__affix:first-child { border-radius: calc(var(--ihit-radius-md) - 2px) 0 0 calc(var(--ihit-radius-md) - 2px); }
.input-group__affix:last-child { border-radius: 0 calc(var(--ihit-radius-md) - 2px) calc(var(--ihit-radius-md) - 2px) 0; }

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }

/* cartões de marcar (um clique em qualquer parte do cartão) */
.choices { display: grid; gap: var(--ihit-space-3); grid-template-columns: 1fr; margin: var(--ihit-space-4) 0 0; }
@media (min-width: 640px) { .choices--cols { grid-template-columns: 1fr 1fr; } }
.choice {
  position: relative; display: flex; gap: var(--ihit-space-3); align-items: flex-start;
  min-height: 3.5rem; padding: var(--ihit-space-4);
  border: 2px solid var(--ihit-color-control-border); border-radius: var(--ihit-radius-md); background: var(--ihit-color-background);
  cursor: pointer; transition: background-color var(--ihit-duration-fast) var(--ihit-ease-standard), border-color var(--ihit-duration-fast) var(--ihit-ease-standard);
}
.choice input {
  appearance: none; -webkit-appearance: none; flex: none; display: grid; place-content: center;
  width: 1.5rem; height: 1.5rem; margin: 0.1rem 0 0;
  border: 2px solid var(--ihit-color-control-border); background: var(--ihit-color-background); cursor: pointer;
}
.choice input[type="radio"] { border-radius: 50%; }
.choice input[type="checkbox"] { border-radius: var(--ihit-radius-xs); }
.choice input:checked { background: var(--ihit-color-action); border-color: var(--ihit-color-action); }
.choice input[type="radio"]:checked::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ihit-color-on-action); }
.choice input[type="checkbox"]:checked::before { content: ""; width: 0.8rem; height: 0.42rem; margin-top: -0.12rem; border-left: 3px solid var(--ihit-color-on-action); border-bottom: 3px solid var(--ihit-color-on-action); transform: rotate(-45deg); }
.choice:has(input:checked) { border-color: var(--ihit-color-action); background: var(--ihit-color-selection); }
.choice:has(input:focus-visible) { outline: 2px solid var(--ihit-color-focus); outline-offset: 3px; }
.choice:has(input:disabled) { cursor: not-allowed; border-style: dashed; }
.choice:has(input:disabled) .choice__text { color: var(--ihit-color-text-secondary); }
.choice:has(input:disabled) input { cursor: not-allowed; }
.choice__text { display: grid; gap: 0.15rem; min-width: 0; }
.choice__title { font-weight: var(--ihit-weight-bold); line-height: 1.3; }
.choice__detail { color: var(--ihit-color-text-secondary); font-size: var(--ihit-size-body-sm); line-height: 1.4; }
@media (hover: hover) { .choice:not(:has(input:checked)):not(:has(input:disabled)):hover { background: var(--ihit-color-surface); } }
/* o mesmo cartão, mas como botão (escolhas que levam a outra tela) */
.choice--button { width: 100%; text-align: left; font: inherit; color: inherit; appearance: none; }
.choice--button:focus-visible { outline: 2px solid var(--ihit-color-focus); outline-offset: 3px; }
@media (hover: hover) { .choice--button:hover { background: var(--ihit-color-surface); border-color: var(--ihit-color-action); } }

/* caixa de seleção simples (aceites, preferências) */
.check { display: flex; gap: var(--ihit-space-3); align-items: flex-start; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; flex: none; display: grid; place-content: center; width: 1.5rem; height: 1.5rem; margin: 0.1rem 0 0; border: 2px solid var(--ihit-color-control-border); border-radius: var(--ihit-radius-xs); background: var(--ihit-color-background); cursor: pointer; }
.check input:checked { background: var(--ihit-color-action); border-color: var(--ihit-color-action); }
.check input:checked::before { content: ""; width: 0.8rem; height: 0.42rem; margin-top: -0.12rem; border-left: 3px solid var(--ihit-color-on-action); border-bottom: 3px solid var(--ihit-color-on-action); transform: rotate(-45deg); }
.check input:focus-visible { outline: 2px solid var(--ihit-color-focus); outline-offset: 3px; }
.check input[aria-invalid="true"] { border-color: var(--ihit-color-error); border-width: 3px; }
.check--card { padding: var(--ihit-space-4); border: 2px solid var(--ihit-color-control-border); border-radius: var(--ihit-radius-md); background: var(--ihit-color-background); }
.check--card:has(input:checked) { border-color: var(--ihit-color-action); background: var(--ihit-color-selection); }
.check--card:has(input[aria-invalid="true"]) { border-color: var(--ihit-color-error); }

.pill { display: inline-flex; cursor: pointer; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--ihit-space-4); border: 2px solid var(--ihit-color-control-border); border-radius: var(--ihit-radius-full); background: var(--ihit-color-background); font-weight: var(--ihit-weight-bold); }
.pill:has(input:checked) span { border-color: var(--ihit-color-action); background: var(--ihit-color-selection); }
.pill:has(input:focus-visible) span { outline: 2px solid var(--ihit-color-focus); outline-offset: 3px; }
.a11y-set { margin-top: var(--ihit-space-4); }
.a11y-set legend { font-weight: var(--ihit-weight-bold); margin-bottom: var(--ihit-space-2); }
.a11y-set__row { display: flex; flex-wrap: wrap; gap: var(--ihit-space-2); }

/* ------------------------------------------------------------------ cartões, avisos, selos */
.card { background: var(--ihit-color-surface); border: 1px solid var(--ihit-color-divider); border-radius: var(--ihit-radius-lg); padding: var(--ihit-space-5); }
.card--encounter { border-radius: var(--ihit-radius-encounter); }
.card--raised { background: var(--ihit-color-surface-raised); }
.card__title { margin-bottom: var(--ihit-space-3); }

.callout {
  --callout-color: var(--ihit-color-info);
  display: grid; grid-template-columns: auto 1fr; gap: var(--ihit-space-3); align-items: start;
  padding: var(--ihit-space-4); border-radius: var(--ihit-radius-md);
  background: var(--ihit-color-surface); border: 1px solid var(--ihit-color-divider); border-left: 4px solid var(--callout-color);
}
.callout > .icon { color: var(--callout-color); margin-top: 0.15rem; }
.callout__title { font-weight: var(--ihit-weight-bold); margin: 0 0 0.15rem; }
.callout p + p { margin-top: var(--ihit-space-2); }
.callout--success { --callout-color: var(--ihit-color-success); }
.callout--warning { --callout-color: var(--ihit-color-warning); }
.callout--error { --callout-color: var(--ihit-color-error); }
.callout--info { --callout-color: var(--ihit-color-info); }
.callout--ai { --callout-color: var(--ihit-color-ai); }

.badge {
  --badge-color: var(--ihit-color-text-secondary);
  display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.125rem 0.625rem; border: 1px solid currentColor; border-radius: var(--ihit-radius-full);
  color: var(--badge-color); background: transparent; font-size: var(--ihit-size-body-sm); font-weight: var(--ihit-weight-bold); line-height: 1.4; white-space: nowrap;
}
.badge .icon { width: 0.95rem; height: 0.95rem; }
.badge--success { --badge-color: var(--ihit-color-success); }
.badge--warning { --badge-color: var(--ihit-color-warning); }
.badge--error { --badge-color: var(--ihit-color-error); }
.badge--info { --badge-color: var(--ihit-color-info); }
.badge--ai { --badge-color: var(--ihit-color-ai); }

.kv { display: grid; gap: var(--ihit-space-3); margin: 0; }
.kv > div { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: var(--ihit-space-3); align-items: baseline; }
.kv dt { color: var(--ihit-color-text-secondary); font-size: var(--ihit-size-body-sm); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 639px) { .kv > div { grid-template-columns: 1fr; gap: 0; } }   /* uma coluna abaixo de 640 px (anexo §7) */

.checklist { list-style: none; display: grid; gap: var(--ihit-space-3); }
.checklist li { display: grid; grid-template-columns: auto 1fr; gap: var(--ihit-space-3); align-items: start; }
.checklist .icon { color: var(--ihit-color-success); margin-top: 0.15rem; }

details.help { border-top: 1px solid var(--ihit-color-divider); padding-top: var(--ihit-space-3); }
details.help > summary { display: flex; align-items: center; gap: var(--ihit-space-2); min-height: 2.75rem; cursor: pointer; color: var(--ihit-color-link); font-weight: var(--ihit-weight-bold); list-style: none; }
details.help > summary::-webkit-details-marker { display: none; }
details.help > summary .icon:last-child { margin-left: auto; transition: transform var(--ihit-duration-base) var(--ihit-ease-standard); }
details.help[open] > summary .icon:last-child { transform: rotate(180deg); }
details.help > :not(summary) { margin-top: var(--ihit-space-2); color: var(--ihit-color-text); }
details.help > summary:focus-visible { outline: 2px solid var(--ihit-color-focus); outline-offset: 2px; border-radius: var(--ihit-radius-sm); }

/* ------------------------------------------------------------------ demonstração (não faz parte do produto) */
.demo-bar { background: var(--ihit-color-surface-raised); border-bottom: 2px dashed var(--ihit-color-control-border); font-size: var(--ihit-size-body-sm); }
.demo-bar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ihit-space-2) var(--ihit-space-4); padding: var(--ihit-space-2) var(--ihit-space-4); max-width: 80rem; margin: 0 auto; }
.demo-bar__msg { color: var(--ihit-color-text); }
.demo-menu > summary { display: inline-flex; align-items: center; gap: var(--ihit-space-2); min-height: 2.75rem; cursor: pointer; font-weight: var(--ihit-weight-bold); color: var(--ihit-color-link-on-raised); list-style: none; }
.demo-menu > summary::-webkit-details-marker { display: none; }
.demo-menu[open] > summary .icon { transform: rotate(180deg); }
.demo-menu__body { display: grid; gap: var(--ihit-space-5); padding: var(--ihit-space-4) 0 var(--ihit-space-5); max-width: 80rem; margin: 0 auto; }
.demo-menu legend { font-weight: var(--ihit-weight-bold); margin-bottom: var(--ihit-space-2); }
.demo-nav { list-style: none; display: flex; flex-wrap: wrap; gap: var(--ihit-space-2); }
.demo-nav a, .demo-nav button { display: inline-flex; align-items: center; min-height: 2.25rem; padding: 0 var(--ihit-space-3); border: 1px solid var(--ihit-color-control-border); border-radius: var(--ihit-radius-full); background: var(--ihit-color-background); color: var(--ihit-color-text); text-decoration: none; font-size: var(--ihit-size-body-sm); cursor: pointer; }
.demo-nav a[aria-current="page"], .demo-nav a[aria-current="true"] { border-color: var(--ihit-color-action); background: var(--ihit-color-selection); font-weight: var(--ihit-weight-bold); }
.demo-note { padding: var(--ihit-space-3) var(--ihit-space-4); border: 2px dashed var(--ihit-color-control-border); border-radius: var(--ihit-radius-md); font-size: var(--ihit-size-body-sm); line-height: 1.45; }
.demo-note__tag { display: block; margin-bottom: var(--ihit-space-1); font-family: var(--ihit-font-mono); font-size: var(--ihit-size-caption); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ihit-color-text-secondary); }
.demo-note .row { margin-top: var(--ihit-space-2); gap: var(--ihit-space-2); }
.demo-code-form { display: grid; gap: var(--ihit-space-2); margin-top: var(--ihit-space-4); }
.demo-code-form .row { flex-wrap: nowrap; }
.demo-code-form .input { min-height: 2.75rem; padding-block: 0.5rem; font-size: var(--ihit-size-body); min-width: 0; }
.is-clean .demo-bar, .is-clean .demo-note { display: none; }

/* ------------------------------------------------------------------ diálogo */
.dialog {
  width: min(38rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; overflow: auto;
  border: 1px solid var(--ihit-color-control-border); border-radius: var(--ihit-radius-lg); background: var(--ihit-color-surface); color: var(--ihit-color-text);
}
.dialog::backdrop { background: color-mix(in srgb, var(--ihit-color-background, Canvas) 78%, transparent); }
.dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--ihit-space-3); padding: var(--ihit-space-5) var(--ihit-space-5) var(--ihit-space-3); }
.dialog__title { font-size: var(--ihit-size-title-2); }
.dialog__body { padding: 0 var(--ihit-space-5) var(--ihit-space-4); display: grid; gap: var(--ihit-space-4); }
.dialog__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--ihit-space-3); padding: var(--ihit-space-4) var(--ihit-space-5) var(--ihit-space-5); border-top: 1px solid var(--ihit-color-divider); }
.dialog__foot .btn { flex: 1 1 auto; }
@media (min-width: 480px) { .dialog__foot .btn { flex: 0 0 auto; } }

/* ------------------------------------------------------------------ rodapé de página */
.page-footer { color: var(--ihit-color-text-secondary); font-size: var(--ihit-size-body-sm); line-height: 1.5; }
.page-footer p + p { margin-top: var(--ihit-space-2); }

/* ------------------------------------------------------------------ movimento reduzido */
/* Sem animação e sem transição (não "quase zero": uma transição de 0,01 ms ainda deixa o primeiro quadro com a cor antiga).
   O símbolo da marca fica de fora: ele tem o jeito próprio de "reduzir" (o Ponto pisca devagar), em cadastro.css. */
@media (prefers-reduced-motion: reduce) {
  *:not(.symbol, .symbol *), *:not(.symbol, .symbol *)::before, *:not(.symbol, .symbol *)::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
html[data-motion="reduce"] *:not(.symbol, .symbol *), html[data-motion="reduce"] *:not(.symbol, .symbol *)::before, html[data-motion="reduce"] *:not(.symbol, .symbol *)::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

/* ------------------------------------------------------------------ cores forçadas (alto contraste do sistema) */
@media (forced-colors: active) {
  .btn { border: 2px solid ButtonText; }
  .btn--primary { border-color: Highlight; }
  .choice:has(input:checked), .check--card:has(input:checked), .pill:has(input:checked) span { outline: 3px solid Highlight; outline-offset: -3px; }
  .choice input:checked, .check input:checked { forced-color-adjust: none; background: Highlight; border-color: Highlight; }
  .callout { border: 2px solid CanvasText; }
  .badge { border-color: CanvasText; }
}
