/* ══════════════════════════════════════════════════════════════
   Clidash — legal / document pages
   Used by: paia-manual.html, privacy-policy.html, account-deletion.html
   Loaded after custom.css. Every class is prefixed .doc-
   Shared behaviour (TOC, scroll-spy, print button) is in js/doc-page.js
══════════════════════════════════════════════════════════════ */

html { scroll-behavior: smooth; }

.doc-page {
  font-family: Inter, sans-serif;
  color: #475569;
}

.doc-container {
  max-width: 1110px;
  margin: 0 auto;
}

/* The Webflow base stylesheet gives every <li> an 8px left padding and a bottom
   margin — neutralise it on the lists that lay themselves out with flex/grid. */
.doc-meta li,
.doc-toc-list li,
.doc-checklist li,
.doc-list li,
.doc-olist li,
.doc-steps li {
  padding-left: 0;
  margin: 0;
}

/* ── Page header — deliberately minimal ── */
.doc-header { padding: 28px 20px 0; }

.doc-header-inner {
  max-width: 1110px;
  margin: 0 auto;
  padding-bottom: 26px;
  border-bottom: 1px solid #e8eaf0;
}

.doc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2700bb;
  margin: 0 0 14px;
}
.doc-eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #2700bb;
}

.doc-title {
  font-family: Syne, sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: #111;
  line-height: 1.2;
  margin: 0 0 10px;
}

.doc-lede {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #475569;
  max-width: 720px;
  margin: 0 0 14px;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: #64748b;
}
.doc-meta li { display: inline-flex; align-items: center; }
.doc-meta li + li::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #cbd5e1;
  margin: 0 12px;
}
.doc-meta strong { color: #0f172a; font-weight: 600; }
.doc-meta span + strong { margin-left: 5px; }
.doc-meta a { color: #2700bb; text-decoration: none; }
.doc-meta a:hover { text-decoration: underline; }

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* ── Buttons ── */
.doc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-family: Inter, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.doc-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.doc-btn.is-primary {
  background: #2700bb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(39, 0, 187, 0.32);
}
.doc-btn.is-primary:hover {
  background: #1a0080;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(39, 0, 187, 0.3);
}

.doc-btn.is-outline {
  background: #ffffff;
  color: #2700bb;
  border-color: #bdcbfd;
}
.doc-btn.is-outline:hover {
  border-color: #2700bb;
  background: #f8f6ff;
  transform: translateY(-1px);
}

.doc-btn.is-small { padding: 9px 14px; font-size: 13px; }
.doc-btn.is-small svg { width: 15px; height: 15px; }

/* ── Two-column layout: sticky TOC + article ── */
.doc-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding: 32px 20px 72px;
}

.doc-toc {
  position: sticky;
  top: 104px;
}

.doc-toc summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 12px;
  cursor: default;
}
.doc-toc summary::-webkit-details-marker { display: none; }

.doc-toc-chevron { display: none; }

.doc-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid #e8eaf0;
}

.doc-toc-link {
  display: flex;
  gap: 8px;
  padding: 6px 0 6px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 13.5px;
  line-height: 1.4;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.doc-toc-link:hover { color: #111; }
.doc-toc-link.is-active {
  color: #2700bb;
  border-left-color: #2700bb;
  font-weight: 600;
}

.doc-toc-num {
  flex-shrink: 0;
  width: 20px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.doc-toc-link.is-active .doc-toc-num { color: #2700bb; }

.doc-toc-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e8eaf0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #94a3b8;
}
.doc-toc-footer a { color: #2700bb; text-decoration: none; font-weight: 500; }
.doc-toc-footer a:hover { text-decoration: underline; }

/* ── Article ── */
.doc-article { min-width: 0; }

.doc-section {
  padding-top: 40px;
  margin-top: 40px;
  border-top: 1px solid #e8eaf0;
  scroll-margin-top: 110px;
}
.doc-section:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.doc-section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.doc-section-num {
  flex-shrink: 0;
  font-family: Syne, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #2700bb;
  background: rgba(39, 0, 187, 0.08);
  border-radius: 8px;
  padding: 7px 10px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.doc-h2 {
  font-family: Syne, sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #111;
  line-height: 1.25;
  margin: 0;
}

.doc-h3 {
  font-family: Syne, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  line-height: 1.35;
  margin: 30px 0 12px;
}

.doc-h4 {
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2700bb;
  margin: 22px 0 10px;
}

.doc-p {
  font-size: 16px;
  line-height: 1.7;
  color: #475569;
  margin: 0 0 14px;
}
.doc-p:last-child { margin-bottom: 0; }
.doc-p strong { color: #0f172a; font-weight: 600; }
.doc-article a { color: #2700bb; text-decoration: none; }
.doc-article a:hover { text-decoration: underline; }

/* Numbered clauses (2.1, 5.3.1 …) */
.doc-clauses { margin: 0 0 6px; }
.doc-clauses.is-nested { margin-left: 62px; }

.doc-clause {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  font-size: 16px;
  line-height: 1.7;
  color: #475569;
  margin: 0 0 10px;
}
.doc-clauses.is-nested .doc-clause { grid-template-columns: 62px minmax(0, 1fr); }

.doc-clause-num {
  font-weight: 600;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

/* Bullet and numbered lists */
.doc-list,
.doc-olist {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.doc-list li,
.doc-olist li {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.65;
  color: #475569;
}
.doc-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2700bb;
  opacity: 0.65;
}
.doc-olist { counter-reset: doc-step; }
.doc-olist li { padding-left: 34px; }
.doc-olist li::before {
  counter-increment: doc-step;
  content: counter(doc-step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(39, 0, 187, 0.08);
  color: #2700bb;
  font-family: Syne, sans-serif;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.doc-list li strong,
.doc-olist li strong { color: #0f172a; font-weight: 600; }

/* Callout */
.doc-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f1ff 100%);
  border: 1px solid rgba(39, 0, 187, 0.15);
  border-left: 4px solid #2700bb;
  border-radius: 14px;
  padding: 18px 22px;
  margin: 20px 0;
}

.doc-callout-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(39, 0, 187, 0.1);
  color: #2700bb;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.doc-callout-icon svg { width: 20px; height: 20px; }

.doc-callout-title {
  font-family: Syne, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #111;
  margin: 4px 0 6px;
}
.doc-callout .doc-p { font-size: 15px; }
.doc-callout .doc-list { margin-bottom: 0; }
.doc-callout .doc-list li { font-size: 15px; }

/* Cards */
.doc-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 18px 0;
}

.doc-card {
  background: #ffffff;
  border: 1px solid #e8eaf0;
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.doc-card.is-full { grid-column: 1 / -1; }

.doc-card.is-featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #ffffff 0%, #f6f3ff 100%);
  border-color: rgba(39, 0, 187, 0.16);
}

.doc-card-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 14px;
}

.doc-card-title {
  font-family: Syne, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 12px;
}

.doc-card .doc-p { font-size: 15px; }
.doc-card .doc-list,
.doc-card .doc-olist { margin-bottom: 0; }
.doc-card .doc-list li,
.doc-card .doc-olist li { font-size: 15px; }
.doc-card .doc-p + .doc-list,
.doc-card .doc-p + .doc-olist { margin-top: 12px; }
.doc-card .doc-olist + .doc-p,
.doc-card .doc-list + .doc-p { margin-top: 14px; }

.doc-person {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.doc-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2700bb 0%, #5b33ff 100%);
  color: #ffffff;
  font-family: Syne, sans-serif;
  font-size: 18px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(39, 0, 187, 0.28);
}

.doc-person-name {
  font-family: Syne, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 2px;
}

.doc-person-role {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

.doc-kv {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 22px;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
}
.doc-kv dt { color: #64748b; font-weight: 500; }
.doc-kv dd { margin: 0; color: #0f172a; font-weight: 500; overflow-wrap: anywhere; }
.doc-kv dd a { color: #2700bb; text-decoration: none; }
.doc-kv dd a:hover { text-decoration: underline; }

.doc-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.doc-card-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  line-height: 1.6;
  color: #475569;
}
.doc-card-note svg { width: 18px; height: 18px; flex-shrink: 0; color: #94a3b8; margin-top: 3px; }

/* Tables */
.doc-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e8eaf0;
  border-radius: 14px;
  margin: 16px 0 22px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.doc-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-family: Inter, sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  color: #475569;
}

.doc-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #64748b;
  background: #f8f9fb;
  padding: 12px 16px;
  border-bottom: 1px solid #e8eaf0;
  white-space: nowrap;
}

.doc-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #eef0f4;
  vertical-align: top;
}
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table tbody tr:hover td { background: #fbfaff; }
.doc-table td:first-child { color: #0f172a; font-weight: 500; }
.doc-table td.is-center, .doc-table th.is-center { text-align: center; }
.doc-table td.is-amount { white-space: nowrap; color: #0f172a; font-weight: 600; font-variant-numeric: tabular-nums; }
.doc-table.is-compact { min-width: 0; }
.doc-table .is-tight { width: 1%; white-space: nowrap; }

.doc-check {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(39, 0, 187, 0.1);
  color: #2700bb;
}
.doc-check svg { width: 13px; height: 13px; }

.doc-table-note {
  font-size: 13.5px;
  line-height: 1.6;
  color: #64748b;
  margin: -10px 0 18px;
}

/* Steps */
.doc-steps {
  list-style: none;
  margin: 18px 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.doc-step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  background: #ffffff;
  border: 1px solid #e8eaf0;
  border-radius: 14px;
  padding: 16px 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.doc-step:hover {
  border-color: rgba(39, 0, 187, 0.22);
  box-shadow: 0 6px 18px rgba(39, 0, 187, 0.07);
}

.doc-step-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #2700bb;
  color: #ffffff;
  font-family: Syne, sans-serif;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(39, 0, 187, 0.28);
}

.doc-step .doc-p { font-size: 15.5px; margin: 6px 0 0; }

/* Checklists */
.doc-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.doc-checklist li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.6;
  color: #475569;
}
.doc-checklist li::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 50%;
  background: rgba(39, 0, 187, 0.1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232700bb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.doc-measure-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Syne, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 16px;
}
.doc-measure-title svg { width: 20px; height: 20px; color: #2700bb; }

/* Signature */
.doc-signature {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 48px;
  padding: 26px 28px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f1ff 100%);
  border: 1px solid rgba(39, 0, 187, 0.15);
  border-radius: 18px;
}
.doc-signature .doc-avatar { width: 60px; height: 60px; }
.doc-signature-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 6px;
}
.doc-signature-name {
  font-family: Syne, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 4px;
}
.doc-signature-role { font-size: 14px; color: #475569; margin: 0; line-height: 1.5; }

/* ── Responsive ── */
@media screen and (max-width: 991px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 20px 56px;
  }

  .doc-toc {
    position: static;
    background: #ffffff;
    border: 1px solid #e8eaf0;
    border-radius: 14px;
    padding: 14px 18px;
  }
  .doc-toc summary { cursor: pointer; margin-bottom: 0; }
  .doc-toc[open] summary { margin-bottom: 12px; }
  .doc-toc-chevron { display: inline-block; width: 16px; height: 16px; transition: transform 0.2s ease; }
  .doc-toc[open] .doc-toc-chevron { transform: rotate(180deg); }
  .doc-toc-footer { display: none; }

  .doc-title { font-size: 2rem; }
  .doc-card-grid { grid-template-columns: 1fr; }
  .doc-section { scroll-margin-top: 96px; }
}

@media screen and (max-width: 767px) {
  .doc-clauses.is-nested { margin-left: 24px; }

  /* Two-column tables reflow to the viewport; only the wide 3–4 column tables scroll */
  .doc-table { min-width: 0; font-size: 14px; }
  .doc-table.is-wide { min-width: 560px; }
  .doc-table th { white-space: normal; padding: 11px 12px; }
  .doc-table td { padding: 12px 12px; }
  .doc-table td:first-child { width: 36%; }
  .doc-table td.is-amount { white-space: normal; }
}

@media screen and (max-width: 479px) {
  .doc-header { padding: 20px 12px 0; }
  .doc-header-inner { padding-bottom: 22px; }
  .doc-title { font-size: 1.75rem; }
  .doc-lede { font-size: 1rem; }
  .doc-meta { flex-direction: column; align-items: flex-start; gap: 6px; }
  .doc-meta li + li::before { display: none; }
  .doc-actions .doc-btn { width: 100%; justify-content: center; }
  .doc-layout { padding: 20px 12px 48px; }
  .doc-h2 { font-size: 1.35rem; }
  .doc-clause { grid-template-columns: 44px minmax(0, 1fr); font-size: 15px; }
  .doc-clauses.is-nested { margin-left: 12px; }
  .doc-clauses.is-nested .doc-clause { grid-template-columns: 54px minmax(0, 1fr); }
  .doc-card { padding: 18px 18px; }
  .doc-kv { grid-template-columns: 1fr; gap: 2px 0; }
  .doc-kv dt { margin-top: 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
  .doc-kv dt:first-child { margin-top: 0; }
  .doc-signature { flex-direction: column; align-items: flex-start; }
}

/* ── Print: clean document, no chrome ── */
@media print {
  .navbar-wrapper, .section-footer, .doc-toc, .doc-actions { display: none !important; }
  .main-wrapper { margin-top: 0 !important; }
  .doc-header { padding: 0; }
  .doc-header-inner { padding-bottom: 18px; }
  .doc-layout { display: block; padding: 18px 0 0; }
  .doc-section { page-break-inside: auto; padding-top: 22px; margin-top: 22px; }
  .doc-section-head, .doc-card, .doc-step, .doc-callout, .doc-signature { page-break-inside: avoid; }
  .doc-table tr { page-break-inside: avoid; }
  .doc-table-wrap, .doc-card, .doc-step { box-shadow: none; }
  .doc-table { min-width: 0; }
  .doc-article a { color: inherit; }
  body { background: #fff; }
}
