/* ============================================================
   KELPARO — trust & legal pages
   A quiet, editorial counterpart to the marketing pages.
   Tokens only: this file introduces no new colours or fonts.
   ============================================================ */

.doc {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* ---------- side rail ---------- */

.doc__rail {
  position: sticky;
  top: 104px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
}
.doc__rail h6 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 14px;
}
.doc__rail ul { list-style: none; margin: 0; padding: 0; }
.doc__rail li { margin-bottom: 9px; }
.doc__rail a {
  color: var(--text-dim);
  text-decoration: none;
  border-left: 2px solid var(--border);
  padding-left: 11px;
  display: block;
  transition: color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.doc__rail a:hover { color: var(--text); border-left-color: var(--lime); }

/* ---------- prose ---------- */

.doc__body { max-width: 720px; min-width: 0; }

.doc__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  padding-bottom: 22px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--border);
}
.doc__meta b { color: var(--text-dim); font-weight: 500; }

.doc__body h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 29px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.25;
  color: var(--text);
  margin: 54px 0 16px;
  scroll-margin-top: 110px;
}
.doc__body h2:first-child { margin-top: 0; }

.doc__body h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
  margin: 32px 0 10px;
  scroll-margin-top: 110px;
}

.doc__body p,
.doc__body li {
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--text-dim);
}
.doc__body p { margin: 0 0 16px; }
.doc__body ul, .doc__body ol { margin: 0 0 18px; padding-left: 22px; }
.doc__body li { margin-bottom: 8px; }
.doc__body strong { color: var(--text); font-weight: 600; }
.doc__body a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-bright); }
.doc__body a:hover { text-decoration-color: var(--lime); }
.doc__body code {
  font-family: var(--font-mono);
  font-size: .87em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--text);
}

.doc__lead {
  font-size: 18px !important;
  line-height: 1.62 !important;
  color: var(--text) !important;
  margin-bottom: 26px !important;
}

/* ---------- callouts ---------- */

.doc__note {
  border-left: 2px solid var(--border-bright);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 26px 0;
}
.doc__note p { margin: 0; font-size: 14.5px; }
.doc__note p + p { margin-top: 10px; }
.doc__note--warn { border-left-color: var(--magenta); }
.doc__note--ok { border-left-color: var(--lime); }

/* An unresolved fact. Never invent one — render it. */
.todo {
  font-family: var(--font-mono);
  font-size: .85em;
  font-weight: 500;
  color: var(--magenta);
  background: color-mix(in srgb, var(--magenta) 10%, transparent);
  border: 1px dashed color-mix(in srgb, var(--magenta) 45%, transparent);
  border-radius: 5px;
  padding: 1px 7px;
  white-space: nowrap;
}

/* ---------- tables ---------- */

.doc__table { width: 100%; border-collapse: collapse; margin: 22px 0 26px; font-size: 14px; }
.doc__table th {
  text-align: left;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0 14px 10px 0;
  border-bottom: 1px solid var(--border-bright);
}
.doc__table td {
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  line-height: 1.55;
  vertical-align: top;
}
.doc__table td:first-child { color: var(--text); }
.doc__table code { white-space: nowrap; }
.doc__table--wrap { display: block; overflow-x: auto; }

/* ---------- verdict chips ---------- */

.vd {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 2px 7px;
  border: 1px solid var(--border-bright);
  color: var(--text-dim);
}
.vd--block { color: var(--magenta); border-color: color-mix(in srgb, var(--magenta) 40%, transparent); }
.vd--defer { color: var(--violet); border-color: color-mix(in srgb, var(--violet) 40%, transparent); }
.vd--pass  { color: var(--lime);    border-color: color-mix(in srgb, var(--lime) 45%, transparent); }

/* ---------- stat strip ---------- */

.doc__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 40px;
}
.doc__stat { background: var(--bg-2); padding: 20px 18px; }
.doc__stat b {
  display: block;
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 5px;
}
.doc__stat span { font-size: 12px; line-height: 1.4; color: var(--text-faint); display: block; }

/* ---------- index cards (hub page) ---------- */

.doc__cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 6px 0 10px; }
.doc__card {
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  text-decoration: none !important;
  transition: border-color .22s var(--ease-out), transform .22s var(--ease-out);
}
.doc__card:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.doc__card b {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}
.doc__card span { font-size: 13.5px; line-height: 1.55; color: var(--text-dim); display: block; }

@media (max-width: 900px) {
  .doc { grid-template-columns: 1fr; gap: 0; }
  .doc__rail { display: none; }
  .doc__stats { grid-template-columns: repeat(2, 1fr); }
  .doc__cards { grid-template-columns: 1fr; }
}
