/* files-new DOCUMENT TYPOGRAPHY — how a rendered markdown file reads.

   Split out of styles.css, which sat at the repo's 1000-line-per-UI-source
   cap (tests/test_t235g_static.py) — the same per-feature sibling
   csv-preview.css already is. A real seam: everything here is the .fn-doc
   article's own typography, read by nothing else in the pane, and it is
   where the operator's measure rulings live. Loaded after styles.css so
   the page tokens below it still win where they overlap. */
/* T476: document reading typography (prototype .doc). Operator rulings 2026-09-19/20: the measure caps the
   PROSE, not the document — pre/table opt out and own the pane, so they scroll only when they truly exceed it.
   rem not ch, because `ch` resolves in each CHILD's font. ONE column, flush LEFT, no header gutter: centring
   broke the moment a child set the `margin` shorthand — h2/h3/blockquote below all do, so those three dropped to
   the pane border while p and ul stayed centred. Left-aligned, there is no offset left for a later rule to reset. */
#files-tab .fn-doc { --fn-measure: clamp(50rem, 72%, 64rem); max-width: none; margin: 0; overflow-wrap: anywhere; }
#files-tab .fn-doc > * { max-width: var(--fn-measure); } /* prose: measured, flush left */
#files-tab .fn-doc > :is(pre, table) { max-width: 100%; width: 100%; } /* not prose: the pane */
#files-tab :is(.fn-full-view, .fn-fullview) .fn-doc { --fn-measure: 100%; } /* ?view=full AND the expand button: whole pane */
#files-tab .fn-doc h1 { font-size: var(--text-xl, 22px); font-weight: 700; letter-spacing: -0.015em; margin-bottom: 4px; color: var(--ui-text); }
#files-tab .fn-doc h2 { font-size: var(--text-lg, 17px); font-weight: 650; margin: 22px 0 8px; color: var(--ui-text); }
#files-tab .fn-doc h3 { font-size: var(--text-md, 15px); font-weight: 650; margin: 18px 0 6px; color: var(--ui-text); }
#files-tab .fn-doc p { font-size: var(--text-base, 14px); color: var(--ui-text-soft); line-height: 1.65; margin-bottom: 12px; font-family: var(--font-ui); }
#files-tab .fn-doc strong { color: var(--ui-text); }
#files-tab .fn-doc code { font-family: var(--font-mono); font-size: 0.85em; background: var(--ui-hover); border-radius: 4px; padding: 1px 5px; }
#files-tab .fn-doc ul { margin: 0 0 12px; padding-inline-start: 58px; } /* indent as padding: the box keeps the column's left edge */
#files-tab .fn-doc li { font-size: var(--text-base, 14px); color: var(--ui-text-soft); line-height: 1.6; }
/* Round-16 (operator: some rendered markdown files scroll far left-right). Root cause:
   .fn-doc never styled <pre>/<table> (renderMarkdown's own sanitized output — marked.js +
   DOMPurify, static/runtime/markdown-shared.js) at all, so an unwrapped long code-block line
   or a wide table rendered at raw browser-default width and pushed .fn-preview-body's own
   scroll region wider, scrolling the WHOLE pane. Fix: the pane's ancestor never scrolls
   horizontally (#fn-preview-body below); a code block and a table each get their own
   overflow-x:auto container instead, so only THAT element scrolls, prose still just wraps.
   Note for whoever next touches the OLD page's shared .markdown-preview table rule
   (static/app-shell/overlays.css): it sets overflow-x:auto then a later overflow:hidden in
   the same declaration silently cancels it (the shorthand resets both axes) — a real,
   separate bug, left unfixed here since it's outside this page's own CSS and this round's
   scope, but worth flagging. */
#files-tab .fn-doc pre {
  overflow-x: auto; max-width: 100%; margin: 12px 0; padding: 12px 14px; border-radius: 8px;
  border: 1px solid var(--ui-line); background: var(--ui-hover);
}
#files-tab .fn-doc pre code { background: transparent; padding: 0; white-space: pre; }
#files-tab .fn-doc table {
  display: block; max-width: 100%; overflow-x: auto; margin: 12px 0;
  border-collapse: separate; border-spacing: 0; border: 1px solid var(--ui-line); border-radius: 8px;
}
#files-tab .fn-doc th, #files-tab .fn-doc td {
  padding: 7px 11px; text-align: left; font-size: var(--text-base, 14px);
  border-right: 1px solid var(--ui-line); border-bottom: 1px solid var(--ui-line); white-space: nowrap;
}
#files-tab .fn-doc th:last-child, #files-tab .fn-doc td:last-child { border-right: 0; }
#files-tab .fn-doc tr:last-child td { border-bottom: 0; }
#files-tab .fn-doc th { color: var(--ui-text); font-weight: 650; }
#files-tab .fn-doc blockquote {
  margin: 12px 0; padding-left: 12px; border-left: 3px solid var(--ui-line); color: var(--ui-muted);
}
#files-tab .fn-doc img { max-width: 100%; height: auto; }
#files-tab .fn-doc a { color: var(--ui-accent); }
