/*
 * Privacy Policy and Terms of Service. Enqueued only on those two routes
 * (inc/caah-legal.php). Uses the global tokens in style.css; dark mode keys off
 * html.dark-mode like the rest of the theme.
 */

.caah-legal-hero .page-hero-inner {
  max-width: 760px;
}

.caah-legal-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

.caah-legal-print {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---- Summary cards ---- */

.caah-legal-summary-wrap,
.caah-legal {
  min-width: 0;
}

.caah-legal-summary-wrap {
  gap: 16px;
}

.caah-legal-summary-title {
  margin: 0;
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  color: var(--berry);
}

.caah-legal-summary {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.caah-legal-summary li {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid rgba(28, 26, 25, 0.09);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(28, 26, 25, 0.04), 0 3px 8px rgba(28, 26, 25, 0.04);
}

.caah-legal-summary strong {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.35;
}

.caah-legal-summary span {
  color: var(--muted);
  line-height: 1.55;
}

.caah-legal-summary-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---- Two-column document ---- */

.caah-legal-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.caah-legal-toc {
  position: sticky;
  top: 110px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding: 4px 0;
}

.caah-legal-toc-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.caah-legal-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid rgba(28, 26, 25, 0.12);
}

.caah-legal-toc a {
  display: block;
  padding: 6px 0 6px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.4;
  text-decoration: none;
}

.caah-legal-toc a:hover,
.caah-legal-toc a:focus-visible {
  color: var(--primary);
  border-left-color: var(--primary);
}

.caah-legal-article {
  min-width: 0;
  max-width: 72ch;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.7;
}

.caah-legal-article h2 {
  margin: 48px 0 12px;
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  line-height: 1.25;
  color: var(--berry);
  scroll-margin-top: 110px;
}

.caah-legal-article h2:first-child {
  margin-top: 0;
}

.caah-legal-article h3 {
  margin: 28px 0 8px;
  font-size: 1.08rem;
  color: var(--ink);
}

.caah-legal-article p,
.caah-legal-article ul {
  margin: 0 0 16px;
}

.caah-legal-article ul {
  padding-left: 1.25em;
}

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

.caah-legal-article a {
  color: var(--primary);
  text-underline-offset: 3px;
}

.caah-legal-article code {
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(28, 26, 25, 0.06);
  word-break: break-word;
}

.caah-legal-callout {
  padding: 18px 20px;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm, 10px) var(--radius-sm, 10px) 0;
  background: rgba(197, 32, 41, 0.06);
}

.caah-legal-callout--urgent {
  background: rgba(197, 32, 41, 0.1);
}

.caah-legal-table-wrap {
  margin: 0 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(28, 26, 25, 0.12);
  border-radius: var(--radius-sm, 10px);
}

.caah-legal-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.93rem;
  line-height: 1.5;
}

.caah-legal-table th,
.caah-legal-table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(28, 26, 25, 0.09);
}

.caah-legal-table thead th {
  font-weight: 700;
  background: rgba(28, 26, 25, 0.04);
}

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

.caah-legal-contact {
  margin: 0 0 16px;
  padding: 18px 20px;
  font-style: normal;
  line-height: 1.8;
  background: #fff;
  border: 1px solid rgba(28, 26, 25, 0.09);
  border-radius: var(--radius-md);
}

.caah-legal-related {
  color: var(--muted);
}

/* ---- Link row used in the footer, lead form, and landing pages ---- */

.caah-legal-links a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Responsive ---- */

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

  .caah-legal-toc {
    position: static;
    max-height: none;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: rgba(28, 26, 25, 0.04);
  }

  .caah-legal-toc ol {
    columns: 2;
    column-gap: 24px;
    border-left: 0;
  }

  .caah-legal-toc a {
    padding-left: 0;
    border-left: 0;
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .caah-legal-toc ol {
    columns: 1;
  }
}

/* ---- Dark mode ---- */

html.dark-mode .caah-legal-summary li,
html.dark-mode .caah-legal-contact {
  background: #1e1e1e;
  border-color: rgba(255, 255, 255, 0.1);
}

html.dark-mode .caah-legal-toc ol,
html.dark-mode .caah-legal-table-wrap,
html.dark-mode .caah-legal-table th,
html.dark-mode .caah-legal-table td {
  border-color: rgba(255, 255, 255, 0.12);
}

html.dark-mode .caah-legal-article code,
html.dark-mode .caah-legal-table thead th {
  background: rgba(255, 255, 255, 0.08);
}

html.dark-mode .caah-legal-callout {
  background: rgba(223, 57, 66, 0.14);
}

@media (max-width: 900px) {
  html.dark-mode .caah-legal-toc {
    background: rgba(255, 255, 255, 0.05);
  }
}

html.dark-mode .caah-legal-article a,
html.dark-mode .caah-legal-print {
  color: #ff8a90;
}

/* ---- Print: just the document ---- */

@media print {
  .site-header,
  .footer,
  .caah-legal-toc,
  .caah-legal-print,
  [class*="concierge"],
  [class*="promo-banner"] {
    display: none !important;
  }

  .caah-legal-layout {
    display: block;
  }

  .page-hero {
    box-shadow: none;
    background: none;
    padding: 0 0 16px;
  }

  .caah-legal-article {
    max-width: none;
    font-size: 11pt;
  }

  .caah-legal-article a {
    color: inherit;
  }
}
