/* Opções de acessibilidade do 6th ISTB: painel e modos visuais.
   Fotografias, logomarcas, crachás e certificados mantêm suas cores originais. */

/* ---------- Painel ---------- */
.a11y-panel{position:fixed;z-index:45;top:calc(var(--a11y-top-h,64px) + .5rem);right:max(.5rem,calc((100vw - 1120px)/2));width:min(27rem,calc(100vw - 1rem));max-height:calc(100vh - var(--a11y-top-h,64px) - var(--a11y-nav-h,72px) - 1.25rem);max-height:calc(100dvh - var(--a11y-top-h,64px) - var(--a11y-nav-h,72px) - 1.25rem);overflow-y:auto;overscroll-behavior:contain;padding:1.1rem 1.15rem 1.25rem;border:2px solid var(--petrol);border-radius:18px;background:var(--paper);color:var(--ink);box-shadow:0 18px 55px rgba(4,45,40,.28);text-align:start}
.a11y-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem;margin-bottom:.4rem}
.a11y-panel h2{margin:0;padding-top:.35rem;font-size:1.35rem;line-height:1.2;color:var(--petrol);letter-spacing:-.01em}
.a11y-panel h2:focus{outline:none}
.a11y-panel h2:focus-visible{outline:3px solid #000;outline-offset:3px;box-shadow:0 0 0 6px #ffd200;border-radius:4px}
.a11y-panel h3,.a11y-panel legend{margin:0 0 .55rem;padding:0;font:800 1rem/1.3 Outfit,sans-serif;color:var(--petrol);letter-spacing:0}
.a11y-intro{margin:0 0 .9rem;color:var(--muted);font-size:.92rem;line-height:1.5}
.a11y-group{margin:0 0 .9rem;padding:.9rem 0 0;border:0;border-top:1px solid var(--line);min-width:0}
.a11y-group>legend{float:left;width:100%}
.a11y-group>legend+*{clear:both}
.a11y-meter{margin:0 0 .55rem;font-size:.92rem}
.a11y-meter output{font-weight:800;color:var(--petrol)}
.a11y-buttons{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,9.5rem),1fr));gap:.5rem}
.a11y-btn,.a11y-close,.a11y-reset{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;min-height:48px;padding:.55rem .8rem;border:2px solid var(--petrol);border-radius:12px;background:var(--paper);color:var(--petrol);font-weight:800;line-height:1.25;text-align:center;white-space:normal}
.a11y-btn:hover,.a11y-close:hover{background:#e4f0e8}
.a11y-btn[aria-disabled="true"]{border-style:dashed;color:var(--muted);border-color:var(--muted);background:transparent;cursor:not-allowed}
.a11y-btn [aria-hidden="true"],.a11y-close [aria-hidden="true"]{font-size:1.05em}
.a11y-close{flex:none;min-width:48px;padding:.45rem .7rem}
.a11y-reset{width:100%;margin-top:.2rem;background:var(--petrol);color:#fff}
.a11y-reset:hover{background:#0a554e}
.a11y-option{display:flex;align-items:flex-start;gap:.7rem;min-height:48px;margin:0 0 .5rem;padding:.65rem .75rem;border:1px solid var(--line);border-radius:12px;background:#fff;cursor:pointer}
.a11y-option:hover{border-color:var(--petrol)}
.a11y-option input{flex:none;width:1.35rem;height:1.35rem;margin:.1rem 0 0;accent-color:var(--petrol);cursor:pointer}
.a11y-option input:disabled{cursor:not-allowed}
.a11y-option span{display:flex;flex-direction:column;gap:.15rem;min-width:0}
.a11y-option strong{font-weight:800;line-height:1.3}
.a11y-option small{color:var(--muted);font-size:.84rem;line-height:1.45}
.a11y-option:has(input:checked){border-color:var(--petrol);background:#eef6f1}
.a11y-shortcuts{display:grid;gap:.45rem;margin:0;padding:0;list-style:none}
.a11y-shortcuts a{display:flex;align-items:center;min-height:48px;padding:.55rem .8rem;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--petrol);font-weight:800;text-decoration:underline;text-underline-offset:.2em}
.a11y-shortcuts a::before{content:"→";margin-inline-end:.55rem;text-decoration:none}
.a11y-shortcuts a:hover{border-color:var(--petrol)}
.a11y-note{margin:.9rem 0 0;color:var(--muted);font-size:.85rem;line-height:1.5}
/* Foco evidente dentro do painel, visível sobre fundos claros e escuros. */
.a11y-panel :focus-visible{outline:3px solid #000!important;outline-offset:2px!important;box-shadow:0 0 0 5px #ffd200!important}
[data-a11y-target]{scroll-margin-top:calc(var(--a11y-top-h,64px) + .75rem)}
@media(max-width:750px){.a11y-panel{right:.5rem;left:.5rem;width:auto}}

/* ---------- Tamanho do texto (até 200%) ---------- */
html[data-a11y-text="125"]{font-size:125%}
html[data-a11y-text="150"]{font-size:150%}
html[data-a11y-text="175"]{font-size:175%}
html[data-a11y-text="200"]{font-size:200%}

/* Ajustes de layout para texto ampliado ou espaçamento confortável: nada cortado ou sobreposto. */
html.a11y-adapt body{overflow-wrap:break-word;hyphens:auto}
html.a11y-adapt h1{font-size:clamp(2rem,1.4rem + 2.2vw,3.5rem)}
html.a11y-adapt h2{font-size:clamp(1.5rem,1.1rem + 1.6vw,2.2rem)}
html.a11y-adapt .topbar{height:auto;min-height:60px;flex-wrap:wrap;row-gap:.35rem;padding-top:.35rem;padding-bottom:.35rem}
html.a11y-adapt .bottom-nav{height:auto;min-height:calc(68px + env(safe-area-inset-bottom))}
html.a11y-adapt .bottom-nav button{padding:.3rem .15rem;text-align:center;line-height:1.2}
html.a11y-adapt main{padding-bottom:calc(var(--a11y-nav-h,72px) + 1.5rem)}
html.a11y-adapt .toast{bottom:calc(var(--a11y-nav-h,72px) + .75rem)}
html.a11y-adapt .admin-tabs{top:var(--a11y-top-h,64px)}
html.a11y-adapt .form-panel{scroll-margin-top:calc(var(--a11y-top-h,64px) + 1rem)}
html.a11y-adapt .language-panel{top:calc(var(--a11y-top-h,64px) + .4rem);max-height:calc(100dvh - var(--a11y-top-h,64px) - var(--a11y-nav-h,72px) - 1rem);overflow-y:auto}
html.a11y-adapt .tabs{flex-wrap:wrap;overflow:visible}
html.a11y-adapt .quick-tile{min-height:auto;padding:1.1em}
html.a11y-adapt .spotlight-button{width:1.4em;height:1.4em}
html.a11y-adapt .committee-num,html.a11y-adapt .team-symbol,html.a11y-adapt .team-number{width:auto;height:auto;min-width:2.6rem;min-height:2.6rem}
html.a11y-adapt .activity{grid-template-columns:auto minmax(0,1fr) auto}
html.a11y-adapt .activity-index{width:auto;height:auto;min-width:2.1em;min-height:2.1em;padding:.15em}
html.a11y-adapt .committee-item summary small{display:block;-webkit-line-clamp:unset;overflow:visible}
html.a11y-adapt .committee-item summary,html.a11y-adapt .team-item summary{min-height:0}
html.a11y-adapt .activity-buttons .button,html.a11y-adapt .badge-tab{white-space:normal}
/* Crachá: prévia fiel ao modelo impresso, com textos em proporção fixa para não serem cortados. */
html[data-a11y-text] .badge-theme{font-size:18.24px}
html[data-a11y-text] .badge-person{font-size:28px}
html[data-a11y-text] .badge-institution{font-size:13.12px}
html[data-a11y-text] .badge-kind{font-size:22.72px}
html[data-a11y-text] .badge-function,html[data-a11y-text] .badge-date{font-size:11.2px}

html[data-a11y-text="150"] .grid.three,html[data-a11y-text="175"] .grid.three,html[data-a11y-text="200"] .grid.three,
html[data-a11y-text="150"] .insight-stats,html[data-a11y-text="175"] .insight-stats,html[data-a11y-text="200"] .insight-stats,
html[data-a11y-text="150"] .organizer-technical-members,html[data-a11y-text="175"] .organizer-technical-members,html[data-a11y-text="200"] .organizer-technical-members{grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-a11y-text="150"] .quick-grid,html[data-a11y-text="175"] .quick-grid,html[data-a11y-text="200"] .quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-a11y-text="150"] .committee-body,html[data-a11y-text="175"] .committee-body,html[data-a11y-text="200"] .committee-body,
html[data-a11y-text="150"] .team-body,html[data-a11y-text="175"] .team-body,html[data-a11y-text="200"] .team-body,
html[data-a11y-text="150"] .committee-body .team-body,html[data-a11y-text="175"] .committee-body .team-body,html[data-a11y-text="200"] .committee-body .team-body{padding-left:1.1rem}
html[data-a11y-text="150"] .organizer-technical-person,html[data-a11y-text="175"] .organizer-technical-person,html[data-a11y-text="200"] .organizer-technical-person{border-right:0!important;padding-right:0!important}
html[data-a11y-text="175"] .grid.two,html[data-a11y-text="200"] .grid.two,
html[data-a11y-text="175"] .grid.three,html[data-a11y-text="200"] .grid.three,
html[data-a11y-text="175"] .organizer-technical-members,html[data-a11y-text="200"] .organizer-technical-members{grid-template-columns:1fr}
@media(max-width:1000px){
  html[data-a11y-text="150"] .form-grid,html[data-a11y-text="175"] .form-grid,html[data-a11y-text="200"] .form-grid,
  html[data-a11y-text="150"] .choice-grid,html[data-a11y-text="175"] .choice-grid,html[data-a11y-text="200"] .choice-grid,
  html[data-a11y-text="150"] .day-scroll,html[data-a11y-text="175"] .day-scroll,html[data-a11y-text="200"] .day-scroll{display:grid;grid-template-columns:1fr;overflow:visible}
  html[data-a11y-text="150"] .day-card,html[data-a11y-text="175"] .day-card,html[data-a11y-text="200"] .day-card{flex:none}
  html[data-a11y-text] .mission-workspace{grid-template-columns:1fr}
}
@media(max-width:750px){
  html.a11y-adapt .activity{grid-template-columns:auto minmax(0,1fr)}
  html[data-a11y-text="150"] .stat-row,html[data-a11y-text="175"] .stat-row,html[data-a11y-text="200"] .stat-row,
  html[data-a11y-text="150"] .insight-stats,html[data-a11y-text="175"] .insight-stats,html[data-a11y-text="200"] .insight-stats,
  html[data-a11y-text="150"] .grid.two,html[data-a11y-text="175"] .grid.two,html[data-a11y-text="200"] .grid.two,
  html[data-a11y-text="150"] .grid.three,html[data-a11y-text="175"] .grid.three,html[data-a11y-text="200"] .grid.three,
  html[data-a11y-text="150"] .organizer-technical-members,html[data-a11y-text="175"] .organizer-technical-members,html[data-a11y-text="200"] .organizer-technical-members,
  html[data-a11y-text="150"] .event-organizers .organizer-logos,html[data-a11y-text="175"] .event-organizers .organizer-logos,html[data-a11y-text="200"] .event-organizers .organizer-logos{grid-template-columns:1fr}
  html[data-a11y-text="150"] .event-organizers .organizer-logo,html[data-a11y-text="175"] .event-organizers .organizer-logo,html[data-a11y-text="200"] .event-organizers .organizer-logo{padding-right:0!important;border-right:0!important}
  html[data-a11y-text] .data-bar{grid-template-columns:1fr auto}
  html[data-a11y-text] .data-bar>div{grid-column:1/-1;grid-row:2}
  html[data-a11y-text] .footer-inner{grid-template-columns:1fr}
}
@media(max-width:600px){
  html[data-a11y-text="150"] .quick-grid,html[data-a11y-text="175"] .quick-grid,html[data-a11y-text="200"] .quick-grid{grid-template-columns:1fr}
  html[data-a11y-text] .quick-tile{min-height:0}
  /* Navegação inferior com rótulos completos em duas linhas quando o texto está muito ampliado. */
  html[data-a11y-text="175"] .bottom-nav,html[data-a11y-text="200"] .bottom-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;padding-top:4px}
  html[data-a11y-text="175"] .bottom-nav button,html[data-a11y-text="200"] .bottom-nav button{min-height:44px;max-width:none}
  html[data-a11y-text="175"] .bottom-nav button span,html[data-a11y-text="200"] .bottom-nav button span{display:none}
  html[data-a11y-text] .top-action{min-width:44px;min-height:44px}
}

/* ---------- Espaçamento confortável ---------- */
html.a11y-spacing body{line-height:1.8}
html.a11y-spacing :is(p,li,dd,dt,label,small,td,th,legend,summary,blockquote,figcaption,.meta,.pill):not(.badge-card *):not(.print-certificate *){line-height:1.8!important;letter-spacing:.05em!important;word-spacing:.12em!important}
html.a11y-spacing :is(h1,h2,h3,h4):not(.badge-card *):not(.print-certificate *){line-height:1.35!important;letter-spacing:.02em!important;word-spacing:.1em!important}
html.a11y-spacing :is(button,.button,a,input,select,textarea,strong,span):not(.badge-card *):not(.print-certificate *){letter-spacing:.04em;word-spacing:.1em}
html.a11y-spacing :is(p,ul,ol):not(.badge-card *):not(.print-certificate *):not(:last-child){margin-bottom:1.5em}
html.a11y-spacing li+li{margin-top:.55em}
html.a11y-spacing :is(.button,.tabs button,.a11y-btn){line-height:1.45;padding-top:.7em;padding-bottom:.7em;height:auto}
html.a11y-spacing .field{gap:.55rem}
html.a11y-spacing .bottom-nav button span{line-height:1.2}

/* ---------- Destacar links e controles ---------- */
html.a11y-links a:not(.button):not(.organizer-link),html.a11y-links .text-link{text-decoration:underline!important;text-decoration-thickness:max(2px,.08em)!important;text-underline-offset:.22em}
html.a11y-links :is(.button,.top-action,.tabs button,.badge-tab,.quick-tile,.day-card,.text-link,.brand,.bottom-nav button,.language-options button,.spotlight-button,.language-close){box-shadow:0 0 0 2px var(--paper),0 0 0 4px var(--ink)}
html.a11y-links .footer .button,html.a11y-links .spotlight-button,html.a11y-links .mini-banner .button{box-shadow:0 0 0 2px var(--petrol),0 0 0 4px #fff}
html.a11y-links :is(.field input,.field select,.field textarea,.attendance-form input,.attendance-form select,.coordinator-card input,.simulation select,.mission-tool textarea){border:2px solid var(--ink)!important}
html.a11y-links summary{text-decoration:underline;text-underline-offset:.2em}
html.a11y-links .choice{border:2px solid var(--ink)}
html.a11y-links .bottom-nav .nav-active,html.a11y-links .tabs button[aria-selected="true"],html.a11y-links .badge-tab[aria-pressed="true"]{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:.25em}
html.a11y-links .organizer-link{outline:2px dashed var(--ink);outline-offset:4px}
html.a11y-links :focus-visible{outline:3px solid #000!important;outline-offset:2px!important;box-shadow:0 0 0 5px #ffd200!important}

/* ---------- Alto contraste (WCAG 2.2 AA ou superior) ---------- */
html.a11y-contrast{--ink:#000;--petrol:#00302b;--teal:#004a4a;--terracotta:#8a2b14;--gold:#7a4d00;--cream:#fff;--paper:#fff;--line:#1f2f2c;--muted:#1f2f2c;--shadow:none}
html.a11y-contrast body{background:#fff;color:#000}
html.a11y-contrast .topbar{background:#fff;border-bottom:2px solid #000;box-shadow:none;backdrop-filter:none}
html.a11y-contrast .topbar .brand,html.a11y-contrast .topbar-date{color:#000!important}
html.a11y-contrast .bottom-nav{border-top:2px solid #000;box-shadow:none}
html.a11y-contrast .bottom-nav button{color:#000}
html.a11y-contrast .bottom-nav .nav-active{background:var(--petrol);color:#fff;text-decoration:underline;text-underline-offset:.2em}
html.a11y-contrast .top-action,html.a11y-contrast .language-options button{background:#fff;border:2px solid #000;color:#000}
html.a11y-contrast a:not(.button):not(.organizer-link),html.a11y-contrast .text-link{color:var(--teal);text-decoration:underline;text-underline-offset:.2em}
html.a11y-contrast .footer a{color:#fff}
html.a11y-contrast .button.secondary,html.a11y-contrast .button.tertiary,html.a11y-contrast .tabs button,html.a11y-contrast .badge-tab{border:2px solid #000;background:#fff;color:#000}
html.a11y-contrast .button:not(.secondary):not(.tertiary),html.a11y-contrast .tabs button[aria-selected="true"],html.a11y-contrast .badge-tab[aria-pressed="true"]{border:2px solid #000;background:var(--petrol);color:#fff}
html.a11y-contrast .mini-banner .button{background:#fff;color:var(--petrol);border-color:#fff}
html.a11y-contrast button:disabled,html.a11y-contrast .button:disabled{opacity:1;border-style:dashed;color:#333;background:#eee}
html.a11y-contrast :is(.card,.quick-tile,.day-card,.committee-item,.team-item,.activity,.form-panel,.choice,.notice,.discovery,.remote-broadcast,.mission-guide,.mission-tools,.badge-display,.empty,.classification-fieldset,.edit-item,.language-panel,.now-card,.attendance-table-wrap,.chart-empty,.simulation-step,.a11y-option,.a11y-shortcuts a){border:2px solid #000!important;box-shadow:none!important}
html.a11y-contrast .activity{border-left-width:6px!important}
html.a11y-contrast :is(.field input,.field select,.field textarea,.attendance-form input,.attendance-form select,.coordinator-card input,.simulation select,.mission-tool textarea){border:2px solid #000;background:#fff;color:#000}
html.a11y-contrast ::placeholder{color:#4a4a4a;opacity:1}
html.a11y-contrast :is(.field small,.muted,.meta,.home-disclaimer,.day-card small,.committee-item summary small,.team-item summary small){color:#1f2f2c}
html.a11y-contrast :is(.pill,.pill.gold,.pill.red){border:1px solid currentColor}
html.a11y-contrast .notice{background:#fff!important;color:#000!important;border:2px solid #000!important;border-left:6px solid #000!important}
html.a11y-contrast .notice-title,html.a11y-contrast .notice-body{color:#000!important}
html.a11y-contrast .notice-dot{background:#000!important;box-shadow:none!important}
html.a11y-contrast .quick-tile{background:#000!important;border:2px solid #000!important;color:#fff!important}
html.a11y-contrast .quick-title{color:#fff!important}
html.a11y-contrast .quick-desc{color:#fff!important;opacity:1!important}
html.a11y-contrast :is(.opening-card,.remote-broadcast,.discovery,.fit-note,.deliverable-note,.coordinator-slot){background:#fff!important;color:#000!important}
html.a11y-contrast .opening-card h3,html.a11y-contrast .opening-card .opening-date,html.a11y-contrast .opening-card p{color:#000!important;text-shadow:none!important}
html.a11y-contrast .opening-card::after{display:none!important}
html.a11y-contrast .spotlight{background:var(--petrol)}
html.a11y-contrast .event-organizers{border-top:2px solid #000}
html.a11y-contrast .a11y-panel{border-color:#000;box-shadow:0 0 0 2px #fff,0 18px 55px rgba(0,0,0,.4)}
html.a11y-contrast .a11y-btn,html.a11y-contrast .a11y-close{border-color:#000;color:#000}
html.a11y-contrast .a11y-option:has(input:checked){background:#e6f2ee}
html.a11y-contrast :focus-visible{outline:3px solid #000!important;outline-offset:2px!important;box-shadow:0 0 0 5px #ffd200!important}
/* Crachás e certificados conservam as cores institucionais originais. */
html.a11y-contrast :is(.print-certificate,.badge-card){--ink:#183632;--petrol:#073f3a;--teal:#0a6464;--terracotta:#b65239;--gold:#e5a540;--cream:#fcf8ed;--paper:#fffdf8;--line:#e6dfd3;--muted:#5e706c}

/* ---------- Redução de movimento (preferência do painel ou do sistema) ---------- */
html.a11y-motion,html.a11y-motion *,html.a11y-motion *::before,html.a11y-motion *::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;animation-delay:0s!important;transition-duration:.01ms!important;transition-delay:0s!important}
html.a11y-motion :is(.quick-tile:hover,.quick-tile:active){transform:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){
  html,*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;animation-delay:0s!important;transition-duration:.01ms!important;transition-delay:0s!important}
  :is(.quick-tile:hover,.quick-tile:active){transform:none!important;transition:none!important}
}

/* Modo de cores forçadas do sistema (Windows): mantém bordas e foco visíveis. */
@media(forced-colors:active){
  .a11y-panel,.a11y-btn,.a11y-close,.a11y-reset,.a11y-option,.a11y-shortcuts a{border:2px solid CanvasText}
  .a11y-panel :focus-visible{outline:3px solid Highlight!important;box-shadow:none!important}
}
