#cookie-banner[hidden], #cookie-manager[hidden] { display: none !important; }
#cookie-banner, #cookie-manager { font: 15px/1.6 system-ui, sans-serif; color: #102b33; box-sizing: border-box; }
#cookie-banner { position: fixed; inset: auto 0 0; z-index: 1100; display: flex; align-items: center; gap: 24px; background: #d9eff0; padding: 14px 20px; box-shadow: 0 -2px 8px #0002; }
#cookie-banner p { flex: 1; margin: 0; }
#cookie-banner a { color: #006978; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
/* Decline and Accept are the same size and weight of border; Accept is filled so the pair reads as a choice, not a trap. */
.cookie-actions button { font: inherit; font-weight: 600; cursor: pointer; border: 1px solid #24383c; background: transparent; color: #102b33; min-width: 96px; padding: 8px 18px; border-radius: 6px; }
#cookie-accept, #cookie-save { background: #2e7d32; border-color: #2e7d32; color: #fff; }
#cookie-accept:hover, #cookie-save:hover { background: #256528; border-color: #256528; }
#cookie-decline:hover { background: #ffffff80; }
.cookie-actions button:focus-visible, #cookie-banner a:focus-visible { outline: 2px solid #006978; outline-offset: 2px; }
#cookie-manager { position: fixed; z-index: 1101; bottom: 24px; right: 24px; width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 22px; background: white; border: 1px solid #a5c6cc; border-radius: 10px; box-shadow: 0 4px 24px #0003; }
#cookie-manager h2 { font-size: 20px; margin: 0 0 12px; }
#cookie-manager p { margin: 0 0 12px; }
#cookie-manager .cookie-actions { margin-top: 8px; }
#cookie-manager .cookie-manager-actions { justify-content: flex-end; }
.cookie-manager-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.cookie-manager-head h2 { margin: 0; }
#cookie-manager-close { font: inherit; font-size: 26px; line-height: 1; cursor: pointer; border: 0; background: transparent; color: inherit; padding: 2px 8px; border-radius: 6px; }
#cookie-manager-close:hover { background: #0000000f; }
#cookie-current { font-weight: 600; padding: 8px 12px; border-radius: 8px; background: #eef7ef; color: #1b5e20; }
.cookie-choices { margin: 0 0 12px; padding: 0; border: 0; }
.cookie-choices legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.cookie-choice { display: flex; align-items: flex-start; gap: 12px; margin: 8px 0; padding: 12px; border: 1px solid #a5c6cc; border-radius: 8px; cursor: pointer; }
.cookie-choice:has(input:checked) { border-color: #2e7d32; background: #eef7ef; box-shadow: inset 0 0 0 1px #2e7d32; }
.cookie-choice input { margin: 4px 0 0; width: 18px; height: 18px; accent-color: #2e7d32; flex: none; }
.cookie-choice strong { display: block; }
.cookie-choice small { display: block; font-size: 14px; line-height: 1.4; color: #3f5a62; }
.cookie-essential { font-size: 14px; line-height: 1.5; }
.cookie-always { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #eef7ef; color: #1b5e20; font-size: 12px; font-weight: 700; }
/* The banner and panel sit outside the page container that the app's dark-mode filter inverts, so they get their own dark colors. */
html[data-theme="dark"] #cookie-banner, html[data-theme="dark"] #cookie-manager { color: #e3eef0; }
html[data-theme="dark"] #cookie-banner { background: #14262c; box-shadow: 0 -2px 10px #0008; }
html[data-theme="dark"] #cookie-banner a, html[data-theme="dark"] #cookie-manager a { color: #6fd3e0; }
html[data-theme="dark"] #cookie-manager { background: #14262c; border-color: #3b5159; box-shadow: 0 4px 24px #000a; }
html[data-theme="dark"] #cookie-manager-close:hover { background: #ffffff1a; }
html[data-theme="dark"] #cookie-current, html[data-theme="dark"] .cookie-always { background: #1f3a2a; color: #9be0a8; }
html[data-theme="dark"] .cookie-choice { border-color: #3b5159; }
html[data-theme="dark"] .cookie-choice:has(input:checked) { border-color: #4caf50; background: #1f3a2a; box-shadow: inset 0 0 0 1px #4caf50; }
html[data-theme="dark"] .cookie-choice input { accent-color: #4caf50; }
html[data-theme="dark"] .cookie-choice small { color: #b4c0c9; }
html[data-theme="dark"] .cookie-actions button { border-color: #6f858b; color: #e3eef0; }
html[data-theme="dark"] #cookie-accept, html[data-theme="dark"] #cookie-save { background: #2e7d32; border-color: #2e7d32; color: #fff; }
html[data-theme="dark"] #cookie-accept:hover, html[data-theme="dark"] #cookie-save:hover { background: #38933d; border-color: #38933d; }
html[data-theme="dark"] #cookie-decline:hover { background: #ffffff1a; }
html[data-theme="dark"] .cookie-actions button:focus-visible, html[data-theme="dark"] #cookie-banner a:focus-visible { outline-color: #6fd3e0; }
body { padding-bottom: calc(var(--site-footer-height, 65px) + var(--cookie-banner-height, 0px) + 12px) !important; }
.site-footer { bottom: var(--cookie-banner-height, 0px) !important; }
@media (max-width: 900px) {
    #cookie-banner { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 16px; max-height: 50dvh; overflow-y: auto; }
    #cookie-banner .cookie-actions button { flex: 1; }
}
