/* ============================================================
   CONSENT BANNER
   ============================================================

   A parchment plate on a hairline rule along the foot of the page,
   not a dark slab across it. This is the first thing a first-time
   visitor sees, and on a site whose argument is "we explain things
   before we do them" it has to look like part of that argument
   rather than a compliance object bolted on afterwards.

   It does not dim the page behind it and it does not trap focus.
   Nothing here is a modal: the visitor is free to read the site and
   answer later, and nothing loads while they decide.

   ACCEPT AND DECLINE ARE THE SAME CONTROL. Same size, same colour,
   same weight, side by side. A solid Accept next to a faint link is
   the pattern regulators have repeatedly ruled invalid, and it is
   also just dishonest. Do not restyle one of them to stand out.

   THE GOLD LAW HOLDS. --gold (#c89116) is 2.68:1 on parchment and
   sets no text here. Buttons are Ink grounds with parchment type.
   ============================================================ */

.consent {
  position: fixed;
  z-index: 60;
  right: 0;
  bottom: 0;
  left: 0;
  padding: var(--sp-4);
  pointer-events: none;
}

.consent[hidden] {
  display: none;
}

.consent-panel {
  pointer-events: auto;
  max-width: 64rem;
  margin-inline: auto;
  padding: var(--sp-5);
  background: var(--parchment);
  border: 1px solid var(--rule-soft);
  border-top: 2px solid var(--ink);
  box-shadow: 0 -2px 24px rgba(26, 18, 11, 0.14);
}

@media (min-width: 48rem) {
  .consent-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: var(--sp-5);
    padding: var(--sp-5) var(--sp-6);
  }

  /* The expanded detail spans both columns, under the copy and the
     buttons, so opening it pushes nothing sideways. */
  .consent-choices {
    grid-column: 1 / -1;
  }
}

.consent-title {
  margin: 0 0 var(--sp-2);
  font-size: 1.0625rem;
  line-height: 1.3;
}

.consent-copy p {
  margin: 0;
  max-width: 62ch;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.consent-copy a {
  color: var(--gold-deep);
  text-underline-offset: 0.2em;
}

/* ---------- the controls ---------- */

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

@media (min-width: 48rem) {
  .consent-actions {
    margin-top: 0;
  }
}

.consent-btn {
  flex: none;
  min-width: 7.5rem;
  padding: 0.7rem var(--sp-5);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--caps);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.consent-btn:hover,
.consent-btn:focus-visible {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
  color: var(--parchment);
}

/* "Choose" is the only control allowed to look quieter than the other
   two, because it is not an answer — it opens the detail. Accept and
   Decline remain identical to each other. */
.consent-more {
  padding: 0.7rem var(--sp-3);
  border: 0;
  background: none;
  color: var(--gold-deep);
  font-family: var(--caps);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 1px solid transparent;
}

.consent-more:hover,
.consent-more:focus-visible {
  border-bottom-color: var(--gold-deep);
}

.consent :focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}

/* The panel takes focus when the banner opens so a keyboard user lands inside
   it, but it is a container, not a control - outlining the whole plate would
   just look like an error state. */
.consent-panel:focus,
.consent-panel:focus-visible {
  outline: none;
}

/* ---------- the per-category detail ---------- */

.consent-choices {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--rule-soft);
}

.consent-choices[hidden] {
  display: none;
}

.consent-choice {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  cursor: pointer;
}

.consent-choice input {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: var(--ink);
}

.consent-choice input:disabled {
  cursor: not-allowed;
}

.consent-choice strong {
  display: block;
  font-size: 0.9375rem;
}

.consent-choice-note {
  display: block;
  margin-top: 0.15rem;
  max-width: 62ch;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted, inherit);
}

.consent-gpc {
  margin: 0 0 var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--cream);
  border-left: 2px solid var(--gold-deep);
  font-size: 0.875rem;
  line-height: 1.5;
}

.consent-gpc[hidden] {
  display: none;
}

/* ---------- the footer link that reopens it ---------- */

/* A button, not a link, because it opens a dialog rather than going
   anywhere — but it has to sit in a row of footer links without
   looking like a stray form control. */
.consent-reopen {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.consent-reopen:hover,
.consent-reopen:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (prefers-reduced-motion: reduce) {
  .consent-btn {
    transition: none;
  }
}
