/* MissingManual public site.
   Brand tokens only: Leaf ground, Ink text, Graphite prose, Slate labels.
   Ochre is reserved for unverified claims and is deliberately unused here.
   No motion, no build step, no framework. */

:root {
  --leaf: #f7f5f0;
  --ink: #14161a;
  --graphite: #3a3d42;
  --slate: #63666c;
  --hair: rgba(20, 22, 26, 0.14);
  --wash: rgba(20, 22, 26, 0.045);
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--leaf);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 36px 96px;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ── masthead ── */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 40px 0 0;
}

.lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.028em;
}

.lockup svg {
  display: block;
  width: 17px;
  height: auto;
  fill: var(--ink);
}

nav {
  display: flex;
  gap: 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── prose ── */

h1 {
  font-size: clamp(42px, 6.4vw, 68px);
  font-weight: 600;
  letter-spacing: -0.033em;
  line-height: 1.03;
  margin: 68px 0 0;
  max-width: 18ch;
}

main > .label:first-child {
  margin-top: 68px;
  margin-bottom: 16px;
}

main > .label:first-child + h1 {
  margin-top: 0;
}

h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin: 0 0 12px;
}

h3 {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--graphite);
  margin-top: 24px;
  max-width: 56ch;
}

p {
  max-width: 68ch;
  margin-top: 16px;
}

.hero-art {
  margin: 40px 0 52px;
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--hair);
}

.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 14px;
}

.rule {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
  max-width: 46ch;
  border-left: 3px solid var(--ink);
  padding-left: 20px;
  margin: 40px 0;
}

section {
  padding: 44px 0 0;
  border-top: 1px solid var(--hair);
  margin-top: 52px;
}

.showcase {
  max-width: none;
}

.showcase > p:not(.label) {
  max-width: 64ch;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.example-card {
  border: 1px solid var(--hair);
  padding: 24px;
  min-width: 0;
}

.example-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin-top: 8px;
}

.example-card p {
  font-size: 16px;
}

.example-card .example-kind {
  color: var(--slate);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-top: 0;
  text-transform: uppercase;
}

.example-card a {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  margin-top: 18px;
}

.showcase-link {
  font-family: var(--mono);
  font-size: 13px;
  margin-top: 22px;
}

.sample-note {
  border-left: 3px solid var(--ink);
  color: var(--graphite);
  padding-left: 18px;
}

.sample-meta {
  color: var(--slate);
  font-family: var(--mono);
  font-size: 12px;
}

@media (max-width: 700px) {
  .page {
    padding-left: 22px;
    padding-right: 22px;
  }

  .example-grid {
    grid-template-columns: 1fr;
  }
}

ul {
  margin-top: 16px;
  padding-left: 20px;
  max-width: 68ch;
}

li {
  margin-top: 8px;
}

/* ── code ── */

code {
  font-family: var(--mono);
  font-size: 0.88em;
}

pre {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  background: var(--wash);
  border: 1px solid var(--hair);
  border-radius: 3px;
  padding: 16px 18px;
  overflow-x: auto;
  margin-top: 18px;
}

pre .c {
  color: var(--slate);
}

/* ── tables ── */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  margin-top: 22px;
}

th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}

td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
}

td:last-child,
th:last-child {
  padding-right: 0;
}

td.num {
  font-family: var(--mono);
  font-size: 14px;
  white-space: nowrap;
}

/* ── footer ── */

footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 2;
  color: var(--slate);
}

footer a {
  color: var(--slate);
}

/* Static onboarding: readable prompts and small-screen receipt tables. */
main > h2 { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--hair); }
main > h1 + p { font-size: 20px; color: var(--graphite); margin-top: 24px; }
blockquote { margin-top: 24px; padding: 20px; border-left: 3px solid var(--ink); background: var(--wash); overflow-wrap: anywhere; }
ol { margin-top: 16px; padding-left: 24px; }
p, li, td { overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; }
.prompt-shell { position: relative; max-width: 68ch; }
.prompt-shell blockquote { padding-right: 64px; }
.copy-prompt { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; display: grid; place-items: center; color: var(--ink); background: color-mix(in srgb, var(--leaf) 92%, transparent); border: 1px solid var(--hair); border-radius: 3px; cursor: pointer; }
.copy-prompt:hover { background: var(--leaf); border-color: var(--slate); }
.copy-prompt svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.copy-prompt[data-copied="true"] { background: var(--ink); color: var(--leaf); }
blockquote > :first-child { margin-top: 0; }
pre code { font-size: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Full research reports retain wide tables and code without widening prose. */
.report-page { max-width: 1180px; }
.report-label { margin-top: 68px; }
.report { max-width: 860px; }
.report h1 { max-width: 22ch; margin-top: 16px; }
.report h2 { margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--hair); }
.report h3 { margin-top: 32px; font-size: 15px; }
.report h4 { margin-top: 24px; font-family: var(--mono); font-size: 13px; }
.report ul, .report ol { margin-top: 16px; padding-left: 26px; }
.report li + li { margin-top: 8px; }
.report pre { max-width: 100%; overflow-x: auto; margin-top: 20px; padding: 18px; border: 1px solid var(--hair); background: var(--wash); font: 13px/1.55 var(--mono); }
.report code { font-family: var(--mono); font-size: 0.86em; }
.report :not(pre) > code { padding: 0.1em 0.3em; background: var(--wash); }
.report table { display: block; width: 100%; overflow-x: auto; margin-top: 24px; border-collapse: collapse; }
.report img { max-width: 100%; height: auto; }
.report-nav { display: flex; justify-content: space-between; gap: 24px; max-width: 860px; margin-top: 56px; padding-top: 24px; border-top: 2px solid var(--ink); text-transform: none; letter-spacing: 0; }
.library-page { max-width: 1120px; }
.library { max-width: 900px; }
.library h1 { max-width: 18ch; }
.library h2 { margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--hair); }

/* Code blocks carry their own copy control; the shell stays put while the code scrolls. */
.copy-shell { position: relative; }
main > .copy-shell { max-width: 68ch; }
.copy-shell > pre { padding-right: 56px; }
.copy-shell > .copy-prompt { top: 12px; right: 12px; width: 32px; height: 32px; }
.copy-shell > .copy-prompt svg { width: 16px; height: 16px; }
