.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: left;
}

.privacy-note svg {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  margin: 0 !important;
}

.profile-message {
  margin-top: 15px;
}

.legal-dialog {
  width: min(1120px, calc(100vw - 32px));
  min-width: 0;
  max-width: none;
  height: min(880px, calc(100dvh - 32px));
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: transparent;
  color: #10212a;
  overflow: visible;
}

.legal-dialog::backdrop {
  background:
    radial-gradient(circle at 78% 12%, rgba(0, 170, 169, .2), transparent 28%),
    rgba(5, 22, 29, .76);
  backdrop-filter: blur(12px) saturate(.8);
}

.legal-modal {
  position: relative;
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 28px;
  background: #f8fcfc;
  box-shadow: 0 34px 100px rgba(3, 31, 38, .32);
}

.legal-dialog[open] .legal-modal {
  animation: legalModalIn .44s cubic-bezier(.2, .8, .2, 1) both;
}

.legal-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 28px 34px 22px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 84% 35%, rgba(22, 207, 197, .25), transparent 24%),
    linear-gradient(120deg, #0b2530 0%, #103e46 65%, #0a5960 100%);
}

.legal-header::after {
  content: "";
  position: absolute;
  width: 290px;
  height: 290px;
  right: 74px;
  top: -198px;
  border: 1px solid rgba(115, 238, 229, .19);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(115, 238, 229, .045), 0 0 0 76px rgba(115, 238, 229, .025);
  pointer-events: none;
}

.legal-header > div {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1;
}

.legal-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: #75ddd7;
  font: 500 9px/1 "DM Mono", monospace;
  letter-spacing: .18em;
}

.legal-kicker span {
  width: 22px;
  height: 1px;
  background: currentColor;
}

.legal-header h2 {
  margin: 0 0 8px;
  font: 800 34px/.95 Manrope, sans-serif;
  letter-spacing: -.065em;
}

.legal-header h2 em {
  color: #52d9d1;
  font-family: Georgia, serif;
  font-weight: 400;
}

.legal-header > div > p:last-child {
  max-width: 570px;
  margin: 0;
  color: rgba(230, 248, 247, .68);
  font: 500 11px/1.55 Manrope, sans-serif;
}

.legal-close {
  position: relative;
  z-index: 2;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .09);
  color: #fff;
  cursor: pointer;
  transition: transform .2s, background .2s;
}

.legal-close:hover {
  transform: rotate(6deg);
  background: rgba(255, 255, 255, .16);
}

.legal-close svg {
  width: 18px;
}

.legal-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 34px;
  border-bottom: 1px solid #dfecec;
  background: #fff;
}

.legal-company-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 10px;
  background: #e6f8f6;
}

.legal-company-mark img {
  width: 21px;
  height: 21px;
  object-fit: contain;
}

.legal-identity > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.legal-identity strong {
  font: 800 10px/1.2 Manrope, sans-serif;
}

.legal-identity > div span {
  color: #778d92;
  font: 500 9px/1.2 "DM Mono", monospace;
}

.legal-version {
  margin-left: auto;
  padding: 7px 9px;
  border: 1px solid #cde9e6;
  border-radius: 999px;
  color: #068b89;
  background: #effaf9;
  font: 500 8px/1 "DM Mono", monospace;
  letter-spacing: .08em;
}

.legal-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px 34px 0;
  background: #f8fcfc;
}

.legal-tabs button {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid #dceaea;
  border-radius: 12px 12px 7px 7px;
  color: #61777d;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s, transform .2s;
}

.legal-tabs button:hover {
  transform: translateY(-1px);
  border-color: #a9d9d5;
}

.legal-tabs button.is-active {
  border-color: #10aaa7;
  color: #08353d;
  background: #ebfaf8;
  box-shadow: inset 0 -2px #00aaa9;
}

.legal-tabs button > svg {
  width: 18px;
  flex: 0 0 18px;
  color: #00aaa9;
}

.legal-tabs button > span {
  min-width: 0;
  display: grid;
  gap: 2px;
  font: 800 10px/1.2 Manrope, sans-serif;
}

.legal-tabs small {
  color: #83979b;
  font: 500 8px/1.2 "DM Mono", monospace;
}

.legal-scroll {
  margin: 10px 20px 0 34px;
  padding: 5px 22px 24px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #7cd5d0 #e7f2f1;
  outline: none;
}

.legal-scroll::-webkit-scrollbar {
  width: 7px;
}

.legal-scroll::-webkit-scrollbar-track {
  background: #e7f2f1;
  border-radius: 999px;
}

.legal-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #7cd5d0;
}

.legal-document {
  display: none;
  max-width: 900px;
  margin: 0 auto;
  animation: legalDocumentIn .25s ease both;
}

.legal-document.is-active {
  display: block;
}

.legal-document-title {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 12px 0 20px;
}

.legal-document-title > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  border-radius: 12px;
  color: #007e7c;
  background: #dff7f4;
  font: 500 10px/1 "DM Mono", monospace;
}

.legal-document-title p {
  margin: 0 0 4px;
  color: #00aaa9;
  font: 500 8px/1 "DM Mono", monospace;
  letter-spacing: .16em;
}

.legal-document-title h3 {
  margin: 0;
  font: 800 26px/1 Manrope, sans-serif;
  letter-spacing: -.055em;
}

.legal-intro {
  margin: 0 0 17px;
  padding: 16px 18px;
  border-left: 3px solid #00aaa9;
  border-radius: 0 12px 12px 0;
  color: #456169;
  background: #edf8f7;
  font: 600 11px/1.7 Manrope, sans-serif;
}

.legal-document section {
  padding: 16px 0;
  border-top: 1px solid #e0ecec;
}

.legal-document h4 {
  margin: 0 0 8px;
  color: #112a32;
  font: 800 12px/1.3 Manrope, sans-serif;
  letter-spacing: -.018em;
}

.legal-document section p,
.legal-document section li {
  color: #5e7379;
  font: 500 10.5px/1.72 Manrope, sans-serif;
}

.legal-document section p {
  margin: 0;
}

.legal-document section p + p {
  margin-top: 8px;
}

.legal-document ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.legal-document strong {
  color: #28444b;
}

.legal-actions {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  border-top: 1px solid #dceaea;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 -12px 32px rgba(11, 51, 57, .06);
}

.legal-header,
.legal-identity,
.legal-tabs,
.legal-scroll,
.legal-actions {
  min-width: 0;
}

.legal-actions > div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #71878c;
  font: 600 9px/1.4 Manrope, sans-serif;
}

.legal-actions > div svg {
  width: 14px;
  color: #00aaa9;
}

.legal-secondary,
.legal-primary {
  min-height: 39px;
  padding: 10px 15px;
  border-radius: 10px;
  font: 800 9.5px/1 Manrope, sans-serif;
  cursor: pointer;
}

.legal-secondary {
  border: 1px solid #d4e5e4;
  color: #5f777c;
  background: #fff;
}

.legal-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #00aaa9;
  color: #fff;
  background: #008f8e;
  box-shadow: 0 9px 20px rgba(0, 143, 142, .2);
}

.legal-primary svg {
  width: 14px;
}

.legal-primary:hover,
.legal-secondary:hover {
  transform: translateY(-1px);
}

@keyframes legalModalIn {
  from { opacity: 0; transform: translateY(22px) scale(.975); }
  to { opacity: 1; transform: none; }
}

@keyframes legalDocumentIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .legal-dialog {
    width: calc(100vw - 14px);
    height: calc(100dvh - 14px);
    border-radius: 22px;
  }

  .legal-modal {
    border-radius: 22px;
  }

  .legal-header {
    gap: 12px;
    padding: 22px 20px 18px;
  }

  .legal-header h2 {
    font-size: 29px;
  }

  .legal-header > div > p:last-child {
    padding-right: 8px;
    font-size: 10px;
  }

  .legal-close {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .legal-identity,
  .legal-actions {
    padding-left: 20px;
    padding-right: 20px;
  }

  .legal-version {
    display: none;
  }

  .legal-tabs {
    padding: 12px 20px 0;
  }

  .legal-tabs button {
    padding: 10px;
  }

  .legal-tabs small {
    display: none;
  }

  .legal-scroll {
    margin-left: 20px;
    margin-right: 10px;
    padding-right: 10px;
  }

  .legal-actions {
    grid-template-columns: 1fr 1.3fr;
    gap: 8px;
  }

  .legal-actions > div {
    display: none;
  }

  .legal-secondary,
  .legal-primary {
    min-width: 0;
    padding: 10px 8px;
  }
}

@media (max-width: 410px) {
  .legal-header h2 {
    font-size: 26px;
  }

  .legal-version {
    display: none;
  }

  .legal-document-title h3 {
    font-size: 22px;
  }

  .legal-actions {
    padding: 10px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-dialog[open] .legal-modal,
  .legal-document {
    animation: none;
  }
}
