/* Research explorer theme and mobile layouts.
 * Exports: explorer overrides. Deps: styles.css and pool table markup. */
:root {
  --bg: #101513; --bg-card: #18201c; --bg-card-hover: #202c25;
  --border: #35453c; --border-light: #667c6e; --text: #e7ece8; --muted: #a2afa6;
  --mint: #86e7b8; --pink: #ffa099; --yellow: #e6d48b;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f5f4ee; --bg-card: #eaece4; --bg-card-hover: #e0e5db;
  --border: #b7c1b5; --border-light: #6f8274; --text: #202b24; --muted: #59655d;
  --mint: #17633f; --pink: #a32f28; --yellow: #705814;
  color-scheme: light;
}
body { font-family: var(--font-sans); padding: 32px; max-width: 1500px; margin: auto; }
.header-title h1 { color: var(--text); font-size: 28px; letter-spacing: -.04em; }
.header-badges a { display: inline-flex; align-items: center; min-height: 44px; }
.chain-tag { background: var(--bg-card); border: 0; padding-left: 0; color: var(--muted); }
.summary-strip { gap: 0; border-bottom: 1px solid var(--border); }
.summary-card { background: none; border: 0; border-right: 1px solid var(--border); border-radius: 0; padding: 0 24px 20px; }
.summary-card:first-child { padding-left: 0; }
.summary-card:last-child { border: 0; }
.summary-label { text-transform: none; letter-spacing: 0; font-size: 13px; }
.summary-value { color: var(--text); font-family: var(--font-sans); font-size: 26px; letter-spacing: -.04em; }
.summary-sub { font-size: 12px; }
.toolbar { background: none; border: 0; border-radius: 0; padding: 0; }
.search-box { min-width: 0; flex-basis: 100%; }
.search-input, select, button { background: var(--bg); border-color: var(--border-light); min-height: 44px; border-radius: 5px; font: 14px var(--font-sans); }
.search-input { padding: 12px 14px; }
.search-input::placeholder { color: var(--muted); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
button.view-btn.active { background: var(--mint); color: var(--bg); border-color: var(--mint); font-weight: 600; }
button:disabled { opacity: .45; cursor: default; }
.filter-group { width: 100%; }
.fee-legend { max-width: 78ch; line-height: 1.7; }
.table-wrap { border-radius: 5px; }
th { background: var(--bg-card); color: var(--muted); font-size: 12px; cursor: default; }
td { border-bottom-color: var(--border); font-size: 12px; }
.mono-addr { color: var(--text); overflow-wrap: anywhere; }
.pool-open { padding: 0; border: 0; color: var(--mint); font: 12px var(--font-mono); text-align: left; background: none; }
.symbol-pill { background: transparent; padding: 0; color: var(--text); font-size: 12px; border: 0; }
.badge { font-size: 10px; border-radius: 3px; }
.pagination { padding-bottom: 20px; }
.modal-card { background: var(--bg); box-shadow: none; padding: 24px; border-radius: 10px; max-height: calc(100dvh - 40px); overscroll-behavior: contain; }
.modal-card > .modal-section:first-of-type { padding-right: 48px; }
.modal-close { position: sticky; display: block; margin: -12px -12px -44px auto; top: 0; right: 0; z-index: 2; width: 44px; height: 44px; padding: 0; color: var(--text); background: var(--bg-card); border: 1px solid var(--border); }
.modal-section h2, .modal-section h3 { color: var(--text) !important; }
.modal-section h3 { text-transform: none; letter-spacing: 0; font-size: 16px; }
.kv-grid, .live-probe-result, pre.code-block { background: var(--bg-card); border-color: var(--border); border-radius: 5px; }
.kv-grid { grid-template-columns: 130px minmax(0, 1fr); }
pre.code-block { color: var(--mint); }
#m-pool-id { word-break: break-all; }
#live-probe-output { overflow-wrap: anywhere; font-size: 14px; }
.modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.scroll-hint { display: none; color: var(--muted); font-size: 12px; margin: 8px 0; }
@media (max-width: 760px) {
  body { padding: 20px; }
  .header { margin-bottom: 20px; gap: 8px; }
  .header-title h1 { font-size: 25px; }
  .header-title p { font-size: 13px; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .summary-card { padding: 0 12px 16px 0; border: 0; min-width: 0; }
  .summary-card:nth-child(even) { padding-left: 12px; }
  .summary-value { font-size: 23px; overflow-wrap: anywhere; }
  .summary-label { font-size: 12px; }
  .summary-sub { font-size: 11px; }
  .filter-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view-toggle { grid-column: 1 / -1; display: flex; gap: 8px; }
  .view-toggle button { flex: 1; }
  select { width: 100%; min-width: 0; max-width: none !important; padding: 10px 6px; }
  .search-input, select { font-size: 16px; }
  .scroll-hint { display: block; }
  .table-wrap { width: 100%; }
  table { min-width: 840px; }
  .pagination { flex-direction: column; align-items: flex-start; }
  .pagination-controls { width: 100%; justify-content: space-between; }
  .modal-backdrop { padding: 10px; }
  .modal-card { padding: 20px 16px; max-height: calc(100dvh - 20px); }
  .kv-grid { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .kv-value { margin-bottom: 10px; }
  .modal-section h3 { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
