.rp-consent-layer,
.rp-consent-layer * { box-sizing: border-box; }

.rp-consent-banner {
  position: fixed;
  z-index: 2147483000;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  max-width: 54rem;
  margin: 0 auto;
  padding: 1.15rem;
  border: 1px solid #8b7a6d;
  border-radius: .35rem;
  color: #211a16;
  background: #fffdf9;
  box-shadow: 0 .5rem 2rem rgb(33 26 22 / 22%);
  font: 1rem/1.45 "Latin Modern", "Computer Modern", serif;
}

.rp-consent-banner h2,
.rp-consent-dialog h2 { margin: 0 0 .5rem; font: 600 1.35rem/1.2 "Latin Modern", "Computer Modern", serif; }
.rp-consent-banner p,
.rp-consent-dialog p { margin: 0; }

.rp-consent-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  margin-top: 1rem;
}

.rp-consent-button {
  min-height: 2.8rem;
  padding: .6rem .8rem;
  border: 2px solid #7e321b;
  border-radius: .2rem;
  color: #fff;
  background: #7e321b;
  font: 700 .82rem/1.15 "Latin Modern", "Computer Modern", serif;
  letter-spacing: .04em;
  cursor: pointer;
}

.rp-consent-button:hover { color: #fff; background: #59200f; }
.rp-consent-button:focus-visible,
.rp-cookie-settings:focus-visible,
.rp-consent-dialog input:focus-visible { outline: 3px solid #1769aa; outline-offset: 3px; }

.rp-consent-dialog {
  width: min(42rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 1px solid #8b7a6d;
  border-radius: .35rem;
  color: #211a16;
  background: #fffdf9;
  font: 1rem/1.5 "Latin Modern", "Computer Modern", serif;
}

.rp-consent-dialog::backdrop { background: rgb(20 14 10 / 62%); }
.rp-consent-dialog-inner { padding: 1.4rem; }
.rp-consent-dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.rp-consent-close { flex: 0 0 auto; min-height: 2.5rem; min-width: 2.5rem; padding: .25rem; }
.rp-consent-options { margin: 1.2rem 0; border-top: 1px solid #d8d1ca; }
.rp-consent-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid #d8d1ca; }
.rp-consent-option h3 { margin: 0 0 .25rem; font: 700 1rem/1.2 "Latin Modern", "Computer Modern", serif; }
.rp-consent-option input { width: 1.35rem; height: 1.35rem; margin: .1rem; accent-color: #7e321b; }
.rp-consent-necessary { color: #4f463f; font: 700 .78rem/1.3 "Latin Modern", "Computer Modern", serif; text-transform: uppercase; }
.rp-consent-save { width: 100%; }

.rp-footer-controls[data-rp-footer-controls="v1"] {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(14px, 3vw, 26px);
  width: min(calc(100% - 40px), 1040px);
  margin: 0 auto;
  padding: 18px 0 22px;
  border-top: 1px solid #d8d1ca;
  color: #665b53;
  background: transparent;
  font: 700 .69rem/1.15 "Latin Modern", "Computer Modern", serif;
  letter-spacing: .08em;
}

.rp-footer-controls[data-rp-footer-controls="v1"] > a,
.rp-footer-controls[data-rp-footer-controls="v1"] > .rp-cookie-settings {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  align-items: center;
  justify-content: flex-start !important;
  min-height: 44px !important;
  padding: 0 !important;
  border: 0 !important;
  color: #ad4c28 !important;
  background: transparent !important;
  font: inherit !important;
  letter-spacing: inherit !important;
  text-decoration: underline !important;
  text-transform: uppercase !important;
  text-align: left !important;
  text-underline-offset: .2em !important;
  white-space: nowrap !important;
}
.rp-footer-controls[data-rp-footer-controls="v1"] > .rp-cookie-settings { cursor: pointer; }
.rp-consent-status { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rp-test-panel { position: fixed; z-index: 2147482999; top: .5rem; right: .5rem; max-width: min(30rem, calc(100% - 1rem)); max-height: 35vh; overflow: auto; padding: .65rem; border: 2px dashed #1769aa; color: #111; background: #eef8ff; font: .72rem/1.35 monospace; pointer-events: none; white-space: pre-wrap; }

/* Page footers may position this explicitly versioned component differently,
   but typography, colour, underline and tap size stay owned here. */
body[data-page-type="journal_article"] .site-footer .rp-footer-controls[data-rp-footer-controls="v1"],
body[data-page-type="brand_story"] .site-footer .rp-footer-controls[data-rp-footer-controls="v1"] {
  width: 100%;
}

body[data-page-type="brand_story"] .site-footer .rp-footer-controls[data-rp-footer-controls="v1"] {
  flex: 0 0 100%;
}

@media (max-width: 620px) {
  .rp-consent-actions { grid-template-columns: 1fr; }
  .rp-consent-banner { right: .5rem; bottom: .5rem; left: .5rem; }
}

@media (max-width: 360px) {
  .rp-footer-controls[data-rp-footer-controls="v1"] {
    gap: 8px !important;
    font-size: .58rem;
    letter-spacing: .04em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rp-consent-layer * { scroll-behavior: auto !important; transition: none !important; }
}
