/* TOOLHOOD apps — /app /playground /sign /keys. Reads the tokens from base.css (SITE, SPEC §6). Prefix ap- (shared),
   pg- (playground), sg- (signing page), ky- (keys). Mono spaced caps labels, light display type, bracket corners. */
.ap-body { background: var(--bg, #050A08); color: var(--text, #DDF3E6); }
.ap-page {
  --ap-sans: var(--sans, 'Geist', ui-sans-serif, system-ui, sans-serif);
  --ap-mono: var(--mono, 'Geist Mono', ui-monospace, Menlo, monospace);
  --ap-wide: var(--wide, 'Geist', sans-serif);
  --ap-nav: var(--nav-h, 72px);
  --ap-ease: cubic-bezier(.2, .7, .1, 1);
  --ap-soft: rgba(232, 239, 217, .04);
  position: relative; min-height: 100vh; padding: calc(var(--ap-nav) + 4px) 0 96px; font-family: var(--ap-sans);
  color: var(--text); overflow-x: clip; isolation: isolate;
}
.ap-page::after { content: ''; position: absolute; left: 50%; top: 0; width: 1100px; height: 640px; transform: translateX(-50%); z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(61, 255, 154, .07), transparent 70%); }
.ap-page [hidden], .ap-modal[hidden], .ap-modal [hidden] { display: none !important; }
.ap-page a { color: inherit; }
.ap-wrap { position: relative; z-index: 2; width: min(1180px, calc(100% - 2 * var(--gut, 40px))); margin: 0 auto; }
.ap-mono { font-family: var(--ap-mono); letter-spacing: -.01em; }
.ap-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ap-dim { color: var(--dim); }
.ap-ok { color: var(--ok); } .ap-warn { color: var(--warn); } .ap-bad { color: var(--bad); }
.ap-up { color: var(--ok); } .ap-down { color: var(--bad); } .ap-flat { color: var(--muted); }
.ap-yes { color: var(--ok); } .ap-no { color: var(--muted); }
.ap-i svg, .ap-btn svg, .ap-copy svg, .ap-iconlink svg { width: 15px; height: 15px; flex: none; }
html.ap-lock { overflow: hidden; }

/* ---------- labels + type ---------- */
.ap-k, .ap-eyebrow { display: block; font-family: var(--ap-wide); font-stretch: var(--wide-stretch, 100%); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.ap-eyebrow { margin-bottom: 10px; } .ap-eyebrow a { color: var(--neon); text-decoration: none; letter-spacing: .02em; text-transform: none; }
.ap-crumb { font-family: var(--ap-wide); font-stretch: var(--wide-stretch, 100%); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); display: flex; flex-wrap: wrap; gap: 10px; }
.ap-crumb a { text-decoration: none; } .ap-crumb a:hover { color: var(--text); }
.ap-crumb i { font-style: normal; color: var(--dim); } .ap-crumb span:last-child { color: var(--dim); }
.ap-h1 { font-size: clamp(40px, 5.6vw, 72px); line-height: 1.02; font-weight: 300; letter-spacing: -.035em; margin: 22px 0 0; color: var(--text); }
.ap-h3 { font-family: var(--ap-wide); font-stretch: var(--wide-stretch, 100%); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin: 26px 0 10px; }
.ap-lead { max-width: 640px; margin: 22px 0 0; font-size: 17px; line-height: 1.6; color: var(--muted); }
.ap-lead b { color: var(--text); font-weight: 500; }
.ap-fine { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.55; color: var(--muted); margin: 12px 0 0; }
.ap-fine svg { width: 14px; height: 14px; margin-top: 2px; flex: none; color: var(--neon-2); }
.ap-err { margin: 10px 0 0; color: var(--bad); font-size: 13.5px; line-height: 1.5; }
.ap-para { font-size: 15.5px; line-height: 1.7; color: var(--text); }
.ap-summary { font-size: 14.5px; line-height: 1.6; color: var(--text); margin: 6px 0 0; }
.ap-link { color: var(--neon) !important; text-decoration: none; word-break: break-all; }
.ap-note { display: flex; gap: 10px; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); background: var(--ap-soft); font-size: 13px; line-height: 1.55; color: var(--muted); }
.ap-note svg { width: 16px; height: 16px; flex: none; color: var(--neon); margin-top: 2px; }
.ap-note b { color: var(--text); font-weight: 500; }
.ap-head { display: flex; align-items: center; gap: 8px; margin: 16px 0 14px; font-family: var(--ap-mono); font-size: 11.5px; color: var(--muted); }
.ap-head b { color: var(--text); font-weight: 500; }
.ap-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex: none; }
.ap-head.is-live .ap-dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(0, 200, 5, .6); animation: apPulse 2s infinite; }
@keyframes apPulse { 70% { box-shadow: 0 0 0 7px rgba(0, 200, 5, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 200, 5, 0); } }

/* ---------- buttons ---------- */
.ap-btn { --c: var(--line-2); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 0 18px; border: 1px solid var(--c); background: transparent; color: var(--text);
  font-family: var(--ap-wide); font-stretch: var(--wide-stretch, 100%); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap; border-radius: 0;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ap-ease), opacity .2s; -webkit-tap-highlight-color: transparent; }
.ap-btn i { font-style: normal; font-size: 9px; letter-spacing: .12em; opacity: .6; }
.ap-btn:hover { border-color: var(--neon); }
.ap-btn:active { transform: translateY(1px); }
.ap-btn:focus-visible, .ap-copy:focus-visible, .ap-wl__i:focus-visible, .ap-ctabs button:focus-visible, .pg-tool:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }
.ap-btn[disabled], .ap-btn.is-off { opacity: .4; cursor: not-allowed; transform: none; }
.ap-btn--neon { background: var(--neon); border-color: var(--neon); color: var(--neon-ink) !important; }
.ap-btn--neon:hover { background: #DBFF4D; border-color: #DBFF4D; }
.ap-btn--neon i { opacity: .6; }
.ap-btn--br { border-color: var(--line); background:
  linear-gradient(var(--neon), var(--neon)) left top / 9px 1px no-repeat, linear-gradient(var(--neon), var(--neon)) left top / 1px 9px no-repeat,
  linear-gradient(var(--neon), var(--neon)) right bottom / 9px 1px no-repeat, linear-gradient(var(--neon), var(--neon)) right bottom / 1px 9px no-repeat; }
.ap-btn--br:hover { background-color: rgba(61, 255, 154, .06); }
.ap-btn--ghost { border-color: var(--line); color: var(--muted); }
.ap-btn--ghost:hover { color: var(--text); }
.ap-btn--bad { border-color: rgba(255, 90, 78, .5); color: #FF8E85; }
.ap-btn--bad:hover { background: rgba(255, 90, 78, .12); border-color: var(--bad); }
.ap-btn--sm { min-height: 34px; padding: 0 12px; font-size: 9.5px; letter-spacing: .2em; gap: 7px; }
.ap-btn--sm svg { width: 13px; height: 13px; }
.ap-btn--lg { min-height: 52px; padding: 0 24px; font-size: 11px; letter-spacing: .3em; }
.ap-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.ap-copy { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-family: var(--ap-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.ap-copy:hover, .ap-copy.is-copied { color: var(--neon); border-color: var(--line-2); }
.ap-copy svg { width: 12px; height: 12px; }
.ap-iconlink { display: inline-grid; place-items: center; width: 34px; height: 34px; color: var(--muted); border: 1px solid transparent; }
.ap-iconlink:hover { color: var(--neon); border-color: var(--line); }
.ap-spin { width: 13px; height: 13px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: apSpin .8s linear infinite; flex: none; }
@keyframes apSpin { to { transform: rotate(360deg); } }

/* ---------- app bar ---------- */
.ap-bar { position: sticky; top: var(--ap-nav); z-index: 40; border-bottom: 1px solid var(--line); background: rgba(5, 10, 8, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.ap-bar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; }
.ap-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.ap-tabs::-webkit-scrollbar { display: none; }
.ap-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 19px 12px 17px; font-family: var(--ap-wide); font-stretch: var(--wide-stretch, 100%); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; white-space: nowrap; }
.ap-tabs a i { font-style: normal; font-size: 9.5px; color: var(--dim); }
.ap-tabs a:hover { color: var(--text); }
.ap-tabs a.is-on { color: var(--text); border-bottom-color: var(--neon); }
.ap-tabs a.is-on i { color: var(--neon); }
.ap-bar__right { display: flex; align-items: center; gap: 10px; flex: none; }
.ap-acct { display: flex; align-items: center; gap: 8px; }
.ap-acct__w { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line); color: var(--muted); }
.ap-acct__w img { width: 20px; height: 20px; object-fit: contain; }
.ap-acct__w svg { width: 15px; height: 15px; }
.ap-acct__a { display: inline-flex; align-items: center; gap: 7px; height: 34px; white-space: nowrap; padding: 0 10px; border: 1px solid var(--line); background: transparent; color: var(--text); font-family: var(--ap-mono); font-size: 12.5px; cursor: pointer; }
.ap-acct__a svg { width: 12px; height: 12px; color: var(--muted); }
.ap-acct__a:hover svg, .ap-acct__a.is-copied svg { color: var(--neon); }
.ap-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border: 1px solid var(--line); font-family: var(--ap-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ap-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.ap-badge.is-ok { color: var(--text); } .ap-badge.is-ok i { background: var(--ok); }
.ap-badge.is-bad { color: #FF8E85; border-color: rgba(255, 90, 78, .45); } .ap-badge.is-bad i { background: var(--bad); }
.ap-badge.is-warn { color: var(--warn); border-color: rgba(255, 194, 75, .4); } .ap-badge.is-warn i { background: var(--warn); }
.ap-badge--tier { color: var(--neon); border-color: var(--line-2); }
.ap-badge--tier.is-ok { color: var(--neon-ink); background: var(--neon); border-color: var(--neon); }
.ap-example { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; background: var(--warn); color: #1A1300; font-family: var(--ap-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .16em; vertical-align: middle; }
.ap-banner { border-top: 1px solid var(--line); background: rgba(61, 255, 154, .05); }
.ap-banner--warn { background: rgba(255, 194, 75, .08); border-top-color: rgba(255, 194, 75, .3); }
.ap-banner__in { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; font-size: 13.5px; color: var(--text); }
.ap-banner__in > svg { width: 17px; height: 17px; flex: none; color: var(--warn); }
.ap-banner__in > span { flex: 1; min-width: 0; }

/* ---------- hero + rows (the subpage template) ---------- */
.ap-hero { padding-top: 64px; padding-bottom: 56px; }
.ap-rows { display: block; }
.ap-row { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 48px; padding: 52px 0; border-top: 1px solid var(--line); }
.ap-row__l { min-width: 0; }
.ap-row__l > p { margin: 14px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 290px; }
.ap-row__l > p b { color: var(--text); font-weight: 500; }
.ap-row__r { min-width: 0; }
.ap-lab { display: flex; gap: 12px; margin: 0; font-family: var(--ap-wide); font-stretch: var(--wide-stretch, 100%); font-weight: 400; font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--pale, var(--text)); line-height: 16px; }
.ap-lab i { font-style: normal; color: var(--neon); }
.ap-viewing { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 28px; padding: 12px 14px; border: 1px solid rgba(255, 194, 75, .3); background: rgba(255, 194, 75, .06); font-size: 13.5px; color: var(--text); }
.ap-viewing > span:nth-child(2) { flex: 1; min-width: 220px; }
.ap-viewing a { color: var(--neon); text-decoration: none; }

/* ---------- panels + cards ---------- */
.ap-panel { position: relative; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(22, 27, 16, .78), rgba(17, 21, 12, .78)); padding: 22px; }
.ap-panel--flush { padding: 0; }
.ap-br { position: absolute; inset: -1px; pointer-events: none; opacity: .75; background:
  linear-gradient(var(--neon), var(--neon)) left top / 12px 1px no-repeat, linear-gradient(var(--neon), var(--neon)) left top / 1px 12px no-repeat,
  linear-gradient(var(--neon), var(--neon)) right top / 12px 1px no-repeat, linear-gradient(var(--neon), var(--neon)) right top / 1px 12px no-repeat,
  linear-gradient(var(--neon), var(--neon)) left bottom / 12px 1px no-repeat, linear-gradient(var(--neon), var(--neon)) left bottom / 1px 12px no-repeat,
  linear-gradient(var(--neon), var(--neon)) right bottom / 12px 1px no-repeat, linear-gradient(var(--neon), var(--neon)) right bottom / 1px 12px no-repeat; }
.ap-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ap-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ap-card, .ap-stat { position: relative; background: var(--panel); padding: 20px; min-width: 0; transition: background .25s; }
.ap-card:hover, .ap-stat:hover { background: var(--panel-2); }
.ap-card > b { display: block; margin-top: 12px; font-size: 17px; font-weight: 400; letter-spacing: -.01em; color: var(--text); }
.ap-card > p { margin: 8px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.ap-card > p b { color: var(--text); font-weight: 500; }
.ap-card .ap-btn { margin-top: 14px; }
.ap-big { display: block; margin-top: 12px; font-size: clamp(24px, 2.4vw, 32px); font-weight: 300; letter-spacing: -.03em; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ap-big small { font-size: 13px; letter-spacing: .06em; color: var(--muted); margin-left: 6px; font-family: var(--ap-mono); }
.ap-after { font-size: .72em; color: var(--neon); letter-spacing: -.01em; }
.ap-sub { display: block; margin-top: 6px; font-family: var(--ap-mono); font-size: 11.5px; color: var(--muted); min-height: 16px; }
.ap-why { margin: 12px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12.5px; line-height: 1.5; color: var(--dim) !important; }
.ap-stat .ap-why { color: var(--muted) !important; opacity: .85; }
.ap-meter { display: block; height: 4px; margin-bottom: 10px; background: rgba(61, 255, 154, .1); overflow: hidden; }
.ap-meter i { display: block; height: 100%; background: var(--neon); }
.ap-sk1 { display: inline-block; width: 70%; height: 26px; vertical-align: middle; background: linear-gradient(90deg, rgba(232, 239, 217, .04), rgba(232, 239, 217, .1), rgba(232, 239, 217, .04)); background-size: 200% 100%; animation: apSk 1.3s linear infinite; }
.ap-whatgrid .ap-card > b { font-size: 15.5px; }
.ap-connectbox { padding: 26px; }

/* ---------- tables ---------- */
.ap-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ap-search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 200px; max-width: 360px; height: 36px; padding: 0 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); color: var(--muted); }
.ap-search svg { width: 14px; height: 14px; flex: none; }
.ap-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; }
.ap-search:focus-within { border-color: var(--line-2); }
.ap-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.ap-check input { accent-color: var(--neon); width: 15px; height: 15px; }
.ap-tablewrap { overflow-x: auto; }
.ap-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ap-table th { padding: 12px 16px; text-align: left; font-family: var(--ap-wide); font-stretch: var(--wide-stretch, 100%); font-size: 10px; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); border-bottom: 1px solid var(--line); white-space: nowrap; }
.ap-table td { padding: 13px 16px; border-bottom: 1px solid rgba(61, 255, 154, .06); vertical-align: middle; color: var(--text); }
.ap-table tbody tr { transition: background .2s; }
.ap-table tbody tr:hover { background: rgba(61, 255, 154, .025); }
.ap-table tbody tr:last-child td { border-bottom: 0; }
.ap-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; font-family: var(--ap-mono); font-size: 13px; }
.ap-num small { font-size: 11px; }
.ap-act { text-align: right; white-space: nowrap; }
.ap-act > * { vertical-align: middle; }
.ap-table--auto td { font-size: 13px; }
.ap-tok { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.ap-tok > span:not(.ap-tl) { display: flex; flex-direction: column; min-width: 0; }
.ap-tok b { font-weight: 500; font-size: 14px; }
.ap-tok small { font-size: 12px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-tl { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border: 1px solid var(--line-2); background: rgba(61, 255, 154, .05); color: var(--neon); font-family: var(--ap-mono); font-size: 9.5px; letter-spacing: .02em; font-weight: 500; }
.ap-tl--eth { color: var(--text); }
.ap-tl--eth svg { width: 16px; height: 16px; }
.ap-flag { font-style: normal; display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border: 1px solid var(--line-2); font-family: var(--ap-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ap-flag.is-bad { color: #FF8E85; border-color: rgba(255, 90, 78, .45); }
.ap-foot { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); font-family: var(--ap-mono); font-size: 11px; color: var(--dim); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ap-foot a { color: var(--muted); }
.ap-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; font-family: var(--ap-mono); font-size: 9.5px; letter-spacing: .16em; border: 1px solid var(--line-2); color: var(--muted); }
.ap-pill.is-high, .ap-pill.is-bad { color: #FF8E85; border-color: rgba(255, 90, 78, .5); background: rgba(255, 90, 78, .08); }
.ap-pill.is-medium, .ap-pill.is-warn { color: var(--warn); border-color: rgba(255, 194, 75, .45); background: rgba(255, 194, 75, .06); }
.ap-pill.is-low, .ap-pill.is-ok, .ap-pill.is-none { color: var(--ok); border-color: rgba(0, 200, 5, .4); }

/* ---------- states ---------- */
.ap-sk { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.ap-sk span { display: block; background: linear-gradient(90deg, rgba(232, 239, 217, .035), rgba(232, 239, 217, .09), rgba(232, 239, 217, .035)); background-size: 200% 100%; animation: apSk 1.3s linear infinite; }
@keyframes apSk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.ap-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 34px 18px; }
.ap-state b { font-size: 15.5px; font-weight: 500; color: var(--text); }
.ap-state p { margin: 0; max-width: 440px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.ap-state__ic { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-2); color: var(--neon); margin-bottom: 4px; }
.ap-state__ic svg { width: 19px; height: 19px; }
.ap-state--err .ap-state__ic { color: var(--bad); border-color: rgba(255, 90, 78, .4); }
.ap-state .ap-btn { margin-top: 8px; }

/* ---------- forms ---------- */
.ap-field { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.ap-in { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .35); color: var(--text); font-size: 14px; outline: 0; border-radius: 0; transition: border-color .2s, box-shadow .2s; }
.ap-in::placeholder { color: var(--dim); }
.ap-in:focus { border-color: var(--neon); box-shadow: 0 0 0 3px rgba(61, 255, 154, .12); }
.ap-in.is-bad { border-color: var(--bad); }
.ap-field--big .ap-in { height: 52px; font-size: 15px; flex-basis: 280px; }
.ap-field--big .ap-btn { min-height: 52px; }
textarea.ap-in { height: auto; min-height: 84px; padding: 12px 14px; line-height: 1.5; resize: vertical; font-family: var(--ap-mono); font-size: 13px; }
select.ap-in { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.ap-seg { display: inline-flex; border: 1px solid var(--line-2); height: 52px; }
.ap-seg button { padding: 0 14px; border: 0; background: transparent; color: var(--muted); font-family: var(--ap-wide); font-stretch: var(--wide-stretch, 100%); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.ap-seg button + button { border-left: 1px solid var(--line); }
.ap-seg button.is-on { background: rgba(61, 255, 154, .1); color: var(--neon); }

/* ---------- connect your AI ---------- */
.ap-endpoint__box { display: flex; align-items: stretch; margin-top: 10px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .35); }
.ap-endpoint__box code { flex: 1; min-width: 0; padding: 15px 16px; font-size: 14.5px; color: var(--text); overflow-wrap: anywhere; }
.ap-endpoint__box .ap-btn { min-height: auto; border-width: 0 0 0 1px; }
.ap-clients { margin-top: 30px; }
.ap-ctabs { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.ap-ctabs::-webkit-scrollbar { display: none; }
.ap-ctabs button { flex: none; padding: 12px 16px; border: 0; border-bottom: 1px solid transparent; margin-bottom: -1px; background: transparent; color: var(--dim); font-family: var(--ap-wide); font-stretch: var(--wide-stretch, 100%); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.ap-ctabs button:hover { color: var(--text); }
.ap-ctabs button.is-on { color: var(--text); border-bottom-color: var(--neon); }
.ap-cbody { padding: 20px 0 6px; }
.ap-csteps { margin: 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 11px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.ap-csteps li::marker { color: var(--dim); font-family: var(--ap-mono); font-size: 12px; }
.ap-csteps b { color: var(--text); font-weight: 500; }
.ap-csteps i { color: var(--text); }
.ap-csteps code, .ap-modal__p code { font-family: var(--ap-mono); font-size: 12.5px; color: var(--neon); background: rgba(61, 255, 154, .06); padding: 1px 5px; overflow-wrap: anywhere; }
.ap-code { margin-top: 10px; border: 1px solid var(--line); background: #070905; }
.ap-code__h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 8px 7px 12px; border-bottom: 1px solid var(--line); font-family: var(--ap-wide); font-stretch: var(--wide-stretch, 100%); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.ap-code pre { margin: 0; padding: 14px; font-family: var(--ap-mono); font-size: 12.5px; line-height: 1.6; color: var(--text); overflow-x: auto; white-space: pre; }
.ap-more { margin-top: 16px; border-top: 1px solid var(--line); }
.ap-more > summary { list-style: none; cursor: pointer; padding: 12px 0; font-family: var(--ap-wide); font-stretch: var(--wide-stretch, 100%); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.ap-more > summary::-webkit-details-marker { display: none; }
.ap-more > summary::before { content: '+'; color: var(--neon); width: 12px; }
.ap-more[open] > summary::before { content: '−'; }
.ap-more > summary:hover { color: var(--text); }
.ap-tiers { margin-top: 30px; }

/* ---------- approvals ---------- */
.ap-apsum { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); font-family: var(--ap-mono); font-size: 11.5px; color: var(--muted); }
.ap-apsum b { color: var(--text); font-weight: 500; font-size: 14px; margin-right: 4px; }
.ap-apsum .ap-warn b, .ap-apsum .ap-bad b { color: inherit; }
.ap-aplist { list-style: none; margin: 0; padding: 0; }
.ap-ap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) auto auto; gap: 12px 18px; align-items: center; padding: 16px 18px; border-bottom: 1px solid rgba(61, 255, 154, .06); border-left: 2px solid transparent; }
.ap-ap:last-child { border-bottom: 0; }
.ap-ap.is-high { border-left-color: var(--bad); background: linear-gradient(90deg, rgba(255, 90, 78, .05), transparent 40%); }
.ap-ap.is-medium { border-left-color: var(--warn); }
.ap-ap__sp, .ap-ap__amt { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 13.5px; }
.ap-ap__sp a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-ap__sp a:hover { color: var(--neon); }
.ap-ap__sp small { font-size: 11px; }
.ap-ap__amt b { font-weight: 500; }
.ap-unl { color: var(--warn); font-family: var(--ap-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.ap-ap__why { grid-column: 1 / -1; margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* ---------- activity ---------- */
.ap-acts { list-style: none; margin: 0; padding: 0; }
.ap-actrow { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 16px; border-bottom: 1px solid rgba(61, 255, 154, .06); }
.ap-actrow__ic { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); color: var(--muted); }
.ap-actrow__ic svg { width: 15px; height: 15px; }
.ap-actrow__ic.is-in { color: var(--ok); border-color: rgba(0, 200, 5, .3); }
.ap-actrow__ic.is-out { color: var(--neon); border-color: var(--line-2); }
.ap-actrow.is-fail .ap-actrow__ic { color: var(--bad); border-color: rgba(255, 90, 78, .4); }
.ap-actrow__t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ap-actrow__t b { font-weight: 400; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.ap-actrow__t small { font-size: 12px; color: var(--dim); }
.ap-actrow__a { display: flex; align-items: center; gap: 4px; }

/* ---------- scan drawer ---------- */
.ap-dr__score { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; margin-top: 8px; }
.ap-ring { position: relative; display: grid; place-items: center; width: 112px; height: 112px; }
.ap-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ap-ring circle { fill: none; stroke-width: 6; }
.ap-ring .bg { stroke: rgba(61, 255, 154, .1); }
.ap-ring .fg { stroke: var(--neon); stroke-linecap: butt; transition: stroke-dasharray .8s var(--ap-ease); }
.ap-ring.is-warn .fg { stroke: var(--warn); } .ap-ring.is-bad .fg { stroke: var(--bad); }
.ap-ring b { font-size: 34px; font-weight: 300; letter-spacing: -.04em; line-height: 1; }
.ap-ring small { position: absolute; bottom: 26px; font-family: var(--ap-mono); font-size: 9.5px; color: var(--dim); }
.ap-verdict { display: block; margin-top: 4px; font-size: 22px; font-weight: 400; letter-spacing: -.02em; }
.ap-verdict.is-ok { color: var(--neon); } .ap-verdict.is-warn { color: var(--warn); } .ap-verdict.is-bad { color: var(--bad); }
.ap-dr__tok { display: flex; align-items: center; gap: 10px; margin: 18px 0 0; }
.ap-dr__tok b { font-weight: 500; }
.ap-dr__sum { margin-top: 6px; }
.ap-reasons { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); }
.ap-reasons li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 11px 12px; border-bottom: 1px solid rgba(61, 255, 154, .06); font-size: 13.5px; line-height: 1.5; }
.ap-reasons li:last-child { border-bottom: 0; }
.ap-reasons i { color: var(--muted); padding-top: 2px; } .ap-reasons i svg { width: 15px; height: 15px; }
.ap-reasons .is-bad i { color: var(--bad); } .ap-reasons .is-warn i { color: var(--warn); } .ap-reasons .is-ok i { color: var(--ok); }
.ap-reasons li > b { font-family: var(--ap-mono); font-size: 12px; font-weight: 500; color: var(--bad); }
.ap-reasons .is-ok > b { color: var(--ok); }
.ap-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 20px; background: var(--line); border: 1px solid var(--line); }
.ap-facts > div { background: var(--panel); padding: 12px; min-width: 0; }
.ap-facts b { display: block; margin-top: 6px; font-size: 16px; font-weight: 400; overflow-wrap: anywhere; }
.ap-facts small { display: block; margin-top: 4px; font-size: 11.5px; line-height: 1.4; color: var(--dim); }

/* ---------- generic pretty result ---------- */
.ap-kv { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); }
.ap-kv.is-nested { border: 0; border-left: 1px solid var(--line); }
.ap-kv__r { display: grid; grid-template-columns: minmax(110px, 200px) minmax(0, 1fr); gap: 14px; padding: 9px 12px; border-bottom: 1px solid rgba(61, 255, 154, .06); }
.ap-kv__r:last-child { border-bottom: 0; }
.ap-kv__r.is-wide { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.ap-kv__r.is-wide > dd > .ap-tablewrap { border: 1px solid var(--line); }
.ap-kv dt { font-family: var(--ap-mono); font-size: 11px; letter-spacing: .06em; color: var(--muted); padding-top: 2px; overflow-wrap: anywhere; }
.ap-kv dd { margin: 0; min-width: 0; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.ap-kv dd > .ap-kv, .ap-kv dd > .ap-tablewrap, .ap-kv dd > .ap-plist { margin-top: 2px; }
.ap-plist { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.6; }
.ap-addr { font-family: var(--ap-mono); font-size: 12.5px; color: var(--neon) !important; text-decoration: none; }
.ap-addr:hover { text-decoration: underline; }
.ap-hex { font-family: var(--ap-mono); font-size: 12px; color: var(--muted); word-break: break-all; }
.j-k { color: #B9C7A0; } .j-s { color: var(--neon); } .j-n { color: #7DE0FF; } .j-l { color: var(--warn); }

/* ---------- modal + drawer + wallet list ---------- */
.ap-modal { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 5, 3, .78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: apFade .25s; font-family: 'Geist', ui-sans-serif, system-ui, sans-serif; color: var(--text); }
.ap-modal__box { --ap-mono: var(--mono, 'Geist Mono', ui-monospace, Menlo, monospace); --ap-wide: var(--wide, 'Geist', sans-serif); --ap-sans: var(--sans, 'Geist', sans-serif); --ap-ease: cubic-bezier(.2, .7, .1, 1); --ap-soft: rgba(232, 239, 217, .04);
  position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; padding: 28px; background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9); animation: apPop .35s var(--ap-ease); }
.ap-modal__box.is-wide { max-width: 680px; }
.ap-modal__box > .ap-br { opacity: 1; }
.ap-modal__h { margin: 0; padding-right: 36px; font-size: 24px; font-weight: 400; letter-spacing: -.025em; line-height: 1.2; }
.ap-modal__p { margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.ap-modal__p b { color: var(--text); font-weight: 500; }
.ap-modal__x { position: absolute; right: 14px; top: 14px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.ap-modal__x:hover { color: var(--text); border-color: var(--line-2); }
.ap-modal__x svg { width: 15px; height: 15px; }
.ap-modal__act { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.ap-modal.is-drawer { justify-content: flex-end; align-items: stretch; padding: 0; }
.ap-modal.is-drawer .ap-modal__box { max-width: 560px; max-height: none; height: 100%; border-width: 0 0 0 1px; animation: apSlide .4s var(--ap-ease); padding: 30px 28px; }
.ap-modal.is-drawer .ap-modal__box > .ap-br { display: none; }
@keyframes apFade { from { opacity: 0; } }
@keyframes apPop { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes apSlide { from { transform: translateX(40px); opacity: 0; } }
.ap-cn__head { display: flex; gap: 14px; align-items: center; }
.ap-cn__mark { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border: 1px solid var(--line-2); color: var(--neon); }
.ap-cn__mark svg { width: 22px; height: 22px; }
.ap-cn__head .ap-eyebrow { margin-bottom: 4px; }
.ap-wl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.ap-connectbox .ap-wl { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.ap-wl__i { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .2); color: var(--text) !important; text-decoration: none !important; text-align: left; cursor: pointer; font: inherit; transition: border-color .2s, background .2s, transform .2s var(--ap-ease); }
.ap-wl__i:hover { border-color: var(--line-2); background: rgba(61, 255, 154, .04); }
.ap-wl__i > img, .ap-wl__gen { grid-row: 1 / 3; width: 34px; height: 34px; object-fit: contain; }
.ap-wl__gen { display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--muted); }
.ap-wl__gen svg { width: 18px; height: 18px; }
.ap-wl__i b { font-size: 14.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-wl__i small { justify-self: start; font-family: var(--ap-wide); font-stretch: var(--wide-stretch, 100%); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.ap-wl__i.is-det { border-color: rgba(61, 255, 154, .38); }
.ap-wl__i.is-det small { color: var(--neon); }
.ap-wl__i.is-det small::before { content: '● '; color: var(--ok); }
.ap-wl__i.is-busy { border-color: var(--neon); }
.ap-wl__i.is-wait { pointer-events: none; }
.ap-wl__i.is-wait:not(.is-busy) { opacity: .45; }
.ap-sig { margin: 16px 0 0; padding: 14px; background: #070905; border: 1px solid var(--line); font-family: var(--ap-mono); font-size: 12px; line-height: 1.65; color: var(--muted); white-space: pre-wrap; word-break: break-word; max-height: 240px; overflow: auto; }
.ap-steps { margin: 16px 0 0; padding-left: 20px; font-size: 13.5px; line-height: 1.6; color: var(--muted); display: grid; gap: 6px; }
.ap-steps b { color: var(--text); font-weight: 500; }

/* ---------- toast ---------- */
.ap-toast { position: fixed; left: 50%; bottom: 24px; z-index: 500; transform: translate(-50%, 14px); opacity: 0; pointer-events: none; max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); font-family: 'Geist', ui-sans-serif, system-ui, sans-serif; font-size: 14px; line-height: 1.45; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9); transition: opacity .3s, transform .4s cubic-bezier(.2, .7, .1, 1); }
.ap-toast[data-kind="warn"] { border-color: rgba(255, 194, 75, .5); }
.ap-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* =====================================================================
   PLAYGROUND
   ===================================================================== */
.pg-ask { position: relative; margin-top: 8px; padding: 26px; border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(61, 255, 154, .06), rgba(17, 21, 12, .85) 60%); }
.pg-ask__form { display: flex; gap: 10px; margin-top: 14px; }
.pg-ask__form .ap-in { height: 60px; font-size: 18px; flex: 1; padding: 0 18px; }
.pg-ask__form .ap-btn { min-height: 60px; }
.pg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pg-chip { padding: 7px 11px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); color: var(--muted); font-size: 13px; cursor: pointer; text-align: left; font-family: inherit; }
.pg-chip:hover { color: var(--text); border-color: var(--line-2); }
.pg-chip { max-width: 100%; overflow-wrap: anywhere; }
.pg-quota { margin-left: auto; font-family: var(--ap-mono); font-size: 11px; color: var(--dim); }
.pg-answer { margin-top: 20px; }
.pg-answer__a { position: relative; padding: 18px 20px; border-left: 2px solid var(--neon); background: rgba(0, 0, 0, .3); font-size: 16.5px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.pg-answer__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-family: var(--ap-mono); font-size: 11px; color: var(--dim); }
.pg-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.pg-step { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .2); }
.pg-step > i { font-style: normal; font-family: var(--ap-mono); font-size: 11px; color: var(--neon); }
.pg-step code { font-family: var(--ap-mono); font-size: 12.5px; color: var(--neon); }
.pg-step p { margin: 3px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.pg-step.is-fail { border-color: rgba(255, 90, 78, .35); }
.pg-main { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 0; margin-top: 44px; border: 1px solid var(--line); background: rgba(5, 10, 8, .6); }
.pg-side { border-right: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; }
.pg-side__top { padding: 14px; border-bottom: 1px solid var(--line); }
.pg-side__top .ap-search { max-width: none; }
.pg-side__toggle { display: none; }
.pg-list { flex: 1; overflow: auto; max-height: 760px; padding: 6px 0 12px; }
.pg-grp { padding: 14px 16px 6px; font-family: var(--ap-wide); font-stretch: var(--wide-stretch, 100%); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.pg-grp svg { width: 13px; height: 13px; color: var(--neon-2); }
.pg-grp span { margin-left: auto; }
.pg-tool { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 9px 16px 9px 14px; border: 0; border-left: 2px solid transparent; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.pg-tool code { font-family: var(--ap-mono); font-size: 12.5px; }
.pg-tool small { font-size: 12px; color: var(--dim); }
.pg-tool:hover { background: rgba(61, 255, 154, .035); }
.pg-tool.is-on { border-left-color: var(--neon); background: rgba(61, 255, 154, .07); }
.pg-tool.is-on code { color: var(--neon); }
.pg-tool .pg-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-left: 6px; vertical-align: middle; }
.pg-tool .pg-dot.is-down { background: var(--bad); }
.pg-panel { min-width: 0; padding: 28px; }
.pg-head { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: baseline; }
.pg-head h2 { margin: 0; font-family: var(--ap-mono); font-size: 22px; font-weight: 400; letter-spacing: -.02em; color: var(--neon); overflow-wrap: anywhere; }
.pg-head span { font-size: 15px; color: var(--text); }
.pg-desc { margin: 12px 0 0; font-size: 14px; line-height: 1.65; color: var(--muted); max-width: 760px; }
.pg-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pg-form { margin-top: 22px; display: grid; gap: 16px; }
.pg-f { display: grid; gap: 6px; }
.pg-f > label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-family: var(--ap-mono); font-size: 12px; color: var(--text); }
.pg-f > label em { font-style: normal; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--neon); }
.pg-f > label small { font-family: var(--ap-sans); font-size: 12.5px; color: var(--dim); }
.pg-f__row { display: flex; gap: 8px; flex-wrap: wrap; }
.pg-f__row .ap-in { flex: 1 1 260px; }
.pg-f__help { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-help { padding: 5px 9px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-family: var(--ap-wide); font-stretch: var(--wide-stretch, 100%); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.pg-help:hover { color: var(--neon); border-color: var(--line-2); }
.pg-f__err { font-size: 12.5px; color: var(--bad); }
.pg-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.pg-result { margin-top: 28px; border: 1px solid var(--line); }
.pg-result__h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px 0 0; border-bottom: 1px solid var(--line); }
.pg-result__h .ap-ctabs { border-bottom: 0; }
.pg-result__meta { font-family: var(--ap-mono); font-size: 11px; color: var(--dim); display: flex; gap: 10px; align-items: center; padding: 8px 0 8px 12px; }
.pg-result__b { padding: 18px; min-width: 0; }
.pg-sum { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 12px 14px; background: rgba(61, 255, 154, .05); border-left: 2px solid var(--neon); font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.pg-sum.is-err { background: rgba(255, 90, 78, .07); border-left-color: var(--bad); }
.pg-sum svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--neon); }
.pg-sum.is-err svg { color: var(--bad); }
.pg-pre { margin: 0; padding: 14px; max-height: 560px; overflow: auto; background: #070905; border: 1px solid var(--line); font-family: var(--ap-mono); font-size: 12.5px; line-height: 1.6; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.pg-pre--nowrap { white-space: pre; word-break: normal; }
.pg-cmd + .pg-cmd { margin-top: 18px; }
.pg-cmd .ap-k { margin-bottom: 8px; }
.pg-sign { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--line-2); background: rgba(61, 255, 154, .05); margin-bottom: 16px; }
.pg-sign p { flex: 1 1 260px; margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.pg-sign p b { color: var(--text); font-weight: 500; }
.pg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 16px; }
.pg-stats > div { background: var(--panel); padding: 14px; min-width: 0; }
.pg-stats b { display: block; margin-top: 6px; font-size: 20px; font-weight: 300; letter-spacing: -.02em; overflow-wrap: anywhere; }

/* =====================================================================
   SIGNING PAGE
   ===================================================================== */
.sg-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.sg-side { position: sticky; top: calc(var(--ap-nav) + 76px); display: grid; gap: 16px; }
.sg-state { position: relative; padding: 30px; border: 1px solid var(--line-2); background: var(--panel); }
.sg-state.is-bad { border-color: rgba(255, 90, 78, .55); background: linear-gradient(180deg, rgba(255, 90, 78, .09), var(--panel) 70%); }
.sg-state.is-warn { border-color: rgba(255, 194, 75, .5); background: linear-gradient(180deg, rgba(255, 194, 75, .08), var(--panel) 70%); }
.sg-state h2 { margin: 10px 0 0; font-size: 28px; font-weight: 300; letter-spacing: -.03em; }
.sg-state p { margin: 12px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--muted); max-width: 640px; }
.sg-state p b { color: var(--text); font-weight: 500; }
.sg-state .ap-cta { margin-top: 22px; }
.sg-state__ic { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line-2); color: var(--neon); }
.sg-state__ic svg { width: 21px; height: 21px; }
.sg-state.is-bad .sg-state__ic { color: var(--bad); border-color: rgba(255, 90, 78, .5); }
.sg-state.is-warn .sg-state__ic { color: var(--warn); border-color: rgba(255, 194, 75, .5); }
.sg-redban { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; margin-bottom: 18px; border: 1px solid var(--bad); background: rgba(255, 90, 78, .12); color: #FFD3CF; font-size: 14.5px; line-height: 1.55; }
.sg-redban svg { width: 20px; height: 20px; flex: none; color: var(--bad); margin-top: 1px; }
.sg-redban b { color: #fff; }
.sg-summary { position: relative; padding: 24px; border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(22, 27, 16, .9), rgba(17, 21, 12, .9)); }
.sg-summary h2 { margin: 8px 0 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 300; letter-spacing: -.03em; line-height: 1.2; overflow-wrap: anywhere; }
.sg-summary__meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 20px; background: var(--line); border: 1px solid var(--line); }
.sg-summary__meta > div { background: var(--panel); padding: 12px; min-width: 0; }
.sg-summary__meta b { display: block; margin-top: 5px; font-size: 14px; font-weight: 400; overflow-wrap: anywhere; }
.sg-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.sg-step { position: relative; border: 1px solid var(--line); background: var(--panel); }
.sg-step.is-mismatch { border-color: var(--bad); }
.sg-step.is-done { border-color: rgba(0, 200, 5, .5); }
.sg-step__h { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sg-step__n { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-2); font-family: var(--ap-mono); font-size: 12px; color: var(--neon); flex: none; }
.sg-step.is-done .sg-step__n { background: var(--ok); border-color: var(--ok); color: #031; }
.sg-step__n svg { width: 15px; height: 15px; }
.sg-step__h h3 { flex: 1; min-width: 200px; margin: 0; font-size: 16.5px; font-weight: 400; overflow-wrap: anywhere; }
.sg-step__b { padding: 16px 18px; display: grid; gap: 14px; }
.sg-dec { display: grid; gap: 0; border: 1px solid var(--line); }
.sg-dec > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 9px 12px; border-bottom: 1px solid rgba(61, 255, 154, .06); font-size: 13.5px; }
.sg-dec > div:last-child { border-bottom: 0; }
.sg-dec dt, .sg-dec .ap-k { padding-top: 2px; }
.sg-dec span { min-width: 0; overflow-wrap: anywhere; }
.sg-match { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; font-size: 13.5px; line-height: 1.5; border: 1px solid rgba(0, 200, 5, .35); background: rgba(0, 200, 5, .06); }
.sg-match svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ok); }
.sg-match.is-bad { border-color: var(--bad); background: rgba(255, 90, 78, .1); color: #FFD3CF; }
.sg-match.is-bad svg { color: var(--bad); }
.sg-match.is-warn { border-color: rgba(255, 194, 75, .45); background: rgba(255, 194, 75, .07); }
.sg-match.is-warn svg { color: var(--warn); }
.sg-sim { border: 1px solid var(--line); }
.sg-sim__h { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.sg-sim__h svg { width: 16px; height: 16px; }
.sg-sim__h.is-ok svg { color: var(--ok); } .sg-sim__h.is-bad svg { color: var(--bad); } .sg-sim__h.is-wait svg { color: var(--warn); }
.sg-sim__b { padding: 12px; display: grid; gap: 10px; font-size: 13.5px; }
.sg-changes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sg-changes li { display: flex; justify-content: space-between; gap: 10px; font-family: var(--ap-mono); font-size: 12.5px; }
.sg-changes .is-out { color: #FF8E85; } .sg-changes .is-in { color: var(--ok); }
.sg-raw summary { font-size: 10.5px; }
.sg-raw pre { margin: 0; padding: 12px; background: #070905; border: 1px solid var(--line); font-family: var(--ap-mono); font-size: 11.5px; line-height: 1.55; color: var(--muted); white-space: pre-wrap; word-break: break-all; max-height: 220px; overflow: auto; }
.sg-step__f { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .2); }
.sg-step__f p { flex: 1 1 220px; margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.sg-step__f p b { color: var(--text); font-weight: 500; }
.sg-txok { display: grid; gap: 8px; padding: 14px; border: 1px solid rgba(0, 200, 5, .45); background: rgba(0, 200, 5, .06); font-size: 13.5px; }
.sg-txok a { color: var(--neon); text-decoration: none; font-family: var(--ap-mono); word-break: break-all; }
.sg-card { position: relative; padding: 20px; border: 1px solid var(--line); background: var(--panel); }
.sg-card h3 { margin: 0 0 12px; font-family: var(--ap-wide); font-stretch: var(--wide-stretch, 100%); font-size: 11px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.sg-card p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.sg-card p b { color: var(--text); font-weight: 500; }
.sg-card .ap-wl { grid-template-columns: 1fr; margin-top: 0; }
.sg-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sg-checks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.sg-checks li svg { width: 15px; height: 15px; margin-top: 2px; }
.sg-checks .is-ok svg { color: var(--ok); } .sg-checks .is-bad svg { color: var(--bad); } .sg-checks .is-wait svg { color: var(--dim); } .sg-checks .is-warn svg { color: var(--warn); }
.sg-checks b { color: var(--text); font-weight: 500; }
.sg-done { padding: 22px; border: 1px solid rgba(0, 200, 5, .5); background: linear-gradient(180deg, rgba(0, 200, 5, .08), var(--panel)); }
.sg-done h3 { margin: 6px 0 0; font-size: 22px; font-weight: 300; letter-spacing: -.02em; }
.sg-done pre { margin: 14px 0 0; padding: 12px; background: #070905; border: 1px solid var(--line); font-family: var(--ap-mono); font-size: 12px; line-height: 1.6; color: var(--text); white-space: pre-wrap; word-break: break-all; }

/* =====================================================================
   KEYS
   ===================================================================== */
.ky-cmp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ky-cmp > div { background: var(--panel); padding: 20px; min-width: 0; }
.ky-cmp > div.is-on { background: linear-gradient(180deg, rgba(61, 255, 154, .08), var(--panel)); }
.ky-cmp b.ky-n { display: block; margin-top: 10px; font-size: 30px; font-weight: 300; letter-spacing: -.03em; }
.ky-cmp b.ky-n small { font-size: 12px; font-family: var(--ap-mono); color: var(--muted); letter-spacing: .04em; margin-left: 4px; }
.ky-cmp p { margin: 8px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.ky-who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.ky-who > div { padding: 16px; border: 1px solid var(--line); font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.ky-who b { display: block; margin-bottom: 6px; color: var(--text); font-weight: 500; }
.ky-signed { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ky-signed > span { flex: 1 1 240px; font-size: 14px; color: var(--muted); }
.ky-signed > span b { color: var(--text); font-weight: 500; }
.ky-create { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.ky-create .ap-in { flex: 1 1 240px; }
.ky-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); }
.ky-key { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) auto; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid rgba(61, 255, 154, .06); }
.ky-key:last-child { border-bottom: 0; }
.ky-key > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 13.5px; }
.ky-key > span b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ky-key code { font-family: var(--ap-mono); font-size: 12px; color: var(--neon); }
.ky-reveal { margin-top: 16px; padding: 16px; border: 1px solid var(--neon); background: rgba(61, 255, 154, .06); }
.ky-reveal code { display: block; padding: 14px; margin-top: 10px; background: #070905; border: 1px solid var(--line-2); font-family: var(--ap-mono); font-size: 14px; color: var(--neon); word-break: break-all; user-select: all; }
.ky-reveal .ap-check { margin-top: 14px; color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .ap-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-connectbox .ap-wl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sg-grid { grid-template-columns: minmax(0, 1fr); }
  .sg-side { position: static; }
  .ap-ap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
  .ap-ap__amt { grid-column: 1; } .ap-ap__risk { grid-column: 2; } .ap-ap__act { grid-column: 3; grid-row: 1; }
}
@media (max-width: 900px) {
  .ap-row { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 40px 0; }
  .ap-row__l > p { max-width: 560px; }
  .pg-main { grid-template-columns: minmax(0, 1fr); }
  .pg-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .pg-side__toggle { display: flex; }
  .pg-list { max-height: 360px; }
  .pg-main.is-collapsed .pg-list, .pg-main.is-collapsed .pg-side__top .ap-search { display: none; }
  .ap-grid3, .ky-cmp { grid-template-columns: minmax(0, 1fr); }
  .ap-bar__in { flex-wrap: wrap; gap: 0 12px; padding-top: 4px; padding-bottom: 4px; }
  .ap-tabs { order: 2; width: 100%; margin: 0 -12px; }
  .ap-bar__right { order: 1; width: 100%; justify-content: flex-end; padding-top: 6px; }
  .ap-tabs a { padding: 12px 12px 11px; }
  .ap-acct { flex-wrap: nowrap; }
}
@media (max-width: 640px) {
  .ap-page { --ap-nav: var(--nav-h, 64px); padding-bottom: 72px; }
  .ap-wrap { width: calc(100% - 32px); }
  .ap-hero { padding-top: 40px; padding-bottom: 36px; }
  .ap-h1 { font-size: clamp(34px, 10.5vw, 46px); }
  .ap-lead { font-size: 15.5px; }
  .ap-cta .ap-btn { flex: 1 1 100%; white-space: normal; text-align: center; line-height: 1.5; padding-top: 10px; padding-bottom: 10px; }
  .ap-grid4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ap-stat, .ap-card { padding: 16px 14px; }
  .ap-big { font-size: 22px; }
  .ap-why { font-size: 12px; }
  .ap-wl, .ap-connectbox .ap-wl { grid-template-columns: minmax(0, 1fr); }
  .ap-connectbox { padding: 16px; }
  .ap-acct__w, .ap-badge--tier { display: none; }
  .ap-badge { padding: 0 7px; letter-spacing: .08em; }
  .ap-acct__a { padding: 0 8px; font-size: 12px; }
  .ap-logout span { display: none; }
  .ap-logout { padding: 0 10px; }
  .ap-tabs a { letter-spacing: .12em; padding: 11px 9px 10px; font-size: 10.5px; }
  .ap-tabs a i { display: none; }
  /* tables become stacked cards */
  .ap-table thead { display: none; }
  .ap-table, .ap-table tbody, .ap-table tr, .ap-table td { display: block; width: 100%; }
  .ap-table tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .ap-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
  .ap-table td[data-k]::before { content: attr(data-k); font-family: var(--ap-wide); font-stretch: var(--wide-stretch, 100%); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); text-align: left; flex: none; }
  .ap-table td:first-child { padding-bottom: 8px; justify-content: flex-start; text-align: left; }
  .ap-table td:first-child .ap-tok > span:not(.ap-tl) { align-items: flex-start; }
  .ap-table td:first-child::before { display: none; }
  .ap-table--auto td:first-child::before { display: block; }
  .ap-table .ap-act { justify-content: flex-end; padding-top: 8px; }
  .ap-tok small { max-width: 170px; }
  .ap-ap { grid-template-columns: minmax(0, 1fr) auto; padding: 14px; }
  .ap-ap .ap-tok { grid-column: 1 / -1; }
  .ap-ap__sp { grid-column: 1; } .ap-ap__risk { grid-column: 2; grid-row: 2; justify-self: end; }
  .ap-ap__amt { grid-column: 1; } .ap-ap__act { grid-column: 2; grid-row: 3; justify-self: end; }
  .ap-actrow { grid-template-columns: 30px minmax(0, 1fr); padding: 12px; }
  .ap-actrow__ic { width: 30px; height: 30px; }
  .ap-actrow__a { grid-column: 2; }
  .ap-field--big .ap-btn, .ap-seg { flex: 1 1 100%; }
  .ap-seg button { flex: 1; }
  .ap-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ap-kv__r { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ap-dr__score { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .ap-modal { align-items: flex-end; padding: 0; }
  .ap-modal__box, .ap-modal.is-drawer .ap-modal__box { max-width: none !important; width: 100%; height: auto; max-height: 92vh; border-width: 1px 0 0; padding: 24px 16px calc(20px + env(safe-area-inset-bottom)); animation: apUp .35s var(--ap-ease); }
  .ap-modal.is-drawer { align-items: flex-end; }
  .ap-modal__h { font-size: 21px; }
  .ap-modal__act .ap-btn { flex: 1 1 auto; }
  .ap-toast { bottom: 16px; }
  .pg-ask { padding: 18px 14px; }
  .pg-ask__form { flex-direction: column; }
  .pg-ask__form .ap-in { height: 52px; font-size: 16px; }
  .pg-ask__form .ap-btn { min-height: 50px; }
  .pg-panel { padding: 18px 14px; }
  .pg-result__b { padding: 14px 12px; }
  .pg-head h2 { font-size: 18px; }
  .sg-summary, .sg-state { padding: 20px 16px; }
  .sg-summary__meta { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sg-step__h, .sg-step__b, .sg-step__f { padding-left: 14px; padding-right: 14px; }
  .sg-dec > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .sg-step__f .ap-btn { flex: 1 1 100%; }
  .ky-who { grid-template-columns: minmax(0, 1fr); }
  .ky-key { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ky-key > span:first-child { grid-column: 1 / -1; }
  .ky-key .ap-btn { grid-column: 1 / -1; }
}
@media (max-width: 400px) {
  .ap-bar__right { flex-wrap: wrap; row-gap: 6px; gap: 6px; }
  .ap-badge[data-chain] { font-size: 0; gap: 0; padding: 0 9px; }
  .ap-badge[data-chain] i { width: 8px; height: 8px; }
  .ap-bar__right .ap-example { padding: 0 5px; letter-spacing: .08em; }
}
@media (max-width: 380px) {
  .ap-grid4 { grid-template-columns: minmax(0, 1fr); }
  .ap-facts, .sg-summary__meta { grid-template-columns: minmax(0, 1fr); }
}
@keyframes apUp { from { transform: translateY(30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ap-page *, .ap-modal, .ap-modal * { animation: none !important; transition: none !important; }
}
