/* ─────────────────────────────────────────
   COMPONENTS  —  buttons, cards, tags,
                  toast, search, footer,
                  shared list + detail atoms
───────────────────────────────────────── */

/* ── Buttons ── */
.btn-dark {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 20px;
  background: var(--fg);
  color: var(--bg);
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500;
  transition: opacity var(--t);
  cursor: pointer;
  text-decoration: none; /* covers <a> usage */
}
.btn-dark:hover { opacity: .82; }

.btn-ghost {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 20px;
  background: var(--bg-card);
  color: var(--fg);
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--border-s);
  transition: background var(--t);
  cursor: pointer;
}
.btn-ghost:hover { background: var(--bg-hover); }

/* ── Tag pill ── */
.tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 500;
  background: var(--bg-card); color: var(--fg-2);
  border: 1px solid var(--border);
}

/* ── Shared row arrow (used in list + work items) ── */
.row-arrow {
  color: var(--fg-3); font-size: 12px;
  opacity: 0;
  transition: opacity var(--t), transform var(--t);
}

/* ── Toast notification ── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--fg); color: var(--bg);
  padding: 8px 16px; border-radius: 40px;
  font-size: 12px; pointer-events: none;
  opacity: 0; transition: all .22s var(--ease); z-index: 9999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Search overlay ── */
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 80px;
  opacity: 0; pointer-events: none;
  transition: opacity .15s var(--ease);
}
.search-overlay.open { opacity: 1; pointer-events: auto; }

.search-modal {
  width: 100%; max-width: 540px;
  background: var(--bg);
  border: 1px solid var(--border-s);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  transform: scale(.97) translateY(-6px);
  transition: transform .15s var(--ease);
}
.search-overlay.open .search-modal { transform: scale(1) translateY(0); }

.search-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.search-row svg   { opacity: .4; flex-shrink: 0; }
.search-input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 15px; color: var(--fg);
}
.search-input::placeholder { color: var(--fg-3); }
.search-esc {
  font-family: var(--mono); font-size: 10px; color: var(--fg-3);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 6px;
}
.search-results { padding: 8px; max-height: 340px; overflow-y: auto; }
.sr-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 8px;
  cursor: pointer; transition: background var(--t);
}
.sr-item:hover { background: var(--bg-card); }
.sr-icon {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--fg-3); flex-shrink: 0;
}
.sr-title { font-size: 13px; font-weight: 500; color: var(--fg); }
.sr-type  { font-size: 11px; color: var(--fg-3); }
.search-empty { padding: 28px; text-align: center; font-size: 13px; color: var(--fg-3); }

/* ── Site footer (desktop) ── */
.site-footer {
  padding: 18px 28px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--fg-3);
}
@media (max-width: 860px) {
  .site-footer { display: none; }
}
.site-footer a { color: var(--fg-3); transition: color var(--t); }
.site-footer a:hover { color: var(--fg-2); }
.footer-links { display: flex; gap: 12px; align-items: center; }

/* ── Detail page atoms ── */
.detail-cover {
  width: 100%; aspect-ratio: 16/9;
  border-radius: var(--r); overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 8px;
  color: var(--fg-3); font-size: 12px; font-family: var(--mono);
  margin-bottom: 36px;
}
.detail-cover svg { opacity: .3; }

.detail-title {
  font-size: 26px; font-weight: 700;
  letter-spacing: -.025em; line-height: 1.2;
  color: var(--fg); margin-bottom: 28px;
}

.detail-meta {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.dm-label { font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 4px; }
.dm-value { font-size: 13px; color: var(--fg); line-height: 1.5; }

.detail-body { font-size: 14px; color: var(--fg-2); line-height: 1.78; }
.detail-body p  { margin-bottom: 18px; }
.detail-body p:last-child { margin-bottom: 0; }
.detail-body h2 {
  font-size: 17px; font-weight: 600; color: var(--fg);
  margin: 28px 0 10px; letter-spacing: -.015em;
}
.detail-body h2:first-child { margin-top: 0; }

/* ══════════════════════════════════════════
   ARTICLE COMPONENTS  —  long-form Writing
   Opt-in: only applies inside .detail-body--article,
   which render.js adds when an entry has a `dek`.
   Markup comes from fig() / iq() / pullquote() in js/content.js.
══════════════════════════════════════════ */

.detail-dek {
  font-size: 17px; line-height: 1.5; letter-spacing: -.01em;
  color: var(--fg-2);
  margin: -12px 0 28px;
}

.detail-body--article { font-size: 15px; line-height: 1.8; }
.detail-body--article p { margin-bottom: 20px; }
.detail-body--article strong { color: var(--fg); font-weight: 600; }
.detail-body--article em { font-style: italic; color: var(--fg); }
.detail-body--article h2 {
  font-size: 21px; line-height: 1.25; letter-spacing: -.02em;
  margin: 48px 0 16px;
}
.detail-body--article h2:first-child { margin-top: 0; }
.h2-kicker {
  display: block; margin-bottom: 8px;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3);
}
.detail-body--article a {
  color: var(--fg); text-decoration: underline;
  text-decoration-color: var(--border-s); text-underline-offset: 3px;
  transition: text-decoration-color var(--t);
}
.detail-body--article a:hover { text-decoration-color: var(--fg); }

/* Key-figures strip: reuses .detail-meta, just tightened for in-article use */
.detail-body--article .article-stats { margin: 32px 0 8px; }

/* ── Figure / image placeholder ── */
.fig { margin: 36px 0; }
.fig-frames { display: grid; gap: 10px; }
.fig--2up .fig-frames { grid-template-columns: 1fr 1fr; }
.fig-frame {
  border-radius: var(--r); overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
}
.fig--16x9 .fig-frame { aspect-ratio: 16 / 9; }
.fig--4x3  .fig-frame { aspect-ratio: 4 / 3; }
.fig--2up  .fig-frame { aspect-ratio: 4 / 5; }
.fig-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fig-frame--ph { border: 1px dashed var(--border-s); }
.fig-ph {
  height: 100%; padding: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; color: var(--fg-3);
}
.fig-ph svg { opacity: .3; }
.fig-ph-label { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; }
.fig-ph-hint  { font-size: 12px; line-height: 1.4; }
.fig-cap {
  display: flex; flex-wrap: wrap; gap: 2px 12px;
  margin-top: 10px; font-size: 12px; line-height: 1.55; color: var(--fg-3);
}
.fig-no { flex-shrink: 0; font-family: var(--mono); font-size: 11px; color: var(--fg-2); }
.fig-cap > span:nth-child(2) { flex: 1 1 0; min-width: 0; }
.fig-credit { flex-basis: 100%; font-family: var(--mono); font-size: 10px; letter-spacing: .03em; }

/* ── Interview transcript card ── */
.iq {
  margin: 40px 0; border: 1px solid var(--border);
  border-radius: var(--r); background: var(--bg-card); overflow: hidden;
}
.iq-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
}
.iq-label {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3);
}
.iq-badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: .03em; white-space: nowrap;
  padding: 2px 9px; border: 1px dashed var(--border-s); border-radius: 999px; color: var(--fg-2);
}
.iq-q { display: flex; gap: 12px; padding: 16px 16px 2px; }
.iq-qn { flex-shrink: 0; padding-top: 3px; font-family: var(--mono); font-size: 11px; color: var(--fg-3); }
.iq-qt { font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--fg); }
.iq-a { display: flex; gap: 14px; padding: 14px 16px 18px; }
.iq-chip {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 9px;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: var(--fg-2);
}
.iq-a-body { min-width: 0; }
.iq-who { font-size: 12px; font-weight: 600; color: var(--fg); margin-bottom: 6px; }
.iq-who span { font-weight: 400; color: var(--fg-3); }
.iq-text { font-size: 17px; line-height: 1.55; letter-spacing: -.01em; color: var(--fg); }
.iq-note { margin-top: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: .02em; color: var(--fg-3); }

/* ── Case-study highlight card ── */
.case {
  margin: 36px 0; border: 1px solid var(--border);
  border-radius: var(--r); background: var(--bg-card); overflow: hidden;
}
.case-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
}
.case-kicker {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3);
}
.case-badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: .03em; white-space: nowrap;
  padding: 2px 9px; border-radius: 999px; color: var(--fg-2);
  border: 1px dashed var(--border-s);
}
.case-badge--published { border-style: solid; color: var(--fg); }
.case-title {
  padding: 16px 16px 6px; font-size: 18px; font-weight: 600;
  letter-spacing: -.02em; line-height: 1.25; color: var(--fg);
}
.case-rows { padding: 4px 16px 10px; }
.case-row {
  display: grid; grid-template-columns: 140px 1fr; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--border);
}
.case-row:first-child { border-top: 0; }
.case-row dt {
  padding-top: 2px; font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3);
}
.case-row dd { font-size: 13px; line-height: 1.55; color: var(--fg); }
.case-row:last-child dd { color: var(--fg-2); }

/* ── Pull quote ── */
.pullquote { margin: 44px 0; padding: 2px 0 2px 20px; border-left: 2px solid var(--fg); }
.pullquote-text { font-size: 24px; font-weight: 600; line-height: 1.28; letter-spacing: -.02em; color: var(--fg); }
.pullquote-cite { display: block; margin-top: 12px; font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--fg-3); }

/* ── Table ── */
.table-wrap { overflow-x: auto; margin: 28px 0; border: 1px solid var(--border); border-radius: var(--r); }
.detail-body--article table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 13px; line-height: 1.5; }
.detail-body--article th, .detail-body--article td { padding: 12px 14px; text-align: left; vertical-align: top; }
.detail-body--article thead th {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3);
  border-bottom: 1px solid var(--border);
}
.detail-body--article tbody th { font-weight: 600; color: var(--fg); white-space: nowrap; }
.detail-body--article tbody tr + tr > * { border-top: 1px solid var(--border); }

/* ── Sources ── */
.article-sources { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); }
.detail-body--article .article-sources h2 {
  margin: 0 0 12px; font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3);
}
.article-sources ol { padding-left: 20px; font-size: 12px; line-height: 1.8; color: var(--fg-3); }
.article-sources li { margin-bottom: 4px; padding-left: 4px; }
.detail-body--article .sources-note { margin: 16px 0 0; font-size: 12px; line-height: 1.6; color: var(--fg-3); }

@media (max-width: 560px) {
  .detail-dek { font-size: 16px; }
  .detail-body--article h2 { font-size: 19px; margin-top: 40px; }
  .fig--2up .fig-frames { grid-template-columns: 1fr; }
  .fig--2up .fig-frame { aspect-ratio: 4 / 3; }
  .iq-a { flex-direction: column; gap: 10px; }
  .case-row { grid-template-columns: 1fr; gap: 2px; }
  .case-head { flex-wrap: wrap; }
  .iq-text { font-size: 16px; }
  .pullquote-text { font-size: 20px; }
}

/* ── List page shared atoms ── */
.list-page { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }

.list-head {
  padding: 36px 40px 24px;
  border-bottom: 1px solid var(--border);
}
.list-title { font-size: 26px; font-weight: 700; letter-spacing: -.025em; color: var(--fg); margin-bottom: 4px; }
.list-sub   { font-size: 14px; color: var(--fg-2); }

.list-body { padding: 8px 28px; }

.list-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; border-radius: var(--r-sm);
  margin: 0 -12px;
  transition: background var(--t);
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--bg-card); }
.list-row:hover .row-arrow { opacity: 1; transform: translateX(2px); }

.list-icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--fg-2); flex-shrink: 0;
}
.list-info { flex: 1; min-width: 0; }
.list-row-title { font-size: 13px; font-weight: 500; color: var(--fg); }
.list-row-sub   { font-size: 12px; color: var(--fg-3); margin-top: 2px; }

.list-row-right { text-align: right; display: flex; align-items: center; gap: 10px; }
.list-date  { font-family: var(--mono); font-size: 11px; color: var(--fg-3); }
.list-price { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--fg); }

/* ── Store buy block (in detail sidebar) ── */
.store-buy-block {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.store-price-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.store-icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--fg-2);
}
.store-price { font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--fg); }

@media (max-width: 560px) {
  .detail-meta     { grid-template-columns: 1fr; }
  .list-head       { padding: 24px 20px 16px; }
  .list-body       { padding: 8px 20px; }
}

/* ══════════════════════════════════════════
   COOKIE CONSENT  —  banner + modal
   Follows the same visual language as
   .bnav-sheet / .search-modal / .btn-*
══════════════════════════════════════════ */

/* ── Banner ───────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  width: calc(100% - 32px);
  max-width: 520px;
  background: var(--bg);
  border: 1px solid var(--border-s);
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.06);
  padding: 20px;
  z-index: 8000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.cookie-banner.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Shift up on mobile to clear the bottom nav */
@media (max-width: 860px) {
  .cookie-banner {
    bottom: calc(var(--bnav-h) + 10px);
  }
}

.cookie-banner-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.cookie-banner-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-2);
  flex-shrink: 0;
}
.cookie-banner-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}
.cookie-banner-body {
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.65;
  margin-bottom: 16px;
}
.cookie-banner-body a {
  color: var(--fg-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-banner-body a:hover { color: var(--fg); }

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
/* On narrow screens the three buttons stack to two rows gracefully */
@media (max-width: 400px) {
  .cookie-banner-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-banner-actions button {
    justify-content: center;
  }
}

/* ── Cookie consent banner + modal buttons ─────────────────────
   GDPR Art. 7(3) / TTDSG §25 compliance:
   "Accept all" and "Reject all" must be styled identically on the first layer
   so that refusing consent is not harder than giving it (no dark patterns).
   Both use the ghost style. "Save preferences" in the modal uses the primary
   (dark) style since it confirms an active user choice.
   ──────────────────────────────────────────────────────────── */

/* Shared base for all three first-layer actions */
.cookie-btn-accept,
.cookie-btn-reject,
.cookie-btn-customize {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  background: var(--bg-card);
  color: var(--fg);
  border: 1px solid var(--border-s);
  border-radius: var(--r-sm);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: background var(--t);
  white-space: nowrap;
  font-family: inherit;
}
.cookie-btn-accept:hover,
.cookie-btn-reject:hover,
.cookie-btn-customize:hover { background: var(--bg-hover); }

/* Focus rings — WCAG 2.4.11 AA */
.cookie-btn-accept:focus-visible,
.cookie-btn-reject:focus-visible,
.cookie-btn-customize:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

/* ── Preferences modal ────────────────── */
.consent-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 8500;
  opacity: 0; pointer-events: none;
  transition: opacity .24s var(--ease-out);
}
.consent-modal-backdrop.open {
  opacity: 1; pointer-events: auto;
}

.consent-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.96);
  width: calc(100% - 32px);
  max-width: 480px;
  max-height: calc(100vh - 48px);
  background: var(--bg);
  border: 1px solid var(--border-s);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  z-index: 8600;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: transform .32s var(--ease-out), opacity .24s var(--ease-out);
  overflow: hidden;
}
.consent-modal.open {
  opacity: 1; pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.consent-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.consent-modal-title {
  font-size: 14px; font-weight: 600; color: var(--fg);
}
.consent-modal-close {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-3);
  cursor: pointer;
  background: none; border: none;
  transition: background var(--t), color var(--t);
}
.consent-modal-close:hover { background: var(--bg-hover); color: var(--fg); }

.consent-modal-body {
  overflow-y: auto;
  flex: 1;
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.consent-modal-intro {
  font-size: 12px; color: var(--fg-2); line-height: 1.65;
  margin-bottom: 4px;
}
.consent-modal-intro a {
  color: var(--fg-2); text-decoration: underline; text-underline-offset: 2px;
}
.consent-modal-intro a:hover { color: var(--fg); }

/* Category card */
.consent-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 14px;
}
.consent-category-info { flex: 1; min-width: 0; }
.consent-category-name {
  font-size: 13px; font-weight: 600; color: var(--fg);
  margin-bottom: 3px;
  display: flex; align-items: center; gap: 7px;
}
.consent-category-always {
  font-size: 10px; font-weight: 500;
  color: var(--fg-3);
  background: var(--bg-hover);
  border: 1px solid var(--border-s);
  border-radius: 20px;
  padding: 1px 7px;
  letter-spacing: .02em;
}
.consent-category-desc {
  font-size: 12px; color: var(--fg-3); line-height: 1.6;
}

/* Toggle switch — WCAG-compliant */
.consent-toggle {
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
}
.consent-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0; width: 0; height: 0;
}
.consent-toggle-track {
  display: block;
  width: 36px; height: 20px;
  border-radius: 20px;
  background: var(--bg-hover);
  border: 1px solid var(--border-s);
  cursor: pointer;
  transition: background var(--t), border-color var(--t);
  position: relative;
}
.consent-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--fg-3);
  transition: transform .18s var(--ease), background var(--t);
}
/* Checked state */
.consent-toggle input:checked + .consent-toggle-track {
  background: var(--fg);
  border-color: var(--fg);
}
.consent-toggle input:checked + .consent-toggle-track::after {
  background: var(--bg);
  transform: translateX(16px);
}
/* Disabled (Necessary) */
.consent-toggle input:disabled + .consent-toggle-track {
  opacity: .5;
  cursor: not-allowed;
}
/* Focus ring — WCAG AA */
.consent-toggle input:focus-visible + .consent-toggle-track {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

/* Modal footer */
.consent-modal-footer {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.consent-modal-footer .cookie-btn-reject  { flex: 1; justify-content: center; }
/* Save preferences: primary dark style in the modal — user made an active choice */
.consent-modal-footer .cookie-btn-accept {
  flex: 1; justify-content: center;
  background: var(--fg); color: var(--bg); border-color: var(--fg);
}
.consent-modal-footer .cookie-btn-accept:hover { opacity: .85; background: var(--fg); }

/* ── Booking modal (Cal.com "Book a call") ──────────────
   Same backdrop/card/header/close-button chrome as .consent-modal
   above (same z-index layer, blur, border-radius, shadow, transition
   curve) so it reads as the same design language — just wider, since
   Cal's calendar+time-slot UI needs more room than a text dialog.
   Cal's "inline" embed mode is responsive to whatever width/height its
   container is given, so this box's size is entirely up to us; it is
   NOT one of Cal's own popup sizes. */
/* display:none is the default, closed state here — deliberately, in
   addition to opacity/pointer-events (see js/booking.js for why:
   pointer-events:none on this wrapper can be overridden by a descendant
   that sets its own pointer-events, which third-party embed scripts —
   including, apparently, Cal.com's iframe — commonly do defensively.
   display:none has no such escape hatch: a display:none ancestor has no
   render/hit-test tree at all for a descendant to opt back into. JS
   toggles display directly (with a frame/transitionend in between) so
   the opacity/transform transition below still gets to play. */
.booking-modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 8500;
  opacity: 0; pointer-events: none;
  transition: opacity .24s var(--ease-out);
}
.booking-modal-backdrop.open { opacity: 1; pointer-events: auto; }

.booking-modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.96);
  width: calc(100% - 32px);
  max-width: 680px;
  height: min(680px, calc(100vh - 48px));
  background: var(--bg);
  border: 1px solid var(--border-s);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  z-index: 8600;
  flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: transform .32s var(--ease-out), opacity .24s var(--ease-out);
  overflow: hidden;
}
.booking-modal.open {
  display: flex;
  opacity: 1; pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.booking-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.booking-modal-title { font-size: 14px; font-weight: 600; color: var(--fg); }
.booking-modal-close {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-3);
  cursor: pointer;
  background: none; border: none;
  transition: background var(--t), color var(--t);
}
.booking-modal-close:hover { background: var(--bg-hover); color: var(--fg); }

.booking-modal-body { flex: 1; min-height: 0; padding: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.booking-cal-target { width: 100%; min-height: 100%; }

/* ── Persistent "Cookie Settings" entry point ── */
/* Shown in the desktop sidebar bottom & mobile more-sheet */
.cookie-settings-btn {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 18px;
  cursor: pointer;
  transition: background var(--t) var(--ease);
  border-top: 1px solid var(--border);
  width: 100%;
  background: none;
  border-left: none; border-right: none; border-bottom: none;
}
.cookie-settings-btn:hover { background: var(--bg-card); }
.cookie-settings-btn-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-2); flex-shrink: 0;
  transition: background var(--t), border-color var(--t);
}
.cookie-settings-btn:hover .cookie-settings-btn-icon {
  background: var(--bg-hover); border-color: var(--border-s);
}
.cookie-settings-btn-info { flex: 1; text-align: left; }
.cookie-settings-btn-name { font-size: 14px; font-weight: 500; color: var(--fg); }
.cookie-settings-btn-sub  { font-size: 12px; color: var(--fg-3); margin-top: 1px; }

/* Desktop sidebar cookie icon button */
.sidebar-cookie-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-3);
  cursor: pointer;
  background: none; border: none;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
  position: relative;
}
.sidebar-cookie-btn:hover { background: var(--bg-hover); color: var(--fg-2); }

/* Footer cookie settings link */
.footer-cookie-btn {
  background: none; border: none; padding: 0;
  color: var(--fg-3); font-size: 12px;
  cursor: pointer; font-family: var(--sans);
  transition: color var(--t);
}
.footer-cookie-btn:hover { color: var(--fg-2); }
