/* The legal documents shown inside the account area (lib/docview.js, 29 Oct 2026).
   Drawn like the app's legal screen (app/legal.tsx) with the account area's own pieces:
   the "‹ Back" control and centred title of .am-ehdr, a .card, the colour tokens (so
   light and dark both work). It sits over the whole screen; the screen underneath is
   left exactly as it was. */
html.dv-open { overflow: hidden; }
.dv {
  position: fixed; inset: 0; z-index: 8000;
  background: var(--bg); color: var(--ink);
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);
}
.dv-in { max-width: 820px; margin: 0 auto; padding: 16px 16px 56px; }
@media (min-width: 1000px) { .dv-in { padding: 24px 24px 72px; } }
.dv-hdr { position: sticky; top: 0; z-index: 1; background: var(--bg); margin: -16px -16px 12px; padding: 12px 16px; }
@media (min-width: 1000px) { .dv-hdr { margin: -24px -24px 16px; padding: 16px 24px; } }
.dv-hdr { grid-template-columns: 84px minmax(0, 1fr) 84px; }   /* a long title is cut with "…" (like the app), never under Back */
.dv-hdr h1.dv-title { font-size: 18px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-hdr .dv-back { min-height: 44px; }

/* the document text — the app's legal text is 14px on 21px, ink */
.dv-doc { padding: 20px; border-radius: 16px; font-size: 14px; line-height: 21px; color: var(--ink); overflow-wrap: break-word; }
@media (min-width: 1000px) { .dv-doc { padding: 28px 32px; font-size: 15px; line-height: 1.6; } }
.dv-doc .dv-updated { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); }
.dv-doc h2 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 24px 0 6px; letter-spacing: 0; }
.dv-doc .dv-updated + h2, .dv-doc h2:first-child { margin-top: 0; }
.dv-doc h3 { font-size: 14.5px; font-weight: 700; color: var(--ink); margin: 16px 0 4px; }
.dv-doc p { margin: 0 0 12px; }
.dv-doc ul, .dv-doc ol { margin: 0 0 12px; padding-left: 20px; }
.dv-doc li { margin-bottom: 6px; }
.dv-doc b, .dv-doc strong { color: var(--ink); }
.dv-doc a { color: var(--blue); font-weight: 600; text-decoration: none; }
.dv-doc a:hover { text-decoration: underline; }
.dv-doc table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 13px; line-height: 1.45; display: block; overflow-x: auto; }
.dv-doc th, .dv-doc td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.dv-doc th { background: var(--grey-bg); font-weight: 700; color: var(--ink); }
.dv-doc .callout { background: var(--red-bg); border-left: 4px solid var(--accent); border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; }
.dv-doc .loading { color: var(--muted); }
