:root {
  color-scheme: dark;
  --bg: #000;
  --panel: #000;
  --panel-2: #16181c;
  --text: #e7e9ea;
  --muted: #71767b;
  --line: #2f3336;
  --green: #00ba7c;
  --yellow: #ffd400;
  --red: #f4212e;
  --blue: #1d9bf0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    TwitterChirp, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
  display: grid;
  grid-template-columns: 275px 600px 390px;
  min-height: 100vh;
  width: min(1265px, 100%);
  margin: 0 auto;
}

.x-nav {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 12px 12px 16px;
  border-right: 1px solid var(--line);
}

.x-logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 30px;
  font-weight: 800;
}

.x-logo:hover,
.x-nav a:hover {
  background: rgba(239, 243, 244, 0.1);
}

.x-nav nav {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.x-nav a {
  width: fit-content;
  border-radius: 999px;
  color: var(--text);
  font-size: 20px;
  padding: 12px 18px;
  text-decoration: none;
}

.x-nav a.active {
  font-weight: 800;
}

.post-cta {
  width: 90%;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-size: 17px;
  font-weight: 800;
  margin: 18px 0 auto;
  padding: 16px 24px;
}

.account-pill {
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 999px;
  padding: 10px;
}

.account-pill span,
.timeline-header p,
.composer,
.post-stats,
.handle,
.badge-reason,
.kv span,
.method-detail,
.criteria p,
.v3-note p {
  color: var(--muted);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.timeline {
  border-right: 1px solid var(--line);
}

.timeline-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
}

.timeline-header h1 {
  margin: 0;
  font-size: 20px;
}

.timeline-header p {
  margin: 2px 0 0;
  font-size: 13px;
}

.demo-label {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  padding: 5px 10px;
}

.demo-label-alert {
  border-color: rgba(244, 33, 46, 0.95);
  background: rgba(244, 33, 46, 0.16);
  box-shadow:
    0 0 0 1px rgba(244, 33, 46, 0.35),
    0 0 18px rgba(244, 33, 46, 0.8),
    0 0 36px rgba(244, 33, 46, 0.35);
  color: #ffb3b8;
  font-weight: 900;
  text-transform: uppercase;
}

.composer {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.composer p {
  color: var(--text);
  margin-bottom: 12px;
}

.composer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.composer-actions span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue);
  font-size: 13px;
  padding: 5px 10px;
}

.post-list {
  display: block;
}

.post {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 12px 16px;
  text-align: left;
}

.post:hover,
.post[aria-selected="true"] {
  background: rgba(239, 243, 244, 0.04);
}

.post-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.post-body p {
  margin-bottom: 10px;
  line-height: 1.45;
}

.avatar {
  flex: 0 0 auto;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #1d9bf0, #7856ff);
  background-position: center;
  background-size: cover;
  font-weight: 800;
}

.avatar.small {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.inline-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 0 6px;
  vertical-align: middle;
}

.post-media {
  position: relative;
  min-height: 245px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background-color: var(--panel-2);
  background-position: center;
  background-size: cover;
  margin: 10px 0;
}

.post-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.55));
}

.post-media span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
}

.reply-list {
  display: grid;
  gap: 0;
  border-left: 2px solid var(--line);
  margin: 14px 0 0 21px;
  padding-left: 18px;
}

.reply {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  padding-top: 12px;
}

.reply-avatar {
  width: 36px;
  height: 36px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(29, 155, 240, 0.3);
  border-radius: 999px;
  background: rgba(22, 24, 28, 0.95);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.badge.low {
  border-color: rgba(0, 186, 124, 0.4);
  color: #8ff0c8;
}

.badge.medium {
  border-color: rgba(255, 212, 0, 0.45);
  color: #ffe77a;
}

.badge.high {
  border-color: rgba(244, 33, 46, 0.55);
  color: #ff9aa2;
}

.right-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 12px 0 28px 16px;
}

.details {
  border: 1px solid rgba(29, 155, 240, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(29, 155, 240, 0.09), transparent 120px),
    var(--panel-2);
  padding: 16px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.details h2 {
  font-size: 20px;
  margin-bottom: 6px;
}

.details-body {
  display: grid;
  gap: 14px;
}

.panel-section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.panel-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.kv {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 8px 12px;
  margin: 0;
  font-size: 14px;
}

.kv strong {
  overflow-wrap: anywhere;
}

.methods {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.method {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  padding: 10px;
  font-size: 13px;
}

.method strong {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.method-explain {
  margin-top: 6px;
  color: var(--text);
}

.criteria {
  border-radius: 18px;
  background: var(--panel-2);
  margin-top: 16px;
  padding: 16px;
}

.criteria article {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.criteria h2,
.v3-note h2 {
  font-size: 20px;
}

.v3-note {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-2);
  margin-top: 16px;
  padding: 16px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 88px minmax(0, 600px) minmax(320px, 1fr);
  }

  .x-nav a {
    font-size: 0;
    padding: 14px;
  }

  .x-nav a::first-letter {
    font-size: 20px;
  }

  .post-cta {
    width: 52px;
    height: 52px;
    padding: 0;
    font-size: 0;
  }

  .post-cta::after {
    content: "+";
    font-size: 28px;
  }

  .account-pill div {
    display: none;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .x-nav {
    display: none;
  }

  .right-rail {
    position: static;
    height: auto;
    padding: 16px;
  }

  .timeline {
    border-right: 0;
  }
}
