/* UniHouse — the theme's side of the accessibility panel (cd-accessibilita 1.0, LEGGIMI.md «Il patto con il tema»).
   The theme declares cd-a11y-testo, cd-a11y-contrasto, cd-a11y-semplice and cd-a11y-lettura (functions.php) and styles them
   here. The same rules are in candidature/stile.css (section «Accessibilità»): change them together. */

/* ── text size: the whole type scale is in rem (token.css), so the root size is enough ── */
html.cd-a11y-testo-grande { font-size: 115%; }
html.cd-a11y-testo-molto { font-size: 130%; }
/* The side menu (candidature/parti/menu.php) is written in px: the same sizes in rem, so it grows too */
html.cd-a11y-testo .uhm-voci b { font-size: 1rem; }
html.cd-a11y-testo .uhm-voci span { font-size: .8125rem; }
html.cd-a11y-testo .uhm-azioni a { font-size: .9375rem; }

/* ── high contrast: black text on white, dark green for everything that was light green or gold on white ── */
html.cd-a11y-contrasto {
  --verde: #1B3B2D; --verde-chiaro: #fff; --oro-chiaro: #fff; --oro-scuro: #5c4508; --crema: #fff;
  --ink: #000; --muto: #1d2a24; --riga: #1d2a24; --ombra: 0 0 0 2px #1d2a24;
}
html.cd-a11y-contrasto body { background: #fff; color: #000; }
html.cd-a11y-contrasto :is(.sez--primary, .sez--secondary, .eroe, .piede) { color: #fff; }
html.cd-a11y-contrasto :is(.piede-diritti, .eroe-sotto) { color: #fff; }
html.cd-a11y-contrasto .sez--foto .sez-velo { background: rgba(8, 18, 13, .86) !important; }
html.cd-a11y-contrasto a:not(.pulsante, .barra-wa, .uh-bando-bottone, [class*="uhm-"]) { text-decoration-line: underline; }
html.cd-a11y-contrasto :is(.scheda, .uh-passo) { border: 2px solid #1d2a24; }

/* Bigger text on a narrow phone: grids with a minimum width in rem (one inline in the home, from the YOOtheme conversion) never
   wider than their box, and long words or addresses wrap instead of pushing the page sideways */
html.cd-a11y-testo [style*="minmax(15rem"] { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)) !important; }
html:is(.cd-a11y-testo, .cd-a11y-spazi) body { overflow-wrap: anywhere; }

/* ── simplified page: one column, the photo of the first screen gives way to a plain dark green ── */
html.cd-a11y-semplice :is(.riga, .griglia-2, .schede, .uhd-cats) { grid-template-columns: 1fr !important; margin-left: 0 !important; }
html.cd-a11y-semplice .riga--divisa > .col { padding-left: 0 !important; border-left: 0 !important; }
html.cd-a11y-semplice .riga--divisa > .col::before { display: none; }
html.cd-a11y-semplice .sez--foto .sez-foto { display: none; }
html.cd-a11y-semplice .sez--foto .sez-velo { background: var(--verde-scuro) !important; }
html.cd-a11y-semplice .uh-flusso { flex-direction: column; }
html.cd-a11y-semplice .uh-freccia { display: none; }

/* ── reading mode: the buttons made of links and the tender strip are not text to read ── */
html.cd-a11y-lettura-pronta .cd-lettura-radice :is(.pulsante, .el-content.pulsante, .uh-bando-bottone, .uhd-barra, .uhd-vai, .contatore-barra) { display: none !important; }
