/* Consent banner, accessibility widget, skip link and form helpers — taken from styles.css
   so the redesigned homepage does not need the whole legacy stylesheet. Tokens map to the app palette. */
:root {
  --color-navy: #15213a; --color-navy-deep: #0f1729; --color-white: #ffffff;
  --color-teal: #0062cc; --color-teal-hover: #0052ab; --color-teal-text: #142127; --color-teal-soft: #E1D8FC;
  --color-blue: #0062cc; --color-blue-hover: #0052ab; --color-blue-soft: #e3efff;
  --color-bg: #FAF7F2; --color-bg-card: #ffffff; --color-text: #142127; --color-text-muted: #5b6470; --color-text-soft: #5b6470;
  --color-text-on-dark: #ffffff; --color-text-on-dark-muted: #c9d2dc;
  --color-border: #e4dccd; --color-border-soft: #ece6db; --color-border-dark: #2b3854;
  --radius-sm: 0.5rem; --radius-md: 0.75rem; --radius-lg: 1rem; --radius-xl: 1.5rem; --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 33, 39, .05); --shadow-md: 0 4px 14px rgba(20, 33, 39, .06); --shadow-lg: 0 12px 40px rgba(20, 33, 39, .1);
}
.privacy-banner .btn { padding: 10px 18px; font-size: 15px; border-radius: 10px; }
.btn-teal { background: var(--color-teal); color: #fff; }
@media (hover: hover) and (pointer: fine) { .btn-teal:hover { background: var(--color-teal-hover); } }
.btn-light { background: #fff; color: var(--color-text); box-shadow: inset 0 0 0 1.5px var(--color-text); }

.skip-link {
  position: fixed;
  top: 0.5rem;
  inset-inline-start: 0.5rem;
  background: var(--color-navy);
  color: var(--color-white);
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 10000;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}
.form-checkbox input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 17px;
  height: 17px;
  accent-color: var(--color-teal-text);
  flex-shrink: 0;
  cursor: pointer;
}
.form-checkbox label {
  cursor: pointer;
}
.form-checkbox a {
  color: var(--color-blue);
  text-decoration: underline;
}

.form-success {
  text-align: center;
  padding: 3rem 1.5rem;
}
.form-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-teal-soft);
  color: var(--color-teal-text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.form-success-icon svg { width: 32px; height: 32px; }
.form-success h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 0.625rem;
}
.form-success p {
  color: var(--color-text-muted);
  font-size: 1rem;
}

.a11y-fab {
  position: fixed;
  bottom: 1.5rem;
  inset-inline-start: 1.5rem;
  z-index: 9998;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--color-blue);
  color: var(--color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
@media (hover: hover) and (pointer: fine) {
  .a11y-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
  }
}
.a11y-fab:focus-visible {
  outline: 3px solid var(--color-navy);
  outline-offset: 3px;
}
.a11y-fab svg { width: 26px; height: 26px; }
.a11y-fab, .a11y-btn, .btn-teal, .btn-light, .cookie-essential-only { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.btn-teal:active, .btn-light:active { transform: scale(.97); }
.cookie-essential-only:active { color: var(--color-navy); }
.a11y-fab:active { transform: scale(.94); }
@media (prefers-reduced-motion: reduce) { .a11y-fab:active, .btn-teal:active, .btn-light:active { transform: none; } }

.a11y-panel {
  position: fixed;
  bottom: 5.5rem;
  inset-inline-start: 1.5rem;
  z-index: 9998;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1rem;
  width: 270px;
  max-height: 80vh; /* older browsers */
  max-height: 80svh; /* phones: the visible height with the URL bar showing */
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(26, 28, 63, 0.18);
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.a11y-panel.a11y-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.a11y-panel-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 0.875rem;
  text-align: center;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--color-border-soft);
}

.a11y-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.375rem;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
  color: var(--color-navy);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-align: start;
}
@media (hover: hover) and (pointer: fine) {
  .a11y-btn:hover {
    background: var(--color-blue-soft);
    border-color: var(--color-blue);
  }
}
.a11y-btn:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}
.a11y-btn[aria-pressed="true"] {
  background: var(--color-blue);
  color: var(--color-white);
  border-color: var(--color-blue);
}
.a11y-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.a11y-btn--reset {
  margin-top: 0.5rem;
  background: transparent;
  color: var(--color-text-muted);
  justify-content: center;
  border-style: dashed;
}
@media (hover: hover) and (pointer: fine) {
  .a11y-btn--reset:hover {
    background: var(--color-bg-card);
    color: var(--color-navy);
  }
}

/* Override classes activated by widget */
html.a11y-high-contrast,
html.a11y-high-contrast body {
  background: #000 !important;
  color: #fff !important;
}
html.a11y-high-contrast * {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}
html.a11y-high-contrast a,
html.a11y-high-contrast a * { color: #ffd700 !important; }
html.a11y-high-contrast img { filter: grayscale(1) contrast(1.2); }

html.a11y-links a {
  text-decoration: underline !important;
  outline: 2px solid #ffd700 !important;
  outline-offset: 2px;
}

html.a11y-no-motion *,
html.a11y-no-motion *::before,
html.a11y-no-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html.a11y-no-motion .arc-curve circle { display: none; }

html.a11y-big-cursor,
html.a11y-big-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%232563eb' stroke='%23fff' stroke-width='1' d='M5 3l14 8-6 1.5L10 19z'/%3E%3C/svg%3E") 4 2, auto !important;
}

@media (max-width: 600px) {
  .a11y-fab { bottom: 1rem; inset-inline-start: 1rem; }
  .a11y-panel {
    bottom: 4.5rem;
    inset-inline-start: 1rem;
    width: calc(100vw - 2rem);
    max-width: 280px;
  }
}

.privacy-banner {
  position: fixed;
  bottom: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -8px 32px rgba(26, 28, 63, 0.12);
  z-index: 9990;
  animation: privacy-banner-slide 0.3s ease-out;
}
.privacy-banner[hidden] { display: none; }

@keyframes privacy-banner-slide {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.privacy-banner-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}
.privacy-banner-heading {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 0.4rem;
}
.privacy-banner-text p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: 0.875rem;
}
.privacy-banner-text a {
  color: var(--color-blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (hover: hover) and (pointer: fine) { .privacy-banner-text a:hover { color: var(--color-blue-hover); } }

.privacy-banner-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem 1.5rem;
  margin-top: 0.5rem;
}
.privacy-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
}
.privacy-toggle-disabled { color: var(--color-text-soft); cursor: default; }
.privacy-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-teal-hover);
  cursor: pointer;
}
.privacy-toggle-disabled input[type="checkbox"] { cursor: default; }

.privacy-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 180px;
}
.privacy-banner-actions .btn {
  width: 100%;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  font-size: 0.9rem;
}
.cookie-essential-only {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.4rem;
  font-family: inherit;
  transition: color 0.15s;
}
@media (hover: hover) and (pointer: fine) { .cookie-essential-only:hover { color: var(--color-navy); } }

@media (max-width: 760px) {
  .privacy-banner-inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.25rem;
  }
  .privacy-banner-actions { flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .privacy-banner-actions .btn { flex: 1 1 auto; min-width: 120px; }
  .cookie-essential-only { flex-basis: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .privacy-banner { animation: none; }
}
