/* Build To Work — cookie consent + legal pop-ups. (c) Build To Work · buildto.work */

html.cc-lock { overflow: hidden; }

/* ---------- Banner ---------- */
.cc-banner {
    position: fixed; left: 20px; bottom: 20px; z-index: 9000;
    width: min(440px, calc(100vw - 40px));
    padding: 22px 22px 20px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(16,24,42,.92), rgba(8,13,24,.94));
    border: 1px solid var(--line);
    box-shadow: 0 30px 80px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.02) inset;
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    opacity: 0; transform: translateY(24px);
    transition: opacity .6s cubic-bezier(.2,.8,.2,1), transform .6s cubic-bezier(.2,.8,.2,1);
}
.cc-banner[hidden] { display: none; }
.cc-banner.is-in { opacity: 1; transform: none; }
.cc-banner::before, .cc-panel::before {
    content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 2px; border-radius: 2px;
    background: var(--grad); opacity: .9;
}
.cc-banner__head, .cc-head__t { display: flex; align-items: center; gap: 12px; }
.cc-ic { width: 28px; height: 28px; flex: none; }
.cc-banner h2, .cc-panel h2 { font-size: 1.2rem; letter-spacing: -.01em; line-height: 1.2; }
.cc-banner p { margin-top: 12px; font-size: .92rem; line-height: 1.6; color: #b5c0d4; }
.cc-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.cc-banner .cc-links { margin-top: 10px; }
.cc-link, .cc-inline {
    font: inherit; font-size: .85rem; color: var(--cyan); text-decoration: underline;
    text-decoration-color: rgba(23,232,212,.35); text-underline-offset: 3px; transition: color .25s, text-decoration-color .25s;
}
.cc-inline { font-size: inherit; }
.cc-link:hover, .cc-inline:hover { color: #fff; text-decoration-color: currentColor; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.cc-btn { padding: .7rem 1.2rem; font-size: .88rem; flex: 1 1 auto; white-space: nowrap; }
.cc-actions .btn--primary { flex: 1 1 100%; }
.cc-actions .btn--ghost { flex: 1 1 calc(50% - 5px); }

/* ---------- Overlay + panel ---------- */
.cc-overlay {
    position: fixed; inset: 0; z-index: 9500;
    display: grid; place-items: center; padding: 20px;
    background: rgba(4,7,13,.72);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    opacity: 0; transition: opacity .35s ease;
    overscroll-behavior: contain;
}
.cc-overlay[hidden] { display: none; }
.cc-overlay--top { z-index: 9600; }
.cc-overlay.is-in { opacity: 1; }
.cc-panel {
    position: relative; display: flex; flex-direction: column;
    width: min(620px, 100%); max-height: min(780px, calc(100dvh - 40px));
    border-radius: 24px; border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(16,24,42,.98), rgba(8,13,24,.99));
    box-shadow: 0 40px 120px -20px rgba(0,0,0,.8);
    transform: translateY(18px) scale(.98);
    transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.cc-panel--doc { width: min(760px, 100%); }
.cc-overlay.is-in .cc-panel { transform: none; }
.cc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
.cc-head h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.cc-kicker { font: 500 .72rem var(--font-head); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.cc-x {
    flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
    border: 1px solid var(--line); background: var(--surface); color: #c6d0e2; transition: border-color .3s, color .3s, transform .3s;
}
.cc-x svg { width: 18px; height: 18px; }
.cc-x:hover { border-color: var(--cyan); color: #fff; transform: rotate(90deg); }
.cc-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 26px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.cc-body:focus-visible { outline: none; }
.cc-lead { color: #c6d0e2; font-size: .95rem; line-height: 1.65; }
.cc-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 16px 26px 22px; border-top: 1px solid var(--line); }
.cc-foot .cc-btn { flex: 0 1 auto; }
.cc-note { margin-top: 18px; font-size: .85rem; color: var(--muted); }
.cc-body .cc-links { margin-top: 14px; }

/* ---------- Categories ---------- */
.cc-cat { margin-top: 18px; padding: 18px 18px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.cc-cat__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.cc-cat h3 { font-size: 1.02rem; margin-bottom: 4px; letter-spacing: -.005em; }
.cc-cat p { font-size: .88rem; line-height: 1.55; color: #aab5ca; }
.cc-always { flex: none; font: 600 .7rem var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); padding: .35rem .7rem; border-radius: 999px; border: 1px solid rgba(23,232,212,.35); background: rgba(23,232,212,.07); white-space: nowrap; }

.cc-switch { position: relative; flex: none; width: 52px; height: 30px; cursor: pointer; margin-top: 2px; }
.cc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 1; }
.cc-switch span { position: absolute; inset: 0; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.08); transition: background .35s, border-color .35s, box-shadow .35s; }
.cc-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #e9eef7; transition: transform .35s cubic-bezier(.2,.8,.2,1), background .35s; }
.cc-switch input:checked + span { background: var(--grad); border-color: transparent; box-shadow: 0 6px 24px -6px rgba(23,232,212,.6); }
.cc-switch input:checked + span::after { transform: translateX(22px); background: #04101a; }
.cc-switch input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 3px; }

.cc-details { margin-top: 12px; }
.cc-details summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; font: 500 .82rem var(--font-head); letter-spacing: .02em; color: var(--blue); }
.cc-details summary::-webkit-details-marker { display: none; }
.cc-details summary::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .3s; }
.cc-details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.cc-details summary:hover { color: #fff; }
.cc-tablewrap { margin-top: 12px; overflow-x: auto; }
.cc-tablewrap table { width: 100%; border-collapse: collapse; font-size: .82rem; min-width: 440px; }
.cc-tablewrap th { text-align: left; font: 600 .68rem var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.cc-tablewrap td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,.06); color: #b5c0d4; vertical-align: top; line-height: 1.5; }
.cc-tablewrap tr:last-child td { border-bottom: 0; }
.cc-tablewrap code { font: 500 .8rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--cyan); }

/* ---------- Legal document ---------- */
.cc-doc section { margin-top: 28px; }
.cc-doc section:first-of-type { margin-top: 26px; }
.cc-doc h3 { display: flex; align-items: baseline; gap: 12px; font-size: 1.08rem; margin-bottom: 10px; letter-spacing: -.005em; }
.cc-doc h3 span { font: 600 .72rem var(--font-head); letter-spacing: .14em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cc-doc p, .cc-doc li { font-size: .93rem; line-height: 1.75; color: #b5c0d4; }
.cc-doc p + p, .cc-doc p + ul, .cc-doc ul + p { margin-top: 10px; }
.cc-doc ul { display: grid; gap: 8px; margin-top: 6px; }
.cc-doc li { position: relative; padding-left: 20px; }
.cc-doc li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }
.cc-doc a { color: var(--cyan); text-decoration: underline; text-decoration-color: rgba(23,232,212,.35); text-underline-offset: 3px; }
.cc-doc a:hover { color: #fff; }
.cc-foot--doc { justify-content: flex-end; }

/* ---------- Footer links ---------- */
.footer__legal { display: flex; flex-wrap: wrap; gap: 6px 22px; flex-basis: 100%; }
.footer__legal button { font: inherit; font-size: .85rem; color: #c6d0e2; transition: color .3s; }
.footer__legal button:hover { color: var(--cyan); }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
    .cc-banner { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 18px; border-radius: 20px; }
    .cc-overlay { padding: 0; align-items: end; }
    .cc-panel { width: 100%; max-height: 92dvh; border-radius: 24px 24px 0 0; }
    .cc-head, .cc-body, .cc-foot { padding-left: 18px; padding-right: 18px; }
    .cc-foot { flex-direction: column-reverse; }
    .cc-foot .cc-btn { flex: 1 1 auto; width: 100%; }
    .cc-cat { padding: 16px 14px 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .cc-banner, .cc-overlay, .cc-panel, .cc-switch span, .cc-switch span::after, .cc-x { transition: none; }
}
