/*
 * Support site — the same night palette as the app, so someone arriving from
 * the App Store listing lands somewhere that looks like the product.
 *
 * The print block at the bottom is not decoration: headless Chrome renders
 * this file when it makes the PDFs, so what is set there is what the legal
 * documents look like on paper. Dark-on-white, no navigation chrome, and
 * headings that do not get stranded at the foot of a page.
 */

:root {
  --bg: #0b1020;
  --surface: #151b2e;
  --border: #272f47;
  --text: #e9ecf8;
  --muted: #9aa3bd;
  --accent: #7c83ff;
  --accent-dim: #3a3f73;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  /* 16px side gutter on a phone; the column stops growing on a desktop. */
  padding: 0 16px;
}

.top,
main,
footer {
  max-width: 720px;
  margin: 0 auto;
}

/* --- header ------------------------------------------------------------- */

.top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: baseline;
  justify-content: space-between;
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border);
}

.brand {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.2px;
}

.top nav {
  display: flex;
  gap: 18px;
}

.top nav a {
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}

.top nav a:hover { color: var(--text); }
.top nav a[aria-current="page"] { color: var(--accent); }

/* --- content ------------------------------------------------------------ */

main { padding: 8px 0 48px; }

h1 {
  font-size: 30px;
  line-height: 1.2;
  margin: 28px 0 8px;
  letter-spacing: -0.3px;
}

h2 {
  font-size: 21px;
  line-height: 1.3;
  margin: 40px 0 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

h3 {
  font-size: 17px;
  margin: 26px 0 6px;
  color: var(--text);
}

p, li { color: #cfd5ea; }

a { color: var(--accent); }

ul {
  padding-left: 22px;
  margin: 10px 0;
}

li { margin: 6px 0; }

strong { color: var(--text); }

/* The lead block under the title: effective date, developer, app name. */
main > p:first-of-type { color: var(--muted); }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* --- support page ------------------------------------------------------- */

.lede {
  font-size: 18px;
  color: var(--muted);
  margin: 4px 0 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 18px 0;
}

.card.accent {
  border-color: var(--accent-dim);
  background: rgba(124, 131, 255, 0.1);
}

.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.mail {
  display: inline-block;
  margin-top: 6px;
  font-size: 18px;
  font-weight: 600;
}

details {
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
}

summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 400;
}

details[open] summary::after { content: "–"; }

details > :not(summary) { margin-top: 0; }
details > p:last-child { padding-bottom: 12px; }

.note {
  color: var(--muted);
  font-size: 14px;
}

/* --- footer ------------------------------------------------------------- */

footer {
  border-top: 1px solid var(--border);
  padding: 22px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

footer p { margin: 4px 0; color: var(--muted); }

/* --- print: this is what the PDFs look like ----------------------------- */

@media print {
  @page {
    margin: 18mm 16mm;
  }

  body {
    background: #fff;
    color: #111;
    padding: 0;
    font-size: 10.5pt;
    line-height: 1.5;
  }

  /* Navigation is meaningless on paper. */
  .top nav { display: none; }

  .top {
    border-bottom: 1px solid #ccc;
    padding: 0 0 8px;
    margin-bottom: 10px;
  }

  .brand { color: #111; }

  p, li, td, th { color: #222; }
  a { color: #111; text-decoration: none; }
  strong { color: #000; }
  main > p:first-of-type { color: #444; }

  h1 { font-size: 20pt; margin-top: 10pt; }
  h2 { font-size: 13pt; border-top: 1px solid #ddd; }
  h3 { font-size: 11pt; }

  /* A heading alone at the foot of a page, or a row split across two, is the
     thing that makes a generated PDF look generated. */
  h1, h2, h3 { break-after: avoid; page-break-after: avoid; }
  li, tr { break-inside: avoid; page-break-inside: avoid; }

  th, td { border-bottom: 1px solid #ddd; }
  th { color: #444; }

  footer {
    border-top: 1px solid #ccc;
    color: #444;
    padding: 10pt 0 0;
  }
}
