/* BurnLedger docs — Read-mode layer over styles.css. Same flat-plane world:
   paper ground, four inks, zero radius, no shadows, mono for machine values only. */

.doc { padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 4.5rem); }
.doc__inner { max-width: 76ch; }
.doc h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.03em; line-height: 1.02; margin-bottom: 1rem; }
.doc__lead { font-size: clamp(1rem, 1.35vw, 1.12rem); color: var(--ink-soft); max-width: 56ch; margin-bottom: clamp(2rem, 4vw, 2.75rem); }
.doc h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); letter-spacing: -.03em; margin: clamp(2.2rem, 4vw, 2.9rem) 0 .8rem; }
.doc h3 { font-size: 1.12rem; margin: 1.8rem 0 .5rem; }
.doc p, .doc li { font-size: 1.0325rem; line-height: 1.6; color: #423B30; max-width: 68ch; }
.doc p { margin-bottom: .9rem; }
.doc ol, .doc ul { margin: 0 0 1rem 1.25rem; }
.doc li { margin-bottom: .35rem; }
.doc li::marker { color: var(--ink); font-weight: 700; }

.doc a { color: var(--ink); font-weight: 600; text-decoration: none; box-shadow: inset 0 -2px 0 var(--ink); }
.doc a:hover, .doc a:focus-visible { color: var(--vermilion); box-shadow: inset 0 -2px 0 var(--vermilion); }

.doc code { font-family: var(--font-mono); font-size: .86em; letter-spacing: -.02em; background: var(--paper-2); padding: .08em .35em; }
.doc pre { background: var(--ink); color: var(--paper); padding: 1.1rem 1.25rem; overflow-x: auto; margin: .9rem 0 1.2rem; }
/* Code lines often exceed a phone viewport; keep the scrollbar visible so the clipping is discoverable. */
.doc pre { scrollbar-width: thin; scrollbar-color: var(--paper) var(--ink); }
.doc pre::-webkit-scrollbar { height: 8px; }
.doc pre::-webkit-scrollbar-thumb { background: var(--paper); }
/* Phone widths hide the scrollbar until touched, so add a right-edge fade behind the text.
   Two stacked backgrounds: a paper-tinted fade fixed to the box (attachment: scroll) and an
   ink cover that travels with the content (attachment: local) and slides over the fade once
   the reader reaches the end. No wrapper markup and overflow-x stays auto. */
@media (max-width: 400px) {
  .doc pre { background: linear-gradient(to left, var(--ink) 2.5rem, transparent 4rem) right / 100% 100% no-repeat local, linear-gradient(to left, rgba(242,236,222,.28), transparent 2.5rem) right / 100% 100% no-repeat scroll, var(--ink); }
}
.doc pre code { background: none; padding: 0; color: inherit; font-size: .88rem; line-height: 1.6; }
/* Inline code (URLs, SQL fragments) can be longer than a phone is wide. */
.doc p code, .doc li code, .doc td code { overflow-wrap: anywhere; }

/* Authored SVG diagrams. Explicit width/height on the <img> reserve the box before load (no CLS);
   the figure just keeps it inside the column. */
.doc-figure { margin: 1rem 0 1.4rem; max-width: 720px; }
.doc-figure img { display: block; width: 100%; height: auto; }
.doc-figure figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: .6rem; max-width: 68ch; }

.doc-note { background: var(--paper-2); padding: 1rem 1.25rem; margin: 1rem 0 1.2rem; max-width: 68ch; }
.doc-note p { margin: 0; }
.doc-note p + p { margin-top: .5rem; }

.doc-table { border-collapse: collapse; margin: 1rem 0 1.2rem; width: 100%; max-width: 68ch; border: 2px solid var(--ink); }
.doc-table th { font-family: var(--font-body); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; text-align: left; padding: .55rem .8rem; border-bottom: 2px solid var(--ink); }
.doc-table td { padding: .55rem .8rem; border-top: 1px solid rgba(20,17,14,.18); font-size: .95rem; color: #423B30; vertical-align: top; }
.doc-table td:first-child { font-family: var(--font-mono); font-size: .85rem; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.doc-table--plainfirst td:first-child { font-family: var(--font-body); font-size: .95rem; white-space: normal; }

/* Language switch: one control flips every snippet on the page */
.doc-langs { display: inline-flex; border: 2px solid var(--ink); margin: .2rem 0 1rem; }
.doc-lang { font-family: var(--font-body); font-size: .9rem; font-weight: 700; padding: .45rem .95rem; background: transparent; color: var(--ink); border: 0; cursor: pointer; }
.doc-lang.is-active { background: var(--ink); color: var(--paper); }
body[data-lang="ts"] .only-py { display: none; }
body[data-lang="py"] .only-ts { display: none; }

/* Docs table of contents (index page) */
.doc-toc { border-top: 2px solid var(--ink); max-width: 68ch; margin-top: .5rem; }
.doc-toc a { display: block; padding: 1.1rem 0; border-bottom: 1px solid rgba(20,17,14,.18); box-shadow: none; }
.doc-toc__t { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; color: var(--ink); }
.doc-toc a:hover .doc-toc__t, .doc-toc a:focus-visible .doc-toc__t { color: var(--vermilion); }
.doc-toc__d { display: block; color: var(--ink-soft); font-size: .98rem; margin-top: .2rem; max-width: 60ch; }

.doc-foot { border-top: 1px solid rgba(20,17,14,.25); margin-top: clamp(2.5rem, 5vw, 4rem); padding: 1.2rem 0 2.5rem; display: flex; flex-wrap: wrap; gap: .9rem 1.4rem; justify-content: space-between; align-items: baseline; font-size: .95rem; color: var(--ink-soft); }
.doc-foot a { color: var(--ink); font-weight: 600; text-decoration: none; }
.doc-foot a:hover, .doc-foot a:focus-visible { color: var(--vermilion); }
.doc-foot .mono { font-size: .85rem; }

/* Rendered guide pages: markdown emits bare table/blockquote/hr */
.doc article table:not(.doc-table) { border-collapse: collapse; margin: 1rem 0 1.2rem; border: 2px solid var(--ink); display: block; overflow-x: auto; max-width: 100%; width: fit-content; }
.doc article table:not(.doc-table) th { font-family: var(--font-body); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; text-align: left; padding: .55rem .8rem; border-bottom: 2px solid var(--ink); }
.doc article table:not(.doc-table) td { padding: .55rem .8rem; border-top: 1px solid rgba(20,17,14,.18); font-size: .95rem; color: #423B30; vertical-align: top; }
.doc blockquote { background: var(--paper-2); padding: 1rem 1.25rem; margin: 1rem 0 1.2rem; max-width: 68ch; }
.doc blockquote p { margin: 0; }
.doc blockquote p + p { margin-top: .5rem; }
.doc hr { border: 0; border-top: 1px solid rgba(20,17,14,.25); margin: clamp(2rem, 4vw, 2.8rem) 0; max-width: 68ch; }
.doc article h4 { font-size: 1rem; margin: 1.4rem 0 .4rem; }
.doc-otp { background: var(--paper-2); padding: 1rem 1.25rem; margin: 1.2rem 0 1.6rem; max-width: 68ch; }
.doc-otp ul { margin: 0 0 0 1.1rem; }
.doc-otp li { margin-bottom: .25rem; font-size: .98rem; }

@media (max-width: 560px) {
  .doc-table td:first-child { white-space: normal; }
}

/* ---- Contact form -------------------------------------------------------
   Lives in docs.css because the only page that uses it is a .doc page. Flat
   planes and 2px ink rules, same vocabulary as the doc tables above. */
.cform { margin: 1.6rem 0 2.4rem; }
.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.cform__field { display: block; margin-bottom: 1rem; }
.cform__row .cform__field { margin-bottom: 0; }
.cform__label { display: block; font-family: var(--font-body); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); margin-bottom: .4rem; }
.cform__opt { font-weight: 500; text-transform: none; letter-spacing: 0; color: #6B6252; }
.cform input[type="text"],
.cform input[type="email"],
.cform select,
.cform textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  background: #fff; border: 2px solid var(--ink); border-radius: 0;
  padding: .7rem .85rem; -webkit-appearance: none; appearance: none;
  transition: box-shadow .15s var(--e-out), border-color .15s var(--e-out);
}
.cform textarea { resize: vertical; min-height: 8rem; line-height: 1.55; }
.cform select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 1.15rem) 55%, calc(100% - .8rem) 55%; background-size: .38rem .38rem, .38rem .38rem; background-repeat: no-repeat; padding-right: 2.4rem; }
.cform input:focus-visible,
.cform select:focus-visible,
.cform textarea:focus-visible { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(36,64,142,.24); }
.cform ::placeholder { color: #8B8272; }

/* The honeypot must be unreachable by people and invisible to assistive tech,
   without display:none — some bots skip hidden fields, which defeats it. */
.cform__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cform__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.2rem; margin-top: 1.2rem; }
.cform__actions .btn { flex: 0 0 auto; }
.cform__note { margin: 0; font-size: .88rem; color: #6B6252; flex: 1 1 16rem; }
.cform__status { margin: 1rem 0 0; font-size: .95rem; padding: .75rem .9rem; border-left: 4px solid transparent; }
.cform__status:empty { display: none; }
.cform__status.is-pending { background: var(--paper-2); border-left-color: #A79E8A; color: #423B30; }
.cform__status.is-ok { background: var(--paper-2); border-left-color: var(--indigo); color: var(--ink); }
.cform__status.is-error { background: #FBEAE6; border-left-color: var(--vermilion); color: #6E1D0E; }
.cform__status a { text-decoration: underline; }

@media (max-width: 640px) {
  .cform__row { grid-template-columns: 1fr; }
  .cform__actions .btn { width: 100%; }
}

/* ---- Verifiable Deletion Addendum ----------------------------------------
   The clause is meant to be read by a lawyer and pasted into an agreement, so
   it is set apart as a document-within-a-document: bordered, indented sub-
   paragraphs, and enough left padding that the numbering reads as structure. */
.adm__note, .adm__disclose {
  padding: 1rem 1.15rem; margin: 1.4rem 0; font-size: .98rem;
  background: var(--paper-2); border-left: 3px solid var(--vermilion);
}
.adm__disclose { border-left-color: var(--indigo); }
.adm__note p, .adm__disclose p { margin: 0; }
.adm__clause {
  border: 2px solid var(--ink); padding: 1.5rem 1.6rem; margin: 1.2rem 0 1rem;
  background: #fff;
}
.adm__clause h3 {
  font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 1rem;
  padding-bottom: .6rem; border-bottom: 1px solid rgba(20,17,14,.18);
}
.adm__clause p { margin: 0 0 .85rem; font-size: .97rem; line-height: 1.6; }
.adm__clause p:last-child { margin-bottom: 0; }
.adm__sub { padding-left: 1.6rem; }
.adm__actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem;
  margin: 0 0 2rem;
}
.adm__copied { font-size: .9rem; color: var(--ink-soft); }
.adm__copied:empty { display: none; }
@media (max-width: 560px) { .adm__sub { padding-left: .8rem; } }

/* Reference tables are wider than a phone; scroll them in place rather than the whole page. */
@media (max-width: 720px) {
  .doc-table { display: block; overflow-x: auto; max-width: 100%; }
}
.doc-related { background: var(--paper-2); padding: 1rem 1.25rem; margin-top: clamp(2rem, 4vw, 3rem); max-width: 68ch; }
.doc-related h2 { margin: 0 0 .25rem; font-size: 1.1rem; }
.doc-related p { margin: 0 0 .6rem; font-size: .9rem; color: var(--ink-soft); }
.doc-related ul { margin: 0 0 0 1.1rem; }
.doc-related li { margin-bottom: .25rem; font-size: .98rem; }
