/* Homer — liquidity infrastructure on Elysium.
   Warm parchment, Aegean blue, serif display type. */

@font-face {
  font-family: 'Fraunces';
  src: url('/fraunces-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f3ec;
  --bg-2: #efeadf;
  --panel: #fffdf8;
  --panel-2: #f8f4ea;
  --line: #e7e0d1;
  --line-2: #d8cfbc;
  --text: #1c1b18;
  --dim: #6d675b;
  --faint: #a29a88;
  --accent: #1f4fd6;
  --accent-2: #173db0;
  --accent-soft: rgba(31, 79, 214, .09);
  --on-accent: #ffffff;
  --up: #17855a;
  --up-soft: rgba(23, 133, 90, .1);
  --down: #c2412b;
  --down-soft: rgba(194, 65, 43, .09);
  --warn: #a96d0c;
  --warn-soft: rgba(169, 109, 12, .11);
  --info: #1f4fd6;
  --gold: #b08a3e;
  --logo-gold: #d6a13a;
  --shadow-sm: 0 1px 0 rgba(60, 50, 30, .04), 0 1px 2px rgba(60, 50, 30, .05);
  --shadow: 0 1px 0 rgba(60, 50, 30, .03), 0 12px 32px -14px rgba(60, 50, 30, .22);
  --radius: 16px;
  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --side: 248px;
  --rail: 76px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0b0f1c;
  --bg-2: #0f1424;
  --panel: #121829;
  --panel-2: #172036;
  --line: #222b44;
  --line-2: #2e3958;
  --text: #ecebe6;
  --dim: #a3a7b7;
  --faint: #6c7390;
  --accent: #7593ff;
  --accent-2: #5d7cf0;
  --accent-soft: rgba(117, 147, 255, .13);
  --on-accent: #0b0f1c;
  --up: #3fcf8e;
  --up-soft: rgba(63, 207, 142, .12);
  --down: #ff7a62;
  --down-soft: rgba(255, 122, 98, .12);
  --warn: #e7b24c;
  --warn-soft: rgba(231, 178, 76, .13);
  --info: #7593ff;
  --gold: #d6b26a;
  --logo-gold: #e2b354;
  --shadow-sm: 0 1px 0 rgba(0, 0, 0, .3);
  --shadow: 0 16px 40px -16px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
.num, td, .tk b, .stat b { font-variant-numeric: tabular-nums; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
/* Sidebar: a slim icon rail that opens over the page on hover or keyboard focus. */
.side {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 35; width: var(--rail); overflow: hidden;
  display: flex; flex-direction: column; padding: 20px 14px;
  background: var(--panel); border-right: 1px solid var(--line);
  transition: width .2s ease .15s, box-shadow .2s ease .15s;
}
.side:hover, .side:has(:focus-visible) { width: var(--side); box-shadow: var(--shadow); transition-delay: 0s; }
.side .brand-text, .side .nav span, .side .nav-label, .side .sync span, .side .xlink span {
  opacity: 0; white-space: nowrap; transition: opacity .12s ease .1s;
}
.side:hover .brand-text, .side:hover .nav span, .side:hover .nav-label, .side:hover .sync span, .side:hover .xlink span,
.side:has(:focus-visible) .brand-text, .side:has(:focus-visible) .nav span, .side:has(:focus-visible) .nav-label, .side:has(:focus-visible) .sync span, .side:has(:focus-visible) .xlink span {
  opacity: 1; transition-delay: .06s;
}
.nav a, .xlink, .sync { white-space: nowrap; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 24px; }
.logo { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -.02em; }
.brand-tag { font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .07em; margin-top: 3px; white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { color: var(--faint); font-size: 10.5px; font-weight: 700; padding: 18px 12px 6px; text-transform: uppercase; letter-spacing: .14em; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--dim); font-weight: 550;
}
.nav a svg, .tabbar svg, .icon-btn svg, .btn svg, .search svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.nav a:hover { color: var(--text); background: var(--bg-2); }
.nav a.active { color: var(--accent); background: var(--accent-soft); font-weight: 650; }
.nav a.active::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.sync { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12px; padding: 10px 12px; margin: 4px 0; border-radius: 10px; background: var(--bg-2); cursor: help; }
.sync span { display: flex; flex-direction: column; line-height: 1.3; color: var(--text); font-weight: 650; }
.sync small { color: var(--faint); font-weight: 500; font-size: 11px; }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); flex: none; }
.sync.live i { background: var(--up); box-shadow: 0 0 0 3px var(--up-soft); animation: pulse 2.4s infinite; }
.sync.down i { background: var(--down); box-shadow: 0 0 0 3px var(--down-soft); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }
.xlink { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--dim); font-weight: 600; }
.xlink:hover { background: var(--bg-2); color: var(--text); }
.xlink svg, .foot svg { width: 15px; height: 15px; fill: currentColor; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; margin-left: var(--rail); }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 14px 28px; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.brand-mobile { display: none; padding: 0; }
.search {
  flex: 1 1 240px; max-width: 420px; display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--faint);
}
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; height: 100%; color: var(--text); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ticker {
  display: flex; align-items: stretch; margin-left: auto; height: 40px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden;
}
.tk { display: flex; flex-direction: column; justify-content: center; padding: 0 14px; line-height: 1.15; white-space: nowrap; }
.tk + .tk { border-left: 1px solid var(--line); }
.tk span { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.tk b { font-size: 13.5px; font-weight: 700; display: flex; gap: 6px; align-items: baseline; }
.tk small { font-size: 11px; font-weight: 650; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 999px; color: var(--dim); font-weight: 650; font-size: 13px; }
.seg button.on { background: var(--text); color: var(--bg); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--dim); }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-weight: 650; white-space: nowrap;
}
.btn:hover { border-color: var(--line-2); background: var(--panel-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px -8px var(--accent); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn[disabled], .btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.view { padding: 26px 28px 56px; outline: 0; }
.foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 18px 28px 28px; color: var(--faint); font-size: 12.5px; border-top: 1px solid var(--line); margin-top: auto; }
.foot span { margin-right: auto; }
.foot a { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-weight: 600; }
.foot a:hover { color: var(--text); }

/* ---------- common ---------- */
.up { color: var(--up); }
.down { color: var(--down); }
.dim { color: var(--dim); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow-sm); }
.panel-h { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel-h h2, .panel-h h3 { margin: 0; font-size: 17px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--bg-2); color: var(--dim); font-size: 11.5px; font-weight: 650; white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.badge.good { color: var(--up); background: var(--up-soft); }
.badge.bad { color: var(--down); background: var(--down-soft); }
.badge.warn { color: var(--warn); background: var(--warn-soft); }
.badge.info { color: var(--info); background: var(--accent-soft); }
.badge.solid { color: var(--text); background: var(--bg-2); }
.badge.mini { height: 18px; font-size: 10.5px; padding: 0 6px; margin-left: 6px; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 750; }
.copy { border: 0; background: none; padding: 2px; color: var(--faint); display: inline-grid; place-items: center; border-radius: 5px; }
.copy:hover { color: var(--accent); }
.copy svg, svg.ext { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.empty { padding: 48px 16px; text-align: center; color: var(--dim); }
.skeleton { min-height: 22px; background: linear-gradient(90deg, var(--bg-2), var(--line), var(--bg-2)); background-size: 200% 100%; animation: sk 1.2s infinite linear; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }
.link { border: 0; background: none; color: var(--accent); font-weight: 700; font-size: 12.5px; padding: 0; }
.link:disabled { color: var(--faint); }

/* token avatar: rounded square with a venue mark */
.av { position: relative; width: 42px; height: 42px; flex: none; }
.av img, .av .ph { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; font-weight: 750; font-size: 13px; color: #fff; background: var(--bg-2); }
.av.sq img, .av.sq .ph { border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.av.sm { width: 26px; height: 26px; }
.av.sm .ph { font-size: 10px; }
.av.sm.sq img, .av.sm.sq .ph { border-radius: 8px; }
.av.xs { width: 18px; height: 18px; }
.av.xs .ph { font-size: 8px; }
.av.lg { width: 60px; height: 60px; }
.av.lg .ph { font-size: 19px; }
.av.lg.sq img, .av.lg.sq .ph { border-radius: 16px; }
.av .venue { position: absolute; right: -5px; bottom: -5px; width: 18px; height: 18px; border: 2px solid var(--panel); box-sizing: content-box; }
.av.lg .venue { width: 22px; height: 22px; }
.av.sm .venue { width: 12px; height: 12px; right: -4px; bottom: -4px; }
.vmark { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; vertical-align: middle; flex: none; }
.vmark.xs { width: 14px; height: 14px; font-size: 8px; }
.vmark.stack { width: 22px; height: 22px; margin-left: -7px; border: 2px solid var(--panel); box-sizing: content-box; }
.vmark.stack:first-child { margin-left: 0; }
.v-other { background: var(--faint); }

/* score meter */
.meter { display: inline-flex; align-items: center; gap: 8px; }
.meter b { font-family: var(--serif); font-size: 17px; min-width: 22px; text-align: right; }
.meter .segs { display: inline-flex; gap: 2px; }
.meter i { width: 5px; height: 14px; border-radius: 2px; background: var(--line); }
.meter.hi i.on { background: var(--up); }
.meter.mid i.on { background: var(--warn); }
.meter.lo i.on { background: var(--down); }

/* ---------- pools ---------- */
.board { overflow: hidden; }
.toolbar { display: flex; align-items: center; gap: 10px; padding: 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg-2); overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; color: var(--dim); font-weight: 650; white-space: nowrap; }
.tabs button.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow-sm); }
.toolbar .spacer { flex: 1; }
.dd { position: relative; }
.dd-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 240px; padding: 10px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow);
}
.dd-panel.left { left: 0; right: auto; }
.dd-panel label { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.dd-panel label:hover { background: var(--bg-2); }
.dd-panel .row { display: grid; grid-template-columns: 1fr 110px; align-items: center; gap: 10px; padding: 6px 8px; }
.dd-panel .row span { color: var(--dim); font-size: 13px; }
.dd-panel h4 { margin: 4px 8px 8px; font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .12em; }
.dd-panel .foot { display: flex; justify-content: flex-end; padding: 8px 6px 2px; border: 0; margin: 0; }
.input { height: 38px; width: 100%; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); outline: 0; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.input { padding-right: 8px; }
.toolbar select.input { width: auto; border-radius: 999px; height: 40px; background: var(--panel); }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.venue-pick { display: flex; align-items: center; }

.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; min-width: 980px; }
.grid th {
  position: sticky; top: 0; z-index: 2; text-align: right; padding: 11px 12px; font-size: 10.5px; font-weight: 700; color: var(--faint);
  text-transform: uppercase; letter-spacing: .1em; background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none;
}
.grid th.sortable { cursor: pointer; }
.grid th.sortable:hover, .grid th.sorted { color: var(--text); }
.grid th .arr { margin-left: 4px; opacity: .45; font-size: 9px; }
.grid th.sorted .arr { opacity: 1; color: var(--accent); }
.grid td { text-align: right; padding: 16px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 14px; font-weight: 550; }
.grid th:first-child, .grid td:first-child { text-align: left; position: sticky; left: 0; z-index: 1; background: var(--panel); }
.grid th:first-child { z-index: 3; background: var(--panel-2); }
.grid tbody tr { cursor: pointer; transition: background .12s; }
.grid tbody tr:hover td { background: var(--panel-2); }
.grid td .sub { display: block; font-size: 12px; margin-top: 2px; font-weight: 600; }
.pool-cell { display: flex; gap: 14px; align-items: center; min-width: 300px; }
.pool-name { display: flex; align-items: center; gap: 8px; font-size: 15.5px; font-weight: 750; }
.pool-name a:hover { color: var(--accent); }
.pool-name .q { color: var(--faint); font-weight: 600; }
.pool-venue { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 12.5px; margin-top: 1px; }
.pool-venue i { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.pool-venue.lg { font-size: 14px; margin-top: 6px; }
.pool-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 11px; margin-top: 6px; max-width: 360px; }
.mi { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--dim); }
.mi svg { width: 12.5px; height: 12.5px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.mi.good { color: var(--up); } .mi.warn { color: var(--warn); } .mi.bad { color: var(--down); }
.plus-btn { display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 8px 0 5px; border-radius: 999px; border: 1px solid var(--accent); background: none; color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .02em; }
.plus-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.plus-btn:hover { background: var(--accent); color: var(--on-accent); }
.spark { width: 104px; height: 34px; display: block; margin-left: auto; overflow: visible; }
.mstats { display: none; }
.more { display: flex; justify-content: center; gap: 12px; padding: 16px; color: var(--dim); align-items: center; }

/* ---------- pool detail ---------- */
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--faint); margin-bottom: 18px; font-size: 13px; }
.crumbs a { color: var(--dim); }
.crumbs a:hover { color: var(--accent); }
.hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.hero h1 { margin: 0; font-size: 32px; letter-spacing: -.02em; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.hero h1 .q { color: var(--faint); font-weight: 600; font-size: 20px; font-family: system-ui, sans-serif; }
.hero .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); min-width: 0; box-shadow: var(--shadow-sm); }
.stat span { display: block; color: var(--faint); font-size: 10.5px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.stat b { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: -.01em; display: block; overflow: hidden; text-overflow: ellipsis; }
.stat small { font-family: system-ui, sans-serif; font-size: 12.5px; margin-left: 6px; font-weight: 650; }
.cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.chart-box { position: relative; height: 340px; padding: 8px 8px 0; }
.chart-box svg { width: 100%; height: 100%; display: block; }
.chart-tip { position: absolute; pointer-events: none; padding: 9px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-size: 12px; box-shadow: var(--shadow); white-space: nowrap; display: none; }
.kv { display: grid; grid-template-columns: auto 1fr; }
.kv > div { padding: 11px 18px; border-bottom: 1px solid var(--line); min-width: 0; }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }
.kv .k { color: var(--dim); font-size: 13px; white-space: nowrap; }
.kv .v { text-align: right; display: flex; justify-content: flex-end; align-items: center; gap: 6px; overflow: hidden; font-weight: 600; }
.kv .v a:hover { color: var(--accent); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: right; font-size: 10.5px; color: var(--faint); font-weight: 700; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; text-transform: uppercase; letter-spacing: .1em; }
.tbl td { text-align: right; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 13.5px; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl a:hover { color: var(--accent); }
.bar { height: 8px; border-radius: 4px; background: var(--bg-2); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; background: var(--accent); }
.bar i + i { background: var(--gold); }
.bar.thin { height: 4px; }
.comp { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.comp .line { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.side-tag { font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.scroll-x { overflow-x: auto; }

/* ---------- forms / pages ---------- */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.form { padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field .row-between > label, .field label { color: var(--dim); font-size: 13px; font-weight: 650; margin: 0; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills button { border: 1px solid var(--line); background: var(--panel); padding: 6px 13px; border-radius: 999px; color: var(--dim); font-weight: 650; font-size: 13px; }
.pills button.on { border-color: var(--text); color: var(--bg); background: var(--text); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.result { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px; }
.big-stat b { font-size: 32px; }
.lookup { display: flex; gap: 8px; max-width: 620px; }
.lookup .search { flex: 1; max-width: none; }
.page-h { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-h h1 { margin: 0; font-size: 32px; letter-spacing: -.02em; }
.page-h p { margin: 6px 0 0; color: var(--dim); font-size: 15px; }
.page-h .right { margin-left: auto; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding: 18px; }
.bars i { flex: 1; min-width: 3px; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .85; }
.bars i:hover { opacity: 1; }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(28, 24, 16, .38); backdrop-filter: blur(4px); }
[data-theme="dark"] .overlay { background: rgba(2, 4, 12, .62); }
.modal { width: 100%; max-width: 460px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: var(--shadow); }
.modal.wide { max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-h h3 { margin: 0; font-size: 21px; }
.modal-b { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.wallets { display: flex; flex-direction: column; gap: 8px; }
.wallets button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); font-weight: 650; text-align: left; }
.wallets button:hover { border-color: var(--accent); }
.wallets img { width: 28px; height: 28px; border-radius: 8px; }
.wallets svg { width: 16px; height: 16px; fill: none; stroke: var(--faint); stroke-width: 2; }
.btn.block { width: 100%; height: 48px; font-size: 15px; }
.btn.block + .btn.block { margin-top: -4px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60; padding: 11px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 650; transition: .2s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { padding: 40px; text-align: center; }

/* ---------- wallet ---------- */
.ident { width: 32px; height: 32px; border-radius: 10px; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.ident.xs { width: 20px; height: 20px; border-radius: 6px; } .ident.sm { width: 28px; height: 28px; border-radius: 8px; } .ident.lg { width: 48px; height: 48px; border-radius: 14px; }
.wallet-btn { gap: 8px; padding: 0 14px 0 8px; }
.wallet-btn.primary { padding: 0 18px; }
.wallet-btn .wicon { width: 22px; height: 22px; border-radius: 6px; }
.wallet-btn .waddr { font-weight: 700; }
.wallet-btn .wbal { padding-left: 9px; border-left: 1px solid var(--line-2); color: var(--dim); font-weight: 650; font-size: 13px; font-variant-numeric: tabular-nums; }
.wallet-btn.warn-btn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: var(--warn-soft); }
.wallet-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.wpend { display: inline-flex; align-items: center; gap: 3px; padding: 0 7px; height: 20px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 12px; font-weight: 750; }
.wpend svg { width: 13px !important; height: 13px !important; }
.wallet-panel { width: 330px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.wp-head { display: flex; align-items: center; gap: 12px; }
.wp-addr { display: flex; align-items: center; gap: 4px; font-size: 15px; }
.wp-bal { padding: 16px; border-radius: 14px; background: linear-gradient(135deg, var(--accent-soft), transparent), var(--bg); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.wp-bal b { font-family: var(--serif); font-size: 28px; letter-spacing: -.02em; }
.wp-net { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); font-weight: 650; font-size: 13px; }
.wp-net > :last-child { margin-left: auto; }
.wp-net i { width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px var(--up-soft); }
.wp-net.bad { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.wp-net.bad i { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.wp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wact { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-weight: 650; font-size: 13px; text-align: left; }
.wact svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; color: var(--dim); }
.wact:hover { border-color: var(--accent); }
.wact.danger:hover { color: var(--down); border-color: color-mix(in srgb, var(--down) 40%, transparent); }

/* ---------- LP dialogs ---------- */
.lp-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.lp-head b { font-size: 16px; }
.pair { display: flex; flex: none; }
.pair .av + .av { margin-left: -8px; }
.pair .av img, .pair .av .ph { box-shadow: 0 0 0 2px var(--panel); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-direction: row; }
.range-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lp-range { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lp-range > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); text-align: center; min-width: 0; }
.lp-range b { font-family: var(--serif); font-size: 17px; overflow: hidden; text-overflow: ellipsis; }
.lp-range .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amt { border: 1px solid var(--line); border-radius: 14px; background: var(--bg); padding: 12px 14px; }
.amt:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.amt + .amt { margin-top: -2px; }
.amt-row { display: flex; align-items: center; gap: 10px; }
.amt-in { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-family: var(--serif); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.amt-in:disabled { opacity: .35; }
.tchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-2); }
.tchip b:only-child { padding-left: 6px; }
.amt-foot { display: flex; justify-content: space-between; margin-top: 6px; color: var(--dim); font-size: 12.5px; }
.toggle { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13px; cursor: pointer; }
.lp-sum { border: 1px solid var(--line); border-radius: 14px; }
.lp-status { min-height: 18px; color: var(--dim); font-size: 13px; text-align: center; }
.lp-status:empty { display: none; }
.big-pct { font-family: var(--serif); font-size: 24px; }
.done { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0; text-align: center; }
.done p { margin: 0; color: var(--dim); }
.done-ico { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--up-soft); color: var(--up); }
.done-ico.wait { background: var(--warn-soft); color: var(--warn); }
.done-ico svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- portfolio ---------- */
.connect-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 52px 20px; background: radial-gradient(520px 200px at 50% 0%, var(--accent-soft), transparent), var(--panel); }
.connect-hero h1 { margin: 6px 0 0; font-size: 32px; }
.connect-hero p { margin: 0; max-width: 460px; }
.connect-hero .lookup { width: 100%; max-width: 460px; margin-top: 10px; }
.ch-art { width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.ch-art svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pf-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 22px; align-items: center; padding: 22px; margin-bottom: 22px; background: radial-gradient(520px 180px at 0% 0%, var(--accent-soft), transparent), var(--panel); }
.pf-id { display: flex; align-items: center; gap: 14px; }
.pf-addr { display: flex; align-items: center; gap: 4px; font-size: 16px; }
.pf-worth { display: flex; flex-direction: column; }
.pf-worth > span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--faint); }
.pf-worth b { font-family: var(--serif); font-size: 38px; letter-spacing: -.02em; line-height: 1.15; }
.pf-sub { color: var(--dim); font-size: 13px; }
.pf-alloc { display: flex; flex-direction: column; gap: 10px; }
.alloc { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--bg-2); gap: 2px; }
.alloc i { display: block; height: 100%; }
.a1 { background: var(--accent); } .a2 { background: var(--up); } .a3 { background: var(--gold); }
.alloc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--dim); }
.alloc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.alloc-legend i { width: 8px; height: 8px; border-radius: 2px; }
.alloc-legend b { color: var(--text); font-weight: 700; }
.pf-tools { grid-column: 1 / -1; }
.sec-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-h { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.view > .sec-h { margin: 26px 0 12px; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.pos { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); padding: 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.pos:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.pos-h { display: flex; align-items: center; gap: 12px; }
.pos-name { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.pos-name:hover { color: var(--accent); }
.pos-sub { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 12.5px; margin-top: 2px; flex-wrap: wrap; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pos-vals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pos-vals > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pos-vals span { color: var(--faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.pos-vals b { font-size: 16px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.range-box { display: flex; flex-direction: column; gap: 8px; }
.rbar { position: relative; height: 8px; border-radius: 4px; background: var(--bg-2); }
.rfill { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.rfill.in { background: color-mix(in srgb, var(--accent) 60%, transparent); }
.rfill.out { background: color-mix(in srgb, var(--warn) 55%, transparent); }
.rmark { position: absolute; top: -4px; width: 3px; height: 16px; margin-left: -1.5px; border-radius: 2px; background: var(--text); }
.rlabels { display: grid; grid-template-columns: repeat(3, 1fr); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.rlabels span { display: flex; flex-direction: column; }
.rlabels em { font-style: normal; color: var(--faint); font-size: 11px; }
.rlabels .center { text-align: center; align-items: center; }
.rlabels .right { text-align: right; align-items: flex-end; }
.pos-amts { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.pos-amts > div { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.pos-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.pos-actions .btn svg { width: 14px; height: 14px; }
.empty-lp { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 20px; text-align: center; }
.empty-lp p { margin: 0 0 8px; }
.suggest { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; width: 100%; text-align: left; }
.sug { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.sug-apr { display: flex; flex-direction: column; align-items: flex-end; }
.tok-list { display: flex; flex-direction: column; }
.tok { display: grid; grid-template-columns: 32px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) 70px; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.tok:last-child { border-bottom: 0; }
.tok-name { display: flex; flex-direction: column; min-width: 0; }
.tok-name b { display: flex; align-items: center; gap: 6px; }
.tok-name .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tok-amt, .tok-val { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-variant-numeric: tabular-nums; }
.tok-val .bar { width: 80px; }
.tok-act { display: flex; justify-content: flex-end; }
.tx-list { display: flex; flex-direction: column; }
.tx { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.tx:last-child { border-bottom: 0; }

/* ---------- stake ---------- */
.stake-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.stake-head h1 { margin: 0; font-size: 36px; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; }
.stake-head p { margin: 6px 0 0; color: var(--dim); font-size: 15px; }
.stake-chips { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.stake-chips .chip { display: flex; flex-direction: column; justify-content: center; padding: 8px 18px; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--faint); }
.stake-chips .chip + .chip { border-left: 1px solid var(--line); }
.stake-chips .chip b { font-family: var(--serif); font-size: 19px; text-transform: none; letter-spacing: 0; color: var(--text); }
.stake-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); grid-template-areas: "pool yours" "how yours"; gap: 16px; align-items: start; }
.s-pool { grid-area: pool; } .s-yours { grid-area: yours; } .s-how { grid-area: how; }
.scard { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.scard h2 { margin: 0; font-size: 21px; }
.stiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stiles.two { grid-template-columns: 1fr 1fr; }
.stile { padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stile span { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.stile b { font-family: var(--serif); font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stile small { display: block; font-family: system-ui, sans-serif; font-size: 12px; font-weight: 600; color: var(--dim); margin-top: 2px; }
.scap { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13px; flex-wrap: wrap; }
.scap a, .scap .link { color: var(--accent); font-weight: 700; font-size: 13px; }
.sdot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.sdot.on { background: var(--up); box-shadow: 0 0 0 3px var(--up-soft); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; }
.steps li::before { content: counter(s, upper-roman); grid-row: span 2; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-family: var(--serif); font-weight: 600; font-size: 13px; }
.steps span { color: var(--dim); font-size: 13.5px; }
.scard .kv { border: 1px solid var(--line); border-radius: 14px; }
.scard .seg { align-self: flex-start; }
.two-btn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.two-btn .btn.block { height: 42px; font-size: 14px; }
.two-btn .btn.block, .two-btn .btn.block + .btn.block { margin-top: 0; }

/* ---------- handbook ---------- */
.hb-hero { padding: 40px 36px; border-radius: 22px; margin-bottom: 26px; border: 1px solid var(--line); background: radial-gradient(700px 260px at 100% 0%, var(--accent-soft), transparent), var(--panel); position: relative; overflow: hidden; }
.hb-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .16em; font-weight: 750; color: var(--accent); }
.hb-hero h1 { margin: 10px 0 10px; font-size: 40px; line-height: 1.12; max-width: 760px; letter-spacing: -.02em; }
.hb-hero p { margin: 0; color: var(--dim); font-size: 16px; max-width: 680px; line-height: 1.6; }
.hb-cols { position: absolute; right: 34px; top: 30px; width: 120px; opacity: .1; color: var(--text); }
.hb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.hb-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s; }
.hb-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.hb-num { font-family: var(--serif); font-size: 13px; color: var(--accent); letter-spacing: .08em; }
.hb-card b { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.hb-card span { color: var(--dim); font-size: 13.5px; line-height: 1.55; }
.hb-card em { margin-top: auto; padding-top: 6px; font-style: normal; font-size: 12px; color: var(--faint); }
.hb-page { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 44px; align-items: start; max-width: 1120px; }
.hb-article { min-width: 0; }
.hb-article .hb-num { display: block; margin-bottom: 6px; }
.hb-article h1 { margin: 0 0 8px; font-size: 38px; line-height: 1.15; letter-spacing: -.02em; }
.hb-lede { font-size: 17px; color: var(--dim); line-height: 1.6; margin: 0 0 8px; max-width: 720px; }
.hb-meta { font-size: 12.5px; color: var(--faint); margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.hb-article h2 { font-size: 24px; margin: 36px 0 10px; scroll-margin-top: 90px; }
.hb-article h3 { font-size: 18px; margin: 24px 0 8px; }
.hb-article p, .hb-article li { font-size: 15px; line-height: 1.7; color: color-mix(in srgb, var(--text) 84%, var(--bg)); max-width: 720px; }
.hb-article ul, .hb-article ol { padding-left: 20px; }
.hb-article li { margin: 4px 0; }
.hb-article code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; padding: 2px 6px; border-radius: 6px; background: var(--bg-2); }
.hb-article a.inl { color: var(--accent); font-weight: 650; }
.hb-article strong { color: var(--text); }
.hb-call { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; margin: 18px 0; max-width: 720px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.hb-call.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.hb-call b { font-family: var(--serif); font-size: 16px; }
.hb-call p { margin: 0; font-size: 14px; }
.hb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 16px 0; max-width: 760px; }
.hb-tile { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.hb-tile b { display: block; font-family: var(--serif); font-size: 16px; margin-bottom: 2px; }
.hb-tile span { font-size: 13.5px; color: var(--dim); line-height: 1.5; }
.hb-fig { margin: 20px 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); max-width: 760px; }
.hb-fig svg { width: 100%; height: auto; display: block; }
.hb-fig figcaption { font-size: 12.5px; color: var(--faint); margin-top: 10px; text-align: center; }
.hb-scroll { max-width: 760px; overflow-x: auto; margin: 14px 0; }
.hb-scroll .hb-table td .addr, .hb-scroll .hb-table code { white-space: nowrap; }
.hb-table { width: 100%; max-width: 760px; border-collapse: separate; border-spacing: 0; margin: 0; font-size: 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.hb-table th, .hb-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.hb-table th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); background: var(--panel-2); }
.hb-table td { color: color-mix(in srgb, var(--text) 86%, var(--bg)); background: var(--panel); }
.hb-table tr:last-child td { border-bottom: 0; }
.hb-qa { max-width: 760px; border-top: 1px solid var(--line); }
.hb-qa details { border-bottom: 1px solid var(--line); padding: 2px 0; }
.hb-qa summary { cursor: pointer; padding: 13px 0; font-weight: 650; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.hb-qa summary::-webkit-details-marker { display: none; }
.hb-qa summary::after { content: '+'; color: var(--accent); font-weight: 700; }
.hb-qa details[open] summary::after { content: '–'; }
.hb-qa details p { margin: 0 0 14px; }
.hb-toc { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 2px; padding-left: 16px; border-left: 1px solid var(--line); }
.hb-toc b { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin-bottom: 8px; }
.hb-toc a { font-size: 13px; color: var(--dim); padding: 4px 0; }
.hb-toc a:hover, .hb-toc a.on { color: var(--accent); }
.addr { display: inline-flex; align-items: center; gap: 6px; }
.hb-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 44px; max-width: 760px; }
.hb-nav a { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); display: flex; flex-direction: column; gap: 2px; }
.hb-nav a:hover { border-color: var(--accent); }
.hb-nav a span { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 700; }
.hb-nav a b { font-family: var(--serif); font-size: 17px; }
.hb-nav a.next { text-align: right; grid-column: 2; }

.tabbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1380px) {
  .ticker .tk:nth-child(n+3) { display: none; }
}
@media (max-width: 1100px) {
  .ticker { display: none; }
  .cols, .stake-grid { grid-template-columns: minmax(0, 1fr); }
  .stake-grid { grid-template-areas: "pool" "yours" "how"; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hb-page { grid-template-columns: minmax(0, 1fr); }
  .hb-toc { display: none; }
}
@media (max-width: 760px) {
  .side { display: none; }
  .main { margin-left: 0; }
  .brand-mobile { display: flex; }
  .top { padding: 10px 16px; gap: 8px; flex-wrap: wrap; }
  .top .search { order: 10; flex-basis: 100%; max-width: none; }
  #currency { margin-left: auto; }
  .view { padding: 18px 16px 24px; }
  .foot { padding: 16px 16px 96px; }
  .grid-2, .result { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 26px; }
  .hero .actions { margin-left: 0; width: 100%; }
  .stat b { font-size: 19px; }
  .stat small { display: block; margin: 2px 0 0; }
  .wbal { display: none; }
  .pf-hero { grid-template-columns: minmax(0, 1fr); }
  .pf-tools { grid-column: auto; }
  .tok { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .tok-val, .tok-act { display: none; }
  .wallet-panel { width: auto; }
  .stiles { grid-template-columns: 1fr 1fr; }
  .stake-head h1, .page-h h1 { font-size: 27px; }
  .stake-chips { width: 100%; }
  .stake-chips .chip { flex: 1; padding: 8px 12px; }
  .hb-hero { padding: 28px 22px; }
  .hb-cols { display: none; }
  .hb-hero h1, .hb-article h1 { font-size: 29px; }
  .hb-nav { grid-template-columns: 1fr; }
  .hb-nav a.next { grid-column: auto; }
  .toolbar { gap: 8px; }
  .toolbar .tabs { order: -1; width: 100%; }
  .toolbar .spacer, .toolbar .lbl { display: none; }
  .toolbar .btn { padding: 0 12px; }
  .toolbar select.input { flex: 1; min-width: 108px; }
  .toolbar > select:last-child { flex: 0 0 auto; }
  table.grid { min-width: 0; }
  .grid thead, .grid td:not(:first-child) { display: none; }
  .grid td:first-child { position: static; padding: 14px; }
  .pool-cell { min-width: 0; align-items: flex-start; }
  .pool-name { font-size: 15px; flex-wrap: wrap; row-gap: 4px; }
  .pool-meta { max-width: none; }
  .pool-meta .mi:nth-child(n+5) { display: none; }
  .mstats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12.5px; color: var(--dim); }
  .mstats b { color: var(--text); font-weight: 700; }
  .mstats b.up { color: var(--up); } .mstats b.down { color: var(--down); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-around;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--faint); padding: 4px 10px; font-weight: 600; }
  .tabbar a.active { color: var(--accent); }
  .dd-panel { position: fixed; left: 16px; right: 16px; top: auto; bottom: 80px; min-width: 0; max-height: 70vh; overflow: auto; }
}
@media (max-width: 420px) {
  #connect { padding: 0 12px; font-size: 13px; }
  #theme { display: none; }
  .seg button { padding: 6px 10px; }
  .stats { gap: 8px; }
  .stat { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
.lp-takeout { display: block; margin: 10px auto 0; color: var(--dim); font-size: 12.5px; }
.slip { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.slip-box { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 0 12px 0 4px; color: var(--dim); font-weight: 650; font-size: 13px; }
.slip-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.slip-in { width: 54px; border: 0; background: none; outline: 0; text-align: right; padding: 6px 0; font-weight: 650; font-size: 13px; color: var(--text); }
.slip-in.on { color: var(--accent); }
.slip-box:has(.slip-in.on) { border-color: var(--accent); }
.slip-warn { color: var(--warn); font-size: 12px; font-weight: 600; text-align: right; }
.slip-warn:empty { display: none; }
