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

.cookie-consent {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.cookie-consent__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 45, 66, 0.6);
}

.cookie-consent__dialog {
  position: relative;
  width: min(100%, 680px);
  max-height: min(92svh, 780px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  background: white;
  box-shadow: 0 30px 80px rgba(8, 45, 66, 0.3);
}

.cookie-consent__dialog:focus {
  outline: none;
}

.cookie-consent__panel {
  padding: clamp(26px, 5vw, 42px);
}

.cookie-consent__eyebrow {
  margin: 0 0 10px;
  color: var(--steel-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cookie-consent h2 {
  max-width: none;
  margin: 0;
  color: var(--ink-deep);
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.15;
}

.cookie-consent h2 + p {
  margin: 16px 0 0;
  color: #536a75;
  font-size: 14px;
  font-weight: 600;
}

.cookie-consent__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin: 20px 0 0;
}

.cookie-consent__links a {
  color: var(--steel-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cookie-consent__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.cookie-consent__actions--primary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.cookie-consent__button {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--steel-dark);
  border-radius: 999px;
  background: white;
  color: var(--ink-deep);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.cookie-consent__button:hover,
.cookie-consent__button:focus-visible {
  background: var(--steel-dark);
  color: white;
}

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

.cookie-consent__customize-link {
  display: block;
  margin: 14px auto 0;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--steel-dark);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.cookie-consent__customize-link:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.cookie-consent__choices {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.cookie-consent__choices legend {
  margin-bottom: 10px;
  color: var(--ink-deep);
  font-size: 14px;
  font-weight: 800;
}

.cookie-consent__choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.cookie-consent__choice strong,
.cookie-consent__choice small {
  display: block;
}

.cookie-consent__choice strong {
  color: var(--ink-deep);
  font-size: 13px;
}

.cookie-consent__choice small,
.cookie-consent__choice-help {
  color: #536a75;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
}

.cookie-consent__choice-help {
  margin: -6px 15px 2px;
}

.cookie-consent__choice input {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  accent-color: var(--steel-dark);
}

.cookie-settings-trigger {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1100;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: var(--ink-deep);
  color: white;
  box-shadow: 0 10px 28px rgba(8, 45, 66, 0.2);
  cursor: pointer;
}

.cookie-settings-trigger svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.cookie-settings-trigger::after {
  position: absolute;
  left: calc(100% + 10px);
  padding: 7px 9px;
  border-radius: 7px;
  background: var(--ink-deep);
  color: white;
  content: attr(data-tooltip);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.cookie-settings-trigger:hover::after,
.cookie-settings-trigger:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

.cookie-settings-trigger:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.legal-page {
  padding: clamp(52px, 8vw, 92px) 0;
  background: var(--paper);
}

.legal-page__intro,
.legal-page__content {
  width: min(860px, calc(100% - 40px));
  margin-inline: auto;
}

.legal-page__intro {
  margin-bottom: 32px;
}

.legal-page__intro h1 {
  margin: 0;
  color: var(--ink-deep);
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
}

.legal-page__intro p {
  max-width: 720px;
  margin: 16px 0 0;
  color: #536a75;
  font-weight: 600;
}

.legal-page__content {
  display: grid;
  gap: 20px;
}

.legal-page__section {
  min-width: 0;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 28px rgba(8, 45, 66, 0.05);
}

.legal-page__section h2 {
  max-width: none;
  margin: 0 0 12px;
  color: var(--steel-dark);
  font-size: 19px;
  line-height: 1.25;
}

.legal-page__section h3 {
  margin: 20px 0 8px;
  color: var(--ink-deep);
  font-size: 14px;
}

.legal-page__section p,
.legal-page__section li,
.legal-page__section td,
.legal-page__section th {
  color: #536a75;
  font-size: 13px;
  font-weight: 600;
}

.legal-page__section p:last-child,
.legal-page__section ul:last-child {
  margin-bottom: 0;
}

.legal-page__section a {
  color: var(--steel-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-page__table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.legal-page table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.legal-page th,
.legal-page td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.legal-page th {
  color: var(--ink-deep);
}

@media (max-width: 640px) {
  .cookie-consent {
    padding: 12px;
  }

  .cookie-consent__actions,
  .cookie-consent__actions--primary {
    grid-template-columns: 1fr;
  }

  .cookie-settings-trigger {
    left: max(12px, env(safe-area-inset-left));
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .cookie-settings-trigger::after {
    left: 0;
    bottom: calc(100% + 10px);
    transform: translateY(4px);
  }

  .cookie-settings-trigger:hover::after,
  .cookie-settings-trigger:focus-visible::after {
    transform: translateY(0);
  }

  .legal-page table {
    min-width: 0;
  }

  .legal-page thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .legal-page tbody,
  .legal-page tr,
  .legal-page td {
    display: block;
  }

  .legal-page tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .legal-page td {
    padding: 7px 0;
    border: 0;
  }

  .legal-page td::before {
    display: block;
    margin-bottom: 2px;
    color: var(--ink-deep);
    content: attr(data-label);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }
}
