:root {
  color-scheme: dark;
  --bg: #030303;
  --bg-soft: #090907;
  --panel: #11100b;
  --panel-2: #18150b;
  --line: #5b4a12;
  --line-soft: #2e260c;
  --gold: #ffd400;
  --gold-soft: rgba(255, 212, 0, .13);
  --text: #fffaf0;
  --muted: #d1c8b2;
  --dim: #958a70;
  --green: #8be08f;
  --blue: #9ed0ff;
  --red: #ff7b7b;
  --cyan: #93e0df;
  --violet: #d9d1bf;
  --shadow: 0 28px 90px rgba(0, 0, 0, .52);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 72% 4%, rgba(255, 212, 0, .12), transparent 28%),
    linear-gradient(180deg, #000 0%, #050504 42%, #090805 100%);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

body.en .es,
body:not(.en) .en { display: none !important; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 212, 0, .28);
  background: rgba(3, 3, 3, .92);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .38);
}
.topbar-inner {
  width: min(1180px, calc(100vw - 32px));
  min-height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 850;
}
.brand img { width: 44px; height: 24px; object-fit: contain; }
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.nav a,
.lang button {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 7px 10px;
}
.nav a:hover,
.nav a.active,
.lang button:hover,
.lang button.active {
  border-color: rgba(255, 212, 0, .46);
  background: rgba(255, 212, 0, .1);
  color: var(--text);
  box-shadow: 0 0 18px rgba(255, 212, 0, .08);
}
.lang { display: flex; gap: 4px; }

.forum-shell {
  width: min(1440px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px 0 34px;
}

.forum-public-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 46px;
}
.forum-public-hero {
  min-height: min(620px, calc(100vh - 112px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: stretch;
}
.forum-public-copy,
.forum-public-status,
.forum-public-sections article,
.forum-public-note {
  border: 1px solid rgba(255, 212, 0, .3);
  background:
    linear-gradient(180deg, rgba(255, 212, 0, .035), transparent 90px),
    linear-gradient(180deg, rgba(22, 20, 13, .96), rgba(7, 7, 6, .98));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.forum-public-copy {
  display: grid;
  align-content: end;
  padding: clamp(26px, 5vw, 58px);
  background:
    linear-gradient(90deg, rgba(3, 3, 3, .98), rgba(3, 3, 3, .74) 58%, rgba(3, 3, 3, .45)),
    url("/images/fscompany-operations-board.jpg") center / cover no-repeat;
}
.forum-public-copy h1 {
  max-width: 820px;
}
.forum-public-copy .subtitle {
  max-width: 760px;
  font-size: 17px;
}
.public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.public-actions .primary-action,
.public-actions .secondary-action {
  min-width: 180px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.forum-public-status {
  display: grid;
  align-content: end;
  gap: 16px;
  padding: 24px;
}
.forum-public-status strong {
  color: var(--text);
  font-size: 22px;
  line-height: 1.15;
}
.forum-public-status p {
  color: var(--muted);
  margin-bottom: 0;
}
.public-steps {
  display: grid;
  gap: 9px;
}
.public-steps span {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 212, 0, .16);
  background: rgba(0, 0, 0, .18);
  padding: 10px;
}
.public-steps b {
  color: var(--gold);
  font: 900 20px "JetBrains Mono", Consolas, monospace;
}
.public-steps em {
  color: var(--muted);
  font-style: normal;
  font-weight: 850;
}
.forum-public-sections {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.forum-public-sections article {
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
}
.forum-public-sections h2 {
  margin-bottom: 0;
  font-size: 20px;
}
.forum-public-sections p {
  color: var(--muted);
  margin-bottom: 0;
}
.section-mark {
  width: 38px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(255, 212, 0, .28);
}
.section-mark.accent-blue { background: var(--blue); }
.section-mark.accent-green { background: var(--green); }
.section-mark.accent-red { background: var(--red); }
.forum-public-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 20px;
  align-items: center;
  margin-top: 14px;
  padding: 22px;
}
.forum-public-note h2 {
  max-width: 680px;
  margin-bottom: 0;
}
.forum-public-note ul {
  display: grid;
  gap: 10px;
  margin: 0;
  color: var(--muted);
}
.community-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px 310px;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
}
.banner-copy,
.banner-metrics,
.session-card,
.forum-rail,
.forum-board,
.community-panel > section,
.detail-panel {
  border: 1px solid rgba(255, 212, 0, .3);
  background:
    linear-gradient(180deg, rgba(255, 212, 0, .035), transparent 90px),
    linear-gradient(180deg, rgba(22, 20, 13, .96), rgba(7, 7, 6, .98));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.banner-copy {
  min-height: 184px;
  padding: 24px;
  display: grid;
  align-content: end;
  background:
    linear-gradient(90deg, rgba(4, 4, 3, .98), rgba(4, 4, 3, .74) 60%, rgba(4, 4, 3, .92)),
    url("/images/fscompany-operations-board.jpg") center / cover no-repeat;
  border-color: rgba(255, 212, 0, .38);
}
.eyebrow,
.rail-title {
  margin: 0 0 8px;
  color: var(--gold);
  font: 800 12px "JetBrains Mono", Consolas, monospace;
  letter-spacing: 0;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 800px;
  margin-bottom: 10px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}
h2 {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.16;
  letter-spacing: 0;
}
h3 { margin-bottom: 7px; font-size: 17px; letter-spacing: 0; }
.subtitle,
.muted { color: var(--muted); margin-bottom: 0; }

.banner-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.banner-metrics div {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 184px;
  padding: 18px;
  border-left: 1px solid rgba(255, 212, 0, .12);
}
.banner-metrics div:first-child { border-left: 0; }
.banner-metrics strong {
  color: var(--gold);
  font-size: 38px;
  font-weight: 950;
  line-height: 1;
}
.banner-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.session-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-content: center;
  padding: 18px;
}
.avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 212, 0, .58);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, rgba(255, 212, 0, .46), rgba(91, 74, 18, .9) 45%, rgba(5, 5, 4, .96));
  color: #fff7c4;
  font-weight: 950;
}
.session-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.role-chip,
.status-pill,
.pin-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.role-chip,
.pin-pill {
  border: 1px solid rgba(255, 212, 0, .52);
  color: var(--gold);
  background: var(--gold-soft);
}
.session-main strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.session-main em {
  overflow: hidden;
  color: var(--dim);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.session-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.session-actions a,
.session-actions button,
.mode-tabs button,
.detail-actions button {
  min-height: 34px;
  border: 1px solid rgba(255, 212, 0, .28);
  border-radius: 8px;
  background: linear-gradient(180deg, #17150f, #0d0c08);
  color: var(--muted);
  font-weight: 800;
  padding: 0 11px;
}
.session-actions a {
  display: inline-flex;
  align-items: center;
}
.session-actions a:hover,
.session-actions button:hover,
.mode-tabs button:hover,
.mode-tabs button.active,
.detail-actions button:hover {
  border-color: rgba(255, 212, 0, .66);
  background: rgba(255, 212, 0, .12);
  color: var(--text);
}

.forum-app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 340px;
  gap: 12px;
  align-items: start;
}
.forum-rail,
.forum-board,
.community-panel > section,
.detail-panel { padding: 16px; }
.forum-rail,
.community-panel {
  position: sticky;
  top: 84px;
}
.forum-rail {
  display: grid;
  gap: 18px;
}
.rail-section.compact { border-top: 1px solid rgba(255, 212, 0, .14); padding-top: 16px; }
.category-deck {
  display: grid;
  gap: 8px;
}
.category-card {
  width: 100%;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 212, 0, .12);
  border-radius: 8px;
  background: rgba(0, 0, 0, .18);
  color: var(--text);
  padding: 10px;
  text-align: left;
}
.category-card::before {
  content: "";
  width: 10px;
  height: 38px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(255, 212, 0, .28);
}
.category-card span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.category-card strong {
  color: var(--gold);
  font: 900 14px "JetBrains Mono", Consolas, monospace;
}
.category-card em {
  grid-column: 2 / -1;
  overflow: hidden;
  color: var(--dim);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.category-card:hover,
.category-card.active {
  border-color: rgba(255, 212, 0, .55);
  background: rgba(255, 212, 0, .08);
}
.accent-blue::before,
.thread-accent.accent-blue { background: var(--blue); box-shadow: 0 0 18px rgba(158, 208, 255, .25); }
.accent-green::before,
.thread-accent.accent-green { background: var(--green); box-shadow: 0 0 18px rgba(139, 224, 143, .24); }
.accent-cyan::before,
.thread-accent.accent-cyan { background: var(--cyan); box-shadow: 0 0 18px rgba(147, 224, 223, .22); }
.accent-red::before,
.thread-accent.accent-red { background: var(--red); box-shadow: 0 0 18px rgba(255, 123, 123, .24); }
.accent-violet::before,
.thread-accent.accent-violet { background: var(--violet); box-shadow: 0 0 18px rgba(217, 209, 191, .22); }

.filters,
.thread-form,
.reply-form {
  display: grid;
  gap: 11px;
}
label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #080806;
  color: var(--text);
  outline: none;
  padding: 11px 12px;
}
textarea { min-height: 122px; resize: vertical; }
input[type="file"] {
  min-height: 44px;
  padding: 9px 10px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 212, 0, .16);
}
.check-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}
.check-row input { width: 18px; height: 18px; }
.form-note,
.file-field em {
  color: var(--dim);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.forum-board {
  min-height: 460px;
}
.board-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}
.topic-table-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 112px 128px;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 212, 0, .24);
  color: var(--dim);
  font: 800 11px "JetBrains Mono", Consolas, monospace;
  padding: 0 10px 10px 30px;
  text-transform: uppercase;
}
.thread-list {
  display: grid;
}
.thread-row {
  width: 100%;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) 92px 112px 128px;
  gap: 10px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid rgba(255, 212, 0, .13);
  background: transparent;
  color: var(--text);
  padding: 15px 10px;
  text-align: left;
}
.thread-row:hover,
.thread-row.selected {
  background: linear-gradient(90deg, rgba(255, 212, 0, .1), rgba(255, 212, 0, .025));
}
.thread-accent {
  width: 8px;
  min-height: 58px;
  border-radius: 999px;
  background: var(--gold);
}
.thread-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.thread-title {
  overflow: hidden;
  font-size: 16px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thread-excerpt {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.thread-meta {
  overflow: hidden;
  color: var(--dim);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thread-stat,
.thread-date {
  display: grid;
  gap: 2px;
  color: var(--dim);
  font-size: 11px;
}
.thread-stat strong {
  color: var(--text);
  font: 900 18px "JetBrains Mono", Consolas, monospace;
}
.thread-stat em,
.thread-date em {
  font-style: normal;
  text-transform: uppercase;
}
.thread-date strong {
  color: var(--muted);
  font-size: 12px;
}
.thread-state {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.status-pill.open {
  border: 1px solid rgba(139, 224, 143, .42);
  background: rgba(139, 224, 143, .1);
  color: var(--green);
}
.status-pill.locked {
  border: 1px solid rgba(255, 123, 123, .45);
  background: rgba(255, 123, 123, .1);
  color: var(--red);
}
.empty-list {
  display: grid;
  min-height: 260px;
  align-content: center;
  justify-items: center;
  border: 1px dashed rgba(255, 212, 0, .22);
  color: var(--muted);
  padding: 28px;
  text-align: center;
}
.empty-list h3 { color: var(--text); }

.community-panel {
  display: grid;
  gap: 12px;
}
.composer-card h2 { margin-bottom: 14px; }
.primary-action {
  min-height: 42px;
  border: 1px solid rgba(255, 212, 0, .85);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffe14b, #d39f00);
  color: #090704;
  font-weight: 950;
  box-shadow: 0 16px 38px rgba(255, 212, 0, .18);
}
.primary-action:hover { filter: brightness(1.06); }
.guidelines-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.detail-panel {
  margin-top: 12px;
  box-shadow: none;
}
.empty-detail {
  min-height: 180px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}
.detail-top {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.detail-grid span {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255, 212, 0, .14);
  background: rgba(0, 0, 0, .18);
  padding: 11px;
}
.detail-grid em {
  color: var(--dim);
  font-size: 11px;
  font-style: normal;
  text-transform: uppercase;
}
.detail-grid strong { color: var(--text); }
.post-stack {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}
.post-card {
  border: 1px solid rgba(255, 212, 0, .16);
  border-radius: 8px;
  background: rgba(0, 0, 0, .2);
  padding: 14px;
}
.post-card.admin-post {
  border-color: rgba(255, 212, 0, .38);
  background: rgba(255, 212, 0, .07);
}
.post-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.post-card time { color: var(--dim); font-size: 12px; }
.post-card p {
  margin-bottom: 0;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.post-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.post-image {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 212, 0, .18);
  border-radius: 8px;
  background: #040404;
}
.post-image img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  transition: transform .18s ease, filter .18s ease;
}
.post-image:hover img {
  filter: brightness(1.08);
  transform: scale(1.015);
}
.moderation-panel,
.reply-panel {
  border-top: 1px solid rgba(255, 212, 0, .16);
  margin-top: 14px;
  padding-top: 14px;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-actions .danger-action {
  border-color: rgba(255, 123, 123, .5);
  color: var(--red);
}
.move-category-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 240px) auto;
  gap: 8px;
  align-items: end;
  margin-top: 12px;
}
.move-category-row label {
  color: var(--dim);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.move-category-row select {
  min-height: 34px;
  padding: 0 10px;
}
.move-category-row button {
  min-height: 34px;
  border: 1px solid rgba(255, 212, 0, .28);
  border-radius: 8px;
  background: linear-gradient(180deg, #17150f, #0d0c08);
  color: var(--muted);
  font-weight: 800;
  padding: 0 11px;
}
.move-category-row button:hover {
  border-color: rgba(255, 212, 0, .62);
  color: var(--text);
}

@media (max-width: 1220px) {
  .community-banner,
  .forum-app,
  .forum-public-hero,
  .forum-public-note {
    grid-template-columns: 1fr;
  }
  .forum-rail,
  .community-panel {
    position: static;
  }
  .category-deck {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .forum-public-sections {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar-inner {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    width: calc(100vw - 24px);
    padding: 10px 0;
  }
  .brand { max-width: calc(100% - 86px); }
  .nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 4px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar {
    display: none;
  }
  .nav a,
  .lang button {
    font-size: 11px;
    padding: 6px 6px;
  }
  .nav a {
    flex: 0 0 auto;
  }
  .lang { gap: 2px; margin-left: auto; }
  .forum-shell {
    width: calc(100vw - 24px);
    max-width: 1440px;
    padding-top: 12px;
  }
  .banner-copy,
  .banner-metrics div {
    min-height: auto;
  }
  .banner-copy {
    padding: 18px;
    overflow: hidden;
  }
  .banner-metrics {
    grid-template-columns: 1fr;
  }
  .banner-metrics div {
    min-width: 0;
    padding: 14px 10px;
    border-left: 0;
    border-top: 1px solid rgba(255, 212, 0, .12);
  }
  .banner-metrics div:first-child { border-top: 0; }
  .banner-metrics strong { font-size: 28px; }
  .banner-metrics span { font-size: 10px; }
  .session-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .avatar {
    width: 42px;
    height: 42px;
  }
  h1 {
    max-width: 100%;
    font-size: 27px;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }
  .subtitle { font-size: 15px; }
  .category-deck {
    grid-template-columns: 1fr;
  }
  .forum-public-shell {
    width: calc(100vw - 24px);
    padding-top: 12px;
  }
  .forum-public-hero {
    min-height: auto;
  }
  .forum-public-copy,
  .forum-public-status,
  .forum-public-note {
    padding: 18px;
  }
  .forum-public-copy .subtitle {
    font-size: 15px;
  }
  .public-actions .primary-action,
  .public-actions .secondary-action {
    width: 100%;
  }
  .forum-public-sections {
    grid-template-columns: 1fr;
  }
  .forum-public-sections article {
    min-height: auto;
  }
  .board-head {
    display: grid;
    align-items: start;
  }
  .mode-tabs {
    justify-content: start;
  }
  .topic-table-head {
    display: none;
  }
  .thread-row {
    grid-template-columns: 8px minmax(0, 1fr);
  }
  .thread-stat,
  .thread-state,
  .thread-date {
    grid-column: 2;
  }
  .thread-state {
    margin-top: -2px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .move-category-row {
    grid-template-columns: 1fr;
  }
}
