.proto-kinetic-page {
  --proto-background: var(--proto-paper);
  --proto-foreground: var(--proto-ink);
  --proto-surface-bright: #fffaf3;
  --proto-border: var(--proto-line);
  --proto-font-body: 'Supreme', sans-serif;
  --proto-org-on-light: #a02f00;
  --proto-radius-full: 9999px;
}

.proto-kinetic-page.dark {
  --proto-background: var(--k-page);
  --proto-foreground: var(--k-ink);
  --proto-surface-bright: var(--k-surface);
  --proto-border: var(--k-line);
  --proto-org-on-light: var(--k-accent);
}

/* Shared Proto consent panel. */
.cookie-consent {
  --cookie-panel-bg: var(--proto-surface-bright);
  --cookie-panel-ink: var(--proto-foreground);
  --cookie-panel-muted: color-mix(in oklch, var(--proto-foreground), transparent 34%);
  --cookie-panel-border: color-mix(in oklch, var(--proto-border), transparent 12%);
  --cookie-panel-strong: color-mix(in oklch, var(--proto-foreground), transparent 4%);
  position: fixed;
  left: clamp(1rem, 2.2vw, 1.5rem);
  bottom: clamp(1rem, 2.2vw, 1.5rem);
  z-index: 80;
  width: min(24rem, calc(100vw - 2rem));
  border: 1px solid var(--cookie-panel-border);
  border-radius: 0.75rem;
  background: var(--cookie-panel-bg);
  color: var(--cookie-panel-ink);
  box-shadow:
    0 1.5rem 3.5rem color-mix(in oklch, black, transparent 82%),
    0 0.25rem 1rem color-mix(in oklch, black, transparent 90%);
  overflow: hidden;
}

html.dark .cookie-consent {
  --cookie-panel-muted: color-mix(in oklch, var(--proto-foreground), transparent 28%);
  box-shadow:
    0 1.5rem 3.5rem color-mix(in oklch, black, transparent 58%),
    0 0.25rem 1rem color-mix(in oklch, black, transparent 68%);
}

.cookie-consent[hidden],
.cookie-consent [hidden] {
  display: none !important;
}

.cookie-consent__view {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.cookie-consent__view--banner {
  gap: 0.65rem;
  padding: 0.875rem;
}

.cookie-consent__view--preferences {
  max-height: min(40rem, calc(100dvh - 2rem));
  padding: 0;
}

.cookie-consent__heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.cookie-consent__heading svg,
.cookie-consent__heading i {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  color: var(--tacet-saas-accent, var(--proto-org-on-light));
}

.cookie-consent__heading h2 {
  margin: 0;
  color: var(--cookie-panel-strong);
  font-family: var(--proto-font-body);
  font-size: clamp(1rem, 0.94rem + 0.25vw, 1.16rem);
  font-weight: 760;
  line-height: 1.15;
  letter-spacing: 0;
}

.cookie-consent p {
  margin: 0;
  color: var(--cookie-panel-muted);
  font-size: 0.86rem;
  line-height: 1.48;
}

.cookie-consent__learn-more {
  justify-self: start;
  color: var(--cookie-panel-strong);
  font-size: 0.84rem;
  font-weight: 620;
  text-decoration: none;
}

.cookie-consent__learn-more:hover,
.cookie-consent__learn-more:focus-visible {
  color: var(--tacet-saas-accent, var(--proto-org-on-light));
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.cookie-consent__summary .cookie-consent__learn-more {
  white-space: nowrap;
}

.cookie-consent__summary-mobile,
.cookie-consent__label-mobile {
  display: none;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-consent__actions--preferences {
  justify-content: flex-end;
  padding: 1rem;
  border-top: 1px solid var(--cookie-panel-border);
  background: color-mix(in oklch, var(--cookie-panel-bg), transparent 6%);
}

.cookie-consent__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.45rem 0.8rem;
  border-radius: 0.42rem;
  font-family: var(--proto-font-body);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.cookie-consent__button:hover,
.cookie-consent__button:focus-visible {
  transform: translateY(-1px);
}

.cookie-consent__button--secondary {
  border: 1px solid var(--cookie-panel-border);
  background: color-mix(in oklch, var(--proto-background), transparent 56%);
  color: var(--cookie-panel-strong);
}

.cookie-consent__button--secondary:hover,
.cookie-consent__button--secondary:focus-visible {
  border-color: color-mix(in oklch, var(--proto-foreground), transparent 66%);
  background: color-mix(in oklch, var(--proto-background), transparent 28%);
}

.cookie-consent__button--primary {
  border: 1px solid color-mix(in oklch, var(--proto-foreground), transparent 8%);
  background: color-mix(in oklch, var(--proto-foreground), transparent 8%);
  color: var(--proto-background);
}

.cookie-consent__button--primary:hover,
.cookie-consent__button--primary:focus-visible {
  border-color: var(--tacet-saas-accent, var(--proto-org-on-light));
  background: var(--tacet-saas-accent, var(--proto-org-on-light));
  color: white;
}

.cookie-consent__preferences-head {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-bottom: 1px solid var(--cookie-panel-border);
}

.cookie-consent__options {
  display: grid;
  gap: 0.65rem;
  max-height: min(22rem, calc(100dvh - 18rem));
  padding: 1rem;
  overflow: auto;
}

.cookie-consent__option {
  border: 1px solid var(--cookie-panel-border);
  border-radius: 0.55rem;
  background: color-mix(in oklch, var(--proto-background), transparent 72%);
  overflow: hidden;
}

.cookie-consent__option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.5rem;
  padding: 0.25rem 0.7rem;
}

.cookie-consent__option-toggle {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.45rem;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--cookie-panel-strong);
  font-family: var(--proto-font-body);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.cookie-consent__option-toggle svg,
.cookie-consent__option-toggle i {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
  color: var(--cookie-panel-muted);
  transition: transform 140ms ease;
}

.cookie-consent__option-toggle span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cookie-consent__option-toggle[aria-expanded='true'] svg,
.cookie-consent__option-toggle[aria-expanded='true'] i {
  transform: rotate(180deg);
}

.cookie-consent__option-toggle:hover,
.cookie-consent__option-toggle:focus-visible {
  color: var(--tacet-saas-accent, var(--proto-org-on-light));
}

.cookie-consent__switch {
  position: relative;
  width: 2.5rem;
  height: 1.35rem;
  flex: 0 0 auto;
  border: 1px solid color-mix(in oklch, var(--proto-foreground), transparent 66%);
  border-radius: var(--proto-radius-full);
  background: color-mix(in oklch, var(--proto-foreground), transparent 48%);
  cursor: pointer;
}

.cookie-consent__switch[disabled] {
  opacity: 0.64;
  cursor: not-allowed;
}

.cookie-consent__switch span {
  position: absolute;
  top: 50%;
  left: 0.18rem;
  width: 0.92rem;
  height: 0.92rem;
  border-radius: var(--proto-radius-full);
  background: var(--proto-background);
  transform: translateY(-50%);
  transition:
    left 140ms ease,
    background 140ms ease;
}

.cookie-consent__switch[aria-checked='true'] {
  border-color: color-mix(in oklch, var(--proto-foreground), transparent 10%);
  background: color-mix(in oklch, var(--proto-foreground), transparent 10%);
}

.cookie-consent__switch[aria-checked='true'] span {
  left: calc(100% - 1.1rem);
}

.cookie-consent__switch:not([disabled]):hover,
.cookie-consent__switch:not([disabled]):focus-visible {
  border-color: var(--tacet-saas-accent, var(--proto-org-on-light));
}

.cookie-consent__option-description {
  padding: 0 0.8rem 0.75rem 2.1rem;
  font-size: 0.82rem;
}

@media (max-width: 42rem) {
  .cookie-consent {
    left: 0.75rem;
    bottom: 0.75rem;
    width: min(24rem, calc(100vw - 1.5rem));
    max-height: calc(100dvh - 1.5rem);
  }

  .cookie-consent__view--banner {
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .cookie-consent__view--preferences {
    max-height: calc(100dvh - 1.5rem);
  }

  .cookie-consent__options {
    max-height: calc(100dvh - 20rem);
  }

  .cookie-consent__summary-desktop,
  .cookie-consent__label-desktop {
    display: none;
  }

  .cookie-consent__summary-mobile,
  .cookie-consent__label-mobile {
    display: inline;
  }

  .cookie-consent__actions,
  .cookie-consent__actions--preferences {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.375rem;
  }

  .cookie-consent__actions--preferences {
    padding: 0.75rem;
  }

  .cookie-consent__view--banner .cookie-consent__actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cookie-consent__button {
    width: 100%;
    min-height: 2.5rem;
    padding-block: 0.35rem;
    font-size: 0.8rem;
  }

  .cookie-consent__view--banner .cookie-consent__button {
    padding-inline: 0.375rem;
  }
}
