/* Functional consent surfaces: the approved stone, Onest and compact controls. */
[data-consent-open][hidden], [data-consent-ui] [hidden] { display: none !important; }
[data-consent-open] { font: inherit; color: inherit; background: none; border: 0; padding: 8px 0; min-height: 44px; cursor: pointer; text-align: left; }
.site-footer [data-consent-open] { font-size: 12px; font-weight: 500; }
[data-consent-open]:hover { text-decoration: underline; }
.consent-notice, .consent-dialog {
  color: var(--ink); background: rgb(245 246 242 / .94); border: 0;
  border-radius: var(--radius-card); box-shadow: 0 12px 44px rgb(27 43 49 / .15), inset 0 1px 0 rgb(255 255 255 / .8);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  font-family: inherit; text-align: left; padding: 26px;
}
.consent-notice { position: fixed; z-index: 40; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); width: min(560px, calc(100% - 48px)); max-height: calc(100dvh - 48px); overflow: auto; }
.consent-notice h2 { margin: 0 0 10px; font-size: 21px; line-height: 1.25; letter-spacing: -.025em; font-weight: 500; }
.consent-notice p, .consent-dialog p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.consent-notice .consent-preview, .consent-dialog .consent-preview { margin-top: 12px; font-size: 12px; line-height: 1.55; color: var(--ink); }
.consent-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.consent-actions .consent-choice { width: 100%; min-width: 0; padding: 10px 14px; justify-content: center; font-size: 14px; min-height: 46px; height: auto; }
.consent-choice.button-quiet { background: rgb(255 255 255 / .5); box-shadow: inset 0 0 0 1px rgb(27 43 49 / .24); color: var(--ink); }
.consent-policy { display: inline-block; font-size: 12px; line-height: 1.5; text-decoration: underline; color: var(--muted); padding: 8px 0; margin-top: 6px; }
.consent-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; margin: auto; padding: 30px; }
.consent-dialog:not([open]) { display: none; }
.consent-dialog::backdrop { background: rgb(27 43 49 / .3); }
.consent-dialog[role="region"][open] { position: fixed; z-index: 50; inset: 16px; }
.consent-dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.consent-dialog h2 { font-size: 26px; font-weight: 500; line-height: 1.2; letter-spacing: -.025em; margin: 0; }
.consent-close { padding: 2px 0 12px 12px; min-height: 44px; margin-top: -2px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.consent-close:hover { text-decoration: underline; }
.consent-category { padding: 20px 0; border-top: 1px solid var(--line); }
.consent-preview + .consent-category { margin-top: 24px; }
.consent-category-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.consent-category h3, .consent-toggle { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.45; }
.consent-category-title > span { font-size: 12px; white-space: nowrap; color: var(--muted); }
.consent-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; cursor: pointer; }
.consent-toggle input { width: 22px; height: 22px; flex: 0 0 auto; margin: 0 2px 0 0; accent-color: var(--cobalt); cursor: pointer; }
.consent-dialog .consent-reload-note, .consent-dialog .consent-storage-note { margin: 0 0 14px; font-size: 12px; color: var(--ink); }
.consent-dialog-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.consent-save { display: flex; justify-content: center; width: 100%; margin-top: 10px; }
.consent-feedback { position: fixed; z-index: 41; bottom: 20px; left: 50%; translate: -50% 0; width: max-content; max-width: calc(100% - 32px); margin: 0; padding: 14px 20px; border-radius: var(--radius-card); background: var(--ink); color: var(--stone-light); font-size: 14px; line-height: 1.5; box-shadow: 0 10px 28px rgb(27 43 49 / .12); }
@media (max-width: 640px) {
  .consent-notice { left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); width: auto; max-height: calc(100dvh - 32px); padding: 20px; }
  .consent-actions { gap: 8px; }
  .consent-actions .consent-choice { font-size: 13px; padding-inline: 8px; }
  .consent-dialog { padding: 24px 20px; }
  .consent-dialog h2 { font-size: 24px; }
  .consent-category-title { flex-wrap: wrap; gap: 4px 12px; }
}
@media (prefers-reduced-transparency: reduce) { .consent-notice, .consent-dialog { background: var(--stone-light); backdrop-filter: none; -webkit-backdrop-filter: none; } }
@media (forced-colors: active) { .consent-notice, .consent-dialog, .consent-feedback, .consent-choice { border: 1px solid CanvasText; } .consent-dialog::backdrop { background: transparent; } }
@media print { [data-consent-ui], [data-consent-open] { display: none !important; } }
