/* Cookie consent notice on app-site pages: the cookie-consent rules from components.css with their
   media queries, read against the app-site palette. They sit outside @layer so app-site.css element
   rules (section padding, borders) do not override them. Regenerate from components.css when it changes. */
.app-site{--background:var(--bg);--foreground:var(--fg);--border:var(--line);--surface-bright:var(--surface);--font-body:var(--f-body);--radius-full:999px;--org-on-light:var(--accent);--tacet-saas-accent:var(--accent)}
.app-site .cookie-consent{padding-block:0}
  .cookie-consent {
    --cookie-panel-bg: var(--surface-bright);
    --cookie-panel-ink: var(--foreground);
    --cookie-panel-muted: color-mix(in oklch, var(--foreground), transparent 34%);
    --cookie-panel-border: color-mix(in oklch, var(--border), transparent 12%);
    --cookie-panel-strong: color-mix(in oklch, var(--foreground), transparent 4%);
    position: fixed;
    left: max(clamp(1rem, 2.2vw, 1.5rem), env(safe-area-inset-left));
    right: auto;
    bottom: clamp(1rem, 2.2vw, 1.5rem);
    z-index: 80;
    width: min(25rem, 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 0.75rem 2rem color-mix(in oklch, black, transparent 93%),
      0 0.125rem 0.5rem color-mix(in oklch, black, transparent 96%);
    overflow: hidden;
  }
  html.dark .cookie-consent {
    --cookie-panel-muted: color-mix(in oklch, var(--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.5rem;
    padding: 1rem;
  }
  .cookie-consent__view--banner .cookie-consent__heading h2 {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
  }
  .cookie-consent__view--banner .cookie-consent__actions {
    margin-top: 0.25rem;
  }
  .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(--org-on-light));
  }
  .cookie-consent__heading h2 {
    margin: 0;
    color: var(--cookie-panel-strong);
    font-family: var(--font-body);
    font-size: clamp(0.98rem, 0.92rem + 0.2vw, 1.08rem);
    font-weight: 760;
    line-height: 1.15;
    letter-spacing: 0;
  }
  .cookie-consent p {
    margin: 0;
    color: var(--cookie-panel-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
  }
  .cookie-consent__learn-more {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    min-height: 24px;
    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(--org-on-light));
    text-decoration: underline;
    text-underline-offset: 0.18em;
  }
  .cookie-consent__summary .cookie-consent__learn-more {
    white-space: nowrap;
  }
  .cookie-consent__label-mobile {
    display: none;
  }
  .cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .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: 2.25rem;
    padding: 0.4rem 0.65rem;
    border-radius: 0.42rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    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(--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(--foreground), transparent 66%);
    background: color-mix(in oklch, var(--background), transparent 28%);
  }
  .cookie-consent__button--primary {
    border: 1px solid color-mix(in oklch, var(--foreground), transparent 8%);
    background: color-mix(in oklch, var(--foreground), transparent 8%);
    color: var(--background);
  }
  .cookie-consent__button--primary:hover,
  .cookie-consent__button--primary:focus-visible {
    border-color: var(--tacet-saas-accent, var(--org-on-light));
    background: var(--tacet-saas-accent, var(--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(--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(--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(--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(--foreground), transparent 66%);
    border-radius: var(--radius-full);
    background: color-mix(in oklch, var(--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(--radius-full);
    background: var(--background);
    transform: translateY(-50%);
    transition:
      left 140ms ease,
      background 140ms ease;
  }
  .cookie-consent__switch[aria-checked='true'] {
    border-color: color-mix(in oklch, var(--foreground), transparent 10%);
    background: color-mix(in oklch, var(--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(--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);
      overflow-y: auto;
      overscroll-behavior: contain;
    }
    .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__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;
    }
  }

  @media (width < 56rem) {
    body:has([data-cookie-consent]:not([hidden])) .proto-install {
      display: none;
    }
  }

