/* =============================================================================
   KlariVis standalone landing — policy pages (privacy, cookie).

   These pages deliberately do NOT load calc.css. That file is 43KB of calculator
   interface and it redefines --ink, --cream, --teal, --mauve and --lede to values
   that differ from system.css, so pulling it onto a text document would ship the
   whole widget and fight the palette for nothing. This file is self-contained on
   top of system.css and site-header.css, and carries the handful of shared
   primitives (.wrap, the footer) those pages need.

   Tokens are scoped to .doc-page rather than :root so nothing here can collide
   with calc.css if the two ever end up on the same document.
   ========================================================================== */

.doc-page {
  /* surfaces and ink, matching what calc.css renders on the landing page */
  --plum-deep:  #351130;
  --on-dark:    #F3E9F0;
  --on-dark-64: rgba(243, 233, 240, .64);
  --on-dark-40: rgba(243, 233, 240, .4);
  --teal:       #1FB7C9;
  --teal-ink:   #0C7C8B;   /* teal that clears AA on white */
  --ink:        #3F0047;
  --ink-body:   #622E68;
  --ink-lede:   #68376F;
  --ink-mute:   #774A7D;

  /* type scale: role names, not values. Headings fluid, body fixed. */
  --text-micro:   0.75rem;
  --text-meta:    0.875rem;
  --text-body:    1rem;
  --text-lead:    clamp(1.0625rem, .28vw + 1rem, 1.1875rem);
  --text-sub:     clamp(1.25rem, .55vw + 1.08rem, 1.5rem);
  --text-title:   clamp(1.625rem, 1.5vw + 1.14rem, 2.125rem);
  --text-section: clamp(1.875rem, 2.4vw + 1.05rem, 2.875rem);

  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
.doc-page * { box-sizing: border-box; }
.doc-page body, body.doc-page { margin: 0; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
/* first focusable element on the page */
.skip {
  position: absolute; left: 12px; top: -100px; z-index: 200;
  padding: 12px 18px; border-radius: 999px;
  background: var(--cyan); color: var(--plum);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: top .18s var(--ease-out);
}
.skip:focus { top: 12px; outline: 2px solid var(--plum); outline-offset: 2px; }

/* ============================================================ page head ==== */
.mhead {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--plum); color: var(--cream);
  padding: 116px 0 clamp(44px, 5vw, 64px);
}
.mhead::before {
  content: ""; position: absolute; z-index: 0; inset: 0; pointer-events: none;
  background: radial-gradient(520px 260px at 84% 8%, rgba(31, 183, 201, .16), transparent 68%),
              radial-gradient(420px 240px at 6% 108%, rgba(184, 140, 172, .12), transparent 70%);
}
.mhead .wrap { position: relative; z-index: 1; }
.mhead__title {
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-section);
  line-height: 1.1; letter-spacing: -.025em; color: var(--cream);
  margin: 0; max-width: 20ch; text-wrap: balance;
}
.mhead__lede {
  font-size: var(--text-lead); font-weight: 500; line-height: 1.65; letter-spacing: .01em;
  color: var(--lede); margin: 16px 0 0; max-width: 62ch; text-wrap: pretty;
}
.mhead__stamp { font-size: var(--text-meta); line-height: 1.5; color: var(--mauve); margin: 20px 0 0; }

/* ============================================================== document === */
.doc { padding: clamp(48px, 5vw, 76px) 0 clamp(64px, 7vw, 104px); }
.doc__inner {
  display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 88px); align-items: start;
}

/* A contents list is scaffolding on a marketing page and a necessity on a
   twelve-section policy. It earns its place here and nowhere else on this site. */
.toc { position: sticky; top: 24px; }
.toc__h { font-weight: 600; font-size: var(--text-meta); color: var(--teal-ink); margin: 0 0 14px; }
.toc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.toc__list a {
  font-size: var(--text-meta); line-height: 1.45; color: var(--ink-lede); text-decoration: none;
  border-left: 1px solid rgba(63, 0, 71, .16); padding-left: 12px; display: block;
  transition: color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.toc__list a:hover { color: var(--ink); border-color: var(--teal-ink); }
.toc__list a:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 3px; border-radius: 2px; }

.doc__body > *:first-child { margin-top: 0; }
.doc__body p, .doc__body li {
  font-size: var(--text-body); line-height: 1.65; color: var(--ink-body);
  max-width: 72ch; text-wrap: pretty;
}
.doc__body p { margin: 0 0 20px; }
.doc__body h2 {
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-title);
  line-height: 1.1; letter-spacing: -.02em; color: var(--ink);
  margin: 52px 0 18px; scroll-margin-top: 24px; text-wrap: balance;
}
.doc__body h3 {
  font-family: var(--font-display); font-weight: 600; font-size: var(--text-sub);
  line-height: 1.25; color: var(--ink); margin: 34px 0 14px; scroll-margin-top: 24px;
}
.doc__body ul { margin: 0 0 20px; padding: 0; list-style: none; }
.doc__body li { margin: 0 0 10px; padding-left: 22px; position: relative; }
.doc__body li::before {
  content: ""; position: absolute; left: 2px; top: .72em;
  width: 8px; height: 1px; background: var(--teal-ink);
}
.doc__body strong { font-weight: 600; color: var(--ink); }
.doc__body a { color: var(--teal-ink); text-decoration: underline; text-underline-offset: 3px; }
/* Set verbatim from the published policy, including its capitalisation. */
.doc__callout {
  margin: 28px 0; padding: 22px 26px; border-radius: 12px;
  background: #F5F0F6; border: 1px solid rgba(63, 0, 71, .12);
}
.doc__callout p { margin: 0; font-weight: 500; color: var(--ink); max-width: none; }
.doc__note {
  margin: 44px 0 0; padding-top: 24px; border-top: 1px solid rgba(63, 0, 71, .14);
  font-size: var(--text-meta); line-height: 1.6; color: var(--ink-mute); max-width: 72ch;
}

/* ================================================================ footer === */
/* Mirrors what calc.css renders on the landing page, so the two look identical.
   Kept here because these pages do not load calc.css. */
.foot { background: var(--plum-deep); color: var(--on-dark); }
.foot__bottom {
  display: grid; grid-template-columns: auto 1fr; row-gap: 22px; align-items: center;
  padding-top: 56px; padding-bottom: 56px;
}
.foot__logo { line-height: 0; margin: 0; }
.klv-logo { height: 25px; width: auto; display: block; }
.klv-logo--mono { filter: brightness(0) invert(1); }
.foot__tag {
  justify-self: end; margin: 0;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.015em;
  font-size: 22px; line-height: 1.04; color: var(--teal);
}
/* align-items:center keeps the row's items on one centre line when it wraps */
.foot__links {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  font-size: 14px; color: var(--on-dark-64);
}
.foot__links a,
.foot__links button { color: inherit; text-decoration: none; transition: color .2s var(--ease-out); }
/* The Cookie Settings control has to be a <button> - it runs script, it is not
   navigation - but it sits between two policy links and should read as a third
   one, so strip the UA button chrome and let it inherit the row. HubSpot's
   snippet ships an inline style that paints it as a filled purple button; that
   was removed from the markup rather than fought with !important here, since an
   inline style outranks this rule. If the snippet is ever re-pasted from the
   portal it will arrive styled again - delete the style attribute, not this
   block. */
/* The vertical padding is a hit target, not spacing: stripping the snippet's
   10px/16px left a control about 17px tall, under the 24px WCAG 2.2 asks for,
   and small enough that a near-miss click reads as "the button is broken". The
   matching negative margin keeps the row the same height, so the padding costs
   nothing visually. Horizontal stays 0 so the 22px flex gap measures from the
   text edge exactly as it does on the two links either side. */
.foot__links button {
  background: none; border: 0; padding: 6px 0; margin: -6px 0; font: inherit;
  line-height: inherit; text-align: left; cursor: pointer;
}
.foot__links a:hover,
.foot__links button:hover { color: var(--on-dark); }
.foot__links a:focus-visible,
.foot__links button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }
.foot__legal {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 14px;
  margin: 0; font-size: 11px; color: var(--on-dark-40);
}
.foot__legal span { margin-left: auto; }

/* ============================================================== responsive = */
@media (max-width: 1080px) { .doc-page { --pad: 40px; } }
@media (max-width: 960px) {
  .doc__inner { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: static; padding-bottom: 8px; border-bottom: 1px solid rgba(63, 0, 71, .14); }
  .toc__list { flex-direction: row; flex-wrap: wrap; gap: 8px 20px; }
  .toc__list a { border-left: 0; padding-left: 0; text-decoration: underline; text-underline-offset: 3px; }
}
@media (max-width: 820px) {
  .doc-page { --pad: 22px; }
  .mhead { padding: 96px 0 40px; }
  .foot__bottom { grid-template-columns: 1fr; }
  .foot__tag { justify-self: start; }
  .foot__legal span { margin-left: 0; }
}
