/* ================================================================
   DX2 — "Command Deck". The DXED structural redesign.
   Everything is scoped to body.dx2 (+ the fixed chrome ids), so the
   classic layout underneath is untouched and instantly recoverable.
   Identity: charcoal stage · crimson signal · chamfered geometry ·
   monospace numerals. No columns, no rails — a stage, a strip, a dock.
   ================================================================ */

html.dx2-boot #app { opacity: 0; } /* prevent classic-layout flash while the deck dresses */

body.dx2 {
  --dx2-red: #cf5a5e;
  --dx2-red-dim: rgba(207, 90, 94, .55);
  --dx2-steel: #9aa4c0;
  --dx2-panel: rgba(18, 19, 25, .92);
  --dx2-line: rgba(255, 255, 255, .08);
  --dx2-chamfer: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

/* Atmosphere: faint scanline field over the charcoal, no glow. */
body.dx2::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.014) 0 1px, transparent 1px 4px),
    radial-gradient(140% 90% at 50% -10%, rgba(207,90,94,.05), transparent 55%);
}

/* ── the stage: one column, no rails ── */
body.dx2 #app {
  display: block;
  max-width: 1020px;
  margin: 0 auto;
  padding: 76px 24px 130px;
}
body.dx2 #main-content { width: 100%; }

/* ── top status strip ── */
#dx2-strip {
  position: fixed; top: 0; left: 0; right: 0; z-index: 120;
  display: none; align-items: center; gap: 14px;
  height: 52px; padding: 0 18px;
  background: linear-gradient(180deg, rgba(10,11,15,.96), rgba(10,11,15,.82));
  border-bottom: 1px solid var(--dx2-line);
  backdrop-filter: blur(10px);
}
body.dx2 #dx2-strip { display: flex; }
.dx2-brand {
  background: none; border: none; cursor: pointer;
  font: 900 17px/1 system-ui, sans-serif; letter-spacing: 3px; color: #edeef1;
  display: inline-flex; align-items: center; gap: 7px; padding: 0;
}
.dx2-brand i { width: 8px; height: 8px; background: var(--dx2-red); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); box-shadow: 0 0 8px var(--dx2-red-dim); }
.dx2-section {
  font-size: 12px; font-weight: 800; letter-spacing: 2.4px; text-transform: uppercase;
  color: #969aa6; border-left: 1px solid var(--dx2-line); padding-left: 14px;
}
.dx2-strip-gap { flex: 1; }
.dx2-strip-btn {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  background: none; border: 1px solid transparent; color: #a7acb8; cursor: pointer;
  height: 34px; padding: 0 11px; clip-path: var(--dx2-chamfer);
  font: 700 12px system-ui, sans-serif; transition: color .14s, background .14s;
}
.dx2-strip-btn:hover { color: #edeef1; background: rgba(255,255,255,.07); }
.dx2-badge {
  position: absolute; top: 3px; right: 5px; min-width: 15px; height: 15px;
  background: var(--dx2-red); color: #fff; font: 800 9px/15px system-ui, sans-serif;
  text-align: center; border-radius: 999px; padding: 0 3px; font-style: normal;
}
.dx2-avatar {
  width: 32px; height: 32px; clip-path: var(--dx2-chamfer);
  border: none; cursor: pointer; background: #1d1f26 center/cover;
  color: #fff; font: 800 13px system-ui, sans-serif;
}

/* ── bottom command dock ── */
#dx2-dock { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 120; display: none; }
body.dx2 #dx2-dock { display: block; }
.dx2-dock-inner {
  display: flex; align-items: center; gap: 4px; padding: 8px 12px;
  background: var(--dx2-panel);
  border: 1px solid var(--dx2-line);
  clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 22px 100%, 0 50%);
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
  backdrop-filter: blur(12px);
}
.dx2-dock-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; color: #8a8f9c; cursor: pointer;
  width: 74px; padding: 7px 0 6px; clip-path: var(--dx2-chamfer);
  transition: color .14s, background .14s;
}
.dx2-dock-btn span { font: 700 9.5px system-ui, sans-serif; letter-spacing: 1.2px; text-transform: uppercase; }
.dx2-dock-btn:hover { color: #edeef1; background: rgba(255,255,255,.06); }
.dx2-dock-btn.on { color: #edeef1; }
.dx2-dock-btn.on span { color: var(--dx2-red); }
.dx2-dock-btn.on svg { filter: drop-shadow(0 0 6px var(--dx2-red-dim)); }
.dx2-post {
  width: 56px; height: 56px; margin: 0 10px;
  background: var(--dx2-red); color: #fff; border: none; cursor: pointer;
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .12s, filter .14s;
}
.dx2-post:hover { transform: translateY(-2px) scale(1.04); filter: brightness(1.1); }

/* ── drawers: classic sidebar & right rail become slide-overs ── */
body.dx2 #sidebar, body.dx2 #right-sidebar {
  position: fixed; top: 0; bottom: 0; right: 0; width: min(340px, 92vw);
  transform: translateX(105%); transition: transform .22s ease;
  z-index: 140; overflow-y: auto; margin: 0;
  background: var(--dx2-panel); border-left: 1px solid var(--dx2-line);
  backdrop-filter: blur(14px); padding: 0 18px 22px;
  display: block;
}
body.dx2.dx2-mods-open #sidebar { transform: none; }
body.dx2.dx2-intel-open #right-sidebar { transform: none; }
#dx2-backdrop { position: fixed; inset: 0; background: rgba(5,6,9,.6); opacity: 0; pointer-events: none; transition: opacity .18s; z-index: 130; }
#dx2-backdrop.on { opacity: 1; pointer-events: auto; }
.dx2-drawer-title {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  background: inherit; padding: 16px 0 12px; margin-bottom: 6px;
  font: 800 11px system-ui, sans-serif; letter-spacing: 2.6px; text-transform: uppercase; color: var(--dx2-red);
  border-bottom: 1px solid var(--dx2-line); background: rgba(18,19,25,.96);
}
.dx2-drawer-x { background: none; border: 1px solid var(--dx2-line); color: #a7acb8; width: 26px; height: 26px; cursor: pointer; clip-path: var(--dx2-chamfer); }
.dx2-drawer-x:hover { color: #fff; }
body.dx2 #sidebar .sidebar-logo { display: none; }
body.dx2 #mobile-nav { display: none !important; } /* the dock replaces the classic mobile bar */
.dx2-classic-btn {
  width: 100%; margin-top: 18px; padding: 10px; cursor: pointer;
  background: none; border: 1px dashed var(--dx2-line); color: #8a8f9c;
  font: 700 11.5px system-ui, sans-serif; clip-path: var(--dx2-chamfer);
}
.dx2-classic-btn:hover { color: #edeef1; border-color: rgba(255,255,255,.25); }

/* ── content identity: chamfered signal cards ── */
body.dx2 .post-card {
  position: relative;
  clip-path: var(--dx2-chamfer);
  border: 1px solid var(--dx2-line);
  border-radius: 0 !important;
  background: linear-gradient(165deg, #14151b 0%, #101117 70%);
  transition: background .15s, border-color .15s;
}
body.dx2 .post-card::before {
  content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px;
  background: linear-gradient(180deg, var(--dx2-red), transparent 80%);
  opacity: 0; transition: opacity .15s;
}
body.dx2 .post-card:hover { border-color: rgba(207,90,94,.35); background: linear-gradient(165deg, #171821 0%, #12131a 70%); }
body.dx2 .post-card:hover::before { opacity: 1; }
/* broadcast-wall rhythm: alternate cards step off the axis on wide screens */
@media (min-width: 1100px) {
  body.dx2 #feed .post-card:nth-child(even) { margin-left: 44px; }
  body.dx2 #feed .post-card:nth-child(odd) { margin-right: 44px; }
}
/* stat numerals go monospace — scoreboard, not timeline */
body.dx2 .post-actions span, body.dx2 .post-actions button,
body.dx2 .widget-count, body.dx2 .adm-stat-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

/* section headers: broadcast titles with a signal tick */
body.dx2 .section-header h2 {
  font-size: 30px; font-weight: 900; letter-spacing: -0.8px; text-transform: uppercase;
  display: flex; align-items: center; gap: 12px;
}
body.dx2 .section-header h2::before {
  content: ''; width: 10px; height: 26px; background: var(--dx2-red);
  clip-path: polygon(0 0, 100% 18%, 100% 100%, 0 82%);
  flex: 0 0 auto;
}

/* primary buttons + active tabs pick up the chamfer + signal */
body.dx2 .btn-primary { clip-path: var(--dx2-chamfer); border-radius: 0 !important; }
body.dx2 .tab-btn.active { color: #edeef1; box-shadow: inset 0 -2px 0 var(--dx2-red); }
body.dx2 .compose-box, body.dx2 .modal-overlay .compose-modal { clip-path: var(--dx2-chamfer); border-radius: 0 !important; }

/* drawers keep classic nav readable on the glass panel */
body.dx2 #sidebar .nav-item { border-radius: 0; clip-path: var(--dx2-chamfer); }
body.dx2 #sidebar .nav-item.active { background: rgba(207,90,94,.14); }

/* ── responsive ── */
@media (max-width: 880px) {
  body.dx2 #app { padding: 64px 12px 108px; }
  #dx2-strip { height: 48px; padding: 0 12px; gap: 8px; }
  .dx2-strip-lbl, .dx2-section { display: none; }
  #dx2-dock { left: 0; right: 0; bottom: 0; transform: none; }
  .dx2-dock-inner {
    clip-path: none; border-left: none; border-right: none; border-bottom: none;
    justify-content: space-around; gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .dx2-dock-btn { width: 58px; }
  .dx2-post { width: 48px; height: 48px; margin: 0 4px; }
  @media (min-width: 0px) { body.dx2 #feed .post-card { margin-left: 0; margin-right: 0; } }
}

/* The strip replaces the classic mobile header row — no double header. */
body.dx2 .m-header-logo, body.dx2 .mobile-header-actions { display: none !important; }

/* ── restored brand logo (original /logo.png, square, aspect preserved) ── */
.dx2-logo { height: 30px; width: 30px; object-fit: contain; display: block; }
.dx2-brand span { line-height: 1; }

/* ── Home hub: asymmetric three-region desktop layout ──
   Left utility rail | feed stage | discovery rail (the real widgets).
   Only on Home and only on wide desktops; every other section keeps
   the single stage, and below 1260px Home falls back to it too. */
#dx2-rail { display: none; }
@media (min-width: 1260px) {
  body.dx2[data-section="home"] #app {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 292px;
    gap: 26px;
    max-width: 1400px;
  }
  body.dx2[data-section="home"] #dx2-rail {
    display: flex; flex-direction: column; gap: 14px;
    position: sticky; top: 76px; align-self: start;
  }
  /* the discovery rail: the live widgets dock back on Home */
  body.dx2[data-section="home"] #right-sidebar {
    position: sticky; top: 76px; align-self: start; right: auto; bottom: auto;
    transform: none; width: auto; z-index: 1;
    background: none; border: none; backdrop-filter: none; padding: 0;
    max-height: calc(100vh - 96px); overflow-y: auto; scrollbar-width: thin;
  }
  body.dx2[data-section="home"] #right-sidebar .dx2-drawer-title { display: none; }
  body.dx2[data-section="home"] #dx2-intel-btn { display: none; }
  /* rails carry the composition — cards run straight in the feed column */
  body.dx2[data-section="home"] #feed .post-card { margin-left: 0 !important; margin-right: 0 !important; }
}
.dx2-rail-card {
  background: var(--dx2-panel); border: 1px solid var(--dx2-line);
  clip-path: var(--dx2-chamfer); padding: 13px 14px;
}
/* the Operator panel is supporting cast: quiet titles, one purpose */
.dx2-rail-title { font: 800 10px system-ui, sans-serif; letter-spacing: 2.2px; text-transform: uppercase; color: #7d828e; margin: 14px 0 7px; }
.dx2-operator { display: flex; align-items: center; gap: 11px; cursor: pointer; margin: -4px -5px 0; padding: 4px 5px; clip-path: var(--dx2-chamfer-sm); transition: background .14s; }
.dx2-operator:hover { background: rgba(255,255,255,.05); }
.dx2-op-av { width: 42px; height: 42px; clip-path: var(--dx2-chamfer); background: #1d1f26 center/cover; display: inline-flex; align-items: center; justify-content: center; color: #fff; font: 800 16px system-ui, sans-serif; flex: 0 0 auto; }
.dx2-op-id { display: flex; flex-direction: column; min-width: 0; }
.dx2-op-id strong { color: #edeef1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.dx2-op-id strong svg { flex: 0 0 auto; }
.dx2-op-id em { font: 700 9.5px system-ui, sans-serif; font-style: normal; letter-spacing: 1.6px; text-transform: uppercase; color: #8a8f9c; }
.dx2-rail-link {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: none; color: #a7acb8; cursor: pointer; text-decoration: none;
  padding: 8px 6px; font: 600 13px system-ui, sans-serif; clip-path: var(--dx2-chamfer);
  transition: background .13s, color .13s;
}
.dx2-rail-link:hover { background: rgba(255,255,255,.06); color: #edeef1; }
/* official token: one quiet strip, not a whole card */
.dx2-rail-token {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 12px -6px 0; padding: 8px 6px 2px; text-decoration: none;
  border-top: 1px solid var(--dx2-line);
}
.dx2-rail-token span { font: 800 11px system-ui, sans-serif; color: var(--dx2-acc); display: flex; flex-direction: column; }
.dx2-rail-token em { font: 600 8.5px system-ui, sans-serif; font-style: normal; letter-spacing: 1.4px; text-transform: uppercase; color: #7d828e; }
.dx2-rail-token code { font: 500 9.5px ui-monospace, Menlo, monospace; color: #6f737f; white-space: nowrap; }
.dx2-rail-token:hover code { color: #a7acb8; }

/* ── Intel boards: the widgets consolidated into two deck modules ── */
.dx2-board {
  background: var(--dx2-panel); border: 1px solid var(--dx2-line);
  clip-path: var(--dx2-chamfer); padding: 13px 14px 10px; margin-bottom: 14px;
}
.dx2-board-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font: 800 10.5px system-ui, sans-serif; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--dx2-acc); padding-bottom: 9px; margin-bottom: 4px;
  border-bottom: 1px solid var(--dx2-line);
}
.dx2-board-live { display: inline-flex; align-items: center; gap: 6px; letter-spacing: 0; }
.dx2-board-live u { text-decoration: none; font: 700 9px system-ui, sans-serif; letter-spacing: 1.4px; color: #8a8f9c; }
.dx2-board-live #online-count { margin-left: 0; }
/* widgets inside a board become bare sections under mono sub-labels */
.dx2-board .widget { background: none !important; border: none !important; border-radius: 0 !important; clip-path: none !important; padding: 10px 0 4px; box-shadow: none !important; }
.dx2-board .widget-title { display: none; }
.dx2-board .widget::before {
  content: attr(data-dx2-label);
  display: block; margin-bottom: 7px;
  font: 700 9px ui-monospace, Menlo, monospace; letter-spacing: 2px; text-transform: uppercase;
  color: #7d828e;
}
.dx2-board .widget + .widget { border-top: 1px dashed var(--dx2-line) !important; }
/* any widget left outside the boards still speaks deck */
body.dx2 #right-sidebar > .widget { clip-path: var(--dx2-chamfer); border-radius: 0 !important; }

/* ── Home top: strong uppercase tabs + the transmitting composer ── */
body.dx2 #home-section .header-tabs { gap: 4px; margin-top: 6px; }
body.dx2 #home-section .header-tabs .tab-btn {
  font: 800 12px system-ui, sans-serif; letter-spacing: 1.6px; text-transform: uppercase;
  padding: 10px 16px; border-radius: 0; clip-path: var(--dx2-chamfer);
}
.dx2-w-btn {
  height: 34px; padding: 0 15px; cursor: pointer; clip-path: var(--dx2-chamfer);
  background: rgba(255,255,255,.06); border: 1px solid var(--dx2-line); color: #d6d8de;
  font: 700 12px system-ui, sans-serif; transition: background .13s;
}
.dx2-w-btn:hover { background: rgba(255,255,255,.1); }
.dx2-w-primary { background: var(--dx2-red); border-color: transparent; color: #fff; }
.dx2-w-primary:hover { background: #d96a64; }
body.dx2 .compose-box {
  position: relative;
  border-top: 2px solid var(--dx2-red);
  background: linear-gradient(165deg, #15161d 0%, #101117 80%);
  border-radius: 0 !important;
}
body.dx2 .compose-box::after {
  content: 'TRANSMIT'; position: absolute; top: 7px; right: 16px; pointer-events: none;
  font: 700 8.5px ui-monospace, Menlo, monospace; letter-spacing: 2.4px; color: var(--dx2-acc);
  opacity: .55;
}

/* ── post composer modal: a centered deck panel, not the legacy
   bottom sheet (drag handle, rounded top) from early DXED ── */
body.dx2 #post-modal {
  align-items: center; padding: 18px;
  --accent: var(--dx2-acc); --accent-soft: var(--dx2-acc-soft);
  --accent-light: var(--dx2-acc); --accent-glow: var(--dx2-acc-dim);
}
body.dx2 .compose-modal {
  clip-path: var(--dx2-chamfer); border-radius: 0 !important;
  border: 1px solid var(--dx2-line); border-top: 2px solid var(--dx2-acc);
  background: linear-gradient(165deg, #15161d 0%, #101117 80%);
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
  transition: opacity .18s ease;
}
body.dx2 .compose-modal::before { display: none; } /* no drag handle */
body.dx2 #post-modal.hidden .compose-modal { transform: none; }
body.dx2 .compose-modal-title {
  font: 800 11px system-ui, sans-serif; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--dx2-acc); display: inline-flex; align-items: center; gap: 9px;
}
body.dx2 .compose-modal-title::before {
  content: ''; width: 8px; height: 16px; background: var(--dx2-acc);
  clip-path: polygon(0 0, 100% 18%, 100% 100%, 0 82%);
}
body.dx2 .compose-modal-header { padding: 14px 18px 10px; }
body.dx2 .compose-post-btn-new { clip-path: var(--dx2-chamfer-sm); border-radius: 0 !important; }

/* ── The Wire — the live status line welded to the top of the feed.
   Replaces the floating "activity ticker" card: LIVE chip on signal
   duty, mono numerals, one rotating line of real platform events. ── */
body.dx2 .activity-ticker {
  border-radius: 0; clip-path: var(--dx2-chamfer-sm);
  background: linear-gradient(90deg, var(--dx2-acc-soft), rgba(16,17,23,.95) 40%);
  border: 1px solid var(--dx2-line);
  padding: 8px 14px 8px 10px; margin-bottom: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; letter-spacing: .3px;
}
body.dx2 .activity-ticker::before {
  content: 'LIVE'; flex: none;
  font: 800 8.5px/1 ui-monospace, Menlo, monospace; letter-spacing: 1.8px; color: var(--dx2-acc-text);
  background: var(--dx2-acc); padding: 4px 7px 3px 9px;
  clip-path: var(--dx2-chamfer-sm);
  animation: dx2wire 2.4s ease-in-out infinite;
}
@keyframes dx2wire { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
body.dx2 .ticker-live-dot { display: none; } /* the LIVE chip carries the pulse */
body.dx2 .ticker-stats { gap: 12px; }
body.dx2 .ticker-stat { color: #b6bac4; }
body.dx2 .ticker-event { font-family: inherit; }
body.dx2 .ticker-event strong { color: var(--dx2-acc); }

/* interleaved pulse modules speak deck, not emoji dashboard */
body.dx2 .pulse-module { clip-path: var(--dx2-chamfer); border-radius: 0; background: linear-gradient(165deg, #14151b 0%, #101117 70%); }
body.dx2 .pulse-mod-icon { display: none; }
body.dx2 .pulse-mod-head::before {
  content: ''; width: 8px; height: 18px; background: var(--dx2-acc); flex: 0 0 auto;
  clip-path: polygon(0 0, 100% 18%, 100% 100%, 0 82%);
}
body.dx2 .pulse-mod-title { text-transform: uppercase; letter-spacing: 1.4px; font-size: 11.5px; }
body.dx2 .pulse-mod-sub { font-family: ui-monospace, Menlo, monospace; font-size: 10px; }

/* ── mobile dock: Groups comes off (still reachable via Modules drawer) ── */
@media (max-width: 880px) {
  .dx2-dock-btn[data-nav="communities"] { display: none; }
}

/* The Modules drawer always shows full labels — override the classic
   icon-only sidebar breakpoints (≤860px) that were leaking into it. */
body.dx2 #sidebar .nav-item span,
body.dx2 #sidebar .nav-group-toggle span,
body.dx2 #sidebar .nav-group-chevron,
body.dx2 #sidebar .btn-post span,
body.dx2 #sidebar .user-info-sm { display: revert !important; }
body.dx2 #sidebar .nav-item { justify-content: flex-start !important; padding: 10px 12px !important; }
body.dx2 #sidebar .nav-group-items { padding-left: 12px !important; }
body.dx2 #sidebar .sidebar-user-card { justify-content: flex-start !important; }

/* ================================================================
   Accent system — gold/tan is the DXED identity accent; crimson is
   the reserved signal (badges, LIVE, brand tick) in every style.
   Four curated styles tuned for the charcoal stage; the accent var
   drives active states, the Post key, ticks and hovers.
   ================================================================ */
body.dx2 { --dx2-acc: #c59a5f; --dx2-acc-soft: rgba(197,154,95,.13); --dx2-acc-dim: rgba(197,154,95,.5); --dx2-acc-text: #0d0e12; }
body.dx2[data-dx2-accent="graphite"] { --dx2-acc: #8f96a8; --dx2-acc-soft: rgba(143,150,168,.14); --dx2-acc-dim: rgba(143,150,168,.5); }
body.dx2[data-dx2-accent="crimson"]  { --dx2-acc: #cf5a5e; --dx2-acc-soft: rgba(207,90,94,.13); --dx2-acc-dim: rgba(207,90,94,.5); --dx2-acc-text: #fff; }
body.dx2[data-dx2-accent="moss"]     { --dx2-acc: #5d9b77; --dx2-acc-soft: rgba(93,155,119,.14); --dx2-acc-dim: rgba(93,155,119,.5); }

/* accent takes over the interactive identity */
body.dx2 .dx2-post { background: var(--dx2-acc); }
body.dx2 .dx2-post:hover { filter: brightness(1.12); }
body.dx2 .dx2-dock-btn.on span { color: var(--dx2-acc); }
body.dx2 .dx2-dock-btn.on svg { filter: drop-shadow(0 0 6px var(--dx2-acc-dim)); }
body.dx2 .post-card::before { background: linear-gradient(180deg, var(--dx2-acc), transparent 80%); }
body.dx2 .post-card:hover { border-color: var(--dx2-acc-dim); }
body.dx2 .section-header h2::before { background: var(--dx2-acc); }
body.dx2 .tab-btn.active { box-shadow: inset 0 -2px 0 var(--dx2-acc); }
body.dx2 #home-section .header-tabs .tab-btn.active { background: var(--dx2-acc-soft); box-shadow: inset 0 -2px 0 var(--dx2-acc); }
body.dx2 .dx2-drawer-title { color: var(--dx2-acc); }
body.dx2 #sidebar .nav-item.active { background: var(--dx2-acc-soft); }
body.dx2 .compose-box { border-top-color: var(--dx2-acc); }
body.dx2 .dx2-w-primary { background: var(--dx2-acc); border-color: transparent; color: #0d0e12; }
body.dx2[data-dx2-accent="crimson"] .dx2-w-primary { color: #fff; }
body.dx2 .dx2-w-primary:hover { filter: brightness(1.1); background: var(--dx2-acc); }
/* signal duty stays crimson in every accent */
.dx2-badge, .dx2-brand i { background: var(--dx2-red) !important; }

/* de-clash: stray palette pulled into the deck family. Purple chrome
   joins the accent; the assorted bright greens settle on one muted
   military green reserved for presence. */
body.dx2 .nav-plans-badge { background: var(--dx2-acc-soft) !important; color: var(--dx2-acc) !important; }
body.dx2 .notif-type-badge { background: #1d1f26 !important; color: var(--dx2-acc) !important; }
body.dx2 .online-dot { background: #5d9b77; }
/* the drawers inherit the deck accent wholesale — classic --accent
   (terracotta) inside Modules/Intel follows the chosen style instead */
body.dx2 #sidebar, body.dx2 #right-sidebar {
  --accent: var(--dx2-acc);
  --accent-soft: var(--dx2-acc-soft);
  --accent-light: var(--dx2-acc);
  --accent-glow: var(--dx2-acc-dim);
}
body.dx2 .widget-count { background: rgba(93,155,119,.12); color: #74b58e; border-radius: 0; clip-path: var(--dx2-chamfer-sm); font-family: ui-monospace, Menlo, monospace; }
body.dx2 .hashtag-trending-pill { border-radius: 0; clip-path: var(--dx2-chamfer-sm); background: rgba(255,255,255,.04); border-color: var(--dx2-line); color: var(--dx2-acc); }
body.dx2 .hashtag-trending-pill:hover { background: var(--dx2-acc-soft); border-color: var(--dx2-acc-dim); }

/* ── button fit: small chamfer for controls (the 14px cut was clipping
   short buttons — "party buttons" etc). Cards keep the big chamfer. ── */
body.dx2 {
  --dx2-chamfer-sm: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}
body.dx2 .btn-primary, body.dx2 .btn-secondary, body.dx2 .dx2-w-btn,
body.dx2 .dx2-strip-btn, body.dx2 .dx2-rail-link, body.dx2 .dx2-classic-btn,
body.dx2 .widget .btn, body.dx2 .widget button {
  clip-path: var(--dx2-chamfer-sm);
  border-radius: 0 !important;
  min-height: 34px;
  line-height: 1.2;
}
body.dx2 .dx2-dock-btn { clip-path: var(--dx2-chamfer-sm); }
body.dx2 .dx2-avatar, body.dx2 .dx2-op-av { clip-path: var(--dx2-chamfer-sm); }

/* ── Quick Access edit + setup modal ── */
.dx2-rail-title { display: flex; align-items: center; justify-content: space-between; }
.dx2-rail-edit { background: none; border: none; color: #8a8f9c; font: 700 9.5px system-ui, sans-serif; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; padding: 2px 4px; }
.dx2-rail-edit:hover { color: #edeef1; }
#dx2-setup { position: fixed; inset: 0; z-index: 220; background: rgba(5,6,9,.78); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 18px; }
.dx2-setup-box {
  width: min(520px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--dx2-panel); border: 1px solid rgba(255,255,255,.12);
  clip-path: var(--dx2-chamfer); padding: 24px;
}
.dx2-setup-head { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.dx2-setup-head img { width: 44px; height: 44px; object-fit: contain; }
.dx2-setup-head strong { display: block; color: #edeef1; font-size: 18px; letter-spacing: -0.3px; }
.dx2-setup-head span { color: #9aa0ad; font-size: 12.5px; }
.dx2-setup-title { font: 800 10.5px system-ui, sans-serif; letter-spacing: 2px; text-transform: uppercase; color: var(--dx2-acc); margin: 16px 0 9px; }
.dx2-setup-title em { color: #8a8f9c; font-style: normal; letter-spacing: 0; text-transform: none; font-weight: 600; }
.dx2-setup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.dx2-setup-opt {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09);
  color: #a7acb8; cursor: pointer; padding: 10px 12px;
  font: 600 12.5px system-ui, sans-serif; clip-path: var(--dx2-chamfer-sm);
  transition: background .13s, color .13s, border-color .13s;
}
.dx2-setup-opt:hover { color: #edeef1; background: rgba(255,255,255,.08); }
.dx2-setup-opt.on { background: var(--dx2-acc-soft); border-color: var(--dx2-acc-dim); color: #edeef1; }
.dx2-acc-dot { width: 14px; height: 14px; clip-path: var(--dx2-chamfer-sm); display: inline-block; flex: 0 0 auto; }
.dx2-acc-graphite { background: #8f96a8; }
.dx2-acc-crimson { background: #cf5a5e; }
.dx2-acc-bronze { background: #c59a5f; }
.dx2-acc-moss { background: #5d9b77; }
.dx2-setup-save { width: 100%; margin-top: 22px; height: 42px; font-size: 13.5px; }

/* ================================================================
   ALIVE — motion and scale polish. No new features: sections breathe
   in, cards lift, the dock reacts, the Post key has a heartbeat, and
   feed text gets a touch more presence.
   ================================================================ */
body.dx2 .section.active { animation: dx2secIn .28s ease; }
@keyframes dx2secIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* feed text slightly larger — the content is the show */
body.dx2 .post-body { font-size: 15.5px; line-height: 1.55; }

body.dx2 .post-card { transition: background .15s, border-color .15s, transform .16s ease; }
body.dx2 .post-card:hover { transform: translateY(-2px); }

body.dx2 .dx2-dock-btn { transition: color .14s, background .14s, transform .14s ease; }
body.dx2 .dx2-dock-btn:hover { transform: translateY(-2px); }
body.dx2 .dx2-post { animation: dx2heart 4s ease-in-out infinite; }
@keyframes dx2heart {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }
  50%      { filter: drop-shadow(0 0 9px var(--dx2-acc-dim)); }
}

body.dx2 .dx2-rail-link { transition: background .13s, color .13s, transform .13s ease; }
body.dx2 .dx2-rail-link:hover { transform: translateX(3px); }
body.dx2 .dx2-avatar { transition: box-shadow .15s; }
body.dx2 .dx2-avatar:hover { box-shadow: 0 0 0 2px var(--dx2-acc-dim); }

/* the guest bar rides above the dock instead of covering it */
body.dx2 #guest-bar { bottom: 108px; z-index: 118; }
@media (max-width: 880px) { body.dx2 #guest-bar { bottom: 88px; } }

/* ================================================================
   FIRST-LOGIN ONBOARDING — a cinematic ink panel, independent of the
   chosen theme: color → accent → connect X → connect Steam.
   ================================================================ */
#dx2-onb {
  position: fixed; inset: 0; z-index: 240;
  background: rgba(5,6,9,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.dx2-onb-box {
  width: min(640px, 100%); max-height: 92vh; overflow-y: auto;
  background: linear-gradient(165deg, #14151b 0%, #0e0f14 80%);
  border: 1px solid rgba(255,255,255,.12); border-top: 2px solid var(--dx2-acc);
  clip-path: var(--dx2-chamfer);
  padding: 26px 30px 22px; color: #edeef1;
  animation: dx2onbIn .35s cubic-bezier(.2,.65,.25,1);
}
@keyframes dx2onbIn { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
.dx2-onb-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.09); }
.dx2-onb-head img { width: 34px; height: 34px; object-fit: contain; }
.dx2-onb-brand { font: 900 15px system-ui, sans-serif; letter-spacing: 3px; }
.dx2-onb-brand em { font-style: normal; color: #6f737f; letter-spacing: 2px; font-weight: 700; font-size: 11px; }
.dx2-onb-step { margin-left: auto; font: 700 10px ui-monospace, Menlo, monospace; letter-spacing: .18em; color: var(--dx2-acc); }
.dx2-onb-body { padding: 24px 0 6px; min-height: 300px; }
.dx2-onb-body.dx2-onb-in { animation: dx2onbStep .3s cubic-bezier(.2,.65,.25,1); }
@keyframes dx2onbStep { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.dx2-onb-body h2 { margin: 0 0 8px; font-size: 27px; font-weight: 800; letter-spacing: -0.5px; }
.dx2-onb-body > p { margin: 0 0 22px; font-size: 13.5px; line-height: 1.55; color: #9aa0ad; max-width: 460px; }
.dx2-onb-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dx2-onb-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 16px; cursor: pointer; text-align: left;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10);
  clip-path: var(--dx2-chamfer-sm); color: #edeef1;
  transition: background .15s, border-color .15s;
}
.dx2-onb-tile b { font-size: 15px; }
.dx2-onb-tile em { font-style: normal; font-size: 11.5px; color: #8a8f9c; }
.dx2-onb-tile.on { border-color: var(--dx2-acc); background: var(--dx2-acc-soft); }
.dx2-onb-swatch { width: 100%; height: 74px; margin-bottom: 10px; clip-path: var(--dx2-chamfer-sm); border: 1px solid rgba(255,255,255,.12); }
.dx2-onb-dark .dx2-onb-swatch { background: linear-gradient(150deg, #17181f 0%, #0b0c10 70%); }
.dx2-onb-light .dx2-onb-swatch { background: linear-gradient(150deg, #ffffff 0%, #ececf1 70%); }
.dx2-onb-accents { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.dx2-onb-acc {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10);
  clip-path: var(--dx2-chamfer-sm); color: #d6d8de; font: 700 13px system-ui, sans-serif;
  transition: background .15s, border-color .15s;
}
.dx2-onb-acc.on { border-color: var(--dx2-acc); background: var(--dx2-acc-soft); color: #fff; }
.dx2-onb-list { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; }
.dx2-onb-list li { display: flex; gap: 14px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 13.5px; line-height: 1.5; color: #9aa0ad; }
.dx2-onb-list u { text-decoration: none; font: 700 10px ui-monospace, Menlo, monospace; color: var(--dx2-acc); flex: none; }
.dx2-onb-list b { color: #edeef1; }
.dx2-onb-connect {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--dx2-acc); color: var(--dx2-acc-text); border: none; cursor: pointer;
  clip-path: var(--dx2-chamfer-sm); padding: 13px 24px; font: 700 14px system-ui, sans-serif;
  transition: filter .15s;
}
.dx2-onb-connect:hover { filter: brightness(1.1); }
.dx2-onb-note { margin-top: 12px; font-size: 11.5px; color: #6f737f; }
.dx2-onb-foot { display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.09); }
.dx2-onb-gap { flex: 1; }
.dx2-onb-dots { display: inline-flex; gap: 6px; }
.dx2-onb-dots i { width: 18px; height: 4px; background: rgba(255,255,255,.14); }
.dx2-onb-dots i.done { background: var(--dx2-acc-dim); }
.dx2-onb-dots i.on { background: var(--dx2-acc); }
.dx2-onb-btn {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #d6d8de;
  clip-path: var(--dx2-chamfer-sm); padding: 10px 20px; font: 700 13px system-ui, sans-serif; cursor: pointer;
}
.dx2-onb-btn:hover { background: rgba(255,255,255,.1); }
.dx2-onb-next { background: var(--dx2-acc); border-color: transparent; color: var(--dx2-acc-text); }
.dx2-onb-next:hover { background: var(--dx2-acc); filter: brightness(1.1); }
@media (max-width: 560px) {
  .dx2-onb-tiles { grid-template-columns: 1fr; }
  .dx2-onb-box { padding: 20px 18px 16px; }
}

/* ================================================================
   WHITE — the light variant of the Command Deck chrome. The classic
   content already themes itself via [data-theme="light"]; these rules
   bring the deck's strip, dock, drawers, cards and boards along.
   ================================================================ */
html[data-theme="light"] body.dx2 { --dx2-panel: rgba(255,255,255,.94); --dx2-line: rgba(0,0,0,.10); }
html[data-theme="light"] body.dx2::before {
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.012) 0 1px, transparent 1px 4px),
    radial-gradient(140% 90% at 50% -10%, var(--dx2-acc-soft), transparent 55%);
}
html[data-theme="light"] #dx2-strip {
  background: linear-gradient(180deg, rgba(250,250,252,.97), rgba(250,250,252,.88));
  border-bottom-color: rgba(0,0,0,.10);
}
html[data-theme="light"] .dx2-brand { color: #17181d; }
html[data-theme="light"] .dx2-section { color: #6b6f7a; border-left-color: rgba(0,0,0,.12); }
html[data-theme="light"] .dx2-strip-btn { color: #565b66; }
html[data-theme="light"] .dx2-strip-btn:hover { color: #17181d; background: rgba(0,0,0,.06); }
html[data-theme="light"] .dx2-avatar { background-color: #e3e4e9; color: #17181d; }
html[data-theme="light"] .dx2-dock-inner { box-shadow: 0 18px 50px rgba(20,22,30,.18); }
html[data-theme="light"] .dx2-dock-btn { color: #6b6f7a; }
html[data-theme="light"] .dx2-dock-btn:hover { color: #17181d; background: rgba(0,0,0,.05); }
html[data-theme="light"] .dx2-dock-btn.on { color: #17181d; }
html[data-theme="light"] body.dx2 #sidebar, html[data-theme="light"] body.dx2 #right-sidebar {
  background: rgba(252,252,253,.97); border-left-color: rgba(0,0,0,.10);
}
html[data-theme="light"] .dx2-drawer-title { background: rgba(252,252,253,.98); border-bottom-color: rgba(0,0,0,.09); }
html[data-theme="light"] .dx2-drawer-x { color: #565b66; border-color: rgba(0,0,0,.14); }
html[data-theme="light"] .dx2-drawer-x:hover { color: #000; }
html[data-theme="light"] .dx2-classic-btn { color: #6b6f7a; border-color: rgba(0,0,0,.16); }
html[data-theme="light"] body.dx2 .post-card { background: #ffffff; border-color: rgba(0,0,0,.10); }
html[data-theme="light"] body.dx2 .post-card:hover { background: #fdfdfe; border-color: var(--dx2-acc-dim); }
html[data-theme="light"] body.dx2 .compose-box { background: #ffffff; }
html[data-theme="light"] body.dx2 .activity-ticker { background: linear-gradient(90deg, var(--dx2-acc-soft), rgba(255,255,255,.96) 40%); border-color: rgba(0,0,0,.10); }
html[data-theme="light"] body.dx2 .ticker-stat { color: #565b66; }
html[data-theme="light"] .dx2-rail-card, html[data-theme="light"] .dx2-board { background: #ffffff; border-color: rgba(0,0,0,.10); }
html[data-theme="light"] .dx2-op-id strong { color: #17181d; }
html[data-theme="light"] .dx2-op-av { background-color: #e3e4e9; color: #17181d; }
html[data-theme="light"] .dx2-rail-link { color: #565b66; }
html[data-theme="light"] .dx2-rail-link:hover { color: #17181d; background: rgba(0,0,0,.05); }
html[data-theme="light"] .dx2-rail-title { color: #8a8e98; }
html[data-theme="light"] .dx2-rail-token { border-top-color: rgba(0,0,0,.09); }
html[data-theme="light"] .dx2-board-head { border-bottom-color: rgba(0,0,0,.09); }
html[data-theme="light"] .dx2-board .widget + .widget { border-top-color: rgba(0,0,0,.12) !important; }
html[data-theme="light"] .dx2-board .widget::before { color: #8a8e98; }
html[data-theme="light"] body.dx2 .pulse-module { background: #ffffff; }
html[data-theme="light"] .dx2-setup-box { background: #ffffff; border-color: rgba(0,0,0,.12); }
html[data-theme="light"] .dx2-setup-head strong { color: #17181d; }
html[data-theme="light"] .dx2-setup-opt { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.10); color: #565b66; }
html[data-theme="light"] .dx2-setup-opt:hover { color: #17181d; background: rgba(0,0,0,.06); }
html[data-theme="light"] .dx2-setup-opt.on { color: #17181d; }
html[data-theme="light"] body.dx2 .compose-modal { background: #ffffff; }
html[data-theme="light"] body.dx2 .notif-type-badge { background: #eceff3 !important; }
html[data-theme="light"] .dx2-logo { background: #111318; padding: 3px; }
html[data-theme="light"] body.dx2 .tab-btn.active,
html[data-theme="light"] body.dx2 #home-section .header-tabs .tab-btn.active { color: #17181d; }
