/* Casa Miller legal pages */
.cm-legal-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 9vw, 118px) 0 clamp(52px, 7vw, 84px);
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(102, 221, 245, .18), transparent 34%),
    linear-gradient(135deg, #092f49 0%, #0d4669 52%, #0d5677 100%);
}

.cm-legal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
}

.cm-legal-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.cm-legal-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: rgba(255,255,255,.72);
  font-size: 13px;
  font-weight: 700;
}

.cm-legal-breadcrumb a {
  color: #fff;
  text-decoration: none;
}

.cm-legal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 18px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  color: #dff8ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.cm-legal-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: .98;
  letter-spacing: -.052em;
}

.cm-legal-hero h1 span {
  color: #75e5f6;
}

.cm-legal-hero p {
  max-width: 760px;
  margin: 24px 0 0;
  color: rgba(255,255,255,.82);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.75;
}

.cm-legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.cm-legal-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  background: rgba(5, 29, 46, .24);
  color: rgba(255,255,255,.9);
  font-size: 13px;
  font-weight: 700;
}

.cm-legal-section {
  padding: clamp(54px, 7vw, 88px) 0;
  background: #f5f8fb;
}

.cm-legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 28px;
  align-items: start;
}

.cm-legal-document {
  min-width: 0;
  padding: clamp(26px, 4vw, 52px);
  border: 1px solid #dce6ed;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(18, 51, 73, .08);
}

.cm-legal-intro {
  margin-bottom: 34px;
  padding: 20px 22px;
  border-left: 4px solid #1a8baa;
  border-radius: 0 14px 14px 0;
  background: #eef9fc;
  color: #244b60;
  line-height: 1.75;
}

.cm-legal-block {
  scroll-margin-top: 110px;
  padding: 0 0 32px;
  margin: 0 0 32px;
  border-bottom: 1px solid #e3ebf0;
}

.cm-legal-block:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.cm-legal-block h2 {
  margin: 0 0 16px;
  color: #0d3e5b;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
  letter-spacing: -.025em;
}

.cm-legal-block h3 {
  margin: 24px 0 10px;
  color: #173f55;
  font-size: 17px;
}

.cm-legal-block p,
.cm-legal-block li {
  color: #536b79;
  font-size: 15px;
  line-height: 1.8;
}

.cm-legal-block p {
  margin: 0 0 14px;
}

.cm-legal-block ul,
.cm-legal-block ol {
  margin: 14px 0 0;
  padding-left: 22px;
}

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

.cm-legal-block a {
  color: #0e7191;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.cm-legal-table-wrap {
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid #dfe8ee;
  border-radius: 14px;
}

.cm-legal-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  background: #fff;
}

.cm-legal-table th,
.cm-legal-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e6edf2;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.6;
}

.cm-legal-table th {
  background: #eff6f9;
  color: #123f59;
  font-weight: 800;
}

.cm-legal-table td {
  color: #536b79;
}

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

.cm-legal-callout {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #cde2eb;
  border-radius: 14px;
  background: #f3fafc;
}

.cm-legal-callout strong {
  display: block;
  margin-bottom: 6px;
  color: #0d4866;
}

.cm-legal-sidebar {
  position: sticky;
  top: 98px;
  padding: 20px;
  border: 1px solid #dce6ed;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(18, 51, 73, .07);
}

.cm-legal-sidebar h3 {
  margin: 0 0 14px;
  color: #123f59;
  font-size: 15px;
}

.cm-legal-toc {
  display: grid;
  gap: 4px;
}

.cm-legal-toc a {
  display: block;
  padding: 9px 10px;
  border-radius: 9px;
  color: #5c717e;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.cm-legal-toc a:hover {
  transform: translateX(2px);
  background: #eef7fa;
  color: #0d6f8e;
}

.cm-legal-contact-card {
  margin-top: 18px;
  padding: 16px;
  border-radius: 13px;
  background: #0e3a5b;
  color: #fff;
}

.cm-legal-contact-card strong,
.cm-legal-contact-card span,
.cm-legal-contact-card a {
  display: block;
}

.cm-legal-contact-card strong {
  margin-bottom: 5px;
}

.cm-legal-contact-card span {
  color: rgba(255,255,255,.72);
  font-size: 12px;
  line-height: 1.5;
}

.cm-legal-contact-card a {
  margin-top: 10px;
  color: #8beafa;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.cm-legal-bottom-cta {
  padding: 54px 0;
  background: #fff;
}

.cm-legal-bottom-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(26px, 4vw, 42px);
  border-radius: 22px;
  background: linear-gradient(135deg, #0e3a5b, #0e5777);
  color: #fff;
}

.cm-legal-bottom-cta h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.4vw, 36px);
}

.cm-legal-bottom-cta p {
  margin: 0;
  color: rgba(255,255,255,.76);
}

@media (max-width: 960px) {
  .cm-legal-layout {
    grid-template-columns: 1fr;
  }

  .cm-legal-sidebar {
    position: static;
    order: -1;
  }

  .cm-legal-toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cm-legal-hero {
    padding: 54px 0 44px;
  }

  .cm-legal-hero h1 {
    font-size: clamp(36px, 11vw, 50px);
  }

  .cm-legal-section {
    padding: 34px 0 48px;
  }

  .cm-legal-document {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .cm-legal-sidebar {
    padding: 16px;
    border-radius: 15px;
  }

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

  .cm-legal-bottom-cta-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .cm-legal-bottom-cta-inner .cm-btn {
    width: 100%;
  }
}
