/* Lanes. Calm surfaces, hairline borders and black pill buttons; colour is kept for the lanes
   themselves (one per person) and for collisions, which are the only thing allowed to be loud. */

:root {
  --canvas: #fbfbfa;
  --surface: #ffffff;
  --ink: #0b0b0b;
  --ink-2: #5c5c5c;
  --ink-3: #9a9a9a;
  --line: #ececec;
  --line-2: #dedede;
  --hover: #f4f4f3;
  --press: #ebebea;
  --collide: #f26b1d;
  --collide-soft: #fff4ec;
  --collide-line: #ffd8c0;
  --ok: #16a05a;
  --ok-soft: #eaf7f0;
  --focus: #7c9cff;
  --code: #0d0d0e;
  --code-ink: #e8e8e8;
  --glow-1: #dbe4ff;
  --glow-2: #eee0ff;
  --glow-3: #ffe6d8;
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.04);
  --shadow-md: 0 1px 2px rgba(10, 10, 10, 0.04), 0 10px 28px -14px rgba(10, 10, 10, 0.16);
  --shadow-lg: 0 2px 4px rgba(10, 10, 10, 0.04), 0 24px 60px -24px rgba(10, 10, 10, 0.28);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --display: "Inter Tight", Inter, system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0c0c0d;
    --surface: #131315;
    --ink: #f2f2f2;
    --ink-2: #a3a3a3;
    --ink-3: #6b6b6b;
    --line: #232326;
    --line-2: #2f2f33;
    --hover: #1b1b1e;
    --press: #232327;
    --collide: #ff8a4c;
    --collide-soft: #2a1810;
    --collide-line: #5a2f17;
    --ok: #3cc684;
    --ok-soft: #0f2419;
    --code: #09090a;
    --glow-1: #1a2140;
    --glow-2: #261a3a;
    --glow-3: #3a2216;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -16px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font: 14px/1.5 var(--body);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); letter-spacing: -0.02em; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--focus) 30%, transparent); }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
svg.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
svg.icon.filled { fill: currentColor; stroke: none; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c, var(--ok)) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
@keyframes sheen { from { background-position: -120% 0; } to { background-position: 220% 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
.rise { animation: rise 0.55s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }

/* ---------- boot and skeletons ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(90deg, var(--line) 25%, var(--hover) 50%, var(--line) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }

/* ---------- buttons and fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  font: 500 13.5px/1 var(--body); letter-spacing: -0.005em; white-space: nowrap;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.12s var(--ease), box-shadow 0.15s;
}
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--surface)); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); padding: 0 10px; }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.danger { color: var(--collide); }
.btn.lg { height: 44px; padding: 0 22px; font-size: 15px; }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.icon-btn { width: 32px; padding: 0; }

input, textarea, select {
  font: 14px/1.4 var(--body); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 0 12px; height: 38px; width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { padding: 10px 12px; height: auto; min-height: 84px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
label.field { display: grid; gap: 6px; font: 500 12.5px/1.2 var(--body); color: var(--ink-2); }
.form { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 10px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions.end { justify-content: flex-end; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--hover); color: var(--ink-2);
  font: 500 12px/1 var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chip.mono { font: 500 11.5px/1 var(--mono); }
.chip .icon { width: 12px; height: 12px; }
.chip.collide { background: var(--collide-soft); color: var(--collide); box-shadow: inset 0 0 0 1px var(--collide-line); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.dark { background: var(--ink); color: var(--surface); }
.count { font: 500 12px/1 var(--body); color: var(--ink-3); }

.avatar { width: 28px; height: 28px; border-radius: 50%; flex: none; background: var(--hover); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--person, var(--line)); }
.avatar.sm { width: 20px; height: 20px; box-shadow: none; }

/* ---------- the app shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px;
  padding: 18px 12px; border-right: 1px solid var(--line); background: var(--surface);
}
.logo { display: flex; align-items: center; gap: 9px; padding: 4px 8px; font: 600 16px/1 var(--display); letter-spacing: -0.02em; text-decoration: none; }
.logo svg { width: 22px; height: 22px; }

.switcher { position: relative; }
.switcher > summary {
  list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 8px; border-radius: 10px; border: 1px solid var(--line); transition: background 0.15s;
}
.switcher > summary::-webkit-details-marker { display: none; }
.switcher > summary:hover { background: var(--hover); }
.switcher .name { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher .icon { color: var(--ink-3); transition: transform 0.2s var(--ease); }
.switcher[open] > summary .icon { transform: rotate(180deg); }
.menu {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px);
  padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); animation: pop 0.18s var(--ease);
}
.menu a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; text-decoration: none; }
.menu a:hover { background: var(--hover); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.tile {
  width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center;
  font: 600 12px/1 var(--display); color: #1a1a1a;
  background: linear-gradient(135deg, var(--glow-1), var(--glow-2) 55%, var(--glow-3));
}
@media (prefers-color-scheme: dark) { .tile { color: #f2f2f2; } }

.nav { display: grid; gap: 2px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
  color: var(--ink-2); text-decoration: none; font-weight: 500; transition: background 0.15s, color 0.15s;
}
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--hover); color: var(--ink); }
.nav .label { font: 500 11.5px/1 var(--body); color: var(--ink-3); padding: 10px 10px 6px; }
.side .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.side .me span { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.side .me form { margin: 0; }

.main { min-width: 0; padding: 32px 40px 64px; }
.wrap { max-width: 1180px; margin: 0 auto; display: grid; gap: 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.page-head h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.page-head .meta { margin-top: 6px; color: var(--ink-2); }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ok)); flex: none; }
.dot.pulse { animation: pulse 2s var(--ease) infinite; }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.col { display: grid; gap: 20px; min-width: 0; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); min-width: 0; transition: box-shadow 0.25s var(--ease), border-color 0.25s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; }
.card-head h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.card-head .icon { color: var(--ink-3); }
.card-head .spacer { flex: 1; }
.card-body { padding: 0 18px 18px; display: grid; gap: 12px; }
.card.alert { background: var(--collide-soft); border-color: var(--collide-line); }
.card.alert .card-head .icon { color: var(--collide); }
.empty { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 12px; background: var(--hover); color: var(--ink-2); }
.empty .icon { color: var(--ink-3); }

.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px 12px 16px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(100deg, var(--glow-1), var(--glow-2) 50%, var(--glow-3));
  color: #1b1b1b;
}
.banner.paused { background: var(--collide-soft); border-color: var(--collide-line); color: var(--ink); }
@media (prefers-color-scheme: dark) { .banner { color: var(--ink); } }

/* ---------- end-to-end encryption ---------- */
.key-banner { justify-content: flex-start; margin-bottom: 18px; }
.key-banner > .icon { flex: none; color: var(--collide); }
.key-banner .grow { flex: 1 1 280px; min-width: 0; }
.key-banner form { flex: 1 1 320px; flex-wrap: nowrap; }
.key-banner input { flex: 1; min-width: 0; }
.sealed-note { display: flex; gap: 8px; align-items: flex-start; }
.sealed-note .icon { flex: none; margin-top: 3px; width: 14px; height: 14px; }
.sealed-mark { display: inline-flex; color: var(--ink-3); }
.sealed-mark .icon { width: 13px; height: 13px; }
.setting.devices { border-bottom: 0; padding-bottom: 4px; }

/* ---------- lanes: one per session ---------- */
.lanes { display: grid; }
.lane {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(120px, 34%); column-gap: 14px; row-gap: 6px;
  align-items: center; padding: 14px 0; border-top: 1px solid var(--line);
}
.lane:first-child { border-top: 0; padding-top: 4px; }
.lane .who { display: grid; gap: 4px; min-width: 0; }
.lane .title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lane .session { font: 500 13px/1.3 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane .text { color: var(--ink-2); overflow-wrap: anywhere; }
.lane .text.faint { color: var(--ink-3); }
.lane .tags { grid-column: 2 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.lane.stale { opacity: 0.55; }
.track-wrap { display: grid; gap: 6px; justify-items: end; }
.track { position: relative; width: 100%; height: 6px; border-radius: 99px; background: var(--hover); }
.track .fill {
  position: absolute; inset: 0 auto 0 0; width: var(--fresh, 100%); border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--person) 18%, transparent), var(--person));
  transition: width 0.8s var(--ease);
}
.lane.live .track .fill {
  background-image: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.55) 50%, transparent 100%), linear-gradient(90deg, color-mix(in srgb, var(--person) 18%, transparent), var(--person));
  background-size: 40% 100%, 100% 100%; background-repeat: no-repeat; animation: sheen 2.6s linear infinite;
}
.track .head {
  position: absolute; top: 50%; left: var(--fresh, 100%); width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: var(--person); box-shadow: 0 0 0 3px var(--surface); --c: var(--person);
}
.lane.live .track .head { animation: pulse 2s var(--ease) infinite; }
.lane.collides .track .head { background: var(--collide); --c: var(--collide); animation: pulse 1.6s var(--ease) infinite; }
.track-wrap .when { font-size: 12px; color: var(--ink-3); }
details.files summary { list-style: none; cursor: pointer; }
.tags details[open] { flex-basis: 100%; }
details.files summary::-webkit-details-marker { display: none; }
details.files ul { margin: 8px 0 0; padding: 10px 12px; list-style: none; display: grid; gap: 3px; border-radius: 10px; background: var(--hover); animation: fade 0.2s; }
details.files li { font: 12px/1.45 var(--mono); color: var(--ink-2); overflow-wrap: anywhere; }

/* ---------- collisions ---------- */
.collision { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--collide-line); }
.collision .pair { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 500; }
.collision .pair .icon { color: var(--collide); }
.collision ul { margin: 0; padding: 0; list-style: none; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- environments ---------- */
.env { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.env:first-child { border-top: 0; padding-top: 0; }
.env .lock { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--hover); color: var(--ink); }
.env .name { font: 600 13.5px/1.2 var(--mono); }
.env .by { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; margin-top: 3px; }
.env .left { grid-column: 2 / -1; display: grid; gap: 5px; }
.meter { height: 4px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.meter i { display: block; height: 100%; width: var(--p, 0%); background: var(--person, var(--ink-2)); border-radius: inherit; transition: width 0.8s var(--ease); }
.seats .meter i { background: linear-gradient(90deg, #7c9cff, #b38cff 60%, #ffb38a); }
.reserve { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 110px auto; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--line-2); }

/* ---------- activity ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; padding: 8px 0; }
.timeline li::before { content: ""; position: absolute; left: 6.5px; top: 22px; bottom: -8px; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { margin-top: 6px; --c: var(--ink-3); }
.timeline .bad .dot { --c: var(--collide); background: var(--collide); }
.timeline .good .dot { --c: var(--ok); background: var(--ok); }
.timeline .hold .dot { --c: var(--ink); background: var(--ink); }
.timeline .quiet .dot { background: var(--line-2); }
.timeline .bad .text { color: var(--collide); }
.timeline .when { font-size: 12px; color: var(--ink-3); white-space: nowrap; padding-top: 1px; }

/* ---------- messages and requests ---------- */
.composer { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line-2); border-radius: 14px; transition: border-color 0.15s, box-shadow 0.15s; }
.composer:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.composer textarea { border: 0; padding: 4px 4px 0; min-height: 56px; box-shadow: none; resize: none; }
.composer textarea:focus { box-shadow: none; }
.composer .bar { display: flex; gap: 6px; align-items: center; }
.composer .bar input { height: 30px; font-size: 13px; border-radius: 999px; max-width: 150px; }
.composer .bar .spacer { flex: 1; }
.composer .bar select { height: 30px; font-size: 13px; border-radius: 999px; max-width: 170px; padding: 0 10px; }
.req .actions input { flex: 1; min-width: 160px; height: 34px; border-radius: 999px; }
.item .actions { margin-left: auto; }
.card .actions > input { flex: 1; min-width: 160px; height: 34px; border-radius: 999px; }
.replying { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--hover); font-size: 13px; color: var(--ink-2); }
.messages { display: grid; gap: 4px; }
.msg { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 10px 6px; border-radius: 12px; transition: background 0.15s; }
.msg:hover { background: var(--hover); }
.msg .top { display: flex; align-items: baseline; gap: 8px; }
.msg .top b { font-weight: 600; }
.msg .top span { font-size: 12px; color: var(--ink-3); }
.msg .body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.msg .quote { margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--line-2); color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg .foot { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.msg .foot .btn { height: 26px; font-size: 12.5px; opacity: 0; transition: opacity 0.15s; }
.msg:hover .foot .btn, .msg:focus-within .foot .btn { opacity: 1; }
.msg .foot .btn.always { opacity: 1; padding: 0 2px; color: var(--ink); }
.msg .foot .btn.always:hover { background: transparent; text-decoration: underline; }
.msg.for-you { background: color-mix(in srgb, var(--focus) 8%, transparent); }
.req { display: grid; gap: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); }
.req .top { display: flex; align-items: center; gap: 8px; }
.req .top .spacer { flex: 1; }
.req .reply-text { padding: 8px 10px; border-radius: 10px; background: var(--hover); color: var(--ink-2); }
.needs { border-color: color-mix(in srgb, var(--focus) 40%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 10%, transparent); }

.tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--hover); }
.tabs button { height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 500 13px/1 var(--body); cursor: pointer; transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- setup, admin, home ---------- */
.narrow { max-width: 820px; }
.step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 16px; }
.card-body.step { padding: 20px; }
.step .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--display); background: var(--ink); color: var(--surface); }
.step h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; }
.step .content { display: grid; gap: 12px; min-width: 0; }
.code { position: relative; border-radius: 12px; background: var(--code); color: var(--code-ink); border: 1px solid #1f1f22; }
.code pre { margin: 0; padding: 14px 52px 14px 16px; overflow-x: auto; font: 12.5px/1.6 var(--mono); white-space: pre; scrollbar-width: thin; }
.code .copy { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 8px; border: 1px solid #2a2a2e; background: #17171a; color: #bdbdbd; display: grid; place-items: center; cursor: pointer; transition: background 0.15s, color 0.15s; }
.code .copy:hover { background: #222226; color: #fff; }
.code .label { display: block; padding: 10px 16px 0; font: 500 11.5px/1 var(--body); color: #8a8a8a; }
.once { padding: 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--line)); background: var(--ok-soft); display: grid; gap: 10px; animation: rise 0.4s var(--ease); }
.list { display: grid; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.item:first-child { border-top: 0; padding-top: 2px; }
.item .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.item .grow b { font-weight: 500; }
.setting { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); align-items: start; }
.setting:first-child { border-top: 0; padding-top: 0; }
.setting .what b { display: block; font-weight: 500; }
.setting .what span { font-size: 13px; color: var(--ink-2); }
.seats { display: grid; gap: 8px; }
.plan { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan b { font: 600 20px/1 var(--display); letter-spacing: -0.02em; text-transform: capitalize; }

.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.ws-card {
  display: grid; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; box-shadow: var(--shadow-sm); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}
.ws-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.ws-card .tile { width: 36px; height: 36px; border-radius: 11px; font-size: 15px; }
.ws-card b { font: 600 16px/1.2 var(--display); letter-spacing: -0.02em; }
.ws-card .faint { font-size: 12.5px; }
.ws-card.new { border-style: dashed; box-shadow: none; place-content: center; justify-items: center; color: var(--ink-2); min-height: 150px; cursor: pointer; font: inherit; }
.ws-card.new:hover { color: var(--ink); }

/* ---------- signed out ---------- */
.landing { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; position: relative; }
.landing::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 70%; z-index: -1;
  background: radial-gradient(40% 50% at 30% 40%, var(--glow-1), transparent 70%), radial-gradient(35% 45% at 62% 35%, var(--glow-2), transparent 70%), radial-gradient(30% 40% at 78% 60%, var(--glow-3), transparent 70%);
  filter: blur(20px); opacity: 0.9;
}
.landing header { display: flex; align-items: center; justify-content: space-between; padding: 20px clamp(16px, 4vw, 40px); }
.hero { display: grid; justify-items: center; align-content: center; gap: 22px; padding: 24px 16px 40px; text-align: center; }
.hero h1 { font-size: clamp(40px, 7vw, 76px); font-weight: 600; letter-spacing: -0.045em; line-height: 0.98; max-width: 14ch; text-wrap: balance; }
.hero p { font-size: clamp(16px, 2vw, 18px); color: var(--ink-2); max-width: 36em; text-wrap: balance; }
.road { width: min(760px, 100%); margin-top: 18px; }
.road svg { width: 100%; height: auto; overflow: visible; }
.road .lane-line { stroke: var(--line-2); stroke-width: 2; stroke-linecap: round; }
.road .runner { rx: 6; }
.road .r1 { fill: #5b8def; animation: run1 9s linear infinite; }
.road .r2 { fill: #9d7cf0; animation: run2 8s linear infinite; }
.road .r3 { fill: #2bb673; animation: run3 8s linear infinite; }
.road .r4 { fill: #e7a23b; animation: run4 11s linear infinite; animation-delay: -4s; }
.road .file rect { fill: var(--surface); stroke: var(--line-2); }
.road .file rect { animation: hot 8s linear infinite; }
.road .file text, .road .wait { font: 500 11px var(--mono); fill: var(--ink-2); }
.road .wait { fill: var(--collide); animation: waitlabel 8s linear infinite; }
@keyframes run1 { from { transform: translateX(-60px); } to { transform: translateX(700px); } }
@keyframes run2 { from { transform: translateX(-60px); } to { transform: translateX(700px); } }
@keyframes run3 { 0% { transform: translateX(-60px); } 38% { transform: translateX(255px); } 62% { transform: translateX(255px); } 100% { transform: translateX(700px); } }
@keyframes run4 { from { transform: translateX(-60px); } to { transform: translateX(700px); } }
@keyframes hot { 0%, 37% { stroke: var(--line-2); fill: var(--surface); } 41%, 58% { stroke: var(--collide); fill: var(--collide-soft); } 63%, 100% { stroke: var(--line-2); fill: var(--surface); } }
@keyframes waitlabel { 0%, 38% { opacity: 0; } 42%, 58% { opacity: 1; } 62%, 100% { opacity: 0; } }
.points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; max-width: 980px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px) 48px; }
.points div { display: grid; gap: 6px; }
.points b { font: 600 15px/1.3 var(--display); letter-spacing: -0.015em; }
.points span { color: var(--ink-2); }

/* ---------- toasts ---------- */
#toasts { position: fixed; z-index: 50; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 8px; max-width: min(92vw, 520px);
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--surface);
  font-size: 13.5px; box-shadow: var(--shadow-lg); animation: rise 0.3s var(--ease);
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.toast.error { background: var(--collide); color: #fff; }
.toast.out { opacity: 0; transform: translateY(6px); }


/* ---------- long lists: scroll areas, show more, folded sessions ---------- */
.scroll { max-height: var(--max, 440px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; margin-right: -8px; padding-right: 8px; }
.scroll.fade-bottom { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 36px), transparent); }
.scroll.fade-top { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28px); mask-image: linear-gradient(to bottom, transparent, #000 28px); }
.scroll.fade-top.fade-bottom { -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to bottom, transparent, #000 28px, #000 calc(100% - 36px), transparent); }
.more {
  width: 100%; height: 34px; margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px dashed var(--line-2); border-radius: 999px; background: transparent; color: var(--ink-2);
  font: 500 13px/1 var(--body); cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.more:hover { background: var(--hover); color: var(--ink); border-style: solid; }
.more .icon { width: 14px; height: 14px; }
.timeline li.more-row { display: block; padding: 4px 0 2px; }
.timeline li.more-row::before { display: none; }
.older { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 10px; }
.older > summary {
  list-style: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer;
  padding: 6px 8px; margin: 0 -8px; border-radius: 10px; font-weight: 500; transition: background 0.15s;
}
.older > summary::-webkit-details-marker { display: none; }
.older > summary:hover { background: var(--hover); }
.older > summary .icon { transform: rotate(-90deg); transition: transform 0.2s var(--ease); color: var(--ink-3); }
.older[open] > summary .icon { transform: none; }
.older > summary .faint { font-weight: 400; font-size: 13px; }
.older .lane.stale { opacity: 0.8; }
.older[open] > .lanes { animation: fade 0.25s var(--ease); }
.msg .body.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; }

/* ---------- small screens ---------- */
@media (max-width: 980px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; z-index: 10; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .logo span { display: none; }
  .switcher { flex: 1; min-width: 0; }
  .nav { order: 3; width: 100%; display: flex; overflow-x: auto; scrollbar-width: none; }
  .nav .label { display: none; }
  .side .me { margin: 0; padding: 0; border: 0; }
  .side .me span { display: none; }
  .main { padding: 20px 16px 48px; }
  .page-head h1 { font-size: 24px; }
  .lane { grid-template-columns: 28px minmax(0, 1fr); }
  .track-wrap { grid-column: 2; justify-items: stretch; }
  .track-wrap .when { justify-self: start; }
  .reserve { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .setting { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .points { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .road .r3 { transform: translateX(255px); }
  .road .r1 { transform: translateX(420px); }
  .road .r2 { transform: translateX(330px); }
  .road .r4 { transform: translateX(120px); }
}

/* ---------- dashboard: navigation groups, tiles, toolbars, paging ---------- */
.settled .rise { animation: none; }
.nav .label:not(:first-child) { margin-top: 10px; }
.nav-label { flex: 1; }
.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  font: 600 11.5px/1 var(--body); background: var(--hover); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
}
.badge.alert { background: var(--collide); color: #fff; box-shadow: none; }
.badge.info { background: var(--focus); color: #fff; box-shadow: none; }
.switcher .name-wrap, .menu .name-wrap { flex: 1; min-width: 0; display: grid; gap: 1px; }
.switcher .repo, .menu .repo { font: 11.5px/1.2 var(--mono); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu a[aria-current="true"] { background: var(--hover); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat {
  display: grid; gap: 6px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; box-shadow: var(--shadow-sm); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.stat-top { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 500; }
.stat-icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--hover); color: var(--ink-2); }
.stat b { font: 600 30px/1.05 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .detail { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat.alert { border-color: var(--collide-line); background: linear-gradient(180deg, var(--collide-soft), var(--surface) 70%); }
.stat.alert .stat-icon { background: var(--collide); color: #fff; }
.stat.alert b { color: var(--collide); }
.stat.info { border-color: color-mix(in srgb, var(--focus) 40%, var(--line)); }
.stat.info .stat-icon { background: var(--focus); color: #fff; }

.view-all { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: 4px 8px; border-radius: 8px; transition: background 0.15s, color 0.15s; }
.view-all:hover { background: var(--hover); color: var(--ink); }
.view-all .icon { width: 14px; height: 14px; transition: transform 0.2s var(--ease); }
.view-all:hover .icon { transform: translateX(2px); }
.empty.ok { background: var(--ok-soft); color: var(--ok); }
.empty.ok .icon { color: var(--ok); }
.lane.compact { padding: 10px 0; }
.lane.compact .text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 6px; }
.toolbar .spacer { flex: 1; }
.toolbar select { width: auto; height: 34px; border-radius: 999px; padding: 0 12px; }
.tab-count { margin-left: 6px; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tabs button[aria-selected="true"] .tab-count { color: var(--ink-2); }
.search { position: relative; display: flex; align-items: center; min-width: 220px; flex: 0 1 300px; }
.search .icon { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.search input { padding-left: 34px; height: 34px; border-radius: 999px; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.pager .nums { display: flex; align-items: center; gap: 4px; }
.pager .num { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--ink-2); font: 500 13px/1 var(--body); cursor: pointer; display: grid; place-items: center; transition: background 0.15s, color 0.15s; }
.pager .num:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.pager .num[aria-current="page"] { background: var(--ink); color: var(--surface); }
.pager .num:disabled { opacity: 0.35; cursor: default; }
.pager .gap { color: var(--ink-3); padding: 0 4px; }

.day + .day { margin-top: 8px; }
.day h3 { position: sticky; top: 0; z-index: 1; margin: 0 0 4px; padding: 6px 0; font: 600 12.5px/1 var(--body); letter-spacing: 0; color: var(--ink-3); background: var(--surface); }
.tips { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--ink-2); }
.step-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.step-head h2 { margin: 0; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.landing .fine { font-size: 13px; color: var(--ink-3); }

.seat-line { display: flex; justify-content: space-between; gap: 10px; font-weight: 500; }
.plan-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plan-option { display: grid; gap: 10px; align-content: start; padding: 16px; border-radius: 14px; border: 1px solid var(--line); transition: border-color 0.2s; }
.plan-option.current { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 6%, transparent); }
.plan-option-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-option-head b { font: 600 16px/1.2 var(--display); }
.plan-option .price { font: 600 20px/1.2 var(--display); letter-spacing: -0.02em; }
.plan-option ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--ink-2); }
.plan-option li { display: flex; gap: 8px; align-items: flex-start; }
.plan-option li .icon { color: var(--ok); margin-top: 2px; width: 14px; height: 14px; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font: 500 12px/1 var(--body); color: var(--ink-3); padding: 0 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: var(--hover); }
.table .end { text-align: right; }

.join { margin-top: 8vh; }
.join .card-body { padding: 28px; gap: 18px; }
.join-head { display: flex; align-items: center; gap: 14px; }
.join-head .tile { width: 44px; height: 44px; border-radius: 13px; font-size: 18px; }
.join h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; }
.join .muted { display: flex; align-items: center; gap: 6px; }

@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .plan-options { grid-template-columns: minmax(0, 1fr); }
  .search { flex: 1 1 100%; min-width: 0; }
  .card-head { flex-wrap: wrap; }
  .table th:nth-child(2), .table td:nth-child(2) { display: none; }
}
@media (max-width: 480px) { .stats { grid-template-columns: minmax(0, 1fr); } }
/* Eleven links fit on short screens: the navigation scrolls between the switcher and you. */
.side .nav { min-height: 0; overflow-y: auto; scrollbar-width: none; }
/* Long lines (invite links, commands) scroll inside their code block instead of widening the column. */
.card-body > *, .once > *, .content > * { min-width: 0; }
.code { max-width: 100%; }
