:root{
  --high-contrast-text:#000000;

  --promo-bg:#5A2430;
  --promo-text:#FFFFFF;

  --theme-light-bg:#FFFFFF;
  --theme-light-surface:#FFFFFF;
  --theme-light-surface-alt:#FFFFFF;
  --theme-light-text:#111111;
  --theme-light-text-2:#222222;
  --theme-light-muted:#444444;
  --theme-light-gold:#5A2430;
  --theme-light-border:#767676;
  --theme-light-danger:#771818;

  --theme-dark-bg:#281014;
  --theme-dark-surface:#35151A;
  --theme-dark-surface-alt:#431921;
  --theme-dark-text:#FDF2F4;
  --theme-dark-text-2:#E6C8CF;
  --theme-dark-muted:#DEBAC3;
  --theme-dark-gold:#E6B98C;
  --theme-dark-border:#AD6376;
  --theme-dark-danger:#FFB0A8;

  --theme-reading-bg:#F3E7CF;
  --theme-reading-surface:#FAF2E3;
  --theme-reading-surface-alt:#E9D9BC;
  --theme-reading-text:#2A2117;
  --theme-reading-text-2:#413426;
  --theme-reading-muted:#493B2A;
  --theme-reading-gold:#5A2430;
  --theme-reading-border:#7D6849;
  --theme-reading-danger:#771818;
}
:root,[data-theme="light"]{
  color-scheme:light;
  --bg:var(--theme-light-bg);
  --surface:var(--theme-light-surface);
  --surface-alt:var(--theme-light-surface-alt);
  --text:var(--theme-light-text);
  --text-2:var(--theme-light-text-2);
  --muted:var(--theme-light-muted);
  --gold:var(--theme-light-gold);
  --border:var(--theme-light-border);
  --focus:var(--theme-light-gold);
  --danger:var(--theme-light-danger);
  --danger-soft:color-mix(in srgb,var(--danger) 10%,var(--bg));
  --on-gold:#FFFFFF;
  --shadow-color:rgba(17,17,17,.18);
  --sample-muted:color-mix(in srgb,var(--text) 34%,var(--bg));
}
[data-theme="dark"]{
  color-scheme:dark;
  --bg:var(--theme-dark-bg);
  --surface:var(--theme-dark-surface);
  --surface-alt:var(--theme-dark-surface-alt);
  --text:var(--theme-dark-text);
  --text-2:var(--theme-dark-text-2);
  --muted:var(--theme-dark-muted);
  --gold:var(--theme-dark-gold);
  --border:var(--theme-dark-border);
  --focus:var(--theme-dark-gold);
  --danger:var(--theme-dark-danger);
  --danger-soft:color-mix(in srgb,var(--danger) 18%,var(--bg));
  --on-gold:#281014;
  --shadow-color:rgba(0,0,0,.55);
  --sample-muted:color-mix(in srgb,var(--text) 34%,var(--bg));
}
[data-theme="reading"]{
  color-scheme:light;
  --bg:var(--theme-reading-bg);
  --surface:var(--theme-reading-surface);
  --surface-alt:var(--theme-reading-surface-alt);
  --text:var(--theme-reading-text);
  --text-2:var(--theme-reading-text-2);
  --muted:var(--theme-reading-muted);
  --gold:var(--theme-reading-gold);
  --border:var(--theme-reading-border);
  --focus:var(--theme-reading-gold);
  --danger:var(--theme-reading-danger);
  --danger-soft:color-mix(in srgb,var(--danger) 12%,var(--bg));
  --on-gold:#FFFFFF;
  --shadow-color:rgba(42,36,29,.2);
  --sample-muted:color-mix(in srgb,var(--text) 34%,var(--bg));
}

/* Wspólne aliasy dla wszystkich istniejących i przyszłych widoków ANM Access. */
:root{
  --ink:var(--text);
  --paper:var(--surface);
  --canvas:var(--bg);
  --line:var(--border);
  --blue:var(--gold);
  --blue-dark:var(--gold);
  --blue-soft:var(--surface-alt);
  --amber:var(--gold);
  --error:var(--danger);
  --error-bg:var(--danger-soft);
  --success:var(--gold);
  --success-bg:var(--surface-alt);
  --shadow:0 18px 45px -35px var(--shadow-color);
  --navy:var(--text);
}

html,body{background:var(--bg);color:var(--text)}
body,.site-header,.topbar,.footer,footer,.panel,.stat,.feature,.ticket-card,.input-panel,.scenario-controls,.settings-card,.compare-block{background-color:var(--surface);color:var(--text)}
.site-header,.topbar,.footer,footer{border-color:var(--border)}
a,.brand-accent,.blue-text,.eyebrow,.text-link,.ticket-details summary,.evidence-list strong{color:var(--gold)}
.subtle,.lead,.field-hint,.counter,.results-info,.ticket-meta,.preview-caption,.hint,.compare-label p,.brand small,.footer p{color:var(--muted)}
:focus-visible{outline-color:var(--focus-on-surface,var(--focus))!important}
::selection{background:var(--gold);color:var(--on-gold)}
input,textarea,select{background:var(--surface)!important;color:var(--text)!important;border-color:var(--border)!important}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
.button-primary,.note-icon,.primary-link,.preview-after .demo-button{background:var(--gold)!important;color:var(--on-gold)!important;border-color:var(--gold)!important}
.button-primary:hover,.primary-link:hover,.preview-after .demo-button:hover{background:var(--text)!important;color:var(--bg)!important;border-color:var(--text)!important}
.button-outline,.secondary-button{background:var(--surface)!important;color:var(--gold)!important;border-color:var(--gold)!important}
.button-outline:hover,.secondary-button:hover{background:var(--surface-alt)!important;color:var(--text)!important}
.button-quiet{background:var(--surface)!important;color:var(--danger)!important;border-color:var(--danger)!important}
.button-quiet:hover{background:var(--danger-soft)!important}
.message-error,.field input[aria-invalid="true"],.field select[aria-invalid="true"],.field textarea[aria-invalid="true"]{background:var(--danger-soft)!important;border-color:var(--danger)!important}
.message-error,.field-error,.message-error a{color:var(--danger)!important}
.message-success,.message-info,.settings-panel,.side-note,.admin-controls,.demo-bar,.live-message,.result{background:var(--surface-alt)!important;color:var(--text)!important;border-color:var(--border)!important}
.result.warning{background:var(--surface-alt)!important;color:var(--text)!important;border-color:var(--gold)!important}
.pill,.pill-open,.pill-done,.pill-urgent,.mock-pill,.demo-tag,.step,.feature-icon,.check-symbol{background:var(--surface-alt)!important;color:var(--gold)!important;border-color:var(--border)!important}
.hero-visual{background:var(--surface-alt)!important;border-color:var(--border)!important}
.mock-window,.mock-header,.mock-body{background:var(--surface)!important;color:var(--text)!important}
.mock-line{background:var(--border)!important;opacity:.55}
.mock-complete{color:var(--gold)!important;border-color:var(--border)!important}
.radio-cards label:has(input:checked),.choice:has(input:checked){background:var(--surface-alt)!important;border-color:var(--gold)!important}
.radio-cards input,.choice input,.check-option input,.checkbox-field input{accent-color:var(--gold)}
.intro,.evidence{background:var(--bg)!important;color:var(--text)!important}
.intro h1 span,.overline,.intro .overline,.evidence .overline,.evidence h2,.evidence-list strong,.evidence-list span,.evidence p,.intro-lead,.intro .fine,.evidence .fine a{color:inherit}
.evidence-list>div{border-color:var(--border)}
.site-preview.preview-after{background:var(--surface)!important;color:var(--text)!important;border-color:var(--border)!important}
.site-preview.preview-before{background:var(--surface)!important;color:var(--sample-muted)!important;border-color:var(--border)!important}
.preview-before .preview-top,.preview-before .preview-kicker,.preview-before .preview-content h4,.preview-before .preview-content p{color:var(--sample-muted)!important}
.preview-before .fake-button{background:var(--sample-muted)!important;color:var(--surface)!important}
.before-marker{background:var(--danger-soft)!important;color:var(--danger)!important}
.after-marker{background:var(--surface-alt)!important;color:var(--gold)!important}

/* Globalny panel dostępności: rozmiar tekstu A/AA/AAA + trzy motywy. */
.accessibility-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;min-width:0}
.theme-switcher,.text-size-switcher{display:inline-flex;align-items:center;gap:4px;padding:4px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--text);flex:0 1 auto}
.switcher-label{padding:0 8px;font-weight:350;white-space:nowrap}
.theme-switcher button,.text-size-switcher button{min-width:44px;min-height:44px;border:2px solid transparent;border-radius:999px;padding:7px 12px;background:transparent;color:var(--text);font:inherit;font-weight:350;cursor:pointer}
.theme-switcher button:hover,.text-size-switcher button:hover{border-color:var(--gold)}
.theme-switcher button[aria-pressed="true"],.text-size-switcher button[aria-pressed="true"]{background:var(--gold);color:var(--on-gold);border-color:var(--gold)}
.theme-switcher button:focus-visible,.text-size-switcher button:focus-visible{outline:3px solid var(--focus);outline-offset:3px}

@media(max-width:900px){
  .accessibility-toolbar{width:100%;justify-content:flex-start}
}
@media(max-width:760px){
  .theme-switcher,.text-size-switcher{width:100%;justify-content:stretch;flex-wrap:wrap}
  .theme-switcher button,.text-size-switcher button{flex:1}
  .switcher-label{width:100%;padding:4px 8px}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
}

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


/* Niezależny tryb wysokiego kontrastu. Zachowuje wybrany motyw, ale upraszcza powierzchnie. */
html[data-contrast="high"]{
  --bg:#FFFFFF;
  --surface:#FFFFFF;
  --surface-alt:#FFFFFF;
  --text:#000000;
  --text-2:#000000;
  --muted:#000000;
  --border:#000000;
  --gold:#5A2430;
  --focus:#5A2430;
  --on-gold:#FFFFFF;
  --shadow:none;
  --shadow-color:transparent;
}
html[data-contrast="high"] :where(.card,.audit-panel,.contact-box,.feature-panel,.report-sheet,.people-photo,.hero-note,.faq-list details,.audit-row,.status-item,.report-line,.audit-benefit-card){
  box-shadow:none!important;
  border-color:var(--text)!important;
}
html[data-contrast="high"] :where(.button,.access-tool,.access-group button,.nav-toggle){
  border-width:2px!important;
}
html[data-contrast="high"] a{text-decoration-thickness:.12em}
