/* The interactive app preview in the hero. Mirrors the app's dark mode (resources/css/app.css in peck). */
.window { position: relative; max-width: 1040px; margin: 64px auto 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); overflow: hidden; text-align: left; }
.app {
    --z950: #09090b; --z900: #18181b; --z800: #27272a; --z700: #3f3f46; --z600: #52525b; --z500: #71717a; --z400: #a1a1aa; --z300: #d4d4d8; --z200: #e4e4e7; --z100: #f4f4f5;
    position: relative; display: flex; height: 540px; background: var(--z900); color: var(--z200);
    font: 13px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; user-select: none; -webkit-user-select: none;
}
.app * { box-sizing: border-box; }
:where(.app button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.app svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app svg.i.s35 { width: 14px; height: 14px; } .app svg.i.s3 { width: 12px; height: 12px; } .app svg.i.s45 { width: 18px; height: 18px; }
.app .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.app .muted { color: var(--z500); }

/* Traffic lights sit over the rail, like a frameless macOS window. */
.a-lights { position: absolute; top: 18px; left: 14px; display: flex; gap: 8px; z-index: 5; }
.a-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.a-lights i:nth-child(2) { background: #febc2e; } .a-lights i:nth-child(3) { background: #28c840; }

.a-rail { width: 48px; flex: none; display: flex; flex-direction: column; background: var(--z950); }
.a-rail-top { height: 48px; border-bottom: 1px solid var(--z800); }
.a-rail-icons { flex: 1; display: flex; flex-direction: column; align-items: center; padding-top: 8px; border-right: 1px solid var(--z800); }
.a-rail-icons .a-icon-btn { width: 32px; height: 32px; margin-bottom: 4px; }
.a-rail-icons .a-icon-btn.on { background: var(--z800); color: #818cf8; }
.a-rail-icons .a-icon-btn:last-child { margin: auto 0 12px; }

.a-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; color: var(--z400); transition: background .15s, color .15s; }
.a-icon-btn:hover { background: var(--z700); color: var(--z100); }

.a-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.a-header { height: 48px; flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 0 12px; background: var(--z950); border-bottom: 1px solid var(--z800); }
.a-header-left { display: flex; align-items: center; gap: 8px; padding-left: 24px; min-width: 0; }
.a-header-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.a-logo { height: 24px; width: 64px; }
.a-project { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; font-weight: 500; white-space: nowrap; }
.a-project:hover { background: var(--z800); }
.a-project .i:first-child { color: var(--z400); }
.a-chevron { transform: rotate(90deg); opacity: .6; }

.a-pop-wrap { position: relative; display: flex; align-items: center; }
.a-pop { display: none; position: absolute; top: 100%; z-index: 30; margin-top: 6px; border-radius: 8px; border: 1px solid var(--z700); background: var(--z800); padding: 12px; font-size: 12px; box-shadow: 0 20px 25px -5px rgba(0,0,0,.5); white-space: nowrap; }
.a-pop.open, .a-branch:hover .a-pop { display: block; }
.a-pop b { display: block; color: var(--z100); margin-bottom: 6px; }
.a-pop .row { display: flex; gap: 8px; } .a-pop .row span:first-child { width: 56px; font-weight: 500; }
.a-branch .a-pop { left: 0; margin-top: 0; top: calc(100% + 6px); }
.a-branch .a-pop::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.a-branch-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 6px; font-size: 12px; font-weight: 500; background: rgba(69,26,3,.6); color: #fcd34d; box-shadow: inset 0 0 0 1px #78350f; white-space: nowrap; }

.a-menu { display: none; position: absolute; top: 100%; right: 0; z-index: 30; margin-top: 4px; width: 200px; padding: 4px; border-radius: 8px; border: 1px solid var(--z700); background: var(--z900); box-shadow: 0 20px 25px -5px rgba(0,0,0,.5); color: var(--z200); }
.a-menu.open { display: block; }
.a-menu-item { display: flex; width: 100%; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; text-align: left; margin-top: 2px; }
.a-menu-item:hover { background: var(--z700); filter: brightness(1.1); }
.a-menu-item span { flex: 1; }

.a-env { display: flex; align-items: center; border-radius: 6px; border: 1px solid var(--z700); background: var(--z800); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.a-env > button:first-child { display: flex; align-items: center; gap: 6px; padding: 3px 8px; font-weight: 500; white-space: nowrap; }
.a-env.tinted .a-icon-btn { color: currentColor; } .a-env.tinted .a-icon-btn:hover { background: rgba(0,0,0,.1); }
.a-env:not(.tinted) > button:first-child .i:first-child { color: var(--z400); }


.a-body { flex: 1; min-height: 0; display: flex; }
.a-aside { width: 250px; flex: none; display: flex; flex-direction: column; background: var(--z950); border-right: 1px solid var(--z800); }
.a-aside-head { display: flex; align-items: center; gap: 2px; padding: 12px 12px 8px; }
.a-label { font-size: 11px; font-weight: 600; letter-spacing: .025em; text-transform: uppercase; color: var(--z500); }
.a-aside-head .a-label { flex: 1; }
.a-filter { display: flex; align-items: center; gap: 6px; margin: 0 12px 8px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--z800); background: var(--z900); color: var(--z400); }
.a-filter:focus-within { border-color: #6366f1; }
.a-filter input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--z200); font: inherit; }
.a-filter input::placeholder { color: var(--z600); }
.a-tree { flex: 1; overflow-y: auto; padding: 0 8px 8px; scrollbar-width: thin; scrollbar-color: rgba(113,113,122,.4) transparent; }
.a-row { display: flex; height: 28px; align-items: center; gap: 6px; padding: 0 6px; border-radius: 6px; color: var(--z300); cursor: pointer; white-space: nowrap; }
.a-row:hover { background: rgba(39,39,42,.7); }
.a-row.active { background: rgba(99,102,241,.15); color: #e0e7ff; }
.a-row .name { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.a-row.ex { height: 24px; color: var(--z500); }
.a-row .tw { color: var(--z500); transition: transform .15s; } .a-row .tw.open { transform: rotate(90deg); }
.a-row .sp { width: 14px; flex: none; }
.a-kids { margin-left: 13px; padding-left: 6px; border-left: 1px solid var(--z800); }
.a-row .lock { color: var(--z500); }

.a-m { font: 700 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.025em; width: 36px; flex: none; }
.a-m.GET { color: #34d399; } .a-m.POST { color: #fbbf24; } .a-m.PUT { color: #60a5fa; } .a-m.PATCH { color: #a78bfa; } .a-m.DELETE { color: #f87171; }

.a-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.a-tabstrip { display: flex; height: 36px; flex: none; align-items: flex-end; gap: 2px; padding: 0 8px; background: var(--z950); box-shadow: inset 0 -1px 0 var(--z800); overflow: hidden; }
.a-tab { display: flex; height: 32px; max-width: 200px; flex: none; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; color: var(--z500); cursor: pointer; white-space: nowrap; }
.a-tab:hover { background: rgba(39,39,42,.7); }
.a-tab.on { background: var(--z900); border-color: var(--z800); color: var(--z100); }
.a-tab .a-icon-btn { width: 16px; height: 16px; opacity: 0; } .a-tab.on .a-icon-btn, .a-tab:hover .a-icon-btn { opacity: 1; }
.a-tab span.t { overflow: hidden; text-overflow: ellipsis; }
.a-tabstrip > .a-icon-btn { margin: 0 0 4px 4px; }

.a-req { flex: none; height: 47%; display: flex; flex-direction: column; overflow: hidden; }
.a-name { display: flex; align-items: center; gap: 8px; padding: 16px 20px 0; }
.a-name .crumb { color: var(--z400); white-space: nowrap; }
.a-name .title { flex: 1; min-width: 0; padding: 2px 6px; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--z700) !important; background: var(--z800) !important; color: var(--z200); font-weight: 500; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: background .15s; }
.a-btn:hover { background: var(--z700) !important; }
.a-btn.primary { background: #4f46e5 !important; border-color: #4f46e5 !important; color: #fff; }
.a-btn.primary:hover { background: #6366f1 !important; }
.a-kbd { border-radius: 4px; border: 1px solid rgba(255,255,255,.2); padding: 0 4px; font-size: 10px; opacity: .7; }

.a-urlrow { display: flex; padding: 12px 20px 0; }
.a-url { flex: 1; min-width: 0; display: flex; border-radius: 8px; border: 1px solid var(--z700); background: var(--z900); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.a-url .method { display: flex; align-items: center; padding: 0 12px; border-right: 1px solid var(--z700); background: var(--z800); border-radius: 8px 0 0 8px; font-size: 12px; width: auto; }
.a-url .text { flex: 1; min-width: 0; padding: 8px 12px; font: 13px/20px ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--z100); }
.a-send { width: 112px; justify-content: center; margin-left: 8px; border-radius: 8px; }
.var-set { border-radius: 3px; background: rgba(16,185,129,.15); color: #6ee7b7; }
.var-unset { border-radius: 3px; background: rgba(245,158,11,.2); color: #fcd34d; }

.a-tabs { display: flex; gap: 20px; margin: 12px 20px 0; border-bottom: 1px solid var(--z800); }
.a-tabs button { display: inline-flex; align-items: center; gap: 6px; margin-bottom: -1px; padding: 8px 0; border-bottom: 2px solid transparent !important; color: var(--z500); font-weight: 500; transition: color .15s; }
.a-tabs button:hover { color: var(--z100); }
.a-tabs button.on { border-bottom-color: #6366f1 !important; color: var(--z100); }
.a-count { border-radius: 999px; background: var(--z800); padding: 0 6px; font-size: 10px; line-height: 16px; color: var(--z400); }
.a-dot { width: 6px; height: 6px; border-radius: 50%; background: #6366f1; }
.a-dot.amber { background: #f59e0b; }
.a-pane { flex: 1; min-height: 0; overflow: auto; padding: 12px 20px; scrollbar-width: thin; scrollbar-color: rgba(113,113,122,.4) transparent; }

.a-kv { border: 1px solid var(--z800); border-radius: 8px; overflow: hidden; }
.a-kv-row { display: flex; align-items: center; border-bottom: 1px solid var(--z800); }
.a-kv-row:last-child { border-bottom: 0; }
.a-kv-head { background: var(--z900); font-size: 11px; font-weight: 600; letter-spacing: .025em; text-transform: uppercase; color: var(--z500); }
.a-kv-cell { min-width: 0; padding: 6px 10px; border-right: 1px solid var(--z800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-kv-cell:last-child { border-right: 0; }
.a-kv-cell.k { width: 36%; flex: none; } .a-kv-cell.v { flex: 1; }
.a-kv-cell.c { width: 36px; flex: none; text-align: center; overflow: visible; display: flex; justify-content: center; }
.a-check { display: inline-block; width: 13px; height: 13px; border-radius: 3px; background: #4f46e5; vertical-align: middle; position: relative; cursor: pointer; }
.a-check::after { content: ""; position: absolute; left: 4px; top: 1px; width: 3px; height: 7px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.a-check.off { background: transparent; box-shadow: inset 0 0 0 1px var(--z600); } .a-check.off::after { display: none; }
.a-kv-row.off .a-kv-cell:not(.c) { opacity: .45; }

.a-seg { display: inline-flex; border-radius: 8px; background: var(--z800); padding: 2px; margin-bottom: 8px; }
.a-seg button { padding: 2px 10px; border-radius: 6px; font-weight: 500; color: var(--z500); }
.a-seg button.on { background: var(--z700); color: var(--z100); }
.a-code { margin: 0; border-radius: 8px; border: 1px solid var(--z800); background: var(--z900); padding: 12px; font: 12px/1.625 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-all; user-select: text; -webkit-user-select: text; }
.tok-key { color: #a5b4fc; } .tok-string { color: #34d399; } .tok-number { color: #fdba74; } .tok-bool { color: #c4b5fd; } .tok-null { color: var(--z500); font-style: italic; }

.a-split { height: 1px; flex: none; background: var(--z800); }
.a-res { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; background: rgba(9,9,11,.5); }
.a-res-head { display: flex; align-items: center; gap: 8px; padding: 12px 20px 0; }
.a-res-head .right { margin-left: auto; }
.a-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.a-pill.ok { background: rgba(2,44,34,.6); color: #6ee7b7; box-shadow: inset 0 0 0 1px #064e3b; }
.a-pill.redirect { background: rgba(69,26,3,.6); color: #fcd34d; box-shadow: inset 0 0 0 1px #78350f; }
.a-pill.error { background: rgba(69,10,10,.6); color: #fca5a5; box-shadow: inset 0 0 0 1px #7f1d1d; }
.a-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 6px; background: var(--z800); color: var(--z300); box-shadow: inset 0 0 0 1px var(--z700); white-space: nowrap; }
.a-res .a-tabs { margin-top: 8px; }
.a-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--z500); }
.a-empty .i { width: 32px; height: 32px; color: var(--z700); }
.a-timing { display: grid; gap: 8px; max-width: 460px; }
.a-timing div { display: flex; align-items: center; gap: 12px; }
.a-timing span:first-child { width: 110px; color: var(--z500); }
.a-timing .bar { flex: 1; height: 8px; border-radius: 999px; background: var(--z800); overflow: hidden; }
.a-timing .bar i { display: block; height: 100%; border-radius: 999px; background: #6366f1; }
.a-timing span:last-child { width: 60px; text-align: right; }

/* While a request is in flight: the pecking mark and a sweeping bar, as in the app. */
.a-loading { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: #111113; color: var(--z500); }
.a-loading .sweep { position: absolute; inset: 0 0 auto; height: 2px; background: rgba(99,102,241,.15); overflow: hidden; }
.a-loading .sweep i { display: block; height: 100%; width: 33%; background: #6366f1; animation: peck-sweep 1.1s ease-in-out infinite; }
.peck-loader { width: 150px; height: 120px; }
.peck-loader * { transform-box: fill-box; transform-origin: center; }
.peck-loader .peck-head { transform-origin: 30% 100%; animation: peck-peck 1.8s ease-in-out infinite; }
.peck-loader .peck-cursor { animation: peck-blink 1.4s steps(1, end) infinite; }
.peck-loader .peck-eye { animation: peck-eyeblink 4.2s ease-in-out infinite; }
@keyframes peck-peck { 0%, 16%, 32%, 100% { transform: rotate(0); } 8%, 24% { transform: rotate(25deg); } }
@keyframes peck-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes peck-eyeblink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes peck-sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }

.a-toast { position: absolute; right: 16px; bottom: 16px; z-index: 40; padding: 12px 16px; border-radius: 8px; border: 1px solid var(--z700); background: var(--z800); box-shadow: 0 10px 15px -3px rgba(0,0,0,.4); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; }
.a-toast.show { opacity: 1; transform: none; }


@media (max-width: 860px) {
    .a-rail, .a-aside, .a-logo { display: none; }
    .a-header { grid-template-columns: 1fr auto; padding-left: 70px; }
    .a-header-left { padding-left: 0; }
    .a-header > :nth-child(2) { display: none; }
    .a-lights { top: 18px; }
}
@media (max-width: 560px) {
    .app { height: 520px; font-size: 12px; }
    .a-branch,     .a-name, .a-urlrow, .a-res-head { padding-left: 12px; padding-right: 12px; }
    .a-tabs { margin-left: 12px; margin-right: 12px; gap: 14px; }
    .a-pane { padding: 12px; }
    .a-send { width: auto; padding: 4px 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .peck-loader .peck-head, .peck-loader .peck-eye, }
