/* Shared chrome for document pages (/bespoke, /security). Builds on styles.css
   tokens; each page then brings its own layout stylesheet. See DESIGN.md. */

.doc { overflow-x: hidden; cursor: auto; }
.doc-main { display: block; }

/* ---------- Masthead ---------- */

.doc-masthead {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(14px, 2.2vh, 22px) clamp(18px, 4vw, 44px);
  z-index: var(--z-chrome);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.doc-masthead .wordmark { pointer-events: auto; text-decoration: none; color: var(--ink); }
.doc-tag {
  font-family: var(--grot);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Dust heading ----------
   js/doc.js replaces the text with a canvas and keeps the words in .sr-only. */

.dtext {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.06;
  position: relative;
}
h1.dtext { font-size: clamp(46px, 8vw, 104px); }

.dtext.mounted { line-height: 0; }
.dtext canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.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;
}

/* ---------- Shared type ---------- */

.label {
  font-family: var(--grot);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.prose p {
  font-family: var(--serif);
  font-size: clamp(17px, 1.2vw, 19px);
  line-height: 1.62;
  color: color-mix(in oklch, var(--ink) 88%, var(--bg));
  max-width: 60ch;
  text-wrap: pretty;
}
.prose p + p { margin-top: 1em; }

.note {
  font-family: var(--grot);
  font-size: clamp(15px, 1.1vw, 16px);
  line-height: 1.6;
  color: var(--muted);
  max-width: 62ch;
}

.plain {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.plain li {
  font-family: var(--grot);
  font-size: 15px;
  line-height: 1.5;
  color: color-mix(in oklch, var(--ink) 84%, var(--bg));
  padding-left: 18px;
  position: relative;
}
.plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 1px;
  background: color-mix(in oklch, var(--ink) 45%, var(--bg));
}

.rule { border: 0; border-top: 1px solid var(--faint); }

.wrap {
  width: min(1120px, 90vw);
  margin: 0 auto;
}

/* ---------- Print ---------- */

@media print {
  .doc-masthead { position: static; mix-blend-mode: normal; padding: 0 0 24px; }
  .dtext canvas { display: none; }
  .dtext.mounted { line-height: 1.06; height: auto !important; }
  .dtext .sr-only {
    position: static; width: auto; height: auto;
    margin: 0; clip: auto; white-space: normal;
  }
}
