/* First-party consent: equal choices, optional analytics off until consent. */
.cookie-panel,
.cookie-dialog {
  box-sizing: border-box;
  border: 1px solid #dedee3;
  background: #fff;
  color: #1d1d1f;
  font: 14px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.cookie-panel {
  position: fixed;
  z-index: 100;
  inset: auto 16px max(16px, env(safe-area-inset-bottom));
  width: min(1040px, calc(100% - 32px));
  max-height: calc(100svh - 32px);
  margin-inline: auto;
  overflow-y: auto;
  padding: 24px;
  border-radius: 18px;
  box-shadow: 0 8px 48px #1d1d1f18;
}
.cookie-panel h2,
.cookie-dialog h2 {
  margin: 0 30px 10px 0;
  font-family: inherit;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.035em;
}
.cookie-panel p,
.cookie-dialog p { margin: 0; }
.cookie-panel .cookie-eyebrow,
.cookie-dialog .cookie-eyebrow {
  margin-bottom: 8px;
  color: #6e6e73;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.cookie-panel #cookie-description { max-width: 620px; color: #515154; font-size: 13px; }
.cookie-panel h2 { margin-bottom: 8px; font-size: 19px; }
.cookie-panel .cookie-privacy { display: inline; min-height: 0; font-size: inherit; }
.cookie-privacy {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #515154;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie-actions,
.cookie-dialog-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cookie-actions { margin-top: 12px; }
.cookie-actions:has([data-cookie-choice="analytics"][hidden]),
.cookie-dialog-choices:has([data-cookie-action="analytics"][hidden]) { grid-template-columns: minmax(0, 1fr); }
.cookie-choice,
.cookie-save,
.cookie-customize {
  min-width: 0;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  background: #f5f5f7;
  color: #1d1d1f;
  font: 500 13px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  text-align: center;
  cursor: pointer;
}
.cookie-choice:hover:enabled { background: #e8e8eb; border-color: #bdbdc3; }
.cookie-choice { font-weight: 600; padding-inline: 10px; }
.cookie-customize {
  grid-column: 1 / -1;
  border-color: transparent;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie-customize:hover { background: #f5f5f7; }
.cookie-choice:disabled,
.cookie-save:disabled { opacity: .5; cursor: wait; }
.cookie-panel .cookie-error,
.cookie-dialog .cookie-error { margin-top: 12px; font-size: 12px; color: #b42318; }
.cookie-panel .cookie-error { grid-column: 1 / -1; }
.cookie-dialog {
  position: fixed;
  inset: 0;
  width: min(620px, calc(100% - 32px));
  max-height: calc(100svh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 24px 80px #0003;
}
.cookie-dialog:not([open]) { display: none; }
.cookie-dialog[open] { display: flex; flex-direction: column; }
.cookie-dialog::backdrop { background: #1d1d1f66; backdrop-filter: blur(3px); }
.cookie-dialog-header { position: relative; flex: none; padding: 26px 28px 18px; border-bottom: 1px solid #e5e5ea; }
.cookie-dialog-header h2 { margin-bottom: 0; font-size: 26px; }
.cookie-dialog-header h2:focus { outline: none; }
.cookie-dialog-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 28px; font-size: 13px; }
.cookie-dialog .cookie-current { margin-top: 12px; color: #515154; font-size: 12px; }
.cookie-category { padding: 20px 0; border-bottom: 1px solid #e5e5ea; }
.cookie-category-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.cookie-category h3,
.cookie-toggle strong { font-size: 15px; font-weight: 600; letter-spacing: -.015em; line-height: 1.4; }
.cookie-category p { color: #515154; font-size: 12px; line-height: 1.75; }
.cookie-required { flex: none; padding: 4px 9px; border-radius: 6px; background: #f2f2f4; color: #515154; font-size: 10px; }
.cookie-toggle { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 44px; margin-bottom: 6px; cursor: pointer; }
.cookie-toggle > span:first-child { display: grid; gap: 2px; }
.cookie-toggle > span:first-child > span { color: #6e6e73; font-size: 11px; }
.cookie-toggle input {
  position: absolute;
  right: 0;
  width: 46px;
  height: 28px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.cookie-switch { flex: none; width: 46px; height: 28px; padding: 3px; border: 1px solid #a6a6ad; border-radius: 28px; background: #e5e5ea; pointer-events: none; }
.cookie-switch::before { content: ''; display: block; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0003; }
.cookie-toggle input:checked + .cookie-switch { border-color: #1d1d1f; background: #1d1d1f; }
.cookie-toggle input:checked + .cookie-switch::before { transform: translateX(18px); }
.cookie-toggle input:focus-visible + .cookie-switch { outline: 2px solid #515154; outline-offset: 4px; }
.cookie-toggle input:disabled + .cookie-switch { opacity: .5; }
.cookie-dialog .cookie-unavailable { margin-top: 18px; padding: 12px; border: 1px solid #e5e5ea; border-radius: 8px; background: #f5f5f7; color: #515154; font-size: 12px; }
.cookie-inventory { margin-top: 22px; }
.cookie-inventory h3 { margin-bottom: 12px; font-size: 14px; font-weight: 600; letter-spacing: -.015em; }
.cookie-inventory > p { margin: 12px 0; color: #515154; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.cookie-inventory code { color: #1d1d1f; font-size: 11px; }
.cookie-inventory .cookie-storage-note { margin: 14px 0 0; }
.cookie-dialog .cookie-withdrawal { margin-top: 18px; color: #6e6e73; font-size: 11px; }
.cookie-dialog-footer { display: grid; gap: 10px; flex: none; padding: 18px 28px 22px; border-top: 1px solid #e5e5ea; background: #fff; }
.cookie-save { background: #1d1d1f; border-color: #1d1d1f; color: #fff; }
.cookie-save:hover:enabled { background: #363638; }
.cookie-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6e6e73;
  font: 26px/1 Arial, sans-serif;
  cursor: pointer;
}
.cookie-close:hover { background: #f5f5f7; color: #1d1d1f; }
.cookie-settings { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: transparent; color: #6e6e73; font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.cookie-settings:hover { color: #1d1d1f; text-decoration: underline; text-underline-offset: 3px; }
nav:has(> .cookie-settings) { flex-wrap: wrap; }
.cookie-panel a:focus-visible,
.cookie-panel button:focus-visible,
.cookie-dialog a:focus-visible,
.cookie-dialog button:focus-visible,
.cookie-dialog summary:focus-visible,
.cookie-settings:focus-visible { outline: 2px solid #515154; outline-offset: 3px; }
body.has-cookie-panel { padding-bottom: var(--cookie-panel-space, 320px); }
body.has-cookie-dialog { overflow: hidden; }
@media (min-width: 761px) {
  .cookie-panel { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: center; gap: 8px 30px; padding: 22px 26px; }
  .cookie-actions { margin-top: 0; }
}
@media (max-width: 480px) {
  .cookie-panel { inset-inline: 10px; bottom: max(10px, env(safe-area-inset-bottom)); width: calc(100% - 20px); padding: 20px; border-radius: 14px; }
  .cookie-panel h2 { font-size: 20px; }
  .cookie-dialog { width: calc(100% - 20px); max-height: calc(100svh - 20px); border-radius: 16px; }
  .cookie-dialog-header { padding: 22px 20px 16px; }
  .cookie-dialog-header h2 { font-size: 23px; }
  .cookie-dialog-body { padding: 18px 20px; }
  .cookie-dialog-footer { padding: 14px 20px max(18px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-panel *,
  .cookie-dialog * { transition: none !important; }
}
