/* The two plain public pages, /help and /privacy (the App Store listing's and the phone's links), and a shop's own
   /privacy/<slug> and /texting-terms/<slug> (requests/policy-pages.mjs, no logo): one column of about 680px in the
   phone's own font, light or dark as the phone is set, the logo (plain-logo.svg) at the top. No menu, no script,
   nothing from another site. Privacy's tables stack into label/value rows on a phone. */
:root {
  color-scheme: light dark;
  --text: #1c1c1e;
  --muted: #55555c;
  --page: #ffffff;
  --link: #0a58b8;
  --line: #d8d8de;
  --tint: #fdf4ea;
  --brand: #b45309;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f2f2f7;
    --muted: #a8a8b0;
    --page: #111113;
    --link: #6cb2ff;
    --line: #3a3a40;
    --tint: #2a2018;
  }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  overflow-wrap: break-word;
}

main {
  box-sizing: border-box;
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

main > img:first-child {
  display: block;
  width: auto;
  max-width: 100%;
  height: 28px;
  margin: 0 0 28px;
}

h1 {
  margin: 0 0 0.6em;
  font-size: 1.75rem;
  line-height: 1.2;
}

h2 {
  margin: 1.8em 0 0.5em;
  font-size: 1.25rem;
  line-height: 1.3;
  scroll-margin-top: 16px;
}

h3 {
  margin: 1.5em 0 0.5em;
  font-size: 1.05rem;
  line-height: 1.3;
}

p,
ol,
ul {
  margin: 0 0 0.9em;
}

ol,
ul {
  padding-left: 1.4em;
}

li + li {
  margin-top: 0.4em;
}

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

.effective {
  color: var(--muted);
}

/* "In short": the summary box under the title. */
.in-short {
  margin: 1.6em 0;
  padding: 4px 20px 6px;
  background: var(--tint);
  border-left: 4px solid var(--brand);
  border-radius: 0 10px 10px 0;
}

.in-short h2 {
  margin-top: 0.8em;
}

/* Contents: two columns on a wide screen, one row a link on a phone, each at least 44px tall to tap. */
.contents ol {
  columns: 2;
  column-gap: 28px;
}

.contents li {
  break-inside: avoid;
}

table {
  width: 100%;
  margin: 0 0 1.4em;
  border-collapse: collapse;
  font-size: 0.94em;
}

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

thead th {
  border-bottom: 2px solid var(--line);
}

.contact-card {
  padding: 16px 20px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

@media (max-width: 599px) {
  .contents ol {
    columns: 1;
    padding-left: 0;
    list-style: none;
  }

  .contents li + li {
    margin-top: 0;
  }

  .contents a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  table,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  tr {
    margin: 0 0 12px;
    padding: 6px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
  }

  th,
  td {
    padding: 6px 0;
    border: 0;
  }

  td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.85em;
    font-weight: 600;
  }
}

/* Printed: black on white, every section and table kept. */
@media print {
  :root {
    --text: #000000;
    --muted: #333333;
    --page: #ffffff;
    --link: #000000;
    --line: #999999;
    --tint: #ffffff;
  }

  main {
    max-width: none;
    padding: 0;
  }

  tr,
  .contact-card,
  .in-short {
    break-inside: avoid;
  }
}
