/* Privacy, cookies and legal pages */
.legal-page {
  background: var(--cream);
}

.legal-shell {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 170px 0 100px;
  color: var(--ink);
}

.legal-shell > .display-title {
  max-width: 850px;
  margin-bottom: 18px;
}

.legal-updated {
  margin: 0 0 52px;
  color: rgba(18, 10, 52, 0.68);
  font-size: 14px;
}

.legal-shell section {
  padding: 30px 0;
  border-top: 1px solid rgba(18, 10, 52, 0.2);
}

.legal-shell h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.05;
}

.legal-shell p,
.legal-shell li {
  font-size: 17px;
  line-height: 1.7;
}

.legal-shell p {
  margin: 0 0 14px;
}

.legal-shell ul {
  margin: 0;
  padding-left: 24px;
}

.legal-shell a,
.cookie-banner a,
.cookie-dialog a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-table-wrap {
  margin: 22px 0;
  overflow-x: auto;
  border: 1px solid rgba(18, 10, 52, 0.25);
  border-radius: 14px;
}

.legal-table-wrap table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.legal-table-wrap th,
.legal-table-wrap td {
  padding: 15px;
  border-bottom: 1px solid rgba(18, 10, 52, 0.16);
  text-align: left;
  vertical-align: top;
}

.legal-table-wrap th {
  background: rgba(18, 10, 52, 0.08);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal-table-wrap tr:last-child td {
  border-bottom: 0;
}

.legal-footer {
  padding-top: 0;
}

.footer-legal-row {
  gap: 24px;
}

.footer-legal-row nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 22px;
}

.footer-legal-row a,
.footer-legal-row button {
  color: inherit;
  font: inherit;
  font-size: 13px;
  text-decoration: none;
}

.footer-legal-row button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.footer-legal-row a:hover,
.footer-legal-row button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.privacy-consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.45;
}

.privacy-consent input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--orange);
}

.privacy-consent a {
  color: inherit;
  text-underline-offset: 3px;
}

.cookie-banner {
  position: fixed;
  z-index: 1000;
  right: 20px;
  bottom: 20px;
  left: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 24px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
}

.cookie-banner p {
  max-width: 800px;
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-banner .cookie-eyebrow,
.cookie-dialog .cookie-eyebrow {
  margin-bottom: 6px;
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cookie-banner a {
  font-size: 13px;
}

.cookie-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(165px, 1fr));
  gap: 8px;
}

.cookie-actions .button {
  min-height: 46px;
  padding: 10px 16px;
  font-size: 12px;
}

.cookie-link-button {
  grid-column: 1 / -1;
  padding: 5px;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: var(--font-display);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cookie-modal[hidden] {
  display: none;
}

.cookie-modal {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.cookie-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 5, 28, 0.76);
  backdrop-filter: blur(5px);
}

.cookie-dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 30px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 8px 8px 0 var(--orange);
}

.cookie-dialog h2 {
  margin: 0 36px 10px 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px);
}

.cookie-dialog > p {
  line-height: 1.55;
}

.cookie-dialog-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.cookie-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid rgba(18, 10, 52, 0.2);
}

.cookie-choice strong,
.cookie-choice span {
  display: block;
}

.cookie-choice strong {
  margin-bottom: 4px;
  font-family: var(--font-display);
}

.cookie-choice span {
  font-size: 14px;
  line-height: 1.45;
}

.cookie-choice input {
  width: 22px;
  height: 22px;
  accent-color: var(--orange);
}

.cookie-dialog-detail {
  padding-top: 14px;
  border-top: 1px solid rgba(18, 10, 52, 0.2);
  font-size: 13px;
}

.cookie-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

.cookie-dialog-actions .cookie-link-button {
  grid-column: auto;
}

.cookie-dialog-open {
  overflow: hidden;
}

@media (max-width: 780px) {
  .legal-shell {
    width: min(100% - 32px, 900px);
    padding: 125px 0 70px;
  }

  .legal-shell p,
  .legal-shell li {
    font-size: 16px;
  }

  .footer-legal-row,
  .footer-legal-row nav {
    justify-content: flex-start;
  }

  .cookie-banner {
    right: 10px;
    bottom: 10px;
    left: 10px;
    grid-template-columns: 1fr;
    gap: 16px;
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    padding: 18px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .cookie-actions {
    grid-template-columns: 1fr;
  }

  .cookie-actions .cookie-link-button {
    grid-column: auto;
  }

  .cookie-dialog {
    padding: 24px 20px;
  }

  .cookie-dialog-actions {
    display: grid;
  }
}
