/* ============================================================
   HAR Inspector — dark observability aesthetic
   ============================================================ */

:root {
  --bg: #0b0e14;
  --bg-2: #0f131c;
  --bg-3: #141926;
  --panel: #11161f;
  --panel-2: #161c29;
  --line: #1e2635;
  --line-2: #2a3448;
  --text: #e6ebf4;
  --text-dim: #8b96ab;
  --text-faint: #5b6579;

  --accent: #22d3ee;      /* cyan pop */
  --accent-soft: rgba(34, 211, 238, .14);
  --violet: #a78bfa;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --blue: #60a5fa;
  --pink: #f472b6;
  --orange: #fb923c;
  --teal: #2dd4bf;

  /* waterfall phase colors */
  --ph-blocked: #94a3b8;
  --ph-dns: #f472b6;
  --ph-connect: #fb923c;
  --ph-ssl: #a78bfa;
  --ph-send: #60a5fa;
  --ph-wait: #22d3ee;
  --ph-receive: #34d399;
  --ph-cached: #475569;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Code", ui-monospace, Menlo, Consolas, monospace;

  --row-h: 30px;
  --head-h: 34px;
  --ease-spring: cubic-bezier(.34, 1.56, .5, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(34, 211, 238, .3); }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input { font: inherit; color: inherit; }
code, kbd { font-family: var(--mono); }

.app { position: relative; height: 100vh; height: 100dvh; overflow: hidden; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
  border: 1px solid transparent;
  transition: transform .16s var(--ease-out), background .16s, border-color .16s, box-shadow .16s, color .16s;
  white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn.primary {
  background: var(--accent); color: #06222a;
  box-shadow: 0 2px 14px rgba(34, 211, 238, .35);
}
.btn.primary:hover { box-shadow: 0 4px 22px rgba(34, 211, 238, .5); transform: translateY(-1px); }
.btn.ghost {
  background: transparent; color: var(--text-dim); border-color: var(--line-2);
}
.btn.ghost:hover { color: var(--text); border-color: var(--text-faint); background: var(--bg-3); }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.sample {
  background: var(--accent-soft); color: var(--accent); border-color: rgba(34, 211, 238, .3);
}
.btn.sample:hover { background: rgba(34, 211, 238, .22); transform: translateY(-1px); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 7px; color: var(--text-dim);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--bg-3); color: var(--text); }

/* ============================================================
   LANDING
   ============================================================ */
.landing {
  position: absolute; inset: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 700px at 70% -10%, rgba(34, 211, 238, .07), transparent 60%),
    radial-gradient(900px 600px at 10% 110%, rgba(167, 139, 250, .07), transparent 60%),
    var(--bg);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out), visibility 0s .5s;
  overflow: auto;
}
.app[data-state="loaded"] .landing,
.app[data-state="loading"] .landing {
  opacity: 0; transform: scale(1.04); visibility: hidden; pointer-events: none;
}

.landing-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 26px; padding: 40px 24px; max-width: 620px; width: 100%;
  animation: rise .7s var(--ease-out) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  position: relative; width: 46px; height: 46px; border-radius: 12px;
  background: var(--bg-3); border: 1px solid var(--line-2);
  display: flex; align-items: flex-end; gap: 4px; padding: 10px 9px;
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
}
.bm-bar { display: block; border-radius: 3px; height: 6px; animation: bmpulse 2.6s ease-in-out infinite; }
.bm-1 { width: 8px; background: var(--green); }
.bm-2 { width: 14px; background: var(--accent); animation-delay: .3s; }
.bm-3 { width: 6px; background: var(--violet); animation-delay: .6s; }
@keyframes bmpulse { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.7); } }

.brand-name { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.brand-name span { color: var(--accent); font-weight: 400; }

.tagline { text-align: center; color: var(--text-dim); font-size: 15px; }

/* drop zone */
.dropzone {
  position: relative; width: 100%; max-width: 520px;
  border-radius: 20px; padding: 44px 32px;
  background: var(--panel);
  cursor: pointer; outline: none;
  transition: transform .25s var(--ease-spring), box-shadow .25s;
  overflow: hidden;
}
.dropzone:hover, .dropzone:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow); }
.dropzone:focus-visible { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }

.dz-ring {
  position: absolute; inset: 0; border-radius: 20px; pointer-events: none;
  border: 2px dashed var(--line-2);
  transition: border-color .25s;
}
.dropzone:hover .dz-ring { border-color: var(--accent); }

.dz-shimmer {
  position: absolute; inset: -40%; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(34,211,238,.12) 50%, transparent 58%);
  transform: translateX(-60%);
}
.dropzone:hover .dz-shimmer { opacity: 1; animation: shimmer 1.4s var(--ease-out) infinite; }
@keyframes shimmer { to { transform: translateX(60%); } }

.dz-content { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dz-icon { color: var(--accent); animation: bob 2.8s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.dz-title { font-size: 17px; font-weight: 650; }
.dz-title code { color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 6px; font-size: 14px; }
.dz-sub { color: var(--text-dim); font-size: 13.5px; }
.dz-browse { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.landing-alt { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.alt-sep { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .12em; }

.privacy-notes {
  display: flex; gap: 18px; list-style: none; flex-wrap: wrap; justify-content: center;
  color: var(--text-faint); font-size: 12.5px;
}
.privacy-notes li { display: flex; align-items: center; gap: 6px; }
.privacy-notes li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green);
}

/* ============================================================
   DRAG OVERLAY — juicy whole-page reaction
   ============================================================ */
.drag-overlay {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .22s var(--ease-out), visibility 0s .22s;
}
.app.dragging .drag-overlay { opacity: 1; visibility: visible; transition: opacity .18s var(--ease-out); }

.drag-glow {
  position: absolute; inset: -2px;
  background:
    radial-gradient(700px 500px at var(--gx, 50%) var(--gy, 50%), rgba(34, 211, 238, .16), transparent 65%);
  transition: opacity .2s;
}
.app.dragging .drag-glow { animation: glowpulse 1.6s ease-in-out infinite; }
@keyframes glowpulse { 0%, 100% { opacity: .8; } 50% { opacity: 1; } }

.drag-card {
  position: relative;
  transform: scale(.85);
  transition: transform .3s var(--ease-spring);
}
.app.dragging .drag-card { transform: scale(1); }

.drag-card-ring {
  position: absolute; inset: -14px; border-radius: 28px;
  border: 2px dashed var(--accent);
  animation: ringspin 8s linear infinite;
  opacity: .7;
}
@keyframes ringspin { to { transform: rotate(0); } }
.app.dragging .drag-card-ring { animation: ringbreathe 1.4s ease-in-out infinite; }
@keyframes ringbreathe {
  0%, 100% { transform: scale(1); opacity: .55; }
  50% { transform: scale(1.035); opacity: 1; }
}

.drag-card-inner {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: 22px; padding: 44px 64px;
  box-shadow: 0 24px 80px rgba(0,0,0,.6), 0 0 60px rgba(34,211,238,.12);
}
.dz-icon.big { color: var(--accent); }
.drag-title { font-size: 20px; font-weight: 750; letter-spacing: -.01em; }
.drag-sub { color: var(--text-dim); font-size: 13px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* magnetic pull on the landing dropzone */
.app.dragging .dropzone {
  transform: translate(var(--mx, 0), var(--my, 0)) scale(1.03);
  box-shadow: 0 0 0 2px var(--accent), 0 20px 70px rgba(34,211,238,.25);
}
.app.dragging .dropzone .dz-ring { border-color: var(--accent); border-style: solid; }

/* ============================================================
   LOADING
   ============================================================ */
.loading-overlay {
  position: fixed; inset: 0; z-index: 70;
  display: flex; align-items: center; justify-content: center;
  background: rgba(11, 14, 20, .82); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility 0s .25s;
}
.app[data-state="loading"] .loading-overlay { opacity: 1; visibility: visible; transition: opacity .2s; }

.loading-card {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: 18px; padding: 36px 48px; box-shadow: var(--shadow);
  min-width: 300px;
}
.loading-bars { display: flex; align-items: flex-end; gap: 5px; height: 30px; }
.loading-bars span {
  width: 7px; border-radius: 4px; background: var(--accent); height: 30%;
  animation: lbounce 1s ease-in-out infinite;
}
.loading-bars span:nth-child(2) { animation-delay: .1s; background: var(--violet); }
.loading-bars span:nth-child(3) { animation-delay: .2s; background: var(--green); }
.loading-bars span:nth-child(4) { animation-delay: .3s; background: var(--amber); }
.loading-bars span:nth-child(5) { animation-delay: .4s; background: var(--pink); }
@keyframes lbounce { 0%, 100% { height: 26%; } 50% { height: 100%; } }
.loading-text { color: var(--text-dim); font-size: 13.5px; }
.loading-progress { width: 100%; height: 4px; border-radius: 3px; background: var(--bg-3); overflow: hidden; }
.loading-progress-fill {
  height: 100%; width: 0%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  transition: width .2s var(--ease-out);
}

/* ============================================================
   ERROR
   ============================================================ */
.error-overlay {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  background: rgba(11, 14, 20, .85); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility 0s .25s;
}
.app[data-state="error"] .error-overlay { opacity: 1; visibility: visible; transition: opacity .2s; }

.error-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: var(--panel-2); border: 1px solid rgba(248, 113, 113, .35);
  border-radius: 18px; padding: 40px 48px; box-shadow: var(--shadow);
  max-width: 480px; text-align: center;
  animation: errin .4s var(--ease-spring) both;
}
@keyframes errin { from { transform: scale(.9) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.error-icon { color: var(--red); }
.error-card h2 { font-size: 18px; font-weight: 700; }
.error-detail {
  color: var(--text-dim); font-size: 13px; font-family: var(--mono);
  background: var(--bg-3); border-radius: 8px; padding: 10px 14px;
  max-width: 100%; overflow-wrap: anywhere;
}
.error-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }

/* ============================================================
   INSPECTOR LAYOUT
   ============================================================ */
.inspector {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column;
  opacity: 0; transform: translateY(14px); visibility: hidden;
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out), visibility 0s .45s;
}
.app[data-state="loaded"] .inspector,
.app[data-state="error"] .inspector {
  opacity: 1; transform: none; visibility: visible; transition: opacity .4s var(--ease-out) .05s, transform .4s var(--ease-out) .05s;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  background: var(--bg-2); flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo { display: flex; }
.file-meta { display: flex; flex-direction: column; min-width: 0; }
.file-name { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-sub { font-size: 11.5px; color: var(--text-faint); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; gap: 8px; flex-shrink: 0; }

/* stats strip */
.stats-strip {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px;
  padding: 12px 16px; flex-shrink: 0;
}
.stat-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; display: flex; flex-direction: column; gap: 2px;
  transition: border-color .2s, transform .2s var(--ease-out);
}
.stat-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.stat-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); }
.stat-value { font-size: 19px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat-card[data-stat="errors"] .stat-value.bad { color: var(--red); }
.stat-card[data-stat="cached"] .stat-value { color: var(--teal); }

/* analytics panels */
.analytics {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px;
  padding: 0 16px 12px; flex-shrink: 0;
}
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; min-width: 0;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.panel-head h2 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--text-dim); }
.panel-hint { font-size: 11px; color: var(--text-faint); }

/* status segmented bar */
.status-bar {
  display: flex; height: 26px; border-radius: 7px; overflow: hidden;
  background: var(--bg-3); gap: 2px;
}
.status-seg {
  position: relative; min-width: 3px;
  transition: flex-grow .5s var(--ease-out), filter .15s, opacity .2s;
  cursor: pointer;
  transform-origin: bottom;
  animation: segin .5s var(--ease-out) both;
}
@keyframes segin { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.status-seg:hover { filter: brightness(1.25); }
.status-seg.active { outline: 2px solid var(--text); outline-offset: -2px; z-index: 1; }
.status-bar.dimmed .status-seg:not(.active) { opacity: .3; }

.status-legend { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.status-chip {
  display: flex; align-items: center; gap: 7px; font-size: 12.5px;
  color: var(--text-dim); cursor: pointer; padding: 3px 6px; border-radius: 6px;
  transition: background .15s, color .15s;
}
.status-chip:hover { background: var(--bg-3); color: var(--text); }
.status-chip.active { color: var(--text); background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.status-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.status-chip .cnt { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.status-chip .pct { color: var(--text-faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }

/* size analyzer */
.size-body { display: flex; align-items: center; gap: 18px; }
.donut-wrap { position: relative; flex-shrink: 0; }
#donut { display: block; transform: rotate(-90deg); }
#donut circle.slice {
  fill: none; cursor: pointer;
  transition: stroke-width .2s var(--ease-out), opacity .2s;
}
#donut circle.slice:hover { stroke-width: 15; }
#donut circle.slice.active { stroke-width: 16; }
#donut.dimmed circle.slice:not(.active) { opacity: .25; }
.donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
}
.donut-total { font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; }
.donut-sub { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .1em; }

.size-legend { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; max-height: 150px; overflow-y: auto; }
.size-row {
  display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: 8px;
  font-size: 12.5px; padding: 3px 6px; border-radius: 6px; cursor: pointer;
  transition: background .15s;
}
.size-row:hover { background: var(--bg-3); }
.size-row.active { background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.size-dot { width: 9px; height: 9px; border-radius: 3px; }
.size-name { color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.size-row:hover .size-name, .size-row.active .size-name { color: var(--text); }
.size-bytes { font-weight: 650; font-variant-numeric: tabular-nums; }
.size-pct { color: var(--text-faint); font-size: 11.5px; width: 44px; text-align: right; font-variant-numeric: tabular-nums; }

/* ============================================================
   TOOLBAR
   ============================================================ */
.toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-2); flex-shrink: 0; flex-wrap: wrap;
}
.search-wrap {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 6px 10px; flex: 1; min-width: 180px; max-width: 380px;
  color: var(--text-faint);
  transition: border-color .15s, box-shadow .15s;
}
.search-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--accent); }
.search-wrap input {
  flex: 1; background: none; border: none; outline: none; font-size: 13px; min-width: 0;
}
.search-wrap input::placeholder { color: var(--text-faint); }
.search-wrap input::-webkit-search-cancel-button { cursor: pointer; }
.search-kbd {
  font-size: 10.5px; color: var(--text-faint); border: 1px solid var(--line-2);
  border-radius: 4px; padding: 1px 5px; flex-shrink: 0;
}
.search-wrap:focus-within .search-kbd { display: none; }

.active-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(34, 211, 238, .3);
  padding: 3px 6px 3px 9px; border-radius: 20px;
  animation: pillin .25s var(--ease-spring) both;
}
@keyframes pillin { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.filter-pill button {
  display: inline-flex; width: 15px; height: 15px; border-radius: 50%;
  align-items: center; justify-content: center; color: inherit; opacity: .7;
}
.filter-pill button:hover { opacity: 1; background: rgba(34,211,238,.2); }

.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.match-count { font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============================================================
   REQUEST LIST + WATERFALL
   ============================================================ */
.main { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }

.list-head {
  display: grid; height: var(--head-h); flex-shrink: 0;
  grid-template-columns: minmax(180px, 1fr) 74px 70px 92px 84px 76px minmax(220px, 42%);
  border-bottom: 1px solid var(--line); background: var(--bg-2);
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint);
  user-select: none;
}
.list-head .col {
  display: flex; align-items: center; gap: 4px; padding: 0 10px;
  text-align: left; overflow: hidden; white-space: nowrap;
}
.list-head .col.sortable { cursor: pointer; transition: color .15s; }
.list-head .col.sortable:hover { color: var(--text); }
.list-head .col.sorted { color: var(--accent); }
.sort-arrow { font-size: 9px; width: 10px; }
.col.sorted.asc .sort-arrow::after { content: "▲"; }
.col.sorted.desc .sort-arrow::after { content: "▼"; }
.c-waterfall { padding: 0 !important; }
.ruler { position: relative; width: 100%; height: 100%; overflow: hidden; }
.ruler-tick {
  position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line);
  padding: 3px 0 0 5px; font-size: 10px; color: var(--text-faint);
  font-variant-numeric: tabular-nums; letter-spacing: 0; text-transform: none;
  white-space: nowrap; pointer-events: none;
}

.list-scroll {
  position: relative; flex: 1; overflow-y: auto; overflow-x: hidden;
  outline: none; min-height: 0;
}
.list-scroll:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-soft); }
.list-spacer { width: 1px; opacity: 0; }
.list-rows { position: absolute; top: 0; left: 0; right: 0; }

.gridlines { position: absolute; top: 0; bottom: 0; left: 0; right: 0; pointer-events: none; z-index: 0; }
.gridline {
  position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); opacity: .55;
}

.row {
  position: absolute; left: 0; right: 0; height: var(--row-h);
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 74px 70px 92px 84px 76px minmax(220px, 42%);
  align-items: center;
  font-size: 12.5px; cursor: pointer;
  border-bottom: 1px solid rgba(30, 38, 53, .5);
  transition: background .1s;
  z-index: 1;
}
.row:hover { background: rgba(34, 211, 238, .05); }
.row.selected { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.row .cell { padding: 0 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.row .c-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.row .c-name .fname { overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; unicode-bidi: plaintext; }
.type-badge {
  flex-shrink: 0; width: 7px; height: 7px; border-radius: 2px;
}
.cell.c-method { font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
.cell.c-status { font-family: var(--mono); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.st-2 { color: var(--green); } .st-3 { color: var(--blue); }
.st-4 { color: var(--amber); } .st-5 { color: var(--red); } .st-0 { color: var(--text-faint); }
.cell.c-type { color: var(--text-dim); font-size: 11.5px; }
.cell.c-size, .cell.c-time { font-variant-numeric: tabular-nums; color: var(--text-dim); font-size: 11.5px; text-align: right; }
.cell.c-waterfall { padding: 0; height: 100%; position: relative; }

.wf-track { position: absolute; inset: 0; }
.wf-bar {
  position: absolute; top: 7px; height: calc(var(--row-h) - 14px);
  display: flex; border-radius: 3px; overflow: hidden;
  min-width: 2px;
  transition: filter .12s;
}
.row:hover .wf-bar { filter: brightness(1.2); }
.wf-seg { height: 100%; flex-shrink: 0; }
.wf-seg.blocked { background: var(--ph-blocked); }
.wf-seg.dns { background: var(--ph-dns); }
.wf-seg.connect { background: var(--ph-connect); }
.wf-seg.ssl { background: var(--ph-ssl); }
.wf-seg.send { background: var(--ph-send); }
.wf-seg.wait { background: var(--ph-wait); }
.wf-seg.receive { background: var(--ph-receive); }
.wf-seg.cached { background: var(--ph-cached); }
.wf-total-label {
  position: absolute; top: 0; height: 100%; display: flex; align-items: center;
  font-size: 10px; color: var(--text-faint); font-variant-numeric: tabular-nums;
  padding-left: 5px; white-space: nowrap; pointer-events: none;
}

.list-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; color: var(--text-dim);
}

/* ============================================================
   DETAIL PANEL
   ============================================================ */
.detail {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 40;
  width: min(460px, 92vw);
  background: var(--bg-2); border-left: 1px solid var(--line-2);
  box-shadow: -20px 0 60px rgba(0,0,0,.5);
  display: flex; flex-direction: column;
  transform: translateX(102%);
  transition: transform .32s var(--ease-out), visibility 0s .32s;
  visibility: hidden;
}
.detail.open { transform: none; visibility: visible; transition: transform .32s var(--ease-out); }

.detail-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.detail-title { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.detail-method {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  background: var(--bg-3); border: 1px solid var(--line-2);
  padding: 3px 7px; border-radius: 6px; flex-shrink: 0;
}
.detail-url {
  font-size: 12.5px; font-family: var(--mono); color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: left;
}
.detail-statusline {
  padding: 8px 14px; font-size: 12px; border-bottom: 1px solid var(--line);
  display: flex; gap: 14px; flex-wrap: wrap; flex-shrink: 0; color: var(--text-dim);
}
.detail-statusline b { color: var(--text); font-variant-numeric: tabular-nums; }

.detail-tabs {
  display: flex; gap: 2px; padding: 6px 10px 0; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.tab {
  padding: 7px 12px; font-size: 12.5px; font-weight: 600; color: var(--text-dim);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.detail-body { flex: 1; overflow-y: auto; min-height: 0; }
.tabpane { display: none; padding: 12px 14px; }
.tabpane.active { display: block; animation: fadein .2s var(--ease-out); }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.kv-group { margin-bottom: 16px; }
.kv-group h3 {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-faint); margin-bottom: 6px;
}
.kv-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.kv-table td { padding: 4px 8px 4px 0; vertical-align: top; overflow-wrap: anywhere; }
.kv-table td.k {
  font-family: var(--mono); color: var(--text-dim); white-space: nowrap;
  width: 1%; padding-right: 14px; font-size: 11.5px;
}
.kv-table td.v { font-family: var(--mono); font-size: 11.5px; }
.kv-empty { color: var(--text-faint); font-size: 12px; font-style: italic; }

/* timing breakdown bars in detail */
.t-timing-row { display: grid; grid-template-columns: 76px 1fr 64px; gap: 10px; align-items: center; margin-bottom: 7px; font-size: 12px; }
.t-timing-row .lbl { color: var(--text-dim); text-transform: capitalize; }
.t-timing-row .bar-wrap { height: 10px; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.t-timing-row .bar-fill { height: 100%; border-radius: 4px; transform-origin: left; animation: barin .5s var(--ease-out) both; }
@keyframes barin { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.t-timing-row .val { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 11px; }

/* ============================================================
   TOOLTIP
   ============================================================ */
.tooltip {
  position: fixed; z-index: 100; pointer-events: none;
  background: rgba(15, 19, 28, .97); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow);
  font-size: 11.5px; max-width: 340px;
  opacity: 0; transform: translateY(4px);
  transition: opacity .12s, transform .12s;
}
.tooltip.show { opacity: 1; transform: none; }
.tooltip .tt-url { font-family: var(--mono); font-size: 11px; color: var(--text); overflow-wrap: anywhere; margin-bottom: 6px; }
.tooltip .tt-grid { display: grid; grid-template-columns: auto auto; gap: 2px 12px; font-variant-numeric: tabular-nums; }
.tooltip .tt-grid .k { color: var(--text-faint); display: flex; align-items: center; gap: 5px; }
.tooltip .tt-grid .v { text-align: right; font-family: var(--mono); font-size: 10.5px; color: var(--text-dim); }
.tt-dot { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }

/* ============================================================
   SCROLLBARS
   ============================================================ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .stats-strip { grid-template-columns: repeat(3, 1fr); }
  .analytics { grid-template-columns: 1fr; }
  .size-legend { max-height: 120px; }
}
@media (max-width: 860px) {
  .list-head, .row {
    grid-template-columns: minmax(140px, 1fr) 62px 60px 74px minmax(160px, 40%);
  }
  .c-type, .c-time { display: none !important; }
}
@media (max-width: 640px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); padding: 10px 12px; }
  .analytics { padding: 0 12px 10px; }
  .toolbar { padding: 8px 12px; }
  .topbar { padding: 8px 12px; }
  .file-sub { display: none; }
  .list-head, .row {
    grid-template-columns: minmax(110px, 1fr) 56px minmax(130px, 42%);
  }
  .c-method, .c-size { display: none !important; }
  .brand-name { font-size: 24px; }
  .dropzone { padding: 34px 20px; }
  .detail { width: 100vw; border-left: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
