/* ORBIT — dark forum interface
 * ---------------------------------------------------------------------------
 * Sections: tokens · reset · banner · shell · buttons · fields · vote rail ·
 *           post card · feed chrome · composer · thread · cards · toasts ·
 *           responsive
 * ------------------------------------------------------------------------- */

/* ---- tokens ------------------------------------------------------------ */

:root {
  --bg:          #030304;
  --surface:     #16171a;
  --surface-2:   #1e1f24;
  --surface-3:   #26272d;
  --surface-4:   #303138;
  --line:        #2e2f36;
  --line-soft:   #232429;

  --text:        #d7dadc;
  --text-2:      #8a8d95;
  --text-3:      #64676f;

  --brand:       #ff4500;
  --up:          #ff4500;
  --down:        #7193ff;
  --primary:     #0079d3;
  --primary-hi:  #1290ec;
  --link:        #8ec2ff;

  --font: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --banner-h: 56px;
  --gap: 20px;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px -18px rgba(0, 0, 0, .9);
}

/* ---- reset ------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
svg { display: block; }

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  letter-spacing: -.01em;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  font-weight: 600;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; }

.ico { display: inline-flex; }
.ico svg, .ico-sm svg { width: 16px; height: 16px; }
.ico-sm svg { width: 13px; height: 13px; }

/* thin scrollbars on the rails */
.col-left, .col-right { scrollbar-width: thin; scrollbar-color: var(--surface-4) transparent; }
.col-left::-webkit-scrollbar, .col-right::-webkit-scrollbar { width: 8px; }
.col-left::-webkit-scrollbar-thumb, .col-right::-webkit-scrollbar-thumb {
  background: var(--surface-4); border-radius: 8px;
}

/* ---- banner ------------------------------------------------------------ */

.banner {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--banner-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.banner-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  flex: 0 0 auto;
  border-radius: 8px;
  padding: 4px 6px 4px 4px;
}
.brand:hover { background: var(--surface-2); }
.brand-mark svg { width: 30px; height: 30px; }
.brand-mark-lg svg { width: 42px; height: 42px; }
.brand-word {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .16em;
  padding-left: 1px;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  max-width: 640px;
  margin: 0 auto;
}
.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-3);
  pointer-events: none;
}
.search-icon svg { width: 17px; height: 17px; }
.search-input {
  width: 100%;
  height: 38px;
  padding: 0 38px 0 38px;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background .15s ease, border-color .15s ease;
}
.search-input::placeholder { color: var(--text-3); }
.search-input:hover { background: var(--surface-3); }
.search-input:focus {
  outline: none;
  background: var(--bg);
  border-color: var(--primary);
}
.search-input::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  padding: 0;
  color: var(--text-3);
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.search-clear svg { width: 14px; height: 14px; }
.search-clear:hover { background: var(--surface-3); color: var(--text); }

.banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.create-btn { display: flex; align-items: center; gap: 6px; padding: 7px 14px 7px 11px; }

.me {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px 4px 4px;
  font: inherit; color: inherit; text-align: left;
  background: none; border: 0; border-radius: 8px;
  cursor: pointer;
}
.me:hover { background: var(--surface-2); }
.me-meta { display: flex; flex-direction: column; line-height: 1.25; }
.me-name { font-size: 12.5px; font-weight: 600; }
.me-karma { font-size: 11px; color: var(--text-3); }

.avatar {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--surface-4), var(--surface-2));
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
}
.avatar-sm { width: 20px; height: 20px; flex-basis: 20px; font-size: 9.5px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  padding: 0;
  color: var(--text-2);
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.banner-menu { display: none; }

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

.shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr) 316px;
  gap: var(--gap);
  max-width: 1560px;
  margin: 0 auto;
  padding: var(--gap) 16px 72px;
  align-items: start;
}

.col-left, .col-right {
  position: sticky;
  top: calc(var(--banner-h) + var(--gap));
  max-height: calc(100vh - var(--banner-h) - var(--gap) * 2);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.col-main { min-width: 0; }
.col-main:focus { outline: none; }

/* left rail ---------------------------------------------------------- */

.sidebar-inner { padding-right: 4px; }

.nav-section { padding: 6px 0 10px; border-bottom: 1px solid var(--line-soft); }
.nav-section:last-of-type { border-bottom: 0; }

.nav-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 10px 6px;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}
.nav-row:hover { background: var(--surface-2); color: var(--text); }
.nav-row.is-active { background: var(--surface-3); color: var(--text); font-weight: 600; }
.nav-ico { display: inline-flex; color: inherit; }
.nav-ico svg { width: 19px; height: 19px; }
.nav-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { font-size: 10.5px; color: var(--text-3); }

.cglyph {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, hsl(var(--hue) 82% 54%), hsl(var(--hue) 62% 32%));
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}
.cglyph-lg { width: 44px; height: 44px; flex-basis: 44px; font-size: 20px; }

.nav-foot { padding: 14px 10px 8px; }
.fine { margin-top: 10px; font-size: 11px; line-height: 1.55; color: var(--text-3); }

.link-btn {
  padding: 0;
  background: none;
  border: 0;
  color: var(--link);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

/* The reset link is the least important control in the rail; keep it quiet. */
.nav-foot .link-btn { color: var(--text-3); font-weight: 500; }
.nav-foot .link-btn:hover { color: var(--text); }

/* ---- buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not([disabled]) { background: var(--primary-hi); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--link); }
.btn-outline:hover { background: rgba(0, 121, 211, .14); }
.btn-quiet { background: var(--surface-3); color: var(--text); }
.btn-quiet:hover { background: var(--surface-4); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--surface-4); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 6px 13px; font-size: 12px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

.chip {
  display: inline-block;
  padding: 1px 7px;
  margin-bottom: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-2);
  background: var(--surface-3);
  border-radius: 4px;
}
.chip-op { color: #7fd3ff; background: rgba(0, 121, 211, .2); margin-bottom: 0; }
.chip-mine { color: #ffb08a; background: rgba(255, 69, 0, .16); margin-bottom: 0; }

.chip-btn {
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
}
.chip-btn:hover { background: var(--surface-3); color: var(--text); }
.chip-btn.is-active { background: var(--surface-4); color: var(--text); border-color: var(--line); }

/* ---- fields ------------------------------------------------------------ */

.field { margin-bottom: 14px; }
.field-label-row { display: flex; align-items: baseline; justify-content: space-between; }
.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.field-count { font-size: 11px; color: var(--text-3); }

.field-input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color .14s ease;
}
.field-input::placeholder { color: var(--text-3); }
.field-input:focus { outline: none; border-color: var(--primary); }
.field-textarea { resize: vertical; min-height: 76px; line-height: 1.6; }

.select-wrap { position: relative; }
.field-select {
  width: 100%;
  padding: 10px 38px 10px 12px;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  appearance: none;
  cursor: pointer;
}
.field-select:focus { outline: none; border-color: var(--primary); }
.select-chevron {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

/* ---- vote rail --------------------------------------------------------- */
/* The signature element: a signed meter down the left edge of every post. */

.vote {
  position: relative;
  display: flex;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  padding: 9px 0 7px;
  background: rgba(255, 255, 255, .015);
  border-right: 1px solid var(--line-soft);
}

.vote-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  align-self: flex-start;
}

/* A signed meter on the card's left edge: the half you voted lights up. */
.vote-track {
  position: absolute;
  left: 0;
  top: 9px;
  width: 2px;
  height: 68px;
  border-radius: 0 2px 2px 0;
  background: var(--surface-4);
  opacity: .5;
  transition: background .18s ease, opacity .18s ease, box-shadow .18s ease;
}
.vote[data-state="up"] .vote-track {
  background: linear-gradient(to bottom, var(--up) 0, var(--up) 48%, transparent 48%);
  opacity: 1;
  box-shadow: 0 0 12px -1px rgba(255, 69, 0, .85);
}
.vote[data-state="down"] .vote-track {
  background: linear-gradient(to bottom, transparent 52%, var(--down) 52%, var(--down) 100%);
  opacity: 1;
  box-shadow: 0 0 12px -1px rgba(113, 147, 255, .8);
}

.vote-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px; height: 24px;
  padding: 0;
  color: var(--text-3);
  background: none;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  transition: color .12s ease, background .12s ease;
}
.vote-btn svg { width: 22px; height: 22px; }
.vote-down svg { transform: rotate(180deg); }
.vote-up:hover { color: var(--up); background: rgba(255, 69, 0, .12); }
.vote-down:hover { color: var(--down); background: rgba(113, 147, 255, .12); }

.vote[data-state="up"] .vote-up,
.vote[data-state="down"] .vote-down { color: currentColor; }
.vote[data-state="up"] .vote-up { color: var(--up); }
.vote[data-state="down"] .vote-down { color: var(--down); }
.vote[data-state="up"] .vote-up svg path,
.vote[data-state="down"] .vote-down svg path { fill: currentColor; }

.vote-score {
  position: relative;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  transition: color .12s ease;
}
.vote[data-state="up"] .vote-score { color: var(--up); }
.vote[data-state="down"] .vote-score { color: var(--down); }

/* horizontal variant, used inside comment action rows */
.vote-row {
  width: auto;
  flex: 0 0 auto;
  padding: 0;
  background: none;
  border-right: 0;
}
.vote-row .vote-stack { flex-direction: row; align-items: center; gap: 2px; }
.vote-row .vote-track { display: none; }
.vote-row .vote-btn { width: 22px; height: 22px; }
.vote-row .vote-btn svg { width: 18px; height: 18px; }
.vote-row .vote-score { min-width: 26px; text-align: center; font-size: 11.5px; }

/* ---- post card --------------------------------------------------------- */

.post-list { display: flex; flex-direction: column; gap: 10px; }

.post {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .14s ease;
}
.post:hover { border-color: var(--surface-4); }
.post-detail { cursor: default; margin-bottom: 12px; }
.post-detail:hover { border-color: var(--line); }

.post-main { flex: 1 1 auto; min-width: 0; padding: 10px 14px 6px; }

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 6px;
}
.meta-community {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 3px;
  margin-left: -3px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.meta-community:hover { background: var(--surface-3); }
.meta-community .cglyph { width: 18px; height: 18px; flex-basis: 18px; font-size: 8.5px; }
.meta-dot { color: var(--text-3); }
.meta-author, .meta-time { color: var(--text-3); }

/* Author names are filters: clicking one pulls up every thread that person
 * touched. The button inherits its surroundings and only reveals itself on
 * hover, so bylines read as text until the cursor asks. */
.author-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0;
  font: inherit; color: inherit;
  background: none; border: 0;
  cursor: pointer;
}
.author-btn:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.meta-author .author-btn:hover { color: var(--text-2); }

.post-title {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -.012em;
  color: var(--text);
}
.post-detail .post-title { font-size: 23px; margin-bottom: 10px; }
.title-btn {
  display: block;
  width: 100%;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.title-btn:hover { color: #fff; }

.post-text {
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--text-2);
}
.post-text p + p { margin-top: 10px; }
.post-text-clamp {
  max-height: 6.6em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}
.post-detail .post-text { font-size: 14.5px; color: var(--text); }

.post-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 8px;
  padding-top: 2px;
}

.act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.act:hover { background: var(--surface-3); color: var(--text); }
.act.is-active { background: var(--surface-3); color: var(--text); }
.act svg { width: 17px; height: 17px; }
.act-comment { color: var(--text-2); }
.act-sm { padding: 4px 8px; font-size: 11.5px; }
.act-sm svg { width: 15px; height: 15px; }

/* ---- feed chrome ------------------------------------------------------- */

.scope { margin-bottom: 14px; }
.scope-banner {
  height: 56px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(115deg, hsl(var(--hue) 80% 46%), hsl(var(--hue) 52% 22%));
}
.scope-community .scope-row {
  padding: 0 16px 14px;
  margin-top: -18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  align-items: flex-end;
}
.scope-row { display: flex; align-items: center; gap: 12px; }
.scope-community .cglyph-lg {
  border: 3px solid var(--surface);
  box-sizing: content-box;
  margin-top: -6px;
}
.scope-text { flex: 1 1 auto; min-width: 0; padding-bottom: 2px; }
.scope-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.2;
}
.scope-sub { font-size: 12.5px; color: var(--text-3); }

.search-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.search-note strong { color: var(--text); font-weight: 600; }

.create-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.create-bar-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  padding: 0 14px;
  font-size: 13.5px;
  text-align: left;
  color: var(--text-3);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .14s ease, color .14s ease;
}
.create-bar-input:hover { border-color: var(--primary); color: var(--text-2); }

.sort-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-3);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.sort-btn:hover { background: var(--surface-2); color: var(--text); }
.sort-btn.is-active { background: var(--surface-3); color: var(--text); }
.sort-btn svg { width: 17px; height: 17px; }
.sort-spacer { flex: 1 1 auto; }
.sort-count { font-size: 11px; color: var(--text-3); padding-right: 6px; }

.empty {
  padding: 44px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.empty-flat { background: none; border: 0; padding: 32px 12px; }
.empty-title { font-size: 16px; font-weight: 600; }
.empty-text { margin-top: 6px; font-size: 13.5px; color: var(--text-3); }
.empty-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ---- composer ---------------------------------------------------------- */

.composer {
  padding: 16px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--surface-4);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.composer-title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.composer-foot { display: flex; justify-content: flex-end; gap: 10px; }

/* ---- thread ------------------------------------------------------------ */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.back-link:hover { color: var(--text); border-color: var(--surface-4); background: var(--surface-2); }

.cmt-box {
  padding: 14px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cmt-box-label { margin-bottom: 8px; font-size: 11.5px; color: var(--text-3); }
.cmt-box-me { color: var(--link); font-weight: 600; }
.cmt-box-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.cmt-box-inline {
  padding: 10px;
  margin: 8px 0 4px 22px;
  background: var(--surface-2);
}

.thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.thread-count { font-size: 14px; font-weight: 600; }
.chip-row { display: flex; align-items: center; gap: 6px; }
.chip-row-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* the nested reply tree ------------------------------------------------ */

.cmt-tree { list-style: none; margin: 0; padding: 0; }

.cmt { position: relative; padding: 10px 0 2px; }

/* the alignment line, which is also the collapse target */
.cmt-line {
  position: absolute;
  left: 0;
  top: 34px;
  bottom: 6px;
  width: 16px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.cmt-line::after {
  content: '';
  position: absolute;
  left: 7px; top: 0; bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
  transition: background .15s ease;
}
.cmt-line:hover::after { background: var(--down); }
.cmt.is-folded > .cmt-line { display: none; }

.cmt-main { min-width: 0; }

.cmt-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}
.cmt-toggle {
  display: grid;
  place-items: center;
  width: 16px; height: 16px;
  flex: 0 0 16px;
  padding: 0;
  font-size: 13px;
  line-height: 1;
  color: var(--text-3);
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.cmt-toggle:hover { background: var(--surface-3); color: var(--text); }
.cmt-author { font-size: 12.5px; font-weight: 600; color: var(--text); }
.cmt-folded { color: var(--text-3); font-style: italic; }
.cmt.is-mine > .cmt-main > .cmt-meta .cmt-author { color: #ffb08a; }

.cmt-text {
  margin: 5px 0 4px 22px;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--text);
}
.cmt-text p + p { margin-top: 9px; }

.cmt-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 20px;
}

/* children indent past their parent's line */
.cmt-main > .cmt-tree { padding-left: 22px; margin-top: 2px; }

/* ---- cards (right rail) ------------------------------------------------ */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}
.card:last-child { margin-bottom: 0; }
.card-banner {
  height: 38px;
  background: linear-gradient(115deg, hsl(var(--hue) 80% 46%), hsl(var(--hue) 52% 22%));
}
.card-body { padding: 14px; }
.card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.005em;
}
.card-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.card-text { margin-top: 12px; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-3);
}
.card-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }

.about-head { display: flex; align-items: center; gap: 11px; }
.card-about .card-body { padding-top: 12px; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
}
.stat-row-3 { grid-template-columns: repeat(3, 1fr); }
.stat { display: flex; flex-direction: column; gap: 1px; }
.stat-value { font-size: 16px; font-weight: 600; color: var(--text); }
.stat-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.stat-label .ico-sm { color: #4fd07a; }

.rules { margin-top: 10px; }
.rule { border-top: 1px solid var(--line-soft); }
.rule:first-child { border-top: 0; }
.rule details summary { list-style: none; }
.rule details summary::-webkit-details-marker { display: none; }
.rule-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  font-size: 12.5px;
  cursor: pointer;
}
.rule-head:hover { color: #fff; }
.rule-num { font-size: 10.5px; color: var(--text-3); flex: 0 0 auto; }
.rule-name { flex: 1 1 auto; font-weight: 500; }
.rule-chevron { color: var(--text-3); transition: transform .18s ease; }
.rule-chevron svg { width: 15px; height: 15px; }
.rule details[open] .rule-chevron { transform: rotate(180deg); }
.rule-detail {
  padding: 0 0 11px 27px;
  font-size: 12.5px;
  line-height: 1.58;
  color: var(--text-3);
}

.mod-list { display: flex; flex-direction: column; gap: 9px; margin: 12px 0 14px; }
.mod-list li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }

.rank-list { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.rank-list li { display: flex; align-items: center; gap: 8px; }
.rank-num { font-size: 11px; color: var(--text-3); width: 12px; flex: 0 0 12px; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 8px;
  background: none;
  border: 0;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.rank-row:hover { background: var(--surface-2); }
.rank-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-count { font-size: 10.5px; color: var(--text-3); }

/* ---- toasts ------------------------------------------------------------ */

.toast-rail {
  position: fixed;
  left: 20px; bottom: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--surface-4);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  box-shadow: var(--shadow);
  animation: toast-in .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.sidebar-scrim {
  position: fixed;
  inset: var(--banner-h) 0 0;
  z-index: 40;
  background: rgba(0, 0, 0, .6);
}

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

@media (max-width: 1260px) {
  .shell { grid-template-columns: 236px minmax(0, 1fr); }
  .col-right { display: none; }
}

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); max-width: 780px; }
  .banner-menu { display: grid; }
  .col-left {
    position: fixed;
    inset: var(--banner-h) auto 0 0;
    z-index: 45;
    width: 272px;
    max-height: none;
    padding: 8px 12px 24px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.2, .8, .3, 1);
  }
  .is-sidebar-open .col-left { transform: none; }
  .brand-word { display: none; }
}

@media (max-width: 720px) {
  :root { --gap: 12px; }
  .shell { padding: var(--gap) 10px 60px; }
  .banner-inner { gap: 8px; padding: 0 10px; }
  .create-btn-label { display: none; }
  .create-btn { padding: 7px 9px; }
  .me-meta { display: none; }
  .post-title { font-size: 17px; }
  .post-detail .post-title { font-size: 20px; }
  .post-main { padding: 9px 11px 4px; }
  .vote { flex-basis: 38px; width: 38px; }
  .act-label { display: none; }
  .act-comment .act-label { display: inline; }
  .meta-byline { display: none; }   /* keeps author + time on one line */
  .toast-rail { left: 10px; right: 10px; bottom: 10px; }
  .cmt-main > .cmt-tree { padding-left: 15px; }
  .cmt-box-inline { margin-left: 0; }
}

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