/* ==========================================================================
   MealMaxx — legal document pages (privacy policy, terms)
   Long-form reading: narrow measure, clear hierarchy, quiet furniture.
   Loads on top of brand.css.
   ========================================================================== */

.doc-head {
  background: var(--paper-2);
  border-bottom: 1px solid var(--border);
  padding-block: clamp(40px, 6vw, 68px) clamp(28px, 4vw, 40px);
}
.doc-head h1 {
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  margin-bottom: 14px;
}
.doc-dates {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  font-size: .92rem; color: var(--muted);
}
.doc-dates b { color: var(--ink); font-weight: 600; }

.doc { padding-block: clamp(40px, 6vw, 64px) clamp(56px, 8vw, 88px); }
.doc-body { max-width: 74ch; }

/* ------------------------------------------------------------ headings */
.doc-body h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  margin: 44px 0 14px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 90px;
}
.doc-body > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc-body h3 {
  font-size: 1.04rem;
  margin: 26px 0 8px;
  letter-spacing: -.012em;
}

/* --------------------------------------------------------------- text */
.doc-body p { margin-bottom: 15px; line-height: 1.68; }
.doc-body strong { font-weight: 600; }
.doc-body em { font-style: italic; }
.doc-body a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 2px; }
.doc-body a:hover { color: var(--ink); }

/* The bullet is an absolutely-positioned marker, NOT a flex item. A flex `li`
   turns every inline child into its own column, so "**Lead-in.** body text"
   renders as two side-by-side blocks instead of one flowing sentence.
   Scoped to `ul` so the numbered table of contents keeps its numerals. */
.doc-body ul { margin: 0 0 16px; padding-left: 0; list-style: none; display: grid; gap: 9px; }
.doc-body ul > li { position: relative; padding-left: 19px; line-height: 1.62; }
.doc-body ul > li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--green);
}
.doc-body ol { margin: 0 0 16px; padding-left: 1.25em; display: grid; gap: 9px; }
.doc-body ol > li { line-height: 1.62; padding-left: 2px; }

.doc-lede {
  font-size: 1.08rem; color: var(--muted); line-height: 1.6;
  margin-bottom: 22px; text-wrap: pretty;
}

/* --------------------------------------------------------------- table */
.doc-table-wrap { overflow-x: auto; margin: 0 0 18px; }
.doc-body table {
  border-collapse: collapse; width: 100%; min-width: 460px;
  font-size: .95rem;
}
.doc-body th, .doc-body td {
  text-align: left; vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.doc-body th {
  font-family: var(--body); font-weight: 700; font-size: .78rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--faint);
  border-bottom-color: var(--border-strong);
}
/* Recipient names are long ("Automated image recognition and pricing providers"); nowrap let that
   cell dictate the column and squeezed the other two into narrow stacks. Wrap, with a floor. */
.doc-body td:first-child { font-weight: 600; min-width: 11em; }

/* --------------------------------------------------------- callout box */
.doc-note {
  background: var(--green-tint);
  border: 1px solid rgba(14,154,78,.18);
  border-radius: var(--r-soft);
  padding: 18px 22px;
  margin: 0 0 20px;
}
.doc-note p { margin: 0; font-size: .97rem; }
.doc-note p + p { margin-top: 10px; }
.doc-note.warn { background: #FDF6EC; border-color: rgba(217,162,27,.24); }

/* ------------------------------------------------------------ contents */
.toc {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-soft); padding: 20px 24px; margin-bottom: 34px;
}
.toc h2 {
  font-family: var(--body); font-size: .78rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--faint);
  margin: 0 0 12px; padding: 0; border: 0;
}
.toc ol {
  margin: 0; padding-left: 1.3em;
  display: grid; gap: 7px;
  font-size: .95rem;
}
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }

/* back link */
.doc-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .93rem; color: var(--muted); text-decoration: none;
  margin-bottom: 18px;
}
.doc-back:hover { color: var(--ink); }
