/* Deliver Now legal pages: /privacy, /terms, /data-deletion.
   Loaded after /styles.css, so the tokens, header, footer and buttons come from there.
   Everything here is scoped to .doc-* classes (plus .ph and the footer's legal links). */

/* ---------- header: a way home instead of the landing nav ---------- */
.doc-home {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 8px 12px;
  border-radius: 10px;
  color: var(--fg-2); text-decoration: none;
  font-weight: 600; font-size: 15px;
}
.doc-home:hover { background: var(--chip-bg); color: var(--fg); }
.doc-home svg { width: 18px; height: 18px; transform: scaleX(-1); }

/* ---------- page head ---------- */
.doc { padding: 28px 0 72px; }
.doc-head { max-width: 780px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.doc-head h1 { font-size: clamp(40px, 11vw, 72px); line-height: 1; letter-spacing: -.035em; margin: 14px 0 16px; }
.doc-lede { font-size: 18px; line-height: 1.5; color: var(--fg-2); max-width: 34em; }
.doc-date { margin-top: 14px; font: 500 14px/1.4 var(--mono); color: var(--muted); }
.doc-switch { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.doc-switch a {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 8px 16px;
  border-radius: 22px 22px 6px 22px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--fg); text-decoration: none;
  font-weight: 600; font-size: 15px;
}
.doc-switch a:hover { border-color: var(--line-2); }
.doc-switch a[aria-current="page"] { background: var(--chip-bg); border-color: var(--chip-bg); color: var(--chip-fg); }

/* ---------- layout: contents card, then the text; side by side on wide screens ---------- */
.doc-layout { display: grid; gap: 28px; margin-top: 28px; }

.doc-toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px 22px 22px 6px;
  padding: 18px 14px 14px;
}
.doc-toc h2 { font: 700 12px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px 8px; }
.doc-toc ol { list-style: none; display: grid; gap: 2px; }
.doc-toc a {
  display: flex; gap: 10px; align-items: baseline;
  padding: 8px; border-radius: 10px;
  color: var(--fg); text-decoration: none;
  font-size: 15px; line-height: 1.35;
}
.doc-toc a:hover { background: var(--chip-bg); }
.doc-toc .doc-n { flex: none; min-width: 1.9em; font: 600 12px/1.35 var(--mono); color: var(--jac-text); }

/* ---------- the text ---------- */
.doc-body { min-width: 0; max-width: 720px; overflow-wrap: break-word; }
.doc-body > section + section { margin-top: 44px; }
.doc-body h2 {
  font-size: clamp(26px, 6.6vw, 34px); line-height: 1.12; letter-spacing: -.02em;
  margin: 0 0 4px;
  display: flex; gap: 12px; align-items: baseline;
}
.doc-body h2 .doc-n {
  flex: none;
  font: 600 14px/1 var(--mono); letter-spacing: 0;
  color: var(--chip-fg); background: var(--chip-bg);
  padding: 6px 8px 5px; border-radius: 10px 10px 3px 10px;
  transform: translateY(-4px);
}
.doc-body h3 { font-size: 19px; line-height: 1.25; letter-spacing: -.01em; margin: 26px 0 0; }
.doc-body p, .doc-body ul, .doc-body ol, .doc-body dl { margin-top: 12px; }
.doc-body p { max-width: 65ch; }
.doc-body ul { padding-left: 1.3em; list-style: disc; }
.doc-body ol { padding-left: 1.4em; list-style: decimal; }
.doc-body li { margin-top: 6px; padding-left: 3px; max-width: 63ch; }
.doc-body li::marker { color: var(--accent-text); }
.doc-body a { color: var(--jac-text); font-weight: 600; }
.doc-body strong { color: var(--fg); font-weight: 650; }
.doc-body kbd { font-size: .84em; }
.doc-body .doc-kbd-wrap { white-space: normal; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.doc-wa { white-space: nowrap; font-weight: 600; color: var(--fg); }
.doc-ref { white-space: nowrap; font: 600 .9em/1 var(--mono); color: var(--fg); }

/* the short version: Deliver Now speaking, so the square corner is bottom-left */
.doc-body .doc-short {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px 22px 22px 6px;
  padding: 20px 20px 20px;
}
.doc-body .doc-short h2 { font: 800 21px/1.2 var(--display); letter-spacing: -.01em; }
.doc-body .doc-short ul { list-style: none; padding: 0; }
.doc-body .doc-short li { position: relative; padding-left: 30px; margin-top: 10px; }
.doc-short .tk { position: absolute; left: 0; top: .42em; font-size: 13px; }

/* a plain note under a paragraph */
.doc-note {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg-2);
  border-left: 4px solid var(--jac);
  border-radius: 0 14px 14px 0;
  color: var(--fg);
}
.doc-body .doc-note p { margin-top: 0; }
.doc-body .doc-note p + p { margin-top: 8px; }

/* retention and provider tables */
.doc-table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.doc-table caption { text-align: left; color: var(--muted); font-size: 14px; padding-bottom: 8px; }
.doc-table th, .doc-table td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); }
.doc-table th:last-child, .doc-table td:last-child { padding-right: 0; }
.doc-table thead th { font: 700 12px/1.3 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--line-2); }
.doc-table tbody th { font-weight: 600; color: var(--fg); width: 55%; }
.doc-table--providers tbody th { width: 40%; }
.doc-table td { color: var(--fg-2); }

/* numbered steps (data deletion) */
.doc-body .doc-steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 12px; margin-top: 16px; }
.doc-body .doc-steps > li { counter-increment: step; position: relative; padding-left: 44px; margin-top: 0; min-height: 30px; }
.doc-steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -3px;
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--jac); color: #FFFFFF;
  font: 800 15px/1 var(--display);
  border-radius: 34% 50% 50% 7% / 34% 50% 50% 7%;
}

/* two ways to ask (data deletion) */
.doc-ways { display: grid; gap: 14px; margin-top: 18px; }
.doc-way {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px 22px 22px 6px;
  padding: 18px 18px 20px;
  min-width: 0;
}
.doc-body .doc-way h3 { margin-top: 0; }
.doc-way .btn { margin-top: 16px; max-width: 100%; white-space: normal; }
.doc-body a.btn-primary { color: var(--brand-ink); font-weight: 650; }

/* placeholders still to fill in before publishing: impossible to miss */
.ph {
  background: #FFE38A; color: #1B1530;
  padding: .04em .3em; border-radius: 4px;
  font-weight: 600;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* footer: legal links in the bottom strip */
.foot .legal a { color: var(--on-night); text-decoration: none; }
.foot .legal a:hover, .foot .legal a[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- larger screens ---------- */
@media (min-width: 720px) {
  .doc { padding: 44px 0 104px; }
  .doc-ways { grid-template-columns: 1fr 1fr; }
  .doc-body .doc-short { padding: 24px 28px; }
}
@media (min-width: 1024px) {
  .doc-layout { grid-template-columns: 272px minmax(0, 1fr); gap: 64px; align-items: start; margin-top: 40px; }
  .doc-toc { position: sticky; top: 88px; max-height: calc(100vh - 112px); overflow: auto; }
}

@media print {
  .top, .foot, .doc-toc, .doc-switch, .skip { display: none; }
  .doc { padding: 0; }
  .doc-body { max-width: none; }
  .ph { outline: 1px solid #1B1530; }
}
