/* Brand: "Native" (brand/BRIEF.md). Colour only where it carries a timing meaning. */
:root {
  --bg: #000;
  --panel: #141414;
  --field: #1c1c1c;
  --line: #2a2a2a;
  --text: #fff;
  --soft: #e6e6e6;
  --label: #8a8a8a;
  --green: #22d36b;
  --red: #ff4d4d;
  --purple: #c77dff;
  --amber: #ffb020;
  --amber-tint: #3a2a00;
  --link: #8ab4ff;
  --font: -apple-system, "SF Pro Display", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1080px;
  --gutter: clamp(16px, 5vw, 88px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration: underline; }
  .top a:hover, footer a:hover { text-decoration: none; color: var(--text); }
  .top nav a.pill:hover { border-color: #5a5a5a; }
}
:focus-visible { outline: 2px solid var(--soft); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(255,255,255,.22); }
a, button, summary { -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* Header */
/* same header as the home page: full width, same gutter and height */
.wrap.top { max-width: none; display: flex; align-items: center; gap: 16px; padding: 10px var(--gutter); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 30; background: var(--text); color: #000; padding: 12px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }
.top .brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.top .logo { width: 28px; height: 28px; border-radius: 7px; }
.top .name { font-weight: 600; font-size: 17px; color: var(--text); }
.top nav { margin-left: auto; display: flex; gap: 2px; align-items: center; font-size: 14px; }
.top nav a { color: var(--label); min-height: 44px; padding: 0 10px; display: inline-flex; align-items: center; transition: color .2s ease, border-color .2s ease; }
.top nav a[aria-current="page"] { color: var(--text); }
.top nav a.pill { color: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; margin-left: 8px; }
.top nav a.pill[aria-current="page"] { border-color: var(--soft); color: var(--text); }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 20px 0 32px; color: var(--label); font-size: 14px; }
footer .wrap { max-width: none; padding: 0 var(--gutter); display: flex; gap: 8px 24px; flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: 20px; margin-left: auto; }
footer a { color: var(--label); min-height: 44px; display: inline-flex; align-items: center; transition: color .2s ease; }

/* Text pages (privacy, support) */
.doc { max-width: 680px; padding: 48px 20px 96px; margin: 0 auto; }
/* links inside running text are underlined, not told apart by colour alone */
.doc p a, .doc li a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(138,180,255,.45); }
.doc h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -0.02em; line-height: 1.1; margin: 8px 0 12px; }
.doc .meta { color: var(--label); font-size: 15px; margin-bottom: 40px; }
.doc h2 { font-size: 22px; margin: 40px 0 10px; }
.doc p, .doc li { color: var(--soft); }
.doc ul, .doc ol { padding-left: 20px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc li { margin: 6px 0; }
.doc .summary { background: var(--panel); border-radius: 16px; padding: 24px 28px; margin-bottom: 8px; }
.doc .summary p { margin: 0; color: var(--text); font-size: 19px; }
.doc details { border-top: 1px solid var(--line); padding: 16px 0; }
.doc details:last-of-type { border-bottom: 1px solid var(--line); }
.doc summary { cursor: pointer; font-weight: 600; color: var(--text); list-style: none; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.doc summary::-webkit-details-marker { display: none; }
/* chevron that turns as an answer opens */
.doc summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--label); border-bottom: 2px solid var(--label); margin-right: 4px; rotate: -45deg; transition: rotate .2s cubic-bezier(.23, 1, .32, 1); }
.doc details[open] summary::after { rotate: 45deg; }
.doc details > :not(summary) { margin: 10px 0 0; }
.doc details[open] > :not(summary) { animation: reveal .25s cubic-bezier(.23, 1, .32, 1); }
@keyframes reveal { from { opacity: 0; translate: 0 -4px; } }
@media (prefers-reduced-motion: reduce) {
  .doc summary::after { transition: none; }
  .doc details[open] > :not(summary) { animation: fade .2s ease-out; }
}
@keyframes fade { from { opacity: 0; } }

/* small phones: the logo already links home */
@media (max-width: 560px) { .top nav a[href="index.html"] { display: none; } .doc .summary { padding: 20px; } .doc .summary p { font-size: 18px; } }

@media (max-width: 760px) { footer nav { margin-left: 0; } }
