/* Identidade compartilhada. Carregar depois dos estilos específicos da página. */
:root {
    --site-ink: #163653;
    --site-muted: #516a7f;
    --site-blue: #17659a;
    --site-line: #dae5ed;
    --site-yellow: #ffe087;
}
html { scroll-padding-top: 92px; }
body { font-family: "Segoe UI", system-ui, sans-serif; color: var(--site-ink); background: #f7fafc; }
[hidden] { display: none !important; }
.site-header {
    position: sticky; top: 0; z-index: 20;
    padding: 0; color: var(--site-ink); text-align: left;
    background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--site-line);
}
.site-header__inner { max-width: 1200px; min-height: 72px; margin: auto; padding: 12px 24px; display: flex; align-items: center; gap: 28px; }
.site-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--site-ink); font-size: 1rem; font-weight: 750; line-height: 1.25; white-space: nowrap; }
.site-brand__symbol { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #eaf3fa; color: var(--site-blue); font-size: 1.65rem; }
.site-brand__sub { font-weight: 500; }
.site-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.site-nav a { padding: 10px 14px; border-radius: 10px; font-size: .93rem; font-weight: 600; text-decoration: none; color: var(--site-muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--site-blue); background: #edf5fa; }
.site-enter { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 42px; padding: 9px 16px; border: 1px solid #edce77; border-radius: 12px; background: #fff3c9; color: var(--site-ink); font-weight: 650; font-size: .92rem; text-decoration: none; }
.site-enter:hover { background: var(--site-yellow); }
.site-toggle { display: none; }
.site-header a:focus-visible, .site-header button:focus-visible { outline: 3px solid var(--site-blue); outline-offset: 3px; }
body.internal-page {
    background-image: linear-gradient(rgba(246, 250, 254, .92), rgba(255, 255, 255, .95));
    background-size: cover; background-position: center; background-attachment: fixed;
}
.page-heading, .checkers-header.page-heading {
    position: static; max-width: 1200px; margin: auto; padding: 44px 24px 16px;
    background: transparent; color: var(--site-ink); text-align: center;
}
.page-heading h1 { margin: 0; color: var(--site-ink); font-size: clamp(1.85rem, 4vw, 2.6rem); letter-spacing: -.035em; }
.page-heading p { margin: 10px 0 0; color: var(--site-muted); line-height: 1.6; }
.internal-page .card, .internal-page .game-panel, .internal-page .winner-card {
    border: 1px solid var(--site-line); border-radius: 20px;
    background: rgba(255, 255, 255, .96); box-shadow: 0 6px 24px rgba(22, 54, 83, .055);
}
.internal-page .page-navigation__back { padding: 8px 12px; border: 0; background: transparent; color: var(--site-muted); font-size: .9rem; }
.internal-page .page-navigation__back:hover { background: #edf5fa; transform: none; }
.internal-page .page-navigation__back:focus-visible { outline-color: var(--site-blue); }
@media (max-width: 720px) {
    body.internal-page { background-attachment: scroll; }
    .site-header__inner { min-height: 64px; padding: 10px 16px; gap: 12px; flex-wrap: wrap; }
    .site-brand { font-size: .92rem; gap: 8px; }
    .site-brand__symbol { width: 34px; height: 34px; }
    .site-brand__sub { display: block; }
    .site-enter { margin-left: auto; width: 40px; min-height: 40px; padding: 8px; }
    .site-enter > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .site-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 8px; width: 40px; height: 40px; border: 1px solid var(--site-line); border-radius: 10px; background: #fff; color: var(--site-ink); cursor: pointer; }
    .site-toggle:hover { background: #edf5fa; }
    .site-nav { order: 4; margin: 0; width: 100%; justify-content: center; }
    .site-header.is-enhanced .site-nav { display: none; }
    .site-header.is-enhanced.is-open .site-nav { display: flex; }
    .page-heading, .checkers-header.page-heading { padding: 30px 20px 8px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .subject-card, .opening__button { transition: none !important; }
}

/* O gráfico respeita a largura disponível nos painéis menores. */
.internal-page canvas { max-width: 100%; }

/* Navegação global de cinco áreas. Layout mobile abre verticalmente. */
.site-header__inner { gap: 20px; }
.site-nav { gap: 2px; }
.site-nav a { white-space: nowrap; padding: 10px 12px; }
.site-nav a[aria-current="page"] { font-weight: 750; box-shadow: inset 0 -2px 0 #17659a; }
@media (max-width: 1200px) {
    .site-header__inner { min-height: 64px; padding: 10px 16px; gap: 12px; flex-wrap: wrap; }
    .site-brand { font-size: .92rem; gap: 8px; }
    .site-brand__symbol { width: 34px; height: 34px; }
    .site-brand__sub { display: block; }
    .site-toggle { display: inline-flex; align-items: center; justify-content: center; padding: 8px; width: 44px; height: 44px; margin-left: auto; border: 1px solid var(--site-line); border-radius: 10px; background: #fff; color: var(--site-ink); cursor: pointer; }
    .site-nav { order: 4; width: 100%; margin: 0; flex-direction: column; align-items: stretch; gap: 4px; }
    .site-nav a { min-height: 44px; }
    .site-header.is-enhanced .site-nav, .site-header.is-enhanced .site-enter { display: none; }
    .site-header.is-enhanced.is-open .site-nav { display: flex; }
    .site-header .site-enter { order: 5; width: 100%; margin: 0; min-height: 44px; }
    .site-header.is-enhanced.is-open .site-enter { display: inline-flex; }
    .site-enter > span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}
.site-about { width: min(100%, 850px); margin: auto; padding: 40px 24px; line-height: 1.7; }
.site-header, .site-header *, .site-about { box-sizing: border-box; }

.development-entry { max-width:460px; margin:32px auto 0; }
.development-entry .subject-card { width:100%; min-width:0; }

/* Marca integrada: o somatório ocupa o lugar do E, sem ícone duplicado. */
.site-brand__identity { display:block;min-width:0; }
.site-brand__name { display:block;white-space:nowrap;font-size:1.6rem;line-height:1.05;font-weight:750;letter-spacing:-.035em;color:var(--site-blue); }
.site-brand__sum { font-size:1.14em;vertical-align:-.015em; }
.site-brand__tagline { display:block;margin-top:4px;font-size:.65rem;line-height:1.2;font-weight:500;letter-spacing:0;white-space:nowrap;color:var(--site-muted); }
@media(max-width:720px) {
 .site-brand__name { font-size:1.45rem; }
 .site-brand__tagline { font-size:clamp(.57rem,2.5vw,.65rem); }
}

/* Opt-in para entradas de seção já identificadas pelo menu ativo.
   Não aplicar a títulos de aulas, exercícios ou jogos específicos. */
.section-landing .section-title-accessible { font-size: clamp(1.6rem, 4vw, 2rem); line-height: 1.2; margin: 8px 0 12px; }
/* Mesmo limite do menu completo em site-ui.js e neste arquivo. */
@media not all and (max-width: 1200px) {
.section-landing .section-title-accessible {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0 !important;
}
}
main.section-landing { padding-top: 20px; }
.section-landing .section-intro { padding-top: 0; padding-bottom: 0; margin-bottom: 16px; }
.section-landing .section-intro > p:first-child { margin-top: 0; }
.section-landing > .section-title-accessible + p { margin-top: 0; }
@media (max-width: 600px) {
    main.section-landing { padding-top: 16px; }
    .section-landing .section-intro { margin-bottom: 12px; }
}
