/* The text pages of askcally.com (privacy, terms, consumer health data, help, young people,
   accuracy, crisis), on the Juicy brand like the launch page (design/juicy/docs/BRAND.md).
   Plain CSS, no script. The pages are made by landing/_tools/build_pages.py. */
:root {
  --cream: #FFF1E4;
  --cream-deep: #FBE3CC;
  --cream-line: #F2D3B8;
  --aubergine: #2D1630;
  --aubergine-soft: #4A2E48;
  --muted: #6E5470;
  --lilac: #CDB9CB;
  --chilli: #E8381D;
  --mango: #FFB21A;
  --pistachio: #A9C76A;

  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --ui: 'Hanken Grotesk', system-ui, sans-serif;
  --arabic: 'Alexandria', system-ui, sans-serif;

  --gutter: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--cream);
  color: var(--aubergine);
  font: 400 17px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
[lang="ar"] { font-family: var(--arabic); }

a { color: var(--aubergine); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--chilli); text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--aubergine); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 10px 16px; border-radius: 999px; background: var(--aubergine); color: var(--cream); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1168px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 8px; }
.top .home { display: block; border-radius: 12px; }
.logo { display: block; width: 120px; height: auto; }
.logo .l { fill: var(--aubergine); }
.logo .ld { fill: var(--chilli); }
.top nav { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { font: 600 15px/44px var(--ui); padding: 0 14px; border-radius: 999px; text-decoration: none; color: var(--aubergine-soft); }
.top nav a:hover { background: var(--cream-deep); color: var(--aubergine); }
.top nav a[aria-current="page"] { color: var(--aubergine); background: var(--cream-deep); }

/* ---------- the page ---------- */
.page { max-width: 760px; padding-top: 40px; padding-bottom: 72px; }
.eyebrow { font: 700 15px/1.2 var(--ui); color: var(--muted); letter-spacing: 0.01em; margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; color: var(--aubergine); text-wrap: balance; }
h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1; letter-spacing: -0.04em; margin: 12px 0 0; }
@media (min-width: 800px) { h1 { font-variation-settings: 'opsz' 96; } }   /* 6vw >= 48 px */
h2 { font-size: 26px; line-height: 1.15; letter-spacing: -0.03em; margin: 52px 0 0; scroll-margin-top: 16px; }
h3 { font-size: 20px; line-height: 1.2; letter-spacing: -0.02em; margin: 32px 0 0; scroll-margin-top: 16px; }
p, ul, ol { margin: 14px 0 0; }
ul, ol { padding-left: 24px; }
li + li { margin-top: 8px; }
strong { font-weight: 700; }
.lede { font-size: 19px; line-height: 1.5; color: var(--aubergine-soft); margin-top: 18px; text-wrap: pretty; }
.meta { font-size: 15px; color: var(--muted); margin-top: 18px; }

/* contents of a long page */
.toc { margin-top: 32px; padding: 22px 26px 24px; border-radius: 24px; background: var(--cream-deep); }
.toc h2 { font-family: var(--ui); font-size: 15px; font-weight: 700; letter-spacing: 0.01em; color: var(--muted); margin: 0; }
.toc ol { margin-top: 10px; padding-left: 0; list-style: none; columns: 2 16em; column-gap: 32px; }
.toc li { margin: 0; padding: 3px 0; break-inside: avoid; font-size: 16px; line-height: 1.4; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; text-decoration-color: var(--chilli); }

/* tables scroll on their own on narrow phones, so the page never scrolls sideways */
.table { margin-top: 18px; overflow-x: auto; border-radius: 20px; border: 2px solid var(--cream-line); background: #fff; }
.table:focus-visible { outline: 3px solid var(--aubergine); outline-offset: 3px; }
table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; }
th { background: var(--cream-deep); font-weight: 700; }
td { border-top: 2px solid var(--cream-line); }
.table.wide table { min-width: 560px; }

/* a quiet card, for the one line people must not miss */
.card { margin-top: 28px; padding: 22px 26px; border-radius: 24px; background: var(--aubergine); color: var(--cream); }
.card p { margin: 0; font-size: 18px; line-height: 1.5; }
.card p + p { margin-top: 10px; }
.card a { color: var(--cream); }
.card a:focus-visible { outline-color: var(--cream); }
.card strong { color: var(--mango); }

/* helplines */
.lines { list-style: none; padding: 0; margin-top: 16px; display: grid; gap: 10px; }
.lines li { margin: 0; padding: 16px 20px; border-radius: 20px; background: #fff; }
.lines .who { font-weight: 700; }
.lines .how { margin-top: 2px; color: var(--aubergine-soft); }
.lines a { font-weight: 700; }

/* questions on the help page */
.qa h3 { font-family: var(--ui); font-size: 18px; font-weight: 700; letter-spacing: 0; line-height: 1.35; margin-top: 26px; }
.qa h3 + p { margin-top: 6px; color: var(--aubergine-soft); }

/* ---------- footer ---------- */
footer { border-top: 2px solid var(--cream-line); padding: 32px 0 44px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot .logo { width: 92px; }
.foot nav { display: flex; gap: 0 22px; flex-wrap: wrap; }
.foot nav a { font: 600 15px/44px var(--ui); text-decoration: none; }
.foot nav a:hover { text-decoration: underline; text-decoration-color: var(--chilli); }
.foot .mail { width: 100%; font-size: 15px; color: var(--muted); margin: 0; }
.foot .mail a { color: var(--aubergine); font-weight: 600; }

@media (max-width: 720px) {
  .top { flex-wrap: wrap; }
  .top nav { justify-content: flex-start; margin-left: -14px; }
  .page { padding-top: 24px; }
  h2 { font-size: 23px; margin-top: 44px; }
  h3 { font-size: 19px; }
  .toc { padding: 18px 20px 20px; }
  .foot { flex-direction: column; align-items: flex-start; }
}
/* on phones a table's rows stack, each cell under its column's name */
@media (max-width: 600px) {
  .table { overflow: visible; background: none; border: 0; border-radius: 0; }
  .table.wide table { min-width: 0; }
  table, tbody, tr, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  tr { background: #fff; border: 2px solid var(--cream-line); border-radius: 20px; padding: 6px 0; }
  tr + tr { margin-top: 10px; }
  td { border: 0; padding: 6px 16px; }
  td::before { content: attr(data-label); display: block; font-size: 14px; font-weight: 700; color: var(--muted); }
}
@media (max-width: 400px) {
  :root { --gutter: 16px; }
  th, td { padding: 10px 12px; }
}
