/* Brand tokens (Earth, Warm Pink, Sand) on this tool's own layout. Components use tokens only. */
:root {
  --bg: #fbf6f4; --surface: #ffffff; --ink: #300402; --muted: #7a5a56; --line: #ecdad4;
  --sand: #f6dcd5; --pink: #f63080; --pink-text: #c41e68; --band: #300402; --band-ink: #f4f2f2;
  --ok: #1f7a4a; --ok-fill: #2e9e4f; --ok-bg: #dff3e7;
  --bad: #b42323; --bad-fill: #d64545; --bad-bg: #fbe3e1;
  --wait: #8a4b14; --wait-fill: #e8590c; --wait-bg: #fde8d8;
  --link: #1f57b8; --link-fill: #2f6fe0; --link-bg: #e1ebfd;
  --shadow: 0 18px 44px -28px rgba(48, 4, 2, 0.4);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #170504; --surface: #2a0f0d; --ink: #f4f2f2; --muted: #cba9a3; --line: #4a2622; --sand: #43201c;
  --pink-text: #ff77ae; --band: #0f0302; --ok: #6fd69b; --ok-bg: #123a25; --bad: #ff9b94; --bad-bg: #44181a;
  --wait: #ffb07a; --wait-bg: #43230f; --link: #93b8ff; --link-bg: #16264a;
  --shadow: 0 18px 44px -28px rgba(0, 0, 0, 0.8); color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #170504; --surface: #2a0f0d; --ink: #f4f2f2; --muted: #cba9a3; --line: #4a2622; --sand: #43201c;
    --pink-text: #ff77ae; --band: #0f0302; --ok: #6fd69b; --ok-bg: #123a25; --bad: #ff9b94; --bad-bg: #44181a;
    --wait: #ffb07a; --wait-bg: #43230f; --link: #93b8ff; --link-bg: #16264a;
    --shadow: 0 18px 44px -28px rgba(0, 0, 0, 0.8); color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Figtree, system-ui, sans-serif; }
h1, h2 { line-height: 1.1; margin: 0 0 8px; letter-spacing: -0.02em; font-weight: 800; }
p { margin: 0 0 12px; }
a { color: var(--pink-text); }
code, pre, .code { font-family: ui-monospace, "Cascadia Mono", Menlo, monospace; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }

header.top { background: var(--band); color: var(--band-ink); border-bottom: 4px solid var(--pink); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 68px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; margin-right: auto; }
.brand svg { color: var(--pink); }
.pill { padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.3); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.theme { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); }
.theme button { min-height: 38px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--band-ink); font: inherit; font-size: 0.85rem; cursor: pointer; }
.theme button[aria-pressed="true"] { background: var(--pink); color: #fff; font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--sand); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--pink); color: #fff; }
.btn.outline { background: transparent; color: inherit; border: 1.5px solid currentColor; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; }
input, select { min-height: 46px; padding: 0 14px; }
input:focus, textarea:focus { border-color: var(--pink); }

/* connect */
.connect { display: grid; gap: 28px; align-items: center; padding-block: 40px; }
.connect h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.connect form { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 24px; display: grid; gap: 14px; }
.connect label { display: grid; gap: 4px; font-weight: 700; font-size: 0.9rem; }
.connect label span { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.connect ul { padding-left: 18px; color: var(--muted); }
.error { color: var(--bad); font-weight: 600; margin: 0; }
@media (min-width: 860px) { .connect { grid-template-columns: 1.1fr 1fr; gap: 56px; padding-block: 72px; } }

/* overview */
.overview { padding-block: 28px 8px; }
.overview h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.meter { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--line); margin: 14px 0 12px; }
.meter i { display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.legend button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.legend button[aria-pressed="true"] { border-color: var(--pink); box-shadow: 0 0 0 2px var(--pink); }
.legend b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.passed { --c: var(--ok-fill); --t: var(--ok); --b: var(--ok-bg); }
.failed { --c: var(--bad-fill); --t: var(--bad); --b: var(--bad-bg); }
.pending, .running { --c: var(--wait-fill); --t: var(--wait); --b: var(--wait-bg); }
.ready { --c: var(--link-fill); --t: var(--link); --b: var(--link-bg); }
.skipped { --c: var(--muted); --t: var(--muted); --b: var(--sand); }
.none { --c: var(--line); --t: var(--muted); --b: var(--bg); }

.map { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.tile { display: grid; gap: 6px; justify-items: start; min-height: 76px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; transition: transform 0.15s; }
.tile:hover { transform: translateY(-2px); }
.tile[aria-pressed="true"] { background: var(--band); color: var(--band-ink); border-color: var(--pink); }
.tile strong { font-size: 1.05rem; letter-spacing: 0.04em; }
.tile small { font-size: 0.74rem; opacity: 0.8; font-variant-numeric: tabular-nums; }
.tile .meter { height: 6px; width: 100%; margin: 0; }

/* list */
.toolbar { position: sticky; top: 0; z-index: 2; background: var(--bg); padding-block: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--sand); margin-right: auto; }
.tabs button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--band); color: var(--band-ink); }
.row { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--c); border-radius: 16px; padding: 12px 16px; margin-bottom: 10px; }
.line { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ccy { min-width: 4em; font-weight: 800; letter-spacing: 0.04em; }
.rail { flex: 1; min-width: 160px; }
.rail small { display: block; color: var(--muted); font-size: 0.78rem; }
.badge { padding: 3px 12px; border-radius: 999px; background: var(--b); color: var(--t); font-weight: 700; font-size: 0.82rem; }
.summary { margin: 6px 0 0; color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.extra { margin-top: 10px; }
.extra .btn { min-height: 44px; padding: 0 14px; font-size: 0.88rem; }
textarea { width: 100%; min-height: 150px; margin-top: 10px; padding: 12px; font: 0.85rem ui-monospace, "Cascadia Mono", monospace; background: var(--bg); }
details { margin-top: 10px; }
summary { cursor: pointer; font-size: 0.88rem; min-height: 32px; }
pre { background: var(--bg); border: 1px solid var(--line); padding: 12px; border-radius: 10px; overflow: auto; max-height: 320px; font-size: 0.8rem; }
.empty { padding: 32px; text-align: center; color: var(--muted); }
footer { padding-block: 28px 40px; color: var(--muted); font-size: 0.82rem; text-align: center; }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:hover { transform: none; } }
@media (max-width: 520px) { .map { grid-template-columns: repeat(4, 1fr); gap: 6px; } .tile { padding: 8px; } .tile small { font-size: 0.68rem; } }

/* entity */
.who { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; margin-top: 24px; padding: 18px 20px; border-radius: 22px; color: #f4f2f2; background: linear-gradient(120deg, #300402 35%, #7a1030 75%, #c41e68); background-size: 220% 100%; animation: drift 14s ease-in-out infinite alternate; box-shadow: var(--shadow); }
.who .eyebrow { color: #f6dcd5; margin: 0; }
.who h2 { margin: 0; font-size: 1.45rem; overflow-wrap: anywhere; }
.who-name { margin-right: auto; }
.avatar { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 50%; background: var(--pink); border: 3px solid rgba(255, 255, 255, 0.35); font-weight: 800; font-size: 1.15rem; }
.id { background: none; border: 0; padding: 4px 0; min-height: 28px; color: inherit; opacity: 0.8; font: 0.78rem ui-monospace, "Cascadia Mono", monospace; cursor: pointer; }
.chips, .funds { display: flex; flex-wrap: wrap; gap: 8px; }
.funds { width: 100%; }
.chip { padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); font-size: 0.8rem; font-weight: 700; text-transform: capitalize; }
.fund { padding: 6px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.12); font-size: 0.82rem; font-variant-numeric: tabular-nums; animation: rise 0.4s both; }
.fund b { margin-right: 6px; }
.fund.warn { background: var(--wait-bg); color: var(--wait); font-weight: 700; }

/* progress */
.progress { position: relative; height: 34px; margin-bottom: 12px; border-radius: 999px; overflow: hidden; background: var(--sand); }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: color-mix(in srgb, var(--pink) 45%, var(--sand)); transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.progress span { position: relative; display: block; text-align: center; line-height: 34px; font-weight: 700; font-size: 0.85rem; color: var(--ink); }

/* checks and the live feed */
.columns { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.feed { position: fixed; z-index: 6; left: 8px; right: 8px; bottom: 8px; height: 72vh; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); transform: translateY(110%); visibility: hidden; transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.35s; }
.feed.open { transform: none; visibility: visible; }
.feed header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--band); color: var(--band-ink); }
.feed header strong { margin-right: auto; }
.feed header button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.3); background: transparent; color: inherit; font: inherit; font-size: 0.82rem; cursor: pointer; }
.count { font-variant-numeric: tabular-nums; font-size: 0.82rem; opacity: 0.8; }
#calls { overflow: auto; padding: 8px; flex: 1; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.pulse.on { background: var(--pink); animation: pulse 1.1s ease-out infinite; }
.fab { position: fixed; right: 16px; bottom: 16px; z-index: 5; min-height: 52px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--pink); background: var(--band); color: var(--band-ink); font: inherit; font-weight: 700; box-shadow: var(--shadow); cursor: pointer; }
@media (min-width: 1100px) {
  .wrap { max-width: 1360px; }
  .columns { grid-template-columns: minmax(0, 1fr) 460px; }
  .feed { position: sticky; top: 76px; left: auto; right: auto; bottom: auto; height: calc(100vh - 92px); transform: none; visibility: visible; }
  .fab, #closeFeed { display: none; }
}

/* one API call: request and response kept apart */
.call { margin: 0 0 8px; border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 12px; background: var(--surface); animation: slide 0.35s both; }
.call > summary { display: flex; align-items: center; gap: 8px; padding: 6px 10px; min-height: 44px; list-style: none; }
.call > summary::-webkit-details-marker { display: none; }
.verb { padding: 2px 8px; border-radius: 6px; font: 800 0.7rem ui-monospace, "Cascadia Mono", monospace; background: var(--sand); color: var(--ink); }
.verb.POST { background: var(--pink); color: #fff; }
.path { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 0.8rem ui-monospace, "Cascadia Mono", monospace; }
.code-chip { padding: 2px 8px; border-radius: 999px; background: var(--b); color: var(--t); font-weight: 800; font-size: 0.74rem; font-variant-numeric: tabular-nums; }
.ms { color: var(--muted); font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.from { padding: 0 10px 6px; margin: -4px 0 0; color: var(--muted); font-size: 0.74rem; }
.io { display: grid; gap: 8px; }
.call[open] .io { padding: 0 10px 10px; }
.pane { min-width: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.pane > div { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 10px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.pane > div span { margin-right: auto; }
.pane > div button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; letter-spacing: 0; text-transform: none; cursor: pointer; }
.pane.req > div { background: var(--link-bg); color: var(--link); }
.pane.res > div { background: var(--b); color: var(--t); }
.pane pre { margin: 0; border: 0; border-radius: 0; max-height: 240px; white-space: pre-wrap; overflow-wrap: anywhere; }
.j-key { color: var(--pink-text); }
.j-str { color: var(--ok); }
.j-num { color: var(--link); font-variant-numeric: tabular-nums; }
.j-lit { color: var(--wait); font-weight: 700; }
.steps { margin-top: 8px; }
#list .io { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }

/* motion */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes slide { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { background-position: 0 0; } to { background-position: 100% 0; } }
@keyframes pulse { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pink) 70%, transparent); } to { box-shadow: 0 0 0 10px transparent; } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes flash { 40% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 40%, transparent); } }
@keyframes pop { 0% { transform: scale(0.6); } 70% { transform: scale(1.12); } 100% { transform: none; } }
.row { position: relative; overflow: hidden; transition: border-color 0.3s, box-shadow 0.2s; }
.row:hover { box-shadow: var(--shadow); }
.row.enter { animation: rise 0.4s both; }
.row.running::after { content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 3px; background: linear-gradient(90deg, transparent, var(--pink), transparent); animation: sweep 1.2s linear infinite; }
.row.settled { animation: flash 0.9s ease-out; }
.row.settled .badge { animation: pop 0.4s both; }
.now { margin: 6px 0 0; color: var(--pink-text); font: 0.8rem ui-monospace, "Cascadia Mono", monospace; overflow-wrap: anywhere; }
.was { padding: 3px 10px; border-radius: 999px; border: 1.5px dashed var(--c); color: var(--t); font-size: 0.74rem; font-weight: 700; }
.meter i { width: 0; transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.connect > * { animation: rise 0.6s both; }
.connect form { animation-delay: 0.12s; }
.legend button, .btn, .tabs button { transition: transform 0.15s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s; }
.legend button:hover, .btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.fund.more { border: 0; color: inherit; font: inherit; font-size: 0.82rem; font-weight: 700; min-height: 32px; cursor: pointer; text-decoration: underline; }
