/* Gerado por app/scripts/sync-partner-site-ds.mjs a partir de app/src/design-system/. Não editar aqui. */

@layer base, screens, ds;

/* §2 Letras: Inter e Poppins servidas pelo próprio Portal (sem serviço externo). */
@font-face { font-family: 'Inter'; src: url('./fonts/inter-latin-400-normal.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('./fonts/inter-latin-500-normal.woff2') format('woff2'); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('./fonts/inter-latin-600-normal.woff2') format('woff2'); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('./fonts/inter-latin-700-normal.woff2') format('woff2'); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('./fonts/poppins-latin-500-normal.woff2') format('woff2'); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('./fonts/poppins-latin-600-normal.woff2') format('woff2'); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('./fonts/poppins-latin-700-normal.woff2') format('woff2'); font-style: normal; font-weight: 700; font-display: swap; }

@layer base {
/*
 * Padrão Visual do Portal (codifica-governanca/PADRAO_VISUAL_PORTAL.md) — tokens.
 * ÚNICO lugar com valores de cor, letra, espaço, raio, sombra e medida dos componentes.
 * Telas usam só var(--token). Valor novo entra aqui, com a seção do Padrão ao lado.
 * O site de Parceiros recebe uma cópia gerada (scripts/sync-partner-site-ds.mjs).
 */
:root {
  /* §1.1 Marca */
  --brand-magenta: #E42D5D;
  --brand-midnight: #150057;
  --brand-purple: #352C57;
  --brand-blue-tech: #444D9C;
  --brand-rosa-labs: #9E599F;
  --brand-violet: #5531FF;

  /* §1.2 Interface */
  --surface-page: #ECEAF5;
  --surface-section: #EFECF9;
  --surface-card: #FFFFFF;
  --surface-input: #FFFFFF;
  --surface-disabled: #F3F2F7;
  --surface-hover: #EFECF9;
  --surface-selected: #E8E5F8;
  --surface-dark: var(--brand-midnight);
  --overlay-backdrop: rgba(21, 0, 87, 0.42);
  /* Tela de entrada: véu sobre o roxo da marca. */
  --entry-veil: radial-gradient(ellipse 55% 76% at 49% 49%, rgba(171, 155, 202, 0.16), rgba(53, 44, 87, 0) 72%),
    linear-gradient(90deg, rgba(21, 0, 87, 0.17), rgba(53, 44, 87, 0.015) 47%, rgba(21, 0, 87, 0.23));

  --border-subtle: #CFCADF;
  --border-faint: #E4E1EE; /* (1.5) linha entre pares de leitura */
  --border-default: #8F8AA3;
  --border-strong: #6E6A80;
  --border-width: 1px;
  --border-width-strong: 2px;
  /* §6.7 Gráficos: Blue Tech e seus tons, na ordem das partes. */
  --chart-1: var(--brand-blue-tech);
  --chart-1-text: #FFFFFF;
  --chart-2: color-mix(in srgb, var(--brand-blue-tech) 30%, var(--surface-card));
  --chart-2-text: var(--brand-midnight);
  --chart-3: color-mix(in srgb, var(--brand-blue-tech) 12%, var(--surface-card));
  --chart-3-text: var(--brand-midnight);
  --chart-bar-height: 32px;
  --step-mark-size: 28px;

  /* §1.3 Texto */
  /* (1.7) Texto em roxo escuro da marca, nunca quase preto (Bárbara, 26/10). */
  --text-primary: #352F55;
  --text-secondary: #5A5573;
  /* §2 (1.4/1.6): resposta e valor um tom abaixo da pergunta e do título, nunca maiores nem mais fortes. */
  --text-value: var(--text-secondary);
  --text-muted: #5E5A70;
  /* Cor da linha/cartão na chave Cores (§6.6); cada data-tone redefine. */
  --tone-bg: var(--surface-card);
  --tone-border: var(--border-subtle);
  --tone-text: var(--text-secondary);
  --text-placeholder: #6E6A80;
  --text-disabled: #8F8AA3;
  --text-on-dark: #FFFFFF;
  --surface-on-dark: rgba(255, 255, 255, 0.14);
  --text-brand: var(--brand-midnight);
  --text-error: #B91C1C;

  /* §5.1 Ação: Blue Tech exclusivo; Violet no foco; rosa nunca em ação, seleção ou foco. */
  --action-primary: var(--brand-blue-tech);
  --action-primary-hover: var(--brand-purple);
  --action-primary-active: var(--brand-midnight);
  --action-primary-text: #FFFFFF;
  --action-danger: #B91C1C;
  --action-danger-hover: #991B1B;
  --action-accent: var(--brand-violet);
  --link-default: var(--brand-blue-tech);
  --link-hover: var(--brand-purple);
  --selection-border: var(--brand-blue-tech);
  --focus-ring: var(--brand-violet);
  --focus-ring-on-dark: #B99AD5;
  --focus-ring-width: 2px;

  /* §6.1 Moldura (menu lateral) */
  --nav-bg: var(--brand-purple);
  --nav-hover: #4D456B;
  --nav-selected: #B99AD5;
  --nav-selected-text: var(--brand-midnight);
  --nav-text: #FFFFFF;
  --nav-text-muted: rgba(255, 255, 255, 0.72);
  --nav-divider: rgba(255, 255, 255, 0.16);
  --nav-open: rgba(255, 255, 255, 0.08);
  --nav-label: rgba(255, 255, 255, 0.56);
  --nav-width: 248px;
  --nav-width-collapsed: 72px;

  /* §6.9 (1.12) Página inicial da área: menu da área em botões, no lilás do menu */
  --hub-accent: #6B4FB0;
  --hub-accent-bg: #EFE8F8;
  --hub-accent-border: #D9CCEE;
  --hub-panel-bg: var(--surface-page);
  --hub-page-bg: #F8F7FC;
  --hub-stripe: var(--nav-selected);
  --hub-hero-bg: linear-gradient(90deg, var(--hub-accent-bg), var(--surface-card) 70%);
  --hub-icon-box: 36px;
  --hub-hero-icon: 44px;
  --hub-stripe-width: 3px;

  /* §1.5 Status: verde ok · âmbar ação · azul andamento · cinza neutro · vermelho erro */
  --status-success-text: #166534;
  --status-success-bg: #EAF6EE;
  --status-success-border: #9ED3AF;
  --status-warning-text: #8A4B08;
  --status-warning-bg: #FDF4E3;
  --status-warning-border: #F0C77A;
  --status-info-text: #3A4290;
  /* Distinto do fundo do sistema (#ECEAF5): "em andamento" precisa aparecer em quadros e cartões. */
  --status-info-bg: #E1E4F8;
  --status-info-border: #B9BDE0;
  --status-neutral-text: #4B5563;
  --status-neutral-bg: #F1F2F4;
  --status-neutral-border: #CDD1D7;
  --status-danger-text: #991B1B;
  --status-danger-bg: #FDECEC;
  --status-danger-border: #F2A9A9;

  /* §1.6 Categorias: fundo 10%, borda 35%, texto no tom forte */
  --category-schools-bg: #FCEAEF;
  --category-schools-border: #F6B6C6;
  --category-schools-text: #B3173F;
  --category-labs-bg: #F5EEF5;
  --category-labs-border: #DDC5DD;
  --category-labs-text: #7A3F7B;
  --category-independent-bg: #EEEAFF;
  --category-independent-border: #C4B7FF;
  --category-independent-text: #3F1FD1;
  /* Tela de entrada do Portal (fundo roxo): vidro, textos claros e marca do Google. Visual aprovado do login. */
  --entry-glass-bg: rgba(160, 144, 203, 0.35);
  --entry-glass-border: rgba(235, 231, 255, 0.3);
  --entry-text-soft: #E8E5F8;
  --entry-text-muted: rgba(232, 229, 248, 0.74);
  --entry-line: rgba(255, 255, 255, 0.26);
  --entry-feedback-border: rgba(255, 255, 255, 0.22);
  --entry-feedback-bg: rgba(21, 0, 87, 0.28);
  --entry-feedback-error-bg: rgba(21, 0, 87, 0.38);
  --brand-magenta-hover: #BF234B;
  --entry-text-shadow: 0 8px 34px rgba(21, 0, 87, 0.24);
  --entry-veil: radial-gradient(ellipse 55% 76% at 49% 49%, rgba(171, 155, 202, 0.16), rgba(53, 44, 87, 0) 72%), linear-gradient(90deg, rgba(21, 0, 87, 0.17), rgba(53, 44, 87, 0.015) 47%, rgba(21, 0, 87, 0.23));
  --google-blue: #4285F4;
  --google-green: #34A853;
  --google-yellow: #FBBC05;
  --google-red: #EA4335;
  --category-network-bg: #E8E6EE;
  --category-network-border: #ADA6C4;
  --category-network-text: #150057;
  --category-unit-bg: #EBEAEE;
  --category-unit-border: #B8B5C4;
  --category-unit-text: #352C57;
  /* §1.8 (1.7) Cor da área: identifica onde a pessoa está (menu, cabeçalho, ícones de seção, contagens e indicadores).
     Nunca em botão, situação ou ação. --area* vale Blue Tech fora de uma área; .page com o nome da área redefine. */
  /* (1.12) Bárbara, 26/10: sem cor por área. Todas as áreas usam a mesma cor da marca (Blue Tech). */
  --area-one: var(--brand-blue-tech); --area-one-bg: #EEEFF8; --area-one-border: #B9BDE0;
  --area-comercial: var(--area-one); --area-comercial-bg: var(--area-one-bg); --area-comercial-border: var(--area-one-border); --area-comercial-on-dark: var(--nav-text);
  --area-operacao: var(--area-one); --area-operacao-bg: var(--area-one-bg); --area-operacao-border: var(--area-one-border); --area-operacao-on-dark: var(--nav-text);
  --area-produto: var(--area-one); --area-produto-bg: var(--area-one-bg); --area-produto-border: var(--area-one-border); --area-produto-on-dark: var(--nav-text);
  --area-financeiro: var(--area-one); --area-financeiro-bg: var(--area-one-bg); --area-financeiro-border: var(--area-one-border); --area-financeiro-on-dark: var(--nav-text);
  --area-administrativo: var(--area-one); --area-administrativo-bg: var(--area-one-bg); --area-administrativo-border: var(--area-one-border); --area-administrativo-on-dark: var(--nav-text);
  --area-colaboradores: var(--area-one); --area-colaboradores-bg: var(--area-one-bg); --area-colaboradores-border: var(--area-one-border); --area-colaboradores-on-dark: var(--nav-text);
  --area-parceiros: var(--area-one); --area-parceiros-bg: var(--area-one-bg); --area-parceiros-border: var(--area-one-border); --area-parceiros-on-dark: var(--nav-text);
  --area-gestao: var(--area-one); --area-gestao-bg: var(--area-one-bg); --area-gestao-border: var(--area-one-border); --area-gestao-on-dark: var(--nav-text);
  --area: var(--area-one); --area-bg: var(--area-one-bg); --area-border: var(--area-one-border); --area-on-dark: var(--nav-text);
  /* §1.6 (1.7) Tons de tipo: um por opção de campos de tipo (tipo de cargo, vínculo, categoria), sempre na mesma ordem. Não é situação. */
  /* Fundos 1, 5 e 8 distintos do fundo do sistema (#ECEAF5), para a etiqueta e a linha colorida aparecerem. */
  --hue-1-text: #4A2BD6; --hue-1-bg: #E6E1FF; --hue-1-border: #C9BEFF;
  --hue-2-text: #0B6F86; --hue-2-bg: #E2F4F7; --hue-2-border: #99D3DF;
  --hue-3-text: #B13F12; --hue-3-bg: #FDEEE6; --hue-3-border: #F3BFA6;
  --hue-4-text: #56731B; --hue-4-bg: #EEF4E1; --hue-4-border: #C2D49A;
  --hue-5-text: #3A4290; --hue-5-bg: #E1E4F8; --hue-5-border: #B9BDE0;
  --hue-6-text: #8A3C8B; --hue-6-bg: #F6ECF6; --hue-6-border: #DDB9DD;
  --hue-7-text: #0F7553; --hue-7-bg: #E3F5EE; --hue-7-border: #9CD6C0;
  --hue-8-text: #455A78; --hue-8-bg: #E3E8F1; --hue-8-border: #BAC4D4;
  /* (1.7) Chave Cores na linha: fundo claro e fio de 4 px na cor da situação. */
  --row-success-bg: #F3FAF5; --row-success-edge: #4CAF73;
  --row-warning-bg: #FEF8EC; --row-warning-edge: #E1A23A;
  --row-info-bg: #F4F4FB; --row-info-edge: #6E76C2;
  --row-danger-bg: #FEF3F3; --row-danger-edge: #D85C5C;
  --row-edge-width: 4px;

  /* Assunto (cartões da Visão 360 e atalhos): tons Blue Tech, sem significado de status. */
  --category-topic-bg: #EEEFF8;
  --category-topic-border: #B9BDE0;
  --category-topic-text: #353D80;
  /* Visão 360: famílias de assunto, independentes dos estados de alerta e progresso. */
  --category-interactions-bg: #DFF6F0;
  --category-interactions-border: #8ECFBC;
  --category-interactions-text: #146454;
  --category-tasks-bg: #FFF0D6;
  --category-tasks-border: #EAC27F;
  --category-tasks-text: #825018;
  --category-records-bg: #E8E2FF;
  --category-records-border: #B9A9FA;
  --category-records-text: #5138A4;

  /* Parceiros (DECISOES §B1): selos de frente e colunas de estrutura do Quadro. */
  --partner-front-schools-bg: color-mix(in srgb, var(--brand-magenta) 12%, var(--surface-card));
  --partner-front-schools-border: color-mix(in srgb, var(--brand-magenta) 35%, var(--surface-card));
  --partner-front-schools-text: color-mix(in srgb, var(--brand-magenta) 78%, var(--text-primary));
  --partner-front-labs-bg: color-mix(in srgb, var(--brand-blue-tech) 12%, var(--surface-card));
  --partner-front-labs-border: color-mix(in srgb, var(--brand-blue-tech) 35%, var(--surface-card));
  --partner-front-labs-text: var(--brand-blue-tech);
  --partner-structure-independent-board-bg: color-mix(in srgb, var(--category-independent-text) 26%, var(--surface-card));
  --partner-structure-network-board-bg: color-mix(in srgb, var(--category-network-text) 30%, var(--surface-card));
  --partner-structure-unit-board-bg: color-mix(in srgb, var(--category-unit-text) 18%, var(--surface-card));

  /* §1.7 Prioridade */
  --priority-1-bg: #444D9C;
  --priority-1-text: #FFFFFF;
  --priority-2-bg: #5A61AB;
  --priority-2-text: #FFFFFF;
  --priority-3-bg: #DCDEF2;
  --priority-3-text: #353D80;
  --priority-4-bg: #FFFFFF;
  --priority-4-text: #444D9C;
  --priority-4-border: #444D9C;
  --priority-size: 26px;

  /* §2 Letras: só 12, 13, 15, 16, 20 e 28 px. */
  --font-identity: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-operational: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-size-12: 0.75rem;
  --font-size-13: 0.8125rem;
  --font-size-15: 0.9375rem;
  --font-size-16: 1rem;
  --font-size-20: 1.25rem;
  --font-size-28: 1.75rem;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-strong: 600;
  --font-weight-title: 700;
  --line-height-title: 1.25;
  --line-height-text: 1.5;
  --line-height-reading: 1.75; /* texto corrido longo (políticas, avisos, documentos) */

  /* §4 Espaços: só 4, 8, 12, 16, 20, 24, 32, 48 */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --page-padding: 32px;
  /* §4.1 Ritmo (1.6): a distância entre blocos vem só destes quatro, por componente; nenhuma tela soma margens. */
  --gap-page: var(--space-24);    /* entre blocos da página: cabeçalho, avisos, abas, painéis */
  --gap-tabs: var(--space-16);    /* das abas até o conteúdo da aba */
  --gap-panel: var(--space-24);   /* entre blocos do conteúdo de uma aba: aviso, resumo, contadores, busca, lista */
  --gap-sections: var(--space-16); /* entre seções de uma ficha, uma embaixo da outra */
  --gap-inside: var(--space-16);  /* dentro de uma seção, entre partes */

  /* §4 Raios e sombras (sombra só em janela, painel lateral e menu suspenso) */
  --radius-control: 8px;
  --radius-card: 12px;
  --radius-pill: 999px;
  --elevation-menu: 0 4px 12px rgba(21, 0, 87, 0.08);
  --elevation-overlay: 0 12px 32px rgba(21, 0, 87, 0.14);

  /* §3 e §6 Medidas dos componentes */
  --control-height: 40px;
  --control-height-compact: 32px;
  --control-padding-inline: 12px;
  --button-padding-inline: 16px;
  --checkbox-size: 16px;
  --switch-width: 40px;
  --switch-height: 24px;
  --tag-height: 24px;
  --tag-dot: 8px;
  --avatar-size: 32px;
  --avatar-size-partner: 36px;
  --icon-sm: 16px;
  --icon-md: 20px;
  --icon-lg: 24px;
  --section-icon-box: 32px; /* (1.5) quadro do ícone da seção e da parte do formulário */
  --section-toggle: 32px; /* (1.6) botão redondo de abrir/fechar a seção */
  --section-head-height: 56px;
  --readonly-label-min: 144px; /* (1.5) coluna do rótulo no par em linhas */
  --textarea-min-height: 120px;
  --table-header-height: 44px;
  --table-row-height: 48px;
  --tab-height: 44px;
  --list-item-header-height: 44px;
  --board-column-width: 280px;
  --panel-width: 480px;
  --panel-width-wide: 880px;
  --menu-max-height: 320px;
  --container-form: 1040px;
  --container-page: 1440px;
  --container-text: 72ch;
  --scrollbar-size: 8px;
  --scrollbar-thumb: var(--border-subtle);
  --scrollbar-thumb-hover: var(--border-strong);
  --scrollbar-nav-thumb: rgba(255, 255, 255, 0.36);
  --scrollbar-nav-thumb-hover: rgba(255, 255, 255, 0.58);
  --z-sticky: 2;
  --z-menu: 30;
  --z-nav: 40;
  --z-overlay: 100;

  /* §10 Vitrine: páginas comerciais para famílias (site do Extraclasse). Só os componentes ds-showcase-* usam.
     Só as cores da Codifica: meia-noite, roxo vivo e lilás; Magenta só na barra da marca e no chevron (Bárbara, 25/10). */
  --showcase-display: clamp(34px, 4.6vw, 56px);
  --showcase-headline: clamp(26px, 3vw, 36px);
  --showcase-title: 22px;
  --showcase-lead: 18px;
  --showcase-text: 16px;
  --showcase-small: 14px;
  --showcase-step-number: 36px;
  --showcase-weight-medium: 500;
  --showcase-tracking-tight: -0.01em;
  --showcase-tracking-kicker: 0.06em;
  --showcase-line-display: 1.08;
  --showcase-line-headline: 1.15;
  --showcase-line-title: 1.25;
  --showcase-line-lead: 1.5;
  --showcase-line-text: 1.55;
  --showcase-line-small: 1.45;
  --showcase-container: 1200px;
  --showcase-gutter: clamp(16px, 4vw, 40px);
  --showcase-section: clamp(56px, 8vw, 96px);
  --showcase-space-40: 40px;
  --showcase-space-64: 64px;
  --showcase-topbar-height: 80px;
  /* §11 Área do parceiro: barra de cima mais baixa que a da Vitrine e barra de baixo no celular. */
  --partner-area-topbar-height: 68px;
  --partner-area-bottom-nav-height: 64px;
  --showcase-steps: 3;
  --showcase-cta-height: 48px;
  --showcase-radius: 20px;
  --showcase-radius-lg: 20px;
  --showcase-radius-sm: 12px;
  --showcase-sheet: 520px;
  --showcase-sheet-wide: 760px;
  --showcase-midnight: var(--brand-midnight);
  --showcase-midnight-deep: #0E003D;
  --showcase-violet: var(--brand-violet);
  --showcase-violet-hover: #3D1FD6;
  --showcase-bar: var(--brand-magenta);
  --showcase-surface-soft: #F5F3FF;
  --showcase-surface-lilac: #EEEAFF;
  --showcase-line: #D9D3F5;
  --showcase-text-strong: var(--brand-midnight);
  --showcase-text-soft: #463F6B;
  --showcase-scarce: #B4123F;
  --showcase-hero-bg: var(--brand-midnight);
  --showcase-strong-bg: var(--brand-violet);
  --showcase-topbar-bg: var(--brand-midnight);
  --showcase-cta: var(--brand-violet);
  --showcase-cta-hover: #3D1FD6;
  --showcase-cta-text: #FFFFFF;
  --showcase-highlight: var(--brand-violet);
  --showcase-kicker: var(--brand-violet);
  --showcase-kicker-on-dark: #D8D0FF;
  --showcase-on-dark-soft: #E6E1FF;
  --showcase-on-dark-line: rgba(255, 255, 255, 0.15);
  --showcase-on-dark-line-strong: rgba(255, 255, 255, 0.7);
  --showcase-on-dark-card: rgba(255, 255, 255, 0.1);
  --showcase-on-dark-card-soft: rgba(255, 255, 255, 0.08);
  --showcase-on-dark-divider: rgba(255, 255, 255, 0.35);
  --showcase-veil: rgba(14, 0, 61, 0.6);
  --showcase-focus: var(--brand-magenta);
  --showcase-band: var(--brand-violet);

  /* Medidas calculadas pelos componentes (valor padrão; o componente troca por item). */
  --meter-size: 0%;
  --bar-size: 0%;
  --lanes: 1;
  --lane: 0;
  --hours: 11;
  --label-size: 192px;
  --lane-size: 76px;
}

/* §3 e §6.1: celular abaixo de 640 px — campo e botão 44, margem 16; tablet margem 24. */
@media (max-width: 1023px) {
  :root { --page-padding: 24px; }
}
@media (max-width: 639px) {
  :root {
    --control-height: 44px;
    --control-height-compact: 40px;
    --page-padding: 16px;
  }
}

/*
 * Padrão Visual — base do documento (camada "base").
 * Letras por elemento (§2): quem usa h1, h2, h3, p, small, strong e th já recebe o tamanho
 * certo. As telas não definem letra (a trava da CI barra font-* fora do Design System).
 */
*, *::before, *::after { box-sizing: border-box; }
html, body, #root { min-width: 320px; min-height: 100%; }
html { font-size: 100%; background: var(--surface-page); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-operational);
  font-size: var(--font-size-15);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

/* §2: título da página 28/700, de seção 20/600 (Poppins); de card 16/600 (Inter). */
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ol, ul { margin: 0; }
/* Valor de leitura (pares rótulo/valor): um tom abaixo do rótulo-título, nunca mais forte (§2). */
dd { color: var(--text-value); }
ol, ul { padding: 0; list-style: none; }
h1 {
  color: var(--text-brand);
  font-family: var(--font-identity);
  font-size: var(--font-size-28);
  font-weight: var(--font-weight-title);
  line-height: var(--line-height-title);
}
h2 {
  color: var(--text-brand);
  font-family: var(--font-identity);
  font-size: var(--font-size-20);
  font-weight: var(--font-weight-strong);
  line-height: var(--line-height-title);
}
h3 {
  color: var(--text-primary);
  font-family: var(--font-operational);
  font-size: var(--font-size-16);
  font-weight: var(--font-weight-strong);
  line-height: var(--line-height-title);
}
h4, h5, h6 {
  color: var(--text-primary);
  font-family: var(--font-operational);
  font-size: var(--font-size-15);
  font-weight: var(--font-weight-strong);
  line-height: var(--line-height-title);
}
small { font-size: var(--font-size-13); }
strong, b { font-weight: var(--font-weight-strong); }
legend { padding: 0; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
img, svg, video { max-width: 100%; }
table { border-collapse: collapse; }
th { font-weight: var(--font-weight-strong); text-align: left; }
hr { margin: 0; border: 0; border-top: var(--border-width) solid var(--border-subtle); }
dialog { color: inherit; }
summary { cursor: pointer; }

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

button, input, select, textarea { margin: 0; color: inherit; font: inherit; letter-spacing: inherit; }
button { padding: 0; border: 0; background: transparent; cursor: pointer; text-align: inherit; }
button:disabled { cursor: not-allowed; }
::placeholder { color: var(--text-placeholder); opacity: 1; }
::selection { background: var(--surface-selected); color: var(--text-primary); }

/* §8 Foco visível: anel de 2 px Violet com 2 px de afastamento. */
:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 2px; }
[tabindex='-1']:focus { outline: none; }
/* Envio de arquivo e escolhas com o campo escondido: o foco aparece no rótulo que o envolve. */
label:has(> input[type='file']:focus-visible), label:has(> input.sr-only:focus-visible) { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Rolagem fina em todo o Portal (DECISOES §2). */
* { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent; }
::-webkit-scrollbar { width: var(--scrollbar-size); height: var(--scrollbar-size); }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: var(--radius-pill); background: var(--scrollbar-thumb); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); background-clip: padding-box; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
}

@layer ds {
/*
 * Padrão Visual — componentes (camada "ds", acima das telas: nenhuma tela consegue
 * redesenhar um componente). Cada bloco cita a seção do PADRAO_VISUAL_PORTAL.md.
 * Valores só por token (tokens.css).
 */

/* ---------- §2 Letras: classes para quando o elemento não diz o papel ---------- */
.ds-title-page { color: var(--text-brand); font-family: var(--font-identity); font-size: var(--font-size-28); font-weight: var(--font-weight-title); line-height: var(--line-height-title); }
.ds-title-section { color: var(--text-brand); font-family: var(--font-identity); font-size: var(--font-size-20); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-title-card { color: var(--text-primary); font-family: var(--font-operational); font-size: var(--font-size-16); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-number { color: var(--text-brand); font-family: var(--font-identity); font-size: var(--font-size-28); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); font-variant-numeric: tabular-nums; }
.ds-text { color: var(--text-primary); font-family: var(--font-operational); font-size: var(--font-size-15); font-weight: var(--font-weight-regular); line-height: var(--line-height-text); }
.ds-text-strong { color: var(--text-primary); font-size: var(--font-size-15); font-weight: var(--font-weight-strong); line-height: var(--line-height-text); }
.ds-text-help { color: var(--text-muted); font-size: var(--font-size-13); font-weight: var(--font-weight-regular); line-height: var(--line-height-text); }
.ds-text-secondary { color: var(--text-secondary); font-size: var(--font-size-13); font-weight: var(--font-weight-regular); line-height: var(--line-height-text); }
.ds-text-label { color: var(--text-secondary); font-size: var(--font-size-13); font-weight: var(--font-weight-strong); line-height: var(--line-height-text); }
.ds-text-error { color: var(--text-error); font-size: var(--font-size-13); font-weight: var(--font-weight-regular); line-height: var(--line-height-text); }
.ds-text-small { font-size: var(--font-size-12); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-text-muted { color: var(--text-muted); }
/* Tamanho de letra sem cor (a cor vem do token escolhido pela tela). Só a escala do §2. */
.ds-type-12 { font-size: var(--font-size-12); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-type-13 { font-size: var(--font-size-13); font-weight: var(--font-weight-regular); line-height: var(--line-height-text); }
.ds-type-13-strong { font-size: var(--font-size-13); font-weight: var(--font-weight-strong); line-height: var(--line-height-text); }
.ds-type-15 { font-size: var(--font-size-15); font-weight: var(--font-weight-regular); line-height: var(--line-height-text); }
/* Leitura longa: parágrafos e listas de documentos (políticas, avisos) respiram mais. */
.ds-prose p, .ds-prose li { line-height: var(--line-height-reading); }
.ds-type-15-strong { font-size: var(--font-size-15); font-weight: var(--font-weight-strong); line-height: var(--line-height-text); }
.ds-type-16 { font-family: var(--font-operational); font-size: var(--font-size-16); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-type-20 { font-family: var(--font-identity); font-size: var(--font-size-20); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-type-28 { font-family: var(--font-identity); font-size: var(--font-size-28); font-weight: var(--font-weight-title); line-height: var(--line-height-title); }
.ds-type-number { font-family: var(--font-identity); font-size: var(--font-size-28); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); font-variant-numeric: tabular-nums; }
.ds-type-regular { font-weight: var(--font-weight-regular); }
.ds-type-strong { font-weight: var(--font-weight-strong); }

.ds-text-brand { color: var(--text-brand); }
.ds-tabular { font-variant-numeric: tabular-nums; }
.ds-truncate { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-clamp-2 { min-width: 0; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
/* §1.8 (1.7) Cor da área: a página com o nome da área no cabeçalho e os itens de menu e atalhos da área redefinem --area*. */
[data-area='comercial'], .page:has(.ds-eyebrow[data-area='comercial']) { --area: var(--area-comercial); --area-bg: var(--area-comercial-bg); --area-border: var(--area-comercial-border); --area-on-dark: var(--area-comercial-on-dark); }
[data-area='operacao'], .page:has(.ds-eyebrow[data-area='operacao']) { --area: var(--area-operacao); --area-bg: var(--area-operacao-bg); --area-border: var(--area-operacao-border); --area-on-dark: var(--area-operacao-on-dark); }
[data-area='produto'], .page:has(.ds-eyebrow[data-area='produto']) { --area: var(--area-produto); --area-bg: var(--area-produto-bg); --area-border: var(--area-produto-border); --area-on-dark: var(--area-produto-on-dark); }
[data-area='financeiro'], .page:has(.ds-eyebrow[data-area='financeiro']) { --area: var(--area-financeiro); --area-bg: var(--area-financeiro-bg); --area-border: var(--area-financeiro-border); --area-on-dark: var(--area-financeiro-on-dark); }
[data-area='administrativo'], .page:has(.ds-eyebrow[data-area='administrativo']) { --area: var(--area-administrativo); --area-bg: var(--area-administrativo-bg); --area-border: var(--area-administrativo-border); --area-on-dark: var(--area-administrativo-on-dark); }
[data-area='colaboradores'], .page:has(.ds-eyebrow[data-area='colaboradores']) { --area: var(--area-colaboradores); --area-bg: var(--area-colaboradores-bg); --area-border: var(--area-colaboradores-border); --area-on-dark: var(--area-colaboradores-on-dark); }
[data-area='parceiros'], .page:has(.ds-eyebrow[data-area='parceiros']) { --area: var(--area-parceiros); --area-bg: var(--area-parceiros-bg); --area-border: var(--area-parceiros-border); --area-on-dark: var(--area-parceiros-on-dark); }
[data-area='gestao'], .page:has(.ds-eyebrow[data-area='gestao']) { --area: var(--area-gestao); --area-bg: var(--area-gestao-bg); --area-border: var(--area-gestao-border); --area-on-dark: var(--area-gestao-on-dark); }
.ds-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  color: var(--area);
  font-family: var(--font-operational);
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-strong);
  line-height: var(--line-height-title);
}
.ds-eyebrow__icon { width: var(--icon-lg); height: var(--icon-lg); display: inline-grid; place-items: center; border: var(--border-width) solid var(--area-border); border-radius: var(--radius-control); background: var(--surface-card); color: var(--area); }
.ds-eyebrow__icon svg { width: var(--icon-sm); height: var(--icon-sm); }
.ds-link { color: var(--link-default); font-weight: var(--font-weight-strong); text-decoration: none; }
.ds-link:hover { color: var(--link-hover); text-decoration: underline; }

/* ---------- Composição: pilha, linha e grade de 12 colunas (§3, §4) ---------- */
.ds-stack { display: grid; gap: var(--space-16); min-width: 0; align-content: start; }
.ds-stack--4 { gap: var(--space-4); }
.ds-stack--8 { gap: var(--space-8); }
.ds-stack--12 { gap: var(--space-12); }
.ds-stack--20 { gap: var(--space-20); }
.ds-stack--24 { gap: var(--space-24); }
.ds-stack--32 { gap: var(--space-32); }
.ds-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); min-width: 0; }
.ds-row--12 { gap: var(--space-12); }
.ds-row--16 { gap: var(--space-16); }
.ds-row--between { justify-content: space-between; }
.ds-row--end { justify-content: flex-end; }
.ds-row--start { align-items: flex-start; }
.ds-row--nowrap { flex-wrap: nowrap; }
.ds-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-16); min-width: 0; }
.ds-grid > * { grid-column: span 12; min-width: 0; }
.ds-grid > .ds-col-p { grid-column: span 3; }
.ds-grid > .ds-col-m { grid-column: span 4; }
.ds-grid > .ds-col-g { grid-column: span 6; }
.ds-grid > .ds-col-full { grid-column: 1 / -1; }
.ds-grid > .ds-col-rest { grid-column: auto / span 9; }
.ds-grid--cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.ds-grid--cards > * { grid-column: auto; }
.ds-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ds-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
:is(.ds-grid--2, .ds-grid--3, .ds-grid--4) > * { grid-column: auto; }
@media (max-width: 1023px) {
  .ds-grid--3, .ds-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .ds-grid > :is(.ds-col-p, .ds-col-m, .ds-col-g, .ds-col-rest) { grid-column: 1 / -1; }
  .ds-grid--2, .ds-grid--3, .ds-grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- §6.1 Página e §6.2 cabeçalho ---------- */
.ds-page { width: 100%; max-width: var(--container-page); display: grid; gap: var(--space-24); align-content: start; min-width: 0; }
.ds-page--form { max-width: var(--container-form); }
.ds-back-link {
  justify-self: start;
  min-height: var(--control-height);
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  color: var(--link-default);
  font-size: var(--font-size-15);
  font-weight: var(--font-weight-strong);
  text-decoration: none;
}
.ds-back-link:hover { color: var(--link-hover); }
button.ds-back-link { padding: 0; border: 0; background: none; cursor: pointer; }
.ds-back-link svg { width: var(--icon-sm); height: var(--icon-sm); }
.ds-page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(60%);
  column-gap: var(--space-16);
  row-gap: var(--space-8);
  align-items: center;
}
.ds-page-header__copy { display: contents; }
.ds-page-header .ds-eyebrow { grid-column: 1; grid-row: 1; }
.ds-page-header h1 { grid-column: 1; grid-row: 2; }
/* Módulo do menu Cadastros: o ícone do módulo ao lado do título, sem sobretítulo (Bárbara, 27/10/2026). */
.ds-page-header__title { display: flex; align-items: center; gap: var(--space-12); min-width: 0; }
.ds-page-header__module { flex: none; width: var(--space-32); height: var(--space-32); display: inline-grid; place-items: center; border: var(--border-width) solid var(--area-border); border-radius: var(--radius-control); background: var(--surface-card); color: var(--area); }
.ds-page-header__module svg { width: var(--icon-md); height: var(--icon-md); }
.ds-page-header__description { grid-column: 1; grid-row: 3; max-width: var(--container-text); color: var(--text-muted); font-size: var(--font-size-13); line-height: var(--line-height-text); }
.ds-page-header__actions { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-8); }
@media (max-width: 639px) {
  .ds-page-header { grid-template-columns: minmax(0, 1fr); }
  .ds-page-header__actions { grid-column: 1; grid-row: 4; justify-content: stretch; }
  .ds-page-header__actions > * { flex: 1 1 auto; }
}

/* Título de seção fora de formulário: título no branco, descrição e ações à direita. */
.ds-section-heading { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-8) var(--space-16); min-width: 0; }
.ds-section-heading__copy { display: grid; gap: var(--space-4); min-width: 0; flex: 1 1 320px; }
.ds-section-heading__copy > p { color: var(--text-muted); font-size: var(--font-size-13); }
.ds-section-heading__actions { display: flex; flex-wrap: wrap; gap: var(--space-8); }
/* Seção de lista de trabalho que abre e fecha: título 18 com contagem; a seta gira quando aberta. */
.ds-collapsible { display: grid; gap: var(--space-8); min-width: 0; }
.ds-collapsible + .ds-collapsible { padding-top: var(--space-8); border-top: var(--border-width) solid var(--border-subtle); }
.ds-collapsible__heading { margin: 0; }
.ds-collapsible__toggle { display: inline-flex; align-items: center; gap: var(--space-8); min-height: var(--control-height); padding: 0 var(--space-4) 0 0; border: 0; border-radius: var(--radius-control); background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.ds-collapsible__toggle:hover { color: var(--action-primary); }
.ds-collapsible__toggle:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 2px; }
.ds-collapsible__chevron { flex: none; width: var(--icon-md); height: var(--icon-md); color: var(--action-primary); transition: transform 0.15s ease; }
.ds-collapsible.is-open .ds-collapsible__chevron { transform: rotate(90deg); }
.ds-collapsible--danger .ds-collapsible__heading { color: var(--status-danger-text); }
.ds-collapsible__description { margin: 0; padding-left: calc(var(--icon-md) + var(--space-8)); color: var(--text-muted); font-size: var(--font-size-13); }
.ds-collapsible__body { min-width: 0; }
@media (prefers-reduced-motion: reduce) { .ds-collapsible__chevron { transition: none; } }
.ds-section { display: grid; gap: var(--space-16); min-width: 0; align-content: start; }
/* §4.1 (1.6) Dentro dos blocos de composição, a distância é o gap do bloco: margem de tela não soma. */
:is(.ds-stack, .ds-section, .ds-consult-grid, .ds-form, .ds-form-section, .ds-form-block, .ds-dialog__body, .ds-drawer__body) > * { margin-block: 0; }

/* ---------- §5.2 Cards ---------- */
.ds-card {
  min-width: 0;
  padding: var(--space-20);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  color: var(--text-primary);
}
.ds-card--flush { padding: 0; overflow: hidden; }
.ds-card--section { background: var(--surface-section); border-color: transparent; }
.ds-card--dark { background: var(--surface-dark); border-color: var(--surface-dark); color: var(--text-on-dark); }
.ds-card--dark :is(h1, h2, h3, h4, p, strong, .ds-text-help, .ds-eyebrow, .ds-number) { color: var(--text-on-dark); }
.ds-card--filled { border-color: transparent; }
.ds-tone--schools { background: var(--category-schools-bg); border-color: var(--category-schools-border); color: var(--category-schools-text); }
.ds-tone--labs { background: var(--category-labs-bg); border-color: var(--category-labs-border); color: var(--category-labs-text); }
.ds-tone--independent { background: var(--category-independent-bg); border-color: var(--category-independent-border); color: var(--category-independent-text); }
.ds-tone--network { background: var(--category-network-bg); border-color: var(--category-network-border); color: var(--category-network-text); }
.ds-tone--unit { background: var(--category-unit-bg); border-color: var(--category-unit-border); color: var(--category-unit-text); }
.ds-tone--topic { background: var(--category-topic-bg); border-color: var(--category-topic-border); color: var(--category-topic-text); }
.ds-tone--success { background: var(--status-success-bg); border-color: var(--status-success-border); color: var(--status-success-text); }
.ds-tone--warning { background: var(--status-warning-bg); border-color: var(--status-warning-border); color: var(--status-warning-text); }
.ds-tone--info { background: var(--status-info-bg); border-color: var(--status-info-border); color: var(--status-info-text); }
.ds-tone--neutral { background: var(--status-neutral-bg); border-color: var(--status-neutral-border); color: var(--status-neutral-text); }
.ds-tone--danger { background: var(--status-danger-bg); border-color: var(--status-danger-border); color: var(--status-danger-text); }
.ds-tone--selected { background: var(--surface-selected); border-color: var(--selection-border); color: var(--text-brand); }
.ds-card__header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-8) var(--space-16); }
.ds-card__header > div { display: grid; gap: var(--space-4); min-width: 0; }
.ds-card__header p { color: var(--text-muted); font-size: var(--font-size-13); }

/* Cartão clicável (atalho, escolha grande, cartão de quadro). */
.ds-tile {
  position: relative;
  min-width: 0;
  padding: var(--space-16);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  color: var(--text-primary);
  display: grid;
  gap: var(--space-8);
  align-content: start;
  text-align: left;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
:is(a, button, label).ds-tile { cursor: pointer; }
:is(a, button, label).ds-tile:hover { border-color: var(--border-default); background: var(--surface-hover); }
.ds-tile.is-selected, .ds-tile:has(input:checked) { border-color: var(--selection-border); background: var(--surface-selected); }
.ds-tile:has(input:focus-visible) { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 2px; }
.ds-tile.is-disabled, .ds-tile:disabled { cursor: not-allowed; background: var(--surface-disabled); border-color: var(--border-subtle); color: var(--text-disabled); }
.ds-tile > input[type='radio'], .ds-tile > input[type='checkbox'] { position: absolute; opacity: 0; pointer-events: none; }
.ds-tile p, .ds-tile small { color: var(--text-muted); font-size: var(--font-size-13); }
.ds-tile strong { font-size: var(--font-size-15); font-weight: var(--font-weight-strong); }
.ds-tile.ds-tone--schools, .ds-tile.ds-tone--labs, .ds-tile.ds-tone--independent, .ds-tile.ds-tone--network,
.ds-tile.ds-tone--unit, .ds-tile.ds-tone--topic, .ds-tile.ds-tone--success, .ds-tile.ds-tone--warning,
.ds-tile.ds-tone--info, .ds-tile.ds-tone--neutral, .ds-tile.ds-tone--danger { color: var(--text-primary); }
.ds-tile__icon {
  width: var(--control-height);
  height: var(--control-height);
  border: var(--border-width) solid var(--area-border);
  border-radius: var(--radius-control);
  background: var(--surface-card);
  color: var(--area);
  display: grid;
  place-items: center;
}
.ds-tile.is-selected .ds-tile__icon, .ds-tile:has(input:checked) .ds-tile__icon { background: var(--surface-card); color: var(--action-primary); }
.ds-tile__check {
  position: absolute;
  top: var(--space-12);
  right: var(--space-12);
  width: var(--tag-height);
  height: var(--tag-height);
  border-radius: var(--radius-pill);
  background: var(--selection-border);
  color: var(--text-on-dark);
  display: none;
  place-items: center;
}
.ds-tile.is-selected .ds-tile__check, .ds-tile:has(input:checked) .ds-tile__check { display: grid; }

/* §5.2 (1.7) Número de painel: pequeno, fundo claro da área, apoio de uma linha.
   (1.12) Número em tinta escura; a cor da área fica só na borda (número colorido parecia alerta). */
.ds-kpi {
  min-width: 0;
  padding: var(--space-12) var(--space-16);
  border: var(--border-width) solid var(--area-border);
  border-left: var(--hub-stripe-width) solid var(--area);
  border-radius: var(--radius-control);
  background: var(--surface-section);
  color: var(--text-primary);
  display: grid;
  gap: 2px;
  text-align: left;
}
button.ds-kpi:hover { border-color: var(--area); }
.ds-kpi[aria-pressed='true'] { border-color: var(--selection-border); box-shadow: inset 0 0 0 1px var(--selection-border); }
.ds-kpi__label { color: var(--text-primary); font-size: var(--font-size-13); font-weight: var(--font-weight-strong); }
.ds-kpi__value { color: var(--text-brand); font-family: var(--font-identity); font-size: var(--font-size-20); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); font-variant-numeric: tabular-nums; }
.ds-kpi__help { min-width: 0; overflow: hidden; color: var(--text-muted); font-size: var(--font-size-12); text-overflow: ellipsis; white-space: nowrap; }

/* ---------- §5.1 Botões ---------- */
.ds-button {
  min-height: var(--control-height);
  min-width: var(--control-height);
  padding: 0 var(--button-padding-inline);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-control);
  background: var(--surface-card);
  color: var(--action-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  font-family: var(--font-operational);
  font-size: var(--font-size-15);
  font-weight: var(--font-weight-strong);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.ds-button svg { width: var(--icon-sm); height: var(--icon-sm); flex: 0 0 auto; }
/* Texto longo nunca empurra a tela para os lados: no celular o botão quebra em duas linhas. */
@media (max-width: 639px) {
  .ds-button { max-width: 100%; padding-block: var(--space-8); line-height: var(--line-height-title); white-space: normal; text-align: center; }
}
.ds-button--primary { border-color: var(--action-primary); background: var(--action-primary); color: var(--action-primary-text); }
.ds-button--primary:hover { border-color: var(--action-primary-hover); background: var(--action-primary-hover); color: var(--action-primary-text); }
.ds-button--primary:active { border-color: var(--action-primary-active); background: var(--action-primary-active); }
.ds-button--secondary { border-color: var(--action-primary); background: var(--surface-card); color: var(--action-primary); }
.ds-button--secondary:hover { background: var(--surface-selected); color: var(--action-primary); }
.ds-button--text { border-color: transparent; background: transparent; color: var(--action-primary); padding: 0 var(--space-8); }
.ds-button--text:hover { background: var(--surface-hover); color: var(--action-primary-hover); }
/* Sobre fundo roxo (tela de entrada): botão de destaque magenta e botão de texto claro. */
.ds-button--accent { border-color: var(--brand-magenta); background: var(--brand-magenta); color: var(--text-on-dark); }
.ds-button--accent:hover:not(:disabled) { border-color: var(--brand-magenta-hover); background: var(--brand-magenta-hover); color: var(--text-on-dark); }
.ds-button--text.ds-button--inverse { color: var(--text-on-dark); text-decoration: underline; text-underline-offset: 3px; }
.ds-button--text.ds-button--inverse:hover { background: var(--nav-hover); color: var(--text-on-dark); }
.ds-button--danger { border-color: var(--action-danger); background: var(--action-danger); color: var(--text-on-dark); }
.ds-button--danger:hover { border-color: var(--action-danger-hover); background: var(--action-danger-hover); color: var(--text-on-dark); }
.ds-button--danger-text { border-color: transparent; background: transparent; color: var(--text-error); padding: 0 var(--space-8); }
.ds-button--danger-text:hover { background: var(--status-danger-bg); color: var(--status-danger-text); }
.ds-button--compact { min-height: var(--control-height-compact); padding: 0 var(--space-12); font-size: var(--font-size-13); }
.ds-button:disabled, .ds-button[aria-disabled='true'] { border-color: var(--surface-disabled); background: var(--surface-disabled); color: var(--text-disabled); cursor: not-allowed; }
.ds-button--text:disabled, .ds-button--danger-text:disabled { border-color: transparent; background: transparent; }
.ds-icon-button {
  width: var(--control-height);
  height: var(--control-height);
  flex: 0 0 auto;
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-brand);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.ds-icon-button svg { width: var(--icon-md); height: var(--icon-md); }
.ds-icon-button:hover { background: var(--surface-hover); }
.ds-icon-button--outlined { border-color: var(--border-default); background: var(--surface-card); }
.ds-icon-button:disabled { background: transparent; color: var(--text-disabled); cursor: not-allowed; }
/* Área clicável sem aparência própria (linha, cabeçalho de grupo); o conteúdo vem dos componentes. */
.ds-plain-button { display: flex; align-items: center; gap: var(--space-8); width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.ds-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-12); }
.ds-actions--start { justify-content: flex-start; }
.ds-actions--between { justify-content: space-between; }
@media (max-width: 639px) {
  .ds-actions:not(.ds-actions--inline) { flex-direction: column-reverse; align-items: stretch; }
  .ds-actions:not(.ds-actions--inline) > .ds-button { width: 100%; }
}

/* ---------- §3 Campos ---------- */
.ds-field { display: grid; gap: var(--space-8); min-width: 0; align-content: start; }
.ds-field__label,
.ds-field > :is(label, span, legend, strong):first-child:not(.ds-check, .ds-switch, .ds-select, .ds-search-field) { color: var(--text-primary); font-size: var(--font-size-15); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-field__help { margin-top: calc(var(--space-4) - var(--space-8)); color: var(--text-muted); font-size: var(--font-size-13); line-height: var(--line-height-text); }
.ds-field__error { margin-top: calc(var(--space-4) - var(--space-8)); color: var(--text-error); font-size: var(--font-size-13); line-height: var(--line-height-text); }
.ds-required { color: var(--text-error); font-weight: var(--font-weight-strong); }
.ds-required-legend { color: var(--text-secondary); font-size: var(--font-size-13); }
.ds-field > .ds-row { min-height: var(--control-height); }

:where(input:not([type='checkbox'], [type='radio'], [type='file'], [type='range'], [type='color'], [type='hidden'], [type='submit'], [type='button']), textarea, .ds-input) {
  width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  padding: 0 var(--control-padding-inline);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-control);
  background: var(--surface-input);
  color: var(--text-value);
  font-family: var(--font-operational);
  font-size: var(--font-size-15);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-text);
}
:where(textarea) { min-height: var(--textarea-min-height); padding: var(--space-8) var(--control-padding-inline); resize: vertical; field-sizing: content; }
:where(input, textarea):hover:not(:disabled, :focus) { border-color: var(--border-strong); }
:where(input, textarea):focus { outline: none; border-color: var(--focus-ring); box-shadow: inset 0 0 0 1px var(--focus-ring); }
:where(input, textarea):disabled, :where(input, textarea):read-only:not([type='checkbox'], [type='radio']) { border-color: var(--border-subtle); background: var(--surface-disabled); color: var(--text-disabled); }
:where(input, textarea)[aria-invalid='true'] { border-color: var(--text-error); }
:where(input, textarea)[aria-invalid='true']:focus { box-shadow: inset 0 0 0 1px var(--text-error); }
:where(input[type='checkbox'], input[type='radio']) { width: var(--checkbox-size); height: var(--checkbox-size); flex: 0 0 auto; margin: 0; accent-color: var(--action-primary); cursor: pointer; }
:where(input[type='checkbox'], input[type='radio']):disabled { cursor: not-allowed; }
:where(input[type='date'], input[type='time']) { width: auto; min-width: 0; }
.ds-input--p { max-width: 100%; }

/* Caixa de marcar e opção com rótulo à direita. */
.ds-check { display: inline-flex; align-items: flex-start; gap: var(--space-8); min-height: var(--checkbox-size); color: var(--text-value); font-size: var(--font-size-15); line-height: var(--line-height-title); cursor: pointer; }
.ds-check > input { margin-top: 0; }
.ds-check small { display: block; margin-top: var(--space-4); color: var(--text-muted); font-size: var(--font-size-13); }
.ds-check:has(input:disabled) { color: var(--text-disabled); cursor: not-allowed; }
.ds-check-list { display: grid; gap: var(--space-12); }

/* Busca (§6.3). */
.ds-search-field {
  min-height: var(--control-height);
  min-width: 0;
  padding: 0 var(--control-padding-inline);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-control);
  background: var(--surface-input);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.ds-search-field svg { width: var(--icon-md); height: var(--icon-md); flex: 0 0 auto; }
.ds-search-field:focus-within { border-color: var(--focus-ring); box-shadow: inset 0 0 0 1px var(--focus-ring); }
.ds-search-field input { flex: 1 1 auto; min-height: calc(var(--control-height) - 2 * var(--border-width)); padding: 0; border: 0; background: transparent; box-shadow: none; }
.ds-search-field input:focus { border: 0; box-shadow: none; }

/* §3.2 Lista de seleção do Design System (nunca a nativa). */
.ds-select { position: relative; width: 100%; min-width: 0; }
.ds-select__trigger {
  width: 100%;
  min-height: var(--control-height);
  padding: 0 var(--control-padding-inline);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-control);
  background: var(--surface-input);
  color: var(--text-value);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  font-size: var(--font-size-15);
  text-align: left;
  cursor: pointer;
}
.ds-select__trigger > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-select__trigger svg { width: var(--icon-md); height: var(--icon-md); flex: 0 0 auto; color: var(--text-secondary); }
.ds-select__trigger .is-placeholder { color: var(--text-placeholder); }
.ds-select__trigger:hover:not(:disabled) { border-color: var(--border-strong); }
.ds-select__trigger:focus-visible, .ds-select.is-open .ds-select__trigger { outline: none; border-color: var(--focus-ring); box-shadow: inset 0 0 0 1px var(--focus-ring); }
.ds-select__trigger[aria-invalid='true'] { border-color: var(--text-error); }
.ds-select__trigger:disabled { border-color: var(--border-subtle); background: var(--surface-disabled); color: var(--text-disabled); cursor: not-allowed; }
.ds-select__menu {
  position: absolute;
  z-index: var(--z-menu);
  top: calc(100% + var(--space-4));
  left: 0;
  width: 100%;
  min-width: max-content;
  max-width: min(100vw - 2 * var(--space-16), var(--panel-width));
  max-height: min(var(--menu-max-height), 45vh);
  overflow-y: auto;
  padding: var(--space-4);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-control);
  background: var(--surface-card);
  box-shadow: var(--elevation-menu);
}
.ds-select.is-menu-above .ds-select__menu { top: auto; bottom: calc(100% + var(--space-4)); }
.ds-select__search { position: sticky; top: 0; z-index: 1; margin-bottom: var(--space-4); padding: 0 var(--space-8); border: var(--border-width) solid var(--border-default); border-radius: var(--radius-control); background: var(--surface-card); color: var(--text-secondary); display: flex; align-items: center; gap: var(--space-8); }
.ds-select__search svg { width: var(--icon-sm); height: var(--icon-sm); }
.ds-select__search input { border: 0; padding: 0; box-shadow: none; }
.ds-select__search input:focus { box-shadow: none; }
.ds-select__empty { padding: var(--space-12); color: var(--text-muted); font-size: var(--font-size-13); }
.ds-select__option {
  width: 100%;
  min-height: var(--control-height);
  padding: var(--space-8) var(--space-12);
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-value);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  font-size: var(--font-size-15);
  text-align: left;
  cursor: pointer;
}
.ds-select__option svg { width: var(--icon-sm); height: var(--icon-sm); flex: 0 0 auto; }
.ds-select__option:hover, .ds-select__option.is-active { background: var(--surface-hover); }
.ds-select__option[aria-selected='true'] { background: var(--surface-selected); color: var(--action-primary); font-weight: var(--font-weight-strong); }
.ds-select__option:disabled { color: var(--text-disabled); cursor: not-allowed; }
@media (max-width: 639px) {
  .ds-select__menu { position: fixed; top: auto; left: var(--space-16); right: var(--space-16); bottom: var(--space-16); width: auto; min-width: 0; max-width: none; max-height: 60vh; }
  .ds-select.is-menu-above .ds-select__menu { bottom: var(--space-16); }
}

/* §3.2 Escolha segmentada: até 4 opções lado a lado; cada opção tem borda fina para se ver que é clicável. */
.ds-segmented {
  justify-self: start;
  max-width: 100%;
  min-height: var(--control-height);
  padding: var(--space-4);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-control);
  background: var(--surface-card);
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.ds-segmented__option {
  min-height: calc(var(--control-height) - 2 * var(--space-4) - 2 * var(--border-width));
  padding: 0 var(--space-12);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: calc(var(--radius-control) - var(--space-4));
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-strong);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.ds-segmented__option:hover { background: var(--surface-hover); }
.ds-segmented__option.is-selected { border-color: var(--selection-border); background: var(--surface-selected); color: var(--action-primary); }
.ds-segmented__option:disabled { color: var(--text-disabled); cursor: not-allowed; }
.ds-segmented__icon { display: inline-flex; }
.ds-segmented__icon svg { width: var(--icon-sm); height: var(--icon-sm); }
@media (max-width: 639px) {
  .ds-segmented { width: 100%; flex-wrap: wrap; overflow-x: visible; }
  .ds-segmented__option { flex: 1 1 auto; }
}

/* §3.2 (1.2) Escolha compacta: etiquetas de 40 px, ou 32 px para anos/séries. */
.ds-chips { display: flex; flex-wrap: wrap; gap: var(--space-8); min-width: 0; }
.ds-chip {
  position: relative;
  min-height: var(--control-height);
  padding: 0 var(--space-12);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-control);
  background: var(--surface-card);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-strong);
  line-height: var(--line-height-title);
  cursor: pointer;
}
.ds-chip > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ds-chip:hover { background: var(--surface-hover); }
.ds-chip:has(input:checked), .ds-chip.is-selected { border-color: var(--action-primary); background: var(--surface-selected); color: var(--action-primary); }
.ds-chip:has(input:checked)::before, .ds-chip.is-selected::before { content: '✓'; }
.ds-chip:has(input:focus-visible) { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 2px; }
.ds-chip:has(input:disabled) { border-color: var(--border-subtle); background: var(--surface-disabled); color: var(--text-disabled); cursor: not-allowed; }
.ds-chip:has(input:disabled) > input { cursor: not-allowed; }
.ds-chip--compact { min-height: var(--control-height-compact); }

/* §3.2 Chave liga/desliga 40 × 24, rótulo à direita. */
.ds-switch { min-height: var(--control-height); padding: 0; border: 0; background: transparent; color: var(--text-primary); display: inline-flex; align-items: center; gap: var(--space-8); font-size: var(--font-size-13); font-weight: var(--font-weight-strong); cursor: pointer; }
.ds-switch__track { width: var(--switch-width); height: var(--switch-height); padding: var(--border-width-strong); border: var(--border-width) solid var(--border-default); border-radius: var(--radius-pill); background: var(--surface-disabled); display: inline-flex; align-items: center; transition: background-color .15s ease; }
.ds-switch__thumb { width: calc(var(--switch-height) - 3 * var(--border-width-strong)); height: calc(var(--switch-height) - 3 * var(--border-width-strong)); border-radius: 50%; background: var(--surface-card); box-shadow: var(--elevation-menu); transition: transform .15s ease; }
.ds-switch[aria-checked='true'] .ds-switch__track { border-color: var(--action-primary); background: var(--action-primary); }
.ds-switch[aria-checked='true'] .ds-switch__thumb { transform: translateX(calc(var(--switch-width) - var(--switch-height))); }
.ds-switch:disabled { color: var(--text-disabled); cursor: not-allowed; }

/* §6.6 Chave "Detalhes" (1.14): desligada (padrão), as linhas de apoio sob nomes e situações saem das listas e quadros
   e aparecem como dica ao passar o mouse; ligada, ficam visíveis. Uma escolha por pessoa. */
:root[data-ds-details='off'] .ds-data-table td small,
:root[data-ds-details='off'] .ds-board .ds-tile > small { display: none; }

/* §6.6 Chave "Cores": o container leva data-colors="true|false" e cada linha (tr ou .ds-tone-row) ou cartão de quadro (.ds-tone-card) leva data-tone.
   Ligada: a linha/cartão ganha o fundo e a borda da cor, e a coluna do quadro (.ds-tone-column) fica neutra.
   Desligada: na lista, só um fio de 4 px à esquerda; no quadro, cartões brancos e a cor no fundo da coluna (com data-tone na coluna). */
[data-colors] [data-tone='success'] { --tone-bg: var(--status-success-bg); --tone-border: var(--status-success-border); --tone-text: var(--status-success-text); }
[data-colors] [data-tone='warning'] { --tone-bg: var(--status-warning-bg); --tone-border: var(--status-warning-border); --tone-text: var(--status-warning-text); }
[data-colors] [data-tone='danger'] { --tone-bg: var(--status-danger-bg); --tone-border: var(--status-danger-border); --tone-text: var(--status-danger-text); }
[data-colors] [data-tone='info'] { --tone-bg: var(--status-info-bg); --tone-border: var(--status-info-border); --tone-text: var(--status-info-text); }
[data-colors] [data-tone='neutral'] { --tone-bg: var(--status-neutral-bg); --tone-border: var(--status-neutral-border); --tone-text: var(--status-neutral-text); }
/* Etapa inicial de um funil (ex.: Lead do Pipe Comercial): lilás de categoria, nunca confundido com status. */
[data-colors] [data-tone='lilac'] { --tone-bg: var(--category-independent-bg); --tone-border: var(--category-independent-border); --tone-text: var(--category-independent-text); }
/* Etapas de um percurso (ex.: Em negociação e Em implantação de um parceiro): cada etapa com a sua cor, sem confundir com o fundo. */
[data-colors] [data-tone='plum'] { --tone-bg: var(--hue-6-bg); --tone-border: var(--hue-6-border); --tone-text: var(--hue-6-text); }
[data-colors] [data-tone='teal'] { --tone-bg: var(--hue-2-bg); --tone-border: var(--hue-2-border); --tone-text: var(--hue-2-text); }
[data-colors] [data-tone='hue-1'] { --tone-bg: var(--hue-1-bg); --tone-border: var(--hue-1-border); --tone-text: var(--hue-1-text); }
[data-colors] [data-tone='hue-2'] { --tone-bg: var(--hue-2-bg); --tone-border: var(--hue-2-border); --tone-text: var(--hue-2-text); }
[data-colors] [data-tone='hue-3'] { --tone-bg: var(--hue-3-bg); --tone-border: var(--hue-3-border); --tone-text: var(--hue-3-text); }
[data-colors] [data-tone='hue-4'] { --tone-bg: var(--hue-4-bg); --tone-border: var(--hue-4-border); --tone-text: var(--hue-4-text); }
[data-colors] [data-tone='hue-5'] { --tone-bg: var(--hue-5-bg); --tone-border: var(--hue-5-border); --tone-text: var(--hue-5-text); }
[data-colors] [data-tone='hue-6'] { --tone-bg: var(--hue-6-bg); --tone-border: var(--hue-6-border); --tone-text: var(--hue-6-text); }
[data-colors] [data-tone='hue-7'] { --tone-bg: var(--hue-7-bg); --tone-border: var(--hue-7-border); --tone-text: var(--hue-7-text); }
[data-colors] [data-tone='hue-8'] { --tone-bg: var(--hue-8-bg); --tone-border: var(--hue-8-border); --tone-text: var(--hue-8-text); }
[data-colors='true'] tr[data-tone] > td { background: var(--tone-bg); border-bottom-color: var(--tone-border); }
/* (1.7) Tabela sem tom próprio: a linha pega a cor da situação que mostra (etiqueta), conforme a chave Cores da pessoa. */
:root[data-ds-colors='on'] .ds-data-table:not(.ds-data-table--toned) tbody tr:not([data-tone]):has(.ds-badge--success) > td { background: var(--row-success-bg); border-bottom-color: var(--status-success-border); }
:root[data-ds-colors='on'] .ds-data-table:not(.ds-data-table--toned) tbody tr:not([data-tone]):has(.ds-badge--info) > td { background: var(--row-info-bg); border-bottom-color: var(--status-info-border); }
:root[data-ds-colors='on'] .ds-data-table:not(.ds-data-table--toned) tbody tr:not([data-tone]):has(.ds-badge--warning) > td { background: var(--row-warning-bg); border-bottom-color: var(--status-warning-border); }
:root[data-ds-colors='on'] .ds-data-table:not(.ds-data-table--toned) tbody tr:not([data-tone]):has(.ds-badge--danger) > td { background: var(--row-danger-bg); border-bottom-color: var(--status-danger-border); }
:root[data-ds-colors='off'] .ds-data-table:not(.ds-data-table--toned) tbody tr:not([data-tone]):has(.ds-badge--success) > td:first-child { box-shadow: inset var(--row-edge-width) 0 0 var(--row-success-edge); }
:root[data-ds-colors='off'] .ds-data-table:not(.ds-data-table--toned) tbody tr:not([data-tone]):has(.ds-badge--info) > td:first-child { box-shadow: inset var(--row-edge-width) 0 0 var(--row-info-edge); }
:root[data-ds-colors='off'] .ds-data-table:not(.ds-data-table--toned) tbody tr:not([data-tone]):has(.ds-badge--warning) > td:first-child { box-shadow: inset var(--row-edge-width) 0 0 var(--row-warning-edge); }
:root[data-ds-colors='off'] .ds-data-table:not(.ds-data-table--toned) tbody tr:not([data-tone]):has(.ds-badge--danger) > td:first-child { box-shadow: inset var(--row-edge-width) 0 0 var(--row-danger-edge); }
:root[data-ds-colors='on'] .ds-data-table:not(.ds-data-table--toned) tbody tr:not([data-tone]):has(.ds-badge--plum) > td { background: var(--hue-6-bg); border-bottom-color: var(--hue-6-border); }
:root[data-ds-colors='on'] .ds-data-table:not(.ds-data-table--toned) tbody tr:not([data-tone]):has(.ds-badge--teal) > td { background: var(--hue-2-bg); border-bottom-color: var(--hue-2-border); }
:root[data-ds-colors='off'] .ds-data-table:not(.ds-data-table--toned) tbody tr:not([data-tone]):has(.ds-badge--plum) > td:first-child { box-shadow: inset var(--row-edge-width) 0 0 var(--hue-6-text); }
:root[data-ds-colors='off'] .ds-data-table:not(.ds-data-table--toned) tbody tr:not([data-tone]):has(.ds-badge--teal) > td:first-child { box-shadow: inset var(--row-edge-width) 0 0 var(--hue-2-text); }
.ds-data-table tbody tr.is-clickable:not([data-tone]):hover > td { background: var(--surface-hover); }
[data-colors='true'] :is(.ds-tone-row, .ds-tone-card)[data-tone] { background: var(--tone-bg); border-color: var(--tone-border); }
[data-colors='false'] tr[data-tone] > td:first-child, [data-colors='false'] .ds-tone-row[data-tone] { box-shadow: inset var(--space-4) 0 0 var(--tone-text); }
/* (1.7) Coluna sempre com borda. Ligada: coluna sem fundo e cartões coloridos. Desligada: fundo e borda da coluna na cor, cartões brancos. */
[data-colors='true'] .ds-tone-column { background: transparent; }
[data-colors='true'] .ds-tone-column[data-tone] .ds-board__column-header h3 { color: var(--tone-text); }
.ds-tone-column[data-tone] .ds-board__column-header .ds-count { border-color: var(--tone-border); background: var(--tone-bg); color: var(--tone-text); }
[data-colors='false'] .ds-tone-column[data-tone] { background: var(--tone-bg); border-color: var(--tone-border); }

/* §3.2 Envio de arquivo: área inteira com tipos e tamanho; lista de arquivos. */
.ds-upload {
  position: relative;
  padding: var(--space-20);
  border: var(--border-width) dashed var(--border-default);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  display: grid;
  justify-items: center;
  gap: var(--space-8);
  text-align: center;
  color: var(--text-secondary);
}
.ds-upload:hover, .ds-upload.is-dragging { border-color: var(--action-primary); background: var(--surface-selected); }
.ds-upload > input[type='file'] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ds-upload strong { color: var(--text-primary); }
.ds-upload small { color: var(--text-muted); font-size: var(--font-size-13); }
.ds-file-button { position: relative; overflow: hidden; cursor: pointer; }
.ds-file-button > input[type='file'] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ds-file-button:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
.ds-file-button:has(input:focus-visible) { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 2px; }
.ds-file-list { display: grid; gap: var(--space-8); }
.ds-file { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); padding: var(--space-8) var(--space-12); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-control); background: var(--surface-card); }
.ds-file small { color: var(--text-muted); font-size: var(--font-size-13); }

/* ---------- §3 Formulário em partes (1.3) ---------- */
.ds-form { width: min(100%, var(--container-form)); display: grid; gap: var(--space-24); align-content: start; }
.ds-form-section {
  min-width: 0;
  padding: var(--space-20);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  display: grid;
  gap: var(--space-16);
  scroll-margin-top: var(--space-24);
}
.ds-form-section__header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-8) var(--space-16); }
.ds-form-section__header:has(> .ds-consult__icon) { flex-wrap: nowrap; justify-content: flex-start; gap: var(--space-12); }
.ds-form-section__header > .ds-consult__icon + .ds-form-section__copy { flex: 1 1 auto; }
.ds-form-section__header:has(> .ds-consult__icon) > .ds-row { margin-left: auto; }
.ds-form-section__copy { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-12); row-gap: var(--space-4); align-items: baseline; min-width: 0; flex: 1 1 320px; }
.ds-form-section__copy > :not(.ds-form-section__number) { grid-column: 2; }
.ds-form-section__copy > p { color: var(--text-muted); font-size: var(--font-size-13); }
.ds-form-section__number {
  grid-row: 1;
  width: var(--tag-height);
  height: var(--tag-height);
  border-radius: var(--radius-pill);
  background: var(--surface-selected);
  color: var(--text-brand);
  display: inline-grid;
  place-items: center;
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-strong);
  align-self: center;
}
.ds-form-section__copy:not(:has(.ds-form-section__number)) { grid-template-columns: minmax(0, 1fr); }
.ds-form-section__copy:not(:has(.ds-form-section__number)) > * { grid-column: 1; }
/* (1.3) Os campos ficam num bloco lilás logo abaixo do título; o título nunca entra no lilás. */
.ds-form-block { min-width: 0; padding: var(--space-20); border-radius: var(--radius-card); background: var(--surface-section); display: grid; gap: var(--space-16); }
.ds-form-group { display: grid; gap: var(--space-12); min-width: 0; }
.ds-form-group__heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-4) var(--space-12); }
.ds-form-group__heading > div { display: grid; gap: var(--space-4); }
.ds-form-group__heading p { color: var(--text-muted); font-size: var(--font-size-13); }
.ds-form-index { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); padding: var(--space-12) var(--space-16); border-radius: var(--radius-card); background: var(--surface-section); color: var(--text-secondary); font-size: var(--font-size-13); font-weight: var(--font-weight-strong); }
.ds-form-index button { min-height: var(--control-height-compact); padding: 0 var(--space-12); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--action-primary); font-size: var(--font-size-13); font-weight: var(--font-weight-strong); cursor: pointer; }
.ds-form-index button:hover { background: var(--surface-selected); }
.ds-form-index button[aria-current='true'] { border-color: var(--selection-border); background: var(--surface-selected); }
.ds-form-footer {
  position: sticky;
  bottom: 0;
  z-index: var(--z-sticky);
  padding: var(--space-16) var(--space-20);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
}
.ds-form-footer__status { color: var(--text-secondary); font-size: var(--font-size-13); }
@media (max-width: 639px) {
  .ds-form-section { padding: var(--space-16); }
  .ds-form-block { padding: var(--space-12); }
  .ds-form-footer { padding: var(--space-12); }
}

/* (1.13) Formulário longo em página inteira: partes à esquerda, a parte aberta à direita. */
.ds-journey { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-24); align-items: start; }
.ds-journey__index { padding: var(--space-20); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card); background: var(--surface-card); display: grid; gap: var(--space-12); }
.ds-journey__title { color: var(--text-secondary); }
.ds-journey__list { margin: 0; padding: 0; list-style: none; display: none; gap: var(--space-4); }
.ds-journey__list .ds-step { width: 100%; }
.ds-journey__copy { min-width: 0; display: grid; gap: var(--space-4); justify-items: start; }
.ds-journey__main { display: grid; gap: var(--space-24); min-width: 0; }
.ds-journey__index > p:not(.ds-journey__title) { color: var(--text-muted); font-size: var(--font-size-13); }
@media (min-width: 1024px) {
  .ds-journey { grid-template-columns: 280px minmax(0, var(--container-form)); }
  .ds-journey__index { position: sticky; top: var(--space-24); }
  .ds-journey__list { display: grid; }
  .ds-journey__select { display: none; }
}
@media (max-width: 639px) {
  .ds-journey__index { padding: var(--space-16); }
  /* No celular o rodapé de três linhas cobriria a parte: fica no fim, sem acompanhar a rolagem. */
  .ds-journey__main > .ds-form-footer { position: static; }
}

/* (1.3) Pessoas e itens de uma lista: cartão branco com o nome no topo e Remover. */
.ds-item-list { display: grid; gap: var(--space-16); min-width: 0; }
.ds-item { min-width: 0; border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card); background: var(--surface-card); }
.ds-item__header {
  min-height: var(--list-item-header-height);
  padding: var(--space-8) var(--space-12) var(--space-8) var(--space-16);
  border-bottom: var(--border-width) solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
}
.ds-item__title { min-width: 0; display: flex; align-items: center; gap: var(--space-8); color: var(--text-primary); font-size: var(--font-size-15); font-weight: var(--font-weight-strong); overflow-wrap: anywhere; }
.ds-item__title small { color: var(--text-muted); font-size: var(--font-size-13); font-weight: var(--font-weight-regular); }
.ds-item__body { padding: var(--space-16); display: grid; gap: var(--space-16); }
.ds-item--collapsed .ds-item__header { border-bottom: 0; }
/* No celular o cabeçalho do cartão quebra: nome em cima, detalhe embaixo e as ações numa linha própria. */
@media (max-width: 639px) {
  .ds-item__header { flex-wrap: wrap; row-gap: var(--space-8); }
  .ds-item__title { flex: 1 1 100%; flex-wrap: wrap; row-gap: var(--space-4); }
  .ds-item__title small { flex-basis: 100%; }
}

/* §3.2 Só leitura (1.6): um dado por linha. A pergunta (rótulo) manda: 15/600 escuro à esquerda; a resposta (valor) vem
   um tom abaixo, 15/400 cinza-escuro — nunca maior nem mais forte que o rótulo. Linha fina entre os pares. Duas colunas
   de pares quando a seção tem largura; no estreito, rótulo em cima do valor. É o mesmo par do formulário, sem a caixa. */
.ds-readonly { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--space-32); min-width: 0; }
.ds-readonly__item { display: grid; grid-template-columns: minmax(var(--readonly-label-min), 40%) minmax(0, 1fr); gap: var(--space-4) var(--space-16); align-items: baseline; padding: var(--space-12) 0; border-bottom: var(--border-width) solid var(--border-faint); min-width: 0; }
.ds-readonly__item:last-child { border-bottom: 0; }
.ds-readonly__item > dt, .ds-readonly__label { color: var(--text-primary); font-size: var(--font-size-15); font-weight: var(--font-weight-strong); line-height: var(--line-height-text); }
.ds-readonly__item > dd, .ds-readonly__value { margin: 0; color: var(--text-value); font-size: var(--font-size-15); font-weight: var(--font-weight-regular); line-height: var(--line-height-text); overflow-wrap: anywhere; white-space: pre-line; font-variant-numeric: tabular-nums; }
.ds-readonly__empty, .ds-readonly__item > dd.ds-readonly__empty { color: var(--text-placeholder); font-size: var(--font-size-13); font-weight: var(--font-weight-regular); }
.ds-readonly__item > dd a { color: var(--link-default); font-weight: var(--font-weight-regular); text-decoration: underline; text-underline-offset: 3px; }
.ds-readonly__item > dd a:hover { color: var(--link-hover); }
.ds-readonly__item > dd a > svg { display: inline-block; vertical-align: -2px; }
.ds-readonly__item > dd .ds-status, .ds-readonly__item > dd .ds-tag { vertical-align: middle; }
.ds-readonly__item > dd strong { color: var(--text-value); font-weight: var(--font-weight-regular); }
@container (min-width: 720px) {
  /* (1.7) Duas colunas com fio vertical entre elas; item de largura toda cobre o fio. */
  .ds-readonly:not(.ds-readonly--1) { grid-template-columns: repeat(2, minmax(0, 1fr)); background: linear-gradient(var(--border-subtle), var(--border-subtle)) center / var(--border-width) 100% no-repeat; }
  .ds-readonly:not(.ds-readonly--1) > .ds-readonly__item--full { background: var(--surface-card); }
  .ds-readonly:not(.ds-readonly--1) > .ds-readonly__item:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .ds-readonly:not(.ds-readonly--1) > .ds-readonly__item--full { grid-column: 1 / -1; grid-template-columns: minmax(var(--readonly-label-min), calc((100% - var(--space-32)) * 0.2)) minmax(0, 1fr); }
}
@container (max-width: 419px) {
  .ds-readonly__item { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding: var(--space-8) 0; }
}
.ds-readonly__links { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-16); }
@media (max-width: 639px) { :is(.ds-readonly--2, .ds-readonly--3) { grid-template-columns: minmax(0, 1fr); } }

/* §6.3 Seção (1.6): três níveis que não se confundem.
   1. Seção: cartão branco sobre o fundo da página; cabeçalho com ícone em quadro lilás de 32 px e título 16/600 Midnight,
      linha embaixo quando aberta. 2. Seção que abre e fecha: o mesmo cartão; fechada, mostra o resumo de uma linha e o
      botão redondo de abrir (32 px, contorno, seta para baixo); a linha inteira é clicável e realça ao passar o mouse.
   3. Item dentro de uma seção (itens do contrato, envios, registros): linha com divisória (DisclosureRow), nunca cartão.
   Pendência deixa o ícone âmbar e abre a seção. Entre seções: --gap-sections. */
.ds-consult-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap-sections); align-content: start; min-width: 0; }
.ds-consult { container-type: inline-size; min-width: 0; border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card); background: var(--surface-card); color: var(--text-primary); overflow: hidden; }
.ds-consult__head { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-12); min-height: var(--section-head-height); padding: var(--space-12) var(--space-16) var(--space-12) var(--space-20); background: var(--surface-section); }
.ds-consult__head:not(:has(.ds-consult__icon)) { grid-template-columns: minmax(0, 1fr) auto auto; }
.ds-consult--collapsible:hover { border-color: var(--border-default); }
.ds-consult--collapsible .ds-consult__head:hover { background: var(--surface-hover); }
.ds-consult.is-open .ds-consult__head { border-bottom: var(--border-width) solid var(--border-subtle); }
.ds-consult__icon { width: var(--section-icon-box); height: var(--section-icon-box); flex: none; display: grid; place-items: center; border: var(--border-width) solid var(--area-border); border-radius: var(--radius-control); background: var(--surface-card); color: var(--area); }
.ds-consult__icon svg { width: var(--icon-md); height: var(--icon-md); stroke-width: 2; }
.ds-consult--warning .ds-consult__icon { border-color: var(--status-warning-border); background: var(--status-warning-bg); color: var(--status-warning-text); }
.ds-consult--danger .ds-consult__icon { border-color: var(--status-danger-border); background: var(--status-danger-bg); color: var(--status-danger-text); }
.ds-consult__heading { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-8); }
.ds-consult__title { margin: 0; min-width: 0; font-family: var(--font-operational); font-size: var(--font-size-16); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); color: var(--text-brand); overflow-wrap: break-word; display: inline-flex; align-items: center; gap: var(--space-8); }
.ds-consult__toggle { display: inline-flex; align-items: center; gap: var(--space-8); padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ds-consult__toggle::after { content: ''; position: absolute; inset: 0; }
.ds-consult__toggle:focus-visible { outline: none; }
.ds-consult__toggle:focus-visible::after { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: calc(-1 * var(--focus-ring-width)); border-radius: var(--radius-card); }
.ds-consult__count { min-width: var(--tag-height); padding: 0 var(--space-8); border-radius: var(--radius-pill); background: var(--surface-card); color: var(--text-brand); font-family: var(--font-operational); font-size: var(--font-size-12); font-weight: var(--font-weight-strong); line-height: var(--tag-height); text-align: center; }
.ds-consult__badges { display: inline-flex; flex-wrap: wrap; gap: var(--space-8); }
.ds-consult__summary { flex: 1 0 100%; margin: 0; min-width: 0; color: var(--text-secondary); font-size: var(--font-size-13); line-height: var(--line-height-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-consult__action-slot { position: relative; z-index: 1; display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-8); }
.ds-consult__chevron { box-sizing: content-box; width: var(--icon-md); height: var(--icon-md); padding: calc((var(--section-toggle) - var(--icon-md)) / 2 - var(--border-width)); border: var(--border-width) solid var(--border-default); border-radius: 50%; background: var(--surface-card); color: var(--action-primary); transition: transform 0.15s ease; pointer-events: none; }
.ds-consult--collapsible .ds-consult__head:hover .ds-consult__chevron { border-color: var(--action-primary); }
.ds-consult.is-open .ds-consult__chevron { transform: rotate(180deg); }
.ds-consult__body { display: grid; gap: var(--gap-inside); align-content: start; padding: var(--space-16) var(--space-20) var(--space-20); min-width: 0; }
.ds-consult__body > * { margin-block: 0; }
.ds-consult__body > .ds-readonly:first-child, .ds-consult__help + .ds-readonly { margin-top: calc(-1 * var(--space-12)); }
.ds-consult__body > .ds-expand-list:first-child { margin-top: calc(-1 * var(--space-16)); }
.ds-consult__body > .ds-expand-list:last-child { margin-bottom: calc(-1 * var(--space-12)); }
.ds-consult__body > .ds-table-wrap:only-child { margin: calc(-1 * var(--space-16)) calc(-1 * var(--space-20)) calc(-1 * var(--space-20)); border: 0; border-radius: 0; }
.ds-consult__help { margin: 0; color: var(--text-secondary); font-size: var(--font-size-13); }
.ds-consult__action { display: inline-flex; align-items: center; gap: var(--space-4); color: var(--link-default); font-size: var(--font-size-13); font-weight: var(--font-weight-strong); text-decoration: none; white-space: nowrap; }
.ds-consult__action:hover { text-decoration: underline; }
.ds-consult__note { margin: 0; color: var(--text-secondary); font-size: var(--font-size-13); }
.ds-consult__note a { color: var(--link-default); }
@media (prefers-reduced-motion: reduce) { .ds-consult__chevron { transition: none; } }
@media (max-width: 639px) {
  .ds-consult__head { padding: var(--space-12) var(--space-12) var(--space-12) var(--space-16); min-height: calc(var(--section-head-height) + var(--space-4)); }
  .ds-consult__body { padding: var(--space-12) var(--space-16) var(--space-16); }
  .ds-consult__body > .ds-table-wrap:only-child { margin: calc(-1 * var(--space-12)) calc(-1 * var(--space-16)) calc(-1 * var(--space-16)); }
  /* Botão da seção não espreme o título: vai para a linha de baixo. */
  .ds-consult__action-slot:has(.ds-button) { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---------- §1.5 Status, §1.6 categoria, §1.7 prioridade, etiquetas ---------- */
.ds-badge, .ds-category, .ds-tag {
  height: var(--tag-height);
  width: fit-content;
  max-width: 100%;
  padding: 0 var(--space-8);
  border: var(--border-width) solid var(--status-neutral-border);
  border-radius: var(--radius-pill);
  background: var(--status-neutral-bg);
  color: var(--status-neutral-text);
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  font-family: var(--font-operational);
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-strong);
  line-height: 1;
  white-space: nowrap;
}
.ds-badge::before { content: ''; width: var(--tag-dot); height: var(--tag-dot); flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.ds-badge--success { background: var(--status-success-bg); border-color: var(--status-success-border); color: var(--status-success-text); }
.ds-badge--warning { background: var(--status-warning-bg); border-color: var(--status-warning-border); color: var(--status-warning-text); }
.ds-badge--info { background: var(--status-info-bg); border-color: var(--status-info-border); color: var(--status-info-text); }
.ds-badge--neutral { background: var(--status-neutral-bg); border-color: var(--status-neutral-border); color: var(--status-neutral-text); }
.ds-badge--danger { background: var(--status-danger-bg); border-color: var(--status-danger-border); color: var(--status-danger-text); }
.ds-badge--plum { background: var(--hue-6-bg); border-color: var(--hue-6-border); color: var(--hue-6-text); }
.ds-badge--teal { background: var(--hue-2-bg); border-color: var(--hue-2-border); color: var(--hue-2-text); }
/* §11 Área do parceiro: o que pede o parceiro fica em lilás, nunca em amarelo. */
.ds-badge--lilac { background: var(--category-independent-bg); border-color: var(--category-independent-border); color: var(--category-independent-text); }
.ds-category--schools { background: var(--category-schools-bg); border-color: var(--category-schools-border); color: var(--category-schools-text); }
.ds-category--labs { background: var(--category-labs-bg); border-color: var(--category-labs-border); color: var(--category-labs-text); }
.ds-category--independent { background: var(--category-independent-bg); border-color: var(--category-independent-border); color: var(--category-independent-text); }
.ds-category--group_network { background: var(--category-network-bg); border-color: var(--category-network-border); color: var(--category-network-text); }
.ds-category--unit { background: var(--category-unit-bg); border-color: var(--category-unit-border); color: var(--category-unit-text); }
.ds-category--partner-schools { background: var(--partner-front-schools-bg); border-color: var(--partner-front-schools-border); color: var(--partner-front-schools-text); }
.ds-category--partner-labs { background: var(--partner-front-labs-bg); border-color: var(--partner-front-labs-border); color: var(--partner-front-labs-text); }
.ds-category--topic { background: var(--category-topic-bg); border-color: var(--category-topic-border); color: var(--category-topic-text); }
/* (1.7) Etiqueta de tipo: cada opção de um campo de tipo com seu tom fixo (não é situação). */
.ds-type-tag[data-hue='1'] { background: var(--hue-1-bg); border-color: var(--hue-1-border); color: var(--hue-1-text); }
.ds-type-tag[data-hue='2'] { background: var(--hue-2-bg); border-color: var(--hue-2-border); color: var(--hue-2-text); }
.ds-type-tag[data-hue='3'] { background: var(--hue-3-bg); border-color: var(--hue-3-border); color: var(--hue-3-text); }
.ds-type-tag[data-hue='4'] { background: var(--hue-4-bg); border-color: var(--hue-4-border); color: var(--hue-4-text); }
.ds-type-tag[data-hue='5'] { background: var(--hue-5-bg); border-color: var(--hue-5-border); color: var(--hue-5-text); }
.ds-type-tag[data-hue='6'] { background: var(--hue-6-bg); border-color: var(--hue-6-border); color: var(--hue-6-text); }
.ds-type-tag[data-hue='7'] { background: var(--hue-7-bg); border-color: var(--hue-7-border); color: var(--hue-7-text); }
.ds-type-tag[data-hue='8'] { background: var(--hue-8-bg); border-color: var(--hue-8-border); color: var(--hue-8-text); }
.ds-tag--selected { background: var(--surface-selected); border-color: var(--selection-border); color: var(--action-primary); }
.ds-tag__remove { width: var(--icon-md); height: var(--icon-md); margin-right: calc(-1 * var(--space-4)); border: 0; border-radius: 50%; background: transparent; color: inherit; display: inline-grid; place-items: center; cursor: pointer; }
.ds-tag__remove:hover { background: var(--surface-card); }
.ds-tag__remove svg { width: var(--icon-sm); height: var(--icon-sm); }
.ds-multiselect { display: grid; gap: var(--space-8); min-width: 0; }
.ds-tag-list { display: flex; flex-wrap: wrap; gap: var(--space-8); min-width: 0; }
.ds-dot { width: var(--tag-dot); height: var(--tag-dot); flex: 0 0 auto; border-radius: 50%; background: var(--status-neutral-text); display: inline-block; }
.ds-dot--success { background: var(--status-success-text); }
.ds-dot--warning { background: var(--status-warning-text); }
.ds-dot--info { background: var(--status-info-text); }
.ds-dot--danger { background: var(--status-danger-text); }
.ds-count { min-width: var(--tag-height); height: var(--tag-height); padding: 0 var(--space-8); border-radius: var(--radius-pill); background: var(--surface-selected); color: var(--text-brand); display: inline-grid; place-items: center; font-size: var(--font-size-12); font-weight: var(--font-weight-strong); font-variant-numeric: tabular-nums; }
.ds-priority { display: inline-flex; align-items: center; gap: var(--space-8); color: var(--text-primary); white-space: nowrap; }
.ds-priority__code {
  width: var(--priority-size);
  height: var(--priority-size);
  flex: 0 0 var(--priority-size);
  border: var(--border-width) solid transparent;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-strong);
  line-height: 1;
}
.ds-priority--p1 .ds-priority__code { background: var(--priority-1-bg); color: var(--priority-1-text); }
.ds-priority--p2 .ds-priority__code { background: var(--priority-2-bg); color: var(--priority-2-text); }
.ds-priority--p3 .ds-priority__code { background: var(--priority-3-bg); color: var(--priority-3-text); }
.ds-priority--p4 .ds-priority__code { background: var(--priority-4-bg); border-color: var(--priority-4-border); color: var(--priority-4-text); }
.ds-priority--word .ds-priority__code { width: auto; flex: 0 0 auto; padding: 0 var(--space-8); border-radius: var(--radius-pill); }
.ds-priority--muted, .ds-priority--neutral { color: var(--text-placeholder); font-size: var(--font-size-13); }

/* §6.7 Avatar: 32 px com iniciais (Parceiros: 36 px, DECISOES §2). */
.ds-avatar {
  width: var(--avatar-size);
  height: var(--avatar-size);
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--category-network-bg);
  color: var(--text-brand);
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-strong);
}
.ds-avatar--partner { width: var(--avatar-size-partner); height: var(--avatar-size-partner); border: var(--border-width) solid var(--border-subtle); background: var(--surface-card); }
.ds-avatar--partner img { object-fit: contain; }
.ds-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ds-entity { display: flex; align-items: center; gap: var(--space-12); min-width: 0; }
.ds-entity__copy { display: grid; min-width: 0; }
.ds-entity__copy > strong { color: var(--text-primary); font-size: var(--font-size-15); font-weight: var(--font-weight-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-entity__copy > small { color: var(--text-muted); font-size: var(--font-size-12); font-weight: var(--font-weight-regular); line-height: var(--line-height-title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-logo-preview { display: grid; place-items: center; overflow: hidden; border-radius: var(--radius-control); background: var(--surface-card); }
.ds-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- §6.3 Lista: barra de filtros, tabela e paginação ---------- */
.ds-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-12); min-width: 0; }
.ds-toolbar__group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); min-width: 0; }
.ds-toolbar__group--grow { flex: 1 1 320px; }
.ds-toolbar__group--grow > .ds-search-field { flex: 1 1 260px; }
.ds-table-wrap { width: 100%; max-width: 100%; overflow: auto; border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card); background: var(--surface-card); }
.ds-data-table { width: 100%; border-collapse: separate; border-spacing: 0; color: var(--text-primary); font-size: var(--font-size-15); }
.ds-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: var(--table-header-height);
  padding: 0 var(--space-16);
  border-bottom: var(--border-width) solid var(--border-subtle);
  background: var(--surface-section);
  color: var(--text-secondary);
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-strong);
  line-height: var(--line-height-title);
  text-align: left;
  /* Título de coluna estreita quebra em duas linhas em vez de ser cortado. */
  white-space: normal;
}
.ds-data-table td { height: var(--table-row-height); padding: var(--space-8) var(--space-16); border-bottom: var(--border-width) solid var(--border-subtle); vertical-align: middle; font-variant-numeric: tabular-nums; }
.ds-data-table tbody tr:last-child td { border-bottom: 0; }
/* (1.7) Célula junta: linha principal e, no máximo, uma linha de apoio colada (2 px), menor e numa linha só.
   Texto longo fica na ficha; o que falta aparece pequeno e claro (.ds-empty). */
.ds-data-table td { line-height: var(--line-height-title); }
.ds-data-table td :is(strong, b) { line-height: var(--line-height-title); }
.ds-data-table td :is(small, .ds-cell-sub) { display: block; max-width: 40ch; margin-top: 2px; overflow: hidden; color: var(--text-value); font-size: var(--font-size-13); font-weight: var(--font-weight-regular); line-height: var(--line-height-title); text-overflow: ellipsis; white-space: nowrap; }
.ds-data-table td > .ds-badge + :is(small, .ds-cell-sub), .ds-data-table td > .ds-badge + .ds-badge { margin-top: var(--space-4); }
.ds-data-table td .ds-badge + .ds-badge { margin-left: var(--space-4); }
.ds-empty, .ds-data-table td .ds-empty { color: var(--text-placeholder); font-size: var(--font-size-13); font-weight: var(--font-weight-regular); }
.ds-data-table tbody tr.is-clickable { cursor: pointer; }
.ds-data-table tbody tr.is-clickable:hover, .ds-data-table tbody tr.is-selected { background: var(--surface-hover); }
.ds-data-table tbody tr:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: calc(-1 * var(--focus-ring-width)); }
.ds-data-table .is-numeric { text-align: right; }
/* (1.7) Molde de tabela: coluna principal com espaço para o nome; valor curto sem quebra. */
.ds-data-table td.is-wide { min-width: calc(5 * var(--space-48)); }
.ds-data-table :is(td, th).is-nowrap, .ds-data-table td.is-numeric { white-space: nowrap; }
.ds-data-table .is-center { text-align: center; }
.ds-data-table .is-actions { width: 1%; white-space: nowrap; text-align: right; }
/* No celular, a tabela que vira cartões (células com rótulo) cresce com o texto, sem sobrepor a linha seguinte. */
@media (max-width: 639px) {
  .ds-data-table td[data-label] { height: auto; min-height: var(--table-row-height); padding-inline: 0; overflow-wrap: anywhere; }
  .ds-data-table td[data-label] :is(small, .ds-cell-sub) { max-width: none; white-space: normal; }
  .ds-data-table td[data-label] .ds-badge { height: auto; min-height: var(--tag-height); max-width: 100%; padding-block: 2px; border-radius: var(--radius-control); line-height: var(--line-height-title); white-space: normal; }
}
/* Tabela que vira cartões no celular: cada célula mostra o rótulo (data-label) ao lado do valor, no mesmo par da ficha (§7.1). */
@media (max-width: 639px) {
  .ds-data-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .ds-data-table--stack, .ds-data-table--stack tbody, .ds-data-table--stack tr { display: block; width: 100%; }
  .ds-data-table--stack tbody tr { padding: var(--space-12) var(--space-16); border-bottom: var(--border-width) solid var(--border-subtle); }
  .ds-data-table--stack tbody tr:last-child { border-bottom: 0; }
  .ds-data-table--stack td { height: auto; min-height: 0; padding: var(--space-4) 0; border-bottom: 0; display: grid; grid-template-columns: minmax(var(--readonly-label-min), 40%) minmax(0, 1fr); column-gap: var(--space-12); align-items: baseline; text-align: left; }
  /* Valor vazio no cartão: mesmo tamanho do valor, na linha do rótulo (só o tom é de vazio). */
  .ds-data-table--stack td .ds-empty { font-size: var(--font-size-15); line-height: var(--line-height-text); }
  .ds-data-table.ds-data-table--stack td[data-label] { min-height: 0; }
  .ds-data-table--stack td::before { grid-row: span 3; content: attr(data-label); color: var(--text-primary); font-size: var(--font-size-15); font-weight: var(--font-weight-strong); line-height: var(--line-height-text); overflow-wrap: normal; }
  .ds-data-table--stack td > * { grid-column: 2; }
  .ds-data-table--stack td.is-numeric { text-align: left; }
  .ds-data-table--stack td.is-actions { display: block; width: auto; white-space: normal; }
  .ds-data-table--stack td.is-actions::before { content: none; }
  /* (1.7) Molde de tabela no celular: o primeiro dado é o título do cartão; a cor da linha pinta o cartão inteiro. */
  .ds-data-table--toned.ds-data-table--stack td:first-child { grid-template-columns: minmax(0, 1fr); padding-bottom: var(--space-8); }
  .ds-data-table--toned.ds-data-table--stack td:first-child::before { content: none; }
  .ds-data-table--toned.ds-data-table--stack td:first-child > * { grid-column: 1; }
  .ds-data-table--toned.ds-data-table--stack td:first-child :is(strong, b) { font-size: var(--font-size-16); }
  [data-colors='true'] .ds-data-table--toned.ds-data-table--stack tbody tr[data-tone] { background: var(--tone-bg); border-bottom-color: var(--tone-border); }
  [data-colors='true'] .ds-data-table--toned.ds-data-table--stack tbody tr[data-tone] > td { background: transparent; }
  [data-colors='false'] .ds-data-table--toned.ds-data-table--stack tbody tr[data-tone] { box-shadow: inset var(--row-edge-width) 0 0 var(--tone-text); }
  [data-colors='false'] .ds-data-table--toned.ds-data-table--stack tbody tr[data-tone] > td:first-child { box-shadow: none; }
}
/* Variante para tabelas largas (muitas colunas de texto): vira cartões também no iPad (abaixo de 1280 px, onde o computador começa). */
@media (max-width: 1279px) {
  .ds-data-table--stack-md thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .ds-data-table--stack-md, .ds-data-table--stack-md tbody, .ds-data-table--stack-md tr { display: block; width: 100%; }
  .ds-data-table--stack-md tbody tr { padding: var(--space-12) var(--space-16); border-bottom: var(--border-width) solid var(--border-subtle); }
  .ds-data-table--stack-md tbody tr:last-child { border-bottom: 0; }
  .ds-data-table--stack-md td { height: auto; min-height: 0; padding: var(--space-4) 0; border-bottom: 0; display: grid; grid-template-columns: minmax(var(--readonly-label-min), 1fr) minmax(0, 3fr); column-gap: var(--space-12); text-align: left; }
  .ds-data-table.ds-data-table--stack-md td[data-label] { min-height: 0; }
  .ds-data-table--stack-md td::before { content: attr(data-label); color: var(--text-primary); font-size: var(--font-size-15); font-weight: var(--font-weight-strong); line-height: var(--line-height-text); overflow-wrap: normal; }
  .ds-data-table--stack-md td > * { grid-column: 2; }
  .ds-data-table--stack-md td.is-numeric { text-align: left; }
  .ds-data-table--stack-md td.is-actions { display: block; width: auto; white-space: normal; }
  .ds-data-table--stack-md td.is-actions::before { content: none; }
}
.ds-sort-button { display: inline-flex; align-items: center; gap: var(--space-4); min-width: var(--control-height); min-height: var(--control-height); padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: inherit; cursor: pointer; }
.ds-sort-button svg { flex: none; width: var(--icon-sm); height: var(--icon-sm); }
.ds-sort-button:hover { color: var(--action-primary); }

.ds-pagination { min-height: var(--control-height); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-16); color: var(--text-secondary); font-size: var(--font-size-13); }
.ds-pagination__summary { min-width: max-content; font-variant-numeric: tabular-nums; }
.ds-pagination__size, .ds-pagination__controls, .ds-pagination__pages { display: flex; align-items: center; gap: var(--space-4); }
.ds-pagination__size { gap: var(--space-8); }
.ds-pagination__size .ds-select { width: calc(3 * var(--control-height)); }
.ds-pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-8);
  min-width: var(--control-height);
  height: var(--control-height);
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--font-size-13);
  font-weight: var(--font-weight-strong);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.ds-pagination__page:hover { border-color: var(--border-subtle); background: var(--surface-hover); }
.ds-pagination__page.is-current { border-color: var(--selection-border); background: var(--surface-selected); color: var(--action-primary); }
.ds-pagination__ellipsis { min-width: var(--tag-height); text-align: center; color: var(--text-muted); }
@media (max-width: 639px) {
  .ds-pagination { flex-direction: column; align-items: stretch; }
  .ds-pagination__controls { justify-content: space-between; overflow-x: auto; }
}

/* Linhas de lista simples (sem tabela). */
.ds-list { display: grid; min-width: 0; }
.ds-list__item { min-height: var(--table-row-height); padding: var(--space-12) var(--space-16); border-bottom: var(--border-width) solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); min-width: 0; color: inherit; text-decoration: none; }
.ds-list__item:last-child { border-bottom: 0; }
:is(a, button).ds-list__item { width: 100%; background: transparent; text-align: left; cursor: pointer; }
:is(a, button).ds-list__item:hover { background: var(--surface-hover); }
.ds-list__item.is-selected { background: var(--surface-selected); }
.ds-list__copy { display: grid; gap: var(--space-4); min-width: 0; }
.ds-list__copy > small { color: var(--text-muted); font-size: var(--font-size-13); }

/* §6.3 (1.6) Árvore (organograma, pastas): uma linha de 40 px por item, nome 15/600 e o tipo em cinza ao lado;
   cada nível recua 28 px com um fio à esquerda. Sem cartões nem caixas por item. */
.ds-tree, .ds-tree__children { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-4); min-width: 0; }
.ds-tree__children { margin-top: var(--space-4); margin-left: var(--space-16); padding-left: var(--space-12); border-left: var(--border-width) solid var(--border-subtle); }
.ds-tree__row { width: 100%; min-height: var(--control-height); padding: var(--space-8) var(--space-12); border: 0; border-radius: var(--radius-control); background: transparent; color: var(--text-primary); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-4) var(--space-12); text-align: left; cursor: pointer; }
.ds-tree__row:hover { background: var(--surface-hover); }
/* Linha da página aberta (menu da área do parceiro): fundo selecionado, nome no azul de ação. */
.ds-tree__row[aria-current='page'] { background: var(--surface-selected); color: var(--action-primary); }
a.ds-tree__row { text-decoration: none; }
.ds-tree__row:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: calc(-1 * var(--focus-ring-width)); }
.ds-tree__name { min-width: 0; font-size: var(--font-size-15); font-weight: var(--font-weight-strong); overflow-wrap: anywhere; }
.ds-tree__kind { color: var(--text-muted); font-size: var(--font-size-13); }
.ds-tree__row > .ds-badge { margin-left: auto; align-self: center; }
@media (max-width: 639px) { .ds-tree__children { margin-left: var(--space-8); padding-left: var(--space-8); } }

/* §6.3 Ficha: histórico em linha do tempo. */
.ds-timeline { display: grid; gap: var(--space-16); }
.ds-timeline__item { position: relative; padding-left: var(--space-24); display: grid; gap: var(--space-4); }
.ds-timeline__item::before { content: ''; position: absolute; left: var(--space-4); top: var(--space-8); width: var(--tag-dot); height: var(--tag-dot); border-radius: 50%; background: var(--action-primary); }
.ds-timeline__item::after { content: ''; position: absolute; left: calc(var(--space-8) - var(--border-width)); top: var(--space-20); bottom: calc(-1 * var(--space-12)); border-left: var(--border-width) solid var(--border-subtle); }
.ds-timeline__item:last-child::after { display: none; }
.ds-timeline__meta { color: var(--text-muted); font-size: var(--font-size-13); }

/* §6.3 Abas: 44 px, texto 15; ativa Blue Tech com sublinhado de 2 px. */
.ds-tabs { display: flex; gap: var(--space-8); min-width: 0; border-bottom: var(--border-width) solid var(--border-subtle); overflow-x: auto; }
.ds-tabs__item {
  min-height: var(--tab-height);
  padding: 0 var(--space-12);
  border: 0;
  border-bottom: var(--border-width-strong) solid transparent;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  font-size: var(--font-size-15);
  font-weight: var(--font-weight-strong);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.ds-tabs__item:hover { color: var(--action-primary); }
.ds-tabs__item[aria-selected='true'], .ds-tabs__item[aria-current='page'], .ds-tabs__item.is-active { border-bottom-color: var(--action-primary); color: var(--action-primary); }
.ds-tabs__item svg { width: var(--icon-sm); height: var(--icon-sm); }

/* §6.3 Quadro: colunas de 280 px; rolagem só dentro do quadro. */
.ds-board { display: flex; gap: var(--space-16); align-items: flex-start; overflow-x: auto; padding-bottom: var(--space-8); min-width: 0; }
.ds-board__column { flex: 0 0 var(--board-column-width); width: var(--board-column-width); max-height: 75vh; padding: var(--space-12); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card); background: var(--surface-section); display: grid; grid-template-rows: auto minmax(0, 1fr); gap: var(--space-12); }
.ds-board__column-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); }
.ds-board__column-header h3 { font-size: var(--font-size-15); }
.ds-board__cards { display: grid; gap: var(--space-8); align-content: start; overflow-y: auto; min-height: 0; }
/* (1.7) Cartão de quadro com hierarquia: nome (15/600), uma linha principal (13), dados de apoio menores e claros (12). */
.ds-board__cards > .ds-tile { gap: var(--space-4); padding: var(--space-12) var(--space-16); }
.ds-board__cards > .ds-tile :is(strong, b) { color: var(--text-primary); font-size: var(--font-size-15); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-board__cards > .ds-tile > small { min-width: 0; overflow: hidden; color: var(--text-value); font-size: var(--font-size-13); line-height: var(--line-height-title); text-overflow: ellipsis; white-space: nowrap; }
.ds-board__cards > .ds-tile > small ~ small { color: var(--text-muted); font-size: var(--font-size-12); }
.ds-board__cards > .ds-tile > .ds-badge { margin-top: var(--space-4); }
.ds-board__tags { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-4); }
.ds-board__tags:empty, .ds-board__tags > span:empty { display: none; }
/* (1.7) Título da coluna fica fixo ao rolar os cartões, dentro da coluna e na página. */
.ds-board__column-header { position: sticky; top: 0; z-index: 1; }
/* §6.6 (1.7) Barra do molde de tabela e quadro: quantidade à esquerda; Cores e Ajustar à direita. */
.ds-data-view { display: grid; gap: var(--space-12); min-width: 0; }
.ds-view-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-8) var(--space-16); min-width: 0; }
.ds-view-tools__start { min-width: 0; color: var(--text-muted); font-size: var(--font-size-13); }
.ds-view-tools__group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-16); }
.ds-view-tools__end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-16); margin-left: auto; }
.ds-view-adjust { display: grid; gap: var(--space-8); margin: 0 0 var(--space-24); padding: 0; border: 0; min-width: 0; }
.ds-view-adjust > legend { margin-bottom: var(--space-8); padding: 0; color: var(--text-primary); }

/* "Ver mais" (1.5): texto que abre e fecha um detalhe curto dentro da tela. */
.ds-disclosure { min-width: 0; }
.ds-disclosure > summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-12); min-height: var(--control-height-compact); list-style: none; cursor: pointer; color: var(--action-primary); font-size: var(--font-size-13); font-weight: var(--font-weight-strong); border-radius: var(--radius-control); }
.ds-disclosure > summary::-webkit-details-marker { display: none; }
.ds-disclosure > summary:hover .ds-disclosure__label { text-decoration: underline; }
.ds-disclosure__label { display: inline-flex; align-items: center; gap: var(--space-4); }
.ds-disclosure__chevron { width: var(--icon-sm); height: var(--icon-sm); transition: transform 0.15s ease; }
.ds-disclosure[open] .ds-disclosure__chevron { transform: rotate(90deg); }
.ds-disclosure__meta { color: var(--text-muted); font-weight: var(--font-weight-regular); }
.ds-disclosure__body { padding: var(--space-8) 0 var(--space-4) calc(var(--icon-sm) + var(--space-4)); display: grid; gap: var(--space-8); color: var(--text-secondary); font-size: var(--font-size-13); }
.ds-disclosure__body p, .ds-disclosure__body ul { margin: 0; }
.ds-disclosure--group { border-bottom: var(--border-width) solid var(--border-subtle); }
.ds-disclosure--group > summary { min-height: var(--list-item-header-height); color: var(--text-primary); font-size: var(--font-size-15); }
.ds-disclosure--group > summary:hover .ds-disclosure__label { text-decoration: none; color: var(--action-primary); }
.ds-disclosure--group .ds-disclosure__chevron { width: var(--icon-md); height: var(--icon-md); color: var(--action-primary); }
.ds-disclosure--group > .ds-disclosure__body { padding: var(--space-8) 0 var(--space-16); color: var(--text-primary); font-size: var(--font-size-15); }
@media (prefers-reduced-motion: reduce) { .ds-disclosure__chevron { transition: none; } }

/* Etapas (jornada, cadastro em etapas). */
.ds-steps { display: grid; gap: var(--space-4); min-width: 0; }
.ds-step { min-height: var(--control-height); padding: var(--space-8) var(--space-12); border: 0; border-radius: var(--radius-control); background: transparent; color: var(--text-secondary); display: flex; align-items: center; gap: var(--space-12); text-align: left; font-size: var(--font-size-15); text-decoration: none; cursor: pointer; }
.ds-step:hover { background: var(--surface-hover); }
.ds-step[aria-current='step'], .ds-step.is-current { background: var(--surface-selected); color: var(--action-primary); font-weight: var(--font-weight-strong); }
.ds-step__mark { width: var(--tag-height); height: var(--tag-height); flex: 0 0 auto; border: var(--border-width) solid var(--border-default); border-radius: 50%; background: var(--surface-card); color: var(--text-secondary); display: inline-grid; place-items: center; font-size: var(--font-size-12); font-weight: var(--font-weight-strong); }
.ds-step.is-done .ds-step__mark { border-color: var(--status-success-text); background: var(--status-success-text); color: var(--text-on-dark); }
.ds-step.is-current .ds-step__mark, .ds-step[aria-current='step'] .ds-step__mark { border-color: var(--action-primary); background: var(--action-primary); color: var(--text-on-dark); }
.ds-step.is-pending .ds-step__mark { border-color: var(--status-warning-border); background: var(--status-warning-bg); color: var(--status-warning-text); }
.ds-step__copy { display: grid; min-width: 0; }
.ds-step__copy small { color: var(--text-muted); font-size: var(--font-size-13); font-weight: var(--font-weight-regular); }

/* ---------- §6.4 Janela, painel lateral e menu suspenso (únicos com sombra) ---------- */
.ds-dialog-backdrop, .ds-drawer-backdrop { position: fixed; inset: 0; z-index: var(--z-overlay); padding: var(--space-16); background: var(--overlay-backdrop); display: grid; place-items: center; }
.ds-dialog {
  width: min(100%, var(--panel-width));
  max-height: calc(100dvh - 2 * var(--space-16));
  overflow-y: auto;
  padding: var(--space-24);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  box-shadow: var(--elevation-overlay);
  display: grid;
  gap: var(--space-20);
}
.ds-dialog--wide { width: min(100%, var(--container-form)); }
.ds-dialog:focus { outline: none; }
.ds-dialog__header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-12); }
.ds-dialog__header > div { display: grid; gap: var(--space-4); min-width: 0; }
.ds-dialog__header p { color: var(--text-muted); font-size: var(--font-size-13); }
.ds-dialog__body { display: grid; gap: var(--space-16); min-width: 0; }
.ds-dialog__footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-12); }
.ds-drawer-backdrop { place-items: stretch end; padding: 0; }
.ds-drawer {
  width: min(100vw, var(--panel-width));
  height: 100dvh;
  overflow: hidden;
  border-left: var(--border-width) solid var(--border-subtle);
  background: var(--surface-card);
  box-shadow: var(--elevation-overlay);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.ds-drawer--wide { width: min(100vw, var(--panel-width-wide)); }
/* Tela inteira dentro do painel (formulário de cadastro): sem a margem e a largura de página. */
.ds-drawer__body > .page { width: 100%; margin: 0; padding: 0; }
/* No painel, o X fecha: o "Voltar" da tela que abriu dentro dele não aparece. */
.ds-drawer__body .ds-back-link { display: none; }
.ds-drawer:focus { outline: none; }
.ds-drawer__header { position: sticky; top: 0; z-index: 1; padding: var(--space-20) var(--space-24); border-bottom: var(--border-width) solid var(--border-subtle); background: var(--surface-card); display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-12); }
.ds-drawer__header > div { display: grid; gap: var(--space-4); min-width: 0; }
.ds-drawer__header p { color: var(--text-muted); font-size: var(--font-size-13); }
/* Só o corpo rola: cabeçalho e rodapé ficam sempre à vista, em qualquer altura de tela. */
.ds-drawer__body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: var(--space-24); display: grid; grid-auto-rows: max-content; gap: var(--space-20); align-content: start; }
.ds-drawer__footer { position: sticky; bottom: 0; padding: var(--space-16) var(--space-24); border-top: var(--border-width) solid var(--border-subtle); background: var(--surface-card); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-12); }
@media (max-width: 639px) {
  .ds-dialog { padding: var(--space-20); }
  .ds-dialog__footer { flex-direction: column-reverse; }
  .ds-dialog__footer .ds-button { width: 100%; }
  .ds-drawer__header, .ds-drawer__body, .ds-drawer__footer { padding-left: var(--space-16); padding-right: var(--space-16); }
}
.ds-menu-anchor { position: relative; display: inline-flex; }
.ds-menu {
  position: absolute;
  z-index: var(--z-menu);
  top: calc(100% + var(--space-4));
  right: 0;
  min-width: calc(5 * var(--control-height));
  padding: var(--space-4);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-control);
  background: var(--surface-card);
  box-shadow: var(--elevation-menu);
  display: grid;
}
.ds-menu--start { left: 0; right: auto; }
.ds-menu__item { min-height: var(--control-height); padding: 0 var(--space-12); border: 0; border-radius: var(--radius-control); background: transparent; color: var(--text-primary); display: flex; align-items: center; gap: var(--space-8); font-size: var(--font-size-15); text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer; }
.ds-menu__item svg { width: var(--icon-sm); height: var(--icon-sm); }
.ds-menu__item:hover { background: var(--surface-hover); }
.ds-menu__item--danger { color: var(--text-error); }
.ds-menu__item:disabled { color: var(--text-disabled); cursor: not-allowed; }
/* §6.7 Dica ao passar o mouse. */
.ds-tooltip { position: absolute; z-index: var(--z-menu); max-width: calc(8 * var(--control-height)); padding: var(--space-8) var(--space-12); border-radius: var(--radius-control); background: var(--surface-dark); color: var(--text-on-dark); font-size: var(--font-size-13); line-height: var(--line-height-text); }

/* ---------- §6.5 Estados e avisos ---------- */
.ds-state { padding: var(--space-32); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card); background: var(--surface-card); display: grid; }
.ds-state--inline { padding: var(--space-20); border-style: dashed; }
.ds-state__content { max-width: calc(16 * var(--control-height)); display: grid; grid-template-columns: var(--control-height) minmax(0, 1fr); column-gap: var(--space-16); row-gap: var(--space-8); align-items: start; }
.ds-state__icon { grid-row: 1 / span 3; width: var(--control-height); height: var(--control-height); border-radius: var(--radius-control); background: var(--surface-selected); color: var(--action-accent); display: grid; place-items: center; }
.ds-state__icon svg { width: var(--icon-lg); height: var(--icon-lg); }
.ds-state__content > :not(.ds-state__icon) { grid-column: 2; }
.ds-state__content > p { color: var(--text-muted); font-size: var(--font-size-15); }
.ds-state__actions { display: flex; flex-wrap: wrap; gap: var(--space-8); margin-top: var(--space-8); }
.ds-spinner { animation: ds-spin .9s linear infinite; }
@keyframes ds-spin { to { transform: rotate(360deg); } }
.ds-skeleton { height: var(--space-16); border-radius: var(--radius-control); background: var(--surface-section); }
@media (max-width: 639px) {
  .ds-state { padding: var(--space-20); }
  .ds-state__content { grid-template-columns: minmax(0, 1fr); }
  .ds-state__icon { grid-row: auto; }
  .ds-state__content > :not(.ds-state__icon) { grid-column: 1; }
}
.ds-notice {
  padding: var(--space-12) var(--space-16);
  border: var(--border-width) solid var(--status-info-border);
  border-radius: var(--radius-card);
  background: var(--status-info-bg);
  color: var(--status-info-text);
  display: grid;
  grid-template-columns: var(--icon-md) minmax(0, 1fr) auto;
  gap: var(--space-12);
  align-items: start;
}
.ds-notice > svg { width: var(--icon-md); height: var(--icon-md); margin-top: calc((var(--font-size-15) * var(--line-height-text) - var(--icon-md)) / 2); }
.ds-notice__body { display: grid; gap: var(--space-4); min-width: 0; }
.ds-notice__body > strong { font-size: var(--font-size-15); font-weight: var(--font-weight-strong); }
.ds-notice__body > span, .ds-notice__body > p, .ds-notice__body li { color: var(--text-primary); font-size: var(--font-size-13); }
.ds-notice__body ul { padding-left: var(--space-16); list-style: disc; }
.ds-notice__body > .ds-row { margin-top: var(--space-4); }
.ds-notice--success { background: var(--status-success-bg); border-color: var(--status-success-border); color: var(--status-success-text); }
.ds-notice--warning { background: var(--status-warning-bg); border-color: var(--status-warning-border); color: var(--status-warning-text); }
.ds-notice--lilac { background: var(--category-independent-bg); border-color: var(--category-independent-border); color: var(--category-independent-text); }
.ds-notice--danger { background: var(--status-danger-bg); border-color: var(--status-danger-border); color: var(--status-danger-text); }
.ds-notice--info { background: var(--status-info-bg); border-color: var(--status-info-border); color: var(--status-info-text); }
.ds-notice--neutral { background: var(--status-neutral-bg); border-color: var(--status-neutral-border); color: var(--status-neutral-text); }

/* ---------- Barra da aba (selos à esquerda, ações à direita): abas da página da escola ---------- */
.ds-tab-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-12); }
.ds-tab-toolbar__start, .ds-tab-toolbar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); min-width: 0; }
.ds-tab-toolbar__actions { margin-left: auto; justify-content: flex-end; }
@media (max-width: 639px) { .ds-tab-toolbar__actions { width: 100%; justify-content: flex-start; margin-left: 0; } }

/* ---------- Barra de operação, Filtros em menu e filtros aplicados (modelo: Todos os Parceiros) ---------- */
.ds-operation-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); }
.ds-operation-bar__search { min-width: 0; width: 100%; display: flex; align-items: center; gap: var(--space-12); }
.ds-operation-bar__search .ds-search-field { flex: 1; min-width: calc(6 * var(--control-height)); }
.ds-operation-bar__tools, .ds-operation-bar__actions { flex: 0 0 auto; display: flex; align-items: center; gap: var(--space-8); }
.ds-operation-bar__tools { flex: 0 1 auto; min-width: 0; flex-wrap: wrap; align-items: flex-end; }
.ds-operation-bar__actions { align-self: flex-end; }

.ds-filter-menu { position: relative; }
.ds-filter-menu__trigger.is-active { border-color: var(--selection-border); background: var(--surface-selected); }
.ds-filter-menu__backdrop { display: none; }
.ds-filter-menu__panel {
  position: absolute; z-index: var(--z-menu); top: calc(100% + var(--space-8)); right: 0;
  width: min(calc(100vw - 2 * var(--space-24)), var(--panel-width)); max-height: min(calc(2 * var(--menu-max-height)), calc(100dvh - 4 * var(--control-height))); overflow-y: auto;
  padding: var(--space-16); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card);
  background: var(--surface-card); box-shadow: var(--elevation-menu);
}
.ds-filter-menu__head { margin-bottom: var(--space-12); display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-16); }
.ds-filter-menu__head > div { min-width: 0; display: grid; gap: var(--space-4); }
.ds-filter-menu__head strong { color: var(--text-primary); font-size: var(--font-size-16); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-filter-menu__head span { display: none; color: var(--text-secondary); font-size: var(--font-size-13); line-height: var(--line-height-text); }
.ds-filter-menu__groups { border-top: var(--border-width) solid var(--border-subtle); display: grid; }
.ds-filter-menu__group { border-bottom: var(--border-width) solid var(--border-subtle); }
.ds-filter-menu__group-trigger {
  width: 100%; min-height: calc(var(--control-height) + var(--space-8)); padding: 0 var(--space-4); border: 0; background: transparent; color: var(--text-primary);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(calc(2 * var(--control-height)), auto) var(--icon-sm); align-items: center; gap: var(--space-12);
  text-align: left; cursor: pointer;
}
.ds-filter-menu__group-trigger:hover { background: var(--surface-hover); }
.ds-filter-menu__group-trigger svg, .ds-filter-menu__options svg { width: var(--icon-sm); height: var(--icon-sm); flex: none; }
.ds-filter-menu__label { font-size: var(--font-size-15); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-filter-menu__value { overflow: hidden; color: var(--text-secondary); font-size: var(--font-size-13); text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.ds-filter-menu__options { padding: 0 0 var(--space-8) var(--space-16); display: grid; gap: var(--space-4); }
.ds-filter-menu__options > button {
  width: 100%; min-height: var(--control-height); padding: 0 var(--space-12); border: 0; border-radius: var(--radius-control);
  background: transparent; color: var(--text-primary); display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-12); text-align: left; font-size: var(--font-size-15); cursor: pointer;
}
.ds-filter-menu__options > button:hover { background: var(--surface-hover); }
.ds-filter-menu__options > button.is-selected { background: var(--surface-selected); color: var(--text-brand); font-weight: var(--font-weight-strong); }
.ds-filter-menu__group-trigger:focus-visible, .ds-filter-menu__options > button:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: calc(-1 * var(--focus-ring-width)); }
.ds-filter-menu__actions { margin-top: var(--space-16); display: flex; justify-content: flex-end; gap: var(--space-12); }

.ds-active-filters { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-8); }
.ds-active-filters__chip {
  min-height: var(--control-height); padding: 0 var(--space-12); border: var(--border-width) solid var(--selection-border);
  border-radius: var(--radius-pill); background: var(--surface-selected); color: var(--text-primary);
  display: inline-flex; align-items: center; gap: var(--space-8); font-size: var(--font-size-12); font-weight: var(--font-weight-strong); cursor: pointer;
}
.ds-active-filters__chip svg { width: var(--icon-sm); height: var(--icon-sm); }
.ds-active-filters__chip:hover { background: var(--surface-hover); }
.ds-active-filters__clear {
  min-height: var(--control-height); padding: 0 var(--space-8); border: 0; background: transparent;
  color: var(--link-default); font-size: var(--font-size-13); font-weight: var(--font-weight-strong); cursor: pointer;
}
.ds-active-filters__clear:hover { color: var(--link-hover); }

@media (max-width: 1023px) { .ds-operation-bar { align-items: stretch; } }
@media (max-width: 639px) {
  .ds-operation-bar { flex-direction: column; }
  .ds-operation-bar__search { display: grid; grid-template-columns: 1fr; gap: var(--space-12); }
  .ds-operation-bar__search .ds-search-field { min-width: 0; }
  .ds-operation-bar__tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(calc(3 * var(--space-48)), 1fr)); align-items: end; }
  .ds-operation-bar__tools .ds-filter-menu, .ds-operation-bar__tools .ds-button { width: 100%; }
  .ds-operation-bar__actions { display: grid; grid-template-columns: 1fr; }
  .ds-operation-bar__actions .ds-button { width: 100%; }
  .ds-filter-menu__backdrop { position: fixed; inset: 0; z-index: var(--z-overlay); display: block; border: 0; background: var(--overlay-backdrop); }
  .ds-filter-menu__panel {
    position: fixed; z-index: calc(var(--z-overlay) + 1); inset: auto 0 0; width: auto; max-height: calc(100dvh - var(--space-48));
    padding: var(--space-24) var(--space-16); border-width: var(--border-width) 0 0; border-radius: var(--radius-card) var(--radius-card) 0 0;
  }
  .ds-filter-menu__head span { display: block; }
  .ds-filter-menu__options { padding-left: var(--space-8); }
  .ds-filter-menu__actions { display: grid; grid-template-columns: 1fr; }
}

/* ---------- Linha recolhível (lista de solicitações, envios e registros) ---------- */
.ds-expand-list { display: grid; min-width: 0; }
.ds-expand-row { min-width: 0; border-bottom: var(--border-width) solid var(--border-subtle); }
.ds-expand-row:last-child { border-bottom: 0; }
.ds-expand-row__head { min-height: var(--table-row-height); display: flex; align-items: center; gap: var(--space-12); }
.ds-expand-row__toggle { flex: 1 1 auto; min-width: 0; min-height: var(--table-row-height); padding: var(--space-8) var(--space-4); border: 0; border-radius: var(--radius-control); background: transparent; color: var(--text-primary); display: flex; align-items: center; gap: var(--space-8); text-align: left; cursor: pointer; }
.ds-expand-row__toggle:hover:not(:disabled) { background: var(--surface-hover); }
/* Com a chave "Cores" ligada, o passar do mouse não apaga a cor da linha: só realça o contorno, na cor da situação. */
[data-colors='true'] .ds-tone-row[data-tone] .ds-expand-row__toggle:hover:not(:disabled) { background: transparent; box-shadow: inset 0 0 0 var(--border-width) var(--tone-text); }
.ds-expand-row__toggle:disabled { cursor: default; }
/* O contorno de foco envolve a linha inteira, com os detalhes abertos dentro dele. */
.ds-expand-row__toggle:focus-visible { outline: none; }
.ds-expand-row:has(> .ds-expand-row__head .ds-expand-row__toggle:focus-visible) { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: calc(-1 * var(--focus-ring-width)); border-radius: var(--radius-control); }
.ds-expand-row__chevron { width: var(--icon-md); height: var(--icon-md); flex: none; color: var(--action-primary); transition: transform 0.15s ease; }
.ds-expand-row.is-open .ds-expand-row__chevron { transform: rotate(90deg); }
.ds-expand-row__text { min-width: 0; display: grid; gap: var(--space-4); }
.ds-expand-row__title { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); }
.ds-expand-row__summary { min-width: 0; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-expand-row__actions { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-8); }
.ds-expand-row__select { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--space-24); min-height: var(--table-row-height); cursor: pointer; }
.ds-expand-list__bulk { min-height: var(--table-row-height); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-12); padding: var(--space-8) 0; border-bottom: var(--border-width) solid var(--border-subtle); }
.ds-expand-list__bulk .ds-check { margin-right: auto; }
.ds-expand-list__bulk > :is(div, p) { flex: 1 0 100%; }
.ds-expand-row__body { margin: 0 var(--space-8) var(--space-16) calc(var(--space-4) + var(--icon-md) + var(--space-8)); display: grid; gap: var(--space-12); color: var(--text-secondary); }
.ds-expand-row__body p { margin: 0; }
/* Com a caixinha de seleção, os detalhes alinham com o texto da linha, não com a caixinha. */
.ds-expand-row--select .ds-expand-row__body { margin-left: calc(var(--space-24) + var(--space-12) + var(--space-4) + var(--icon-md) + var(--space-8)); }
@media (prefers-reduced-motion: reduce) { .ds-expand-row__chevron { transition: none; } }
@media (max-width: 639px) {
  .ds-expand-row__head { flex-wrap: wrap; gap: var(--space-4); padding-bottom: var(--space-8); }
  .ds-expand-row__summary { white-space: normal; }
  /* A caixinha, a seta e o texto ficam na mesma linha; só as ações descem. */
  .ds-expand-row__toggle { flex: 1 1 0; }
  .ds-expand-row__actions { width: 100%; justify-content: flex-start; padding-left: calc(var(--space-4) + var(--icon-md) + var(--space-8)); }
  .ds-expand-row--select .ds-expand-row__actions { padding-left: calc(var(--space-24) + var(--space-4) + var(--space-4) + var(--icon-md) + var(--space-8)); }
  .ds-expand-row--select .ds-expand-row__body { margin-left: calc(var(--space-24) + var(--space-4) + var(--space-4) + var(--icon-md) + var(--space-8)); }
}

/*
 * §10 Vitrine — páginas comerciais para famílias (site do Extraclasse).
 * Só as cores da Codifica: meia-noite, roxo vivo e lilás, com seções coloridas (nada de página toda branca).
 * Magenta só na barra da marca (uma só, na abertura) e no chevron, que marca os títulos e os passos. Sem amarelo, sem gradiente.
 * Seis tamanhos de letra (display, headline, title, lead, text, small), nada essencial abaixo de 14px; botões de 48px.
 * Pedidos (Garantir a vaga, Aula experimental) e a atividade abrem num painel por cima da página, tela cheia no celular.
 * Campos, caixas de marcar e avisos continuam os do Design System.
 */
.ds-showcase { min-height: 100vh; background: var(--showcase-midnight); color: var(--showcase-text-strong); font-family: var(--font-operational); font-size: var(--showcase-text); line-height: var(--showcase-line-text); overflow-x: clip; }
.ds-showcase:has(.ds-showcase-sheet[open]) { overflow: hidden; }
.ds-showcase main { background: var(--surface-card); }
.ds-showcase-container { width: 100%; max-width: var(--showcase-container); margin-inline: auto; padding-inline: var(--showcase-gutter); }
.ds-showcase-skip { position: absolute; left: var(--space-16); top: calc(-1 * var(--showcase-topbar-height)); z-index: var(--z-overlay); padding: var(--space-8) var(--space-16); border-radius: var(--radius-control); background: var(--surface-card); color: var(--showcase-midnight); font-weight: var(--font-weight-strong); }
.ds-showcase-skip:focus { top: var(--space-12); }
.ds-showcase-sheet a:not([class]), .ds-showcase-document a { color: inherit; font-weight: var(--font-weight-strong); text-decoration: underline; text-underline-offset: 3px; }
.ds-showcase-sheet a:not([class]):hover, .ds-showcase-document a:hover { color: var(--showcase-violet); }

/* Barra do topo: meia-noite, junto da abertura. Marca Codifica, escola, atalhos e o botão de chamada. */
.ds-showcase-topbar { position: sticky; top: 0; z-index: var(--z-nav); background: var(--showcase-topbar-bg); color: var(--text-on-dark); border-bottom: var(--border-width) solid var(--showcase-on-dark-line); }
.ds-showcase-topbar__inner { min-height: var(--showcase-topbar-height); display: flex; align-items: center; gap: var(--space-24); }
.ds-showcase-topbar__brand { display: inline-flex; align-items: center; gap: var(--space-16); min-width: 0; color: var(--text-on-dark); text-decoration: none; }
.ds-showcase-topbar__brand:hover { color: var(--text-on-dark); }
.ds-showcase-topbar__logo { display: block; height: 24px; width: auto; }
.ds-showcase-topbar__divider { flex: none; width: var(--border-width); height: 28px; background: var(--showcase-on-dark-divider); }
.ds-showcase-topbar__school { display: inline-flex; align-items: center; gap: var(--space-12); min-width: 0; color: var(--text-on-dark); font-family: var(--font-identity); font-size: var(--showcase-text); font-weight: var(--showcase-weight-medium); line-height: var(--showcase-line-title); }
.ds-showcase-topbar__school > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-showcase-topbar__nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.ds-showcase-topbar__nav a:not(.ds-showcase-button) { color: var(--showcase-on-dark-soft); font-family: var(--font-identity); font-size: var(--showcase-text); font-weight: var(--showcase-weight-medium); text-decoration: none; white-space: nowrap; }
.ds-showcase-topbar__nav a:not(.ds-showcase-button):hover { color: var(--text-on-dark); }
.ds-showcase-topbar__nav > .ds-showcase-button { flex: none; white-space: nowrap; }
.ds-showcase-topbar :focus-visible { outline-color: var(--showcase-focus); }
@media (max-width: 1100px) {
  .ds-showcase-topbar__nav { gap: var(--space-20); }
  .ds-showcase-topbar__nav a:not(.ds-showcase-button) { font-size: var(--font-size-15); }
}
@media (max-width: 899px) {
  .ds-showcase-topbar__nav > *, .ds-showcase-topbar__nav > .ds-showcase-button { display: none; }
}
@media (max-width: 600px) {
  .ds-showcase-topbar__divider, .ds-showcase-topbar__school { display: none; }
}

/* Logo da escola: sempre numa placa branca, para qualquer logo funcionar sobre o meia-noite. */
.ds-showcase-logo { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: var(--space-4); border-radius: var(--radius-control); background: var(--surface-card); overflow: hidden; }
.ds-showcase-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ds-showcase-logo__initials { color: var(--showcase-midnight); font-family: var(--font-identity); font-size: var(--font-size-15); font-weight: var(--font-weight-title); line-height: 1; }

/* Botões: mesma altura (48px) e forma de pílula. Chamada roxa; contorno roxo; claro sobre fundo escuro;
   branco sobre o roxo; suave (lilás) ao lado da chamada. */
.ds-showcase-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8); min-height: var(--showcase-cta-height); max-width: 100%; padding: 0 var(--space-24); border: var(--border-width-strong) solid transparent; border-radius: var(--radius-pill); font-family: var(--font-identity); font-size: var(--showcase-text); font-weight: var(--font-weight-strong); line-height: 1.15; text-align: center; text-decoration: none; text-wrap: balance; cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.ds-showcase-button svg { width: var(--icon-md); height: var(--icon-md); flex: none; }
.ds-showcase-button:focus-visible { outline: 3px solid var(--showcase-focus); outline-offset: 2px; }
.ds-showcase-button--cta { background: var(--showcase-cta); color: var(--showcase-cta-text); }
.ds-showcase-button--cta:hover { background: var(--showcase-cta-hover); color: var(--showcase-cta-text); }
.ds-showcase-button--outline { background: transparent; border-color: var(--showcase-violet); color: var(--showcase-violet); }
.ds-showcase-button--outline:hover { background: var(--showcase-surface-lilac); color: var(--showcase-violet); }
.ds-showcase-button--light, :is(.ds-showcase-hero, .ds-showcase-section--dark, .ds-showcase-band) .ds-showcase-button--outline { background: transparent; border-color: var(--showcase-on-dark-line-strong); color: var(--text-on-dark); }
.ds-showcase-button--light:hover, :is(.ds-showcase-hero, .ds-showcase-section--dark, .ds-showcase-band) .ds-showcase-button--outline:hover { background: var(--showcase-on-dark-card); border-color: var(--text-on-dark); color: var(--text-on-dark); }
.ds-showcase-button--white, .ds-showcase-band .ds-showcase-button--cta { background: var(--surface-card); border-color: transparent; color: var(--showcase-violet); }
.ds-showcase-button--white:hover, .ds-showcase-band .ds-showcase-button--cta:hover { background: var(--showcase-surface-lilac); color: var(--showcase-violet); }
.ds-showcase-button--soft { background: var(--showcase-surface-lilac); color: var(--showcase-violet); }
.ds-showcase-button--soft:hover { background: var(--showcase-line); color: var(--showcase-violet); }
.ds-showcase-button--compact { min-height: 44px; padding: 0 var(--space-20); font-size: var(--font-size-15); }
.ds-showcase-button--block { width: 100%; }
.ds-showcase-button:disabled, .ds-showcase-button[aria-disabled='true'] { background: var(--surface-disabled); border-color: var(--showcase-line); color: var(--text-disabled); cursor: not-allowed; }
.ds-showcase-text-button { display: inline-flex; align-items: center; gap: var(--space-4); min-height: 44px; color: var(--showcase-violet); font-family: var(--font-identity); font-size: var(--font-size-15); font-weight: var(--font-weight-strong); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ds-showcase-text-button:hover { color: var(--showcase-violet-hover); }
.ds-showcase-text-button--quiet { justify-self: start; color: var(--showcase-text-soft); font-family: inherit; font-size: var(--showcase-small); font-weight: var(--showcase-weight-medium); }
.ds-showcase-text-button--quiet:hover { color: var(--showcase-violet); }
.ds-showcase-text-button:focus-visible { outline: 3px solid var(--showcase-focus); outline-offset: 2px; border-radius: var(--radius-control); }

/* Marcador acima dos títulos: o chevron da marca (Magenta) e o texto em caixa alta. */
.ds-showcase-kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--showcase-kicker); font-family: var(--font-identity); font-size: var(--showcase-small); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-small); letter-spacing: var(--showcase-tracking-kicker); text-transform: uppercase; }
.ds-showcase-kicker::before { content: ''; flex: none; width: 14px; height: 16px; background: var(--showcase-bar); clip-path: polygon(0 0, 60% 0, 100% 50%, 60% 100%, 0 100%, 40% 50%); }
:is(.ds-showcase-hero, .ds-showcase-section--dark, .ds-showcase-band) .ds-showcase-kicker { color: var(--showcase-kicker-on-dark); }

/* Letras da vitrine: display (t1), headline (t2), title (t3), lead (t4), texto (t5) e pequeno (t6). */
.ds-showcase-display { margin: var(--space-16) 0 var(--space-20); color: inherit; font-family: var(--font-identity); font-size: var(--showcase-display); font-weight: var(--font-weight-title); line-height: var(--showcase-line-display); letter-spacing: var(--showcase-tracking-tight); text-wrap: balance; }
.ds-showcase-display em { color: var(--showcase-kicker-on-dark); font-style: normal; }
.ds-showcase-headline { margin: 0; color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-headline); font-weight: var(--font-weight-title); line-height: var(--showcase-line-headline); text-wrap: balance; }
.ds-showcase-lead { max-width: 60ch; margin: 0; color: var(--showcase-text-soft); font-size: var(--showcase-lead); line-height: var(--showcase-line-lead); }
:is(.ds-showcase-hero, .ds-showcase-section--dark, .ds-showcase-band) :is(.ds-showcase-headline, .ds-showcase-subhead) { color: var(--text-on-dark); }
:is(.ds-showcase-hero, .ds-showcase-section--dark, .ds-showcase-band) .ds-showcase-lead { color: var(--showcase-on-dark-soft); }
.ds-showcase-subhead { margin: var(--space-48) 0 var(--space-24); color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-title); font-weight: var(--font-weight-title); line-height: var(--showcase-line-title); }
.ds-showcase-subhead:has(+ .ds-showcase-subhead__lead) { margin-bottom: var(--space-8); }
.ds-showcase-subhead__lead { max-width: 720px; margin: 0 0 var(--space-24); color: var(--showcase-text-soft); font-size: var(--showcase-text); line-height: var(--showcase-line-text); }
.ds-showcase-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-12); margin-top: var(--space-32); }

/* Abertura: meia-noite, com a barra Magenta (uma só) atrás das duas fotos. */
.ds-showcase-hero { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(32px, 4vw, 56px); background: var(--showcase-hero-bg); color: var(--text-on-dark); }
.ds-showcase-hero__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); align-items: center; gap: clamp(32px, 5vw, 64px); }
.ds-showcase-hero__note { margin: var(--space-16) 0 0; color: var(--showcase-on-dark-soft); font-size: var(--showcase-small); line-height: var(--showcase-line-small); }
/* Abertura baixa: a seção seguinte já aparece na primeira tela (Bárbara, 26/10). */
.ds-showcase-hero .ds-showcase-display { margin-block: var(--space-12) var(--space-16); }
.ds-showcase-hero .ds-showcase-actions { margin-top: var(--space-24); }
.ds-showcase-hero__photos { position: relative; min-height: 320px; }
.ds-showcase-hero__bar { position: absolute; z-index: 0; top: -40px; right: 12%; width: auto; height: calc(100% + 160px); color: var(--showcase-bar); pointer-events: none; }
.ds-showcase-hero__photo { position: absolute; display: block; object-fit: cover; border-radius: var(--showcase-radius); background: var(--showcase-midnight-deep); }
.ds-showcase-hero__photo--main { z-index: 1; top: 0; right: 0; width: 82%; aspect-ratio: 4 / 3; }
.ds-showcase-hero__photo--second { z-index: 2; bottom: 0; left: 0; width: 50%; aspect-ratio: 1 / 1; border: 6px solid var(--showcase-midnight); }
@media (max-width: 899px) {
  .ds-showcase-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .ds-showcase-hero__photos { min-height: 0; aspect-ratio: 2 / 1; }
  .ds-showcase-hero__photo--main { width: 64%; }
  .ds-showcase-hero__photo--second { width: 34%; }
  .ds-showcase-hero__bar { top: 0; }
}
@media (max-width: 600px) {
  .ds-showcase-hero .ds-showcase-actions > .ds-showcase-button { width: 100%; }
  .ds-showcase-hero__photos { display: none; }
}

/* Seções: cada uma com a sua cor (lilás, roxo, gelo, meia-noite). */
.ds-showcase-section { position: relative; padding-block: var(--showcase-section); scroll-margin-top: var(--showcase-topbar-height); }
.ds-showcase-section--soft { background: var(--showcase-surface-soft); }
.ds-showcase-section--lilac { background: var(--showcase-surface-lilac); }
.ds-showcase-section--dark { background: var(--showcase-midnight); color: var(--text-on-dark); }
.ds-showcase-section__head { display: flex; flex-direction: column; gap: var(--space-12); max-width: 720px; margin-bottom: clamp(32px, 4vw, 48px); }
.ds-showcase-section__head > * { margin: 0; }
.ds-showcase-section__head--center { margin-inline: auto; align-items: center; text-align: center; }

/* Ano do estudante: uma linha de opções, que desliza no celular. */
.ds-showcase-yearbar { display: grid; gap: var(--space-12); margin-bottom: var(--space-32); }
.ds-showcase-yearbar__title { color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-text); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-title); }
.ds-showcase-yearbar__row { display: none; }
.ds-showcase-yearbar__group { display: grid; gap: var(--space-8); align-content: start; }
.ds-showcase-yearbar__stage { color: var(--showcase-text-soft); font-family: var(--font-identity); font-size: var(--font-size-12); font-weight: var(--font-weight-strong); letter-spacing: var(--showcase-tracking-kicker); text-transform: uppercase; }
.ds-showcase-yearbar__chips { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.ds-showcase-yearbar__status { color: var(--showcase-text-soft); font-size: var(--showcase-small); }
.ds-showcase-select { position: relative; display: block; max-width: 420px; }
.ds-showcase-select::after { content: ''; position: absolute; top: 50%; right: var(--space-20); width: 10px; height: 10px; margin-top: -8px; border-right: var(--border-width-strong) solid var(--showcase-violet); border-bottom: var(--border-width-strong) solid var(--showcase-violet); transform: rotate(45deg); pointer-events: none; }
.ds-showcase-select__field { width: 100%; min-height: var(--showcase-cta-height); padding: 0 var(--space-48) 0 var(--space-16); border: var(--border-width-strong) solid var(--showcase-violet); border-radius: var(--showcase-radius-sm); background: var(--surface-card); color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-text); font-weight: var(--font-weight-strong); appearance: none; cursor: pointer; }
@media (min-width: 900px) {
  .ds-showcase-select { display: none; }
  .ds-showcase-yearbar__row { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-12) var(--space-24); }
}

/* Cartão da atividade: foto, anos, nome (nome principal maior e subnome menor), frase, turmas, valor e ações.
   "Conhecer a atividade" abre a atividade inteira; logo abaixo, Garantir a vaga e Aula experimental lado a lado. */
.ds-showcase-offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--space-24); }
.ds-showcase-offer { container-type: inline-size; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: var(--showcase-radius); background: var(--surface-card); box-shadow: 0 1px 0 var(--showcase-line); }
.ds-showcase-offer__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--showcase-surface-lilac); }
.ds-showcase-offer__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ds-showcase-offer__body { flex: 1; display: flex; flex-direction: column; gap: var(--space-16); padding: var(--space-24); }
.ds-showcase-offer__years { align-self: flex-start; padding: 6px var(--space-12); border-radius: var(--radius-pill); background: var(--showcase-surface-lilac); color: var(--showcase-violet); font-family: var(--font-identity); font-size: var(--showcase-small); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-small); }
.ds-showcase-offer__name { display: flex; flex-direction: column; gap: 2px; }
.ds-showcase-offer__title { margin: 0; color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-title); font-weight: var(--font-weight-title); line-height: var(--showcase-line-title); }
.ds-showcase-offer__subtitle { color: var(--showcase-violet); font-family: var(--font-identity); font-size: var(--showcase-text); font-weight: var(--showcase-weight-medium); line-height: var(--showcase-line-title); }
.ds-showcase-offer__hook, .ds-showcase-offer__desc { margin: 0; color: var(--showcase-text-soft); font-size: var(--showcase-text); line-height: var(--showcase-line-text); }
.ds-showcase-offer__keys { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: var(--space-16) 0 0; border-top: var(--border-width) solid var(--showcase-line); list-style: none; }
.ds-showcase-offer__keys li { display: flex; align-items: flex-start; gap: 10px; color: var(--showcase-text-soft); font-size: var(--showcase-text); line-height: var(--showcase-line-small); }
.ds-showcase-offer__keys li > svg { flex: none; width: var(--icon-md); height: var(--icon-md); color: var(--showcase-violet); }
.ds-showcase-offer__keys li > div { display: grid; gap: 2px; min-width: 0; }
.ds-showcase-offer__keys small { color: var(--showcase-text-soft); font-size: var(--showcase-small); }
.ds-showcase-scarce { color: var(--showcase-scarce); font-weight: var(--font-weight-strong); }
.ds-showcase-offer__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-4) var(--space-8); margin-top: auto; }
.ds-showcase-offer__price strong { color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-text); font-weight: var(--font-weight-title); line-height: var(--showcase-line-title); font-variant-numeric: tabular-nums; }
.ds-showcase-offer__price span { color: var(--showcase-text-soft); font-size: var(--showcase-small); line-height: var(--showcase-line-small); }
.ds-showcase-offer__actions { display: grid; gap: var(--space-8); }
.ds-showcase-offer__actions .ds-showcase-button { padding-inline: var(--space-12); }
.ds-showcase-offer__direct { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8); }
.ds-showcase-offer__actions .ds-showcase-offer__direct .ds-showcase-button { padding-inline: 6px; font-size: var(--showcase-small); }
.ds-showcase-offer__direct > :only-child { grid-column: 1 / -1; }
@container (max-width: 345px) {
  .ds-showcase-offer__direct { grid-template-columns: minmax(0, 1fr); }
  .ds-showcase-offer__actions .ds-showcase-offer__direct .ds-showcase-button { font-size: var(--showcase-text); }
}

/* Selo curto (vagas, anos da turma, em breve): sempre texto, nas cores da Codifica. */
.ds-showcase-pill { display: inline-flex; align-items: center; gap: var(--space-4); min-height: 28px; padding: 0 var(--space-12); border: var(--border-width) solid transparent; border-radius: var(--radius-pill); background: var(--showcase-surface-lilac); color: var(--showcase-violet); font-size: var(--showcase-small); font-weight: var(--font-weight-strong); line-height: 1; white-space: nowrap; }
.ds-showcase-pill--last { border-color: var(--showcase-scarce); background: var(--surface-card); color: var(--showcase-scarce); }
.ds-showcase-pill--muted { background: var(--surface-disabled); color: var(--showcase-text-soft); }

/* Etiquetas (atividade e nível do projeto, tipo de tela). */
.ds-showcase-tags { display: flex; flex-wrap: wrap; gap: var(--space-8); margin: 0; padding: 0; list-style: none; }
.ds-showcase-tag { display: inline-flex; align-items: center; padding: var(--space-4) var(--space-12); border-radius: var(--radius-pill); background: var(--showcase-surface-lilac); color: var(--showcase-violet); font-size: var(--showcase-small); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-small); }
.ds-showcase-tag--level { padding: 0 var(--space-8); border: var(--border-width) solid var(--showcase-line); background: transparent; color: var(--showcase-text-soft); font-weight: var(--showcase-weight-medium); }
.ds-showcase-tag--soft { border: var(--border-width) solid var(--showcase-line); background: var(--surface-card); color: var(--showcase-text-strong); font-weight: var(--showcase-weight-medium); }

/* Como funciona: três passos com o chevron, sobre o roxo; e o aviso da aula experimental. */
.ds-showcase-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-24); margin: 0; padding: 0; list-style: none; }
.ds-showcase-step { display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-32); border: var(--border-width) solid var(--showcase-line); border-radius: var(--showcase-radius); background: var(--surface-card); }
.ds-showcase-section--dark .ds-showcase-step { border-color: transparent; background: var(--showcase-on-dark-card); }
.ds-showcase-step__mark { display: flex; align-items: center; gap: 14px; }
.ds-showcase-step__mark::before { content: ''; flex: none; width: 34px; height: 40px; background: var(--showcase-bar); clip-path: polygon(0 0, 60% 0, 100% 50%, 60% 100%, 0 100%, 40% 50%); }
.ds-showcase-step__mark span { color: var(--showcase-violet); font-family: var(--font-identity); font-size: var(--showcase-step-number); font-weight: var(--font-weight-title); line-height: 1; }
.ds-showcase-section--dark .ds-showcase-step__mark span { color: var(--text-on-dark); }
.ds-showcase-step__number { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: var(--showcase-radius-sm); background: var(--showcase-surface-lilac); color: var(--showcase-violet); }
.ds-showcase-step__number svg { width: var(--icon-lg); height: var(--icon-lg); }
.ds-showcase-step__title { margin: 0; color: inherit; font-family: var(--font-identity); font-size: var(--showcase-title); font-weight: var(--font-weight-title); line-height: var(--showcase-line-title); }
.ds-showcase-step__text { margin: 0; color: var(--showcase-text-soft); font-size: var(--showcase-text); line-height: var(--showcase-line-text); }
.ds-showcase-section--dark .ds-showcase-step__text { color: var(--showcase-on-dark-soft); }
.ds-showcase-callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-16); margin-top: var(--space-24); padding: var(--space-20) var(--space-24); border-radius: var(--showcase-radius); background: var(--surface-card); color: var(--showcase-text-strong); }
.ds-showcase-callout p { margin: 0; font-size: var(--showcase-text); line-height: var(--showcase-line-text); }
.ds-showcase-callout strong { font-weight: var(--font-weight-strong); }
@media (max-width: 899px) { .ds-showcase-steps { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .ds-showcase-callout > .ds-showcase-button { width: 100%; } }

/* Projetos: o método em quatro passos e os projetos dos estudantes, com a atividade e o nível. */
.ds-showcase-method { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-16); margin: 0; padding: 0; list-style: none; }
.ds-showcase-method__item { display: flex; flex-direction: column; gap: 10px; padding: var(--space-24); border-radius: var(--showcase-radius); background: var(--surface-card); }
.ds-showcase-icon { flex: none; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: var(--showcase-radius-sm); background: var(--showcase-surface-lilac); color: var(--showcase-violet); }
.ds-showcase-icon svg { width: var(--icon-lg); height: var(--icon-lg); }
.ds-showcase-method__title { margin: 0; color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-lead); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-lead); }
.ds-showcase-method__text { margin: 0; color: var(--showcase-text-soft); font-size: var(--showcase-text); line-height: var(--showcase-line-text); }
.ds-showcase-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--space-24); margin: 0; padding: 0; list-style: none; }
.ds-showcase-project { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: var(--showcase-radius); background: var(--surface-card); }
.ds-showcase-project img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--showcase-surface-lilac); }
.ds-showcase-project__body { flex: 1; display: flex; flex-direction: column; gap: var(--space-8); padding: var(--space-20) var(--space-24) var(--space-24); }
.ds-showcase-project__name { margin: 0; color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-lead); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-lead); }
.ds-showcase-project__text { margin: 0; color: var(--showcase-text-soft); font-size: var(--showcase-text); line-height: var(--showcase-line-text); }
.ds-showcase-project__skills { margin: auto 0 0; padding-top: var(--space-12); border-top: var(--border-width) solid var(--showcase-line); color: var(--showcase-text-soft); font-size: var(--showcase-small); line-height: var(--showcase-line-small); }
.ds-showcase-project__skills strong { color: var(--showcase-text-strong); }
@media (max-width: 1100px) { .ds-showcase-method { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ds-showcase-method { grid-template-columns: minmax(0, 1fr); } }

/* Quem é a Codifica: texto ao lado de três fatos, sobre o meia-noite. */
.ds-showcase-about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: clamp(32px, 5vw, 64px); }
.ds-showcase-about .ds-showcase-section__head { margin-bottom: 0; }
.ds-showcase-facts { display: flex; flex-direction: column; gap: var(--space-16); margin: 0; padding: 0; list-style: none; }
.ds-showcase-fact { display: flex; align-items: flex-start; gap: var(--space-16); padding: var(--space-20) var(--space-24); border-radius: var(--showcase-radius); background: var(--showcase-on-dark-card-soft); }
.ds-showcase-fact .ds-showcase-icon { background: var(--showcase-violet); color: var(--text-on-dark); }
.ds-showcase-fact__title { margin: 0 0 var(--space-4); color: var(--text-on-dark); font-family: var(--font-identity); font-size: var(--showcase-lead); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-lead); }
.ds-showcase-fact__text { margin: 0; color: var(--showcase-on-dark-soft); font-size: var(--showcase-text); line-height: var(--showcase-line-text); }
@media (max-width: 899px) { .ds-showcase-about { grid-template-columns: minmax(0, 1fr); } }

/* Números da Codifica e frase do propósito (página Quem somos). */
.ds-showcase-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--space-16); margin: 0; padding: 0; list-style: none; }
.ds-showcase-stats li { display: grid; align-content: start; gap: var(--space-8); padding: clamp(20px, 3vw, 28px); border-radius: var(--showcase-radius); background: var(--surface-card); }
.ds-showcase-stats strong { color: var(--showcase-violet); font-family: var(--font-identity); font-size: var(--font-size-28); font-weight: var(--font-weight-title); line-height: 1.1; }
.ds-showcase-stats span { color: var(--showcase-text-soft); font-size: var(--showcase-text); line-height: var(--showcase-line-text); }
.ds-showcase-stats__note { margin: var(--space-12) 0 0; color: var(--showcase-text-soft); font-size: var(--showcase-small); }
.ds-showcase-quote { max-width: 820px; margin: var(--space-16) 0 0; color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-headline); font-weight: var(--font-weight-title); line-height: var(--showcase-line-headline); text-wrap: balance; }

/* Segurança digital por idade (página Quem somos). */
.ds-showcase-agebands { display: grid; gap: var(--space-12); margin: 0; padding: 0; list-style: none; }
.ds-showcase-agebands__group { display: grid; gap: var(--space-8); }
.ds-showcase-agebands__title { margin: 0; color: var(--showcase-violet); font-family: var(--font-identity); font-size: var(--showcase-small); font-weight: var(--font-weight-strong); letter-spacing: var(--showcase-tracking-kicker); text-transform: uppercase; }
.ds-showcase-agebands li { display: grid; grid-template-columns: minmax(120px, 240px) minmax(0, 1fr); align-items: center; gap: var(--space-8) var(--space-24); padding: var(--space-16) var(--space-20); border-radius: var(--showcase-radius-sm); background: var(--surface-card); }
.ds-showcase-agebands li strong { color: var(--showcase-text-strong); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-title); }
.ds-showcase-agebands li span { color: var(--showcase-text-soft); line-height: var(--showcase-line-text); }
@media (max-width: 639px) { .ds-showcase-agebands li { grid-template-columns: minmax(0, 1fr); } }

/* Dúvidas: as principais abertas uma a uma; "Ver todas as perguntas" mostra o resto, por tema. */
.ds-showcase-faq { display: flex; flex-direction: column; gap: var(--space-12); max-width: 860px; margin-inline: auto; }
.ds-showcase-faq details { border-radius: var(--showcase-radius-sm); background: var(--surface-card); }
.ds-showcase-faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); min-height: 64px; padding: var(--space-16) var(--space-24); border-radius: var(--showcase-radius-sm); color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-lead); font-weight: var(--font-weight-strong); line-height: 1.4; list-style: none; cursor: pointer; }
.ds-showcase-faq summary::-webkit-details-marker { display: none; }
.ds-showcase-faq summary::after { content: ''; flex: none; width: 10px; height: 10px; margin: 0 6px 4px; border-right: var(--border-width-strong) solid var(--showcase-violet); border-bottom: var(--border-width-strong) solid var(--showcase-violet); transform: rotate(45deg); transition: transform 0.2s ease; }
.ds-showcase-faq details[open] summary::after { margin-bottom: -4px; transform: rotate(225deg); }
.ds-showcase-faq summary:focus-visible { outline: 3px solid var(--showcase-focus); outline-offset: 2px; }
.ds-showcase-faq__answer { margin: 0; padding: 0 var(--space-24) var(--space-20); color: var(--showcase-text-soft); font-size: var(--showcase-text); line-height: var(--showcase-line-text); }
.ds-showcase-faq__group { display: flex; flex-direction: column; gap: var(--space-12); margin-top: var(--space-24); }
.ds-showcase-faq__title { margin: 0; color: var(--showcase-violet); font-family: var(--font-identity); font-size: var(--showcase-text); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-title); }
.ds-showcase-faq__more { display: flex; justify-content: center; margin-top: var(--space-24); }
@media (max-width: 600px) { .ds-showcase-faq summary { padding: var(--space-16) var(--space-20); font-size: var(--showcase-text); } }

/* Faixa final (roxo) e rodapé (meia-noite) em três colunas. */
.ds-showcase-band { position: relative; padding-block: clamp(48px, 6vw, 72px); background: var(--showcase-strong-bg); color: var(--text-on-dark); }
.ds-showcase-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-24); }
.ds-showcase-band__text { display: flex; flex-direction: column; gap: var(--space-8); max-width: 640px; }
.ds-showcase-band .ds-showcase-actions { margin-top: 0; }
@media (max-width: 600px) { .ds-showcase-band .ds-showcase-actions, .ds-showcase-band .ds-showcase-actions > .ds-showcase-button { width: 100%; } }
.ds-showcase-footer { padding-block: 56px var(--space-32); background: var(--showcase-midnight-deep); color: var(--showcase-on-dark-soft); font-size: var(--showcase-text); }
.ds-showcase-footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--showcase-space-40); }
.ds-showcase-footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-12); }
.ds-showcase-footer__brand p { margin: 0; }
.ds-showcase-footer__links { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-12); }
.ds-showcase-footer__links strong { margin-bottom: var(--space-4); color: var(--text-on-dark); font-family: var(--font-identity); font-size: var(--showcase-text); font-weight: var(--font-weight-strong); }
.ds-showcase-footer a { color: var(--showcase-on-dark-soft); text-decoration: none; overflow-wrap: anywhere; }
.ds-showcase-footer a:hover { color: var(--text-on-dark); text-decoration: underline; text-underline-offset: 3px; }
.ds-showcase-footer :focus-visible { outline: 3px solid var(--showcase-focus); outline-offset: 2px; }
.ds-showcase-footer__legal { margin: var(--showcase-space-40) 0 0; padding-top: var(--space-24); border-top: var(--border-width) solid var(--showcase-on-dark-line); font-size: var(--showcase-small); }
@media (max-width: 899px) {
  .ds-showcase-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-showcase-footer__grid > :first-child { grid-column: 1 / -1; }
  .ds-showcase--docked .ds-showcase-footer { padding-bottom: 104px; }
}
@media (max-width: 600px) { .ds-showcase-footer__grid { grid-template-columns: minmax(0, 1fr); } }

/* Atendimento no WhatsApp: pílula fixa no canto no computador; no celular e iPad, botão no topo, para não cobrir cartões e textos. */
.ds-showcase-whatsapp { position: fixed; z-index: var(--z-nav); right: var(--space-24); bottom: var(--space-24); display: inline-flex; align-items: center; gap: var(--space-8); min-height: var(--showcase-cta-height); padding: 0 var(--space-20); border: var(--border-width-strong) solid var(--text-on-dark); border-radius: var(--radius-pill); background: var(--brand-midnight); color: var(--text-on-dark); font-family: var(--font-identity); font-size: var(--font-size-15); font-weight: var(--font-weight-strong); text-decoration: none; }
.ds-showcase-whatsapp:hover { background: var(--showcase-cta); color: var(--text-on-dark); }
.ds-showcase-whatsapp:focus-visible { outline: 3px solid var(--showcase-focus); outline-offset: 2px; }
.ds-showcase-whatsapp svg { width: var(--icon-md); height: var(--icon-md); flex: none; }
/* Entrada da área da família, sempre no topo: pílula com texto quando cabe; só o ícone no celular e na página da escola, onde o nome da escola e os atalhos ocupam o topo. */
.ds-showcase-topbar__account { flex: none; display: inline-flex; align-items: center; gap: var(--space-8); min-height: 40px; padding: 0 var(--space-16); border: var(--border-width-strong) solid var(--showcase-on-dark-line); border-radius: var(--radius-pill); color: var(--text-on-dark); font-family: var(--font-identity); font-size: var(--font-size-15); font-weight: var(--font-weight-strong); text-decoration: none; white-space: nowrap; }
.ds-showcase-topbar__account:hover { background: var(--showcase-on-dark-card); color: var(--text-on-dark); }
.ds-showcase-topbar__account svg { width: var(--icon-md); height: var(--icon-md); }
@media (max-width: 1599px) {
  .ds-showcase-topbar__school ~ .ds-showcase-topbar__account { width: 40px; padding: 0; justify-content: center; }
  .ds-showcase-topbar__school ~ .ds-showcase-topbar__account > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 899px) {
  .ds-showcase-topbar__account { width: 40px; padding: 0; justify-content: center; margin-left: auto; }
  .ds-showcase-topbar__whatsapp + .ds-showcase-topbar__account { margin-left: 0; }
  .ds-showcase-topbar__account > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.ds-showcase-topbar__whatsapp { display: none; }
@media (max-width: 899px) {
  .ds-showcase-whatsapp { display: none; }
  .ds-showcase-topbar__whatsapp { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-8); min-height: 40px; padding: 0 var(--space-16); border: var(--border-width-strong) solid var(--showcase-on-dark-line); border-radius: var(--radius-pill); color: var(--text-on-dark); font-family: var(--font-identity); font-size: var(--font-size-15); font-weight: var(--font-weight-strong); text-decoration: none; white-space: nowrap; }
  .ds-showcase-topbar__whatsapp:hover { background: var(--showcase-on-dark-card); color: var(--text-on-dark); }
  .ds-showcase-topbar__whatsapp svg { width: var(--icon-md); height: var(--icon-md); }
}

/* Celular e iPad: Garantir a vaga e Aula experimental sempre à mão, no pé da tela. */
.ds-showcase-dock { display: none; }
@media (max-width: 899px) {
  .ds-showcase-dock { position: fixed; z-index: var(--z-nav); left: 0; right: 0; bottom: 0; display: flex; gap: var(--space-8); padding: var(--space-12) var(--space-16) calc(var(--space-12) + env(safe-area-inset-bottom)); border-top: var(--border-width) solid var(--showcase-line); background: var(--surface-card); }
  .ds-showcase-dock > .ds-showcase-button { flex: 1 1 0; padding-inline: var(--space-8); font-size: var(--font-size-15); white-space: nowrap; }
  .ds-showcase-dock[hidden] { display: none; }
}

/* Painel por cima da página: a atividade (largo) e os pedidos. Encostado à direita no computador, tela cheia no celular. */
.ds-showcase-sheet { position: fixed; inset: 0 0 0 auto; width: min(var(--showcase-sheet), 100%); max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--surface-card); color: var(--showcase-text-strong); overflow: hidden; }
.ds-showcase-sheet--wide { width: min(var(--showcase-sheet-wide), 100%); }
.ds-showcase-sheet[open] { display: flex; flex-direction: column; }
.ds-showcase-sheet::backdrop { background: var(--showcase-veil); }
.ds-showcase-sheet__head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-16); padding: var(--space-24); background: var(--showcase-surface-lilac); }
.ds-showcase-sheet__heading { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.ds-showcase-sheet__kicker { color: var(--showcase-violet); font-family: var(--font-identity); font-size: var(--showcase-small); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-small); letter-spacing: var(--showcase-tracking-kicker); text-transform: uppercase; }
.ds-showcase-sheet__title { margin: 0; color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-title); font-weight: var(--font-weight-title); line-height: var(--showcase-line-title); }
.ds-showcase-sheet__close { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-card); color: var(--showcase-text-strong); cursor: pointer; }
.ds-showcase-sheet__close svg { width: 22px; height: 22px; }
.ds-showcase-sheet__close:focus-visible { outline: 3px solid var(--showcase-focus); outline-offset: 2px; }
.ds-showcase-sheet__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: var(--space-24); padding: var(--space-24); }
.ds-showcase-sheet__body > * { flex: none; }
.ds-showcase-sheet__body p { margin: 0; }
.ds-showcase-sheet__foot { flex: none; display: flex; gap: var(--space-12); padding: var(--space-16) var(--space-24) calc(var(--space-24) + env(safe-area-inset-bottom)); border-top: var(--border-width) solid var(--showcase-line); background: var(--surface-card); }
.ds-showcase-sheet__foot > .ds-showcase-button { flex: 1 1 0; padding-inline: var(--space-12); }
@media (max-width: 600px) { .ds-showcase-sheet__foot > .ds-showcase-button { padding-inline: var(--space-8); font-size: var(--font-size-15); white-space: nowrap; } }

/* Conteúdo da atividade no painel: os textos do catálogo e as turmas da escola.
   Escala do painel: título da atividade (--showcase-title), título de bloco (--showcase-lead, com o chevron),
   texto (--showcase-text), apoio (--showcase-small). Espaços só de --space-*: 24 entre blocos, 12 dentro deles. */
.ds-showcase-info__photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--showcase-radius); background: var(--showcase-surface-lilac); }
.ds-showcase-info__intro { display: flex; flex-direction: column; gap: var(--space-12); }
.ds-showcase-info__pitch { color: var(--showcase-text-strong); font-size: var(--showcase-text); line-height: var(--showcase-line-text); }
.ds-showcase-info__block { display: flex; flex-direction: column; gap: var(--space-12); padding-top: var(--space-24); border-top: var(--border-width) solid var(--showcase-line); }
.ds-showcase-info__title { display: flex; align-items: center; gap: var(--space-8); margin: 0; color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-lead); font-weight: var(--font-weight-title); line-height: var(--showcase-line-title); }
.ds-showcase-info__title::before { content: ''; flex: none; width: var(--space-12); height: var(--space-16); background: var(--showcase-bar); clip-path: polygon(0 0, 60% 0, 100% 50%, 60% 100%, 0 100%, 40% 50%); }
.ds-showcase-info__lead { color: var(--showcase-text-soft); font-size: var(--showcase-small); line-height: var(--showcase-line-small); }
.ds-showcase-info__text { color: var(--showcase-text-soft); font-size: var(--showcase-text); line-height: var(--showcase-line-text); }
.ds-showcase-info__note { display: flex; align-items: flex-start; gap: var(--space-8); color: var(--showcase-text-soft); font-size: var(--showcase-small); line-height: var(--showcase-line-small); }
.ds-showcase-info__note svg { flex: none; width: var(--icon-sm); height: var(--icon-sm); margin-top: var(--space-4); color: var(--showcase-violet); }
/* Turmas: a caixa em destaque do painel, com o valor no topo e uma linha por turma (nome, dia e horário, vagas). */
.ds-showcase-info__classes { display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-20); border: var(--border-width-strong) solid var(--showcase-violet); border-radius: var(--showcase-radius); background: var(--showcase-surface-soft); }
.ds-showcase-info__classes-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-8) var(--space-16); }
.ds-showcase-info__price { margin: 0; color: var(--showcase-text-soft); font-size: var(--showcase-small); line-height: var(--showcase-line-small); }
.ds-showcase-info__class { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-8) var(--space-16); padding: var(--space-12) var(--space-16); border-radius: var(--showcase-radius-sm); background: var(--surface-card); color: var(--showcase-text-soft); font-size: var(--showcase-small); }
.ds-showcase-info__class-name { display: inline-flex; align-items: center; min-height: 28px; padding: 0 var(--space-12); border-radius: var(--radius-pill); background: var(--showcase-midnight); color: var(--text-on-dark); font-size: var(--showcase-small); font-weight: var(--font-weight-strong); white-space: nowrap; }
.ds-showcase-info__class-time { color: var(--showcase-text-strong); font-size: var(--showcase-text); font-weight: var(--font-weight-strong); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .ds-showcase-info__class { grid-template-columns: auto minmax(0, 1fr); } .ds-showcase-info__class > :last-child { grid-column: 1 / -1; } }
/* O que desenvolve: em destaque logo depois das turmas, um cartão por habilidade. */
.ds-showcase-info__skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--space-12); margin: 0; padding: 0; list-style: none; }
.ds-showcase-info__skills li { display: flex; align-items: center; gap: var(--space-12); padding: var(--space-12) var(--space-16); border-radius: var(--showcase-radius-sm); background: var(--showcase-surface-lilac); color: var(--showcase-text-strong); font-size: var(--showcase-text); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-title); }
.ds-showcase-info__skills .ds-showcase-icon { width: 40px; height: 40px; background: var(--surface-card); }
.ds-showcase-info__skills .ds-showcase-icon svg { width: var(--icon-md); height: var(--icon-md); }
.ds-showcase-info__level { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-16) var(--space-20); border: var(--border-width-strong) solid transparent; border-radius: var(--showcase-radius-sm); background: var(--showcase-surface-soft); }
.ds-showcase-info__band { color: var(--showcase-violet); font-size: var(--showcase-small); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-small); letter-spacing: var(--showcase-tracking-kicker); text-transform: uppercase; }
.ds-showcase-info__level strong { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); color: var(--showcase-text-strong); font-weight: var(--font-weight-strong); }
/* Exemplos de projetos: projetos reais das turmas (foto quando há), com nível e o que desenvolvem. */
.ds-showcase-info__projects { display: grid; gap: var(--space-12); margin: 0; padding: 0; list-style: none; }
.ds-showcase-info__project { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--space-16); padding: var(--space-12); border: var(--border-width) solid var(--showcase-line); border-radius: var(--showcase-radius-sm); }
.ds-showcase-info__project:not(:has(img)) { grid-template-columns: auto minmax(0, 1fr); padding: var(--space-16); }
/* Projeto sem foto: ícone pequeno ao lado do texto, nunca um quadro vazio do tamanho da foto. */
.ds-showcase-info__project:not(:has(img)) .ds-showcase-info__project-icon { width: auto; aspect-ratio: 1; padding: var(--space-12); }
.ds-showcase-info__project img { align-self: start; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-control); background: var(--showcase-surface-lilac); }
.ds-showcase-info__project-icon { display: grid; place-items: center; align-self: start; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius-control); background: var(--showcase-surface-lilac); color: var(--showcase-violet); }
.ds-showcase-info__project-icon svg { width: var(--icon-lg); height: var(--icon-lg); }
.ds-showcase-info__project-body { display: flex; flex-direction: column; gap: var(--space-8); }
.ds-showcase-info__project-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); }
.ds-showcase-info__project-head strong { color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-text); font-weight: var(--font-weight-title); }
.ds-showcase-info__more { display: flex; flex-direction: column; gap: var(--space-8); padding-top: var(--space-4); }
@media (max-width: 600px) { .ds-showcase-info__project { grid-template-columns: minmax(0, 1fr); } .ds-showcase-info__project img { aspect-ratio: 4 / 3; } .ds-showcase-info__project-icon { display: none; } }
/* Ferramentas: ícone pequeno e nome, em colunas equilibradas (o número de colunas vem da quantidade, sem item sozinho). */
.ds-showcase-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8); margin: 0; padding: 0; list-style: none; }
.ds-showcase-tools--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-showcase-tools--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ds-showcase-tools--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ds-showcase-tools li { display: flex; align-items: center; gap: var(--space-8); min-width: 0; padding: var(--space-8) var(--space-12); border: var(--border-width) solid var(--showcase-line); border-radius: var(--showcase-radius-sm); color: var(--showcase-text-strong); font-size: var(--showcase-small); line-height: var(--showcase-line-small); }
.ds-showcase-tools svg { flex: none; width: var(--icon-sm); height: var(--icon-sm); color: var(--showcase-violet); }
@media (max-width: 600px) {
  .ds-showcase-tools[class] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-showcase-tools li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
/* Segurança digital: caixa escura, para não passar despercebida. */
.ds-showcase-info__safety { display: flex; align-items: flex-start; gap: var(--space-16); padding: var(--space-20); border-radius: var(--showcase-radius); background: var(--showcase-midnight); color: var(--text-on-dark); }
.ds-showcase-info__safety .ds-showcase-icon { background: var(--showcase-violet); color: var(--text-on-dark); }
.ds-showcase-info__safety > div { display: flex; flex-direction: column; gap: var(--space-8); min-width: 0; }
.ds-showcase-info__safety .ds-showcase-info__title { color: var(--text-on-dark); }
.ds-showcase-info__safety .ds-showcase-info__text { color: var(--showcase-on-dark-soft); }
.ds-showcase-info__ages { display: grid; gap: var(--space-8); margin: var(--space-4) 0 0; padding: 0; list-style: none; }
.ds-showcase-info__ages li { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-12) var(--space-16); border-radius: var(--showcase-radius-sm); background: var(--showcase-on-dark-card); color: var(--showcase-on-dark-soft); font-size: var(--showcase-small); line-height: var(--showcase-line-small); }
.ds-showcase-info__ages strong { color: var(--text-on-dark); }
@media (max-width: 600px) { .ds-showcase-info__safety { flex-direction: column; } }
/* Dúvidas no painel: as mesmas perguntas abre-e-fecha da página, menores e com borda. */
.ds-showcase-faq--compact { gap: var(--space-8); max-width: none; margin: 0; }
.ds-showcase-faq--compact details { border: var(--border-width) solid var(--showcase-line); }
.ds-showcase-faq--compact summary { min-height: 52px; padding: var(--space-12) var(--space-16); font-size: var(--showcase-text); }
.ds-showcase-faq--compact .ds-showcase-faq__answer { padding: 0 var(--space-16) var(--space-16); font-size: var(--showcase-text); }

/* Pedidos dentro do painel: etapas, escolhas grandes, boas de tocar, resumo e resultado. */
.ds-showcase-panel { display: grid; gap: var(--space-20); min-width: 0; }
.ds-showcase-panel > * { min-width: 0; }
.ds-showcase-panel:focus { outline: none; }
.ds-showcase-panel__title { margin: 0; color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-lead); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-lead); }
.ds-showcase-progress { display: grid; grid-template-columns: repeat(var(--showcase-steps), minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.ds-showcase-progress li { display: grid; gap: var(--space-8); color: var(--showcase-text-soft); font-size: var(--showcase-small); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-small); }
.ds-showcase-progress li::before { content: ''; height: 6px; border-radius: var(--radius-pill); background: var(--showcase-line); }
.ds-showcase-progress li.is-done, .ds-showcase-progress li[aria-current='step'] { color: var(--showcase-text-strong); }
.ds-showcase-progress li.is-done::before, .ds-showcase-progress li[aria-current='step']::before { background: var(--showcase-violet); }
.ds-showcase-question { display: grid; gap: var(--space-12); }
.ds-showcase-legend { display: block; margin-bottom: var(--space-12); color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-lead); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-lead); }
.ds-showcase-question__title { color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-lead); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-lead); }
.ds-showcase-question__help { color: var(--showcase-text-soft); font-size: var(--showcase-small); line-height: var(--showcase-line-small); }
.ds-showcase-choices { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
.ds-showcase-choice { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; column-gap: var(--space-16); row-gap: 2px; width: 100%; min-height: 56px; padding: var(--space-16) var(--space-20); border: var(--border-width-strong) solid var(--showcase-line); border-radius: var(--showcase-radius-sm); background: var(--surface-card); color: var(--showcase-text-strong); text-align: left; cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease; }
.ds-showcase-choice::before { content: ''; grid-row: 1 / span 2; width: 22px; height: 22px; box-sizing: border-box; border: var(--border-width-strong) solid var(--showcase-violet); border-radius: 50%; background: var(--surface-card); }
.ds-showcase-choice > * { grid-column: 2; }
.ds-showcase-choice:hover { border-color: var(--showcase-violet); }
.ds-showcase-choice[aria-pressed='true'] { border-color: var(--showcase-violet); background: var(--showcase-surface-soft); }
.ds-showcase-choice[aria-pressed='true']::before { background: var(--showcase-violet); box-shadow: inset 0 0 0 4px var(--surface-card); }
.ds-showcase-choice strong { font-size: var(--showcase-text); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-title); }
.ds-showcase-choice span { color: var(--showcase-text-soft); font-size: var(--showcase-small); line-height: var(--showcase-line-small); }
.ds-showcase-choice:disabled { border-color: var(--showcase-line); background: var(--surface-disabled); color: var(--text-disabled); cursor: not-allowed; }
.ds-showcase-choice--chip { display: inline-flex; align-items: center; justify-content: center; width: auto; min-height: 44px; padding: 0 var(--space-20); border-color: var(--showcase-violet); border-radius: var(--radius-pill); color: var(--showcase-violet); }
.ds-showcase-choice--chip::before { display: none; }
.ds-showcase-choice--chip strong { font-family: var(--font-identity); font-size: var(--font-size-15); }
.ds-showcase-choice--chip[aria-pressed='true'] { background: var(--showcase-violet); color: var(--text-on-dark); }
.ds-showcase-choice--compact { min-height: 36px; padding: 0 var(--space-16); }
.ds-showcase-choice--compact strong { font-size: var(--showcase-small); }
/* Escala de nota (0 a 10): botões iguais que dividem a linha, sem folga lateral para caber no celular. */
.ds-showcase-choice--score { width: 100%; padding: 0; }
.ds-showcase-choice:focus-visible { outline: 3px solid var(--showcase-focus); outline-offset: 2px; }
.ds-showcase-day__label { color: var(--showcase-text-soft); font-size: var(--showcase-small); font-weight: var(--font-weight-strong); }
.ds-showcase-slots { display: flex; flex-wrap: wrap; gap: var(--space-8); }
/* Horários da aula experimental: uma caixa por turma (nome e horário fixo no topo) e as datas embaixo. */
.ds-showcase-turma { display: grid; gap: var(--space-12); padding: var(--space-16) var(--space-20) var(--space-20); border: var(--border-width) solid var(--showcase-line); border-radius: var(--showcase-radius); background: var(--showcase-surface-soft); }
.ds-showcase-turma__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-12); padding-bottom: var(--space-12); border-bottom: var(--border-width) solid var(--showcase-line); }
.ds-showcase-turma__name { display: inline-flex; align-items: center; min-height: 28px; padding: 0 var(--space-12); border-radius: var(--radius-pill); background: var(--showcase-midnight); color: var(--text-on-dark); font-size: var(--showcase-small); font-weight: var(--font-weight-strong); white-space: nowrap; }
.ds-showcase-turma__time { color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-text); font-weight: var(--font-weight-title); font-variant-numeric: tabular-nums; }
.ds-showcase-dates { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: var(--space-8); }
.ds-showcase-date { display: grid; gap: var(--space-4); min-height: 48px; padding: var(--space-8) var(--space-12); border: var(--border-width-strong) solid var(--showcase-line); border-radius: var(--showcase-radius-sm); background: var(--surface-card); color: var(--showcase-text-strong); text-align: left; font-variant-numeric: tabular-nums; cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease; }
.ds-showcase-date strong { font-size: var(--font-size-15); font-weight: var(--font-weight-strong); }
.ds-showcase-date span { color: var(--showcase-text-soft); font-size: var(--showcase-small); }
.ds-showcase-date:hover { border-color: var(--showcase-violet); }
.ds-showcase-date[aria-pressed='true'] { border-color: var(--showcase-violet); background: var(--showcase-violet); color: var(--text-on-dark); }
.ds-showcase-date[aria-pressed='true'] span { color: var(--showcase-on-dark-soft); }
.ds-showcase-date:focus-visible, .ds-showcase-back:focus-visible { outline: 3px solid var(--showcase-focus); outline-offset: 2px; }
/* Voltar: link discreto no rodapé, nunca com a forma das escolhas. */
.ds-showcase-back { display: inline-flex; align-items: center; gap: var(--space-8); min-height: 44px; padding: 0 var(--space-4); border-radius: var(--radius-control); color: var(--showcase-text-soft); font-family: var(--font-identity); font-size: var(--font-size-15); font-weight: var(--font-weight-strong); cursor: pointer; }
.ds-showcase-back svg { width: var(--icon-md); height: var(--icon-md); }
.ds-showcase-back:hover { color: var(--showcase-violet); }
.ds-showcase-summary { display: grid; gap: var(--space-8); margin: 0; padding: var(--space-20); border-radius: var(--showcase-radius-sm); background: var(--showcase-surface-soft); }
.ds-showcase-summary dt { color: var(--showcase-text-soft); font-size: var(--showcase-small); font-weight: var(--font-weight-strong); }
.ds-showcase-summary dd { margin: 0 0 var(--space-4); color: var(--showcase-text-strong); font-size: var(--showcase-text); font-weight: var(--font-weight-regular); }
/* Nota sob um valor do Resumo (cobrança recorrente e vencimento): letra menor, sem destaque. */
.ds-showcase-summary__note { display: block; margin-top: var(--space-4); color: var(--showcase-text-soft); font-size: var(--showcase-small); line-height: var(--showcase-line-small); }
.ds-showcase-consent { display: grid; margin: 0; padding: 0; border: var(--border-width) solid var(--showcase-line); border-radius: var(--showcase-radius-sm); list-style: none; }
.ds-showcase-consent > li + li { border-top: var(--border-width) solid var(--showcase-line); }
.ds-showcase-consent__item { display: grid; gap: var(--space-8); margin: 0; padding: var(--space-16); border: 0; min-width: 0; }
.ds-showcase-consent__text { display: grid; gap: var(--space-4); }
.ds-showcase-consent__text strong { color: var(--showcase-text-strong); font-size: var(--showcase-text); font-weight: var(--font-weight-strong); line-height: var(--showcase-line-title); }
.ds-showcase-consent__text span { color: var(--showcase-text-soft); font-size: var(--showcase-small); line-height: var(--showcase-line-small); }
.ds-showcase-consent__options { display: flex; flex-wrap: wrap; gap: var(--space-8) var(--space-24); }
/* Declarações do formulário (aviso de privacidade, termo, responsável legal): letra menor, como nota. */
.ds-check--fine { color: var(--showcase-text-soft); font-size: var(--showcase-small); line-height: var(--showcase-line-small); }
/* Controle segmentado: duas opções lado a lado, discreto; a escolhida ganha fundo lilás. */
.ds-showcase-panel__footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-12); margin-top: var(--space-8); padding-top: var(--space-16); border-top: var(--border-width) solid var(--showcase-line); }
.ds-showcase-result { display: grid; justify-items: center; gap: var(--space-16); padding: var(--space-32) var(--space-8); text-align: center; }
.ds-showcase-result__icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--showcase-surface-lilac); color: var(--showcase-violet); }
.ds-showcase-result__icon--info { background: var(--showcase-surface-soft); }
.ds-showcase-result__icon svg { width: 36px; height: 36px; }
.ds-showcase-result__title { margin: 0; color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-title); font-weight: var(--font-weight-title); line-height: var(--showcase-line-title); text-wrap: balance; }
.ds-showcase-result p { max-width: 52ch; color: var(--showcase-text-soft); }
.ds-showcase-result .ds-showcase-actions { justify-content: center; margin-top: var(--space-8); }

/* Leitura longa (aviso de privacidade, termo, autorização) dentro da vitrine. */
.ds-showcase-document { max-width: 880px; margin-inline: auto; padding: clamp(24px, 5vw, 56px); border-radius: var(--showcase-radius); background: var(--surface-card); }
.ds-showcase-document h2 { margin: var(--space-32) 0 var(--space-12); color: var(--showcase-text-strong); }
.ds-showcase-document h2:first-child { margin-top: 0; }
.ds-showcase-document h3 { margin: var(--space-24) 0 var(--space-8); color: var(--showcase-violet); }
.ds-showcase-document p, .ds-showcase-document li { margin: 0 0 var(--space-12); color: var(--text-primary); overflow-wrap: break-word; }
.ds-showcase-document ul { margin: 0 0 var(--space-16); padding-left: var(--space-24); list-style: disc; }
.ds-showcase-document table { width: 100%; margin: 0 0 var(--space-16); font-size: var(--font-size-13); }
.ds-showcase-document th, .ds-showcase-document td { padding: var(--space-8) var(--space-12); border: var(--border-width) solid var(--showcase-line); text-align: left; vertical-align: top; }

@media (prefers-reduced-motion: reduce) {
  .ds-showcase-button, .ds-showcase-choice, .ds-showcase-date, .ds-showcase-faq summary::after { transition: none; }
}

/* ---------- Quadro semanal (Grade, agenda do professor) ---------- */
.ds-week { min-width: 0; }
.ds-week__board { display: grid; column-gap: var(--space-8); row-gap: var(--space-8); align-items: start; min-width: 0; }
.ds-week__head { display: grid; gap: var(--space-4); align-content: start; min-width: 0; padding-bottom: var(--space-8); border-bottom: var(--border-width) solid var(--border-subtle); color: var(--text-brand); font-size: var(--font-size-15); line-height: var(--line-height-title); }
.ds-week__head > span:not(.ds-week__notes) { color: var(--text-secondary); font-size: var(--font-size-13); font-weight: var(--font-weight-regular); }
.ds-week__notes { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.ds-week__gutter { position: relative; align-self: stretch; }
.ds-week__hour { position: absolute; right: 0; transform: translateY(-50%); color: var(--text-muted); font-size: var(--font-size-12); font-variant-numeric: tabular-nums; }
.ds-week__day { position: relative; min-width: 0; border-radius: var(--radius-control); background: var(--surface-section); }
.ds-week__rule { position: absolute; left: 0; right: 0; border-top: var(--border-width) solid var(--border-subtle); }
.ds-week__band { position: absolute; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: flex-end; padding-inline: var(--space-4); overflow: hidden; color: var(--text-muted); font-size: var(--font-size-12); }
.ds-week__band--class { background: var(--surface-card); border-block: var(--border-width) dashed var(--border-subtle); }
.ds-week__band--break { background: var(--surface-disabled); }
.ds-week__item { position: absolute; display: grid; align-content: start; gap: 2px; min-width: 0; padding: var(--space-4) var(--space-8); overflow: hidden; border: var(--border-width) solid var(--tone-border); border-left-width: 4px; border-radius: var(--radius-control); background: var(--tone-bg); color: var(--tone-text); font-family: var(--font-operational); font-size: var(--font-size-13); line-height: var(--line-height-title); text-align: left; cursor: default; }
button.ds-week__item { cursor: pointer; }
button.ds-week__item:hover { border-color: var(--border-strong); }
button.ds-week__item:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 2px; z-index: 1; }
.ds-week__item--success { --tone-bg: var(--status-success-bg); --tone-border: var(--status-success-border); --tone-text: var(--status-success-text); }
.ds-week__item--warning { --tone-bg: var(--status-warning-bg); --tone-border: var(--status-warning-border); --tone-text: var(--status-warning-text); }
.ds-week__item--info { --tone-bg: var(--status-info-bg); --tone-border: var(--status-info-border); --tone-text: var(--status-info-text); }
.ds-week__item--neutral { --tone-bg: var(--status-neutral-bg); --tone-border: var(--status-neutral-border); --tone-text: var(--status-neutral-text); }
.ds-week__item--danger { --tone-bg: var(--status-danger-bg); --tone-border: var(--status-danger-border); --tone-text: var(--status-danger-text); }
.ds-week__item--draft { border-style: dashed; border-left-style: solid; }
.ds-week__time { font-size: var(--font-size-12); font-weight: var(--font-weight-strong); font-variant-numeric: tabular-nums; }
.ds-week__title { color: var(--text-primary); font-weight: var(--font-weight-strong); overflow-wrap: anywhere; }
.ds-week__line { color: var(--text-secondary); overflow-wrap: anywhere; }
.ds-week__agenda { display: none; gap: var(--space-12); }
.ds-week__agenda-day { display: grid; gap: var(--space-8); }
.ds-week__agenda-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); margin: 0; color: var(--text-secondary); font-size: var(--font-size-13); }
.ds-week__item--list { position: static; width: 100%; padding: var(--space-8) var(--space-12); font-size: var(--font-size-15); }
@media (max-width: 719px) {
  .ds-week__board { display: none; }
  .ds-week__agenda { display: grid; }
  .ds-week__agenda .ds-tabs { overflow-x: auto; }
}

/* ---------- Calendário do mês (Calendário escolar) ---------- */
.ds-month { display: grid; gap: var(--space-12); min-width: 0; }
.ds-month__nav { display: flex; align-items: center; gap: var(--space-8); }
.ds-month__title { color: var(--text-brand); font-family: var(--font-identity); font-size: var(--font-size-20); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-month__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: var(--border-width) solid var(--border-subtle); border-left: var(--border-width) solid var(--border-subtle); }
.ds-month__weekday { padding: var(--space-8); border-right: var(--border-width) solid var(--border-subtle); border-bottom: var(--border-width) solid var(--border-subtle); background: var(--surface-section); color: var(--text-secondary); font-size: var(--font-size-13); font-weight: var(--font-weight-strong); }
.ds-month__day { display: grid; align-content: start; gap: var(--space-4); min-width: 0; min-height: 104px; padding: var(--space-4); border-right: var(--border-width) solid var(--border-subtle); border-bottom: var(--border-width) solid var(--border-subtle); background: var(--surface-card); }
.ds-month__day--outside { background: var(--surface-section); }
.ds-month__day--outside .ds-month__number { color: var(--text-disabled); }
.ds-month__number { justify-self: start; min-width: var(--space-24); padding-inline: var(--space-4); border-radius: var(--radius-pill); color: var(--text-secondary); font-size: var(--font-size-13); font-weight: var(--font-weight-strong); text-align: center; font-variant-numeric: tabular-nums; }
.ds-month__day--today .ds-month__number { background: var(--action-primary); color: var(--action-primary-text); }
.ds-month__entry { display: block; min-width: 0; padding: 2px var(--space-4); overflow: hidden; border: var(--border-width) solid var(--tone-border); border-radius: var(--radius-control); background: var(--tone-bg); color: var(--tone-text); font-family: var(--font-operational); font-size: var(--font-size-12); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); text-align: left; text-overflow: ellipsis; white-space: nowrap; }
button.ds-month__entry { cursor: pointer; }
button.ds-month__entry:hover { border-color: var(--border-strong); }
button.ds-month__entry:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 1px; }
.ds-month__entry--success { --tone-bg: var(--status-success-bg); --tone-border: var(--status-success-border); --tone-text: var(--status-success-text); }
.ds-month__entry--warning { --tone-bg: var(--status-warning-bg); --tone-border: var(--status-warning-border); --tone-text: var(--status-warning-text); }
.ds-month__entry--info { --tone-bg: var(--status-info-bg); --tone-border: var(--status-info-border); --tone-text: var(--status-info-text); }
.ds-month__entry--neutral { --tone-bg: var(--status-neutral-bg); --tone-border: var(--status-neutral-border); --tone-text: var(--status-neutral-text); }
.ds-month__entry--danger { --tone-bg: var(--status-danger-bg); --tone-border: var(--status-danger-border); --tone-text: var(--status-danger-text); }
.ds-month__entry--muted { opacity: 0.6; text-decoration: line-through; }
.ds-month__more { color: var(--text-secondary); font-size: var(--font-size-12); font-weight: var(--font-weight-strong); }
.ds-month__list { display: none; margin: 0; padding: 0; list-style: none; }
.ds-month__list > li { display: grid; gap: var(--space-4); padding-block: var(--space-8); border-bottom: var(--border-width) solid var(--border-subtle); }
.ds-month__list-day { color: var(--text-brand); font-size: var(--font-size-13); font-weight: var(--font-weight-strong); }
.ds-month__list-entries { display: grid; gap: var(--space-4); }
.ds-month__list .ds-month__entry { white-space: normal; font-size: var(--font-size-13); }
@media (max-width: 719px) {
  .ds-month__grid { display: none; }
  .ds-month__list { display: grid; }
}

/* Quadro semanal: seleção, dia sem aula, marca de troca de escola e clique no espaço livre. */
.ds-week__head { position: relative; }
.ds-week__add { position: absolute; top: 0; right: 0; }
.ds-week__day--pickable { cursor: copy; }
.ds-week__day--pickable .ds-week__band--class:hover { background: var(--surface-hover); }
.ds-week__item.is-selected { border-color: var(--selection-border); outline: var(--focus-ring-width) solid var(--selection-border); outline-offset: 1px; z-index: 1; }
.ds-week__item--struck { opacity: 0.6; }
.ds-week__item--struck .ds-week__title { text-decoration: line-through; }
.ds-week__marker { position: absolute; left: 0; right: 0; z-index: 1; border-top: var(--border-width-strong) dashed var(--tone-border); pointer-events: none; }
.ds-week__marker > span { position: absolute; right: var(--space-4); transform: translateY(-50%); padding: 0 var(--space-4); border-radius: var(--radius-pill); background: var(--tone-bg); color: var(--tone-text); font-size: var(--font-size-12); font-weight: var(--font-weight-strong); white-space: nowrap; margin-top: var(--space-4); }
.ds-week__marker--warning, .ds-dayline__marker--warning { --tone-bg: var(--status-warning-bg); --tone-border: var(--status-warning-border); --tone-text: var(--status-warning-text); }
.ds-week__marker--danger, .ds-dayline__marker--danger { --tone-bg: var(--status-danger-bg); --tone-border: var(--status-danger-border); --tone-text: var(--status-danger-text); }
.ds-week__marker--info, .ds-dayline__marker--info { --tone-bg: var(--status-info-bg); --tone-border: var(--status-info-border); --tone-text: var(--status-info-text); }
.ds-week__marker-line { height: auto; min-height: var(--tag-height); max-width: 100%; margin: 0; padding-block: 2px; justify-self: start; border-radius: var(--radius-control); line-height: var(--line-height-title); white-space: normal; }

/* ---------- Indicadores ---------- */
/* (1.7) Indicadores pequenos: número e nome na mesma linha, fundo claro na cor da situação (ou da área, quando neutro), sem texto de apoio. */
.ds-indicators { display: flex; flex-wrap: wrap; gap: var(--space-8); margin: 0; padding: 0; list-style: none; }
.ds-indicators > li { display: flex; min-width: 0; }
.ds-indicator { position: relative; display: inline-flex; align-items: baseline; gap: var(--space-8); min-width: 0; min-height: var(--control-height); padding: var(--space-8) var(--space-16); border: var(--border-width) solid var(--tone-border); border-radius: var(--radius-control); background: var(--tone-bg); color: var(--tone-text); text-align: left; font: inherit; }
button.ds-indicator { cursor: pointer; }
button.ds-indicator:hover { border-color: var(--tone-text); }
button.ds-indicator:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 2px; }
.ds-indicator.is-selected { border-color: var(--selection-border); box-shadow: inset 0 0 0 1px var(--selection-border); }
/* (1.12) Número sem situação em tinta escura; a cor da área fica só na borda (terracota do Comercial parecia atraso). */
.ds-indicator--neutral, .ds-indicator--lilac { --tone-bg: var(--surface-section); --tone-border: var(--area-border); --tone-text: var(--text-brand); border-left: var(--hub-stripe-width) solid var(--area); }
.ds-indicator--success { --tone-bg: var(--status-success-bg); --tone-border: var(--status-success-border); --tone-text: var(--status-success-text); }
.ds-indicator--warning { --tone-bg: var(--status-warning-bg); --tone-border: var(--status-warning-border); --tone-text: var(--status-warning-text); }
.ds-indicator--danger { --tone-bg: var(--status-danger-bg); --tone-border: var(--status-danger-border); --tone-text: var(--status-danger-text); }
.ds-indicator--info { --tone-bg: var(--status-info-bg); --tone-border: var(--status-info-border); --tone-text: var(--status-info-text); }
.ds-indicator__value { color: var(--tone-text); font-family: var(--font-identity); font-size: var(--font-size-20); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); font-variant-numeric: tabular-nums; }
.ds-indicator__label { color: var(--text-primary); font-size: var(--font-size-13); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-indicator__hint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.ds-indicators--wide .ds-indicator__value { overflow-wrap: anywhere; }
/* (1.7) No celular os indicadores ficam numa faixa só, que rola de lado, e menores. */
@media (max-width: 639px) {
  .ds-indicators:not(.ds-indicators--wide) { flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--space-4); scrollbar-width: thin; }
  .ds-indicators:not(.ds-indicators--wide) > li { flex: none; }
  .ds-indicator { min-height: var(--control-height-compact); padding: var(--space-4) var(--space-12); }
  .ds-indicator__value { font-size: var(--font-size-16); }
}

/* ---------- Medidor ---------- */
.ds-meter { display: grid; gap: var(--space-4); min-width: 0; }
.ds-meter__track { display: block; height: var(--space-8); overflow: hidden; border-radius: var(--radius-pill); background: var(--surface-section); }
.ds-meter__bar { display: block; width: var(--meter-size, 0%); height: 100%; border-radius: var(--radius-pill); background: var(--tone-border); }
.ds-meter__label { color: var(--text-secondary); font-size: var(--font-size-13); font-variant-numeric: tabular-nums; }
.ds-meter--neutral { --tone-border: var(--status-neutral-border); }
.ds-meter--success { --tone-border: var(--status-success-border); }
.ds-meter--warning { --tone-border: var(--status-warning-border); }
.ds-meter--danger { --tone-border: var(--status-danger-border); }
.ds-meter--info { --tone-border: var(--status-info-border); }
.ds-meter--lilac { --tone-border: var(--category-independent-border); }
/* Num cartão colorido, a trilha da barra fica branca para a parte vazia aparecer. */
.ds-tone-card .ds-meter__track { background: var(--surface-card); }

/* ---------- Linha do dia ---------- */
.ds-dayline { min-width: 0; overflow-x: auto; }
.ds-dayline__board { --label-size: calc(4 * var(--space-48)); display: grid; grid-template-columns: var(--label-size) minmax(0, 1fr); row-gap: var(--space-8); column-gap: var(--space-12); min-width: calc(var(--label-size) + var(--space-12) + var(--hours) * 1.5 * var(--space-48)); }
@media (max-width: 1023px) { .ds-dayline__board { --label-size: calc(3 * var(--space-48)); } }
.ds-dayline__gap { position: absolute; top: 0; bottom: 0; border-inline: var(--border-width) dashed var(--border-strong); background: var(--surface-page); }
.ds-dayline__scale { position: relative; height: var(--space-20); border-bottom: var(--border-width) solid var(--border-subtle); }
.ds-dayline__hour { position: absolute; bottom: var(--space-4); transform: translateX(-50%); color: var(--text-muted); font-size: var(--font-size-12); font-variant-numeric: tabular-nums; }
.ds-dayline__hour--end { transform: translateX(-100%); }
.ds-dayline__row { display: contents; }
.ds-dayline__label { display: grid; align-content: start; gap: 2px; min-width: 0; padding-top: var(--space-4); color: var(--text-primary); font-size: var(--font-size-15); line-height: var(--line-height-title); overflow-wrap: anywhere; }
.ds-dayline__label > span { color: var(--text-secondary); font-size: var(--font-size-13); }
.ds-dayline__track { position: relative; min-width: 0; overflow: hidden; height: calc(var(--lanes, 1) * var(--lane-size) + var(--space-8)); border-radius: var(--radius-control); background: var(--surface-section); }
.ds-dayline__rule { position: absolute; top: 0; bottom: 0; border-left: var(--border-width) solid var(--border-subtle); }
.ds-dayline__now { position: absolute; top: 0; bottom: 0; z-index: 2; border-left: var(--border-width-strong) solid var(--action-accent); pointer-events: none; }
.ds-dayline__item { position: absolute; top: calc(var(--lane, 0) * var(--lane-size) + var(--space-4)); height: calc(var(--lane-size) - var(--space-4)); display: grid; align-content: start; gap: 2px; min-width: 0; padding: var(--space-4) var(--space-8); overflow: hidden; border: var(--border-width) solid var(--tone-border); border-left-width: 4px; border-radius: var(--radius-control); background: var(--tone-bg); color: var(--tone-text); font-family: var(--font-operational); font-size: var(--font-size-12); line-height: var(--line-height-title); text-align: left; }
button.ds-dayline__item { cursor: pointer; }
button.ds-dayline__item:hover { border-color: var(--border-strong); z-index: 1; }
button.ds-dayline__item:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 2px; z-index: 1; }
.ds-dayline__item .ds-week__time, .ds-dayline__item .ds-week__title, .ds-dayline__item .ds-week__line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-dayline__board .ds-dayline__item { container-type: inline-size; }
@container (max-width: 76px) { .ds-dayline__end { display: none; } }
.ds-dayline__item--draft { border-style: dashed; border-left-style: solid; }
.ds-dayline__item--struck { opacity: 0.6; }
.ds-dayline__item--struck .ds-week__title { text-decoration: line-through; }
.ds-dayline__item.is-selected { outline: var(--focus-ring-width) solid var(--selection-border); outline-offset: 1px; z-index: 1; }
.ds-dayline__marker { position: absolute; top: 0; bottom: 0; z-index: 2; border-left: var(--border-width-strong) dashed var(--tone-border); }
.ds-dayline__marker > span { position: absolute; bottom: 0; left: var(--space-4); padding: 0 var(--space-4); border-radius: var(--radius-pill); background: var(--tone-bg); color: var(--tone-text); font-size: var(--font-size-12); font-weight: var(--font-weight-strong); white-space: nowrap; }
.ds-dayline__list { display: none; grid-template-columns: minmax(0, 1fr); gap: var(--space-16); }
.ds-dayline__group { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); }
.ds-dayline__note { justify-self: start; height: auto; min-height: var(--tag-height); max-width: 100%; margin: 0; padding-block: 2px; border-radius: var(--radius-control); line-height: var(--line-height-title); white-space: normal; }
.ds-dayline__group-head { display: grid; gap: 2px; margin: 0; color: var(--text-brand); font-size: var(--font-size-15); }
.ds-dayline__group-head > span { color: var(--text-secondary); font-size: var(--font-size-13); }
.ds-dayline__item--list { position: static; height: auto; width: 100%; padding: var(--space-8) var(--space-12); font-size: var(--font-size-15); }
.ds-dayline__item--list .ds-week__time, .ds-dayline__item--list .ds-week__title, .ds-dayline__item--list .ds-week__line { white-space: normal; }
@media (max-width: 719px) {
  .ds-dayline__board { display: none; }
  .ds-dayline__list { display: grid; }
}

/* ---------- Calendário do ano ---------- */
.ds-year { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(5 * var(--space-48)), 1fr)); gap: var(--space-16); min-width: 0; }
.ds-year__month { display: grid; align-content: start; gap: var(--space-8); min-width: 0; padding: var(--space-12); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card); background: var(--surface-card); }
.ds-year__title { margin: 0; color: var(--text-brand); font-family: var(--font-identity); font-size: var(--font-size-15); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-year__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.ds-year__weekday { color: var(--text-muted); font-size: var(--font-size-12); text-align: center; }
.ds-year__day { position: relative; display: grid; place-items: center; min-width: 0; aspect-ratio: 1; padding: 0; border: var(--border-width) solid transparent; border-radius: var(--radius-control); background: transparent; color: var(--text-primary); font-family: var(--font-operational); font-size: var(--font-size-12); font-variant-numeric: tabular-nums; }
button.ds-year__day { cursor: pointer; }
button.ds-year__day:hover { border-color: var(--border-strong); }
button.ds-year__day:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 1px; z-index: 1; }
.ds-year__day--weekend { color: var(--text-muted); }
.ds-year__day--band0 { box-shadow: inset 0 calc(-1 * var(--border-width-strong)) 0 var(--brand-blue-tech); }
.ds-year__day--band1 { box-shadow: inset 0 calc(-1 * var(--border-width-strong)) 0 var(--brand-violet); }
.ds-year__day--success, .ds-year__day--warning, .ds-year__day--danger, .ds-year__day--info, .ds-year__day--neutral { border-color: var(--tone-border); background: var(--tone-bg); color: var(--tone-text); font-weight: var(--font-weight-strong); }
.ds-year__day--success { --tone-bg: var(--status-success-bg); --tone-border: var(--status-success-border); --tone-text: var(--status-success-text); }
.ds-year__day--warning { --tone-bg: var(--status-warning-bg); --tone-border: var(--status-warning-border); --tone-text: var(--status-warning-text); }
.ds-year__day--danger { --tone-bg: var(--status-danger-bg); --tone-border: var(--status-danger-border); --tone-text: var(--status-danger-text); }
.ds-year__day--info { --tone-bg: var(--status-info-bg); --tone-border: var(--status-info-border); --tone-text: var(--status-info-text); }
.ds-year__day--neutral { --tone-bg: var(--status-neutral-bg); --tone-border: var(--status-neutral-border); --tone-text: var(--status-neutral-text); }
.ds-year__day--today { outline: var(--focus-ring-width) solid var(--action-primary); outline-offset: -1px; }
.ds-year__day.is-selected { background: var(--action-primary); border-color: var(--action-primary); color: var(--action-primary-text); }
.ds-year__bands { margin: 0; color: var(--text-secondary); font-size: var(--font-size-12); line-height: var(--line-height-title); }


/* ---------- §6.3 Ficha: identificação no topo em card preenchido. Destaques (1.6): o mesmo par pergunta/resposta,
   com a pergunta em cima, 15/600, e a resposta 15/400 — nunca maior que a pergunta. ---------- */
/* (1.7) Topo da ficha: cartão no tom da área, com faixa na cor da área; os dados em destaque são blocos brancos separados. */
.ds-record-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-16) var(--space-24); padding: var(--space-20); border: var(--border-width) solid var(--area-border); border-top: var(--row-edge-width) solid var(--area); border-radius: var(--radius-card); background: var(--surface-section); color: var(--text-primary); }
.ds-record-summary__identity { display: grid; gap: var(--space-8); min-width: 0; align-content: start; }
.ds-record-summary--media { grid-template-columns: auto minmax(0, 1fr) auto; }
.ds-record-summary__media { display: grid; align-content: start; }
.ds-record-summary__identity h1 { margin: 0; color: var(--text-brand); overflow-wrap: anywhere; }
.ds-record-summary__code { color: var(--text-muted); font-size: var(--font-size-12); }
.ds-record-summary__subtitle, .ds-record-summary__meta { margin: 0; color: var(--text-secondary); }
.ds-record-summary__meta { color: var(--text-muted); }
.ds-record-summary__badges { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.ds-record-summary__actions { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: var(--space-8); }
.ds-record-summary__facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(calc(3 * var(--space-48)), 1fr)); gap: var(--space-12); margin: 0; }
.ds-record-summary__facts > div { display: grid; gap: var(--space-4); min-width: 0; align-content: start; padding: var(--space-12) var(--space-16); border: var(--border-width) solid var(--area-border); border-radius: var(--radius-control); background: var(--surface-card); }
.ds-record-summary__facts dt { color: var(--area); font-size: var(--font-size-13); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-record-summary__facts dd { margin: 0; display: grid; gap: var(--space-4); min-width: 0; }
.ds-record-summary__value { color: var(--text-primary); font-size: var(--font-size-16); font-weight: var(--font-weight-strong); line-height: var(--line-height-text); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ds-record-summary__detail { color: var(--text-muted); font-size: var(--font-size-13); line-height: var(--line-height-text); overflow-wrap: anywhere; }
.ds-record-summary__extra { grid-column: 1 / -1; min-width: 0; }
@media (max-width: 1023px) {
  .ds-record-summary { grid-template-columns: minmax(0, 1fr); }
  .ds-record-summary--media { grid-template-columns: auto minmax(0, 1fr); }
  .ds-record-summary--media > .ds-record-summary__actions { grid-column: 1 / -1; }
  .ds-record-summary__actions { justify-content: flex-start; }
}
@media (max-width: 639px) {
  .ds-record-summary { padding: var(--space-20); }
  .ds-record-summary__actions > * { flex: 1 1 auto; }
  .ds-record-summary__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8); }
  .ds-record-summary__facts > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------- Etapas de um processo ---------- */
.ds-progress { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--space-8); margin: 0; padding: 0; list-style: none; counter-reset: none; }
.ds-progress__step { position: relative; display: flex; align-items: flex-start; gap: var(--space-8); min-width: 0; padding: var(--space-12); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card); background: var(--surface-card); }
.ds-progress__step__mark { flex: none; display: inline-grid; place-items: center; width: var(--step-mark-size); height: var(--step-mark-size); border-radius: 50%; border: var(--border-width-strong) solid var(--border-subtle); background: var(--surface-card); color: var(--text-secondary); font-size: var(--font-size-13); font-weight: var(--font-weight-strong); }
.ds-progress__step__text { display: grid; gap: 2px; min-width: 0; }
.ds-progress__step__text > :first-child { color: var(--text-primary); }
.ds-progress__step__detail { color: var(--text-muted); font-weight: var(--font-weight-regular); }
.ds-progress__step--done .ds-progress__step__mark { border-color: var(--status-success-border); background: var(--status-success-bg); color: var(--status-success-text); }
.ds-progress__step--current { border-color: var(--selection-border); background: var(--surface-selected); }
.ds-progress__step--current .ds-progress__step__mark { border-color: var(--action-primary); background: var(--action-primary); color: var(--action-primary-text); }
.ds-progress__step--current .ds-progress__step__detail { color: var(--text-brand); font-weight: var(--font-weight-strong); }
.ds-progress__step--skipped { border-style: dashed; }
.ds-progress__step--skipped .ds-progress__step__text > :first-child { color: var(--text-muted); }
@media (max-width: 1023px) {
  .ds-progress { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(calc(3 * var(--space-48)), 1fr)); }
}
/* Celular: uma linha só; as etapas mostram o número e só a etapa atual mostra o nome (as demais ficam para leitor de tela). */
@media (max-width: 639px) {
  .ds-progress { display: flex; align-items: center; gap: var(--space-4); }
  .ds-progress__step { flex: none; padding: var(--space-4); border-color: transparent; background: transparent; }
  .ds-progress__step--current { flex: 1 1 auto; padding: var(--space-8) var(--space-12); border-color: var(--selection-border); background: var(--surface-selected); }
  .ds-progress__step:not(.ds-progress__step--current) .ds-progress__step__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}

/* ---------- §6.7 Gráfico de barras divididas (rótulo de valor sempre visível) ---------- */
.ds-split-bars { display: grid; gap: var(--space-12); margin: 0; min-width: 0; }
.ds-split-bars__legend { display: flex; flex-wrap: wrap; gap: var(--space-8) var(--space-16); margin: 0; padding: 0; list-style: none; color: var(--text-secondary); }
.ds-split-bars__legend > li { display: inline-flex; align-items: center; gap: var(--space-8); }
.ds-split-bars__swatch { width: var(--space-12); height: var(--space-12); border-radius: var(--radius-control); border: var(--border-width) solid var(--border-subtle); }
.ds-split-bars__swatch--0 { background: var(--chart-1); }
.ds-split-bars__swatch--1 { background: var(--chart-2); }
.ds-split-bars__swatch--2 { background: var(--chart-3); }
.ds-split-bars__rows { display: grid; gap: var(--space-8); margin: 0; padding: 0; list-style: none; }
.ds-split-bars__row { display: grid; grid-template-columns: calc(2 * var(--space-48)) minmax(0, 1fr) minmax(0, calc(4 * var(--space-48))); align-items: center; gap: var(--space-12); padding: var(--space-4) var(--space-8); border-radius: var(--radius-control); }
.ds-split-bars__row.is-highlight { background: var(--surface-selected); }
.ds-split-bars__label { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.ds-split-bars__bar { display: flex; height: var(--chart-bar-height); border-radius: var(--radius-control); overflow: hidden; border: var(--border-width) solid var(--border-subtle); background: var(--surface-card); }
.ds-split-bars__segment { flex-grow: 0; flex-shrink: 0; display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ds-split-bars__segment--0 { background: var(--chart-1); color: var(--chart-1-text); }
.ds-split-bars__segment--1 { background: var(--chart-2); color: var(--chart-2-text); }
.ds-split-bars__segment--2 { background: var(--chart-3); color: var(--chart-3-text); }
.ds-split-bars__note { color: var(--text-secondary); text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 639px) {
  .ds-split-bars__row { grid-template-columns: minmax(0, 1fr) auto; }
  .ds-split-bars__bar { grid-column: 1 / -1; grid-row: 2; }
  .ds-split-bars__note { grid-row: 1; grid-column: 2; }
}

/* ---------- §6.3 Ficha de trabalho: painel "O que fazer agora" (25/10) ---------- */
.ds-next-step { --tone-bg: var(--status-warning-bg); --tone-border: var(--status-warning-border); --tone-text: var(--status-warning-text);
  display: grid; gap: var(--space-12); min-width: 0; padding: var(--space-20) var(--space-24); border: var(--border-width) solid var(--tone-border);
  border-left: calc(2 * var(--border-width-strong)) solid var(--tone-border); border-radius: var(--radius-card); background: var(--tone-bg); color: var(--text-primary); }
.ds-next-step--info { --tone-bg: var(--status-info-bg); --tone-border: var(--status-info-border); --tone-text: var(--status-info-text); }
.ds-next-step--danger { --tone-bg: var(--status-danger-bg); --tone-border: var(--status-danger-border); --tone-text: var(--status-danger-text); }
.ds-next-step--success { --tone-bg: var(--status-success-bg); --tone-border: var(--status-success-border); --tone-text: var(--status-success-text); }
.ds-next-step--neutral { --tone-bg: var(--status-neutral-bg); --tone-border: var(--status-neutral-border); --tone-text: var(--status-neutral-text); }
.ds-next-step__eyebrow { color: var(--tone-text); text-transform: uppercase; letter-spacing: 0.04em; }
.ds-next-step__title { margin: 0; color: var(--text-brand); overflow-wrap: anywhere; }
.ds-next-step__text { color: var(--text-primary); max-width: 72ch; }
.ds-next-step__text > p { margin: 0; }
.ds-next-step__checks { display: grid; gap: var(--space-8); margin: 0; padding: 0; list-style: none; }
.ds-next-step__check { display: flex; align-items: flex-start; gap: var(--space-8); color: var(--text-primary); }
.ds-next-step__mark { flex: none; display: inline-grid; place-items: center; width: var(--tag-height); height: var(--tag-height); border-radius: var(--radius-pill);
  background: var(--status-success-bg); color: var(--status-success-text); border: var(--border-width) solid var(--status-success-border); }
.ds-next-step__check--attention .ds-next-step__mark { background: var(--status-warning-bg); color: var(--status-warning-text); border-color: var(--status-warning-border); }
.ds-next-step__check--blocked .ds-next-step__mark { background: var(--status-danger-bg); color: var(--status-danger-text); border-color: var(--status-danger-border); }
.ds-next-step__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); margin-top: var(--space-4); }
@media (max-width: 639px) {
  .ds-next-step { padding: var(--space-16); }
  .ds-next-step__actions > * { flex: 1 1 auto; }
}

/* ---------- Escolha em cartões (rádio por baixo do cartão) ---------- */
.ds-choice-cards { display: grid; gap: var(--space-8); min-width: 0; }
.ds-choice-cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-choice-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ds-choice-cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ds-choice-card { gap: var(--space-4); padding: var(--space-12) var(--space-16); padding-right: calc(var(--tag-height) + var(--space-20)); }
.ds-choice-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8); min-width: 0; }
@media (max-width: 639px) {
  .ds-choice-cards--2, .ds-choice-cards--3 { grid-template-columns: minmax(0, 1fr); }
  .ds-choice-cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* ---------- §6.7 Barras com rótulo de valor ---------- */
.ds-bar-chart { display: grid; gap: var(--space-12); margin: 0; min-width: 0; }
.ds-bar-chart__bars { margin: 0; padding: 0; list-style: none; }
.ds-bar-chart__label { color: var(--text-secondary); }
.ds-bar-chart__value { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.ds-bar-chart__bar { display: block; border-radius: var(--radius-control); background: var(--chart-2); }
.ds-bar-chart__item.is-highlight .ds-bar-chart__bar { background: var(--chart-1); }
.ds-bar-chart__caption { color: var(--text-muted); }
.ds-bar-chart--rows .ds-bar-chart__bars { display: grid; gap: var(--space-8); }
.ds-bar-chart--rows .ds-bar-chart__item { display: grid; grid-template-columns: minmax(0, calc(3 * var(--space-48))) minmax(0, 1fr) auto; align-items: center; gap: var(--space-12); }
.ds-bar-chart--rows .ds-bar-chart__track { display: block; height: var(--chart-bar-height); }
.ds-bar-chart--rows .ds-bar-chart__bar { width: var(--bar-size); min-width: var(--space-4); height: 100%; }
.ds-bar-chart--columns .ds-bar-chart__bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--space-8); align-items: end; }
.ds-bar-chart--columns .ds-bar-chart__item { display: grid; grid-template-rows: auto calc(4 * var(--space-32)) auto; justify-items: center; gap: var(--space-4); min-width: 0; }
.ds-bar-chart--columns .ds-bar-chart__value { grid-row: 1; }
.ds-bar-chart--columns .ds-bar-chart__track { grid-row: 2; display: flex; align-items: flex-end; width: 100%; height: 100%; }
.ds-bar-chart--columns .ds-bar-chart__bar { width: 100%; height: var(--bar-size); min-height: var(--border-width-strong); }
.ds-bar-chart--columns .ds-bar-chart__label { grid-row: 3; }
@media (max-width: 639px) {
  .ds-bar-chart--rows .ds-bar-chart__item { grid-template-columns: minmax(0, 1fr) auto; }
  .ds-bar-chart--rows .ds-bar-chart__track { grid-column: 1 / -1; grid-row: 2; }
  .ds-bar-chart--columns .ds-bar-chart__bars { gap: var(--space-4); }
  .ds-bar-chart--columns .ds-bar-chart__item { grid-template-rows: auto calc(3 * var(--space-32)) auto; }
}

/* ---------- §6.3 Lista em árvore (24/10): grupo em faixa, itens recuados ---------- */
.ds-tree-group > td { background: var(--surface-section); border-color: var(--border-subtle); }
.ds-tree-group strong { color: var(--text-brand); }
.ds-tree-item > td:first-child { padding-left: var(--space-48); }
.ds-tree-cell { display: flex; align-items: center; gap: var(--space-8); min-width: 0; }
.ds-tree-cell > :last-child { min-width: 0; display: grid; gap: 2px; }
.ds-tree-cell small { color: var(--text-muted); font-size: var(--font-size-13); }
.ds-tree-chevron { flex: none; }
.ds-tree-empty > td { padding-left: var(--space-48); color: var(--text-muted); cursor: default; }

/* ---------- Tabela que vira cartão curto no celular (sem rótulos) ---------- */
@media (max-width: 639px) {
  .ds-data-table--cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .ds-data-table--cards, .ds-data-table--cards tbody { display: block; width: 100%; }
  .ds-data-table--cards tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-4) var(--space-12); padding: var(--space-12) var(--space-16); border-bottom: var(--border-width) solid var(--border-subtle); }
  [data-colors='true'] .ds-data-table--cards tr[data-tone] { background: var(--tone-bg); border-bottom-color: var(--tone-border); }
  [data-colors='true'] .ds-data-table--cards tr[data-tone] > td { background: transparent; }
  [data-colors='false'] .ds-data-table--cards tr[data-tone] { box-shadow: inset var(--space-4) 0 0 var(--tone-text); }
  [data-colors='false'] .ds-data-table--cards tr[data-tone] > td:first-child { box-shadow: none; }
  .ds-data-table--cards tbody tr:last-child { border-bottom: 0; }
  .ds-data-table--cards td { display: block; grid-column: 1 / -1; height: auto; min-height: 0; padding: 0; border-bottom: 0; text-align: left; }
  .ds-data-table--cards td[data-card='title'] { grid-column: 1; }
  .ds-data-table--cards td[data-card='badge'] { grid-column: 2; grid-row: 1; justify-self: end; }
  .ds-data-table--cards td[data-card='line'] { color: var(--text-secondary); font-size: var(--font-size-13); }
  .ds-data-table--cards td[data-card='hide'] { display: none; }
  .ds-data-table--cards tr.ds-tree-group > td { background: transparent; }
  .ds-data-table--cards tr.ds-tree-group { background: var(--surface-section); }
  .ds-data-table--cards tr.ds-tree-item { margin-left: var(--space-16); }
  .ds-data-table--cards tr.ds-tree-item > td:first-child, .ds-data-table--cards tr.ds-tree-empty > td { padding-left: 0; }
}
/* Partes que só aparecem num tamanho (ex.: a escola junto da atividade no cartão do celular). */
.ds-phone-only { display: none; }
@media (max-width: 639px) {
  .ds-phone-only { display: inline; }
  .ds-phone-hide { display: none; }
}

/* Abas no celular: a borda direita esmaece quando há mais abas para rolar. */
@media (max-width: 639px) {
  .ds-tabs { scrollbar-width: none; mask-image: linear-gradient(to right, var(--text-primary) calc(100% - var(--space-32)), transparent); }
  .ds-tabs::-webkit-scrollbar { display: none; }
  .ds-tabs__item:last-child { margin-right: var(--space-24); }
}
/*
 * §11 Área do parceiro — o espaço do parceiro no site Parceiros (/entrar), diferente do Portal Interno.
 * Barra de cima meia-noite da Vitrine com o parceiro e cinco assuntos; abaixo de 1180px (celular e iPad), barra de baixo fixa.
 * Conteúdo na largura da Vitrine; cartões de ação com o botão sempre no pé; o que pede o parceiro em lilás (sem amarelo).
 * Faixa de boas-vindas lilás no Início, com a barra magenta (uma só). Componentes de conteúdo continuam os do Design System.
 */
.page.ds-partner-page { width: min(calc(var(--showcase-container) - 2 * var(--showcase-gutter)), calc(100% - 2 * var(--showcase-gutter))); }
.ds-showcase-topbar--partner .ds-showcase-topbar__inner { min-height: var(--partner-area-topbar-height); gap: var(--space-20); }
.ds-showcase-topbar--partner .ds-showcase-topbar__nav { gap: var(--space-4); }
.ds-showcase-topbar--partner .ds-showcase-topbar__nav a:not(.ds-showcase-button) { display: inline-flex; align-items: center; gap: var(--space-8); padding: var(--space-8) var(--space-12); border-radius: var(--radius-pill); font-size: var(--font-size-15); }
.ds-showcase-topbar--partner .ds-showcase-topbar__nav a[aria-current='page'] { background: var(--showcase-on-dark-card); color: var(--text-on-dark); }
.ds-showcase-topbar__user { flex: none; display: flex; align-items: center; gap: var(--space-8); margin-left: var(--space-8); padding-left: var(--space-16); border-left: var(--border-width) solid var(--showcase-on-dark-line); color: var(--showcase-on-dark-soft); font-size: var(--font-size-13); white-space: nowrap; }
.ds-showcase-topbar__leave { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--showcase-on-dark-soft); cursor: pointer; }
.ds-showcase-topbar__leave:hover { background: var(--showcase-on-dark-card); color: var(--text-on-dark); }
.ds-showcase-topbar__leave svg { width: var(--icon-md); height: var(--icon-md); }
.ds-partner-count { display: inline-block; min-width: 20px; height: 20px; padding: 0 var(--space-4); border-radius: var(--radius-pill); background: var(--brand-violet); color: var(--text-on-dark); font-size: var(--font-size-12); font-weight: var(--font-weight-strong); line-height: 20px; text-align: center; }
.ds-partner-count:empty { display: none; }
@media (max-width: 1279px) {
  .ds-showcase-topbar--partner .ds-showcase-topbar__school > span:last-child, .ds-showcase-topbar__user-name { display: none; }
}
/* Até 1179px (celular e iPad, também deitado) os cinco assuntos ficam na barra de baixo: na de cima não cabem com o botão de sair. */
@media (max-width: 1179px) {
  .ds-showcase-topbar--partner .ds-showcase-topbar__nav { display: none; }
  .ds-showcase-topbar--partner .ds-showcase-topbar__school > span:last-child { display: inline; }
  .ds-showcase-topbar--partner .ds-showcase-topbar__user { margin-left: auto; padding-left: 0; border-left: 0; }
}
@media (max-width: 600px) {
  .ds-showcase-topbar--partner .ds-showcase-topbar__school { display: inline-flex; min-width: 0; font-size: var(--font-size-15); }
  .ds-showcase-topbar--partner .ds-showcase-topbar__school .ds-showcase-logo { display: none; }
  .ds-showcase-topbar--partner .ds-showcase-topbar__logo { height: 20px; }
}
/* Quadro que vira lista por etapa no celular: a coluna marcada como primeira sobe e as vazias somem. */
@media (max-width: 639px) {
  .ds-board--stack-mobile { flex-direction: column; align-items: stretch; overflow: visible; }
  .ds-board--stack-mobile > .ds-board__column { flex: none; width: 100%; max-height: none; }
  .ds-board--stack-mobile > .ds-board__column.is-first { order: -1; }
  .ds-board--stack-mobile > .ds-board__column.is-empty { display: none; }
}
.ds-bottom-nav { display: none; }
@media (max-width: 1179px) {
  .ds-bottom-nav { position: fixed; inset: auto 0 0 0; z-index: var(--z-nav); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom)); border-top: var(--border-width) solid var(--border-subtle); background: var(--surface-card); }
  .ds-bottom-nav__item { position: relative; display: grid; justify-items: center; gap: var(--space-4); padding: var(--space-8) var(--space-4); border-radius: var(--radius-control); color: var(--text-secondary); font-size: var(--font-size-12); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); text-align: center; text-decoration: none; }
  .ds-bottom-nav__item svg { width: var(--icon-md); height: var(--icon-md); }
  .ds-bottom-nav__item[aria-current='page'] { background: var(--surface-selected); color: var(--action-primary); }
  .ds-bottom-nav__item .ds-partner-count { position: absolute; top: var(--space-4); left: calc(50% + var(--space-8)); }
  .page.ds-partner-page { padding-bottom: calc(var(--space-48) + var(--partner-area-bottom-nav-height)); }
}
.ds-partner-welcome { position: relative; overflow: hidden; border: var(--border-width) solid var(--showcase-line); border-radius: var(--showcase-radius); background: var(--showcase-surface-lilac); }
.ds-partner-welcome__inner { position: relative; z-index: 1; display: grid; gap: var(--space-8); max-width: 70%; padding: var(--space-32); }
.ds-partner-welcome__inner h1 { color: var(--showcase-text-strong); }
.ds-partner-welcome__inner p { max-width: 640px; color: var(--showcase-text-soft); font-size: var(--font-size-15); }
.ds-partner-welcome__chips { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.ds-partner-welcome__bar { position: absolute; z-index: 0; top: -20%; right: 8%; height: 140%; width: auto; color: var(--showcase-bar); opacity: .14; pointer-events: none; }
@media (max-width: 639px) { .ds-partner-welcome__inner { max-width: none; padding: var(--space-24); } .ds-partner-welcome__bar { right: -24%; opacity: .1; } }
/* Moldura da área no estilo do site do Extraclasse (§10 Vitrine): fundo lilás claro com cartões brancos arredondados,
 * marcador com o chevron acima dos títulos, títulos em Poppins, botões em pílula e rodapé meia-noite. */
.ds-partner-frame { min-height: 100dvh; display: flex; flex-direction: column; background: var(--showcase-surface-soft); }
.ds-partner-frame > .ds-partner-page { flex: 1 0 auto; }
.ds-partner-frame .ds-page-header .ds-eyebrow { gap: 10px; color: var(--showcase-kicker); font-family: var(--font-identity); font-size: var(--showcase-small); letter-spacing: var(--showcase-tracking-kicker); text-transform: uppercase; }
.ds-partner-frame .ds-page-header .ds-eyebrow::before { content: ''; flex: none; width: 14px; height: 16px; background: var(--showcase-bar); clip-path: polygon(0 0, 60% 0, 100% 50%, 60% 100%, 0 100%, 40% 50%); }
.ds-partner-frame .ds-page-header h1 { color: var(--showcase-text-strong); font-family: var(--font-identity); font-size: var(--showcase-headline); font-weight: var(--font-weight-title); line-height: var(--showcase-line-headline); }
.ds-partner-frame .ds-page-header__description { color: var(--showcase-text-soft); }
.ds-partner-frame :is(.ds-consult, .ds-table-wrap, .ds-record-summary, .ds-action-card, .ds-area-tile, .ds-tile, .ds-kpi, .ds-board__column, .ds-state) { border-color: var(--showcase-line); border-radius: var(--showcase-radius); }
.ds-partner-frame :is(.ds-kpi, .ds-tile, .ds-record-summary) { background: var(--surface-card); }
.ds-partner-frame .ds-record-summary { border-top-width: var(--border-width); }
.ds-partner-frame .ds-consult .ds-consult__head, .ds-partner-frame .ds-consult.is-open .ds-consult__head { background: var(--surface-card); border-bottom: 0; padding-top: var(--space-20); }
.ds-partner-frame .ds-consult__body { padding-top: var(--space-4); }
.ds-partner-frame .ds-board > .ds-board__column { flex: 1 1 0; width: auto; min-width: calc(5.5 * var(--control-height)); }
.ds-partner-frame .ds-showcase-footer__brand img { width: 138px; height: auto; }
.ds-partner-frame .ds-consult__title { color: var(--showcase-text-strong); font-family: var(--font-identity); }
.ds-partner-frame .ds-data-table th { background: var(--showcase-surface-lilac); }
.ds-partner-frame :is(.ds-button, .ds-icon-button) { border-radius: var(--radius-pill); }
.ds-partner-frame .ds-button { font-family: var(--font-identity); }
/* Botões em Blue Tech (cor de ação do sistema), só a forma em pílula vem da vitrine. */
.ds-partner-frame .ds-button--secondary:hover:not(:disabled) { background: var(--showcase-surface-lilac); }
.ds-partner-frame .ds-notice { border-radius: var(--showcase-radius-sm); }
.ds-partner-frame .ds-section-heading h2 { color: var(--showcase-text-strong); }
.ds-partner-frame .ds-showcase-footer { margin-top: var(--space-48); }
@media (max-width: 1179px) { .ds-partner-frame .ds-showcase-footer { padding-bottom: calc(var(--space-32) + var(--partner-area-bottom-nav-height)); } }
/* Áreas do Início: o menu em cartões, um por assunto, com as partes e a contagem do que pede ação. */
.ds-area-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: var(--space-12); }
.ds-area-tile { position: relative; display: grid; align-content: start; gap: var(--space-8); padding: var(--space-20); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card); background: var(--surface-card); color: var(--text-primary); text-decoration: none; }
.ds-area-tile:hover { border-color: var(--selection-border); background: var(--surface-selected); }
.ds-area-tile:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 2px; }
.ds-area-tile__icon { width: var(--control-height); height: var(--control-height); display: grid; place-items: center; border-radius: var(--radius-control); background: var(--surface-selected); color: var(--action-primary); }
.ds-area-tile__icon svg { width: var(--icon-md); height: var(--icon-md); }
.ds-area-tile__title { color: var(--text-primary); font-family: var(--font-identity); font-size: var(--font-size-16); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-area-tile__parts { color: var(--text-secondary); font-size: var(--font-size-13); }
.ds-area-tile > .ds-partner-count { position: absolute; top: var(--space-16); right: var(--space-16); }
@media (max-width: 639px) { .ds-area-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ds-area-tile { padding: var(--space-16); } .ds-area-tile__parts { display: none; } }
/* Lista com o chevron da marca como marcador (sobre fundo escuro ou claro). */
.ds-chevron-list { display: grid; gap: var(--space-8); margin: 0; padding: 0; list-style: none; }
.ds-chevron-list > li { display: flex; align-items: baseline; gap: var(--space-12); }
.ds-chevron-list > li::before { content: ''; flex: none; width: 10px; height: 12px; background: var(--showcase-bar); clip-path: polygon(0 0, 60% 0, 100% 50%, 60% 100%, 0 100%, 40% 50%); }
.ds-action-cards { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--space-12); }
.ds-action-cards > li { display: grid; }
.ds-action-card { display: flex; flex-direction: column; gap: var(--space-8); padding: var(--space-16) var(--space-20); border: var(--border-width) solid var(--border-subtle); border-radius: var(--radius-card); background: var(--surface-card); color: var(--text-primary); text-decoration: none; }
.ds-action-card:hover { border-color: var(--selection-border); }
.ds-action-card:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 2px; }
.ds-action-card[data-tone='lilac'] { background: var(--category-independent-bg); border-color: var(--category-independent-border); }
.ds-action-card[data-tone='danger'] { background: var(--status-danger-bg); border-color: var(--status-danger-border); }
.ds-action-card__kicker { display: flex; align-items: center; gap: var(--space-8); color: var(--text-secondary); font-size: var(--font-size-13); font-weight: var(--font-weight-strong); }
.ds-action-card__kicker svg { width: var(--icon-sm); height: var(--icon-sm); }
.ds-action-card__title { color: var(--text-primary); font-size: var(--font-size-16); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-action-card__help { color: var(--text-value); font-size: var(--font-size-15); }
.ds-action-card__foot { margin-top: auto; padding-top: var(--space-8); }
/* Selo de situação que abre o que resolver (StatusButton). */
.ds-badge--action { cursor: pointer; font: inherit; font-size: var(--font-size-13); transition: border-color .15s ease; }
.ds-badge--action:hover { border-color: currentColor; }
.ds-badge--action:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 2px; }

/* Lista do que falta (TaskList): faixa de cor da situação à esquerda, texto e a ação à direita. */
.ds-tasks { display: grid; gap: var(--space-8); margin: 0; padding: 0; list-style: none; }
.ds-task { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-8) var(--space-16);
  min-width: 0; padding: var(--space-12) var(--space-16); border: var(--border-width) solid var(--tone-border); border-left-width: var(--row-edge-width);
  border-radius: var(--radius-control); background: var(--tone-bg); }
.ds-task--warning { --tone-bg: var(--status-warning-bg); --tone-border: var(--status-warning-border); }
.ds-task--danger { --tone-bg: var(--status-danger-bg); --tone-border: var(--status-danger-border); }
.ds-task--success { --tone-bg: var(--status-success-bg); --tone-border: var(--status-success-border); }
.ds-task--info { --tone-bg: var(--status-info-bg); --tone-border: var(--status-info-border); }
.ds-task__text { display: grid; gap: var(--space-4); min-width: 0; flex: 1 1 280px; }
.ds-task__detail { color: var(--text-muted); }
.ds-task__action { display: flex; flex-wrap: wrap; gap: var(--space-8); align-items: center; }

/* Ajustes de uma ficha (SettingTiles): blocos lado a lado; no celular, um embaixo do outro. */
.ds-setting-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-12); margin: 0; padding: 0; list-style: none; }
.ds-setting-tiles > li { display: flex; min-width: 0; }
.ds-setting-tile { width: 100%; gap: var(--space-4); font: inherit; }
.ds-setting-tile__label { color: var(--text-muted); }
.ds-setting-tile__action { color: var(--action-primary); }
.ds-setting-tile--warning { border-color: var(--status-warning-border); background: var(--status-warning-bg); }


/* §6.9 (1.12) Página inicial da área: faixa da área e o menu da área em botões por assunto,
   no molde dos assuntos da Visão 360. Tudo no lilás do menu; a pendência usa o âmbar de ação. */
.ds-area-hero { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-16); padding: var(--space-16) var(--space-20);
  border: var(--border-width) solid var(--hub-accent-border); border-radius: var(--radius-card); background: var(--hub-hero-bg); }
.ds-area-hero__icon { width: var(--hub-hero-icon); height: var(--hub-hero-icon); border-radius: var(--radius-card); background: var(--hub-accent);
  color: var(--text-on-dark); display: grid; place-items: center; flex: none; }
.ds-area-hero__copy { display: grid; gap: var(--space-4); min-width: 0; }
.ds-area-hero__copy > span { color: var(--hub-accent); font-size: var(--font-size-13); font-weight: var(--font-weight-strong); }
.ds-area-hero__copy > h1 { margin: 0; color: var(--text-brand); font-family: var(--font-identity); font-size: var(--font-size-28);
  font-weight: var(--font-weight-title); line-height: var(--line-height-title); }
.ds-area-menu { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); align-items: start; gap: var(--space-24) var(--space-20); padding: var(--space-20); border: var(--border-width) solid var(--hub-accent-border);
  border-radius: var(--radius-card); background: var(--hub-panel-bg); }
.ds-area-menu__group { display: grid; gap: var(--space-8); min-width: 0; }
.ds-area-menu__group > h2 { margin: 0; display: flex; align-items: center; gap: var(--space-8); color: var(--text-brand);
  font-family: var(--font-identity); font-size: var(--font-size-15); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-area-menu__group > h2::before { content: ''; width: var(--space-4); height: var(--space-16); border-radius: var(--radius-pill); background: var(--hub-accent); }
.ds-area-menu__items { display: grid; gap: var(--space-12); }
.ds-area-menu__item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-12);
  min-width: 0; padding: var(--space-12) var(--space-16); border: var(--border-width) solid var(--hub-accent-border);
  border-left: var(--hub-stripe-width) solid var(--hub-stripe); border-radius: var(--radius-card); background: var(--surface-card);
  color: var(--text-primary); text-decoration: none; }
.ds-area-menu__item:hover { border-color: var(--hub-accent); background: var(--surface-card); }
.ds-area-menu__item:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring); outline-offset: 2px; }
.ds-area-menu__icon { width: var(--hub-icon-box); height: var(--hub-icon-box); border-radius: var(--radius-control); background: var(--hub-accent-bg);
  color: var(--hub-accent); display: grid; place-items: center; }
.ds-area-menu__copy { display: grid; justify-items: start; gap: 2px; min-width: 0; }
.ds-area-menu__copy > strong { color: var(--text-brand); font-size: var(--font-size-15); font-weight: var(--font-weight-strong); line-height: var(--line-height-title); }
.ds-area-menu__copy > small { color: var(--text-muted); font-size: var(--font-size-13); line-height: var(--line-height-text); }
.ds-area-menu__count { padding: 2px var(--space-8); border-radius: var(--radius-pill); background: var(--status-warning-bg); color: var(--status-warning-text);
  font-size: var(--font-size-12); font-weight: var(--font-weight-strong); white-space: nowrap; }
.ds-area-menu__item > svg:last-child { color: var(--text-muted); }
@media (max-width: 640px) { .ds-area-menu { padding: var(--space-16); } }

/*
 * Padrão Visual §6.1 — moldura do Portal (menu lateral, barra do celular e área da página).
 * Menu aberto 248 px; recolhido 72 px (1024–1279 px ou pela seta); abaixo de 1024 px vira gaveta.
 */
.app-shell { min-height: 100vh; background: var(--surface-page); }
/* Página inicial da área (1.12): fundo quase branco para o menu da área aparecer no lilás do sistema. */
.app-shell:has(.ds-area-menu) { background: var(--hub-page-bg); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: var(--z-nav);
  width: var(--nav-width);
  height: 100vh;
  background: var(--nav-bg);
  color: var(--nav-text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar :focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-on-dark); outline-offset: calc(-1 * var(--focus-ring-width)); }
.sidebar .nav-item--active:focus-visible, .sidebar__profile[aria-current='page']:focus-visible { outline-color: var(--nav-selected-text); }

.sidebar__brand { min-height: calc(var(--space-48) + var(--space-24)); padding: var(--space-16) var(--space-20); display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); flex: 0 0 auto; }
.sidebar__official-logo { display: block; width: min(calc(var(--nav-width) - 2 * var(--space-48)), 100%); height: auto; max-height: var(--space-48); object-fit: contain; object-position: left center; flex: 0 1 auto; }
.sidebar__official-logo--compact { width: var(--space-20); height: var(--space-32); max-height: var(--space-32); }
.sidebar__global-toggle, .sidebar__rail-expand, .sidebar__close {
  position: relative;
  width: var(--control-height);
  height: var(--control-height);
  flex: 0 0 auto;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--nav-text-muted);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.sidebar__global-toggle:hover, .sidebar__rail-expand:hover, .sidebar__rail-expand:focus-visible, .sidebar__close:hover { background: var(--nav-hover); color: var(--nav-text); }
.sidebar__rail-expand-icon { position: absolute; opacity: 0; }
.sidebar__rail-expand:hover .sidebar__official-logo--compact, .sidebar__rail-expand:focus-visible .sidebar__official-logo--compact { opacity: 0; }
.sidebar__rail-expand:hover .sidebar__rail-expand-icon, .sidebar__rail-expand:focus-visible .sidebar__rail-expand-icon { opacity: 1; }
.sidebar__close { display: none; }

.sidebar__nav {
  min-height: 0;
  flex: 1 1 auto;
  padding: var(--space-8) var(--space-12);
  border-bottom: var(--border-width) solid var(--nav-divider);
  overflow-y: auto;
  scrollbar-color: var(--scrollbar-nav-thumb) transparent;
}
.sidebar__nav::-webkit-scrollbar-thumb { background: var(--scrollbar-nav-thumb); background-clip: padding-box; }
.sidebar__nav::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-nav-thumb-hover); background-clip: padding-box; }

.nav-section + .nav-section { margin-top: var(--space-8); }
.nav-section__trigger {
  width: 100%;
  min-height: var(--control-height-compact);
  padding: 0 var(--space-12);
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--nav-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  font-size: var(--font-size-12);
  font-weight: var(--font-weight-strong);
  line-height: var(--line-height-title);
  text-align: left;
  cursor: pointer;
}
.nav-section__trigger:hover { background: var(--nav-hover); }
.nav-group { display: grid; gap: var(--space-4); padding-top: var(--space-4); }

.nav-item {
  min-height: calc(var(--space-32) + var(--space-4));
  padding: var(--space-4) var(--space-12);
  border-radius: var(--radius-control);
  color: var(--nav-text);
  display: flex;
  align-items: center;
  gap: var(--space-12);
  font-size: var(--font-size-15);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-title);
  text-decoration: none;
  transition-property: background-color, color;
  transition-duration: .15s;
}
.nav-item:hover { background: var(--nav-hover); color: var(--nav-text); }
.nav-item--active, .nav-item--active:hover { background: var(--nav-selected); color: var(--nav-selected-text); font-weight: var(--font-weight-strong); }
.nav-item__copy { min-width: 0; flex: 1; display: grid; gap: var(--space-4); overflow-wrap: anywhere; }
.nav-item__copy small { color: inherit; font-size: var(--font-size-12); }
.nav-item--disabled { color: var(--nav-text-muted); cursor: not-allowed; pointer-events: none; }
.nav-item__lock { margin-left: auto; }
.nav-item svg, .nav-section__trigger svg { width: var(--icon-md); height: var(--icon-md); flex: 0 0 auto; }
/* (1.12) Sem cor por área: o ícone da área fica na cor do texto do menu; selecionado volta ao texto do item. */
.nav-item[data-area] > svg:first-child { color: var(--area-on-dark); }
.nav-item--active[data-area] > svg:first-child { color: var(--nav-selected-text); }

.nav-tree { display: grid; gap: var(--space-4); }
.nav-tree__label { padding: var(--space-16) var(--space-12) var(--space-4); color: var(--nav-label); font-size: var(--font-size-12); font-weight: var(--font-weight-strong); }
.nav-tree__divider { width: 100%; margin: var(--space-8) 0; border: 0; border-top: var(--border-width) solid var(--nav-divider); }
.nav-tree__trigger { width: 100%; border: 0; background: transparent; font-family: inherit; text-align: left; cursor: pointer; }
.nav-tree__trigger[aria-expanded='true'] { background: var(--nav-open); }
.nav-tree__trigger[aria-expanded='true']:hover { background: var(--nav-hover); }
.nav-tree__trigger.is-current { font-weight: var(--font-weight-strong); }
.nav-tree__chevron { margin-left: auto; color: var(--nav-text-muted); transition: transform .15s; }
.nav-item .nav-tree__chevron { width: var(--icon-sm); height: var(--icon-sm); }
.nav-tree__trigger[aria-expanded='true'] .nav-tree__chevron { transform: rotate(180deg); }
.nav-tree__children { margin: var(--space-4) 0 var(--space-8) var(--space-20); padding-left: var(--space-8); border-left: var(--border-width) solid var(--nav-divider); display: grid; gap: var(--space-4); }
.nav-tree__child { min-height: var(--space-32); padding: var(--space-4) var(--space-12); border-radius: var(--radius-control); color: var(--nav-text-muted); display: flex; align-items: center; font-size: var(--font-size-13); line-height: var(--line-height-title); text-decoration: none; overflow-wrap: anywhere; transition-property: background-color, color; transition-duration: .15s; }
.nav-tree__child:hover { background: var(--nav-hover); color: var(--nav-text); }
.nav-tree__child.nav-item--active { color: var(--nav-selected-text); }
/* Subtítulo dentro da área (Dia a dia, Ajustes…): mesmo tom do rótulo das seções, menor que o item. */
.nav-tree__subgroup { padding: var(--space-8) var(--space-12) 0; color: var(--nav-label); font-size: var(--font-size-12); font-weight: var(--font-weight-strong); }
.nav-tree__subgroup:first-child { padding-top: 0; }
.nav-tree__gap { height: var(--space-4); }

.sidebar__profile {
  min-height: calc(var(--space-48) + var(--space-8));
  margin: var(--space-8) var(--space-12) var(--space-12);
  padding: var(--space-8) var(--space-12);
  border-radius: var(--radius-control);
  color: var(--nav-text);
  display: flex;
  align-items: center;
  gap: var(--space-12);
  text-decoration: none;
  flex: 0 0 auto;
}
.sidebar__profile:hover { background: var(--nav-hover); color: var(--nav-text); }
.sidebar__profile[aria-current='page'] { background: var(--nav-selected); color: var(--nav-selected-text); }
.sidebar__profile > div { min-width: 0; }
.sidebar__profile strong { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--font-size-15); font-weight: var(--font-weight-strong); }
.sidebar__profile span { display: block; color: inherit; font-size: var(--font-size-12); }

.main-shell { min-height: 100vh; margin-left: var(--nav-width); }
.topbar, .menu-button, .sidebar-backdrop { display: none; }

/* Área da página: até 1440 px; margem 32 (24 tablet, 16 celular). */
.page { width: min(var(--container-page), calc(100% - 2 * var(--page-padding))); margin: 0 auto; padding: var(--space-32) 0 var(--space-48); display: grid; gap: var(--gap-page); align-content: start; min-width: 0; }
/* §4.1 Ritmo (1.6): entre os blocos da página só vale o espaço da página; margem de tela não soma.
   Abas ficam mais perto do conteúdo delas (--gap-tabs) do que do cabeçalho (--gap-page). */
.page > * { margin-block: 0; min-width: 0; }
.page > :is(.ds-tabs, [role='tablist']) + * { margin-top: calc(var(--gap-tabs) - var(--gap-page)); }
.page--form { width: min(var(--container-form), calc(100% - 2 * var(--page-padding))); margin-left: max(var(--page-padding), calc((100% - var(--container-page)) / 2)); }

@media (min-width: 1024px) {
  .app-shell--sidebar-collapsed .sidebar { width: var(--nav-width-collapsed); }
  .app-shell--sidebar-collapsed .main-shell { margin-left: var(--nav-width-collapsed); }
  .sidebar--collapsed .sidebar__brand { min-height: calc(var(--space-48) + var(--space-24)); padding: var(--space-12) var(--space-8); flex-direction: column; justify-content: center; gap: var(--space-8); }
  .sidebar--collapsed .sidebar__nav { padding: var(--space-8); }
  .sidebar--collapsed .nav-section--rail + .nav-section--rail { margin-top: var(--space-12); padding-top: var(--space-12); border-top: var(--border-width) solid var(--nav-divider); }
  .sidebar--collapsed .nav-group { padding-top: 0; }
  .sidebar--collapsed .nav-item { width: 100%; min-height: calc(var(--space-48) - var(--space-4)); padding: 0; justify-content: center; }
  .sidebar--collapsed .nav-item span, .sidebar--collapsed .nav-item__lock { display: none; }
  .sidebar--collapsed .sidebar__profile { min-height: calc(var(--space-48) - var(--space-4)); margin: var(--space-8) var(--space-8) var(--space-12); padding: var(--space-8); justify-content: center; }
  .sidebar--collapsed .sidebar__profile > div { display: none; }
}

@media (max-width: 1023px) {
  .sidebar { width: min(var(--nav-width), calc(100vw - 2 * var(--space-16))); transform: translateX(-100%); box-shadow: var(--elevation-overlay); transition: transform .18s ease; }
  .sidebar--open { transform: translateX(0); }
  .sidebar__close { display: inline-grid; }
  .sidebar__global-toggle { display: none; }
  .main-shell { margin-left: 0; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: var(--z-menu);
    min-height: calc(var(--space-48) + var(--space-16));
    padding: 0 var(--page-padding);
    border-bottom: var(--border-width) solid var(--border-subtle);
    background: var(--surface-selected);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-12);
  }
  .topbar .search-shell, .topbar > .ds-icon-button:not(.menu-button) { display: none; }
  .menu-button { display: inline-grid; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: calc(var(--z-nav) - 1); border: 0; background: var(--overlay-backdrop); display: block; }
  .page--form { margin-left: auto; }
}
@media (max-width: 639px) {
  .page { padding: var(--space-24) 0 var(--space-32); }
}
@media (min-width: 1024px) and (max-height: 480px) {
  .sidebar__brand { min-height: calc(var(--space-48) + var(--space-8)); padding: var(--space-4) var(--space-12); }
  .sidebar__profile { min-height: calc(var(--space-48) - var(--space-4)); margin-bottom: var(--space-4); }
}

.profile-chip { min-height: var(--control-height); padding: 0 var(--space-8); border-radius: var(--radius-pill); color: var(--text-brand); display: inline-flex; align-items: center; gap: var(--space-8); text-decoration: none; font-size: var(--font-size-13); font-weight: var(--font-weight-strong); }
.profile-chip:hover { background: var(--surface-card); }
@media (max-width: 639px) { .profile-chip strong { display: none; } }
}

