:root {
  --consent-ink: #20222a;
  --consent-muted: #626777;
  --consent-border: #d8dbe4;
  --consent-surface: #fff;
  --consent-accent: #275efe;
}

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

.consent-modal-open { overflow: hidden; }

.consent-banner {
  position: fixed;
  z-index: 10000;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  max-width: 76rem;
  margin: auto;
  padding: 1.25rem;
  color: var(--consent-ink);
  background: var(--consent-surface);
  border: 1px solid var(--consent-border);
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgb(20 25 40 / 0.22);
}

.consent-banner[hidden], .consent-modal[hidden] { display: none !important; }
.consent-banner h2, .consent-modal h2, .consent-modal h3 { margin: 0; color: var(--consent-ink); }
.consent-banner h2 { font-size: 1.125rem; }
.consent-banner p, .consent-modal p { margin: 0.4rem 0 0; color: var(--consent-muted); line-height: 1.55; }
.consent-banner a, .consent-modal a { color: var(--consent-accent); text-decoration: underline; text-underline-offset: 2px; }
.consent-banner__actions, .consent-modal__actions { display: flex; flex-wrap: wrap; gap: 0.625rem; }

.consent-button {
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  color: var(--consent-ink);
  font: inherit;
  font-weight: 700;
  background: #fff;
  border: 2px solid var(--consent-ink);
  border-radius: 0.65rem;
  cursor: pointer;
}

.consent-button:hover { background: #f3f4f7; }
.consent-button:focus-visible, .consent-modal__close:focus-visible, .consent-toggle input:focus-visible + span { outline: 3px solid #ffbf47; outline-offset: 3px; }

.consent-modal { position: fixed; z-index: 10001; inset: 0; display: grid; place-items: center; padding: 1rem; }
.consent-modal__backdrop { position: absolute; inset: 0; background: rgb(15 18 28 / 0.72); }
.consent-modal__panel { position: relative; width: min(46rem, 100%); max-height: calc(100vh - 2rem); overflow: auto; padding: 1.5rem; background: #fff; border-radius: 1rem; box-shadow: 0 24px 80px rgb(0 0 0 / 0.32); }
.consent-modal__header { display: flex; gap: 1rem; justify-content: space-between; align-items: flex-start; }
.consent-modal__header h2 { font-size: 1.4rem; }
.consent-modal__close { flex: 0 0 auto; width: 2.5rem; height: 2.5rem; color: var(--consent-ink); font-size: 1.75rem; line-height: 1; background: #fff; border: 1px solid var(--consent-border); border-radius: 50%; cursor: pointer; }
.consent-categories { display: grid; gap: 0.75rem; margin: 1.25rem 0; }
.consent-category { padding: 1rem; border: 1px solid var(--consent-border); border-radius: 0.75rem; }
.consent-category__heading { display: flex; gap: 1rem; justify-content: space-between; align-items: center; }
.consent-category h3 { font-size: 1rem; }
.consent-category p { font-size: 0.9rem; }
.consent-category small { color: #24733f; font-weight: 700; }
.consent-toggle { position: relative; flex: 0 0 auto; width: 3rem; height: 1.75rem; }
.consent-toggle input { position: absolute; opacity: 0; }
.consent-toggle > span:last-child { position: absolute; inset: 0; background: #858b99; border-radius: 999px; cursor: pointer; transition: background 0.16s ease; }
.consent-toggle > span:last-child::after { content: ''; position: absolute; top: 0.25rem; left: 0.25rem; width: 1.25rem; height: 1.25rem; background: #fff; border-radius: 50%; transition: transform 0.16s ease; }
.consent-toggle input:checked + span { background: #24733f; }
.consent-toggle input:checked + span::after { transform: translateX(1.25rem); }
.consent-toggle--locked > span:last-child { cursor: not-allowed; opacity: 0.72; }
.consent-modal__policy { margin-bottom: 1rem !important; }
.consent-modal__actions { justify-content: flex-end; }

.consent-resource-placeholder {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 1rem;
  text-align: center;
  color: #333;
  background: #f2f3f5;
}
.consent-resource-placeholder[hidden] { display: none !important; }
.consent-resource-placeholder p { margin: 0 0 0.75rem; }
.consent-resource-placeholder .consent-button { background: transparent; }

.footer-privacy-button {
  padding: 0;
  color: inherit;
  font: inherit;
  background: transparent;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.footer-privacy-button:focus-visible { outline: 3px solid #ffbf47; outline-offset: 3px; }

.form-privacy-notice {
  margin: 0.75rem 0;
  color: #5f6470;
  font-size: 0.82rem;
  line-height: 1.5;
}

.form-privacy-notice a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 760px) {
  .consent-banner { grid-template-columns: 1fr; }
  .consent-banner__actions, .consent-modal__actions { display: grid; grid-template-columns: 1fr; }
  .consent-button { width: 100%; }
  .consent-modal__panel { padding: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .consent-toggle > span:last-child, .consent-toggle > span:last-child::after { transition: none; }
}

.privacy-main { padding: 2.5rem 0 4rem; background: #f7f7f8; }
.privacy-main .privacy-document { max-width: 58rem; padding: 2rem; color: #252832; background: #fff; border: 1px solid #e2e3e8; border-radius: 1rem; }
.privacy-document h1 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); }
.privacy-document h2 { margin: 2rem 0 0.65rem; font-size: 1.3rem; }
.privacy-document p, .privacy-document li { line-height: 1.65; }
.privacy-version { color: #6b7080; }
.privacy-review-warning { margin: 1.5rem 0; padding: 1rem; color: #6c3e00; background: #fff4d6; border: 1px solid #e7bd57; border-radius: 0.75rem; line-height: 1.55; }
.privacy-table-wrap { overflow-x: auto; }
.privacy-document table { width: 100%; border-collapse: collapse; }
.privacy-document th, .privacy-document td { padding: 0.75rem; text-align: left; vertical-align: top; border: 1px solid #dfe1e6; }
.privacy-document th { background: #f3f4f7; }
.privacy-document section:last-child .consent-button { margin-top: 1rem; }

@media (max-width: 760px) {
  .privacy-main .privacy-document { padding: 1.25rem; }
}
