/* EIP/ERC explorer. Light theme only, web3wagmi family tokens. */

:root {
  --bg: #fff;
  --bg2: #f8fafc;
  --surface: #fff;
  --text: #0f172a;
  --text2: #475569;
  --text3: #64748b;
  --border: #e2e8f0;
  --border2: #f1f5f9;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --accent-deep: #b45309;
  --blue: #2563eb;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 10px;
  --wrap: 1200px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  /* clip, not hidden: overflow-x:hidden here kills position:sticky on mobile. */
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------- shared site chrome (canonical) ---------------------- */
/* Keep 100% identical across all web3wagmi sites. */

.site-brand { font-family: var(--sans); background: rgba(255,255,255,.85); -webkit-backdrop-filter: saturate(180%) blur(8px); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 101; }
.site-brand-inner { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: center; height: 44px; }
.site-brand-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; transition: opacity 0.15s ease; }
.site-brand-link:hover { opacity: 0.85; text-decoration: none; }
.site-brand-mark { width: 34px; height: 34px; display: block; flex-shrink: 0; }
.site-brand-text { font-family: var(--display); font-size: 26px; font-weight: 900; color: #0f172a; letter-spacing: -0.5px; line-height: 1; }
.site-brand-text span { color: #f59e0b; }
.site-nav-item { display: inline-flex; align-items: center; }
.site-nav-dot { color: #94a3b8; opacity: 0.45; font-size: 11px; line-height: 1; user-select: none; pointer-events: none; }
.site-nav { font-family: var(--sans); background: rgba(255,255,255,.85); -webkit-backdrop-filter: saturate(180%) blur(8px); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid #e2e8f0; font-size: 12px; font-weight: 600; position: sticky; top: 44px; z-index: 100; }
.site-nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: center; gap: 0; height: 44px; }
.site-nav a.site-nav-link { position: relative; color: #64748b; text-decoration: none; padding: 5px 18px; text-transform: uppercase; letter-spacing: 0.14em; transition: color 0.15s ease; }
.site-nav a.site-nav-link:hover { color: #0f172a; background: none; text-decoration: none; }
.site-nav a.site-nav-link.active { color: #b45309; background: none; }
.site-nav a.site-nav-link.active::before { content: ""; position: absolute; left: 18px; right: 18px; bottom: -1px; height: 2px; border-radius: 2px; background: #f59e0b; }

/* Site sub-nav, following the data.web3wagmi.com pattern. */
.site-subnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4px 24px;
  min-height: 34px;
  border-top: 1px solid #eef2f6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-wrap: wrap;
}
.site-subnav-link {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #64748b;
  padding: 5px 12px;
  border-radius: 5px;
  text-decoration: none;
}
.site-subnav-link:hover { color: #0f172a; background: #f1f5f9; text-decoration: none; }
.site-subnav-link.active { color: #b45309; background: #fef3c7; }

@media (max-width: 640px) {
  .site-brand-inner { padding: 0 12px; height: 44px; }
  .site-brand-mark { width: 30px; height: 30px; }
  .site-brand-text { font-size: 22px; }
  .site-nav-inner { padding: 0 8px; gap: 0; height: 44px; flex-wrap: nowrap; justify-content: center; overflow-x: auto; scrollbar-width: none; }
  .site-nav-inner::-webkit-scrollbar { display: none; }
  .site-nav a.site-nav-link { padding: 6px 11px; font-size: 11px; letter-spacing: 0.1em; min-height: 44px; display: flex; align-items: center; flex-shrink: 0; white-space: nowrap; }
  .site-nav a.site-nav-link.active::before { left: 11px; right: 11px; }
  .site-subnav-inner { padding: 4px 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .site-subnav-inner::-webkit-scrollbar { display: none; }
  .site-subnav-link { flex-shrink: 0; white-space: nowrap; }
}
@media (max-width: 360px) {
  .site-brand-text { font-size: 19px; }
  .site-brand-mark { width: 26px; height: 26px; }
  .site-nav a.site-nav-link { padding: 6px 8px; font-size: 10px; letter-spacing: 0.06em; }
  .site-nav a.site-nav-link.active::before { left: 8px; right: 8px; }
}

/* -------------------------------- main -------------------------------- */

#main { padding: 18px 24px 56px; }

h1 { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -0.5px; margin: 0 0 4px; }
h2 { font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: -0.2px; margin: 0 0 12px; }

.lede { color: var(--text3); max-width: 78ch; margin: 0 0 8px; font-size: 13.5px; }
.intro { margin-bottom: 14px; }

.back {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text3);
  margin-bottom: 20px;
}
.back:hover { color: var(--accent-deep); text-decoration: none; }

/* stats strip */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  font-size: 13px;
  color: var(--text3);
}
.stat { white-space: nowrap; }
.stat-value { font-family: var(--display); font-weight: 700; color: var(--text); }

/* filters */
.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}
.search {
  font: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 11px;
  flex: 1 1 260px;
  min-width: 0;
}
.search:focus { outline: 2px solid var(--accent-light); border-color: var(--accent); }

/* custom dropdown */
.dd { position: relative; flex: 0 0 auto; }
.dd-btn {
  font: inherit;
  font-size: 12.5px;
  color: var(--text2);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}
.dd-btn:hover { border-color: #cbd5e1; }
.dd-btn[aria-expanded="true"] { border-color: var(--accent); outline: 2px solid var(--accent-light); }
.dd-btn.dd-active { color: var(--accent-deep); background: var(--accent-light); border-color: #fcd34d; font-weight: 600; }
.dd-label { overflow-wrap: anywhere; text-align: left; }
.dd-caret { font-size: 9px; color: var(--text3); flex: none; }
.dd-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 60;
  min-width: 100%;
  max-width: min(80vw, 320px);
  width: max-content;
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  padding: 4px;
}
.dd-opt {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 13px;
  color: var(--text2);
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.dd-opt:hover { background: var(--bg2); color: var(--text); }
.dd-opt-on { background: var(--accent-light); color: var(--accent-deep); font-weight: 600; }
.reset { padding: 8px 12px; }
.search::placeholder { color: #94a3b8; }
.toggle { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text3); white-space: nowrap; }
.result-count { font-size: 12px; color: var(--text3); margin: 0 0 8px; }

/* status pills */
.pill {
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text3);
  white-space: nowrap;
}
.pill-final, .pill-living { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.pill-draft, .pill-review { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.pill-last-call { background: var(--accent-light); border-color: #fcd34d; color: var(--accent-deep); }
.pill-stagnant { background: var(--border2); border-color: var(--border); color: var(--text3); }
.pill-withdrawn { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* detail */
.detail-head { margin-bottom: 22px; }
.detail-id { font-family: var(--mono); font-size: 20px; color: var(--text3); margin-right: 4px; }
.detail-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--text3); }

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  background: #fff;
}
.note { color: var(--text3); font-size: 13px; margin: 0 0 12px; }
.reason { color: var(--text3); margin: 10px 0 0; overflow-wrap: anywhere; }
.chips { color: var(--text3); font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; margin: 0; }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table td {
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.table tr:last-child td { border-bottom: 0; }
.mono { font-family: var(--mono); }
.selector { width: 1%; white-space: nowrap; color: var(--text3); }
.sig { overflow-wrap: anywhere; }
.mut { width: 1%; white-space: nowrap; color: var(--text3); }
.label { width: 1%; white-space: nowrap; color: var(--text3); }

/* warnings */
.warn {
  border: 1px solid #fcd34d;
  background: var(--accent-light);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 12px;
}
.warn p { margin: 6px 0 0; color: #78350f; overflow-wrap: anywhere; }
.warn strong { color: var(--accent-deep); }

/* compare */
.compare-title { font-family: var(--mono); font-size: 24px; letter-spacing: -0.5px; }
.verdict {
  border: 1px solid var(--border);
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
}
.verdict-text { font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: -0.3px; overflow-wrap: anywhere; }
.verdict-sub { color: var(--text3); font-size: 14px; margin-top: 3px; overflow-wrap: anywhere; }
.compare-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  align-items: start;
}
.compare-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  font: inherit;
  font-weight: 700;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 9px 16px;
  cursor: pointer;
}
.btn:hover { background: #d97706; border-color: #d97706; }
.suggestions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip {
  font: inherit;
  font-size: 13px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  color: var(--text3);
}
.chip:hover { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-light); }

/* check results */
.match {
  display: block;
  border-top: 1px solid var(--border);
  padding: 12px 0;
  color: var(--text);
}
.match:first-of-type { border-top: 0; }
.match:hover { text-decoration: none; }
.match:hover .card-title { color: var(--accent-deep); }
.match-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 3px; }
.check-out { margin-top: 20px; }
.rpc { flex: 1 1 320px; margin-left: 6px; font-size: 13px; padding: 5px 9px; }

.empty { color: var(--text3); }
.source { color: var(--text3); font-size: 13px; margin-top: 20px; overflow-wrap: anywhere; }

/* footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg2);
  padding: 24px 0 40px;
  color: var(--text3);
  font-size: 13px;
}
.site-footer p { margin: 0 0 6px; max-width: 80ch; }
.build-info { font-family: var(--mono); }

@media (max-width: 620px) {
  h1 { font-size: 23px; }
  .brand-sub { display: none; }
  #main { padding-top: 24px; }
}

/* index table */
.table-scroll {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  max-height: 78vh;
  background: var(--surface);
}
.index-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.index-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  padding: 8px 12px;
  white-space: nowrap;
}
.index-table td {
  border-bottom: 1px solid var(--border2);
  padding: 5px 12px;
  vertical-align: top;
}
.index-table tr:last-child td { border-bottom: 0; }
.index-row { cursor: pointer; }
.index-row:hover td { background: var(--accent-light); }
.index-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.col-id { width: 1%; white-space: nowrap; }
.row-id { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--text); }
.index-row:hover .row-id { color: var(--accent-deep); }
.col-status { width: 1%; white-space: nowrap; }
/* Titles wrap. Truncating them would hide the only human-readable field. */
.col-title { overflow-wrap: anywhere; min-width: 220px; }
.col-fns { width: 1%; text-align: right; color: var(--text3); font-variant-numeric: tabular-nums; }
.col-165 { width: 1%; white-space: nowrap; }
.id-chip {
  font-size: 11px;
  color: var(--text3);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 4px;
}
.col-impl { width: 1%; white-space: nowrap; }
.lib {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 4px;
  padding: 2px 6px;
  margin-right: 4px;
  border: 1px solid;
}
.lib-oz { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.lib-solady { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }
.muted { color: var(--text3); font-size: 11px; }
.more { color: var(--text3); font-size: 13px; padding: 12px !important; }

@media (max-width: 720px) {
  .col-165, .col-fns { display: none; }
  .table-scroll { max-height: none; }
  .filters { gap: 6px; }
  .search { flex: 1 1 100%; }
  .dd-btn { font-size: 12px; padding: 8px 10px; }
  /* Anchor to the right edge when the button sits in the right half. */
  .dd:nth-child(even) .dd-menu { left: auto; right: 0; }
  .dd-menu { max-width: min(88vw, 300px); max-height: 260px; }
}

/* popular row */
.popular {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.popular-lead { font-size: 12px; font-weight: 700; color: var(--text3); margin-right: 2px; }
.popular-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--surface);
  color: var(--text);
}
.popular-chip:hover { text-decoration: none; border-color: var(--accent); background: var(--accent-light); }
.popular-id { font-family: var(--mono); font-size: 11px; font-weight: 700; }

/* emoji icons: decorative, sized so they never disturb the type baseline */
.emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 0.95em;
  line-height: 1;
  margin-right: 5px;
  display: inline-block;
}
.popular-top { display: flex; align-items: center; gap: 0; }
.popular-top .emoji { font-size: 13px; }
.stat-label .emoji { font-size: 12px; }
.site-subnav-link .emoji { margin-right: 4px; font-size: 11px; }

/* sortable headers */
.index-table th.sortable { padding: 0; }
.th-btn {
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  background: none;
  border: 0;
  padding: 8px 12px;
  width: 100%;
  text-align: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.th-btn:hover { color: var(--text); background: var(--border2); }
.index-table th.sorted .th-btn { color: var(--accent-deep); }
.sort-arrow { font-size: 8px; }
.col-fns .th-btn, .col-impl .th-btn { justify-content: flex-end; }

/* row hover card */
.hovercard {
  position: fixed;
  z-index: 200;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.28);
  padding: 12px 14px;
  pointer-events: none;
  font-size: 12.5px;
  line-height: 1.5;
}
.hc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.hc-id { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--text); }
.hc-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.2px;
  overflow-wrap: anywhere;
  margin-bottom: 5px;
}
.hc-facts { color: var(--text3); overflow-wrap: anywhere; }
.hc-label {
  margin-top: 9px;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
}
.hc-fns { display: flex; flex-direction: column; gap: 2px; }
.hc-fn { display: flex; gap: 8px; align-items: baseline; }
.hc-sel { font-family: var(--mono); font-size: 11px; color: var(--text3); flex: none; }
.hc-sig { font-family: var(--mono); font-size: 11.5px; overflow-wrap: anywhere; }
.hc-more { color: var(--text3); font-size: 11px; margin-top: 2px; }
.hc-warn { margin-top: 9px; color: var(--accent-deep); overflow-wrap: anywhere; }

/* Touch is excluded in JS by pointerType, which is exact; a (hover: none) rule
   here would also hide the card in headless Chrome, which reports no hover. */

/* spec-errors table */
.div-table .col-iface { width: 1%; white-space: nowrap; font-size: 12px; }
.div-table .reason { color: var(--text3); font-size: 12.5px; min-width: 320px; }
.div-table td { padding: 8px 12px; }
.id-chip.good { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.id-chip.bad { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
