/* gobb stylesheet. Written for gobb; it holds the three built-in color schemes,
   the page frame and the board index. */

/* ---- Color schemes -------------------------------------------------------
   Each scheme sets the same tokens. The page uses the tokens and no
   other color. The pairs text and muted on page and row, link on page and row,
   bar-text on bar, header-text on header, on-accent on accent, and on-badge on
   badge, and on-mark on mark all reach WCAG AA (4.5:1); a test holds them to it. --new is a signal
   color for borders and bars; the "New" pill has text, so it uses --badge. */

:root[data-scheme="slate"] {
  color-scheme: dark;
  --page: #233346;
  --row: #2a3c52;
  --bar: #596d86;
  --bar-text: #ffffff;
  --header: #2e425b;
  --header-text: #ffffff;
  --text: #dbe3ec;
  --muted: #aebccd;
  --link: #4fc0ff;
  --accent: #009aff;
  --on-accent: #04121f;
  --new: #ff0000;
  --badge: #d40000;
  --on-badge: #ffffff;
  --mark: #ffd84d;
  --on-mark: #1a1400;
}

:root[data-scheme="slate-deep"] {
  color-scheme: dark;
  --page: #0c141f;
  --row: #121c2a;
  --bar: #2e425b;
  --bar-text: #ffffff;
  --header: #17263a;
  --header-text: #ffffff;
  --text: #dbe3ec;
  --muted: #9fb0c4;
  --link: #5cc5ff;
  --accent: #009aff;
  --on-accent: #04121f;
  --new: #ff0000;
  --badge: #d40000;
  --on-badge: #ffffff;
  --mark: #ffd84d;
  --on-mark: #1a1400;
}

:root[data-scheme="slate-light"] {
  color-scheme: light;
  --page: #e8edf3;
  --row: #ffffff;
  --bar: #2e425b;
  --bar-text: #ffffff;
  --header: #2e425b;
  --header-text: #ffffff;
  --text: #1c2733;
  --muted: #4c5e72;
  --link: #0a5ea8;
  --accent: #009aff;
  --on-accent: #04121f;
  --new: #d90000;
  --badge: #c40000;
  --on-badge: #ffffff;
  --mark: #ffd84d;
  --on-mark: #1a1400;
}

/* Colors that follow from the tokens. */
:root {
  --line: color-mix(in srgb, var(--text) 16%, transparent);
  --line-soft: color-mix(in srgb, var(--text) 9%, transparent);
  --hover: color-mix(in srgb, var(--text) 5%, var(--row));
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---- Base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
  color: var(--text);
  font: 400 1rem/1.5 var(--font);
  overflow-wrap: break-word;
}

main { flex: 1 0 auto; padding-top: 1.5rem; padding-bottom: 2.5rem; }

.wrap { width: 100%; max-width: 70rem; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
a:focus-visible, .spoiler:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
  border-radius: 3px;
}

img { max-width: 100%; height: auto; }

h1, h2 { line-height: 1.25; margin: 0; }

p { margin: 0; }

.muted { color: var(--muted); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0.5rem; top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--row);
  border-radius: var(--radius);
}
.skip-link:focus { top: 0.5rem; }

/* ---- Header and nav ------------------------------------------------------ */

.site-header {
  background: var(--header);
  color: var(--header-text);
  border-bottom: 3px solid var(--accent);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* The member's links: "Signed in as" and Sign out, or a guest's Sign in. They sit
   at the right of the brand and wrap under it on a narrow screen. */
.header-user { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.header-user a { color: var(--header-text); font-weight: 600; }
.header-user .nav-who { padding: 0; white-space: nowrap; }
.header-user .nav-who a {
  display: inline-block;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.header-user .nav-who a[aria-current="page"] {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
}
.header-user form { display: flex; margin: 0; }
.header-user .nav-button { margin: 0; border-radius: 6px; }
/* A guest's Sign in link is the same size and has the same hover as Sign out. */
.header-user > a {
  padding: 0.6rem 0.8rem;
  font-size: 0.95rem;
  line-height: 1.5;
  border-radius: 6px;
}
.header-user > a:hover { text-decoration: none; background: rgb(255 255 255 / 0.1); }
/* The default ring uses --link, which has little contrast on the header. */
.header-user a:focus-visible, .brand:focus-visible { outline-color: var(--header-text); }

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  color: var(--header-text);
  max-width: 100%;
}
.brand:hover { text-decoration: none; }

.header-image { display: block; max-width: 100%; height: auto; border-radius: 4px; }

.brand-name { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.brand-desc { font-size: 0.95rem; opacity: 0.88; }

.site-nav { border-top: 1px solid rgb(255 255 255 / 0.14); }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.25rem;
  margin: 0 auto;
  padding-top: 0;
  padding-bottom: 0;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 0.6rem 0.8rem;
  color: var(--header-text);
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.site-nav a:hover { text-decoration: none; background: rgb(255 255 255 / 0.1); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.site-nav a:focus-visible { outline-color: var(--header-text); }

/* ---- Category bars and forum rows --------------------------------------- */

.category {
  margin: 0 0 1.5rem;
  background: var(--row);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.18);
}

.category .bar {
  background: var(--bar);
  color: var(--bar-text);
  padding: 0.55rem 1rem;
  min-height: 2.6rem;
  display: flex;
  align-items: center;
}
.category.untitled .bar { min-height: 0.55rem; padding: 0; }
.category .bar h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.01em; }
.category .bar a { color: var(--bar-text); }
.category .bar a:focus-visible { outline-color: var(--bar-text); }

table.forums {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.forums th {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.forums td { padding: 0.9rem 1rem; vertical-align: top; border-top: 1px solid var(--line-soft); }
.forums tbody tr:first-child td { border-top: 0; }
.forums tbody tr:hover td { background: var(--hover); }

.col-forum { width: auto; }
.col-num { width: 6.5rem; text-align: center !important; }
.col-last { width: 22rem; }

.forum-main { position: relative; }
.forum-main::before {
  content: "";
  position: absolute;
  left: 0; top: 0.9rem; bottom: 0.9rem;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.forum-name { font-size: 1.05rem; font-weight: 700; }
.forum-desc { margin-top: 0.15rem; color: var(--muted); font-size: 0.92rem; }
.subforums { margin-top: 0.4rem; font-size: 0.88rem; color: var(--muted); }
.subforums-label { font-weight: 600; }

.tag {
  display: inline-block;
  padding: 0 0.4rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  vertical-align: 0.1em;
}

td.num { text-align: center; padding-top: 0.9rem; }
.forum-count { font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }

td.last { font-size: 0.9rem; min-width: 0; }
.last-title {
  display: block;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.last-meta, .last-time { display: block; color: var(--muted); font-size: 0.85rem; }

td.link-target { overflow-wrap: anywhere; color: var(--muted); }

.empty { padding: 1rem; color: var(--muted); }
.empty.standalone { text-align: center; padding: 3rem 1rem; }

/* ---- Notices (error pages) ---------------------------------------------- */

.notice {
  max-width: 34rem;
  margin: 3rem auto;
  padding: 2rem;
  background: var(--row);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.notice h1 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.notice p + p { margin-top: 0.75rem; }
.notice-status { color: var(--muted); font-weight: 600; letter-spacing: 0.08em; font-size: 0.85rem; }

/* ---- Account controls: nav, sign-in card, scheme picker ----------------- */

.site-nav li { display: flex; align-items: stretch; }
.nav-who {
  align-self: center;
  padding: 0 0.8rem;
  font-size: 0.95rem;
  color: var(--header-text);
}
.site-nav form { display: flex; margin: 0; }
.nav-button {
  appearance: none;
  padding: 0.6rem 0.8rem;
  margin: 0 0 -1px;
  font: 600 0.95rem/1.5 var(--font);
  color: var(--header-text);
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}
.nav-button:hover { background: rgb(255 255 255 / 0.1); }
.nav-button:focus-visible { outline: 3px solid var(--header-text); outline-offset: -3px; }

.auth-card {
  max-width: 26rem;
  margin: 2rem auto;
  padding: 1.75rem;
  background: var(--row);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.18);
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: 1.1rem; }
.auth-card > .hint { margin-top: 0.9rem; color: var(--muted); font-size: 0.875rem; }
.auth-card > p:not(.hint, .notice-inline) { margin-bottom: 1.1rem; }

.form-error {
  margin-bottom: 1.1rem;
  padding: 0.7rem 0.9rem;
  background: color-mix(in srgb, var(--new) 14%, var(--row));
  border: 1px solid var(--new);
  border-left-width: 5px;
  border-radius: 6px;
}
.form-error-text { font-weight: 600; }
.form-error-detail { margin-top: 0.25rem; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; margin-bottom: 0.35rem; font-weight: 600; }
.field input, .field select {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--page);
  border: 1px solid var(--muted);
  border-radius: 6px;
}
.field input:focus-visible, .field select:focus-visible, .field-check input:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 1px;
  border-color: var(--link);
}

.field-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.65rem;
  align-items: start;
  margin-bottom: 1.4rem;
}
.field-check input { width: 1.25rem; height: 1.25rem; margin: 0.15rem 0 0; accent-color: var(--accent); }
.field-check label { font-weight: 600; cursor: pointer; }
.field-check .hint { grid-column: 2; color: var(--muted); font-size: 0.875rem; }

.button {
  display: block;
  width: 100%;
  padding: 0.7rem 1rem;
  font: 600 1rem/1.4 var(--font);
  color: var(--on-accent);
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}
.button:hover { filter: brightness(1.1); }
.button:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

.scheme-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.scheme-label { margin-right: 0.25rem; }
.scheme-picker button {
  padding: 0.3rem 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--muted);
  border-radius: 999px;
  cursor: pointer;
}
.scheme-picker button:hover { background: var(--hover); }
.scheme-picker button[aria-pressed="true"] {
  color: var(--bar-text);
  background: var(--bar);
  border-color: var(--bar);
  font-weight: 600;
}
.scheme-picker button:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

@media (max-width: 699px) {
  .auth-card { margin: 1rem auto; padding: 1.25rem; }
  .scheme-picker button { min-height: 2.5rem; }
}

/* ---- Unread: badges, marks and the mark-read buttons --------------------- */

/* The pill has its own text, so it needs no color to be read. */
.badge-new {
  display: inline-block;
  padding: 0.05rem 0.5rem;
  background: var(--badge);
  color: var(--on-badge);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.45;
  text-transform: uppercase;
  vertical-align: 0.12em;
  white-space: nowrap;
}

/* A member's lists: a name that is read is plain, one that is not is bold with
   a wider bar at the edge of the row. Weight and width carry the meaning, not
   color. */
.tracks .forum-name, .tracks .topic-link { font-weight: 500; }
.tracks .row-new .forum-name, .tracks .row-new .topic-link { font-weight: 800; }
.tracks .row-new .forum-main::before { width: 6px; }
/* A red tint, so that an unread row differs from the blue tint of an announcement. */
.tracks tr.row-new { background: color-mix(in srgb, var(--new) 11%, var(--row)); }
.jump-new { font-weight: 600; text-decoration: underline; text-underline-offset: 0.15em; }

.toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; margin: 0 0 1rem; }
.page-head .toolbar { justify-content: flex-start; margin: 0.75rem 0 0; }
.mark-form { margin: 0; }
.button-quiet {
  appearance: none;
  padding: 0.4rem 0.9rem;
  font: 600 0.9rem/1.4 var(--font);
  color: var(--text);
  background: transparent;
  border: 1px solid var(--muted);
  border-radius: 6px;
  cursor: pointer;
}
.button-quiet:hover { background: var(--hover); }
.button-quiet:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

/* ---- Footer -------------------------------------------------------------- */

.site-footer {
  flex-shrink: 0;
  padding: 1rem 0 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

/* The build line: the render time, the query count, the version and the build. */
.build-line {
  margin: 0.6rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---- Spoilers: hidden until clicked, focused, or opened with Enter ------- */

.spoiler {
  color: transparent;
  background: var(--muted);
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.12s;
}
.spoiler a { color: inherit; }
.spoiler.shown,
html:not(.js) .spoiler:focus {
  color: var(--text);
  background: var(--line);
}
.spoiler.shown a, html:not(.js) .spoiler:focus a { color: var(--link); }

/* ---- Page heads, crumbs, rules ------------------------------------------ */

.crumbs { margin: 0 0 0.75rem; font-size: 0.88rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.15rem 0; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "\203A"; margin: 0 0.5rem; color: var(--muted); }

.page-head { margin: 0 0 1.25rem; }
.page-head h1 { font-size: 1.65rem; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.page-sub { margin-top: 0.25rem; color: var(--muted); font-size: 0.95rem; }

.rules {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--row);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.rules h2 { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.25rem; }
.rules p { white-space: pre-line; }

/* ---- Forum rows that the viewer may list but not open -------------------- */

.icon-lock { vertical-align: -0.12em; }
.forum-name-locked { font-size: 1.05rem; font-weight: 700; color: var(--muted); }
.subforum-locked { color: var(--muted); }
td.members-only { color: var(--muted); font-size: 0.92rem; vertical-align: middle; }

/* ---- Topic lists ---------------------------------------------------------- */

.topics .topic-link { font-size: 1.02rem; font-weight: 700; overflow-wrap: anywhere; }
.topic-meta { margin-top: 0.1rem; color: var(--muted); font-size: 0.85rem; }
.topics .last-title { white-space: normal; font-weight: 500; }
.topics .col-last { width: 15rem; }
.topics .col-num { width: 5.5rem; }
.topic-moved .topic-link { font-weight: 500; }
.topic-moved .forum-main::before { background: var(--muted); }
.topic-sticky .forum-main::before { background: var(--link); }
.topic-announce .forum-main::before, .topic-global .forum-main::before { background: var(--new); }
.topic-announce, .topic-global { background: color-mix(in srgb, var(--accent) 7%, var(--row)); }
.topic-moved td.moved-gap { text-align: left; vertical-align: middle; padding-top: 0.9rem; }

.tag-sticky, .tag-announce { color: var(--text); border-color: var(--accent); }
.tag-announce { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.tag-warn { color: var(--text); border-color: var(--new); }
.tag-moved { border-style: dashed; }

/* ---- Page links ---------------------------------------------------------- */

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin: 0 0 1rem; }
.pager-where { color: var(--muted); font-size: 0.88rem; }
.pager ul { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0; padding: 0; list-style: none; }
.pager a, .pager-gap {
  display: inline-block;
  min-width: 2.2rem;
  padding: 0.3rem 0.65rem;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--row);
  font-size: 0.9rem;
}
.pager-gap { border-color: transparent; background: none; color: var(--muted); min-width: 0; padding-left: 0.2rem; padding-right: 0.2rem; }
.pager a:hover { text-decoration: none; border-color: var(--link); }
.pager a.current { background: var(--bar); border-color: var(--bar); color: var(--bar-text); font-weight: 700; }

/* ---- Polls --------------------------------------------------------------- */

.poll {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--row);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.18);
}
.poll h2 { font-size: 1.15rem; }
.poll-note { margin-top: 0.15rem; color: var(--muted); font-size: 0.88rem; }
.poll-options { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.8rem; }
.poll-label { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.25rem; }
.poll-count { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.poll-total { margin-top: 0.9rem; color: var(--muted); font-size: 0.9rem; }

progress {
  appearance: none;
  display: block;
  width: 100%;
  height: 0.7rem;
  border: 0;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
progress::-webkit-progress-bar { background: var(--line); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 99px; }

/* ---- Posts ---------------------------------------------------------------- */

.posts { display: grid; gap: 1rem; margin: 0 0 1rem; }

.post {
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr);
  background: var(--row);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.18);
  scroll-margin-top: 1rem;
}
.post:target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.post-unapproved, .post-deleted { border-style: dashed; }

.post-author {
  padding: 1.1rem 0.9rem;
  text-align: center;
  background: color-mix(in srgb, var(--text) 4%, var(--row));
  border-right: 1px solid var(--line-soft);
  min-width: 0;
}
.avatar { display: block; width: 96px; height: 96px; margin: 0 auto; border-radius: 10px; object-fit: cover; background: var(--page); }
.avatar-none {
  display: grid;
  place-items: center;
  background: var(--bar);
  color: var(--bar-text);
  font-size: 2.4rem;
  font-weight: 700;
}
.author-name { margin-top: 0.7rem; font-size: 1.02rem; font-weight: 700; overflow-wrap: anywhere; }
.author-rank { margin-top: 0.15rem; color: var(--muted); font-size: 0.85rem; }
.rank-img { display: block; max-height: 1.6rem; width: auto; margin: 0.25rem auto; }
.author-stat { margin-top: 0.1rem; color: var(--muted); font-size: 0.82rem; }
.author-stat b { color: var(--text); font-weight: 600; }
.author-rank:first-of-type { margin-top: 0.15rem; }

.post-main { padding: 0.9rem 1.25rem 1rem; min-width: 0; display: flex; flex-direction: column; }

.post-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.55rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.85rem;
}
.post-title { min-width: 0; }
.post-subject { display: inline; font-size: 1rem; font-weight: 700; }
.permalink { color: var(--muted); margin-left: auto; }

.post-body { overflow-wrap: anywhere; line-height: 1.6; min-width: 0; }
.post-body > :first-child { margin-top: 0; }
.post-body > :last-child { margin-bottom: 0; }
.post-body p { margin: 0 0 0.85em; }
.post-body h3, .post-body h4, .post-body h5, .post-body h6 { margin: 1.1em 0 0.4em; line-height: 1.3; }
.post-body h3 { font-size: 1.25rem; }
.post-body h4 { font-size: 1.12rem; }
.post-body h5 { font-size: 1.02rem; }
.post-body h6 { font-size: 0.95rem; }
.post-body ul, .post-body ol { margin: 0 0 0.85em; padding-left: 1.6rem; }
.post-body li > p { margin-bottom: 0.3em; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.post-body a { text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }

/* A quote: a card with a cite line above the quoted text. */
.post-body blockquote {
  margin: 0.9em 0;
  padding: 0.55rem 0.95rem 0.7rem;
  background: color-mix(in srgb, var(--text) 5%, var(--row));
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 6px 6px 0;
  color: color-mix(in srgb, var(--text) 88%, var(--row));
  font-size: 0.95em;
}
.post-body blockquote::before {
  content: "Quote";
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.post-body blockquote blockquote { font-size: 1em; }

/* Code scrolls in its own box. */
pre.code {
  max-width: 100%;
  margin: 0.9em 0;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: 0.875rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  tab-size: 4;
  white-space: pre;
  overflow-wrap: normal;
}
pre.code code { font: inherit; background: none; padding: 0; }
:not(pre) > code {
  padding: 0.1em 0.35em;
  background: var(--page);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* Images fit the width of the post. */
.post-img { display: block; max-width: 100%; height: auto; margin: 0.6em 0; border-radius: 4px; }
img.smiley { display: inline; width: auto; height: 1.4em; max-width: none; vertical-align: -0.3em; }

/* An image that the viewer may not load shows as a short note. */
.img-note {
  display: inline-block;
  margin: 0.3em 0;
  padding: 0.25rem 0.65rem;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Embeds: video players at 16:9, audio players at their own height. */
iframe.embed {
  display: block;
  width: 100%;
  max-width: 44rem;
  margin: 0.8em 0;
  border: 0;
  border-radius: 6px;
  background: #000;
  aspect-ratio: 16 / 9;
}
iframe.embed.tiktok { max-width: 22rem; aspect-ratio: 9 / 16; }
iframe.embed.spotify { aspect-ratio: auto; height: 152px; max-width: 40rem; background: none; }
iframe.embed.soundcloud { aspect-ratio: auto; height: 166px; max-width: 40rem; background: none; }

/* Embeds that need a script from their provider show a plain link until it runs. */
.post-body blockquote.twitter-tweet,
.post-body blockquote.instagram-media,
.post-body blockquote.text-post-media { font-size: 0.95em; }
.post-body blockquote.twitter-tweet::before,
.post-body blockquote.instagram-media::before,
.post-body blockquote.text-post-media::before { content: "Embedded post"; }
/* The Threads script puts its frame before the fallback, adds this class to the
   fallback and leaves it in place. The Instagram script removes its own. Never
   pick a fallback by the element before it: that can hit a quote that a member
   wrote. */
.post-body blockquote.text-post-media-registered { display: none; }

.attachments { margin-top: 1rem; padding-top: 0.6rem; border-top: 1px solid var(--line-soft); font-size: 0.9rem; }
.attachments h3 { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.3rem; }
.attachments ul { margin: 0; padding-left: 1.2rem; }
.attach-comment { color: var(--muted); font-style: italic; }

.edit-note { margin-top: 1rem; color: var(--muted); font-size: 0.8rem; }
.signature {
  margin-top: 1rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
.signature p { margin: 0; }
.post-ip { margin-top: 0.6rem; color: var(--muted); font-size: 0.8rem; }

/* ---- Phones: the four columns stack -------------------------------------- */

@media (max-width: 699px) {
  main { padding-top: 1rem; }
  .brand-name { font-size: 1.4rem; }

  table.forums, .forums tbody, .forums tr, .forums td { display: block; }
  table.forums { table-layout: auto; }

  /* The column titles stay for screen readers; each cell names itself. */
  .forums thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .forums tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 1rem;
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--line-soft);
  }
  .forums tbody tr:first-child { border-top: 0; }
  .forums td, .forums tbody tr:first-child td { padding: 0; border: 0; }
  .forums td.members-only { margin-top: 0.4rem; grid-column: 1 / -1; }
  .forums tbody tr:hover td { background: none; }

  .forum-main { grid-column: 1 / -1; padding-left: 0.75rem !important; }
  .forum-main::before { top: 0.15rem; bottom: 0.15rem; left: -1rem; }

  td.num, td.last, td.link-target { margin-top: 0.55rem; font-size: 0.9rem; }
  td.num { text-align: left; color: var(--muted); }
  td.num::before { content: attr(data-label) ": "; }
  .forum-count { font-size: 0.95rem; color: var(--text); }
  td.last { grid-column: 1 / -1; }
  .last-title { white-space: normal; }
  td.last::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }
  td.link-target { grid-column: 1 / -1; }

  .notice { margin: 1.5rem auto; padding: 1.25rem; }

  .page-head h1 { font-size: 1.35rem; }
  .button-quiet { min-height: 2.5rem; }
  .poll { padding: 0.85rem 1rem; }
  .poll-label { flex-direction: column; gap: 0; }

  /* The author block becomes a compact row above the post. */
  .post { display: block; }
  .post-author {
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    column-gap: 0.7rem;
    align-items: center;
    padding: 0.6rem 0.85rem;
    text-align: left;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .author-avatar { grid-row: 1 / span 2; }
  .avatar { width: 2.75rem; height: 2.75rem; margin: 0; border-radius: 8px; }
  .avatar-none { font-size: 1.25rem; }
  .author-name { margin: 0; font-size: 0.98rem; }
  .author-rank, .author-stat { display: inline; margin: 0; font-size: 0.8rem; }
  .rank-img { display: inline; margin: 0 0.3rem 0 0; vertical-align: middle; max-height: 1.2rem; }
  .author-rank, .author-stat { margin-right: 0.7rem; }
  .post-author > .author-rank, .post-author > .author-stat { grid-column: 2; }
  .post-main { padding: 0.75rem 0.9rem 0.9rem; }
  .topics .col-last, .topics .col-num { width: auto; }
}

@media (min-width: 700px) and (max-width: 899px) {
  .col-last { width: 15rem; }
  .col-num { width: 5rem; }
}

/* ---- Profiles, the member list, the team and static pages ---------------- */

.avatar-lg { width: 128px; height: 128px; margin: 0; border-radius: 12px; flex: none; }
.avatar-lg.avatar-none { font-size: 3.2rem; }
.avatar-sm { width: 2.75rem; height: 2.75rem; margin: 0; border-radius: 8px; flex: none; }
.avatar-sm.avatar-none { font-size: 1.25rem; }

.profile {
  max-width: 44rem;
  background: var(--row);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.18);
}
.profile-head { display: flex; align-items: center; gap: 1.25rem; padding: 1.5rem 1.5rem 1.25rem; }
.profile-who { min-width: 0; }
.profile-who h1 { font-size: 1.75rem; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.profile-rank { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.3rem; color: var(--muted); }
.profile-rank .rank-img { display: inline; margin: 0; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line-soft);
}
.facts > div { padding: 0.8rem 1.5rem; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.facts > div:nth-child(odd) { border-right: 1px solid var(--line-soft); }
.facts dt { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0.1rem 0 0; font-size: 1.05rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.group-list { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.15rem 0 0; padding: 0; list-style: none; }
.group-list li {
  padding: 0 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
}

.profile-sig { padding: 1rem 1.5rem; border-bottom: 1px solid var(--line-soft); }
.profile-sig h2 { margin-bottom: 0.4rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.profile-actions { padding: 1rem 1.5rem 1.25rem; }
.button-link { display: inline-block; text-decoration: none; }
.button-link:hover { text-decoration: none; }

.member-table { width: 100%; border-collapse: collapse; }
.member-table th {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.member-table th a { color: var(--muted); }
.member-table th[aria-sort] a { color: var(--text); }
.member-table th[aria-sort="ascending"] a::after { content: " \2191"; }
.member-table th[aria-sort="descending"] a::after { content: " \2193"; }
.member-table th:nth-child(2), .member-table td.num { width: 7rem; text-align: center; }
.member-table th:nth-child(3), .member-table td.member-joined { width: 11rem; }
.member-table td { padding: 0.65rem 1rem; vertical-align: middle; border-top: 1px solid var(--line-soft); }
.member-table tbody tr:first-child td { border-top: 0; }
.member-table tbody tr:hover td { background: var(--hover); }
.member-table td.num { padding-top: 0.65rem; }
.member-main, .team-card { display: flex; align-items: center; gap: 0.8rem; min-width: 0; }
.member-name { display: flex; flex-direction: column; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.member-rank { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--muted); font-size: 0.82rem; font-weight: 400; }
.member-rank .rank-img { display: inline; margin: 0; max-height: 1.1rem; }

.team-group { margin: 0 0 1.5rem; }
.team-group h2 { margin-bottom: 0.6rem; font-size: 1.15rem; }
.team-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.team-card {
  padding: 0.75rem 1rem;
  background: var(--row);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.18);
}

/* A static page reads at the width of the text of a post: the post box less its
   author column. */
.static-page {
  max-width: 55.5rem;
  padding: 1.1rem 1.25rem 1.25rem;
  background: var(--row);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.18);
}
.static-page .page-head { padding-bottom: 0.7rem; border-bottom: 1px solid var(--line-soft); }

.notice-action { font-weight: 600; }

.footer-pages ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0 0 0.6rem; padding: 0; list-style: none; }
.footer-pages a { font-weight: 600; }

@media (max-width: 699px) {
  .profile-head { padding: 1.1rem 1rem; gap: 0.9rem; }
  .avatar-lg { width: 5rem; height: 5rem; }
  .avatar-lg.avatar-none { font-size: 2rem; }
  .profile-who h1 { font-size: 1.4rem; }
  .facts > div { padding: 0.7rem 1rem; }
  .profile-sig, .profile-actions { padding-left: 1rem; padding-right: 1rem; }

  /* The rows stack. The column heads stay as one line of sort links. */
  .member-table, .member-table tbody { display: block; }
  .member-table thead { display: block; }
  .member-table thead tr { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; padding: 0.5rem 1rem; border-bottom: 1px solid var(--line); }
  .member-table th { padding: 0; border: 0; width: auto !important; }
  .member-table th a { display: inline-block; padding: 0.35rem 0; }
  .member-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.25rem;
    padding: 0.7rem 1rem;
    border-top: 1px solid var(--line-soft);
  }
  .member-table tbody tr:first-child { border-top: 0; }
  .member-table td, .member-table tbody tr:first-child td { display: block; padding: 0; border: 0; width: auto !important; }
  .member-table tbody tr:hover td { background: none; }
  .member-table tbody tr td.member-main { display: flex; flex: 0 0 100%; }
  .member-table td.num, .member-table td.member-joined { padding: 0; margin-top: 0.4rem; font-size: 0.9rem; color: var(--muted); text-align: left; }
  .member-table td.num::before, .member-table td.member-joined::before { content: attr(data-label) ": "; }
  .member-table .forum-count { font-size: 0.9rem; color: var(--text); }

  .static-page { padding: 0.9rem 1rem 1rem; }
  .team-list { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Search -------------------------------------------------------------- */

/* The box in the nav. The input sits on the header color; the button is a nav
   button. On a narrow screen the item takes a row of its own. */
.site-nav .nav-search { align-items: center; gap: 0.25rem; }
.site-nav .nav-search form { align-items: stretch; }
.nav-search input[type="search"] {
  width: 11rem;
  margin: 0.35rem 0;
  padding: 0.3rem 0.6rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--page);
  border: 1px solid rgb(255 255 255 / 0.4);
  border-radius: 6px 0 0 6px;
}
.nav-search input[type="search"]:focus-visible { outline: 3px solid var(--header-text); outline-offset: 1px; }
.nav-search .nav-button { border: 1px solid rgb(255 255 255 / 0.4); border-left: 0; border-radius: 0 6px 6px 0; margin: 0.35rem 0; padding: 0.3rem 0.8rem; }
.site-nav .nav-search > a { padding-left: 0.6rem; padding-right: 0.6rem; font-weight: 500; font-size: 0.88rem; }

.search-form {
  margin: 0 0 1.25rem;
  padding: 1rem;
  background: var(--row);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.18);
}
.search-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0 1rem;
}
.search-fields .search-q { grid-column: 1 / -1; }
.search-form .field { margin-bottom: 0.85rem; }
.search-form .search-go { width: auto; min-width: 8rem; }

.search-count { margin: 0 0 0.75rem; color: var(--muted); }

.search-hits { margin: 0 0 1rem; padding: 0; list-style: none; }
.search-hit {
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem 0.85rem 1.1rem;
  background: var(--row);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.search-title { font-size: 1.05rem; overflow-wrap: anywhere; }
.search-snippet { margin-top: 0.3rem; overflow-wrap: anywhere; }
.search-meta { margin-top: 0.4rem; color: var(--muted); font-size: 0.85rem; }

/* A matched word. The pair has its own tokens, held to AA in every scheme. */
mark {
  padding: 0 0.15em;
  color: var(--on-mark);
  background: var(--mark);
  border-radius: 3px;
}

@media (max-width: 699px) {
  .site-nav .nav-search { flex: 1 0 100%; }
  .site-nav .nav-search form { flex: 1 1 auto; }
  .nav-search input[type="search"] { flex: 1 1 auto; width: 100%; min-width: 0; padding: 0.55rem 0.7rem; }
  .nav-search .nav-button { padding: 0.55rem 0.9rem; }
  .search-form { padding: 0.85rem; }
  .search-form .search-go { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media print {
  .site-nav, .header-user, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}

/* ---- Posting forms -------------------------------------------------------- */

.field textarea {
  display: block;
  width: 100%;
  min-height: 12rem;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--page);
  border: 1px solid var(--muted);
  border-radius: 6px;
  resize: vertical;
}
.field textarea:focus-visible { outline: 3px solid var(--link); outline-offset: 1px; border-color: var(--link); }
.field [aria-invalid="true"] { border-color: var(--new); border-width: 2px; }
.field .hint { margin-top: 0.35rem; color: var(--muted); font-size: 0.875rem; }
.field-error { margin-top: 0.35rem; font-weight: 600; color: var(--new); }
.post-form { max-width: 52rem; }
.form-actions, .confirm-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.button-inline { display: inline-block; width: auto; }
.toolbar-start { justify-content: flex-start; }
.preview { margin-bottom: 1.5rem; }
.preview h2 { margin-bottom: 0.25rem; font-size: 1.1rem; }
.preview .hint { margin-bottom: 0.75rem; color: var(--muted); font-size: 0.875rem; }
.post-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.85rem; padding-top: 0.6rem; border-top: 1px solid var(--line-soft); }
.notice-inline {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  background: color-mix(in srgb, var(--accent) 12%, var(--row));
  border: 1px solid var(--accent);
  border-radius: 6px;
}
@media (max-width: 40rem) {
  .button-inline, .form-actions .button-quiet, .post-actions .button-quiet { min-height: 2.5rem; }
}

/* ---- Account page --------------------------------------------------------- */

.account-section { max-width: 52rem; margin-bottom: 2rem; }
.account-section h2 { margin-bottom: 0.75rem; font-size: 1.2rem; }
.account-section .field input[type="password"], .account-section .field input[type="email"] { max-width: 26rem; }

/* ---- Settings forms: groups, save status, birthday, avatar --------------- */

fieldset.field { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 0.5rem; font-weight: 600; }
.account-section .field-check { margin-bottom: 0.5rem; }
.account-section .field-check label { font-weight: 400; }
.save-status { min-height: 1.4em; margin-top: 0.25rem; font-weight: 600; color: var(--muted); }
.save-status:empty { min-height: 0; margin: 0; }
.js .save-fallback { display: none; }
.save-auto { display: none; }
.js .save-auto { display: inline; }
.js .save-manual { display: none; }
.avatar-img { width: 96px; height: 96px; border-radius: 4px; object-fit: cover; }
.birthday-row select { width: auto; display: inline-block; margin-right: 0.4rem; }

.birthdays { margin: 1rem 0 0; }

/* ---- Messages: folder tabs and the header lines of one message ------------ */

.msg-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.msg-tabs a[aria-current="page"] { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); font-weight: 600; }
.message-meta { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 1rem; margin: 0 0 1rem; }
.message-meta dt { color: var(--muted); font-weight: 600; }
.message-meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
