/* RTF Viewer Online (TOOLCHK3, wave18): toolbar, outline and the document page. The document rules come from the RTF
   Viewer extension's viewer.css (MIT). Every rule is scoped under .rtfv. */
.rtfv .rtbar { gap: 8px 16px; }
.rtfv .grp { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.rtfv .grp button { padding: 4px 9px; }
.rtfv .grp label { font-size: 13px; color: var(--mut); margin-left: 4px; }
.rtfv select, .rtfv input[type=search] { font: inherit; font-size: 14px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }
.rtfv input[type=search] { width: 190px; }
.rtfv #notes { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin: 6px 0; background: var(--panel); }
.rtfv #notes div { margin: 2px 0; }
.rtfv .rtgrid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; align-items: start; margin: 8px 0; }
.rtfv .rtside { max-height: 76vh; }
.rtfv #outline a { display: block; padding: 3px 4px; color: var(--fg); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 4px; }
.rtfv #outline a:hover, .rtfv #outline a:focus-visible { background: var(--sel); outline: none; }
.rtfv #fonts { margin: 0; padding-left: 18px; }
.rtfv #fonts li { word-break: break-word; }
.rtfv .rtscroll { height: 76vh; min-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); outline: none; }
.rtfv .rtscroll:focus-visible { border-color: var(--acc); }
/* the document */
.rtfv .doc { font-family: "Times New Roman", Times, serif; font-size: 12pt; line-height: 1.15; box-sizing: content-box; overflow-wrap: break-word; color: #000; background: #fff; }
.rtfv .doc p { margin: 0; min-height: 1em; }
.rtfv .doc .tab { display: inline-block; min-width: 2.5em; white-space: pre; }
.rtfv .doc table.t { border-collapse: collapse; table-layout: fixed; max-width: none; }
.rtfv .doc table.t td { padding: 1px 7.2px; vertical-align: top; overflow-wrap: break-word; }
.rtfv .doc table.t td.sp { border: none; }
.rtfv .doc .nest { border-left: 2px solid rgba(128,128,128,.4); padding-left: 4px; margin: 2px 0; }
.rtfv .doc .nest .nc { display: inline-block; padding: 0 6px; border-right: 1px solid rgba(128,128,128,.4); }
.rtfv .doc img.pic { max-width: 100%; height: auto; vertical-align: bottom; object-fit: contain; }
.rtfv .doc .ph, .rtfv .doc .obj { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 6px 10px; margin: 2px 0; border: 1px dashed #888; background: rgba(128,128,128,.12); color: #555; font: 12px/1.3 system-ui, sans-serif; text-indent: 0; max-width: 100%; vertical-align: middle; }
.rtfv .doc .obj { border-style: solid; }
.rtfv .doc a.lnk { color: #0563c1; text-decoration: underline; }
.rtfv .doc .lnk-off { text-decoration: underline dotted; cursor: not-allowed; }
.rtfv .doc sup.fnref a { cursor: pointer; text-decoration: none; color: inherit; }
.rtfv .doc .hf { font-size: 10pt; opacity: .85; }
.rtfv .doc .hf.hdr { padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px dashed rgba(128,128,128,.35); }
.rtfv .doc .hf.ftr { padding-top: 8px; margin-top: 10px; border-top: 1px dashed rgba(128,128,128,.35); }
.rtfv .doc #fns:not(:empty) { margin-top: 24px; padding-top: 8px; border-top: 1px solid rgba(128,128,128,.5); font-size: 10pt; }
.rtfv .doc .fnhead { font-weight: bold; margin-bottom: 4px; }
.rtfv .doc .fnote { display: flex; gap: 6px; margin-bottom: 4px; }
.rtfv .doc .fnote .fnn { min-width: 1.5em; font-weight: bold; }
.rtfv mark.hit { background: rgba(255, 200, 0, .55); color: inherit; border-radius: 2px; }
.rtfv mark.hit.cur { background: rgba(255, 140, 0, .95); outline: 1px solid #d47500; }
/* Page view: a sheet with the document's width and margins; page breaks show as a gap between sheets */
.rtfv.v-page #paper { margin: 20px auto; box-shadow: 0 1px 6px rgba(0,0,0,.3); }
.rtfv.v-page .doc .pb { height: 22px; margin: var(--mb, 72px) calc(-1 * var(--mr, 96px)) var(--mt, 72px) calc(-1 * var(--ml, 96px)); background: var(--panel); box-shadow: inset 0 6px 6px -6px rgba(0,0,0,.4), inset 0 -6px 6px -6px rgba(0,0,0,.4); }
.rtfv.v-flow #paper { padding: 16px 24px; }
.rtfv.v-flow .doc .pb { border-top: 1px dashed rgba(128,128,128,.5); margin: 16px 0; }
/* Dark paper: the page's own colors are adjusted by app.js (dark text lightened, light shading darkened) */
.rtfv.p-dark .doc { background: #1e2228; color: #e6e9ee; }
.rtfv.p-dark .doc a.lnk { color: #7ab4ff; }
.rtfv.p-dark .doc .ph, .rtfv.p-dark .doc .obj { color: #aab3bf; }
@media (max-width: 900px) { .rtfv .rtgrid { grid-template-columns: 1fr; } .rtfv .rtside { max-height: 220px; } .rtfv .rtscroll { height: 70vh; } }
.rtfv [hidden] { display: none !important; }
