:root {
  --bg: #FAF4EC;
  --card: #FFFCF8;
  --ink: #2A1B16;
  --ink2: #5C4A40;
  --ink3: #76645A;
  --wine: #8C1F3B;
  --on-wine: #FFF6F2;
  --line: rgba(70, 35, 20, 0.11);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #140F0D;
    --card: #241B17;
    --ink: #F6EEE5;
    --ink2: #C4B4A5;
    --ink3: #988779;
    --wine: #A82E4B;
    --on-wine: #FFF5F1;
    --line: rgba(246, 226, 206, 0.11);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* The pages use viewport-fit=cover, so keep clear of the notch and home indicator. */
  padding:
    max(32px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(32px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-align: center;
}

main { width: 100%; max-width: 420px; }

.icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

h1 {
  margin: 24px 0 8px;
  font: 600 30px/1.15 ui-serif, "New York", Georgia, serif;
  letter-spacing: -0.3px;
  overflow-wrap: anywhere;
}

p { margin: 0; color: var(--ink2); }

.card {
  margin-top: 28px;
  padding: 18px 20px;
  background: var(--card);
  border-radius: 24px;
  text-align: left;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
}

.card ul { margin: 0; padding: 0; list-style: none; }
.card li { position: relative; padding: 5px 0 5px 20px; }
.card li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: calc(5px + 0.725em - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wine);
}

.button {
  display: block;
  margin-top: 28px;
  padding: 15px 20px;
  border-radius: 999px;
  background: var(--wine);
  color: var(--on-wine);
  font-weight: 600;
  text-decoration: none;
}

.note { margin-top: 14px; font-size: 14px; color: var(--ink3); }

footer { margin-top: 40px; font-size: 13px; color: var(--ink3); }
footer a { color: inherit; }

/* Roomy enough to tap: each link is at least 44pt tall. */
nav.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 8px; font-size: 15px; }
nav.links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink2); }

/* Long-form pages: the privacy policy and support. */
body.doc {
  display: block;
  text-align: left;
  padding:
    max(28px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(48px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}
body.doc main { max-width: 680px; margin: 0 auto; }
.doc header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.doc header img { width: 40px; height: 40px; border-radius: 10px; }
.doc header a { color: var(--ink); font-weight: 600; text-decoration: none; }
.doc h1 { margin: 0 0 6px; }
.doc h2 { margin: 36px 0 8px; font: 600 21px/1.25 ui-serif, "New York", Georgia, serif; }
.doc h3 { margin: 22px 0 4px; font-size: 17px; font-weight: 600; }
.doc p, .doc li { color: var(--ink2); }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 12px; padding-left: 20px; }
.doc li { margin: 4px 0; }
.doc a { color: var(--wine); overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) { .doc a { color: #F08A9F; } }
.doc .updated { color: var(--ink3); font-size: 15px; margin-bottom: 20px; }
.doc .card { margin-top: 20px; }
.doc footer { margin-top: 40px; padding-top: 8px; border-top: 1px solid var(--line); }
.doc footer nav.links { justify-content: flex-start; margin: 0 -12px; }
.doc .card h2 { margin: 0 0 10px; font: 600 12px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.doc .card ul { padding-left: 0; list-style: none; }
.doc .card > :last-child { margin-bottom: 0; }

.doc .card .button { margin-top: 16px; text-align: center; color: var(--on-wine); text-decoration: none; }

/* Support questions: tap a question to open its answer. */
.faq { margin-top: 12px; padding: 0 20px; background: var(--card); border-radius: 24px; }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 0;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 2px solid var(--ink3);
  border-bottom: 2px solid var(--ink3);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq details p { margin: -4px 0 16px; }

@media (max-width: 360px) {
  h1 { font-size: 27px; }
  .card, .faq { padding-left: 16px; padding-right: 16px; }
}
