/* Cookie notice, settings dialog and the /cookies page. Self-contained: every rule starts with .cc-, so it cannot be
   reached by (or reach) the unscoped portal.css terminal rules or the site.css element rules.
   Used by: engine/CookieConsent.php (head() + render()), assets/js/cookie-consent.js, site/cookies.php. */
.cc-root, .cc-doc {
    --cc-bg: #121926;
    --cc-bg2: #0e131d;
    --cc-line: #2a3550;
    --cc-text: #e7eaf3;
    --cc-muted: #a3adc4;
    --cc-accent: #19c8a0;
    --cc-ink: #06130f;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0;
    text-transform: none;
}
.cc-root *, .cc-root *::before, .cc-root *::after, .cc-doc *, .cc-doc *::before, .cc-doc *::after { box-sizing: border-box; }
.cc-root [hidden] { display: none !important; }

/* Notice */
.cc-banner {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 2147483000;
    max-width: 1080px; margin: 0 auto; max-height: calc(100vh - 24px); overflow: auto;
    background: var(--cc-bg); color: var(--cc-text);
    border: 1px solid var(--cc-line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
    padding: 18px 20px;
}
.cc-banner-in { display: flex; gap: 22px; align-items: center; }
.cc-banner-text { flex: 1 1 auto; min-width: 0; }
.cc-banner h2 { margin: 0 0 6px; font-size: 16px; line-height: 1.3; font-weight: 700; color: #fff; letter-spacing: 0; }
.cc-banner p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--cc-muted); }
.cc-banner a, .cc-dialog a, .cc-doc a { color: var(--cc-accent); text-decoration: underline; }
.cc-banner-actions { display: flex; gap: 10px; flex: 0 0 auto; align-items: center; }

/* Buttons. Reject all and Accept all carry the same classes, so they share size, colour, weight and position: refusing
   is as easy and as visible as agreeing. .cc-btn-main (accent colour) is for controls that are not a consent answer. */
.cc-btn {
    -webkit-appearance: none; appearance: none; margin: 0;
    min-height: 44px; padding: 0 20px; border-radius: 10px;
    border: 1px solid var(--cc-line); background: transparent; color: var(--cc-text);
    font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.1; letter-spacing: 0; text-transform: none;
    cursor: pointer; white-space: nowrap;
}
.cc-btn-eq { min-width: 116px; background: #2c3956; border-color: #3d4c70; color: #fff; }
.cc-btn-main { background: var(--cc-accent); border-color: var(--cc-accent); color: var(--cc-ink); }
.cc-btn:hover { filter: brightness(1.12); }
.cc-btn:focus-visible, .cc-x:focus-visible, .cc-details summary:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Dialog */
.cc-modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 2147483001; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cc-backdrop { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(5, 8, 14, .74); }
.cc-dialog {
    position: relative; width: 100%; max-width: 680px; max-height: calc(100vh - 32px); display: flex; flex-direction: column;
    background: var(--cc-bg); color: var(--cc-text); border: 1px solid var(--cc-line); border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .6); outline: 0;
}
.cc-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--cc-line); }
.cc-dialog-head h2 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; color: #fff; letter-spacing: 0; }
.cc-x {
    -webkit-appearance: none; appearance: none; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--cc-line);
    background: transparent; color: var(--cc-text); font-size: 22px; line-height: 1; cursor: pointer; padding: 0;
}
.cc-dialog-body { padding: 16px 20px 6px; overflow: auto; flex: 1 1 auto; }
.cc-lead { margin: 0 0 14px; font-size: 13.5px; color: var(--cc-muted); }
.cc-dialog-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--cc-line); }
.cc-meta { margin: 0; padding: 0 20px 14px; font-size: 12px; color: var(--cc-muted); word-break: break-all; }

/* Category */
.cc-cat { border: 1px solid var(--cc-line); border-radius: 12px; padding: 14px 16px; margin: 0 0 12px; background: var(--cc-bg2); }
.cc-cat-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.cc-cat-title { min-width: 0; }
.cc-cat-title h3 { margin: 0 0 4px; font-size: 15px; line-height: 1.3; font-weight: 700; color: #fff; letter-spacing: 0; }
.cc-cat-title p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--cc-muted); }
.cc-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--cc-muted); }
.cc-switch input { position: absolute; left: 0; top: 0; width: 44px; height: 26px; margin: 0; opacity: 0; cursor: pointer; }
.cc-slider { position: relative; display: block; width: 44px; height: 26px; border-radius: 999px; background: #3a4560; transition: background .15s; flex: 0 0 auto; }
.cc-slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.cc-switch input:checked + .cc-slider { background: var(--cc-accent); }
.cc-switch input:checked + .cc-slider::after { transform: translateX(18px); }
.cc-switch input:disabled { cursor: not-allowed; }
.cc-switch input:disabled + .cc-slider { opacity: .6; }
.cc-switch input:focus-visible + .cc-slider { outline: 2px solid #fff; outline-offset: 2px; }
.cc-switch-text { min-width: 64px; text-align: left; }

/* What is stored */
.cc-details { margin-top: 10px; }
.cc-details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--cc-accent); padding: 4px 0; }
.cc-items { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.cc-item { border-top: 1px solid var(--cc-line); padding-top: 10px; font-size: 12.5px; line-height: 1.5; color: var(--cc-muted); }
.cc-item p { margin: 6px 0 0; }
.cc-item-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cc-item code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; color: #fff; background: #1b2538; padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.cc-tag { font-size: 11px; line-height: 1.4; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--cc-line); color: #cdd5e6; white-space: nowrap; }
.cc-tag-soft { opacity: .8; }

/* Footer controls on the pages that carry the notice */
.cc-foot-link { color: inherit; text-decoration: underline; }
.cc-foot-btn { -webkit-appearance: none; appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; letter-spacing: inherit; text-transform: none; cursor: pointer; }
.cc-foot-link:hover { text-decoration: none; }
/* Sign-in and sign-up pages style their footer links as accent links without underline; the button must match its sibling link. */
.ac-links .cc-foot-btn { color: var(--accent-2); text-decoration: none; }
.ac-links .cc-foot-btn:hover { text-decoration: underline; }

/* /cookies page */
.cc-doc { color: #c3cadb; padding-bottom: 8px; }
.cc-doc h2 { margin: 30px 0 10px; font-size: 1.3rem; line-height: 1.25; color: #fff; }
.cc-doc h3 { margin: 18px 0 6px; font-size: 1.05rem; color: #fff; }
.cc-doc p, .cc-doc li { max-width: 760px; font-size: 15px; line-height: 1.65; }
.cc-doc ul.cc-plain { margin: 0 0 1em; padding-left: 20px; }
.cc-doc .cc-cat { max-width: 820px; }
.cc-doc .cc-item { font-size: 13.5px; }
.cc-doc .cc-updated { color: var(--cc-muted); font-size: 13px; }
.cc-doc .cc-btn { margin-top: 6px; }

@media (max-width: 760px) {
    .cc-banner { left: 0; right: 0; bottom: 0; max-height: 78vh; border-radius: 14px 14px 0 0; border-width: 1px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
    .cc-banner-in { flex-direction: column; align-items: stretch; gap: 14px; }
    .cc-banner-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .cc-banner-actions .cc-btn-ghost { grid-column: 1 / -1; order: 3; }
    .cc-banner-actions .cc-btn { min-width: 0; width: 100%; }
    .cc-modal { padding: 0; align-items: flex-end; }
    .cc-dialog { max-width: none; max-height: 92vh; border-radius: 16px 16px 0 0; border-width: 1px 0 0; }
    .cc-dialog-foot { display: grid; grid-template-columns: 1fr 1fr; }
    .cc-dialog-foot .cc-btn { min-width: 0; width: 100%; }
    .cc-dialog-foot .cc-btn-ghost { grid-column: 1 / -1; order: 3; }
    .cc-cat-head { flex-direction: column; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .cc-slider, .cc-slider::after { transition: none; }
}
