/* TC Cache legal pages v1
   Shared, accessible layout for Terms and Conditions and companion policy pages. */

.legal-page {
  background: #f4f1e9;
  color: #1c2823;
}

.legal-page main {
  min-height: 60vh;
}

.legal-hero {
  border-bottom: 1px solid rgba(23, 61, 50, .16);
  background: linear-gradient(180deg, #173d32 0%, #1f5143 100%);
  color: #fff;
}

.legal-hero-inner,
.legal-layout {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.legal-hero-inner {
  padding: clamp(44px, 7vw, 78px) 0 clamp(34px, 5vw, 58px);
}

.legal-hero .eyebrow {
  margin: 0 0 10px;
  color: #f0cb72;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
}

.legal-hero h1 {
  max-width: 900px;
  margin: 0;
  font-family: "Roboto Slab", Georgia, serif;
  font-size: clamp(2.25rem, 6vw, 4.7rem);
  line-height: .98;
  letter-spacing: -.035em;
}

.legal-hero-copy {
  max-width: 820px;
  margin: 18px 0 0;
  color: rgba(255,255,255,.88);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.7;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: rgba(255,255,255,.78);
  font-size: .9rem;
}

.legal-meta strong {
  color: #fff;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(210px, 270px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding: clamp(28px, 5vw, 56px) 0 clamp(60px, 8vw, 92px);
}

.legal-sidebar {
  position: sticky;
  top: 96px;
}

.legal-toc {
  padding: 20px;
  border: 1px solid rgba(23, 61, 50, .14);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(21, 48, 40, .06);
}

.legal-toc h2 {
  margin: 0 0 12px;
  font-size: .88rem;
  text-transform: uppercase;
  letter-spacing: .11em;
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.35rem;
}

.legal-toc li + li {
  margin-top: 8px;
}

.legal-toc a {
  color: #245646;
  font-weight: 700;
  line-height: 1.45;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

.legal-toc a:hover {
  color: #0f342a;
}

.legal-draft-notice {
  margin: 0 0 26px;
  padding: 18px 20px;
  border: 1px solid #d9b658;
  border-left-width: 5px;
  border-radius: 14px;
  background: #fff8dd;
  color: #3b321b;
  line-height: 1.6;
}

.legal-draft-notice strong {
  color: #2c2513;
}

.legal-document {
  min-width: 0;
}

.legal-document > p:first-of-type {
  margin-top: 0;
}

.legal-intro {
  margin: 0 0 30px;
  color: #42564d;
  font-size: 1.06rem;
  line-height: 1.78;
}

.legal-section {
  scroll-margin-top: 104px;
  padding: 32px 0;
  border-top: 1px solid rgba(23, 61, 50, .15);
}

.legal-section:first-of-type {
  border-top: 0;
  padding-top: 6px;
}

.legal-section h2 {
  margin: 0 0 17px;
  color: #173d32;
  font-family: "Roboto Slab", Georgia, serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.2;
}

.legal-section h3 {
  margin: 26px 0 10px;
  color: #213d34;
  font-size: 1.08rem;
  line-height: 1.35;
}

.legal-section p,
.legal-section li {
  max-width: 820px;
  color: #31463e;
  font-size: 1rem;
  line-height: 1.75;
}

.legal-section p {
  margin: 0 0 15px;
}

.legal-section ul,
.legal-section ol {
  max-width: 820px;
  margin: 12px 0 18px;
  padding-left: 1.45rem;
}

.legal-section li + li {
  margin-top: 7px;
}

.legal-section a,
.legal-intro a,
.legal-draft-notice a {
  color: #1f5f4b;
  font-weight: 700;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

.legal-callout {
  max-width: 820px;
  margin: 20px 0;
  padding: 17px 19px;
  border-left: 4px solid #c9962d;
  border-radius: 0 12px 12px 0;
  background: #fff;
  color: #31463e;
  line-height: 1.7;
}

.legal-contact-note {
  max-width: 820px;
  margin-top: 26px;
  padding: 20px;
  border-radius: 14px;
  background: #e8eee9;
  line-height: 1.65;
}

.legal-top-link {
  display: inline-block;
  margin-top: 16px;
  font-weight: 800;
}

.legal-page a:focus-visible,
.legal-page button:focus-visible {
  outline: 3px solid #f0b83d;
  outline-offset: 4px;
  border-radius: 4px;
}

@media (max-width: 840px) {
  .legal-hero-inner,
  .legal-layout {
    width: min(100% - 28px, 760px);
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .legal-sidebar {
    position: static;
  }

  .legal-toc {
    padding: 17px 18px;
  }

  .legal-section {
    padding: 27px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-page *,
  .legal-page *::before,
  .legal-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .announcement,
  .site-header,
  .site-footer,
  .skip-link,
  .legal-sidebar,
  .legal-top-link {
    display: none !important;
  }

  .legal-page,
  .legal-hero,
  .legal-draft-notice,
  .legal-callout {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
  }

  .legal-hero {
    border-bottom: 2px solid #000;
  }

  .legal-hero h1,
  .legal-hero-copy,
  .legal-meta,
  .legal-meta strong,
  .legal-section h2,
  .legal-section h3,
  .legal-section p,
  .legal-section li {
    color: #000 !important;
  }

  .legal-layout {
    display: block;
    width: 100%;
    padding: 22px 0;
  }

  .legal-section {
    break-inside: avoid-page;
  }
}


/* v5.11.6.92: accessible legal disclosure tables */
.legal-table-wrap { max-width: 100%; margin: 20px 0 24px; overflow-x: auto; border: 1px solid rgba(23,61,50,.16); border-radius: 14px; background: #fff; }
.legal-table-wrap:focus-visible { outline: 3px solid #f0b83d; outline-offset: 4px; }
.legal-table { width: 100%; min-width: 980px; border-collapse: collapse; color: #2b4138; font-size: .9rem; }
.legal-table caption { padding: 14px 16px; text-align: left; font-weight: 800; color: #173d32; background: #edf2ee; }
.legal-table th, .legal-table td { padding: 11px 12px; border-top: 1px solid rgba(23,61,50,.12); text-align: left; vertical-align: top; line-height: 1.45; }
.legal-table thead th { border-top: 0; background: #173d32; color: #fff; font-size: .78rem; letter-spacing: .03em; }
.legal-table tbody th { color: #173d32; font-size: 1rem; }
.legal-table-muted { color: #64776f; font-size: .82rem; }


/* v5.11.6.94: compact Terms navigation. The 46-item list is a utility, not a competing content panel. */
@media (min-width: 841px) {
  .terms-page .legal-layout {
    grid-template-columns: minmax(300px, 330px) minmax(0, 1fr);
    gap: clamp(28px, 4vw, 52px);
  }

  .terms-page .legal-sidebar {
    top: 84px;
  }

  .terms-page .legal-toc {
    max-height: calc(100vh - 104px);
    padding: 12px 14px 13px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .terms-page .legal-toc h2 {
    margin-bottom: 7px;
    font-size: .7rem;
    letter-spacing: .1em;
  }

  .terms-page .legal-toc ol {
    padding-left: 1.15rem;
  }

  .terms-page .legal-toc li {
    margin: 0;
    font-size: .68rem;
    line-height: 1.18;
  }

  .terms-page .legal-toc li + li {
    margin-top: 2px;
  }

  .terms-page .legal-toc a {
    display: inline;
    font-weight: 500;
    line-height: inherit;
    text-decoration-thickness: .06em;
    text-underline-offset: .12em;
  }
}

.legal-hero-subtitle {
  font-weight: 600;
  letter-spacing: .01em;
}
