/* Base */
:root{
  --bg: #e5e8ef;
  --panel: #f7f8fb;
  --border: #b7c0d6;
  --border-dark: #8c98b3;
  --link: #1a3db4;
  --link-visited: #5a2ea6;
  --text: #111;
  --muted: #555;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: Verdana, Tahoma, Arial, sans-serif;
  line-height: 1.4;
  font-size: 15px;
  margin: 0;
  padding: 0;
}

a { color: var(--link); text-decoration: underline; }
a:visited { color: var(--link-visited); }
img { image-rendering: pixelated; }

/* Layout */
.wrap {
  width: 960px;
  margin: 0 auto;
}

#topbar {
  background: linear-gradient(#2a3f73, #1e2d55);
  border-bottom: 1px solid #0e1a3d;
  color: #fff;
}
#topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
}
#topbar .brand {
  font-weight: bold;
  font-size: 18px;
}
#topbar .userbar a { color: #fff; text-decoration: none; }
#topbar .userbar a:hover { text-decoration: underline; }

#nav {
  background: #d7dced;
  border-bottom: 1px solid var(--border);
}
#nav .wrap {
  padding: 6px 10px;
  font-size: 13px;
}

.breadcrumb {
  padding: 8px 10px;
  font-size: 13px;
  color: var(--muted);
}

/* Cards and tables */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px #fff;
  margin: 14px 0;
}

.card-title {
  padding: 8px 10px;
  background: #dfe5f5;
  border-bottom: 1px solid var(--border);
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .toggle {
  margin-left: auto;
  font-size: 12px;
  padding: 3px 6px;
  border: 1px solid var(--border-dark);
  background: #e8edfb;
  cursor: pointer;
}
.icon { width: 16px; height: 16px; image-rendering: pixelated; }

/* Forum index table */
.board-table {
  width: 100%;
  border-collapse: collapse;
}
.board-table th, .board-table td {
  border: 1px solid var(--border);
  padding: 8px;
  vertical-align: top;
  background: #fff;
}
.board-table thead th {
  background: #ecf0fa;
  font-size: 13px;
}
.board-table .forum-title { width: 60%; }
.board-table .col-forum { text-align: left; }
.board-table .col-stats { width: 10%; text-align: center; }
.board-table .col-last { width: 20%; }
.board-table .center { text-align: center; }
.lastpost .user { color: var(--muted); }

/* Thread controls */
.thread-controls { margin: 10px 0; }
.btn {
  display: inline-block;
  background: #e8edfb;
  border: 1px solid var(--border-dark);
  padding: 6px 10px;
  font-size: 13px;
  color: #000;
  text-decoration: none;
  margin-right: 6px;
}
.btn:hover { background: #f5f7ff; }
.mini { width: 16px; height: 16px; vertical-align: text-bottom; margin-right: 6px; }

/* Posts table */
.post-table { width: 100%; border-collapse: collapse; }
.post-table .post td {
  border: 1px solid var(--border);
  background: #fff;
}
.poster-col {
  width: 180px;
  background: #f2f4fb;
  border-right: 1px solid var(--border);
  padding: 10px;
}
.poster-name { font-weight: bold; margin-bottom: 8px; }
.poster-meta { font-size: 12px; color: var(--muted); }
.avatar { border: 1px solid var(--border); background: #fff; }

.content-col { padding: 10px; }
.post-head {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.post-head .permalink { font-weight: bold; text-decoration: none; }
.post-head .date { color: var(--muted); }

.post-body p { margin: 10px 0; }
.quote { border: 1px solid var(--border); background: #f6f7fc; margin: 10px 0; }
.quote-head { background: #e9edfa; padding: 6px 8px; font-weight: bold; font-size: 12px; }
.quote-body { padding: 8px; }

.bbcode-list { margin: 8px 0 8px 18px; }
.code, pre.code {
  background: #111; color: #d6ffd6; padding: 8px; font-size: 13px; overflow: auto;
  border: 1px solid #333;
}

.sig {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dotted var(--border);
  color: var(--muted);
  font-size: 13px;
}

/* Footer */
.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 14px 0 30px;
}

/* Accessibility and dyslexia-friendly touches */
body { letter-spacing: 0.2px; }
p, li { max-width: 75ch; }       /* line length control */
a:focus, button:focus { outline: 2px solid #ffbf47; outline-offset: 1px; }

/* Simple responsive tweak */
@media (max-width: 1000px) {
  .wrap { width: 95%; }
  .poster-col { width: 140px; }
}