/* ===========================================================================
   TRUST, PRIVACY & RESPONSIBLE-AI PAGES
   Editorial/manuscript treatment — deliberately unlike a corporate "trust
   center". Plain-language statements for everyone, with a quieter "technical
   detail" note under each for the tech-savvy. Tokens flip with the theme.
   =========================================================================== */

.legal-main { padding-top: var(--space-8); padding-bottom: var(--space-12); }

/* ---- Shared page header ---- */
.legal-head { max-width: 46rem; margin: 0 0 var(--space-8); }
.legal-head .section-title { margin-bottom: var(--space-4); }
.legal-head .lede {
  font-family: var(--cp-font-serif);
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--cp-ink-soft);
  margin: 0;
}
.legal-updated {
  font-family: var(--cp-font-body);
  font-size: var(--text-sm);
  color: var(--cp-muted);
  letter-spacing: 0.02em;
  margin-top: var(--space-5);
}

/* ---- Inline code (used inside technical-detail copy) ---- */
.legal-main code {
  font-size: 0.85em;
  padding: 0.1em 0.4em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--cp-ink) 8%, transparent);
  color: var(--cp-ink);
  font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
}

/* ---- Data-flow diagram: the journey of a single chapter ----
   Gradient medallions joined by encrypted links, with a light that travels
   the connection and an explicit return path. CSS-only; motion is gated on
   prefers-reduced-motion. */
.trust-flow { margin: var(--space-8) 0 var(--space-12); }
.trust-flow .section-title { margin-bottom: var(--space-8); }

.flow {
  position: relative;
  padding: var(--space-8) var(--space-6) var(--space-7);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 100% at 50% -10%, color-mix(in srgb, var(--cp-gold-soft) 50%, transparent), transparent 60%),
    linear-gradient(180deg, var(--cp-ivory), var(--cp-paper-2));
  border: 1px solid var(--cp-rule);
  box-shadow: var(--cp-shadow-lg);
}

.flow__track { display: flex; align-items: flex-start; }

/* --- a step --- */
.flow-step { flex: 1 1 0; text-align: center; padding: 0 var(--space-2); }
.flow-step__medallion {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 5rem; height: 5rem; margin-bottom: var(--space-4);
  border-radius: var(--radius-pill);
  color: #fff; font-size: 1.85rem;
  background: linear-gradient(150deg, var(--cp-oxblood), var(--cp-oxblood-2));
  box-shadow: 0 14px 30px -10px rgba(122, 38, 48, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.flow-step__medallion::after {           /* concentric ring */
  content: ""; position: absolute; inset: -7px;
  border-radius: inherit; border: 1px solid var(--cp-rule-strong); opacity: 0.55;
}
.flow-step--us .flow-step__medallion {
  background: linear-gradient(150deg, #2c2417, #15110a);
  color: var(--cp-gold); font-size: 1.7rem;
  box-shadow: 0 16px 34px -10px rgba(20, 16, 8, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.flow-step--ai .flow-step__medallion {
  background: linear-gradient(150deg, var(--cp-gold), var(--cp-gold-2));
  box-shadow: 0 14px 30px -10px rgba(176, 136, 56, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.flow-step__index {
  display: block; font-family: var(--cp-font-body); font-size: var(--text-xs);
  font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cp-gold-2); margin-bottom: var(--space-2);
}
.flow-step__title {
  font-family: var(--cp-font-display); font-size: var(--text-xl); font-weight: 600;
  line-height: 1.1; color: var(--cp-ink); margin: 0 0 var(--space-2);
}
.flow-step__desc {
  font-size: 0.98rem; line-height: 1.5; color: var(--cp-ink-soft);
  margin: 0 auto; max-width: 14rem;
}

/* --- connector between steps --- */
.flow-conn {
  position: relative; flex: 0 1 8rem; align-self: flex-start;
  margin-top: 2.5rem;                    /* center on the 5rem medallion */
  height: 2px; display: flex; align-items: center; justify-content: center;
}
.flow-conn::before {                     /* the line */
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px;
  transform: translateY(-50%); border-radius: 2px;
  background: linear-gradient(90deg, var(--cp-oxblood), var(--cp-gold));
}
.flow-conn::after {                      /* arrowhead */
  content: ""; position: absolute; right: -1px; top: 50%; transform: translateY(-50%);
  width: 0; height: 0; border-left: 7px solid var(--cp-gold);
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
}
.flow-conn__chip {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.32rem 0.72rem; border-radius: var(--radius-pill);
  background: var(--cp-ivory); border: 1px solid var(--cp-rule);
  box-shadow: var(--cp-shadow-sm);
  font-family: var(--cp-font-body); font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.03em; color: var(--cp-ink-soft); white-space: nowrap;
}
.flow-conn__chip i { color: var(--cp-success); }
.flow-conn__spark {                      /* a light that travels the link */
  position: absolute; top: 50%; left: 0; width: 7px; height: 7px;
  border-radius: 50%; background: var(--cp-gold);
  box-shadow: 0 0 9px 1px var(--cp-gold);
  transform: translate(-50%, -50%);
  animation: flowSpark 3.2s linear infinite;
}
@keyframes flowSpark { from { left: 0; } to { left: 100%; } }

/* --- the return path --- */
.flow-return {
  display: flex; align-items: center; gap: var(--space-3);
  margin: var(--space-7) auto 0; max-width: 40rem;
  padding: var(--space-3) var(--space-5);
  border: 1px dashed var(--cp-gold-2); border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--cp-gold-soft) 34%, transparent);
}
.flow-return__icon { color: var(--cp-gold-2); font-size: 1.15rem; flex-shrink: 0; }
.flow-return__label {
  font-family: var(--cp-font-serif); font-style: italic; font-size: 1.05rem;
  line-height: 1.45; color: var(--cp-ink-soft); margin: 0;
}

.trust-flow__caption {
  font-family: var(--cp-font-serif); font-size: var(--text-md); font-style: italic;
  color: var(--cp-ink-soft); text-align: center;
  max-width: 44rem; margin: var(--space-6) auto 0;
}

@media (prefers-reduced-motion: reduce) { .flow-conn__spark { display: none; } }

@media (max-width: 820px) {
  .flow { padding: var(--space-7) var(--space-5); }
  .flow__track { flex-direction: column; align-items: stretch; }
  .flow-step { padding: var(--space-4) 0; }
  .flow-conn {
    flex-basis: auto; width: 2px; height: 3.4rem; margin: 0 auto; align-self: center;
  }
  .flow-conn::before {
    left: 50%; right: auto; top: 0; bottom: 0; width: 2px; height: auto;
    transform: translateX(-50%);
    background: linear-gradient(180deg, var(--cp-oxblood), var(--cp-gold));
  }
  .flow-conn::after {
    right: auto; left: 50%; top: auto; bottom: -1px; transform: translateX(-50%);
    border-left: 5px solid transparent; border-right: 5px solid transparent;
    border-top: 7px solid var(--cp-gold); border-bottom: 0;
  }
  .flow-conn__spark { display: none; }
}

/* ---- Principles: icon-led cards with progressive-disclosure detail ----
   Clean and confident for everyone; the technical specifics are one tap away
   for those who want them, instead of a permanent heavy callout. */
.trust-promises { margin: var(--space-10) 0; }
.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}
.principle-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  border: 1px solid var(--cp-rule);
  border-radius: var(--radius-lg);
  background: var(--cp-ivory);
  box-shadow: var(--cp-shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.principle-card:hover { border-color: var(--cp-rule-strong); box-shadow: var(--cp-shadow-md); transform: translateY(-2px); }
.principle-card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; margin-bottom: var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--cp-oxblood-soft);
  color: var(--cp-oxblood);
  font-size: 1.4rem;
}
.principle-card:nth-child(even) .principle-card__icon { background: var(--cp-gold-soft); color: var(--cp-gold-2); }
.principle-card__title {
  font-family: var(--cp-font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.25;
  color: var(--cp-ink);
  margin: 0 0 var(--space-2);
}
.principle-card__body {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--cp-ink-soft);
  margin: 0;
}

/* progressive-disclosure "technical detail" */
.principle-detail {
  margin-top: auto;            /* push to card bottom so cards align */
  padding-top: var(--space-4);
  border-top: 1px solid var(--cp-rule);
}
.principle-card__body { margin-bottom: var(--space-4); }
.principle-detail > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 0.45rem;
  font-family: var(--cp-font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cp-oxblood);
  transition: color .15s;
}
.principle-detail > summary:hover { color: var(--cp-oxblood); }
.principle-detail > summary::-webkit-details-marker { display: none; }
.principle-detail > summary::after {
  content: "\203A"; margin-left: auto;
  font-size: 1.15rem; line-height: 1;
  transform: rotate(90deg); transition: transform .2s;
}
.principle-detail[open] > summary::after { transform: rotate(-90deg); }
.principle-detail__body {
  margin-top: var(--space-3);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--cp-ink-soft);
}
.principle-detail__body p { margin: 0; }
.principle-detail__body p + p { margin-top: var(--space-2); }

/* ---- "What we store" matrix ---- */
.trust-matrix { margin: var(--space-10) 0; }
.trust-matrix__table {
  width: 100%; border-collapse: collapse;
  border: 1px solid var(--cp-rule); border-radius: var(--radius-md); overflow: hidden;
}
.trust-matrix__table th, .trust-matrix__table td {
  text-align: left; padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--cp-rule); vertical-align: top;
}
.trust-matrix__table thead th {
  font-family: var(--cp-font-body); font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--cp-muted);
  background: var(--cp-paper-2); font-weight: 600;
}
.trust-matrix__table tbody th {
  font-family: var(--cp-font-display); font-size: var(--text-md);
  font-weight: 600; color: var(--cp-ink);
}
.trust-matrix__table td { font-size: 0.98rem; line-height: 1.55; color: var(--cp-ink-soft); }
.trust-matrix__table tr:last-child th, .trust-matrix__table tr:last-child td { border-bottom: 0; }
.matrix-yes { color: var(--cp-success); font-weight: 600; }
.matrix-no { color: var(--cp-oxblood); font-weight: 600; }
@media (max-width: 640px) {
  .trust-matrix__table thead { display: none; }
  .trust-matrix__table, .trust-matrix__table tbody, .trust-matrix__table tr, .trust-matrix__table th, .trust-matrix__table td { display: block; }
  .trust-matrix__table tr { padding: var(--space-3) 0; border-bottom: 1px solid var(--cp-rule); }
  .trust-matrix__table tbody th { padding-bottom: var(--space-1); }
  .trust-matrix__table td { border: 0; padding: var(--space-1) var(--space-5); }
}

/* ---- Cross-links to sibling pages ---- */
.trust-crosslinks { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); margin: var(--space-10) 0 0; }
@media (max-width: 640px) { .trust-crosslinks { grid-template-columns: 1fr; } }
.crosslink-card {
  display: block; padding: var(--space-6);
  border: 1px solid var(--cp-rule); border-radius: var(--radius-lg);
  background: var(--cp-ivory); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.crosslink-card:hover { border-color: var(--cp-oxblood); box-shadow: var(--cp-shadow-md); transform: translateY(-2px); }
.crosslink-card__title {
  font-family: var(--cp-font-display); font-size: var(--text-lg); font-weight: 600;
  color: var(--cp-ink); margin: 0 0 var(--space-2);
}
.crosslink-card__title .arrow { color: var(--cp-oxblood); transition: transform .15s; display: inline-block; }
.crosslink-card:hover .crosslink-card__title .arrow { transform: translateX(4px); }
.crosslink-card p { font-size: 1rem; line-height: 1.6; color: var(--cp-ink-soft); margin: 0; }

/* ---- Long-form legal prose (privacy, responsible AI) ---- */
.legal-prose { max-width: 46rem; }
.legal-prose > section { margin-bottom: var(--space-8); }
.legal-prose h2 {
  font-family: var(--cp-font-display); font-size: var(--text-2xl); font-weight: 600;
  color: var(--cp-ink); margin: 0 0 var(--space-4);
  padding-bottom: var(--space-2); border-bottom: 1px solid var(--cp-rule);
}
.legal-prose h3 {
  font-family: var(--cp-font-display); font-size: var(--text-lg); font-weight: 600;
  color: var(--cp-ink); margin: var(--space-5) 0 var(--space-2);
}
.legal-prose p { font-family: var(--cp-font-serif); font-size: 1.18rem; line-height: 1.7; color: var(--cp-ink-soft); margin: 0 0 var(--space-4); }
.legal-prose p:last-child { margin-bottom: 0; }
.legal-prose ul { margin: 0 0 var(--space-4) 0; padding-left: 1.3rem; }
.legal-prose li { font-family: var(--cp-font-serif); font-size: 1.15rem; line-height: 1.65; color: var(--cp-ink-soft); margin-bottom: var(--space-2); }
.legal-prose a { color: var(--cp-oxblood); text-decoration: underline; text-underline-offset: 2px; }
.legal-prose strong { color: var(--cp-ink); font-weight: 600; }

/* ---- Emphasis callout: weight for a single strong statement ---- */
.legal-callout {
  margin: var(--space-5) 0;
  padding: var(--space-5) var(--space-6);
  border-left: 4px solid var(--cp-oxblood);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--cp-oxblood-soft) 42%, transparent);
}
.legal-callout p {
  font-family: var(--cp-font-serif);
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--cp-ink);
  margin: 0;
}
.legal-callout p + p { margin-top: var(--space-3); }
.legal-callout strong { color: var(--cp-oxblood); font-weight: 700; }

/* ---- Honest "what this page is" footnote ---- */
.legal-footnote {
  margin-top: var(--space-10); padding: var(--space-5) var(--space-6);
  border: 1px dashed var(--cp-rule-strong); border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--cp-paper-2) 60%, transparent);
}
.legal-footnote p { font-family: var(--cp-font-serif); font-style: italic; font-size: var(--text-base); color: var(--cp-muted); margin: 0; }
