/* Legal-page system: policy banner, summary cards, accordions, tables, and mobile reading layout. */
.legal-page {
  background: #edf3e7;
}

.legal-hero {
  position: relative;
  padding: clamp(84px, 10vw, 150px) clamp(28px, 7vw, 108px) clamp(58px, 7vw, 100px);
  color: #fff;
  background: linear-gradient(118deg, #003f34, #005746 58%, #2f745d);
}

.legal-home-link {
  position: absolute;
  top: clamp(24px, 3vw, 42px);
  right: clamp(24px, 4vw, 64px);
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 10px;
  padding: 11px 19px;
  color: #fff;
  background: #6e9c56;
  box-shadow: 0 12px 30px rgba(0, 39, 32, .12);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(10px);
  transition: transform .25s ease, border-color .25s ease, background-color .25s ease;
}

.legal-home-link__arrow {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: block;
  transform: translateX(0);
  transition: transform .25s ease;
}

.legal-home-link:hover,
.legal-home-link:focus-visible {
  background: #005746;
  transform: translateY(-2px);
}

.legal-home-link:hover .legal-home-link__arrow,
.legal-home-link:focus-visible .legal-home-link__arrow {
  transform: translateX(-3px);
}

.legal-home-link:focus-visible {
  outline: 2px solid #d7e6bc;
  outline-offset: 4px;
}

.legal-hero span,
.legal-kicker {
  color: #becf99;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.legal-hero h1 {
  max-width: 900px;
  margin: 18px 0 20px;
  font-size: clamp(48px, 7vw, 88px);
  line-height: .98;
}

.legal-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.5;
}

.legal-shell {
  --legal-gutter: clamp(24px, 6vw, 88px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(48px, 6vw, 88px);
  padding: clamp(56px, 7vw, 96px) var(--legal-gutter) 110px;
  background: #f8faf6;
}

.legal-shell--single {
  display: block;
}

.legal-shell--single .legal-content {
  max-width: 1180px;
  margin-inline: auto;
}

/* Policy reading surface contains authored headings and text; legal.js progressively wraps sections in accordion controls. */
.legal-content {
  min-width: 0;
  max-width: 900px;
}

.legal-updated {
  margin: 0 0 34px;
  color: #526078;
  font-size: 14px;
}

.legal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 72px;
}

.legal-summary article {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid #d8e4d1;
  border-radius: var(--radius-card);
  padding: 0;
  background: #fff;
  box-shadow: 0 18px 46px rgba(0, 55, 44, .07);
  transition: transform .35s ease, box-shadow .35s ease;
}

.legal-summary article:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 60px rgba(0, 55, 44, .12);
}

.legal-summary__visual {
  position: relative;
  aspect-ratio: 7 / 5;
  overflow: hidden;
  /* Shared site placeholder while legal-card photography is in development. */
  background-image: url("assets/image-templates/11-editorial-desktop-1920x1200.png?v=legal-placeholder-1");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.legal-summary__visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.22, .61, .36, 1);
}

/* The legal cards use prepared 7:5 derivatives, so the subject and interaction
   stay together without page-specific crop overrides. */
.legal-summary__visual img {
  object-position: center;
}

.legal-summary__card:hover .legal-summary__visual img {
  transform: scale(1.035);
}

.legal-summary__visual::before {
  position: absolute;
  z-index: 1;
  content: "";
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(0, 45, 38, .16));
  pointer-events: none;
}

.legal-summary__visual span {
  position: absolute;
  display: block;
}

.legal-summary__card--collect .legal-summary__visual span {
  bottom: 30px;
  width: 42px;
  border-radius: 21px 21px 8px 8px;
  background: rgba(0, 87, 70, .88);
  box-shadow: inset 0 1px rgba(255,255,255,.3);
}

.legal-summary__card--collect .legal-summary__visual span:nth-child(1) { left: 52px; height: 72px; }
.legal-summary__card--collect .legal-summary__visual span:nth-child(2) { left: 108px; height: 112px; }
.legal-summary__card--collect .legal-summary__visual span:nth-child(3) { left: 164px; height: 142px; }

.legal-summary__card--purpose .legal-summary__visual span {
  top: 50%;
  left: 50%;
  border: 2px solid rgba(113, 75, 55, .7);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.legal-summary__card--purpose .legal-summary__visual span:nth-child(1) { width: 132px; height: 132px; }
.legal-summary__card--purpose .legal-summary__visual span:nth-child(2) { width: 82px; height: 82px; }
.legal-summary__card--purpose .legal-summary__visual span:nth-child(3) { width: 26px; height: 26px; border: 0; background: #005746; }

.legal-summary__card--choice .legal-summary__visual span {
  left: 52px;
  width: 160px;
  height: 24px;
  border-radius: 99px;
  background: rgba(255,255,255,.62);
}

.legal-summary__card--choice .legal-summary__visual span::after {
  position: absolute;
  content: "";
  top: -7px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #005746;
  box-shadow: 0 7px 18px rgba(0,55,44,.2);
}

.legal-summary__card--choice .legal-summary__visual span:nth-child(1) { top: 42px; }
.legal-summary__card--choice .legal-summary__visual span:nth-child(1)::after { left: 18px; }
.legal-summary__card--choice .legal-summary__visual span:nth-child(2) { top: 84px; }
.legal-summary__card--choice .legal-summary__visual span:nth-child(2)::after { right: 18px; }
.legal-summary__card--choice .legal-summary__visual span:nth-child(3) { top: 126px; }
.legal-summary__card--choice .legal-summary__visual span:nth-child(3)::after { left: 62px; }

/* Explicit placeholder class wins over the legacy per-card image treatments. */
.legal-summary__visual.nka-gradient-banner {
  background-image: url("assets/image-templates/11-editorial-desktop-1920x1200.png?v=legal-placeholder-1");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.legal-summary__body {
  position: relative;
  padding: 28px 28px 32px;
}

.legal-summary strong {
  display: block;
  margin: 18px 0 10px;
  color: #005746;
  font-size: 22px;
}

.legal-summary__number {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 26px;
  border-radius: 99px;
  color: #005746;
  background: #edf3e7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

/* Policy sections are readable before enhancement. Expanded/hidden state is supplied by the accordion controller. */
.legal-section {
  scroll-margin-top: 92px;
  border-top: 1px solid #d8e4d1;
  padding: 46px 0 20px;
}

.legal-shell--single .legal-section {
  padding: 0;
}

.legal-accordion__trigger {
  width: 100%;
  min-height: 92px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 18px;
  border: 0;
  padding: 22px 4px;
  background: transparent;
  color: #17211f;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.legal-section .legal-accordion__trigger h2 {
  margin: 0;
  color: #2e7d52;
  font-size: clamp(21px, 2vw, 30px);
  line-height: 1.12;
  transform: none;
}

.legal-accordion__number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1.5px solid #6e9c56;
  border-radius: 50%;
  color: #005746;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.legal-accordion__icon {
  position: relative;
  width: 30px;
  height: 30px;
  justify-self: end;
}

.legal-accordion__icon::before,
.legal-accordion__icon::after {
  position: absolute;
  content: "";
  top: 50%;
  left: 50%;
  width: 23px;
  height: 2px;
  border-radius: 99px;
  background: #6e9c56;
  transform: translate(-50%, -50%);
  transition: opacity .22s ease, transform .3s ease;
}

.legal-accordion__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.legal-accordion__trigger[aria-expanded="true"] .legal-accordion__icon::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0);
}

.legal-accordion__panel {
  overflow: hidden;
  /* Align expanded copy with the accordion title, not its numbered marker. */
  padding: 0 68px 38px 64px;
  will-change: height, opacity, padding;
}

.legal-accordion__panel[hidden] {
  display: none;
}

.legal-section h2 {
  margin: 0 0 20px;
  color: #005746;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
}

.legal-section h3 {
  margin: 28px 0 10px;
  color: #176d5b;
  font-size: 21px;
}

.legal-section p,
.legal-section li,
.legal-summary p {
  color: #42516a;
  font-size: clamp(17px, 1.45vw, 19px);
  font-weight: 300;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.legal-section a,
.legal-summary a,
.legal-callout a {
  overflow-wrap: anywhere;
  word-break: normal;
}

.legal-section ul {
  padding-left: 22px;
}

.legal-table-wrap {
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid #d8e4d1;
  border-radius: 14px;
  background: #fff;
}

/* Tabular policy details retain their semantic HTML structure as the surrounding page reflows. */
.legal-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
}

.legal-table th,
.legal-table td {
  padding: 17px 18px;
  border-bottom: 1px solid #e5ece1;
  color: #42516a;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}

.legal-table th {
  color: #005746;
  background: #edf3e7;
}

.legal-nav {
  position: sticky;
  top: 124px;
  align-self: start;
  max-height: calc(100vh - 152px);
  overflow: auto;
  border: 1px solid #d8e4d1;
  border-radius: 18px;
  padding: 24px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 44px rgba(0,55,44,.08);
}

.legal-nav strong {
  display: block;
  margin-bottom: 14px;
  color: #005746;
  font-size: 18px;
}

.legal-nav a {
  display: block;
  border-left: 2px solid #d8e4d1;
  padding: 8px 0 8px 14px;
  color: #526078;
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
}

.legal-nav a:hover,
.legal-nav a:focus-visible {
  border-color: #6e9c56;
  color: #005746;
}

.legal-callout {
  margin: 28px 0;
  border-left: 4px solid #6e9c56;
  border-radius: 0 14px 14px 0;
  padding: 20px 24px;
  background: #edf3e7;
}

.legal-callout a,
.legal-section a {
  color: #005746;
  font-weight: 600;
}

/* Team email references use the shared accent green across both policy pages. */
.legal-content a[href^="mailto:"] {
  color: #6e9c56;
}

.legal-content a[href^="mailto:"]:hover,
.legal-content a[href^="mailto:"]:focus-visible {
  color: #005746;
}

/* Responsive legal reading: summaries stack while maintaining comfortable line length. */
@media (max-width: 900px) {
  .legal-shell {
    grid-template-columns: 1fr;
  }

  .legal-nav {
    position: relative;
    top: auto;
    grid-row: 1;
    max-height: none;
    columns: 2;
  }

  .legal-nav strong {
    column-span: all;
  }

  .legal-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  /* Match the legal reading gutter and leave a clear break below the back link. */
  .legal-hero {
    padding: 108px 20px 58px;
  }

  /* Shared mobile legal type scale: keeps policy cards, FAQ labels, and answers
     comfortably readable without letting the accordion labels dominate the page. */
  .legal-page {
    --legal-mobile-title-size: clamp(18px, 4.4vw, 20px);
    --legal-mobile-body-size: clamp(15.5px, 4vw, 16px);
  }

  .legal-home-link {
    right: auto;
    left: 20px;
    min-height: 42px;
    padding: 9px 15px;
    font-size: 13px;
  }

  .legal-nav {
    columns: 1;
  }

  .legal-shell {
    padding-inline: 20px;
  }

  .legal-accordion__trigger {
    min-height: 78px;
    grid-template-columns: 34px minmax(0, 1fr) 30px;
    gap: 13px;
    padding-block: 18px;
  }

  .legal-section .legal-accordion__trigger h2 {
    font-size: var(--legal-mobile-title-size);
    line-height: 1.16;
  }

  .legal-accordion__number {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .legal-accordion__panel {
    padding: 0 4px 32px 47px;
  }

  .legal-section h3 {
    margin: 22px 0 8px;
    font-size: 18px;
    line-height: 1.25;
  }

  .legal-section p,
  .legal-section li,
  .legal-summary p {
    font-size: var(--legal-mobile-body-size);
    line-height: 1.62;
  }

  .legal-summary strong {
    font-size: var(--legal-mobile-title-size);
    line-height: 1.2;
  }

  .legal-table th,
  .legal-table td {
    font-size: var(--legal-mobile-body-size);
  }
}

/* Final legal all-caps label pass. */
.legal-hero span,
.legal-kicker {
  font-family: var(--font-body);
  font-size: var(--type-eyebrow-size);
  font-weight: var(--type-eyebrow-weight);
  letter-spacing: var(--type-eyebrow-letter-spacing);
  line-height: var(--type-eyebrow-line-height);
  text-transform: uppercase;
}
