/* Legal documents and compliance UI */

.legal-head {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 0 28px;
}

.legal-head h1 {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: -2.6px;
  margin: 16px 0 14px;
  font-weight: 800;
}

.legal-lead {
  max-width: 760px;
  margin: 0;
  color: #666c61;
  font-size: 14px;
  line-height: 1.8;
}

.legal-stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 8px 12px;
  border: 1px solid #e3e5db;
  border-radius: 8px;
  background: #fff;
  color: #858b80;
  font-size: 10px;
  font-weight: 700;
}

.legal-admin-note {
  margin-top: 14px;
  padding: 11px 14px;
  background: #fff6d8;
  border: 1px solid #ecdf9a;
  border-radius: 8px;
  color: #6b5d1f;
  font-size: 10.5px;
  line-height: 1.65;
}

.legal-admin-note code {
  padding: 1px 4px;
  background: #f3e9b8;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 30px;
  max-width: 1120px;
  margin: 0 auto 72px;
  align-items: start;
}

.legal-side {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 13px;
}

.legal-nav {
  display: grid;
  gap: 2px;
  padding: 12px;
  background: #fff;
  border: 1px solid #eceee7;
  border-radius: 13px;
}

.legal-nav-title {
  padding: 5px 9px 8px;
  color: #9a9f94;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.legal-nav a {
  display: block;
  padding: 8px 9px;
  border-radius: 7px;
  color: #62685d;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  transition: background .15s, color .15s;
}

.legal-nav a:hover {
  background: #f5f6f1;
  color: #20231f;
}

.legal-nav a.active {
  background: #20231f;
  color: #fff;
}

.legal-side-card {
  padding: 15px;
  background: #eef0e7;
  border-radius: 13px;
}

.legal-side-card b {
  display: block;
  font-size: 11px;
  margin-bottom: 5px;
}

.legal-side-card a {
  color: #1d6b47;
  font-size: 11px;
  font-weight: 700;
  word-break: break-word;
}

.legal-side-card p {
  margin: 8px 0 0;
  color: #7b8176;
  font-size: 10px;
  line-height: 1.65;
}

.legal-doc {
  min-width: 0;
  padding: 36px 42px;
  background: #fff;
  border: 1px solid #eceee7;
  border-radius: 16px;
}

.legal-doc h2 {
  margin: 32px 0 12px;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -.5px;
  font-weight: 800;
  scroll-margin-top: 100px;
}

.legal-doc h2:first-of-type {
  margin-top: 6px;
}

.legal-doc h3 {
  margin: 22px 0 9px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 800;
}

.legal-doc p,
.legal-doc li {
  color: #454b41;
  font-size: 12.5px;
  line-height: 1.85;
}

.legal-doc p {
  margin: 0 0 11px;
}

.legal-doc ul,
.legal-doc ol {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
  padding-left: 20px;
}

.legal-doc li > ul,
.legal-doc li > ol {
  margin-top: 7px;
  margin-bottom: 3px;
}

.legal-doc a {
  color: #1d6b47;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-doc a:hover {
  color: #164f35;
}

.legal-meta {
  margin: -2px 0 18px !important;
  padding-bottom: 16px;
  border-bottom: 1px solid #eceee7;
  color: #8b9085 !important;
  font-size: 10.5px !important;
}

.legal-note {
  margin: 18px 0;
  padding: 15px 17px;
  background: #f7f7f0;
  border-left: 3px solid #d6c331;
  border-radius: 0 8px 8px 0;
}

.legal-note p:last-child {
  margin-bottom: 0;
}

.legal-note-soft {
  background: #f2f4ed;
  border-left-color: #1d6b47;
}

.legal-facts {
  display: grid;
  gap: 0;
  margin: 16px 0 22px;
  border: 1px solid #eceee7;
  border-radius: 11px;
  overflow: hidden;
}

.legal-facts > div {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 14px;
  border-bottom: 1px solid #eceee7;
}

.legal-facts > div:last-child {
  border-bottom: 0;
}

.legal-facts dt {
  color: #858b80;
  font-size: 10.5px;
  font-weight: 700;
}

.legal-facts dd {
  margin: 0;
  color: #343a30;
  font-size: 11.5px;
  line-height: 1.6;
  word-break: break-word;
}

.legal-table {
  width: 100%;
  margin: 14px 0 18px;
  border-collapse: collapse;
  font-size: 11.5px;
}

.legal-table th {
  padding: 9px 10px;
  background: #f4f5ef;
  border: 1px solid #e8eae1;
  color: #5b6156;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .3px;
  text-align: left;
  text-transform: uppercase;
}

.legal-table td {
  padding: 9px 10px;
  border: 1px solid #eceee7;
  color: #4b5147;
  line-height: 1.65;
  vertical-align: top;
}

.legal-table code {
  padding: 1px 5px;
  background: #f1f2ec;
  border-radius: 4px;
  color: #1d4f38;
  font-size: 10.5px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.legal-doc-footer {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid #eceee7;
}

.legal-doc-footer p {
  margin: 0 0 6px;
  color: #8b9085;
  font-size: 10px;
  line-height: 1.7;
}

.legal-doc-footer a {
  color: #6d7469;
  text-decoration: none;
}

.legal-doc-footer a:hover {
  color: #20231f;
  text-decoration: underline;
}

.detail-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  margin-top: 12px;
  font-size: 10px;
  font-weight: 700;
}

.detail-legal-links a {
  color: #858b80;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.detail-legal-links a:hover {
  color: #20231f;
}

/* Consent checkboxes */
.consent-checks {
  display: grid;
  gap: 9px;
  margin: 4px 0 6px;
}

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #6c7268;
  font-size: 10.5px;
  line-height: 1.6;
  cursor: pointer;
}

.check-field input {
  flex: none;
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: #1d6b47;
  cursor: pointer;
}

.check-field a {
  color: #1d6b47;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.check-field-wide {
  margin: 2px 0 16px;
  padding: 12px 14px;
  background: #f7f8f3;
  border: 1px solid #eceee7;
  border-radius: 9px;
  font-size: 11px;
}

.form-submit-row a {
  color: #1d6b47;
  font-weight: 700;
  text-decoration: underline;
}

/* Footer legal navigation */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px 22px;
  color: #8b9085;
  font-size: 10px;
  line-height: 1.6;
}

.footer-legal a {
  color: #7d8378;
  font-weight: 600;
}

.footer-legal a:hover {
  color: #20231f;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Cookie notice */
.cookie-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 16px;
  background: #20231f;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(22, 28, 20, .25);
}

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

.cookie-banner p {
  margin: 0;
  color: #e7e9e2;
  font-size: 10.5px;
  line-height: 1.6;
}

.cookie-banner a {
  color: #f4e65d;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner .button {
  flex: none;
  min-height: 34px;
  padding: 0 14px;
  font-size: 10px;
}

@media (max-width: 1050px) {
  .legal-layout {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 22px;
  }

  .legal-doc {
    padding: 30px 31px;
  }
}

@media (max-width: 760px) {
  .legal-head {
    padding: 36px 0 19px;
  }

  .legal-head h1 {
    font-size: 36px;
    letter-spacing: -1.7px;
  }

  .legal-lead {
    font-size: 12.5px;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 50px;
  }

  .legal-side {
    position: static;
  }

  .legal-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    padding: 9px;
  }

  .legal-nav-title {
    grid-column: 1 / -1;
    padding: 3px 7px 5px;
  }

  .legal-nav a {
    padding: 8px;
    font-size: 10px;
  }

  .legal-doc {
    padding: 22px 18px;
    border-radius: 13px;
  }

  .legal-doc h2 {
    margin-top: 27px;
    font-size: 18px;
  }

  .legal-doc p,
  .legal-doc li {
    font-size: 12px;
    line-height: 1.8;
  }

  .legal-facts > div {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 10px 12px;
  }

  .legal-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .legal-table th,
  .legal-table td {
    min-width: 140px;
    white-space: normal;
  }

  .footer-legal {
    padding: 0 17px 18px;
    gap: 7px 15px;
    font-size: 9.5px;
  }

  .cookie-banner {
    right: 10px;
    bottom: 10px;
    left: 10px;
    padding: 12px 13px;
    gap: 10px;
  }

  .cookie-banner p {
    font-size: 9.5px;
  }
}
