* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #4b4a46;
  color: #1d1d1d;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 12px;
}

a {
  color: #143d63;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.is-hidden {
  display: none !important;
}

.auth-screen {
  width: 420px;
  max-width: calc(100% - 16px);
  margin: 80px auto 0;
  border: 1px solid #151515;
  background: #c5c2ba;
}

.auth-table {
  width: 100%;
  border-collapse: collapse;
}

.auth-table td {
  border: 1px solid #8f8a80;
  background: #d8d4ca;
  padding: 7px;
}

.site-shell {
  width: 980px;
  max-width: calc(100% - 14px);
  margin: 8px auto;
  border: 1px solid #121212;
  background: #c5c2ba;
}

.top-bar {
  display: table;
  width: 100%;
  border-bottom: 1px solid #181818;
  background: #242424;
  color: #d9d6cf;
}

.logo-block,
.user-panel {
  display: table-cell;
  vertical-align: middle;
}

.logo-block {
  padding: 10px 12px 8px;
}

.logo-block h1 {
  margin: 0;
  color: #d0c6a8;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 30px;
  line-height: 30px;
  letter-spacing: 0;
}

.logo-block p {
  margin: 3px 0 0;
  color: #aaa49a;
  font-size: 11px;
}

.user-panel {
  width: 360px;
  padding: 8px 10px;
  border-left: 1px solid #080808;
  background: #30302f;
  text-align: right;
}

.avatar,
.avatar-fallback {
  display: inline-block;
  width: 32px;
  height: 32px;
  margin-right: 7px;
  border: 1px solid #101010;
  background: #bdb8ad;
  vertical-align: middle;
}

.avatar {
  object-fit: cover;
}

.avatar-fallback {
  color: #222;
  font-weight: bold;
  line-height: 30px;
  text-align: center;
}

.layout-table {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.left-menu,
.forum-main {
  display: table-cell;
  vertical-align: top;
}

.left-menu {
  width: 190px;
  padding: 8px;
  background: #b7b4ad;
  border-right: 1px solid #77736a;
}

.forum-main {
  padding: 8px;
  background: #d0ccc4;
}

.box-title,
.section-head {
  padding: 5px 7px;
  border: 1px solid #111;
  background: #2b2b2b;
  color: #ece8dc;
  font-weight: bold;
}

.left-menu nav {
  border-left: 1px solid #807b71;
  border-right: 1px solid #807b71;
  border-bottom: 1px solid #807b71;
  background: #d8d4ca;
}

.left-menu nav a {
  display: block;
  padding: 7px 8px;
  border-bottom: 1px solid #aaa49a;
  color: #222;
}

.left-menu nav a:last-child {
  border-bottom: 0;
}

.left-menu nav a:before {
  content: ">";
  margin-right: 5px;
  color: #605c55;
}

.form-table,
.thread-table {
  width: 100%;
  border-collapse: collapse;
}

.form-table th,
.form-table td,
.thread-table th,
.thread-table td {
  border: 1px solid #8f8a80;
  background: #e1ded6;
  padding: 6px;
}

.category-strip {
  display: table;
  width: 100%;
  margin-bottom: 8px;
  table-layout: fixed;
  border-collapse: collapse;
}

.category {
  display: table-cell;
  padding: 8px;
  border: 1px solid #77736a;
  border-top: 3px solid #55524c;
  background: #dedad1;
}

.category strong,
.category span {
  display: block;
}

.category strong {
  margin-bottom: 3px;
  color: #111;
}

.category span {
  color: #4b4944;
  font-size: 11px;
  line-height: 1.35;
}

.new-thread-box,
.thread-list {
  margin-bottom: 8px;
  border: 1px solid #77736a;
  background: #c8c4bb;
}

.form-table th {
  width: 120px;
  text-align: right;
  color: #222;
  background: #d1cdc4;
  font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  border: 1px solid #555;
  background: #f2f0eb;
  color: #111;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 12px;
  padding: 4px;
}

textarea {
  resize: vertical;
}

input[type="file"] {
  width: 70%;
  font-size: 11px;
}

button {
  min-width: 92px;
  margin-right: 5px;
  padding: 4px 9px;
  border: 1px solid #222;
  background: #c5c1b8;
  color: #111;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 12px;
  cursor: pointer;
}

#logoutButton {
  min-width: 70px;
  margin: 0 0 0 8px;
  padding: 3px 7px;
}

button:active {
  border-color: #777 #111 #111 #777;
  background: #b8b4aa;
}

.file-note {
  color: #55514b;
  font-size: 11px;
}

.form-error {
  color: #8b0000;
  font-weight: bold;
}

.posts-list {
  padding: 0;
}

.empty-board {
  padding: 12px;
  border-top: 1px solid #8f8a80;
  background: #e1ded6;
  color: #444;
}

.thread-table {
  margin: 0;
  border-top: 0;
}

.thread-table + .thread-table {
  border-top: 2px solid #77736a;
}

.thread-title-row td {
  background: #d9d5cc;
}

.thread-title {
  color: #143d63;
  font-size: 14px;
  font-weight: bold;
}

.tag-badge,
.section-label {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 5px;
  border: 1px solid #666159;
  background: #ece6c8;
  color: #222;
  font-size: 10px;
  line-height: 15px;
}

.section-label {
  background: #d4d6d9;
}

.thread-meta {
  width: 200px;
  color: #444;
  font-size: 11px;
  text-align: right;
}

.thread-user {
  display: inline-block;
  vertical-align: middle;
}

.thread-avatar {
  width: 24px;
  height: 24px;
  margin-right: 5px;
  border: 1px solid #333;
  background: #c5c1b8;
  object-fit: cover;
  vertical-align: middle;
}

.thread-avatar.avatar-fallback {
  line-height: 22px;
}

.thread-body {
  line-height: 1.45;
  white-space: pre-wrap;
}

.thread-image {
  display: block;
  max-width: 220px;
  max-height: 160px;
  margin-top: 7px;
  border: 1px solid #555;
  background: #eee;
}

@media (max-width: 720px) {
  .site-shell {
    max-width: calc(100% - 8px);
    margin: 4px auto;
  }

  .top-bar,
  .logo-block,
  .user-panel,
  .layout-table,
  .left-menu,
  .forum-main,
  .category-strip,
  .category {
    display: block;
    width: 100%;
  }

  .user-panel {
    border-left: 0;
    border-top: 1px solid #080808;
    text-align: left;
  }

  .left-menu {
    border-right: 0;
    border-bottom: 1px solid #77736a;
  }

  .category {
    margin-bottom: 4px;
  }

  .form-table th,
  .form-table td,
  .thread-table td {
    display: block;
    width: 100%;
    text-align: left;
  }

  .thread-meta {
    text-align: left;
  }
}
