:root {
  --ground: #edf0f4;
  --surface: #ffffff;
  --ink: #14213d;
  --ink-2: #55617a;
  --ink-3: #8a94a8;
  --line: #d6dce6;
  --line-strong: #b9c2d1;
  --signal: #d7263d;
  --signal-tint: #fdeef0;
  --support: #0b7a75;
  --admin: #5b3fd9;
  --other: #b4690e;
  --done: #9aa3b5;
  --ok: #0b7a75;
  --font: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; height: 100%; }
body {
  margin: 0;
  height: 100%;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { margin: 0 0 8px; letter-spacing: -0.01em; line-height: 1.2; }
h2 { font-size: 22px; }
h3 { font-size: 16px; margin-top: 28px; }
.muted { color: var(--ink-2); }
.center { text-align: center; }
.error { color: var(--signal); }
.bad { color: var(--signal); font-weight: 600; }
.stars { color: var(--other); letter-spacing: 0.05em; }

/* Buttons and inputs */
.btn {
  font: inherit; font-size: 13px; font-weight: 600;
  color: var(--surface); background: var(--ink); border: 1px solid var(--ink); border-radius: 6px;
  padding: 7px 12px; cursor: pointer; text-decoration: none; text-align: center; white-space: nowrap;
}
.btn:hover { background: #23335a; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-quiet { color: var(--ink); background: var(--surface); border-color: var(--line-strong); }
.btn-quiet:hover { background: var(--ground); }
.btn-sm { padding: 4px 9px; font-size: 12px; }
input, textarea, select {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 10px; min-width: 0;
}
textarea { resize: none; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
label input { font-size: 15px; color: var(--ink); }
:focus-visible { outline: 2px solid var(--admin); outline-offset: 2px; }
.form-error { color: var(--signal); margin: 0; font-size: 14px; }
.form-ok { color: var(--ok); margin: 0; font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.stack .btn { align-self: flex-start; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form input { padding: 4px 8px; font-size: 13px; width: 160px; }

/* Login */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(100%, 360px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 28px; display: flex; flex-direction: column; gap: 14px;
}
.login-card h1 { font-size: 24px; }
.login-card p { margin: -8px 0 0; }
.login-card .btn { margin-top: 6px; padding: 10px; font-size: 15px; }

/* App shell */
.app { height: 100%; display: flex; flex-direction: column; }
.top {
  display: flex; align-items: center; gap: 24px;
  height: 54px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); flex: none;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.conn { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }
.conn[data-state="on"] { background: var(--support); }
.conn[data-state="off"] { background: var(--signal); }
.nav { display: flex; gap: 4px; margin-right: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  text-decoration: none; font-weight: 600; color: var(--ink-2); padding: 16px 10px; white-space: nowrap;
  border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 6px;
}
.nav .nav-account { display: none; }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.pill { background: var(--signal); color: #fff; font-size: 12px; line-height: 1; padding: 3px 7px; border-radius: 999px; }
.presence { display: flex; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); margin-left: -6px;
}
.avatar:first-child { margin-left: 0; }
.me { display: flex; align-items: center; gap: 10px; }
.me a { font-weight: 600; text-decoration: none; }
.me a[aria-current="page"] { text-decoration: underline; }
.view { flex: 1; min-height: 0; }

/* Pages */
.page { max-width: 960px; margin: 0 auto; padding: 32px 24px 60px; }
.page.narrow { max-width: 560px; }
.page .tabs { margin: 12px 0 16px; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.inactive td { color: var(--ink-3); }
.table td .actions { display: flex; gap: 6px; justify-content: flex-end; }

/* Tabs */
.tabs { display: flex; gap: 2px; }
.tabs button {
  font: inherit; font-weight: 600; color: var(--ink-2); background: transparent; border: 0;
  border-bottom: 2px solid transparent; padding: 8px 10px; cursor: pointer;
}
.tabs button[aria-selected="true"], .tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }

/* Inbox layout */
.inbox { display: grid; grid-template-columns: 210px 330px 1fr; height: 100%; }
.list-pane { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-right: 1px solid var(--line); }
.list-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.list-head input { width: 100%; }
.convs { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
.conv {
  position: relative; padding: 10px 14px 10px 14px; border-left: 4px solid var(--line-strong); border-bottom: 1px solid var(--line); cursor: pointer;
}
.conv[data-type="support"] { border-left-color: var(--support); }
.conv[data-type="admin"] { border-left-color: var(--admin); }
.conv[data-type="other"] { border-left-color: var(--other); }
.conv[data-status="closed"] { border-left-color: var(--done); color: var(--ink-2); }
.conv:hover { background: var(--ground); }
.conv[aria-selected="true"] { background: var(--ground); box-shadow: inset 0 0 0 1px var(--line-strong); }
.conv-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.conv-name { font-weight: 600; }
.conv-top time { font-size: 12px; color: var(--ink-3); }
.conv-where { font-size: 13px; color: var(--ink-2); }
.conv-preview { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 16px; }
.dot { position: absolute; right: 12px; bottom: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--signal); }
.list-empty { padding: 32px 16px; color: var(--ink-2); }

.thread-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.thread-empty { margin: auto; text-align: center; color: var(--ink-2); }
.thread-empty p { margin: 4px 0; }
.thread { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.thread-head {
  display: flex; align-items: center; gap: 14px; padding: 10px 18px;
  background: var(--surface); border-bottom: 1px solid var(--line); flex: none;
}
.thread-head .back, .profile .back { display: none; }
.thread-who { flex: 1; min-width: 0; }
.thread-who .uname { color: var(--ink-2); }
.thread-where { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-actions { display: flex; gap: 8px; }

.msgs { flex: 1; overflow: auto; padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 8px; }
.bubble {
  max-width: min(72%, 640px); padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  align-self: flex-start; border-bottom-left-radius: 4px;
}
.bubble.agent { align-self: flex-end; background: var(--ink); color: #fff; border-color: var(--ink); border-bottom-left-radius: 12px; border-bottom-right-radius: 4px; }
.bubble.failed { border-color: var(--signal); background: var(--signal-tint); color: var(--ink); }
.bubble-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-meta { font-size: 11px; margin-top: 4px; color: var(--ink-3); }
.bubble.agent .bubble-meta { color: rgba(255, 255, 255, 0.7); }
.bubble-err { font-size: 12px; color: var(--signal); margin-top: 4px; }
.media { display: block; margin-bottom: 6px; max-width: 100%; }
.media img { max-width: 100%; max-height: 360px; border-radius: 8px; display: block; }
.media.file { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.media.file:hover { text-decoration: underline; }
.media.file.blocked { color: var(--ink-2); cursor: not-allowed; }
audio.media, video.media { width: 100%; max-width: 420px; }
.sys { align-self: center; text-align: center; font-size: 13px; color: var(--ink-2); margin: 6px 0; }
.sys time { display: block; font-size: 11px; color: var(--ink-3); }
.sys-closed span, .sys-rated span { font-weight: 600; color: var(--ink); }
.sys-not_solved span { font-weight: 600; color: var(--signal); }
.typing-line { padding: 0 18px 6px; font-size: 13px; color: var(--ink-2); font-style: italic; }
.composer { display: flex; gap: 10px; padding: 12px 18px 16px; background: var(--surface); border-top: 1px solid var(--line); flex: none; }
.composer textarea { flex: 1; max-height: 160px; line-height: 1.4; }
.composer-note, .composer-error { margin: 0; padding: 8px 18px; font-size: 13px; background: var(--surface); border-top: 1px solid var(--line); }
.composer-note { color: var(--ink-2); }
.composer-error { color: var(--signal); }

@media (max-width: 800px) {
  .top { gap: 10px; padding: 0 12px; }
  .brand-name { display: none; }
  .nav { flex: 1; }
  .nav a { padding: 16px 7px; font-size: 14px; }
  .nav .nav-account { display: inline-flex; }
  .me a { display: none; }
  .presence { flex: none; }
  .inbox { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .inbox.show-thread { grid-template-rows: minmax(0, 1fr); }
  .thread-pane { display: none; }
  .inbox.show-thread .list-pane, .inbox.show-thread .rail { display: none; }
  .inbox.show-thread .thread-pane { display: flex; }

  .thread-head { padding: 8px 12px; }
  .thread-head .back { display: inline-block; }
  .thread-actions .btn-quiet { display: none; }
  .msgs { padding: 12px; }
  .bubble { max-width: 88%; }
  .composer { padding: 10px 12px; }
  .page { padding: 20px 16px 40px; }
  .table .actions { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: no-preference) {
  .conv[data-status="open"] .dot { animation: pulse 2s ease-in-out infinite; }
  @keyframes pulse { 50% { transform: scale(1.35); } }
}

/* Summary tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 8px 0 8px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.tile-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.tile-value.hot { color: var(--signal); }
.tile-label { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.tile-sub { font-size: 12px; color: var(--ink-3); }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 12px 0 14px; }
.filters label { min-width: 140px; }
.filters .btn { align-self: flex-end; }
.filters input[type="date"] { padding: 7px 8px; }

/* Members */
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--ground); }
.table tr[data-selected="true"] td { background: var(--ground); }
.table-link { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.table-link:hover { text-decoration: underline; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); margin-right: 6px; vertical-align: middle; }
.online-dot.on { background: var(--support); }
.detail { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; margin-top: 16px; }
.detail-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.detail-head .avatar { width: 40px; height: 40px; font-size: 14px; margin: 0; }
.detail-head h3 { margin: 0; }
.detail-meta { color: var(--ink-2); font-size: 13px; }
.detail-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 14px 0; }
.stat { background: var(--ground); border-radius: 6px; padding: 8px 10px; }
.stat b { display: block; font-size: 18px; }
.stat span { font-size: 12px; color: var(--ink-2); }
.range-row { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.recent { list-style: none; margin: 8px 0 0; padding: 0; }
.recent li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.recent li:last-child { border-bottom: 0; }
.recent .when { color: var(--ink-3); font-size: 12px; min-width: 96px; }
.recent a { font-weight: 600; text-decoration: none; }
.recent a:hover { text-decoration: underline; }
.table a { text-decoration: none; font-weight: 600; }
.table a:hover { text-decoration: underline; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head .btn { margin-left: auto; }
@media (max-width: 800px) {
  .table { display: block; overflow-x: auto; }
}

/* Group rail */
.rail { display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); overflow: auto; padding: 8px; gap: 2px; }
.rail-head { font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 6px 8px 4px; }
.rail-item {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center;
  width: 100%; text-align: left; font: inherit; color: var(--ink); background: transparent; border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer;
}
.rail-item:hover { background: var(--ground); }
.rail-item[aria-pressed="true"] { background: var(--ground); box-shadow: inset 0 0 0 1px var(--line-strong); }
.rail-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-meta { grid-column: 1; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-item .pill { grid-column: 2; grid-row: 1 / span 2; }

/* List sections and chips */
.section { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 4px; font-size: 12px; font-weight: 600; color: var(--ink-3); background: var(--surface); position: sticky; top: 0; z-index: 1; }
.section-count { font-weight: 400; }
.conv-tags { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.conv-group, .conv-closed { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; line-height: 1; padding: 4px 7px; border-radius: 999px; background: var(--ground); color: var(--ink-2); white-space: nowrap; }
.chip-support { background: #e0f1f0; color: #0a5f5b; }
.chip-admin { background: #ebe6fb; color: #4630b3; }
.chip-other { background: #f8ecd8; color: #7f4a0b; }
.chip-role { background: #ebe6fb; color: #4630b3; }
.chip-star { background: #f8ecd8; color: #7f4a0b; }
.chip-bad { background: var(--signal-tint); color: var(--signal); }
.chip-muted { background: var(--ground); color: var(--ink-3); }
.thread-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.thread-title .name { font-size: 16px; }

/* Members page */
.members { display: grid; grid-template-columns: 340px 1fr; height: 100%; }
.members-list { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-right: 1px solid var(--line); }
.members-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 6px; }
.members-head h2 { margin: 0; font-size: 18px; }
.members-list > input { margin: 4px 14px 8px; }
.chips { display: flex; gap: 6px; padding: 0 14px 10px; flex-wrap: wrap; }
.chip-btn { font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.member-cards { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; border-top: 1px solid var(--line); }
.member-card { display: flex; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 0; gap: 12px; align-items: flex-start; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.member-card:hover { background: var(--ground); }
.member-card[aria-pressed="true"] { background: var(--ground); box-shadow: inset 3px 0 0 var(--ink); }
.member-card.inactive { opacity: 0.6; }
.member-card .avatar { width: 40px; height: 40px; font-size: 14px; margin: 0; border: 0; flex: none; }
.member-card-body { min-width: 0; flex: 1; }
.member-card-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.member-card-meta { font-size: 12px; color: var(--ink-2); margin-top: 2px; display: flex; align-items: center; }
.member-card-stats { font-size: 12px; color: var(--ink-3); margin-top: 4px; display: flex; gap: 10px; }
.member-card-stats .stars { color: var(--other); }

.member-profile { min-width: 0; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.member-profile .thread-empty { margin: auto; }
.profile { padding: 22px 26px 40px; max-width: 1040px; width: 100%; }
.profile-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; margin: 0; border: 0; }
.profile-id { min-width: 0; flex: 1; }
.profile-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-name h3 { margin: 0; font-size: 20px; }
.profile-meta { font-size: 13px; color: var(--ink-2); margin-top: 3px; display: flex; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; width: 100%; padding-top: 12px; border-top: 1px solid var(--line); }
.btn-danger { color: var(--signal); border-color: #f0b8c0; }
.btn-danger:hover { background: var(--signal-tint); }
.btn-danger-solid { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn-danger-solid:hover { background: #b81e32; }
.confirm { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 8px; border: 1px dashed var(--line-strong); border-radius: 6px; font-size: 13px; }
.confirm-q { font-weight: 600; }
.inline-area { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-area .inline-form label { flex-direction: row; align-items: center; gap: 8px; }
.profile-section { margin-top: 18px; }
.section-head { display: flex; align-items: center; gap: 16px; }
.section-head h4, .profile-section > h4, .chart h4 { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.section-head .tabs button { padding: 4px 8px; font-size: 13px; }
.strip { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.strip-cell { padding: 12px 14px; border-right: 1px solid var(--line); }
.strip-cell:last-child { border-right: 0; }
.strip-value { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.strip-value .stars { font-size: 14px; letter-spacing: 0; }
.strip-label { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.hbar { display: grid; grid-template-columns: 72px 1fr 32px; align-items: center; gap: 10px; padding: 3px 0; font-size: 13px; }
.hbar-label { color: var(--ink-2); }
.hbar-track { height: 10px; background: var(--ground); border-radius: 0 4px 4px 0; overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.hbar-fill.star { background: var(--other); }
.hbar-fill.ns { background: var(--signal); }
.hbar-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.cols { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 96px; align-items: end; }
.col { display: flex; flex-direction: column; align-items: center; height: 100%; }
.col-track { flex: 1; width: 100%; max-width: 20px; display: flex; align-items: flex-end; }
.col-fill { display: block; width: 100%; min-height: 0; background: var(--ink); border-radius: 4px 4px 0 0; }
.col-label { font-size: 10px; color: var(--ink-3); margin-top: 4px; }
.recent li { flex-wrap: wrap; }

/* Dialog */
.dialog { border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; width: min(92vw, 420px); background: var(--surface); color: var(--ink); }
.dialog::backdrop { background: rgba(20, 33, 61, 0.35); }
.dialog h3 { margin: 0 0 14px; font-size: 18px; }
.dialog .stack { max-width: none; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.input-row { display: flex; gap: 6px; }
.input-row input { flex: 1; }

.page.wide { max-width: 1180px; }
.hbar.wide { grid-template-columns: 200px 1fr 40px; }
.hbar.wide .hbar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-fill.ink { background: var(--ink); }
.hbar-fill.type-support { background: var(--support); }
.hbar-fill.type-admin { background: var(--admin); }
.hbar-fill.type-other { background: var(--other); }
.strip.five { grid-template-columns: repeat(5, 1fr); margin-top: 14px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); margin: -4px 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--ink); }
.swatch.teal { background: var(--support); }
.col.pair .col-track { gap: 2px; }
.col.pair .col-fill { width: 50%; }
.col-fill.teal { background: var(--support); }
.detail-head h3 { display: inline-flex; align-items: center; gap: 8px; }
.charts .chart { min-width: 0; }
.charts > .chart:only-child, .charts > div:only-child { grid-column: 1 / -1; }
.tile-sub .stars { font-size: 13px; }

/* Mobile overrides for the rail and the members page (must follow their base rules) */
@media (max-width: 800px) {
  .rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 6px 8px; gap: 4px; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail-head { display: none; }
  .rail-item { display: inline-flex; align-items: center; gap: 6px; flex: none; width: auto; max-width: 200px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); }
  .rail-item[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: none; }
  .rail-meta { display: none; }
  .members { grid-template-columns: 1fr; }
  .member-profile { display: none; }
  .members.show-thread .members-list { display: none; }
  .members.show-thread .member-profile { display: flex; }
  .profile { padding: 14px 12px 32px; }
  .profile .back { display: inline-block; margin-bottom: 10px; }
  .profile-head { padding: 14px; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip-cell { border-bottom: 1px solid var(--line); }
  .strip-cell:nth-child(even) { border-right: 0; }
  .charts { grid-template-columns: 1fr; }
  .cols { height: 80px; }
  .strip.five { grid-template-columns: repeat(2, 1fr); }
  .hbar.wide { grid-template-columns: 110px 1fr 36px; }
}
