/* glebthebread: one stylesheet for the studio page and every app's documents. */
:root {
  --paper: #ffffff;
  --ink: #141414;
  --muted: #6b6b6b;
  --rule: #e6e6e6;
  --accent: #141414;          /* each app sets its own, see body[data-app] */
  --on-accent: #ffffff;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #000000; --ink: #f2f2f2; --muted: #9a9a9a; --rule: #262626; --accent: #f2f2f2; --on-accent: #000000; }
}
body[data-app="marginalia"] { --accent: #f5b400; --on-accent: #141414; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
main { max-width: 680px; margin: 0 auto; padding: 32px 16px 64px; }

/* The poster face: SF Pro black condensed on Apple devices, a heavy sans elsewhere. */
.poster, h1 {
  font-weight: 900;
  font-stretch: condensed;
  letter-spacing: -0.01em;
  line-height: 1.02;
}
h1 { font-size: clamp(40px, 9vw, 64px); margin: 8px 0 12px; }
h2 { font-size: 22px; line-height: 1.25; margin: 40px 0 8px; }
h3 { font-size: 17px; margin: 24px 0 4px; }
p, ul { margin: 0 0 14px; }
ul { padding-left: 20px; }
li { margin-bottom: 6px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }

/* Top line: studio name, back to the app. */
.crumbs { display: flex; gap: 8px; font-size: 15px; color: var(--muted); margin-bottom: 24px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }

/* An app as a row: icon, name, line. */
.apps { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--rule); }
.apps li { margin: 0; border-bottom: 1px solid var(--rule); }
.apps a { display: flex; gap: 16px; align-items: center; padding: 16px 0; text-decoration: none; }
.apps img { width: 64px; height: 64px; border-radius: 15px; flex: none; }
.apps strong { display: block; font-size: 19px; }

/* An app's page: the poster block, then its documents. */
.hero { background: var(--accent); color: var(--on-accent); border-radius: 28px; padding: 24px; margin: 8px 0 32px; }
.hero img { width: 72px; height: 72px; border-radius: 17px; display: block; }
.hero h1 { margin: 20px 0 8px; }
.hero p { margin: 0; font-size: 19px; }
.docs { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.docs li { margin: 0; border-bottom: 1px solid var(--rule); }
.docs a { display: flex; justify-content: space-between; padding: 16px 0; text-decoration: none; font-weight: 600; }
.docs a::after { content: "→"; color: var(--muted); font-weight: 400; }

/* Plain answers to plain questions. */
details { border-bottom: 1px solid var(--rule); padding: 14px 0; }
details:first-of-type { border-top: 1px solid var(--rule); }
summary { cursor: pointer; font-weight: 600; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--muted); }
details[open] summary::after { content: "–"; }
details p { margin: 10px 0 0; }

.updated { color: var(--muted); font-size: 15px; margin-bottom: 28px; }
footer { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; }
footer a { color: var(--muted); }
