/* Standalone text pages (data*.html, accessibility*.html). Not the app's
 * style.css: that one locks <html> to one viewport and replaces native
 * pinch-zoom with pinch-zoom.js, which a plain document doesn't want -
 * these pages scroll and zoom like any web page. Colors match style.css's
 * themes; doc-theme.js applies the theme picked in the app. */

:root {
  --bg: #1b1a21;
  --surface: #26242e;
  --text: #e4e1ea;
  --text-muted: #aca7b6;
  --primary: #bb9ad8;
  --border: rgba(255, 255, 255, 0.08);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f2f2f7;
    --surface: #ffffff;
    --text: #1c1c1e;
    --text-muted: #6c6c70;
    --primary: #4e008e;
    --border: rgba(0, 0, 0, 0.1);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f2f2f7;
  --surface: #ffffff;
  --text: #1c1c1e;
  --text-muted: #6c6c70;
  --primary: #4e008e;
  --border: rgba(0, 0, 0, 0.1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(17px, 4vw, 20px);
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  overflow-wrap: break-word;
}

.doc-nav,
main {
  max-width: 34em;
  margin: 0 auto;
  padding: 0 1rem;
}

.doc-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

main { padding-bottom: 3rem; }

h1 { font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.2; margin: 1.5rem 0 0.5rem; }
h2 { font-size: clamp(1.1rem, 3.5vw, 1.3rem); line-height: 1.3; margin: 1.75rem 0 0.4rem; }
p, ul { margin: 0 0 0.75rem; }
ul { padding-left: 1.4rem; }
li + li { margin-top: 0.3rem; }

.updated { color: var(--text-muted); }

a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Tap-sized nav links. */
.doc-nav a {
  display: inline-block;
  padding: 0.5rem 0;
  min-height: 44px;
}
