/* ------------------------------------------------------------------
   Localhost Bar — download page
   Tokens extend the app's own (src/renderer/src/index.css).
   ------------------------------------------------------------------ */

:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --duration-fast: 120ms;

  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Monaco, Consolas, monospace;

  /* page */
  --page-bg: #0a0c0a;
  --page-fg: rgba(236, 241, 236, 0.92);
  --page-muted: rgba(160, 175, 160, 0.58);
  --page-line: rgba(255, 255, 255, 0.08);

  /* panel (mirrors the app) */
  --color-foreground: rgba(220, 230, 220, 0.92);
  --color-border: rgba(255, 255, 255, 0.06);
  --color-muted: rgba(255, 255, 255, 0.05);
  --color-muted-foreground: rgba(160, 175, 160, 0.65);
  --color-accent: rgba(255, 255, 255, 0.07);
  --color-destructive: oklch(0.62 0.18 25);
  --color-ring: rgba(120, 200, 170, 0.35);
  --color-status-running: oklch(0.68 0.14 145);
  --color-status-stopping: oklch(0.70 0.13 55);
  --color-status-ai: oklch(0.68 0.1 175);
  --color-hover-overlay: rgba(255, 255, 255, 0.05);
  --color-press-overlay: rgba(255, 255, 255, 0.08);
  --color-surface: rgba(8, 12, 9, 0.72);
  --color-row-fade: rgb(12, 16, 13);
  --color-warning: oklch(0.78 0.13 72);
  --color-success: oklch(0.70 0.15 145);
  --color-destructive-overlay: rgba(200, 30, 30, 0.12);
  --color-input-bg: rgba(255, 255, 255, 0.05);

  --z: 1; /* panel zoom, set by JS */
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.4;
  color: var(--page-fg);
  background:
    radial-gradient(ellipse 55% 45% at 50% 46%, rgba(40, 70, 48, 0.22) 0%, transparent 70%),
    var(--page-bg);
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100dvh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }

/* ---------- page chrome ---------- */

.chrome {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px;
}
.chrome-top { align-items: flex-start; }
.chrome-bottom { align-items: flex-end; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.wordmark-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--page-fg);
}

.features {
  list-style: none;
  margin: 0; padding: 0;
  text-align: right;
  color: var(--page-muted);
  line-height: 1.75;
}

.tagline {
  margin: 0;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.015em;
  max-width: 24ch;
  line-height: 1.25;
}

.cta {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "byline actions" "fine fine";
  align-items: center;
  column-gap: 22px;
  row-gap: 8px;
  justify-items: end;
}
.byline { grid-area: byline; color: var(--page-muted); }
.byline a { color: var(--page-fg); border-bottom: 1px solid var(--page-line); }
.cta-actions { grid-area: actions; display: flex; align-items: center; gap: 10px; }
.fineprint { grid-area: fine; color: var(--page-muted); }

.ghost {
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--page-muted);
  transition: color var(--duration-fast) ease, background var(--duration-fast) ease, transform 160ms var(--ease-out);
}
.ghost:active { transform: scale(0.97); }

.download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--page-fg);
  color: #0a0c0a;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 8px 24px -10px rgba(120, 200, 150, 0.35);
  transition: background var(--duration-fast) ease, transform 160ms var(--ease-out);
}
.download:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
  .ghost:hover { color: var(--page-fg); background: var(--color-hover-overlay); }
  .download:hover { background: #fff; }
}

/* page entrance — once, rare */
.chrome > *, .caption {
  opacity: 0;
  transform: translateY(4px);
  animation: chrome-in 500ms var(--ease-out) both;
}
.chrome-top > :nth-child(2) { animation-delay: 60ms; }
.chrome-bottom > :nth-child(1) { animation-delay: 120ms; }
.chrome-bottom > :nth-child(2) { animation-delay: 180ms; }
.caption { animation-delay: 700ms; }
@keyframes chrome-in { to { opacity: 1; transform: none; } }

/* ---------- stage ---------- */

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 16px 16px;
  min-height: 0;
}

.mac {
  zoom: var(--z);
  width: 560px;
  height: 318px; /* menubar 24 + gap 6 + panel 288 */
  position: relative;
}

.caption {
  margin: 0;
  color: var(--page-muted);
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 11.5px;
  text-align: center;
  min-height: 1.4em;
}
.caption b { color: var(--page-fg); font-weight: 500; }

/* ---------- menu bar slice ---------- */

.menubar {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  padding: 0 10px 0 0;
  border-radius: 0 0 2px 2px;
  background: rgba(255, 255, 255, 0.075);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 34%);
          mask-image: linear-gradient(to right, transparent 0%, #000 34%);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  user-select: none;
}
.mb-item { display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 7px; }
.mb-item svg { width: 15px; height: 15px; }
.mb-clock { padding: 0 2px 0 8px; font-variant-numeric: tabular-nums; letter-spacing: -0.005em; white-space: nowrap; }

.battery { position: relative; width: 36px; }
.battery::before {
  content: ""; position: absolute; left: 7px; top: 5.5px;
  width: 21px; height: 11px; border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.55);
}
.battery::after {
  content: ""; position: absolute; left: 29.5px; top: 9px;
  width: 1.5px; height: 4px; border-radius: 0 1px 1px 0;
  background: rgba(255,255,255,0.4);
}
.battery-fill {
  position: absolute; left: 9px; top: 7.5px; height: 7px; width: 14px;
  border-radius: 1.5px; background: rgba(255,255,255,0.86);
}

.tray {
  height: 22px;
  padding: 0 7px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  cursor: default;
}
.tray[aria-expanded="true"] { background: rgba(255, 255, 255, 0.18); }
.tray-glyph {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

/* ---------- panel shell ---------- */

.panel {
  position: absolute;
  top: 30px;
  right: 0;
  width: 560px;
  height: 288px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 16px 48px rgba(0, 0, 0, 0.6),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, #0a100c 0%, #060906 100%);
  color: var(--color-foreground);
  font-size: 12px;
  user-select: none;

  /* open/close: grows out of the tray icon it belongs to */
  transform-origin: var(--ox, 85%) 0;
  opacity: 0;
  transform: scale(0.96) translateY(-4px);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 150ms var(--ease-out),
    transform 150ms var(--ease-out),
    visibility 0s linear 150ms;
}
.panel.open {
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 200ms var(--ease-out),
    transform 200ms var(--ease-out),
    visibility 0s;
}

.gradient-bg {
  position: absolute; inset: 0; z-index: 0; opacity: 0.85;
  background:
    radial-gradient(ellipse 80% 70% at 28% 42%, rgba(36, 58, 42, 0.55) 0%, transparent 58%),
    radial-gradient(ellipse 60% 50% at 85% 90%, rgba(18, 32, 28, 0.4) 0%, transparent 50%),
    linear-gradient(180deg, #0a100c 0%, #060906 100%);
}

.panel-top-actions {
  position: absolute; top: 8px; right: 8px; z-index: 20;
  display: flex; gap: 2px;
}

.panel-body {
  position: relative; z-index: 1;
  height: 100%;
  background: var(--color-surface);
  display: flex;
}

.view { flex: 1; display: flex; min-width: 0; height: 100%; }
.view-enter-fwd  { animation: view-enter-fwd  200ms var(--ease-out) both; }
.view-enter-back { animation: view-enter-back 200ms var(--ease-out) both; }
@keyframes view-enter-fwd  { from { opacity: 0; transform: translateX(8px); }  to { opacity: 1; transform: none; } }
@keyframes view-enter-back { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

.section-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* icon button (shared) */
.ib {
  width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 6px;
  background: transparent;
  color: var(--color-muted-foreground);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  cursor: pointer;
  transition: color var(--duration-fast) ease, background var(--duration-fast) ease, transform 160ms var(--ease-out);
}
.ib:active { transform: scale(0.94); background: var(--color-press-overlay); }
.ib.active { color: var(--color-warning); }
.ib[disabled] { opacity: 0.4; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .ib:hover { color: var(--color-foreground); background: var(--color-hover-overlay); }
  .ib.destructive:hover { color: var(--color-destructive); background: var(--color-destructive-overlay); }
}
.ib.destructive:active { background: var(--color-destructive-overlay); }

/* ---------- stats column ---------- */

.stats {
  width: 44%; flex-shrink: 0; align-self: stretch;
  padding: 12px 16px; position: relative;
  overflow: hidden;
}
.stats-share { position: absolute; top: 12px; right: 16px; display: flex; gap: 2px; }
.stats-date { font-size: 10px; font-weight: 600; color: var(--color-foreground); margin-bottom: 6px; letter-spacing: 0.01em; line-height: 1.2; transition: color var(--duration-fast) ease; }
.stats-date.muted { color: var(--color-muted-foreground); font-weight: 500; }
.stat-row { display: flex; gap: 20px; align-items: flex-end; margin-bottom: 8px; min-height: 32px; }
.stat-num {
  font-weight: 600; font-size: 17px; line-height: 1.1;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
  color: var(--color-foreground);
}
.stat-num.ai { color: var(--color-status-ai); }
.stat-label { font-size: 9px; color: var(--color-muted-foreground); margin-top: 2px; letter-spacing: 0.02em; }

.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.cell {
  height: 29px; border-radius: 4px;
  border: 1px solid transparent;
  background: var(--lvl);
  transition: border-color var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out);
}
.cell[data-active="1"] { cursor: pointer; }
.cell.is-today, .cell.is-hover { border-color: rgba(255, 255, 255, 0.25); }
.cell.is-selected { border-color: oklch(0.80 0.15 145); }
.grid.has-focus .cell.is-today:not(.is-hover):not(.is-selected) { border-color: transparent; }
@media (hover: hover) and (pointer: fine) {
  .cell[data-active="1"]:hover { transform: scale(1.06); }
}

.tile {
  margin-top: 10px; width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 8px;
  background: var(--color-input-bg); border: 1px solid var(--color-border);
  cursor: pointer; text-align: left;
  transition: transform 160ms var(--ease-out), background var(--duration-fast) ease;
}
.tile:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .tile:hover { background: var(--color-accent); } }
.tile .ai { color: var(--color-status-ai); display: flex; }
.tile-label { font-size: 11px; font-weight: 500; white-space: nowrap; }
.tile-num { margin-left: auto; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; white-space: nowrap; }
.tile-cost { font-weight: 500; font-size: 10px; color: var(--color-muted-foreground); margin-left: 5px; }
.tile .chev { color: var(--color-muted-foreground); display: flex; }

.vdiv {
  width: 1px; flex-shrink: 0; align-self: stretch; margin: 12px 0;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.07) 20%, rgba(255,255,255,0.07) 80%, transparent);
}

/* ---------- right column ---------- */

.right { flex: 1; display: flex; flex-direction: column; overflow: hidden; height: 100%; min-width: 0; }
.right-head { padding: 12px 64px 4px 16px; display: flex; align-items: center; min-height: 28px; }

.search { padding: 2px 16px 8px; }
.search-box {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 9px; border-radius: 7px;
  background: var(--color-input-bg);
  border: 1px solid var(--color-border);
  transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease;
}
.search-box:focus-within {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.16);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.04);
}
.search-box svg { color: var(--color-muted-foreground); opacity: 0.7; flex-shrink: 0; transition: color var(--duration-fast) ease, opacity var(--duration-fast) ease; }
.search-box:focus-within svg { color: var(--color-foreground); opacity: 0.85; }
.search-box input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font: inherit; font-size: 11.5px; letter-spacing: -0.005em; color: var(--color-foreground);
}
.search-box input::placeholder { color: var(--color-muted-foreground); }

.list { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent; }
.list::-webkit-scrollbar { width: 4px; }
.list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.list-inner { padding: 2px 0 4px; }

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 40px 32px; text-align: center; height: 100%;
}
.empty-ic {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-muted); border: 1px solid var(--color-border);
  color: var(--color-muted-foreground);
}
.empty p { margin: 0; }
.empty .t { font-size: 12.5px; font-weight: 560; letter-spacing: -0.01em; }
.empty .s { font-size: 11px; margin-top: 5px; line-height: 1.45; color: var(--color-muted-foreground); }

.day-note { padding: 10px 16px; font-size: 11px; color: var(--color-muted-foreground); line-height: 1.4; }

/* ---------- rows ---------- */

.row-main {
  position: relative;
  padding: 8px 12px; margin: 0 8px;
  display: flex; align-items: center; gap: 9px;
  border-radius: 8px; cursor: pointer;
  transition: background var(--duration-fast) ease, opacity 200ms ease;
}
.row-main:active { background: var(--color-press-overlay); }
@media (hover: hover) and (pointer: fine) { .row-main:hover { background: var(--color-hover-overlay); } }
.row.stopping .row-main { opacity: 0.55; cursor: not-allowed; }
.row.offline .row-main { opacity: 0.55; }
@media (hover: hover) and (pointer: fine) { .row.offline .row-main:hover { opacity: 0.85; } }

.dot { width: 6.5px; height: 6.5px; border-radius: 50%; flex-shrink: 0; }
.dot.live { background: var(--color-status-running); box-shadow: 0 0 5px -1px var(--color-status-running); animation: status-pulse 2.4s ease-in-out infinite; }
.dot.stopping { background: var(--color-status-stopping); animation: status-pulse 1.2s ease-in-out infinite; }
.dot.off { background: var(--color-muted-foreground); opacity: 0.7; }
@keyframes status-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.65; transform: scale(0.92); } }

.row-body { flex: 1; min-width: 0; }
.row-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.row-title .pin-ic { color: var(--color-warning); opacity: 0.9; flex-shrink: 0; display: flex; }
.name {
  font-size: 12.5px; font-weight: 600; color: var(--color-foreground);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.35; letter-spacing: -0.015em; flex-shrink: 1; min-width: 0;
}
.rename {
  font-size: 12.5px; font-weight: 600; flex: 1; min-width: 0; font-family: inherit;
  background: var(--color-input-bg); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 5px; padding: 2px 6px; color: var(--color-foreground); outline: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.04);
}
.badges { display: flex; gap: 3px; align-items: center; flex-shrink: 0; }
.badge {
  font-size: 7.5px; font-weight: 560; letter-spacing: 0.02em; padding: 1px 4px; border-radius: 4px;
  background: var(--color-muted); color: var(--color-muted-foreground);
  border: 1px solid transparent; white-space: nowrap;
  transition: background var(--duration-fast) ease, color var(--duration-fast) ease, border-color var(--duration-fast) ease;
}
.badge.on { color: var(--tc); background: color-mix(in oklab, var(--tc) 16%, transparent); border-color: color-mix(in oklab, var(--tc) 25%, transparent); }

.row-meta {
  font-size: 10px; color: var(--color-muted-foreground); line-height: 1.4;
  display: flex; gap: 6px; align-items: center; margin-top: 2px;
  white-space: nowrap; overflow: hidden;
}
.row-meta .port { font-family: var(--font-mono); flex-shrink: 0; opacity: 0.9; }
.row-meta .branch { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex-shrink: 1; }
.row-meta .delta { color: var(--color-warning); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.row-meta .mem { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.row-meta .sep { opacity: 0.3; flex-shrink: 0; }
.tags { display: flex; gap: 3px; flex-shrink: 0; margin-left: 1px; }
.tag {
  font-size: 9px; line-height: 1.45; padding: 0 5px; border-radius: 4px;
  background: var(--color-muted); border: 1px solid var(--color-border);
  color: var(--color-muted-foreground); font-weight: 500;
}

.row-actions {
  position: absolute; top: 0; bottom: 0; right: 8px;
  display: flex; align-items: center; gap: 1px; padding-left: 34px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--duration-fast) ease;
  background: linear-gradient(to right, transparent 0%, var(--color-row-fade) 36px);
  border-radius: 8px;
}
.row-main:hover .row-actions,
.row-main:focus-within .row-actions,
.row.menu-open .row-actions { opacity: 1; pointer-events: auto; }
.row.renaming .row-actions { opacity: 0 !important; pointer-events: none !important; }
@media (hover: none) { .row-actions { opacity: 1; pointer-events: auto; } }
.row-actions .vsep { width: 1px; height: 14px; background: var(--color-border); margin: 0 2px; flex-shrink: 0; }
.row.menu-open .ib.more { color: var(--color-foreground); background: var(--color-hover-overlay); }

/* row enter / exit (system events, not filtering) */
.row-enter { animation: row-enter 220ms var(--ease-out) both; }
.row-exit  { animation: row-exit 180ms var(--ease-out) both; pointer-events: none; }
@keyframes row-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes row-exit  { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-5px); } }

.ok { color: var(--color-success); }
.check-pop { animation: check-pop 280ms var(--ease-out) both; }
@keyframes check-pop { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

.spin { animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- tasks ---------- */

.tasks { margin: 0 8px 2px 26px; }
.tasks-toggle {
  display: flex; align-items: center; gap: 4px;
  padding: 3px 4px; margin-left: -4px;
  border: 0; border-radius: 5px; background: transparent; cursor: pointer;
  font-size: 9.5px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--color-muted-foreground);
  transition: color var(--duration-fast) ease, background var(--duration-fast) ease;
}
.tasks-toggle svg { transition: transform 200ms var(--ease-out); }
.tasks.open .tasks-toggle svg { transform: rotate(90deg); }
@media (hover: hover) and (pointer: fine) { .tasks-toggle:hover { color: var(--color-foreground); background: var(--color-hover-overlay); } }

.tasks-body {
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows 200ms var(--ease-out), opacity 200ms var(--ease-out);
}
.tasks.open .tasks-body { grid-template-rows: 1fr; opacity: 1; }
.tasks-inner { min-height: 0; overflow: hidden; padding-left: 12px; }
.tasks-inner > :last-child { margin-bottom: 4px; }

.task {
  display: flex; align-items: center; gap: 7px; padding: 3px 2px; border-radius: 4px;
  font-size: 10.5px; color: var(--color-foreground);
  transition: background var(--duration-fast) ease, opacity var(--duration-fast) ease;
}
.task.done { color: var(--color-muted-foreground); opacity: 0.55; }
.task.done .task-text { text-decoration: line-through; }
@media (hover: hover) and (pointer: fine) { .task:hover { background: var(--color-hover-overlay); } }
.task-enter { animation: row-enter 200ms var(--ease-out) both; }
.cb {
  width: 12px; height: 12px; border-radius: 3.5px; padding: 0; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.18); background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--color-foreground);
  transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease;
}
.task.done .cb {
  border-color: color-mix(in oklab, var(--color-status-running) 70%, transparent);
  background: color-mix(in oklab, var(--color-status-running) 55%, transparent);
}
.task-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
.task-x {
  border: 0; background: transparent; cursor: pointer; padding: 2px; display: flex; border-radius: 4px;
  color: var(--color-muted-foreground); opacity: 0; transition: opacity var(--duration-fast) ease, color var(--duration-fast) ease;
}
.task:hover .task-x, .task:focus-within .task-x { opacity: 0.85; }
@media (hover: none) { .task-x { opacity: 0.85; } }
@media (hover: hover) and (pointer: fine) { .task-x:hover { color: var(--color-destructive); } }
.task-add {
  width: 100%; margin-top: 4px; font: inherit; font-size: 10px; padding: 4px 7px;
  border: 1px solid var(--color-border); border-radius: 5px; background: transparent;
  color: var(--color-foreground); outline: none; min-width: 0;
  transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease;
}
.task-add::placeholder { color: var(--color-muted-foreground); }
.task-add:focus { border-color: rgba(255,255,255,0.16); background: rgba(255,255,255,0.05); box-shadow: 0 0 0 2px rgba(255,255,255,0.04); }

/* ---------- offline ---------- */
.offline-label { padding: 16px 16px 4px; }
.offline-label.first { padding-top: 12px; }
.offline-list { padding: 0 0 8px; }

/* ---------- quick actions menu ---------- */

.menu-backdrop { position: absolute; inset: 0; z-index: 30; }
.menu {
  position: absolute; z-index: 31;
  width: 220px; max-height: 272px; overflow-y: auto;
  background: rgba(12, 16, 14, 0.94);
  -webkit-backdrop-filter: blur(48px) saturate(140%);
          backdrop-filter: blur(48px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  box-shadow: 0 14px 44px rgba(0,0,0,0.55), 0 4px 14px rgba(0,0,0,0.4), inset 0 0.5px 0 rgba(255,255,255,0.1);
  padding: 4px;
  transform-origin: var(--mo, top right);
  opacity: 0; transform: scale(0.95);
  transition: opacity 120ms var(--ease-out), transform 120ms var(--ease-out);
}
.menu.open { opacity: 1; transform: none; transition-duration: 160ms; }
.menu .section-label { padding: 5px 10px 3px; }
.mi {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 6px 10px; font-size: 12px; font-weight: 500; text-align: left;
  background: transparent; border: 0; cursor: pointer; border-radius: 6px;
  color: var(--color-foreground); white-space: nowrap;
  transition: background var(--duration-fast) ease, color var(--duration-fast) ease;
}
.mi .ic { color: var(--color-muted-foreground); display: flex; flex-shrink: 0; }
.mi.muted { color: var(--color-muted-foreground); font-size: 11px; }
.mi.muted .ic { color: inherit; }
.mi .right { margin-left: auto; flex-shrink: 0; font-size: 10px; opacity: 0.6; flex: none; }
.mi .ell { overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.mi[disabled] { opacity: 0.6; cursor: default; }
@media (hover: hover) and (pointer: fine) { .mi:not([disabled]):hover { background: var(--color-accent); color: var(--color-foreground); } }
.msep { height: 1px; background: var(--color-border); margin: 4px 8px; }
.commit-form { display: flex; gap: 4px; padding: 4px 6px; }
.commit-form input {
  flex: 1; min-width: 0; font: inherit; font-size: 11px; padding: 4px 6px;
  border: 1px solid var(--color-border); border-radius: 4px; background: transparent;
  color: var(--color-foreground); outline: none;
}
.commit-form input::placeholder { color: var(--color-muted-foreground); }
.commit-form .mi { width: auto; padding: 4px 8px; }
.commit-form .mi[disabled] { opacity: 0.5; }

/* ---------- sessions view ---------- */

.sessions { flex: 1; display: flex; flex-direction: column; height: 100%; min-width: 0; }
.sessions-head { display: flex; align-items: center; gap: 4px; padding: 12px 72px 8px 8px; min-height: 28px; }
.session {
  padding: 6px 12px; display: flex; flex-direction: column; gap: 2px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background var(--duration-fast) ease;
}
@media (hover: hover) and (pointer: fine) { .session:hover { background: rgba(255,255,255,0.04); } }
.session-l1 { display: flex; align-items: center; gap: 6px; }
.session-l1 .pdot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: var(--pc); }
.session-l1 .model { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-family: var(--font-mono); }
.session-l1 .cost { font-size: 11.5px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.session-l2 { display: flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--color-muted-foreground); white-space: nowrap; overflow: hidden; }
.session-l2 .m { font-family: var(--font-mono); }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .chrome { padding: 18px 16px; }
  .chrome-top { flex-direction: column; gap: 14px; }
  .features { text-align: left; columns: 2; column-gap: 16px; line-height: 1.9; }
  .chrome-bottom { flex-direction: column; align-items: stretch; gap: 18px; }
  .tagline { font-size: 20px; max-width: none; }
  .cta { grid-template-columns: 1fr; grid-template-areas: "actions" "byline" "fine"; justify-items: start; }
  .cta-actions { width: 100%; justify-content: space-between; }
  .stage { padding: 4px 16px 12px; }
}

/* ---------- reduced motion: keep opacity, drop movement ---------- */

@media (prefers-reduced-motion: reduce) {
  .chrome > *, .caption { transform: none; animation-duration: 300ms; }
  .panel { transform: none; }
  .panel.open { transform: none; }
  .view-enter-fwd, .view-enter-back { animation: view-fade 200ms ease both; }
  .row-enter { animation: view-fade 200ms ease both; }
  .row-exit { animation: view-fade 180ms ease reverse both; }
  .task-enter { animation: view-fade 200ms ease both; }
  .menu { transform: none; }
  .dot.live, .dot.stopping { animation: none; }
  .check-pop { animation: none; }
  .cell[data-active="1"]:hover { transform: none; }
  .tasks-toggle svg { transition: none; }
  .ib:active, .tile:active, .download:active, .ghost:active { transform: none; }
}
@keyframes view-fade { from { opacity: 0; } to { opacity: 1; } }
