/* V0.7.1: SEC-only display controls. Source financial figures/text stay untouched. */
/* Keep normal app header on other tabs; hide only when reading an actual SEC filing. */
body.yanxi-comfort-reader .header { display: none !important; }
body.yanxi-comfort-reader .main { padding-top: 12px; }

/* The zoom previously changed body text only; include the SEC financial table text.
   Table structure, widths, currency strings and scroll behavior are unchanged. */
#page-reader .sec-document .sec-table-scroll table,
#page-reader .sec-document .sec-table-scroll :is(th, td),
#page-reader .sec-document .sec-table-scroll :is(th, td) :is(div, p, span, font, b, strong, em, i, a) {
  font-size: clamp(16px, var(--yanxi-reading-size, 18px), 24px) !important;
  line-height: 1.55 !important;
}
#page-reader .sec-document .sec-table-scroll :is(th, td) sup,
#page-reader .sec-document .sec-table-scroll :is(th, td) sub {
  font-size: 0.72em !important;
}

/* One small always-available toggle. Existing A-/A+ and Contents buttons
   are hidden until the reader explicitly opens the tool tray. */
#yanxi-comfort-toggle { display: none; }
body.yanxi-comfort-reader #yanxi-comfort-toggle {
  display: block; position: fixed; z-index: 33;
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(83px + env(safe-area-inset-bottom));
  background: #176b5b; color: white; border: 1px solid #ffffff50;
  border-radius: 24px; box-shadow: 0 3px 12px #1a4d404d;
  font: 700 14px/1.4 system-ui, sans-serif;
  padding: 9px 15px; min-height: 43px;
}
body.yanxi-comfort-reader .yanxi-rtools .yanxi-font-buttons,
body.yanxi-comfort-reader #yanxi-reader-shortcut {
  display: none !important;
}
body.yanxi-comfort-reader.yanxi-comfort-open #page-reader.view.active .yanxi-rtools .yanxi-font-buttons {
  display: flex !important; position: fixed !important; z-index: 32 !important;
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(138px + env(safe-area-inset-bottom));
  align-items: center; gap: 8px; padding: 6px;
  background: #f8fcfa; border: 1px solid #cfe4d9;
  border-radius: 12px; box-shadow: 0 4px 18px #15392c40;
}
body.yanxi-comfort-reader.yanxi-comfort-open #yanxi-reader-shortcut {
  display: block !important; position: fixed !important; z-index: 32 !important;
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(204px + env(safe-area-inset-bottom));
  padding: 9px 14px; background: #176b5b; color: white;
  border-radius: 24px; border: 1px solid #ffffff50;
  box-shadow: 0 4px 14px #15392c40;
}
