/* ============================================================================
   custom_page.css

   Visual direction (Claude Design):
     - Soft cream gradient page background
     - Left sidebar: orange filled "Section" card + dark "A question?" card
     - Main: eyebrow + title + lede + divider + clean monoline 3-up grid
     - The CMS markup inside .cms-content is not altered — only its presentation
   ========================================================================= */


/* ---------- Page background ------------------------------------------- */
.page-pm {
  background: #ffffff;
}

/* ============================================================================
   2-COLUMN LAYOUT
   ========================================================================= */
.page-pm__layout {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .page-pm__layout {
    grid-template-columns: 240px 1fr;
    gap: 2.5rem;
  }
}

/* ============================================================================
   SIDEBAR — Section orange + Question ink
   ========================================================================= */
.page-pm__sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ---- Section card (default) — orange filled, légèrement transparent ---- */
.page-pm__side-card {
  background: rgba(255, 132, 0, 0.85);
  border: 1px solid rgba(255, 132, 0, 0.50);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 0.75rem;
  padding: 1.25rem 1.25rem 0.75rem;
  box-shadow: 0 10px 30px -18px rgba(255, 132, 0, 0.55);
}

.page-pm__side-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0e0f12;
  /* ink on orange */
}

.page-pm__side-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
}

/* ---- Nav list ---- */
.page-pm__side-nav {
  list-style: none;
  padding: 0;
  margin: 0 -0.5rem;
}

.page-pm__side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.page-pm__side-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.page-pm__side-link--active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 700;
}

.page-pm__side-chev {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #ffffff;
}

/* Question card styles live in custom.css (shared with dashboard). */

.page-pm__side-phone svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #ff8400;
  /* orange icon on ink */
}

/* ============================================================================
   MAIN CONTENT — eyebrow + title + lede + divider
   ========================================================================= */
.page-pm__main {
  min-width: 0;
  /* prevent grid blowout */
}

.page-pm__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ff8400;
}

.page-pm__title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-weight: 700;
  color: #0e0f12;
}

.page-pm__lede {
  margin: 0;
  max-width: 44rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: #4b5563;
  text-wrap: pretty;
}

.page-pm__divider {
  margin: 2.25rem 0 0;
  border: 0;
  height: 1px;
  background: #f1e6d3;
}

/* ============================================================================
   CMS CONTENT — top spacing below the page divider
   ========================================================================= */
.cms-content {
  margin-top: 2.25rem;
}

/* ============================================================================
   CARD GRID — targets the immutable CMS markup
   .cms-content > section.grid > article > a > img + h3
   ========================================================================= */
.cms-content section.grid {
  gap: 1.5rem;
  margin-top: 2.5rem !important;
}

.cms-content section.grid>article {
  text-align: center;
  padding: 1.5rem 0.5rem;
  border-radius: 0.75rem;
  background: #fff4e6;
  border: 1px solid #f1e6d3;
  transition: background 200ms ease, box-shadow 200ms ease;
}

.cms-content section.grid>article:hover {
  background: #fde8cc;
  box-shadow: 0 4px 16px -4px rgba(255, 132, 0, 0.15);
}

/* The <a> wrapper inside each card */
.cms-content section.grid>article>a {
  display: block;
}

/* Frame the illustration */
.cms-content section.grid>article img {
  display: block;
  width: 96px !important;
  height: 96px;
  max-width: 100%;
  margin: 0 auto 1rem !important;
  object-fit: contain;
  object-position: center;
  transition: transform 280ms ease;
}

.cms-content section.grid>article:hover img {
  transform: translateY(-2px);
}

/* Card title */
.cms-content section.grid>article h3 {
  font-size: 1.0625rem !important;
  line-height: 1.4;
  font-weight: 600;
  color: #0e0f12;
  margin: 0;
  letter-spacing: -0.005em;
}

.cms-content section.grid>article:hover h3 {
  color: #ff8400;
}

/* Focus state */
.cms-content section.grid>article a:focus-visible {
  outline: 2px solid #ff8400;
  outline-offset: 6px;
  border-radius: 0.75rem;
}

.cms-content section.grid>article a:focus {
  outline: none;
}

/* ---------- Reduced motion ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {

  .cms-content section.grid>article,
  .cms-content section.grid>article img {
    transition: none;
  }

  .cms-content section.grid>article:hover img {
    transform: none;
  }
}

/* ============================================================================
   TICK LIST — ul.tick inside .cms-content
   ========================================================================= */
.cms-content ul.tick {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.cms-content ul.tick>li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.2rem 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #1f2937;
}

.cms-content ul.tick>li::before {
  content: '';
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.2rem;
  background-color: #f5c49a;
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 70%;
  background-repeat: no-repeat;
  background-position: center;
}


/* ==========================================================================
   Accordion  (ul.accordion inside .cms-content — redesigned template)
   Markup is DB-authored: ul.accordion > li > a + div
   JS: accordion.js  |  Replaces the legacy jQuery version in scripts.js
   ========================================================================== */

.cms-content ul.accordion {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #e5e7eb;
  /* gray-200 */
}

.cms-content ul.accordion>li {
  border-bottom: 1px solid #e5e7eb;
  /* gray-200 */
  margin: 0;
  padding: 0;
}

/* Trigger <a> */
.cms-content ul.accordion>li>a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0.25rem;
  color: #111827;
  /* gray-900 */
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  outline: none;
  transition: color 150ms ease;
}

.cms-content ul.accordion>li>a:hover {
  color: #cc6a00;
  /* primary-700 */
}

/* +/− indicator */
.cms-content ul.accordion>li>a::before {
  content: '+';
  flex-shrink: 0;
  display: inline-block;
  width: 1.25rem;
  text-align: center;
  font-size: 1.25rem;
  line-height: 1;
  color: #ff8400;
  /* primary-500 */
  font-weight: 400;
  transition: color 150ms ease;
}

.cms-content ul.accordion>li>a.expanded::before {
  content: '−';
  /* proper minus sign, not hyphen */
  color: #9ca3af;
  /* gray-400 */
}

/* Keyboard focus ring */
.cms-content ul.accordion>li>a:focus-visible {
  outline: 2px solid #ff8400;
  /* primary-500 */
  outline-offset: 2px;
  border-radius: 2px;
}

.cms-content ul.accordion>li>a:focus:not(:focus-visible) {
  outline: none;
}

/* Collapsible panel — hidden by default, animated via JS */
.cms-content ul.accordion>li>div {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

/* Content spacing inside open panels */
.cms-content ul.accordion>li>div>p,
.cms-content ul.accordion>li>div>ul,
.cms-content ul.accordion>li>div>ol {
  margin-bottom: 0.875rem;
}

.cms-content ul.accordion>li>div>*:last-child {
  margin-bottom: 1.25rem;
}

/* Images */
.cms-content ul.accordion img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Nested lists */
.cms-content ul.accordion>li>div ul,
.cms-content ul.accordion>li>div ol {
  padding-left: 1.5rem;
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

.cms-content ul.accordion>li>div ul {
  list-style: disc;
}

.cms-content ul.accordion>li>div ol {
  list-style: decimal;
}

.cms-content ul.accordion>li>div li {
  margin-bottom: 0.375rem;
  padding-left: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cms-content ul.accordion>li>div {
    transition: none;
  }
}

/* =============================================================================
   TODO: move to static/css/legal.css once there are other legal pages
   ============================================================================= */

/* Tokens — scoped under .privacy so they don't bleed into the rest of the site */
.privacy {
  --p-50: #fff4e6;
  --p-100: #ffe3c8;
  --p-200: #ffc791;
  --p-400: #ff8f22;
  --p-500: #ff8400;
  --p-600: #e67700;
  --p-700: #cc6a00;
  --p-800: #994f00;
  --p-900: #663500;
  --ink: #0e0f12;
  --ink-2: #1f2024;
  --muted: #4b5563;
  --muted-2: #6b7280;
  --line: #eef0f3;
  --bg-soft: #fafbfc;
}

.privacy .eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--p-700);
}

/* Hero band */
.privacy .legal-hero {
  background: linear-gradient(180deg, #fffaf3 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}

.privacy .legal-hero__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

@media (min-width: 768px) {
  .privacy .legal-hero__inner {
    padding: 3.5rem 2rem 3.5rem;
  }
}

.privacy .legal-hero__title {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: -0.026em;
  font-weight: 700;
  color: var(--ink);
  margin: 0.85rem 0 1rem;
  text-wrap: balance;
}

.privacy .legal-hero__lede {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 44rem;
  text-wrap: pretty;
}

.privacy .legal-hero__meta {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: var(--muted-2);
}

.privacy .legal-hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  color: var(--ink-2);
}

.privacy .legal-hero__chip svg {
  width: 14px;
  height: 14px;
  color: var(--p-700);
}

/* Disclaimer banner */
.privacy .legal-disclaimer {
  max-width: 80rem;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .privacy .legal-disclaimer {
    padding: 0 2rem;
  }
}

.privacy .legal-disclaimer__inner {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  background: var(--p-50);
  border: 1px solid var(--p-100);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--p-900);
}

.privacy .legal-disclaimer__inner svg {
  width: 20px;
  height: 20px;
  color: var(--p-700);
  flex-shrink: 0;
  margin-top: 1px;
}

/* Body: TOC + prose grid */
.privacy .legal-body {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}

@media (min-width: 1000px) {
  .privacy .legal-body {
    grid-template-columns: 16rem minmax(0, 1fr);
    gap: 4rem;
    padding: 3.5rem 2rem 6rem;
  }
}

/* Table of contents */
.privacy .legal-toc {
  position: relative;
}

@media (min-width: 1000px) {
  .privacy .legal-toc {
    position: sticky;
    top: 5.5rem;
    align-self: start;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
  }
}

.privacy .legal-toc__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 1rem;
}

.privacy .legal-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
  display: grid;
  gap: 0.15rem;
}

.privacy .legal-toc a {
  display: flex;
  gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.privacy .legal-toc a::before {
  counter-increment: toc;
  content: counter(toc);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--p-700);
  flex-shrink: 0;
}

.privacy .legal-toc a:hover {
  color: var(--ink);
  background: var(--bg-soft);
}

.privacy .legal-toc a.is-active {
  color: var(--p-800);
  background: var(--p-50);
  border-left-color: var(--p-500);
  font-weight: 600;
}

/* Prose */
.privacy .legal-prose {
  max-width: 46rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-2);
}

.privacy .legal-prose section {
  scroll-margin-top: 5.5rem;
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.privacy .legal-prose section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.privacy .legal-prose h2 {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  font-size: 1.4rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 1rem;
  text-wrap: balance;
}

.privacy .legal-prose h2 .sec-num {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--p-700);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  transform: translateY(-2px);
}

.privacy .legal-prose p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

.privacy .legal-prose a:not(.btn) {
  color: var(--p-700);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--p-200);
}

.privacy .legal-prose a:not(.btn):hover {
  text-decoration-color: var(--p-500);
}

.privacy .legal-prose ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.privacy .legal-prose ul li {
  position: relative;
  padding-left: 1.6rem;
}

.privacy .legal-prose ul li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--p-400);
}

.privacy .legal-prose ul li strong {
  color: var(--ink);
  font-weight: 700;
}

/* Callout cards */
.privacy .legal-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 1.35rem 1.5rem;
  margin: 1.25rem 0;
}

.privacy .legal-card--accent {
  background: var(--p-50);
  border-color: var(--p-100);
}

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

.privacy .legal-card__title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--p-700);
  margin: 0 0 0.75rem;
}

.privacy .legal-card dl {
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.privacy .legal-card dl div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem;
}

@media (max-width: 540px) {
  .privacy .legal-card dl div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

.privacy .legal-card dt {
  font-weight: 700;
  color: var(--ink-2);
  font-size: 0.9rem;
}

.privacy .legal-card dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.privacy .legal-card dd a {
  font-weight: 600;
}

/* Data categories table */
.privacy .legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}

.privacy .legal-table th,
.privacy .legal-table td {
  text-align: left;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.5;
}

.privacy .legal-table th {
  background: var(--bg-soft);
  font-weight: 700;
  color: var(--ink);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

.privacy .legal-table td:first-child {
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .privacy .legal-table td:first-child {
    white-space: normal;
  }
}

/* === END PRIVACY POLICY === */