/* Cookie consent. Light is the default; html[data-theme=dark] switches the panel. */

.consent-banner,
.consent-modal{
  --consent-paper:#FFFFFF;
  --consent-ink:#2E3D30;
  --consent-muted:#6D705A;
  --consent-line:#C8C0B3;
  --consent-soft:#EEF2EB;
  --consent-fill:#2E3D30;
  --consent-on:#FFFFFF;
  font-family:'DM Sans',sans-serif;
}
html[data-theme=dark] .consent-banner,
html[data-theme=dark] .consent-modal{
  --consent-paper:#171414;
  --consent-ink:#FAF5F2;
  --consent-muted:#C8C0B3;
  --consent-line:#6D705A;
  --consent-soft:#2E3D30;
  --consent-fill:#EEE9E4;
  --consent-on:#171414;
}

.consent-banner{
  position:fixed;
  z-index:420;
  left:50%;
  bottom:16px;
  transform:translateX(-50%);
  width:min(1080px,calc(100% - 24px));
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:22px 28px;
  align-items:center;
  padding:18px 20px;
  border:1px solid var(--consent-line);
  border-radius:22px;
  background:var(--consent-paper);
  color:var(--consent-ink);
  box-shadow:0 18px 50px #17141433;
}
.consent-banner[hidden],
.consent-modal[hidden]{display:none}
.consent-kicker{
  margin:0 0 6px;
  font-size:11px;
  font-weight:600;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--consent-muted);
}
.consent-banner p{margin:0;font-size:14.5px;line-height:1.5;max-width:68ch}
.consent-shortcuts{
  display:flex;
  flex-wrap:wrap;
  gap:8px 16px;
  margin-top:10px;
}
.consent-shortcuts a,
.consent-shortcuts button,
.consent-modal a.consent-text{
  padding:0;
  border:0;
  background:none;
  color:var(--consent-ink);
  font:600 13px/1.4 'DM Sans',sans-serif;
  text-decoration:underline;
  text-underline-offset:3px;
  cursor:pointer;
}
.consent-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}
.consent-btn{
  min-height:46px;
  min-width:148px;
  padding:10px 16px;
  border-radius:999px;
  border:1px solid var(--consent-fill);
  background:var(--consent-fill);
  color:var(--consent-on);
  font:600 14px/1 'DM Sans',sans-serif;
  cursor:pointer;
}
.consent-btn--ghost{
  background:transparent;
  color:var(--consent-ink);
  border-color:var(--consent-line);
}
.consent-btn:hover{filter:brightness(1.06)}
.consent-btn:focus-visible,
.consent-shortcuts a:focus-visible,
.consent-shortcuts button:focus-visible,
.consent-switch:focus-visible,
.consent-close:focus-visible{
  outline:3px solid #45553A;
  outline-offset:3px;
}
html[data-theme=dark] .consent-btn:focus-visible,
html[data-theme=dark] .consent-shortcuts a:focus-visible,
html[data-theme=dark] .consent-shortcuts button:focus-visible,
html[data-theme=dark] .consent-switch:focus-visible,
html[data-theme=dark] .consent-close:focus-visible{outline-color:#EEE9E4}

.consent-modal{
  position:fixed;
  inset:0;
  z-index:430;
  display:grid;
  place-items:center;
  padding:16px;
}
.consent-modal__backdrop{
  position:absolute;
  inset:0;
  background:#1714148c;
}
.consent-dialog{
  position:relative;
  display:flex;
  flex-direction:column;
  width:min(680px,100%);
  max-height:min(88vh,820px);
  overflow:hidden;
  border-radius:24px;
  border:1px solid var(--consent-line);
  background:var(--consent-paper);
  color:var(--consent-ink);
  box-shadow:0 24px 70px #0006;
}
.consent-dialog header,
.consent-dialog footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
}
.consent-dialog header{border-bottom:1px solid var(--consent-line)}
.consent-dialog footer{
  border-top:1px solid var(--consent-line);
  position:sticky;
  bottom:0;
  background:var(--consent-paper);
  border-radius:0 0 24px 24px;
}
.consent-dialog h2{
  margin:0;
  font:400 clamp(28px,4vw,36px)/1.05 'DM Serif Display',Georgia,serif;
  letter-spacing:-.03em;
}
.consent-close{
  width:40px;
  height:40px;
  flex:0 0 40px;
  border-radius:50%;
  border:1px solid var(--consent-line);
  background:transparent;
  color:var(--consent-ink);
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.consent-dialog__body{
  overflow:auto;
  flex:1 1 auto;
  min-height:0;
  padding:8px 20px 18px;
}
.consent-dialog__body > p{margin:14px 0;color:var(--consent-muted);font-size:14.5px;line-height:1.55}
.consent-quick{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:4px 0 12px;
}
.consent-cat{
  border-top:1px solid var(--consent-line);
  padding:14px 0;
}
.consent-cat__row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.consent-cat h3{margin:0;font:600 16px/1.3 'DM Sans',sans-serif}
.consent-cat p{margin:4px 0 0;color:var(--consent-muted);font-size:13.5px;line-height:1.5}
.consent-lock{
  flex:0 0 auto;
  min-height:32px;
  padding:6px 10px;
  border-radius:999px;
  background:var(--consent-soft);
  color:var(--consent-ink);
  font-size:12px;
  font-weight:600;
}
.consent-switch{
  position:relative;
  width:52px;
  height:32px;
  flex:0 0 52px;
  margin-top:2px;
  border:0;
  border-radius:999px;
  background:#C8C0B3;
  cursor:pointer;
}
.consent-switch[aria-checked=true]{background:#45553A}
html[data-theme=dark] .consent-switch{background:#6D705A}
html[data-theme=dark] .consent-switch[aria-checked=true]{background:#EEE9E4}
.consent-switch i{
  position:absolute;
  top:3px;
  left:3px;
  width:26px;
  height:26px;
  border-radius:50%;
  background:#fff;
  transition:transform .18s ease;
}
html[data-theme=dark] .consent-switch[aria-checked=true] i{background:#171414}
.consent-switch[aria-checked=true] i{transform:translateX(20px)}
.consent-details{margin-top:10px}
.consent-details summary{
  cursor:pointer;
  font-size:13px;
  font-weight:600;
  color:var(--consent-ink);
}
.consent-table-wrap{overflow-x:auto;margin-top:8px}
.consent-table{
  width:100%;
  border-collapse:collapse;
  font-size:12.5px;
}
.consent-table th,
.consent-table td{
  text-align:left;
  padding:8px 10px;
  border-bottom:1px solid var(--consent-line);
  vertical-align:top;
}
.consent-table th{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--consent-muted)}
.consent-empty{margin:8px 0 0;font-size:13px;color:var(--consent-muted)}

@media(max-width:720px){
  .consent-banner{
    grid-template-columns:1fr;
    bottom:10px;
    width:min(1080px,calc(100% - 16px));
    border-radius:18px;
    padding:16px;
  }
  .consent-actions{justify-content:stretch}
  .consent-actions .consent-btn{flex:1 1 140px}
  .consent-modal{padding:0;place-items:stretch}
  .consent-dialog{
    width:100%;
    max-height:100%;
    height:100%;
    border-radius:0;
  }
  .consent-dialog footer{border-radius:0;flex-wrap:wrap}
  .consent-dialog footer .consent-btn{flex:1 1 160px}
}
@media(prefers-reduced-motion:reduce){
  .consent-switch i{transition:none}
}
@media print{
  .consent-banner,.consent-modal{display:none!important}
}
