/* The shared frame for all twelve app guides.

   The detail pages in this tree deliberately share nothing: an app page is the
   app speaking, so each one inlines its own construction — Grid Board's dark
   projector board, Stick Lab's cobalt panels, Rudiment Builder's Palatino.

   A guide is a different kind of document and wants the opposite bias. A
   teacher who has read one guide should be able to find "Privacy" or "Keyboard"
   in the same place in the other eleven, and twelve hand-built layouts would
   make that an accident rather than a promise. So the structure is shared here
   and the voice is per-page: every guide sets its app's palette and its app's
   typefaces in :root, and the rules below only ever read those variables.

   Adding a guide means adding a palette block, not editing this file. */

:root {
  /* Defaults, so a guide that forgets a variable is legible rather than
     invisible. Every guide overrides all of them. */
  --paper: #ffffff;
  --paper-deep: #f4f4f5;
  --card: #ffffff;
  --ink: #16181d;
  --muted: #5c6470;
  --line: #d8dae0;
  /* --accent is the app's signal colour at full strength, and it is only ever
     used behind something large or non-textual. --accent-ink is the version
     that has to carry type: it fills buttons and sets the eyebrow. Keeping them
     apart is what stopped these pages shipping white-on-orange buttons at
     2.94:1 — every app's brand orange fails AA under white text, and every app
     already had a darkened variant defined for exactly this reason. */
  --accent: #b34700;
  --accent-ink: #b34700;
  --on-accent: #ffffff;
  /* Body text on --paper-deep rather than --paper. The raised ground is darker
     than the page, so a --muted that clears AA on one can miss on the other by
     a tenth. Defaults to --muted; a palette overrides it only where it must. */
  --muted-deep: var(--muted);
  --focus: #174ea6;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 14px;
  --hard: 5px 5px 0 rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
img { max-width: 100%; height: auto; }

/* --- frame ---------------------------------------------------------------- */

.site-header,
.wrap,
.site-footer {
  width: min(880px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  min-height: 82px;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand > span { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-family: var(--serif); font-size: 20px; letter-spacing: -.4px; }
.brand small {
  margin-top: 4px; color: var(--muted);
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px;
}
.brand-logo {
  width: 40px; height: 40px; display: block;
  border: 2px solid var(--ink); border-radius: 10px;
  background: var(--card);
}
.header-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.header-links a.plain {
  color: var(--ink); font-size: 14px; font-weight: 700;
  text-decoration: underline; text-underline-offset: 4px;
}

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  border: 2px solid var(--ink); border-radius: 9px;
  font-weight: 800; text-decoration: none;
  color: var(--on-accent); background: var(--accent-ink);
  box-shadow: var(--hard);
}
.button.secondary { color: var(--ink); background: var(--card); }
.button:active { transform: translate(2px, 2px); box-shadow: none; }

/* --- the guide itself ----------------------------------------------------- */

.wrap { padding: 40px 0 8px; }

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px; font-weight: 850; color: var(--accent-ink);
  text-transform: uppercase; letter-spacing: 1.8px;
}
h1 {
  margin: 0 0 12px;
  font: 700 clamp(38px, 5vw, 58px)/1.02 var(--serif);
  letter-spacing: -1.8px; text-wrap: balance;
}
.lede { margin: 0 0 8px; max-width: 62ch; color: var(--muted); font: 20px/1.5 var(--serif); }

section { padding: 34px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }
h2 {
  margin: 0 0 14px;
  font: 700 clamp(25px, 3vw, 33px)/1.12 var(--serif);
  letter-spacing: -.8px; text-wrap: balance;
}
h3 { margin: 26px 0 8px; font: 700 20px/1.25 var(--serif); }
p { margin: 0 0 14px; max-width: 68ch; }
p, li { color: var(--muted); }
strong { color: var(--ink); }
ul, ol { margin: 0 0 14px; padding-left: 22px; max-width: 68ch; }
li { margin-bottom: 7px; }
li::marker { color: var(--accent-ink); font-weight: 700; }

/* Quick facts — the four things someone checks before reading anything. */
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px; margin: 0 0 6px;
  border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--line); overflow: hidden;
  box-shadow: var(--hard);
}
.facts > div { padding: 16px 18px; background: var(--card); }
.facts dt {
  margin-bottom: 4px; color: var(--muted);
  font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: 1.3px;
}
/* The app's hostname is the longest thing that ever lands in one of these
   cells, and it has no spaces to break at — without this it is clipped by the
   cell rather than wrapped. */
.facts dd {
  margin: 0; color: var(--ink);
  font-size: 15px; font-weight: 700; line-height: 1.4;
  overflow-wrap: anywhere;
}
.facts dd a { font-weight: 700; }
.facts code { font-family: var(--mono); font-size: 14px; }

/* A reference table of controls the app actually has. */
.ref { width: 100%; margin: 0 0 16px; border-collapse: collapse; font-size: 15px; }
.ref caption {
  margin-bottom: 8px; color: var(--muted); text-align: left;
  font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: 1.3px;
}
.ref th, .ref td {
  padding: 9px 12px; border: 1px solid var(--line);
  text-align: left; vertical-align: top; color: var(--muted);
}
.ref th {
  color: var(--ink); background: var(--paper-deep);
  font-weight: 800; white-space: nowrap;
}
.ref td:first-child { color: var(--ink); font-weight: 700; }
.table-scroll { overflow-x: auto; margin-bottom: 16px; }
.table-scroll .ref { margin-bottom: 0; min-width: 480px; }

/* A key on the page, quoted the way the app prints it. */
kbd {
  display: inline-block; padding: 1px 7px;
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px;
  background: var(--card); color: var(--ink);
  font-family: var(--mono); font-size: 13px; font-weight: 700;
}

.note {
  margin: 0 0 16px; padding: 18px 20px;
  border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--paper-deep);
  box-shadow: var(--hard);
}
.note > :last-child { margin-bottom: 0; }
.note p, .note li { color: var(--muted-deep); }
.note b { color: var(--ink); }

.shot { margin: 22px 0; }
.shot img {
  display: block; width: 100%;
  border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--hard);
}
.shot figcaption {
  margin-top: 9px; color: var(--muted);
  font-size: 13px; line-height: 1.5;
}

.cta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  margin: 8px 0 4px; padding: 26px 28px;
  border: 2px solid var(--ink); border-radius: 16px;
  background: var(--paper-deep);
  box-shadow: var(--hard);
}
.cta p { margin: 0; max-width: 46ch; color: var(--muted-deep); }
.cta h2 { margin: 0 0 6px; font-size: clamp(22px, 2.4vw, 28px); }

.site-footer {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  margin-top: 30px; padding: 22px 0;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12px;
}
.site-footer p { margin: 0; max-width: none; }
.site-footer > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.site-footer strong { color: var(--ink); }
.site-footer a { color: var(--muted); font-weight: 700; }
.site-footer a:hover { color: var(--ink); }

@media (max-width: 620px) {
  .site-header, .wrap, .site-footer { width: min(100% - 24px, 880px); }
  .site-header { padding: 14px 0; }
  h1 { font-size: 34px; letter-spacing: -1.2px; }
  .lede { font-size: 18px; }
  section { padding: 28px 0; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
