:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6e6e73;
  --line: #e5e5ea;
  color-scheme: light dark;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212;
    --fg: #e6e6e6;
    --muted: #98989d;
    --line: #2a2a2d;
  }
  :root:not([data-theme="light"]) .logo img { filter: invert(1); }
}
:root[data-theme="dark"] {
  --bg: #121212;
  --fg: #e6e6e6;
  --muted: #98989d;
  --line: #2a2a2d;
}
:root[data-theme="dark"] .logo img { filter: invert(1); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: 720px;
  padding: 0 20px;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; display: block; }

header { padding: 32px 0 8px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: inline-block; }
.logo img { width: 92px; height: auto; }
.home .logo img { width: 168px; }
.home header { padding-top: 56px; }

main { padding: 16px 0 48px; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 28px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 15px; }

footer {
  display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 20px 0 40px;
  font-size: 14px; color: var(--muted);
}
footer a { color: var(--muted); }
footer { align-items: center; }

.theme {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px; color: var(--muted); background: none; border: 0; cursor: pointer;
}
.theme:hover { color: var(--fg); }
.theme .sun { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { display: block; }
  :root:not([data-theme="light"]) .theme .moon { display: none; }
}

.contact { position: relative; }
.contact button {
  font: inherit; color: var(--fg); background: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
}
.contact button:hover, .contact button[aria-expanded="true"] { border-color: var(--fg); }
.tip {
  display: none; position: absolute; right: 0; bottom: 100%;
  margin-bottom: 8px; padding: 12px 14px; width: max-content; max-width: min(320px, calc(100vw - 40px));
  background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); line-height: 1.5; z-index: 1;
}
/* Invisible bridge so the pointer can travel from button to tooltip. */
.tip::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.tip a, .tip span { display: block; color: var(--fg); }
.tip span { color: var(--muted); }
.contact:hover .tip, .contact button[aria-expanded="true"] + .tip { display: block; }

/* home */
.company { font-size: 32px; margin-top: 8px; }
.label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 40px 0 8px; }
.apps { list-style: none; margin: 24px 0 0; padding: 0; }
.apps a { display: flex; align-items: center; gap: 16px; padding: 12px 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.apps li:first-child a { border-top: 1px solid var(--line); }
.apps li:last-child a { border-bottom: 0; }
.apps a:hover strong { text-decoration: underline; }
.apps img { width: 48px; height: 48px; border-radius: 22%; flex: none; }
.apps span span { display: block; font-size: 15px; }

/* app page */
.hero { width: 100%; border-radius: 14px; margin-bottom: 28px; }
.app-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.icon { width: 64px; height: 64px; border-radius: 22%; flex: none; }
.app-head p { margin: 0; }
.stores { list-style: none; padding: 0; margin: 20px 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.stores a {
  display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 15px; text-decoration: none;
}
.stores a:hover { border-color: var(--fg); }
.features { padding-left: 20px; }
.features li { margin: 6px 0; }
.shots {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 32px 0 16px; padding-bottom: 8px;
}
.shots img { height: 380px; width: auto; max-width: none; border-radius: 10px; scroll-snap-align: start; }
.wide { width: 100%; border-radius: 14px; margin: 16px 0 24px; }
.links { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; }

/* legal and help pages */
.back { font-size: 15px; margin: 0 0 16px; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--fg); }
.doc { overflow-wrap: anywhere; }
.doc h1 { font-size: 28px; }
.doc h2 { font-size: 20px; margin-top: 32px; }
.doc > h2:first-child { font-size: 28px; margin-top: 0; }
.doc h3 { font-size: 17px; }
.doc ul { padding-left: 20px; }
.doc li p { margin: 4px 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
.doc td, .doc th { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.doc iframe { max-width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.doc #subtitle { color: var(--muted); font-size: 15px; }
.doc #text-img-container { display: flex; gap: 20px; align-items: flex-start; margin: 16px 0; }
.doc #img-container img { width: 160px; border-radius: 8px; }
@media (max-width: 520px) {
  .doc #text-img-container { flex-direction: column; }
  .shots img { height: 300px; }
}
