/* Shared styles for privacy.html and terms.html */
:root {
  --bg: #ffffff;
  --surface: #f2f2ef;
  --surface-2: #e6e6e2;
  --ink: #141414;
  --ink-2: #48484d;
  --accent: #b3261e;
  --accent-press: #921d17;
  --accent-ink: #ffffff;
  --serif: ui-serif, "New York", Charter, "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1d1d1e;
    --surface-2: #2a2a2c;
    --ink: #f2f2f2;
    --ink-2: #a8a8ad;
    --accent: #e5483e;
    --accent-press: #c73a31;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; margin: 0; }
p { margin: 0 0 14px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right)); }

/* Top bar: a real sticky bar, so it may carry a surface change */
.bar { position: sticky; top: 0; z-index: 10; background: var(--bg); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: 8px; display: block; }
.wordmark { font-family: var(--serif); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.wordmark span { color: var(--accent); }
.get-app {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: 600 14px/1 var(--sans); text-decoration: none;
  transition: transform .12s ease, background-color .12s ease;
}
.get-app:hover { background: var(--accent-press); }
.get-app:active { transform: scale(0.97); }

/* Title block */
.head { background: var(--surface); padding: 40px 0 36px; }
.head h1 { font-size: clamp(34px, 8vw, 52px); line-height: 1.06; }
.updated { margin: 10px 0 0; color: var(--ink-2); font-size: 14px; }
.short { margin-top: 26px; background: var(--bg); border-radius: 16px; padding: 20px 20px 8px; max-width: 760px; }
.short h2 { font-size: 20px; margin-bottom: 10px; }
.short ul { list-style: none; margin: 0; padding: 0; }
.short li { position: relative; padding: 0 0 12px 30px; }
.short li::before {
  content: ""; position: absolute; left: 2px; top: 5px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8'/%3E%3C/svg%3E") center/contain no-repeat;
}
.short li::after {
  content: ""; position: absolute; left: 7px; top: 8px; width: 4px; height: 8px;
  border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); /* check mark drawn on the dot. taste-skill-ignore */
}

/* Document: table of contents + body */
.doc { display: grid; gap: 8px; padding-top: 24px; padding-bottom: 32px; }
.toc details { background: var(--surface); border-radius: 14px; padding: 4px 16px; }
.toc summary { cursor: pointer; padding: 10px 0; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font-size: 20px; color: var(--ink-2); }
.toc details[open] summary::after { content: "–"; }
.toc ol { margin: 0 0 12px; padding-left: 22px; font-size: 15px; }
.toc li { padding: 3px 0; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--accent); font-weight: 600; }

article { max-width: 680px; }
article section { padding-top: 22px; }
article h2 { font-size: 24px; margin-bottom: 10px; }
article ul { padding-left: 22px; margin: 0 0 14px; }
article li { margin-bottom: 8px; }
article code { font-size: 0.9em; background: var(--surface); padding: 1px 6px; border-radius: 6px; }

.contact { margin-top: 34px; background: var(--ink); color: var(--bg); border-radius: 18px; padding: 24px 22px; }
.contact h2 { font-size: 24px; margin-bottom: 6px; }
.contact p { color: var(--bg); opacity: .8; }
.contact a.mail {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 12px;
  background: var(--bg); color: var(--ink); font-weight: 600; text-decoration: none; margin-top: 4px;
  transition: transform .12s ease;
}
.contact a.mail:active { transform: scale(0.97); }
.to-top { display: inline-block; margin-top: 22px; font-size: 14px; color: var(--ink-2); }

footer { background: var(--surface); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 24px; padding-bottom: max(28px, env(safe-area-inset-bottom)); font-size: 14px; color: var(--ink-2); }
footer a { color: var(--ink-2); text-decoration: none; }
footer a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* Motion */
.rise { opacity: 0; transform: translateY(16px); animation: rise .5s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { opacity: 1; transform: none; animation: none; }
  .get-app, .contact a.mail { transition: none; }
}

@media (min-width: 960px) {
  .head { padding: 64px 0 48px; }
  .doc { grid-template-columns: 240px 1fr; gap: 64px; padding-top: 40px; }
  .toc { position: sticky; top: 84px; align-self: start; }
  .toc details { background: none; padding: 0; }
  .toc summary { pointer-events: none; padding-top: 22px; color: var(--ink-2); font-size: 14px; }
  .toc summary::after, .toc details[open] summary::after { content: none; }
  .toc ol { padding-left: 20px; }
}
