@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

/* =====================================================================
   MandalaStack — 2026 UI system
   Mobile-first. Award-winning polish, low-risk (class-compatible).
   ===================================================================== */

:root {
  color-scheme: light;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Space Grotesk', var(--font);

  /* Neutrals */
  --ink: #171a23;
  --ink-soft: #3a4050;
  --muted: #6b7385;
  --line: #e7eaf2;
  --line-strong: #d4dae6;
  --soft: #f3f5fb;
  --panel: #ffffff;
  --panel-2: #f8faff;
  --bg: #eef1f9;

  /* Brand + accents */
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-3: #06b6d4;
  --brand-ink: #4338ca;
  --brand-soft: #eef0ff;
  --brand-grad: linear-gradient(120deg, #5b52f0 0%, #7c3aed 52%, #4f46e5 100%);
  --accent-grad: linear-gradient(120deg, #4f46e5 0%, #7c3aed 45%, #06b6d4 100%);

  /* Status */
  --ok: #0f9d6b;   --ok-soft: #e2f7ef;  --ok-line: #b6ecd6;
  --warn: #b7791f; --warn-soft: #fdf3db;--warn-line: #f2dca0;
  --bad: #dc2b3f;  --bad-soft: #fdeaec; --bad-line: #f5bcc3;

  --blue: var(--brand);
  --blue-soft: var(--brand-soft);
  --text: var(--ink);
  --green: var(--ok);
  --red: var(--bad);

  /* Topbar / nav */
  --nav-grad: linear-gradient(105deg, #191634 0%, #2a1b57 52%, #163a63 100%);
  --nav-bg: rgba(255, 255, 255, .82);
  --nav-ink: #171a23;
  --nav-muted: #6b7385;
  --nav-line: #e7eaf2;
  --nav-chip: rgba(23, 26, 35, .05);
  --nav-chip-line: rgba(23, 26, 35, .1);

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(20, 24, 45, .06), 0 1px 1px rgba(20, 24, 45, .04);
  --shadow: 0 2px 6px -2px rgba(20, 24, 45, .08), 0 12px 30px -14px rgba(20, 24, 45, .18);
  --shadow-lg: 0 24px 60px -22px rgba(37, 30, 90, .34);
  --glow: 0 8px 24px -8px rgba(99, 91, 240, .55);
  --shadow-focus: 0 0 0 3px rgba(99, 91, 240, .22);

  --r: 16px;
  --r-md: 12px;
  --r-sm: 10px;
  --topbar: 56px;
  --icon-rail: 74px;
  --tabbar: calc(60px + env(safe-area-inset-bottom, 0px));
  --ease: cubic-bezier(.22, .61, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --nav-bg: rgba(20, 17, 44, .86);
  --nav-ink: #ffffff;
  --nav-muted: #c9d2ea;
  --nav-line: rgba(255, 255, 255, .08);
  --nav-chip: rgba(255, 255, 255, .08);
  --nav-chip-line: rgba(255, 255, 255, .12);
  --ink: #eef1fb;
  --ink-soft: #c3c9db;
  --muted: #99a1b6;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --soft: #171b28;
  --panel: #161a27;
  --panel-2: #1b2030;
  --bg: #0b0d16;
  --brand: #7b74ff;
  --brand-ink: #b7b2ff;
  --brand-soft: rgba(123, 116, 255, .14);
  --ok: #37d39b;   --ok-soft: rgba(55, 211, 155, .12);  --ok-line: rgba(55, 211, 155, .3);
  --warn: #e8b23e; --warn-soft: rgba(232, 178, 62, .12);--warn-line: rgba(232, 178, 62, .3);
  --bad: #ff6b7d;  --bad-soft: rgba(255, 107, 125, .12);--bad-line: rgba(255, 107, 125, .32);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 2px 8px -2px rgba(0, 0, 0, .5), 0 16px 40px -18px rgba(0, 0, 0, .7);
  --shadow-lg: 0 28px 70px -24px rgba(0, 0, 0, .8);
  --glow: 0 8px 26px -8px rgba(123, 116, 255, .6);
  --shadow-focus: 0 0 0 3px rgba(123, 116, 255, .32);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

.inline-form {
  display: inline;
}

.row-actions {
  white-space: nowrap;
}

.link-button.danger,
.button.danger {
  color: var(--bad);
}

.storage-toolbar,
.storage-actions,
.storage-pathbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.storage-toolbar {
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.storage-pathbar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.storage-actions input[type="text"] {
  min-width: 220px;
}

.storage-dropzone {
  margin: 18px;
  min-height: 120px;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
}

.storage-dropzone.is-dragging {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.storage-upload-queue {
  display: grid;
  gap: 8px;
  padding: 0 18px 18px;
}

.storage-upload-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.danger-zone {
  border-color: color-mix(in srgb, var(--bad) 30%, var(--line));
}
html, body { min-height: 100%; max-width: 100%; overflow-x: hidden; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient page glow */
.app-body {
  background:
    radial-gradient(760px 460px at 88% -8%, rgba(124, 58, 237, .14), transparent 60%),
    radial-gradient(680px 520px at -6% 4%, rgba(6, 182, 212, .12), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

a { color: var(--brand); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--brand-2); text-decoration: none; }
.muted { color: var(--muted); }
.strong-link { color: var(--ink); font-weight: 700; }
.strong-link:hover { color: var(--brand); }

::selection { background: rgba(124, 58, 237, .2); }

.icon, .ui-icon { width: 20px; height: 20px; flex: 0 0 auto; }

h1 { font-family: var(--font-display); font-size: 22px; line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 16px; margin: 0; font-weight: 650; letter-spacing: -.01em; }
h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
p { margin: 0; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: padding-box; }

/* =========================== TOPBAR =========================== */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--nav-bg);
  color: var(--nav-ink);
  z-index: 60;
  border-bottom: 1px solid var(--nav-line);
  box-shadow: 0 8px 30px -18px rgba(20, 24, 45, .25);
}
@supports (backdrop-filter: blur(8px)) {
  .topbar { backdrop-filter: blur(14px) saturate(140%); }
}
:root[data-theme="dark"] .topbar { box-shadow: 0 8px 30px -12px rgba(20, 15, 50, .5); }
.brand {
  color: var(--nav-ink);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--nav-chip);
  box-shadow: inset 0 0 0 1px var(--nav-chip-line);
}
.brand .icon { width: 24px; height: 24px; }
.brand:hover { color: var(--nav-ink); }

.quick-search {
  height: 38px;
  min-width: 0;
  flex: 1;
  max-width: 380px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--nav-chip-line);
  border-radius: 999px;
  background: var(--nav-chip);
  color: var(--nav-muted);
  padding: 0 8px 0 14px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.quick-search:hover { background: color-mix(in srgb, var(--nav-chip) 60%, var(--nav-chip-line)); border-color: var(--nav-chip-line); }
.quick-search .icon { width: 16px; height: 16px; }
.quick-search .shortcut,
.quick-search kbd {
  margin-left: auto;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--nav-muted);
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--nav-chip);
}
.top-spacer { flex: 0; }

.top-icon, .avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--nav-chip-line);
  background: var(--nav-chip);
  color: var(--nav-ink);
  position: relative;
  cursor: pointer;
  transition: transform .15s var(--spring), background .18s var(--ease);
}
.top-icon:hover, .avatar:hover { background: color-mix(in srgb, var(--nav-chip) 55%, var(--nav-chip-line)); transform: translateY(-1px); }
.top-icon:active, .avatar:active { transform: scale(.94); }
.top-icon .icon { width: 19px; height: 19px; }
.avatar {
  font-weight: 700;
  font-size: 13px;
  background: linear-gradient(140deg, #8b7bff, #6d5efc);
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
  box-shadow: 0 4px 14px -4px rgba(109, 94, 252, .8);
}
.dot {
  position: absolute;
  width: 9px;
  height: 9px;
  right: 8px;
  top: 7px;
  border-radius: 999px;
  background: #ff5b6e;
  box-shadow: 0 0 0 2px var(--panel), 0 0 10px 1px rgba(255, 91, 110, .8);
  animation: pulse-dot 2s var(--ease) infinite;
}
@keyframes pulse-dot { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }

/* =========================== BOTTOM NAV (mobile) =========================== */
.rail, .global-icon-rail {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  border-top: 1px solid var(--line);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 30px -18px rgba(20, 24, 45, .5);
}
@supports (backdrop-filter: blur(8px)) {
  .rail, .global-icon-rail { backdrop-filter: blur(18px) saturate(150%); }
}
.rail nav {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 4px;
}
.rail a, .global-icon-rail a {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-weight: 600;
  font-size: 10.5px;
  text-align: center;
  transition: color .15s var(--ease), background .15s var(--ease), transform .15s var(--spring);
}
.rail a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.rail a .icon, .global-icon-rail a .ui-icon { width: 22px; height: 22px; transition: transform .2s var(--spring); }
.rail a:hover, .global-icon-rail a:hover { color: var(--brand); background: var(--brand-soft); }
.rail a.active, .global-icon-rail a.active {
  color: var(--brand);
  background: var(--brand-soft);
}
.rail a.active .icon, .global-icon-rail a.active .ui-icon { transform: translateY(-2px) scale(1.06); }
.rail a:active, .global-icon-rail a:active { transform: scale(.9); }
.rail-separator { display: none; }
.global-icon-rail {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.global-icon-rail::-webkit-scrollbar { display: none; }
.global-icon-rail a { font-size: 0; }

/* =========================== SHELL =========================== */
.shell {
  padding: calc(var(--topbar) + 18px) 15px calc(var(--tabbar) + 24px);
  max-width: 1560px;
  margin: 0 auto;
  animation: shell-in .4s var(--ease) both;
}
@keyframes shell-in { from { opacity: 0; } to { opacity: 1; } }

.page-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.page-heading h1 {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-heading p { color: var(--muted); font-size: 13.5px; }

/* =========================== CARDS =========================== */
.card, .list-card, .stat, .empty-state {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.card, .list-card { margin-bottom: 16px; position: relative; overflow: clip; }
.card { padding: 16px; }
.card.summary-deployments,
.card.summary-side,
.card.project-info,
.card.deployments-card,
.card.activity-card,
.list-card { padding: 0; }

/* staggered entrance */
.shell > .card,
.shell > .list-card,
.shell > .stats-grid,
.shell > .summary-grid,
.shell > .topline,
.shell > section {
  animation: rise-in .5s var(--ease) both;
}
.shell > *:nth-child(1) { animation-delay: .02s; }
.shell > *:nth-child(2) { animation-delay: .06s; }
.shell > *:nth-child(3) { animation-delay: .1s; }
.shell > *:nth-child(4) { animation-delay: .14s; }
.shell > *:nth-child(5) { animation-delay: .18s; }
.shell > *:nth-child(6) { animation-delay: .22s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.card-head, .table-card-head {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  flex-wrap: wrap;
}
.card > .card-head:first-child { margin: -16px -16px 16px; }
.card.deployments-card > .card-head:first-child,
.card.activity-card > .card-head:first-child { margin: 0; }
.list-card .card-head { padding: 12px 16px; }
.card-head h2, .table-card-head h2 { font-weight: 650; }

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.search {
  flex: 1;
  min-width: 200px;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 0 14px;
  color: var(--muted);
  background: var(--panel-2);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.search:focus-within { border-color: var(--brand); box-shadow: var(--shadow-focus); }
.search .icon { width: 18px; height: 18px; }
.search input { border: 0; outline: 0; width: 100%; font: inherit; background: transparent; color: var(--ink); min-height: 0; padding: 0; }

.empty-state { max-width: 720px; padding: 36px; }
.empty-row, .list-footer {
  padding: 20px 16px;
  color: var(--muted);
}
.list-footer { border-top: 1px solid var(--line); font-weight: 500; }

/* =========================== TABLES =========================== */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; background: transparent; }
th, td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
  vertical-align: middle;
}
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--panel-2);
}
tbody tr { transition: background .14s var(--ease); }
tbody tr:hover { background: color-mix(in srgb, var(--brand-soft) 55%, transparent); }
td .strong-link { font-weight: 650; }

/* Mobile card tables */
@media (max-width: 720px) {
  table.mobile-cards, table.mobile-cards tbody, table.mobile-cards tr, table.mobile-cards td { display: block; width: 100%; }
  table.mobile-cards thead { display: none; }
  table.mobile-cards tr {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    margin: 12px;
    padding: 6px 4px;
    background: var(--panel);
    box-shadow: var(--shadow-sm);
  }
  table.mobile-cards tr:hover { background: var(--panel); }
  table.mobile-cards td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 0;
    border-bottom: 1px dashed var(--line);
    padding: 11px 14px;
    text-align: right;
  }
  table.mobile-cards td:last-child { border-bottom: 0; }
  table.mobile-cards td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: .03em;
    text-transform: uppercase;
    text-align: left;
    flex: 0 0 auto;
  }
  table.mobile-cards td:not([data-label])::before { content: none; }
  table.mobile-cards .app-mark, table.mobile-cards .repo-mark { margin: 0; }
  table.mobile-cards .build-cell { align-items: flex-end; }
}

/* =========================== STATS =========================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat {
  padding: 18px 16px;
  display: grid;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent-grad);
  opacity: .9;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.stat span { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.stat strong {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.02em;
  background: linear-gradient(150deg, var(--ink), color-mix(in srgb, var(--ink) 60%, var(--brand)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Dashboard mini list -> cards */
.mini-list { display: grid; gap: 10px; padding: 14px 16px; }
.mini-list a, .mini-list > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  color: var(--ink);
  background: var(--panel-2);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.mini-list a strong, .mini-list > div strong { font-weight: 650; font-size: 14px; }
.mini-list a span, .mini-list > div span { grid-column: 1; color: var(--muted); font-size: 12.5px; }
.mini-list a:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  box-shadow: var(--shadow);
  color: var(--ink);
}
.mini-list .badge, .mini-list a > *:last-child { grid-column: 2; grid-row: 1 / span 2; }

.app-mark, .repo-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  margin-right: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  vertical-align: middle;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 14%, transparent);
}
.app-mark .icon, .repo-mark .icon { width: 22px; height: 22px; }

/* =========================== STATUS ICONS / BADGES =========================== */
.status-icons { display: inline-flex; align-items: center; gap: 10px; }
.status-icon { display: grid; place-items: center; color: var(--muted); position: relative; }
.status-icon.ok { color: var(--ok); }
.status-icon.bad { color: var(--bad); }
.status-icon.neutral { color: var(--muted); }
.status-icon[data-tooltip]:hover::after,
.status-icon[data-tooltip]:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  min-width: 180px;
  max-width: 260px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
  box-shadow: var(--shadow-lg);
  z-index: 120;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 3px 11px 3px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 12px;
  text-transform: capitalize;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; opacity: .85; flex: 0 0 auto; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.badge.run { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.badge.run::before { animation: pulse-dot 1.2s ease-in-out infinite; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.badge.neutral { background: var(--soft); color: var(--muted); }

/* =========================== BREADCRUMB / PROJECT HERO =========================== */
.breadcrumb { color: var(--muted); font-weight: 600; margin-bottom: 16px; font-size: 13px; display: flex; align-items: center; flex-wrap: wrap; }
.breadcrumb span { margin: 0 8px; opacity: .6; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }

.project-hero {
  margin-bottom: 16px;
  padding: 18px;
  border-radius: var(--r);
  background:
    radial-gradient(500px 200px at 100% 0%, rgba(124, 58, 237, .1), transparent 60%),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.project-title-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.title-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.project-hero .title-left h1 { font-size: 21px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-hero .repo-mark { width: 46px; height: 46px; flex: 0 0 46px; margin: 0; border-radius: 13px; }
.project-hero .repo-mark .ui-icon { width: 26px; height: 26px; }

.hero-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hero-actions form, .hero-action-form { margin: 0; }
.hero-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  transition: transform .14s var(--spring), border-color .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease);
}
.hero-action:hover:not([disabled]) { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: var(--shadow-sm); }
.hero-action:active:not([disabled]) { transform: scale(.96); }
.hero-action[disabled] { color: var(--muted); cursor: not-allowed; opacity: .7; }
.hero-action .ui-icon { width: 17px; height: 17px; }

.sub-header {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.sub-header li, .sub-header a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.sub-header a:hover { color: var(--brand); }
.sub-header .ui-icon { width: 17px; height: 17px; }

/* =========================== SUMMARY =========================== */
.summary-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.summary-deployments h3, .project-info h3 {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}
.summary-cells { display: grid; grid-template-columns: repeat(3, 1fr); }
.summary-cells > div { padding: 16px; border-right: 1px solid var(--line); }
.summary-cells > div:last-child { border-right: 0; }
.summary-cells span {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
.summary-cells span.ok-text { color: var(--ok); }
.summary-cells span.bad-text { color: var(--bad); }
.summary-cells strong, .summary-side strong {
  display: block;
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}
.summary-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.summary-side > div { padding: 16px; border-right: 1px solid var(--line); position: relative; }
.summary-side > div:last-child { border-right: 0; }
.summary-side strong { font-size: 24px; margin: 8px 0; }
.summary-side h3 { border: 0; padding: 0 34px 0 0; margin: 0 0 4px; font-size: 14px; }
.summary-side a { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; }
.summary-icon { position: absolute; right: 16px; top: 16px; width: 22px; height: 22px; color: var(--brand); opacity: .55; }

.project-info { padding: 0 0 16px; }
.project-info-body { display: grid; gap: 14px; padding: 16px; }
.copy-row { display: flex; align-items: center; gap: 12px; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.copy-row code, .project-info-body code.block {
  flex: 1;
  min-height: 46px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--panel-2);
  padding: 10px 14px;
  overflow-x: auto;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.project-info-body code.block { display: block; }
.info-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.info-label { color: var(--ink-soft); }
.settings-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.webhook-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.webhook-label { font-weight: 600; font-size: 13px; color: var(--ink); margin: 0; }
.copy-label {
  background: transparent;
  border: 1px solid transparent;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 8px;
  transition: background .15s var(--ease);
}
.copy-label:hover { background: var(--brand-soft); }
.copy-label.copied { color: var(--ok); background: var(--ok-soft); }
.copy-label.copied span::after { content: "d ✓"; }
.copy-label .ui-icon { width: 16px; height: 16px; }

/* =========================== BUTTONS =========================== */
.button, button { font: inherit; }
.button {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 650;
  color: var(--ink);
  background: var(--panel);
  cursor: pointer;
  transition: transform .14s var(--spring), box-shadow .18s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}
.button:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line-strong)); box-shadow: var(--shadow-sm); }
.button:active { transform: scale(.97); }
.button.secondary { background: var(--panel); }
.button.secondary:hover { background: var(--panel-2); color: var(--brand); }
.button.primary {
  position: relative;
  overflow: hidden;
  background: var(--brand-grad);
  border: 0;
  color: #fff;
  box-shadow: var(--glow);
}
.button.primary:hover { box-shadow: 0 12px 30px -8px rgba(99, 91, 240, .7); transform: translateY(-1px); }
.button.primary:active { transform: translateY(0) scale(.97); }
.button.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .6s var(--ease);
}
.button.primary:hover::after { transform: translateX(120%); }
.link-button {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 650;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.link-button:hover { background: var(--brand-soft); }

.github-button {
  min-height: 54px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--panel);
  padding: 0 24px;
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
  color: var(--ink);
  transition: transform .14s var(--spring), box-shadow .18s var(--ease), border-color .16s var(--ease);
}
.github-button:hover { border-color: var(--ink-soft); box-shadow: var(--shadow); transform: translateY(-1px); }
.github-button .icon { width: 26px; height: 26px; }
.github-panel { display: grid; gap: 16px; margin-bottom: 8px; }

.notice {
  border: 1px solid var(--warn-line);
  border-radius: var(--r-sm);
  background: var(--warn-soft);
  padding: 14px 16px;
  color: var(--warn);
  font-size: 13px;
}
.notice strong { color: inherit; }

/* =========================== FORMS =========================== */
.form, form { margin: 0; }
.readonly-form, .form { display: grid; gap: 4px; padding: 16px; }
label { display: grid; gap: 8px; font-weight: 600; margin-bottom: 14px; font-size: 13px; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  padding: 0 13px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: var(--shadow-focus); }
textarea { padding: 12px 13px; resize: vertical; line-height: 1.5; }
input[readonly], textarea[readonly] { background: var(--panel-2); color: var(--muted); cursor: default; }
input[readonly]:focus, textarea[readonly]:focus { box-shadow: none; border-color: var(--line-strong); }

.repo-attach-form { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: end; padding: 0; }
.typeahead-wrap { position: relative; }
.typeahead-dropdown {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}
.typeahead-dropdown:empty { display: none; }
.typeahead-dropdown button {
  display: block;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  padding: 0 14px;
  cursor: pointer;
}
.typeahead-dropdown button:hover { background: var(--brand-soft); color: var(--brand); }

/* =========================== DEPLOYMENTS / TIMELINE =========================== */
.build-cell { display: grid; gap: 3px; }
.build-top { font-size: 12px; font-weight: 600; }
.topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  flex-wrap: wrap;
}
.topline h2 { margin-bottom: 4px; }
.timeline { display: grid; gap: 14px; padding: 16px; }
.timeline > div {
  border-left: 2px solid var(--line-strong);
  padding: 0 0 4px 16px;
  position: relative;
}
.timeline > div::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--panel), 0 0 10px -1px var(--brand);
}
.timeline time { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.timeline p { margin-top: 6px; }
pre {
  overflow: auto;
  white-space: pre-wrap;
  max-height: 340px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #0f1320;
  color: #d7def0;
  padding: 14px;
  font-size: 12.5px;
  margin-top: 8px;
}

.snapshot-section { overflow: hidden; }
.snapshot-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 16px;
  flex-wrap: wrap;
}
.snapshot-item:first-of-type { border-top: 0; }
.snapshot-item code { color: var(--muted); font-size: 12px; }
.storage-list { display: grid; padding: 6px 16px 12px; }
.storage-list a, .storage-list span {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  padding: 0 4px;
}
.storage-list a:hover { color: var(--brand); }

/* =========================== PROJECT NAV (subnav) =========================== */
.project-layout { display: grid; grid-template-columns: 1fr; gap: 14px; }
.project-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
  margin-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.project-nav::-webkit-scrollbar { display: none; }
.project-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
}
.project-nav a:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.project-nav a.active {
  color: #fff;
  background: var(--brand-grad);
  border-color: transparent;
  box-shadow: var(--glow);
}
.project-content { min-width: 0; }

/* =========================== OVERLAYS (search / drawer) =========================== */
.drawer-scrim, .search-scrim {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 12, 28, .5);
  backdrop-filter: blur(6px);
  display: none;
}
.drawer-scrim.is-open, .search-scrim.is-open { display: flex; animation: fade-in .2s var(--ease); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.drawer-scrim { justify-content: flex-end; padding: 10px; }
.search-scrim { justify-content: center; align-items: flex-start; padding: 12px; }

.notification-drawer {
  width: min(440px, calc(100vw - 20px));
  height: calc(100dvh - 20px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  animation: slide-in .28s var(--spring) both;
}
@keyframes slide-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.drawer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 2;
}
.drawer-head h2 { font-size: 15px; font-weight: 650; flex: 1; }
.drawer-head form, .drawer-action { font-size: 12.5px; }
.drawer-close {
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 0;
  background: var(--soft);
  cursor: pointer;
  padding: 0;
  transition: background .15s var(--ease);
}
.drawer-close:hover { background: var(--line); }
.drawer-close .ui-icon { width: 18px; height: 18px; }
.drawer-list { padding: 8px 14px 16px; }
.drawer-notice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.drawer-notice:last-child { border-bottom: 0; }
.drawer-notice-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  position: relative;
}
.drawer-notice-icon .ui-icon { width: 17px; height: 17px; }
.drawer-notice.unread .drawer-notice-icon::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5b6e;
  box-shadow: 0 0 0 2px var(--panel);
}
.drawer-notice-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11.5px; font-weight: 600; margin-bottom: 3px; }
.drawer-notice-body h3 { margin: 0 0 4px; font-size: 13.5px; font-weight: 650; }
.drawer-notice-body p { margin: 0 0 8px; color: var(--ink-soft); font-size: 12.5px; line-height: 1.5; }
.drawer-action { font-weight: 650; }
.drawer-empty { padding: 24px 8px; color: var(--muted); }

/* Search panel */
.search-panel {
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  margin-top: 8vh;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: pop-in .26s var(--spring) both;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-10px) scale(.97); } to { opacity: 1; transform: none; } }
.search-panel-input {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}
.search-panel-input .ui-icon { width: 18px; height: 18px; color: var(--muted); }
.search-panel-input input { border: 0; padding: 0; min-height: 0; flex: 1; font-size: 15px; background: transparent; color: var(--ink); }
.search-panel-input input:focus { box-shadow: none; }
.search-panel-body { display: grid; gap: 14px; padding: 14px; overflow: auto; max-height: calc(80dvh - 120px); }
.search-panel-body > *, [data-search-filters] { min-width: 0; }
.search-panel-body h3 { color: var(--muted); font-size: 11px; margin: 0; letter-spacing: .06em; font-weight: 700; text-transform: uppercase; }
.filter-pills { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filter-pills::-webkit-scrollbar { display: none; }
.filter-pills button {
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s var(--ease);
}
.filter-pills button.active { border-color: transparent; color: #fff; background: var(--brand-grad); }
.recent-searches { display: grid; gap: 2px; }
.recent-searches a {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  min-height: 40px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  padding: 6px 8px;
}
.recent-searches a:hover { color: var(--brand); background: var(--brand-soft); }
.recent-searches .ui-icon { width: 15px; height: 15px; color: var(--muted); }
.recent-delete { cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.recent-delete:hover { color: var(--bad); }
.recent-delete .ui-icon { width: 14px; height: 14px; }
.search-results { display: grid; gap: 12px; }
.search-section { display: grid; gap: 4px; }
.search-section-header { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.search-result {
  min-height: 54px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--ink);
}
.search-result:hover, .search-result.is-selected { background: var(--brand-soft); color: var(--brand); }
.search-result-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--muted);
}
.search-result.is-selected .search-result-icon, .search-result:hover .search-result-icon { background: var(--panel); color: var(--brand); }
.search-result-icon .ui-icon { width: 17px; height: 17px; }
.search-result-text { display: grid; min-width: 0; }
.search-result-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result.is-selected .search-result-sub, .search-result:hover .search-result-sub { color: color-mix(in srgb, var(--brand) 70%, var(--muted)); }
.search-result-chevron { color: var(--muted); display: grid; place-items: center; }
.search-empty { color: var(--muted); padding: 18px 4px; }
.search-panel-footer {
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--panel-2);
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.search-panel-footer kbd {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink-soft);
  padding: 0 5px;
  font: inherit;
  font-size: 11px;
}
.result-count { font-weight: 600; }

/* =========================== MODALS =========================== */
.modal, .search-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 28, .5);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: grid;
  place-items: start center;
  padding: 8vh 16px;
}
.modal-card {
  width: min(560px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  animation: pop-in .26s var(--spring) both;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h2 { font-weight: 650; }
.modal-head button { border: 0; background: var(--soft); cursor: pointer; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--ink); }
.modal-head button:hover { background: var(--line); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

/* =========================== FLASH =========================== */
.flash {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--panel);
  padding: 13px 15px;
  margin-bottom: 16px;
  font-size: 13.5px;
  box-shadow: var(--shadow-sm);
}
.flash.success { border-color: var(--ok-line); background: var(--ok-soft); color: var(--ok); }
.flash.error { border-color: var(--bad-line); background: var(--bad-soft); color: var(--bad); }

/* =========================== LOGIN =========================== */
.login-body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(700px 500px at 15% 10%, rgba(124, 58, 237, .14), transparent 55%),
    radial-gradient(760px 560px at 90% 20%, rgba(79, 70, 229, .13), transparent 55%),
    radial-gradient(680px 620px at 60% 100%, rgba(6, 182, 212, .12), transparent 55%),
    var(--bg);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
:root[data-theme="dark"] .login-body {
  background:
    radial-gradient(700px 500px at 15% 10%, rgba(124, 58, 237, .5), transparent 55%),
    radial-gradient(760px 560px at 90% 20%, rgba(79, 70, 229, .48), transparent 55%),
    radial-gradient(680px 620px at 60% 100%, rgba(6, 182, 212, .42), transparent 55%),
    #0c0a1f;
}
.login-body::before, .login-body::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: .18;
  pointer-events: none;
  animation: float-orb 12s ease-in-out infinite;
}
:root[data-theme="dark"] .login-body::before, :root[data-theme="dark"] .login-body::after { opacity: .5; }
.login-body::before { width: 320px; height: 320px; background: #7c3aed; top: -60px; left: -60px; }
.login-body::after { width: 300px; height: 300px; background: #06b6d4; bottom: -80px; right: -60px; animation-delay: -6s; }
@keyframes float-orb { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, 40px) scale(1.12); } }

.login-card {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 30px 80px -30px rgba(37, 30, 90, .35), inset 0 1px 0 rgba(255, 255, 255, .8);
  padding: 34px 30px;
  color: var(--ink);
  animation: pop-in .5s var(--spring) both;
}
:root[data-theme="dark"] .login-card {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .18);
  color: #f4f6ff;
}
.login-logo {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 18px;
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 12px 30px -8px rgba(124, 58, 237, .8);
}
.login-logo .icon { width: 34px; height: 34px; }
.login-card h1 { margin-bottom: 8px; color: var(--ink); font-size: 26px; }
.login-card p { color: var(--muted); margin-bottom: 24px; }
.login-card label { color: var(--ink-soft); }
.login-card input {
  background: var(--panel-2);
  border-color: var(--line-strong);
  color: var(--ink);
}
.login-card input::placeholder { color: var(--muted); }
.login-card input:focus { border-color: var(--brand); box-shadow: var(--shadow-focus); background: var(--panel); }
.login-card .button { width: 100%; }
.login-card .button.secondary {
  background: var(--panel-2);
  border-color: var(--line-strong);
  color: var(--ink-soft);
}
.login-card .button.secondary:hover { background: var(--soft); color: var(--ink); }
.login-card .flash { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }
:root[data-theme="dark"] .login-card h1 { color: #fff; }
:root[data-theme="dark"] .login-card p { color: rgba(233, 237, 255, .72); }
:root[data-theme="dark"] .login-card label { color: rgba(233, 237, 255, .9); }
:root[data-theme="dark"] .login-card input { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); color: #fff; }
:root[data-theme="dark"] .login-card input::placeholder { color: rgba(255, 255, 255, .5); }
:root[data-theme="dark"] .login-card input:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(167, 139, 250, .3); background: rgba(255, 255, 255, .14); }
:root[data-theme="dark"] .login-card .button.secondary { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: #f4f6ff; }
:root[data-theme="dark"] .login-card .button.secondary:hover { background: rgba(255, 255, 255, .16); color: #fff; }
:root[data-theme="dark"] .login-card .flash { background: rgba(255, 91, 110, .16); border-color: rgba(255, 91, 110, .4); color: #ffd7dc; }
.test-login { margin-top: 12px; }

/* =========================== FOCUS =========================== */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--shadow-focus);
  border-radius: 8px;
}

/* =========================== DESKTOP (>= 900px) =========================== */
@media (min-width: 900px) {
  :root { --topbar: 60px; }
  body { font-size: 13.5px; }
  .topbar { padding: 0 22px; gap: 14px; }
  .brand { width: 42px; height: 42px; }
  .quick-search { flex: 0 0 auto; width: min(260px, 24vw); }
  .top-spacer { flex: 1; }

  /* Rails become fixed sidebars */
  .rail {
    top: var(--topbar);
    bottom: 0;
    left: 0;
    right: auto;
    width: 250px;
    border-top: 0;
    border-right: 1px solid var(--line);
    padding: 16px 12px 20px;
    box-shadow: none;
    background: var(--panel);
  }
  @supports (backdrop-filter: blur(8px)) { .rail { backdrop-filter: none; } }
  .rail nav { flex-direction: column; align-items: stretch; gap: 4px; }
  .rail a {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    min-height: 44px;
    padding: 0 16px;
    font-size: 13.5px;
    border-radius: var(--r-sm);
  }
  .rail a .icon { width: 20px; height: 20px; }
  .rail-separator { display: block; height: 1px; margin: 14px 8px; background: var(--line); }

  .global-icon-rail {
    top: var(--topbar);
    bottom: 0;
    left: 0;
    right: auto;
    width: var(--icon-rail);
    flex-direction: column;
    justify-content: flex-start;
    align-content: start;
    gap: 8px;
    padding: 18px 14px;
    overflow: visible;
    border-top: 0;
    border-right: 1px solid var(--line);
    box-shadow: none;
    background: var(--panel);
  }
  @supports (backdrop-filter: blur(8px)) { .global-icon-rail { backdrop-filter: none; } }
  .global-icon-rail a {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    font-size: 0;
    border-radius: 13px;
  }
  .global-icon-rail a .ui-icon { width: 22px; height: 22px; }

  .shell {
    margin-left: 250px;
    padding: calc(var(--topbar) + 26px) 30px 56px;
  }
  body.project-context .shell { margin-left: var(--icon-rail); padding-left: 26px; }

  .page-heading { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
  h1 { font-size: 26px; }
  .page-heading h1 { font-size: 28px; }

  .stats-grid { grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 16px; }
  .stat strong { font-size: 36px; }

  .project-title-row { flex-direction: row; align-items: center; justify-content: space-between; }
  .hero-actions { justify-content: flex-end; }

  .summary-grid { grid-template-columns: minmax(320px, 1fr) minmax(320px, .72fr); gap: 16px; }

  .repo-attach-form { grid-template-columns: minmax(180px, 240px) minmax(260px, 1fr) auto; gap: 14px; }

  /* Project subnav as sidebar */
  .project-layout { grid-template-columns: 172px minmax(0, 1fr); gap: 40px; }
  .project-nav {
    display: grid;
    align-content: start;
    gap: 4px;
    position: fixed;
    top: calc(var(--topbar) + 26px);
    left: calc(var(--icon-rail) + 26px);
    width: 172px;
    max-height: calc(100dvh - var(--topbar) - 52px);
    overflow-y: auto;
    padding: 0;
    z-index: 21;
  }
  .project-nav a {
    background: transparent;
    border: 0;
    border-radius: var(--r-sm);
    padding: 9px 14px;
    color: var(--ink-soft);
  }
  .project-nav a:hover { background: var(--brand-soft); color: var(--brand); border: 0; }
  .project-nav a.active { color: #fff; background: var(--brand-grad); box-shadow: var(--glow); }
  .project-layout > .project-content { grid-column: 2; }
}

@media (min-width: 1200px) {
  .shell { padding-left: 40px; padding-right: 40px; }
  body.project-context .shell { padding-left: 34px; }
}

/* =========================== MOTION SAFETY =========================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =====================================================================
   MandalaStack — P1–P4 review pass: logo, nav, list, summary, GitHub.
   Appended; class-compatible; later rules override the base.
   ===================================================================== */

/* ---- Brand logo (topbar) ---- */
.brand.cloud-mark { display: inline-flex; align-items: center; gap: 9px; width: auto; min-width: 0; height: var(--topbar); background: transparent; box-shadow: none; }
.brand-mark { width: 26px; height: 26px; flex: 0 0 auto; filter: drop-shadow(0 2px 5px rgba(37, 30, 90, .25)); }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; letter-spacing: -.015em; color: var(--nav-ink); white-space: nowrap; }
@media (max-width: 430px) { .brand-word { display: none; } }

/* ---- Login logo (raster mark placeholder, to be vectorized) ---- */
.login-logo { display: flex; justify-content: center; }
.login-logo img { width: 60px; height: 60px; display: block; filter: drop-shadow(0 8px 22px rgba(79, 70, 229, .4)); }

/* ---- GitHub connect button — GitHub brand guidelines: inline (not full-width),
   dark on light UI, light on dark UI ---- */
.github-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: auto; max-width: max-content;
  padding: 9px 16px; margin: 2px 0;
  background: #1f2328; color: #fff;
  border: 1px solid rgba(0, 0, 0, .1); border-radius: 8px;
  font-family: var(--font); font-weight: 600; font-size: .9rem; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.github-button:hover { background: #32383f; transform: translateY(-1px); box-shadow: var(--shadow); }
.github-button:active { transform: translateY(0); }
.github-button .icon, .github-button .ui-icon { width: 18px; height: 18px; color: currentColor; }
:root[data-theme="dark"] .github-button { background: #f6f8fa; color: #1f2328; border-color: rgba(0, 0, 0, .14); }
:root[data-theme="dark"] .github-button:hover { background: #eaeef2; }
.github-panel { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.github-panel .repo-attach-form { width: 100%; display: flex; flex-direction: column; gap: 12px; }

/* ---- P1: pills coherent with the bottom-bar / brand system ---- */
.project-nav { padding-top: 2px; gap: 7px; }
.project-nav a { padding: 7px 15px; font-size: 12.5px; letter-spacing: .01em; }
.project-nav a.active .ui-icon { color: #fff; }
@media (min-width: 900px) {
  /* desktop: pills sit as a tidy sub-header row, sidebar stays on the left */
  .project-nav { padding: 2px 0 6px; }
}

/* ---- P2: Web Applications list — balanced toolbar + real cards ---- */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.toolbar .search { flex: 1 1 240px; min-width: 0; }
.toolbar-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.button.ghost {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
  background: var(--panel-2); color: var(--ink-soft); border: 1px solid var(--line);
  border-radius: var(--r-sm); font-weight: 600; font-size: .84rem; cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.button.ghost:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.button.ghost .ui-icon { width: 15px; height: 15px; }
@media (max-width: 620px) {
  .toolbar { gap: 8px; }
  .toolbar .search { flex: 1 1 100%; }
  .toolbar-actions { width: 100%; }
  .button.ghost { flex: 1; justify-content: center; }
}
/* mobile card: webapp name is the card TITLE (not a right-aligned value) */
@media (max-width: 720px) {
  table.mobile-cards td[data-label="Web Application"] {
    padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line);
  }
  table.mobile-cards td[data-label="Web Application"]::before { display: none; }
  table.mobile-cards td[data-label="Web Application"] .strong-link { font-size: 1.02rem; font-weight: 700; }
}

/* ---- P3: single webapp summary — compact hero + stat clip fix ---- */
.project-hero { padding: 16px 18px; }
.project-hero .title-left h1 { font-size: 20px; }
.project-hero .repo-mark { width: 42px; height: 42px; flex-basis: 42px; }
.hero-actions { gap: 8px; }
.hero-action { padding: 8px 12px; font-size: .84rem; }
.hero-action span { white-space: nowrap; }
@media (max-width: 620px) {
  .hero-actions { width: 100%; gap: 8px; }
  .hero-actions form { flex: 1 1 0; min-width: 0; }
  .hero-action { width: 100%; justify-content: center; padding: 9px 8px; }
  .hero-action span { font-size: .8rem; }
}
/* stat numbers were clipped by gradient-text + negative letter-spacing */
.summary-cells strong, .stat strong { padding-left: 2px; letter-spacing: -.01em; overflow: visible; }

/* ---- P4: suppress the browser's native search clear (X) in overlays ---- */
.search-panel input::-webkit-search-cancel-button,
.search input::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* =====================================================================
   Theme toggle + light-first transitions
   ===================================================================== */
.theme-toggle-sun, .theme-toggle-moon { display: none; line-height: 0; }
[data-theme="light"] .theme-toggle-moon { display: block; }
[data-theme="dark"] .theme-toggle-sun { display: block; }
body, .topbar, .panel, .login-card, .rail, .global-icon-rail {
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.login-theme { position: fixed; top: 14px; right: 14px; z-index: 30; }
.login-theme .theme-toggle { color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 50%; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-sm); }

/* =====================================================================
   Light-first audit: success celebration + focus visibility
   ===================================================================== */
.flash.success { animation: flash-pop .45s var(--spring) both; }
@keyframes flash-pop {
  0% { transform: scale(.96); opacity: 0; }
  60% { transform: scale(1.015); opacity: 1; }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .flash.success { animation: none; }
}
/* Keyboard focus must always be visible, both themes */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--r-sm);
}

/* =====================================================================
   Students board (kanban) + Insights — preview sections, sample data
   ===================================================================== */
.page-head-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mockup-badge {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--warn);
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  padding: 4px 10px;
  border-radius: 999px;
}
.crm-intro { margin: 6px 0 18px; }

.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 300px;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 18px;
  scroll-snap-type: x proximity;
}
.kanban-col {
  scroll-snap-align: start;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  max-height: 74vh;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.kanban-col.dropping { border-color: color-mix(in srgb, var(--stage) 60%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--stage) 22%, transparent); }
.kanban-head { display: flex; align-items: center; gap: 9px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.kanban-head h2 { font-size: .92rem; font-weight: 700; }
.kanban-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--stage); box-shadow: 0 0 8px color-mix(in srgb, var(--stage) 70%, transparent); }
.kanban-count { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 2px 9px; }
.kanban-cards { flex: 1; overflow-y: auto; padding: 12px; display: grid; gap: 10px; align-content: start; }
.kanban-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--stage);
  border-radius: var(--r-md);
  padding: 12px 13px;
  cursor: grab;
  box-shadow: var(--shadow-sm);
  transition: transform .15s var(--spring), box-shadow .15s var(--ease);
}
.kanban-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kanban-card.dragging { opacity: .55; transform: rotate(2deg) scale(.98); cursor: grabbing; }
.kc-top { display: flex; align-items: center; gap: 9px; }
.kc-avatar {
  width: 30px; height: 30px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  font-weight: 800;
  font-size: .82rem;
  color: #fff;
  background: linear-gradient(140deg, color-mix(in srgb, var(--arch, #7c3aed) 85%, #fff), var(--arch, #7c3aed));
}
.kc-name { font-size: .9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-value { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--ink-soft); }
.kc-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.kc-arch {
  font-size: .7rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--arch) 72%, var(--ink));
  background: color-mix(in srgb, var(--arch) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--arch) 30%, transparent);
  padding: 2px 8px;
  border-radius: 999px;
}
.kc-xp { font-size: .74rem; font-weight: 700; color: var(--brand-ink); }
.kc-streak { font-size: .74rem; font-weight: 700; color: var(--warn); }
.kc-activity { margin-top: 8px; font-size: .78rem; color: var(--muted); }
.kanban-foot { border-top: 1px solid var(--line); padding: 10px 12px; display: grid; gap: 6px; }
.kanban-followup {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: .82rem;
  font-weight: 650;
  color: var(--ink-soft);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 7px 11px;
  cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.kanban-followup:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.kanban-followup .ui-icon { width: 15px; height: 15px; }
.kanban-hint { font-size: .72rem; color: var(--muted); }

/* Student drawer */
.student-drawer { position: fixed; inset: 0; z-index: 120; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(10, 12, 28, .5); opacity: 0; transition: opacity .25s var(--ease); }
.student-drawer.open .drawer-scrim { opacity: 1; }
.drawer-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 92vw);
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform .28s var(--ease);
  display: flex;
  flex-direction: column;
}
.student-drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.drawer-avatar { width: 42px; height: 42px; font-size: 1.05rem; }
.drawer-head h2 { font-size: 1.05rem; }
.drawer-sub { font-size: .82rem; }
.drawer-close { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px; border-radius: 50%; }
.drawer-close:hover { color: var(--ink); background: var(--soft); }
.drawer-body { padding: 18px; overflow-y: auto; display: grid; gap: 12px; }
.drawer-body h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 8px; }
.drawer-radar { display: grid; place-items: center; color: var(--ink-soft); }
.drawer-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.drawer-timeline li { display: flex; align-items: baseline; gap: 10px; font-size: .88rem; color: var(--ink-soft); }
.drawer-timeline .tl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: 0 0 auto; }
.drawer-timeline em { margin-left: auto; color: var(--muted); font-style: normal; font-size: .76rem; white-space: nowrap; }
.drawer-notes { width: 100%; min-height: 90px; font: inherit; font-size: .88rem; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; resize: vertical; }

/* Follow-up popover */
.followup-pop { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; background: rgba(10, 12, 28, .5); }
.followup-inner { width: min(440px, 92vw); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 22px; display: grid; gap: 12px; }
.fp-template { background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; color: var(--ink-soft); font-size: .92rem; }
.fp-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* Insights */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0; }
.kpi-card { padding: 14px 16px; display: grid; gap: 6px; opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.kpi-card.lit { opacity: 1; transform: none; }
.kpi-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.kpi-card h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kpi-delta { font-size: .72rem; font-weight: 700; }
.kpi-delta.up { color: var(--ok); }
.kpi-delta.down { color: var(--bad); }
.kpi-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }
.kpi-spark { width: 100%; height: 34px; }

.funnel-card { margin-top: 6px; }
.funnel { padding: 18px; display: grid; gap: 11px; }
.funnel-row { display: grid; grid-template-columns: 150px 1fr 130px; align-items: center; gap: 14px; }
@media (max-width: 640px) { .funnel-row { grid-template-columns: 110px 1fr 96px; } }
.funnel-label { font-size: .85rem; font-weight: 650; color: var(--ink-soft); }
.funnel-track { height: 16px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.funnel-bar { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent-grad); transition: width .8s var(--ease); }
.funnel-bar.lit { width: var(--w); }
.funnel-n { font-size: .85rem; font-weight: 700; text-align: right; }
.funnel-n em { color: var(--muted); font-style: normal; font-weight: 600; font-size: .74rem; }

.insights-duo { display: grid; grid-template-columns: 1.25fr .75fr; gap: 12px; margin-top: 12px; align-items: start; }
@media (max-width: 940px) { .insights-duo { grid-template-columns: 1fr; } }
.dosecv-body { padding: 18px; display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.dosecv-left { color: var(--ink-soft); }
.dosecv-right { flex: 1; min-width: 240px; display: grid; gap: 10px; }
.dosecv-score b { font-family: var(--font-display); font-size: 2.2rem; }
.dosecv-score span { color: var(--muted); font-weight: 600; }
.dosecv-read { color: var(--ink-soft); font-size: .92rem; }
.dosecv-rows { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.dosecv-rows li { display: grid; grid-template-columns: 86px 1fr 30px; grid-template-areas: "name track val" "hint hint hint"; align-items: center; gap: 4px 10px; }
.dr-name { grid-area: name; font-size: .8rem; font-weight: 700; }
.dr-track { grid-area: track; height: 9px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.dr-bar { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--brand-grad); transition: width .8s var(--ease); }
.dr-bar.lit { width: var(--w); }
.dr-val { grid-area: val; font-size: .78rem; font-weight: 700; text-align: right; }
.dr-hint { grid-area: hint; font-size: .7rem; color: var(--muted); }
.dosecv-fine { font-size: .76rem; margin-top: 4px; }

.stages-card .card-head a { font-size: .85rem; font-weight: 650; }
.stages-strip { display: flex; align-items: flex-end; gap: 14px; padding: 22px 18px 16px; min-height: 170px; }
.stage-bar-wrap { flex: 1; display: grid; justify-items: center; gap: 6px; align-content: end; }
.stage-bar { width: 100%; max-width: 46px; height: 110px; border-radius: 10px 10px 4px 4px; background: color-mix(in srgb, var(--stage) 78%, transparent); clip-path: inset(calc(100% - var(--h)) 0 0 0 round 10px); transform: scaleY(0); transform-origin: bottom; transition: transform .7s var(--spring); }
.stage-bar.lit { transform: scaleY(1); }
.stage-bar-wrap b { font-size: .9rem; }
.stage-name { font-size: .68rem; color: var(--muted); text-align: center; }
