/* Contract Explorer (explorer.html) — Deep Field style. */
.ex { max-width: 1360px; margin: 0 auto; padding: 0 20px 60px; }
.ex-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 22px 0 14px; }
.ex-top h1 { font: 700 clamp(26px, 3.2vw, 38px)/1.1 var(--df-wide, var(--df-sans)); margin: 0 0 8px; color: var(--df-ink, #eef6ff); }
.ex-lede { color: var(--df-muted, #aeb7c8); max-width: 760px; margin: 0; line-height: 1.55; }
.ex-wal { flex: none; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(240,163,92,.55); background: rgba(4,7,14,.78); color: #ffd6b0; border-radius: 999px; padding: 8px 14px; font: 500 12.5px var(--df-mono); cursor: pointer; white-space: nowrap; }
.ex-wal .dot { width: 8px; height: 8px; border-radius: 50%; background: #f0a35c; }
.ex-wal .dot.on { background: #64e3a8; box-shadow: 0 0 8px #64e3a8; }
.ex-bar { display: flex; gap: 8px; margin: 8px 0 14px; }
.ex-bar input, .ex-find, .ex-in input, .ex-in textarea, .ex-runas select, .ex-runas input, .ex-dlg select, #exQIn { flex: 1; min-width: 0; background: #0b1222; color: #e8eef7; border: 1px solid rgba(190,210,255,.22); border-radius: 9px; padding: 10px 12px; font: 13.5px var(--df-mono); }
.ex-bar input:focus, .ex-find:focus, .ex-in input:focus, .ex-in textarea:focus { outline: none; border-color: var(--df-ice, #a8e6ff); }
.ex-status { margin: -4px 0 12px; font-size: 13px; color: #aeb7c8; }
.ex-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 18px; align-items: start; }
.ex-grid > * { min-width: 0; }
.ex-rail-w { position: sticky; top: 72px; max-height: calc(100vh - 90px); display: flex; flex-direction: column; gap: 8px; }
.ex-find { flex: none; padding: 8px 10px; font-size: 12.5px; }
.ex-rail { overflow: auto; padding-right: 4px; }
.ex-grp { margin-bottom: 12px; }
.ex-gt { font: 600 10.5px var(--df-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--df-ice, #a8e6ff); margin: 0 0 5px; }
.ex-it { display: flex; width: 100%; justify-content: space-between; align-items: baseline; gap: 8px; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; color: #c3cad8; cursor: pointer; text-align: left; font: 13px var(--df-sans); }
.ex-it b { font-weight: 600; color: #e8eef7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-it span { font: 11px var(--df-mono); color: #6f7a8e; flex: none; }
.ex-it:hover { background: rgba(168,230,255,.06); }
.ex-it.on { border-color: rgba(168,230,255,.4); background: rgba(168,230,255,.08); }
.ex-add { color: var(--df-ice, #a8e6ff); font-size: 12.5px; }
.ex-main { min-width: 0; border: 1px solid var(--df-line, rgba(190,210,255,.14)); border-radius: 16px; background: rgba(6,9,16,.72); padding: 18px 20px; }
.ex-h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ex-art { width: 48px; height: 48px; border-radius: 50%; flex: none; border: 1px solid rgba(168,230,255,.3); box-shadow: 0 0 18px rgba(168,230,255,.18); background: #05070c; }
.ex-h1 h2 { margin: 0; font: 650 22px var(--df-sans); color: #eef6ff; overflow-wrap: anywhere; }
.ex-type { font: 600 11px var(--df-mono); color: #ffd27a; border: 1px solid rgba(255,210,122,.4); border-radius: 6px; padding: 1px 7px; }
.ex-role { margin: 8px 0 6px; color: #c3cad8; line-height: 1.5; }
.ex-meta { overflow-wrap: anywhere; margin: 0 0 12px; font-size: 12.5px; color: #8e97a9; line-height: 1.7; word-break: break-word; }
.ex-copy { background: none; border: 0; padding: 0; color: #a8e6ff; font: 12.5px var(--df-mono); cursor: pointer; word-break: break-all; text-align: left; }
.ex-meta a { color: var(--df-ice, #a8e6ff); text-decoration: none; border-bottom: 1px solid rgba(168,230,255,.3); }
.ex-meta a:hover { border-bottom-color: var(--df-ice, #a8e6ff); }
.ex-help a, .ex-res a, .ex-as a { color: var(--df-ice, #a8e6ff); }
.ex-copy.copied::after { content: ' ✓ copied'; color: #8fe6c4; }
.ex-hb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ex-warn { font-size: 12.5px; color: #ffd27a; border-left: 2px solid rgba(255,210,122,.5); padding: 4px 10px; }
.ex-tabs { display: flex; gap: 4px; align-items: center; border-bottom: 1px solid var(--df-line, rgba(190,210,255,.14)); margin: 6px 0 12px; overflow-x: auto; }
.ex-ffind { margin-left: auto; flex: 0 1 220px; min-width: 120px; background: #0b1222; color: #e8eef7; border: 1px solid rgba(190,210,255,.18); border-radius: 8px; padding: 6px 10px; font: 12.5px var(--df-mono); }
.ex-ffind:focus { outline: none; border-color: var(--df-ice, #a8e6ff); }
.ex-fn[hidden] { display: none; }
.ex-none { margin: 0 0 10px; font-size: 13px; }
.ex-tab { background: none; border: 0; border-bottom: 2px solid transparent; color: #8e97a9; padding: 9px 14px; font: 600 13px var(--df-sans); cursor: pointer; white-space: nowrap; }
.ex-tab span { font: 11px var(--df-mono); color: #6f7a8e; margin-left: 3px; }
.ex-tab[aria-selected="true"] { color: #eef6ff; border-bottom-color: var(--df-ice, #a8e6ff); }
.ex-help { font-size: 13px; color: #8e97a9; line-height: 1.5; margin: 0 0 12px; }
.ex-runas { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; font-size: 13px; color: #aeb7c8; }
.ex-runas label { display: flex; gap: 8px; align-items: center; }
.ex-fn { border: 1px solid rgba(190,210,255,.12); border-radius: 10px; margin-bottom: 6px; background: rgba(10,17,32,.55); }
.ex-fn[open] { border-color: rgba(168,230,255,.35); }
.ex-fn summary { cursor: pointer; padding: 9px 12px; font: 13px var(--df-mono); color: #8e97a9; list-style: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background .15s; }
.ex-fn summary:hover { background: rgba(168,230,255,.04); }
.ex-fn summary::before { content: '▸'; display: inline-block; width: 1em; color: #6f7a8e; transition: transform .15s; }
.ex-fn[open] summary::before { transform: rotate(90deg); color: var(--df-ice, #a8e6ff); }
.ex-fn summary:focus-visible { outline: 2px solid var(--df-ice, #a8e6ff); outline-offset: -2px; border-radius: 10px; }
.ex-fn summary::-webkit-details-marker { display: none; }
.ex-fn summary b { color: #ffd27a; font-weight: 600; margin-right: 2px; }
.ex-fb { padding: 4px 12px 12px; }
.ex-in { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; }
.ex-in > span { font-size: 12px; color: #c3cad8; }
.ex-in i { font-style: normal; color: #6f7a8e; font-family: var(--df-mono); }
.ex-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ex-chip { background: rgba(168,230,255,.07); border: 1px solid rgba(168,230,255,.25); color: #a8e6ff; border-radius: 999px; padding: 3px 9px; font: 11.5px var(--df-sans); cursor: pointer; }
.ex-hint { font-size: 11.5px; color: #6f7a8e; }
.ex-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.ex-send { border-color: rgba(255,176,112,.5); color: #ffd6b0; }
.ex-link { background: none; border: 0; cursor: pointer; font-size: 14px; opacity: .7; }
.ex-res { margin-top: 10px; font-size: 13px; }
.ex-res .ok, .ex-main .ok { color: #8fe6c4; } .ex-main .bad, .ex-status .bad { color: #ffb4a0; }
.ex-as { font-size: 12.5px; color: #8e97a9; }
.ex-tr { margin-top: 10px; }
.ex-out { width: 100%; border-collapse: collapse; font: 12.5px var(--df-mono); margin: 6px 0; }
.ex-out td { padding: 5px 6px; border-bottom: 1px solid rgba(190,210,255,.08); vertical-align: top; word-break: break-all; color: #e8eef7; }
.ex-out td:first-child { color: #ffd27a; width: 34%; word-break: normal; }
.ex-out i { font-style: normal; color: #6f7a8e; }
.ex-out a { color: #a8e6ff; }
.ex-num { color: #eef6ff; }
.ex-all td:first-child { color: #a8e6ff; }
.ex-muted { color: #8e97a9; }
.ex-h3 { font: 600 11px var(--df-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--df-ice, #a8e6ff); margin: 18px 0 8px; }
.ex-txs { list-style: none; margin: 0; padding: 0; }
.ex-tx { display: flex; gap: 8px; align-items: baseline; width: 100%; background: none; border: 0; border-bottom: 1px solid rgba(190,210,255,.07); color: #c3cad8; padding: 7px 4px; cursor: pointer; text-align: left; font: 12.5px var(--df-mono); }
.ex-tx b { color: #ffd27a; font-weight: 600; }
.ex-tx span { margin-left: auto; color: #6f7a8e; font-size: 11.5px; }
.ex-tx:hover { background: rgba(168,230,255,.05); }
.ex-ask { min-height: 60px; max-height: 420px; overflow: auto; font-size: 13.5px; line-height: 1.55; }
.ex-q { color: #a8e6ff; margin: 10px 0 4px; } .ex-q::before { content: '› '; }
.ex-a { color: #e8eef7; margin: 0 0 10px; }
.ex-dlg { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 16px; }
.ex-dlg[hidden] { display: none; }
.ex-dlg-in { width: min(640px, 100%); max-height: 90vh; overflow: auto; background: #070b14; border: 1px solid rgba(168,230,255,.3); border-radius: 14px; padding: 18px; }
.ex-dlg h2 { margin: 0 0 12px; font: 650 18px var(--df-sans); color: #eef6ff; }
.ex-dlg textarea { resize: vertical; }
@media (max-width: 900px) {
  .ex-grid { grid-template-columns: 1fr; }
  .ex-rail-w { position: static; max-height: none; min-width: 0; }
  .ex-find { width: 100%; box-sizing: border-box; }
  .ex-rail { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
  .ex-grp { flex: none; margin: 0; display: flex; gap: 6px; align-items: center; }
  .ex-gt { display: none; }
  .ex-it { width: auto; border-color: rgba(190,210,255,.14); white-space: nowrap; }
  .ex-it span { display: none; }
  .ex-main { padding: 14px; }
  .ex-top { flex-direction: column; }
}
@media (max-width: 600px) { .ex { padding: 0 12px 40px; } .ex-out td:first-child { width: 40%; } .ex-ffind { flex-basis: 100%; margin: 6px 0; } .ex-tabs { flex-wrap: wrap; } }
