/* Shared styles for /how and /transparency (no inline styles allowed by CSP). */
.doc { max-width: 680px; margin: 0 auto; }
.doc h1 { margin-bottom: 10px; }
.doc h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 34px 0 8px; letter-spacing: -0.01em; }
.doc p, .doc li { font-size: 16px; line-height: 1.65; color: var(--text); margin: 0 0 12px; }
.doc ul { padding-inline-start: 20px; margin: 0 0 12px; }
.doc .lede { color: var(--dim); }
.doc .promise { font-family: var(--serif); font-size: 21px; line-height: 1.4; padding: 18px 20px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-2); margin: 0 0 8px; }
.doc a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.doc a:hover { text-decoration-color: var(--text); }
.doc .diagram { margin: 16px 0 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); color: var(--text); }
.doc .diagram svg { display: block; width: 100%; height: auto; }
.doc .diagram .box { fill: var(--panel); stroke: var(--line-2); stroke-width: 1.5; }
.doc .diagram .box-noise { fill: var(--bg); stroke: var(--dim); stroke-width: 1.5; stroke-dasharray: 5 4; }
.doc .diagram .lbl { fill: currentColor; font-family: var(--sans); font-size: 15px; font-weight: 600; text-anchor: middle; }
.doc .diagram .sub { fill: var(--dim); font-family: var(--sans); font-size: 12px; text-anchor: middle; }
.doc .diagram .flow { stroke: var(--dim); stroke-width: 2; fill: none; }
.doc .diagram .keyflow { stroke: currentColor; stroke-width: 2; fill: none; stroke-dasharray: 2 5; stroke-linecap: round; }
.doc .diagram .arrowhead { fill: var(--dim); }
.doc .diagram .keyhead { fill: currentColor; }
.doc .caption { font-size: 14px; color: var(--dim); }
.doc .template { border: 2px dashed var(--warn); border-radius: var(--radius); padding: 18px 20px; background: var(--bg-2); margin: 12px 0; }
.doc .template .flag { display: inline-block; font-size: 13px; font-weight: 600; color: var(--warn); border: 1px solid var(--warn); border-radius: 999px; padding: 2px 12px; margin-bottom: 12px; }
.doc .template p:last-child { margin-bottom: 0; }
.doc .nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 36px 0 20px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 480px) { .doc .promise { font-size: 19px; padding: 16px; } .doc .template { padding: 14px; } }

/* Diagram: wide version on bigger screens, stacked version on phones (labels stay readable). */
.doc .diagram .dg-tall { display: none; }
@media (max-width: 520px) {
  .doc .diagram .dg-wide { display: none; }
  .doc .diagram .dg-tall { display: block; max-width: 340px; margin: 0 auto; }
  .doc h2 { font-size: 20px; }
  .doc .promise { font-size: 19px; padding: 14px 16px; }
}
