:root {
  color-scheme: dark;
  --bg: #07100f;
  --panel: #0d1917;
  --panel-2: #101f1c;
  --line: #263a35;
  --text: #eaf7f2;
  --muted: #91aaa1;
  --mint: #65f0bb;
  --mint-dim: #163e31;
  --blue: #8fb9ff;
  --danger: #ff9ba7;
  --danger-bg: #351c22;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 78% -10%, #153d30 0, transparent 36rem), var(--bg); color: var(--text); }
button, input { font: inherit; }
button, .button-link { border: 1px solid #3a554d; border-radius: 9px; background: #152822; color: var(--text); padding: .7rem 1rem; cursor: pointer; transition: 140ms ease; }
button:hover:not(:disabled), .button-link:hover { border-color: var(--mint); background: #1a342b; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #a7f8d7; outline-offset: 2px; }

.site-header { min-height: 88px; padding: 1.2rem clamp(1rem, 4vw, 4rem); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); background: rgba(7, 16, 15, .8); backdrop-filter: blur(14px); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 1.2rem; letter-spacing: -.02em; }
h2 { margin-bottom: .65rem; letter-spacing: -.035em; }
.eyebrow { margin-bottom: .35rem; color: var(--mint); font-size: .69rem; font-weight: 800; letter-spacing: .16em; }
.status { display: flex; gap: .55rem; align-items: center; color: #f4d38b; font-size: .84rem; }
.status span { width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 14px currentColor; }
.status.live { color: var(--mint); }
.status.error-state { color: var(--danger); }

main { width: min(1500px, 100%); margin: auto; padding: clamp(1rem, 3vw, 2.5rem); }
.hero { display: grid; grid-template-columns: minmax(0, .85fr) minmax(420px, 1.15fr); gap: clamp(1.4rem, 4vw, 4rem); align-items: end; padding: clamp(1rem, 4vw, 3.5rem) 0; }
.hero h2 { max-width: 700px; font-size: clamp(2.2rem, 5vw, 4.8rem); line-height: .98; }
.lede { max-width: 650px; color: var(--muted); font-size: 1.04rem; line-height: 1.65; }
.url-box { padding: 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(13, 25, 23, .82); box-shadow: 0 18px 70px rgba(0, 0, 0, .23); }
.url-box label { display: block; margin-bottom: .55rem; color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }
.url-row { display: flex; gap: .65rem; }
.url-row input { min-width: 0; flex: 1; border: 1px solid #355149; border-radius: 9px; padding: .8rem; color: var(--blue); background: #07110f; }
.micro { margin: .7rem 0 0; color: var(--muted); font-size: .76rem; }

.workspace { min-height: 610px; display: grid; grid-template-columns: minmax(330px, .72fr) minmax(0, 1.28fr); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 22px 90px rgba(0, 0, 0, .28); }
.request-panel { border-right: 1px solid var(--line); }
.panel-header, .detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.25rem; border-bottom: 1px solid var(--line); }
.panel-header h2, .detail-heading h2 { margin: 0; font-size: 1.1rem; }
.panel-header h2 span { margin-left: .35rem; color: var(--muted); font-weight: 500; }
.danger { color: var(--danger); border-color: #60343c; background: var(--danger-bg); }
.request-list { max-height: 650px; overflow: auto; padding: .65rem; }
.request-card { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .42rem .75rem; margin-bottom: .45rem; padding: .9rem; text-align: left; border-color: transparent; background: transparent; }
.request-card:hover, .request-card.active { background: var(--panel-2); border-color: #365049; }
.request-card .path { overflow: hidden; color: var(--text); white-space: nowrap; text-overflow: ellipsis; }
.request-card .meta { grid-column: 2; color: var(--muted); font-size: .75rem; }
.method { color: var(--mint); font-size: .72rem; font-weight: 900; letter-spacing: .07em; }
.empty-state, .detail-placeholder { min-height: 440px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 2rem; text-align: center; color: var(--muted); }
.empty-state h3, .detail-placeholder h2 { color: var(--text); }
.empty-state code { display: block; max-width: 100%; margin-top: 1rem; padding: .8rem; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 8px; color: var(--blue); background: #07110f; }
.pulse-ring { width: 1.2rem; height: 1.2rem; margin-bottom: 1.5rem; border: 3px solid var(--mint); border-radius: 50%; animation: pulse 1.7s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(101,240,187,.45); } 70% { box-shadow: 0 0 0 18px rgba(101,240,187,0); } 100% { box-shadow: 0 0 0 0 rgba(101,240,187,0); } }

.detail-panel { min-width: 0; background: linear-gradient(180deg, #0e1c19, #0a1513); }
.detail-heading h2 { max-width: 700px; overflow-wrap: anywhere; }
.button-link { display: inline-block; color: var(--text); text-decoration: none; white-space: nowrap; }
.metadata { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; border-bottom: 1px solid var(--line); background: var(--line); }
.metadata div { min-width: 0; padding: .9rem 1rem; background: var(--panel); }
.metadata dt { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.metadata dd { margin: .28rem 0 0; overflow-wrap: anywhere; font-size: .82rem; }
.detail-section { padding: 1.2rem; border-bottom: 1px solid var(--line); }
.detail-section h3 { margin-bottom: .75rem; font-size: .83rem; text-transform: uppercase; letter-spacing: .08em; }
.replay-section p { margin-bottom: .8rem; color: var(--muted); font-size: .8rem; }
.replay-row { display: flex; gap: .65rem; }
.replay-row input { min-width: 0; flex: 1; border: 1px solid #355149; border-radius: 9px; padding: .72rem .8rem; color: var(--blue); background: #07110f; }
.replay-section pre { margin-top: .8rem; max-height: 190px; }
.section-title-row { display: flex; justify-content: space-between; align-items: center; }
.quiet { padding: .35rem .55rem; color: var(--muted); border: 0; background: transparent; font-size: .72rem; }
pre { max-height: 320px; margin: 0; padding: 1rem; overflow: auto; border: 1px solid var(--line); border-radius: 9px; color: #dcebe6; background: #050d0b; white-space: pre-wrap; word-break: break-word; }
.pairs { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.pair { display: grid; grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.pair:last-child { border-bottom: 0; }
.pair span { padding: .65rem .8rem; overflow-wrap: anywhere; }
.pair .key { color: var(--mint); background: #0b1714; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }
.pair .value { color: #cedfd9; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }
.empty-pairs { padding: .8rem; color: var(--muted); font-size: .8rem; }
.error { margin-bottom: 1rem; padding: .9rem 1rem; border: 1px solid #713944; border-radius: 10px; color: #ffd6db; background: #351b21; }
.hidden { display: none !important; }
footer { padding: 1.5rem; color: var(--muted); text-align: center; font-size: .75rem; }

@media (max-width: 900px) {
  .hero, .workspace { grid-template-columns: 1fr; }
  .hero { align-items: stretch; }
  .request-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .request-list { max-height: 420px; }
}
@media (max-width: 560px) {
  .site-header { padding: 1rem; }
  main { padding: .8rem; }
  .hero { padding-top: 2rem; }
  .hero h2 { font-size: 2.6rem; }
  .url-row { flex-direction: column; }
  .metadata { grid-template-columns: 1fr; }
  .detail-heading { align-items: flex-start; flex-direction: column; }
  .pair { grid-template-columns: 1fr; }
  .replay-row { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
