/* Classic: the base theme. Plain, neutral, one column. The accent comes from the space's settings. */
:root {
  --accent: #3b5bdb;
  --accent-contrast: #ffffff;
  --bg: #f7f7f9;
  --surface: #ffffff;
  --text: #1d2030;
  --muted: #646a80;
  --line: #e1e3ea;
  --danger: #c92a2a;
  --ok: #2b8a3e;
  --radius: 8px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161d;
    --surface: #1c1f29;
    --text: #e8eaf2;
    --muted: #9aa0b5;
    --line: #2d3140;
    --danger: #ff6b6b;
    --ok: #69db7c;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.5;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--accent); }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
p { margin: .5rem 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: .92em; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 10; }
.skip-link:focus { left: 0; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header-inner { max-width: 1180px; margin: 0 auto; padding: .6rem 1rem; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); font-weight: 650; }
.brand-logo { height: 30px; width: auto; max-width: 120px; }
.site-account { margin-left: auto; display: flex; gap: .75rem; align-items: center; font-size: .92rem; }
.site-account form { display: inline; margin: 0; }
.site-search { flex: 1 1 12rem; max-width: 22rem; }
.site-search form { display: flex; gap: .4rem; margin: 0; }
.site-search .search-input { flex: 1; min-width: 0; }
.thread-events { list-style: none; margin: 0 0 1rem; padding: 0; color: var(--muted); font-size: .88rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.link-button { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }

/* The frame holds the content and, on the board and thread pages, the list of boards beside it. */
.page-frame { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; display: flex; align-items: flex-start; gap: 1.5rem; padding: 0 1rem; }
.content { flex: 1; min-width: 0; padding: 1.25rem 0 2rem; }
.sidebar { flex: 0 0 13.5rem; position: sticky; top: 0; padding: 1.25rem 0 2rem; }
.sidebar-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 .5rem .6rem; }
.sidebar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.sidebar-link { display: flex; align-items: center; gap: .6rem; padding: .4rem .6rem; border-radius: var(--radius); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.sidebar-link:hover, .sidebar-link:focus-visible { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.sidebar-link[aria-current="page"] { background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 650; }
.board-dot { flex: none; width: .7rem; height: .7rem; border-radius: 3px; background: var(--board-color, var(--muted)); }
.board-color-1 { --board-color: #7048e8; }
.board-color-2 { --board-color: #4c6ef5; }
.board-color-3 { --board-color: #1c7ed6; }
.board-color-4 { --board-color: #15aabf; }
.board-color-5 { --board-color: #12b886; }
.board-color-6 { --board-color: #40c057; }
.board-color-7 { --board-color: #f59f00; }
.board-color-8 { --board-color: #f76707; }
@media (max-width: 760px) {
  .page-frame { flex-direction: column; align-items: stretch; gap: 0; }
  .sidebar { position: static; flex: none; padding: .75rem 0 0; }
  .sidebar-title { display: none; }
  .sidebar-list { display: flex; flex-wrap: wrap; gap: .4rem; }
  .sidebar-link { border: 1px solid var(--line); background: var(--surface); padding: .25rem .7rem; }
}
.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 1rem; }
.page-title { margin-bottom: 1rem; }
.subtitle { color: var(--muted); margin: 0; }
.narrow { max-width: 460px; margin: 1.5rem auto; }
.empty { color: var(--muted); padding: 1.5rem; text-align: center; }

.notice { max-width: 1180px; width: calc(100% - 2rem); margin: .75rem auto 0; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.notice-error { border-color: var(--danger); color: var(--danger); }
.notice-ok { border-color: var(--ok); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.board-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.board-grid .card { margin: 0; }

.thread-list { list-style: none; margin: 0 0 1.25rem; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.thread-item { padding: .75rem 1rem; border-bottom: 1px solid var(--line); display: grid; gap: .2rem; }
.thread-item:last-child { border-bottom: 0; }
.thread-title { font-weight: 600; text-decoration: none; }
.thread-meta { color: var(--muted); font-size: .85rem; display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.pagination { text-align: right; margin: -.5rem 0 1.25rem; }

.new-thread-section { margin: 1.25rem 0; }
.new-thread > summary { list-style: none; display: inline-block; cursor: pointer; user-select: none; }
.new-thread > summary::-webkit-details-marker { display: none; }
.new-thread-body { margin-top: .75rem; }
.new-thread:not([open]) .label-close, .new-thread[open] .label-open { display: none; }

.badge, .pill { display: inline-block; padding: 0 .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.5; border: 1px solid var(--line); }
.badge-neutral { background: color-mix(in srgb, var(--muted) 18%, transparent); }
.badge-blue { background: #d0ebff; color: #1864ab; }
.badge-green { background: #d3f9d8; color: #2b8a3e; }
.badge-amber { background: #fff3bf; color: #8a6d00; }
.badge-red { background: #ffe3e3; color: #c92a2a; }
.badge-purple { background: #e5dbff; color: #5f3dc4; }
.pill-new { background: #d0ebff; color: #1864ab; }
.pill-open { background: #d3f9d8; color: #2b8a3e; }
.pill-pending-internal, .pill-pending-staff { background: #fff3bf; color: #8a6d00; }
.pill-pending-customer { background: #e5dbff; color: #5f3dc4; }
.pill-pinned { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.thread-item.is-pinned { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); box-shadow: inset 3px 0 0 var(--accent); }
.pill-closed, .pill-archived { background: color-mix(in srgb, var(--muted) 20%, transparent); color: var(--muted); }

.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; margin-bottom: .75rem; }
.post-staff { border-left: 4px solid var(--accent); }
.post-head { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .4rem; font-size: .9rem; }
.post-author { font-weight: 650; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; }

.field { margin-bottom: .9rem; }
.field label { display: block; font-weight: 600; margin-bottom: .25rem; font-size: .92rem; }
.input { width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; }
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea.input { resize: vertical; }
.hint { color: var(--muted); font-size: .85rem; margin: .2rem 0 0; }
.error { color: var(--danger); font-size: .88rem; margin: .25rem 0 0; }
.actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .5rem; }
.button { display: inline-block; padding: .5rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-decoration: none; }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.preview { margin: .5rem 0 1rem; padding: .6rem .9rem; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--muted) 8%, var(--surface)); border-radius: 0 var(--radius) var(--radius) 0; }
.preview .post-body { margin-top: .3rem; max-height: 18rem; overflow: auto; }
.g-recaptcha { margin: .5rem 0; }
.subscribe { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 0 0 1rem; }
.subscribe form { margin: 0; }
