html,
body {
  margin: 0;
  padding: 0;
  background: #d6dbe1;
  color: #111;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 13px;
}

a {
  color: #0b5394;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

input,
button,
select {
  font: 12px Verdana, Arial, sans-serif;
}

.wrapper {
  padding: 10px 0 30px;
}

.forum-shell {
  width: min(1180px, calc(100vw - 24px));
  margin: 0 auto;
}

.header-table,
.bar-table,
.news-table,
.tabs,
.board-table,
.detail-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.tborder,
.header-table,
.bar-table,
.news-table {
  border: 1px solid #6b7a8a;
  background: #b8c5d1;
}

.catbg,
.catbar {
  background: linear-gradient(#8ea6be, #6e879e);
  color: #fff;
  font-weight: 700;
}

.catbg {
  height: 34px;
  padding: 0 10px;
}

.forum-title {
  font-size: 24px;
  line-height: 34px;
}

.logo-cell {
  width: 260px;
  text-align: right;
  padding-right: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.forum-badge {
  display: inline-block;
  min-width: 44px;
  padding: 6px 10px;
  border: 1px solid #dca64a;
  background: #f4d07d;
  color: #573500;
  font-weight: 700;
  text-align: center;
}

.lang-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
}

.lang-picker .smalltext {
  color: #eef4fa;
}

.lang-picker select {
  min-width: 118px;
  padding: 3px 4px;
  border: 1px solid #60788e;
  background: #eef3f7;
  color: #162433;
}

.titlebg2,
.titlebg {
  background: linear-gradient(#d7dde3, #bcc8d4);
  color: #111;
  border-top: 1px solid #f4f7fa;
}

.topbar-info,
.news-cell,
.search-cell {
  padding: 8px 10px;
}

.welcome-box {
  padding: 9px 10px;
}

.middletext {
  font-size: 13px;
}

.smalltext {
  font-size: 11px;
  line-height: 1.5;
}

.search-cell {
  width: 250px;
  text-align: right;
}

.search-cell input {
  width: 150px;
  padding: 3px 4px;
  border: 1px solid #7d8a96;
  background: #fff;
}

.search-cell button {
  padding: 3px 10px;
  border: 1px solid #7d8a96;
  background: #e7ebef;
  cursor: pointer;
}

.tabs {
  margin: 0 0 0 10px;
}

.tabs td {
  padding: 7px 12px;
  white-space: nowrap;
}

.maintab_first,
.maintab_last,
.maintab_active_first,
.maintab_active_last {
  width: 6px;
  padding: 0;
}

.maintab_back {
  background: linear-gradient(#d0d8df, #aebdca);
  border: 1px solid #7a8b9c;
  border-bottom: none;
}

.maintab_active_back {
  background: #f1f4f7;
  border: 1px solid #7a8b9c;
  border-bottom: none;
  font-weight: 700;
}

#bodyarea {
  padding: 10px 0 24px;
}

.navline {
  margin: 12px 0;
  font-size: 12px;
}

.nav {
  color: #000;
}

.nav-sep {
  margin: 0 6px;
  color: #5d6976;
}

.catbar {
  padding: 7px 10px;
  font-size: 14px;
}

.board-table,
.detail-table {
  background: #7e8f9f;
}

.board-table td,
.detail-table td,
.detail-table th {
  border-top: 1px solid #fff;
}

.windowbg {
  background: #e4e9ee;
}

.windowbg2 {
  background: #f1f4f7;
}

.windowbg3 {
  background: #dde4ea;
}

.iconcol {
  width: 68px;
  text-align: center;
  vertical-align: top;
}

.status-icon {
  display: inline-block;
  margin-top: 4px;
  font-size: 20px;
  color: #f0c14b;
}

.statcol {
  width: 110px;
  text-align: center;
  vertical-align: middle;
}

.lastpostcol {
  width: 235px;
  vertical-align: middle;
}

.board-extra {
  padding-top: 3px;
}

.section-block {
  margin-top: 16px;
}

.detail-table th,
.detail-table td {
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
}

.detail-table th {
  font-size: 12px;
}

.note-box {
  padding: 10px;
}

.whitepaper-toolbar,
.useai-toolbar {
  padding: 9px 10px;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #94a2b0;
}

.whitepaper-layout,
.useai-shell {
  display: grid;
  gap: 1px;
  background: #7e8f9f;
}

.whitepaper-layout {
  grid-template-columns: 250px minmax(0, 1fr);
}

.useai-shell {
  grid-template-columns: 280px minmax(0, 1fr);
}

.paper-sidebar,
.useai-sidebar {
  padding: 0;
  border-top: 1px solid #fff;
}

.sidebar-head {
  padding: 9px 10px;
  background: linear-gradient(#d7dde3, #bcc8d4);
  border-bottom: 1px solid #99a8b6;
  font-weight: 700;
  font-size: 12px;
}

.doc-index {
  margin: 0;
  padding: 10px 12px 14px 28px;
  list-style: square;
}

.doc-index li {
  margin: 0 0 8px;
  line-height: 1.45;
}

.paper-pages {
  padding: 16px;
  border-top: 1px solid #fff;
  background:
    linear-gradient(rgba(244, 247, 250, 0.82), rgba(227, 234, 241, 0.82)),
    repeating-linear-gradient(
      0deg,
      rgba(96, 112, 128, 0.05) 0,
      rgba(96, 112, 128, 0.05) 1px,
      transparent 1px,
      transparent 28px
    );
}

.paper-sheet {
  max-width: 760px;
  margin: 0 auto 16px;
  padding: 22px 28px 26px;
  border: 1px solid #99a7b5;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 249, 251, 0.96)),
    #fdfdfc;
  box-shadow:
    0 1px 0 #fff inset,
    0 2px 6px rgba(23, 33, 43, 0.12);
}

.paper-sheet:last-child {
  margin-bottom: 0;
}

.paper-sheet h3 {
  margin: 0 0 10px;
  color: #20364d;
  font-size: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.paper-sheet p {
  margin: 0 0 12px;
  line-height: 1.65;
  color: #1b2430;
}

.paper-meta {
  margin-bottom: 10px;
  color: #5a6674;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.paper-kicker {
  color: #4f5f72;
  font-weight: 700;
}

.paper-sheet hr {
  margin: 16px 0;
  border: 0;
  border-top: 1px solid #cbd4dc;
}

.useai-main {
  padding: 14px;
  border-top: 1px solid #fff;
}

.model-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.model-card {
  display: block;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #8b9aa8;
  background: linear-gradient(#f7f9fb, #dce4eb);
  color: #1a2531;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 0 #fff inset;
}

.model-card.is-active {
  border-color: #6f8498;
  background: linear-gradient(#fff6d8, #e9d59d);
}

.model-name,
.model-desc {
  display: block;
}

.model-name {
  margin-bottom: 4px;
  font-weight: 700;
}

.model-desc {
  font-size: 11px;
  line-height: 1.45;
  color: #49596a;
}

.chat-frame {
  border: 1px solid #8a99a7;
  background: #d4dde5;
  box-shadow: 0 1px 0 #fff inset;
}

.chat-topline {
  padding: 7px 10px;
  border-bottom: 1px solid #95a4b2;
  background: linear-gradient(#e8edf2, #cfd9e2);
}

.chat-window {
  display: grid;
  gap: 10px;
  padding: 14px;
  background:
    linear-gradient(rgba(242, 246, 250, 0.93), rgba(232, 238, 244, 0.93)),
    repeating-linear-gradient(
      180deg,
      rgba(104, 120, 136, 0.06) 0,
      rgba(104, 120, 136, 0.06) 1px,
      transparent 1px,
      transparent 24px
    );
}

.chat-msg {
  max-width: 88%;
  padding: 11px 12px;
  border: 1px solid #9aa8b6;
  box-shadow: 0 1px 0 #fff inset;
}

.chat-msg p {
  margin: 6px 0 0;
  line-height: 1.6;
}

.chat-msg.user {
  margin-left: auto;
  background: linear-gradient(#fffbe6, #efe3b5);
}

.chat-msg.assistant {
  background: linear-gradient(#ffffff, #e8eef4);
}

.chat-msg.system {
  background: linear-gradient(#edf4ec, #d8e8d6);
}

.chat-role {
  font-size: 11px;
  font-weight: 700;
  color: #4f6173;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meter-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.meter-card {
  padding: 10px 12px;
  border: 1px solid #8a99a7;
  background: linear-gradient(#f8fafc, #e0e7ee);
  box-shadow: 0 1px 0 #fff inset;
}

.meter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 12px;
}

.meter-track {
  height: 18px;
  border: 1px solid #8594a2;
  background: #c8d2db;
  box-shadow: inset 0 1px 3px rgba(20, 30, 40, 0.15);
}

.meter-fill {
  height: 100%;
}

.fill-token {
  background: linear-gradient(90deg, #6f88bf, #325a96);
}

.fill-mining {
  background: linear-gradient(90deg, #9ab86d, #5f8d36);
}

.fill-usd {
  background: linear-gradient(90deg, #d2b069, #a9781f);
}

@media (max-width: 860px) {
  .forum-shell {
    width: calc(100vw - 10px);
  }

  .search-cell {
    display: none;
  }

  .header-actions {
    flex-direction: column;
    align-items: flex-end;
  }

  .board-table,
  .detail-table,
  .header-table,
  .bar-table,
  .news-table,
  .tabs {
    display: block;
    overflow-x: auto;
  }

  .whitepaper-layout,
  .useai-shell {
    grid-template-columns: 1fr;
  }

  .paper-pages,
  .useai-main {
    padding: 10px;
  }

  .paper-sheet {
    padding: 16px;
  }

  .chat-msg {
    max-width: 100%;
  }
}
