/* Shares the paper, ink and type tokens from accounts/auth.css. */
:root { color-scheme: light; }
[hidden] { display: none !important; }
body {
  min-height: 100svh;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 46%, var(--paper-low) 100%);
  color: var(--ink);
  font-family: var(--sans-font);
}
a { color: inherit; text-underline-offset: .25em; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 4.75rem);
}
.topbar .brand { animation: none; flex-shrink: 0; }
nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.5rem); }
nav a, nav .text-button {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-ink);
  transition: color 180ms ease;
}
nav a { text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }
nav form { margin: 0; }
main {
  width: min(100%, 82rem);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) clamp(1.5rem, 4vw, 4.75rem) 5rem;
  min-height: 70vh;
}
h1, h2, .stats strong { font-family: var(--display-font); font-weight: 400; }
h1 {
  font-size: clamp(3.25rem, 6vw, 6rem);
  letter-spacing: -.035em;
  line-height: 1.04;
  margin: .85rem 0 1.4rem;
  overflow-wrap: anywhere;
}
h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.12; margin: 0 0 1.2rem; letter-spacing: -.025em; }
p { line-height: 1.65; overflow-wrap: anywhere; }
.eyebrow {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--muted-ink);
  text-transform: uppercase;
  margin: 2rem 0 .8rem;
}
.lead { font-family: var(--display-font); font-size: clamp(1.15rem, 2vw, 1.45rem); color: var(--muted-ink); max-width: 48rem; margin: 0 0 3.5rem; }
.back { font-size: .82rem; color: var(--muted-ink); }
.card { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 2rem 0; margin: 0 0 1.5rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 2.5rem; }
.grid .card { display: flex; flex-direction: column; align-items: flex-start; }
.grid .card h2 { margin-top: 1.5rem; }
.grid .card h2 a { text-decoration: none; }
.grid .card h2 a:hover { text-decoration: underline; }
.grid .card .button { margin-top: auto; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 3.5rem; }
.stats .card { margin: 0; border: 0; padding: 1.6rem 0; }
.stats .card + .card { border-left: 1px solid var(--line); padding-left: 2rem; }
.stats span { display: block; color: var(--muted-ink); font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.stats strong { display: block; font-size: clamp(1.6rem, 3vw, 2.65rem); margin-top: .8rem; overflow-wrap: anywhere; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--button);
  border-radius: 0;
  padding: .85rem 1.15rem;
  background: var(--button);
  color: var(--paper);
  cursor: pointer;
  font-family: var(--sans-font);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease;
}
button:hover, .button:hover { background: transparent; color: var(--button); text-decoration: none; }
.secondary { background: transparent; border-color: var(--line); color: var(--button); }
.secondary:hover { border-color: var(--button); background: rgba(95, 91, 83, .06); }
.danger { background: transparent; border-color: rgba(154, 81, 72, .4); color: var(--error); }
.danger:hover { background: var(--toast-error-bg); color: var(--error); border-color: var(--error); }
button:disabled { opacity: .5; cursor: not-allowed; }
nav .text-button { min-height: 44px; padding: 0; border: 0; background: transparent; text-decoration: none; }
nav .text-button:hover { color: var(--ink); text-decoration: none; }
.badge { display: inline-block; background: transparent; color: var(--muted-ink); border: 1px solid var(--line); padding: .3rem .6rem; font-family: var(--sans-font); font-size: .65rem; font-weight: 500; letter-spacing: .06em; vertical-align: middle; text-transform: uppercase; }
.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; padding: 1.6rem 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row > div:first-child { min-width: 0; flex: 1; }
.row strong { font-weight: 500; font-size: 1rem; }
.row p { margin: .65rem 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-heading > span, small { color: var(--muted-ink); font-size: .75rem; }
.body-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { color: var(--muted-ink); font-family: var(--display-font); font-size: 1.2rem; padding: 1rem 0; margin: 0; }
.comment { border-left: 1px solid var(--line); padding-left: 1.5rem; margin: 1.5rem 0; }
.danger-zone { margin-top: 1.5rem; }
.danger-zone p { color: var(--muted-ink); max-width: 45rem; }
#load-state:empty { display: none; }
#retry { margin-bottom: 1.5rem; }
#feedback:not(:empty) { padding: 1rem 1.2rem; border-left: 3px solid var(--toast-success); background: var(--toast-success-bg); color: var(--toast-success); margin-bottom: 2rem; font-size: .9rem; line-height: 1.5; }
#feedback.error { border-left-color: var(--toast-error); background: var(--toast-error-bg); color: var(--toast-error); }
#notifications .secondary { margin: 1rem 0 0 1rem; }
footer { margin: 0 clamp(1.5rem, 4vw, 4.75rem); padding: 1.5rem 0 2rem; border-top: 1px solid var(--line); color: var(--muted-ink); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: .3rem; }
@media (max-width: 700px) {
  .topbar { padding: 1.25rem; align-items: flex-start; flex-direction: column; gap: 1.25rem; }
  nav { width: 100%; flex-wrap: wrap; gap: .5rem 1.1rem; }
  nav a, nav .text-button { font-size: .65rem; }
  nav a { padding-block: .8rem; }
  main { padding: 1.5rem 1.25rem 3rem; }
  .lead { margin-bottom: 2.5rem; }
  .stats { margin-bottom: 2.5rem; }
  .stats .card { padding: 1.25rem 0; }
  .stats .card + .card { padding-left: .75rem; }
  .stats span { font-size: .6rem; letter-spacing: .07em; }
  .stats strong { font-size: clamp(1.35rem, 5vw, 2rem); }
  .row { flex-direction: column; gap: 1rem; }
  .section-heading { flex-wrap: wrap; margin-bottom: 1rem; }
  .section-heading h2 { margin-bottom: 0; }
  .card { padding-block: 1.5rem; }
  #notifications .secondary { display: flex; margin-left: 0; }
  footer { margin-inline: 1.25rem; line-height: 1.6; }
}
@media (prefers-reduced-motion: reduce) { button, .button { transition: none; } }


/* Board selection and page navigation stay above the centered workspace. */
.workspace-navigation { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.workspace-navigation-inner { width: min(100%, 82rem); margin: auto; padding-inline: clamp(1.5rem, 4vw, 4.75rem); }
.board-switcher { display: flex; align-items: center; gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.navigation-label { flex-shrink: 0; color: var(--muted-ink); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; }
.board-links { display: flex; flex: 1; min-width: 0; gap: .6rem; overflow-x: auto; padding: .35rem; }
.board-links a { flex-shrink: 0; white-space: nowrap; border: 1px solid transparent; padding: .65rem .85rem; font-size: .72rem; text-transform: none; letter-spacing: .02em; }
.board-links a[aria-current="page"] { background: var(--button); color: var(--paper); text-decoration: none; }
.board-links a:hover { border-color: var(--line); text-decoration: none; }
.all-boards-link { white-space: nowrap; font-size: .72rem; color: var(--muted-ink); }
.module-tabs { display: flex; gap: 2.4rem; overflow-x: auto; padding: 0 .2rem; }
.module-tabs a { flex-shrink: 0; padding: 1.3rem 0; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: 0; }
.module-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); text-decoration: none; }
.module-tabs a:hover { color: var(--ink); text-decoration: none; }
.workspace-navigation + main { padding-top: 2rem; }
.workspace-navigation + main .eyebrow { margin-top: .5rem; }
.workspace-navigation + main h1 { font-size: clamp(2.75rem, 4.5vw, 4.5rem); }
.workspace-navigation + main .lead { margin-bottom: 2rem; }
.workspace-navigation + main .stats { margin-bottom: 2rem; }
.module-panel { min-height: 16rem; }
.module-panel h3 { font-size: 1rem; font-weight: 500; margin-top: 2rem; }
.module-panel.danger-zone { margin-top: 0; }
@media (max-width: 700px) {
  .workspace-navigation-inner { padding-inline: 1.25rem; }
  .board-switcher { gap: .65rem; flex-wrap: wrap; }
  .board-links { width: 100%; flex-basis: 70%; flex-wrap: nowrap; }
  .all-boards-link { margin-left: auto; }
  .module-tabs { width: 100%; flex-wrap: nowrap; gap: 1.4rem; }
  .module-tabs a { padding-block: 1.2rem; font-size: .65rem; }
}

/* Discussion context shared by post and comment moderation. */
.discussion-card { padding: 2rem 0; border-top: 1px solid var(--line); }
.discussion-card:first-child { border-top: 0; }
.discussion-header, .comment-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; }
.discussion-heading { min-width: 0; flex: 1; }
.module-panel .discussion-title { font-family: var(--display-font); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; font-weight: 400; margin: .75rem 0; overflow-wrap: anywhere; }
.discussion-body { margin: .5rem 0 2rem; }
.discussion-thread { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.thread-heading { font-family: var(--sans-font); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-ink); margin: 0 0 1.5rem; }
.thread-comment { padding: 1.25rem 0 1.25rem 1.25rem; border-left: 2px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 1rem; scroll-margin-top: 2rem; }
.thread-comment.depth-1 { margin-left: 1.5rem; }
.thread-comment.depth-2 { margin-left: 3rem; }
.thread-comment.depth-3 { margin-left: 4.5rem; }
.thread-comment.depth-4 { margin-left: 6rem; }
.thread-comment:target, .discussion-title:target { background: var(--paper-low); outline: 1px solid var(--line); outline-offset: .3rem; }
.comment-heading { align-items: center; }
.comment-heading button { flex-shrink: 0; font-size: .62rem; min-height: 36px; padding: .55rem .75rem; }
.reply-context { margin-top: .75rem; color: var(--muted-ink); font-size: .8rem; }
.reply-context small { display: block; margin-top: .5rem; }
.reply-context blockquote { margin: .6rem 0; padding: .5rem .8rem; border-left: 1px solid var(--line); font-family: var(--display-font); font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .discussion-header, .comment-heading { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .thread-comment { padding-left: .65rem; }
  .thread-comment.depth-1 { margin-left: .6rem; }
  .thread-comment.depth-2 { margin-left: 1.2rem; }
  .thread-comment.depth-3 { margin-left: 1.8rem; }
  .thread-comment.depth-4 { margin-left: 2.4rem; }
}

/* Compact moderation workspace: list stays bounded, context opens on demand. */
.management-page .topbar { padding-block: 1.4rem; }
.management-page main { width: min(100%, 94rem); }
.management-page .workspace-navigation-inner { width: min(100%, 94rem); }
.management-page .workspace-navigation + main h1 { font-size: clamp(2rem, 3vw, 3.1rem); margin: .5rem 0; }
.management-page .workspace-navigation + main .lead { margin-bottom: 1.2rem; font-size: 1.1rem; }
.management-page .workspace-navigation + main .stats { margin-bottom: 1.2rem; }
.management-page .stats .card { padding-block: .8rem; }
.management-page .stats strong { display: inline-block; font-size: 1.55rem; margin-top: .35rem; }
.management-page .module-panel { padding-top: 1.2rem; }
.moderation-toolbar { display: flex; align-items: end; gap: .7rem; flex-wrap: wrap; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.moderation-toolbar label { display: flex; flex-direction: column; gap: .4rem; color: var(--muted-ink); font-size: .65rem; letter-spacing: .05em; text-transform: uppercase; }
.moderation-toolbar .search-control { flex: 1; min-width: 15rem; }
.moderation-toolbar input, .moderation-toolbar select, .page-jump input {
  min-height: 42px; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 0;
  padding: .65rem .75rem; font-family: var(--sans-font); font-size: .85rem; max-width: 100%;
}
.moderation-toolbar input[type="number"] { width: 7rem; }
.moderation-toolbar select { cursor: pointer; }
.moderation-toolbar :is(input,select):focus-visible, .page-jump input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
#result-summary { color: var(--muted-ink); font-size: .8rem; margin: .85rem 0; }
.compact-results { max-height: 28rem; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border-bottom: 1px solid var(--line); }
.compact-results[aria-busy="true"] { opacity: .65; }
.compact-row { display: flex; align-items: center; gap: 1.5rem; justify-content: space-between; padding: 1rem .6rem 1rem 0; border-top: 1px solid var(--line); }
.compact-row:first-child { border-top: 0; }
.compact-info { min-width: 0; flex: 1; }
.module-panel .compact-info h3 { font-family: var(--sans-font); font-size: 1rem; font-weight: 600; margin: .45rem 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-preview { font-size: .85rem; margin: .4rem 0; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.compact-row button { flex-shrink: 0; }
.pagination { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .8rem; padding: 1rem 0 .2rem; }
.pagination > span { color: var(--muted-ink); font-size: .8rem; }
.page-jump { display: flex; gap: .4rem; margin: 0; }
.page-jump input { width: 4.5rem; min-height: 40px; }
.discussion-dialog { width: min(60rem, calc(100vw - 2.5rem)); max-height: 88svh; padding: 0; border: 1px solid var(--line); color: var(--ink); background: var(--paper); box-shadow: 0 2rem 6rem rgba(40,35,25,.18); }
.discussion-dialog[open] { display: flex; flex-direction: column; }
.discussion-dialog::backdrop { background: rgba(40,35,25,.4); }
body:has(.discussion-dialog[open]) { overflow: hidden; }
.review-topbar { display: flex; align-items: flex-start; gap: 1rem; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 1.2rem 1.5rem; flex-shrink: 0; }
.review-topbar h2 { font-family: var(--display-font); font-weight: 400; font-size: 1.65rem; line-height: 1.2; margin: .45rem 0 0; overflow-wrap: anywhere; }
.review-topbar > div { min-width: 0; }
.review-topbar button { flex-shrink: 0; }
.review-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 1.5rem; }
.review-body .discussion-card { padding: 1.5rem 0; }
#review-status:empty { display: none; }
#review-status { margin: 0; padding: .8rem 1.5rem; font-size: .85rem; color: var(--muted-ink); }
#review-pages { padding: .85rem 1.5rem; border-top: 1px solid var(--line); flex-shrink: 0; }
#review-pages:empty { display: none; }
.post-body-details { margin: 1rem 0 1.5rem; }
.post-body-details summary { cursor: pointer; font-size: .8rem; color: var(--muted-ink); padding: .5rem 0; }
.selected-comment { background: var(--paper-low); outline: 1px solid var(--line); outline-offset: .2rem; }
.parent-link { background: transparent; color: var(--muted-ink); padding: .3rem 0; border: 0; text-decoration: underline; text-underline-offset: .2rem; min-height: 30px; text-transform: none; font-size: .8rem; font-weight: 400; letter-spacing: 0; justify-content: start; }
.parent-link:hover { color: var(--ink); }
@media(max-width:700px) {
  .moderation-toolbar .search-control { flex-basis: 100%; min-width: 0; }
  .moderation-toolbar label { flex: 1; min-width: 6rem; }
  .moderation-toolbar input[type="number"] { width: 100%; }
  .compact-row { align-items: flex-start; flex-direction: column; gap: .6rem; }
  .compact-info { width: 100%; }
  .compact-row button { padding: .6rem .8rem; min-height: 40px; }
  .compact-results { max-height: 26rem; }
  .pagination { justify-content: flex-start; gap: .5rem; }
  .discussion-dialog { width: calc(100vw - 1rem); max-height: 94svh; }
  .review-topbar, #review-pages { padding: 1rem; }
  .review-body { padding-inline: 1rem; }
}

/* Small, consistent controls for a busy moderation session. */
.skip-link { position: fixed; left: 1rem; top: -5rem; padding: .8rem 1rem; background: var(--paper); border: 1px solid var(--ink); z-index: 20; }
.skip-link:focus { top: 1rem; }
.management-page .workspace-navigation { position: sticky; top: 0; z-index: 5; background: var(--paper); }
.board-heading-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.board-heading-meta .eyebrow { margin: 0 auto 0 0 !important; }
.management-page .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tab-count { font-size: .65rem; letter-spacing: 0; font-variant-numeric: tabular-nums; padding: .15rem .35rem; margin-left: .3rem; background: var(--paper-low); }
.search-input-wrap { position: relative; display: flex; }
.search-input-wrap svg { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; pointer-events: none; }
.moderation-toolbar .search-input-wrap input { width: 100%; padding-left: 2.25rem; }
.selection-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.select-page { display: inline-flex; gap: .5rem; align-items: center; min-height: 44px; cursor: pointer; font-size: .8rem; }
.selection-tools > span { color: var(--muted-ink); font-size: .75rem; margin-right: auto; }
.row-select, .select-page input { width: 1.1rem; height: 1.1rem; flex-shrink: 0; accent-color: var(--ink); cursor: pointer; }
.row-select:focus-visible, .select-page input:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.compact-row:has(.row-select:checked) { background: var(--paper-low); }
.compact-row:has(.row-select) { padding-left: .5rem; }
.compact-row[aria-busy="true"] { opacity: .6; }
.request-row .compact-info h3 { margin-bottom: .2rem; }
.confirmation-dialog { width: min(38rem, calc(100vw - 2rem)); max-height: 88svh; overflow: auto; padding: 1.6rem; border: 1px solid var(--line); background: var(--paper); color: var(--ink); box-shadow: 0 2rem 6rem rgba(40,35,25,.18); }
.confirmation-dialog::backdrop { background: rgba(40,35,25,.4); }
body:has(dialog[open]) { overflow: hidden; }
.confirmation-dialog .eyebrow { margin-top: 0; }
.confirmation-dialog h2 { margin-bottom: .8rem; }
.confirmation-items { max-height: 23rem; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.confirmation-item { padding: .85rem .25rem; border-top: 1px solid var(--line); }
.confirmation-item strong { font-size: .9rem; }
.confirmation-item p { white-space: pre-wrap; font-size: .85rem; margin: .5rem 0; }
.confirmation-item small { display: block; overflow-wrap: anywhere; line-height: 1.5; }
.confirmation-label { display: flex; flex-direction: column; gap: .6rem; margin: 1.2rem 0; color: var(--muted-ink); font-size: .8rem; }
.confirmation-label input { min-height: 44px; border: 1px solid var(--line); padding: .7rem; background: transparent; color: var(--ink); font-family: var(--sans-font); }
.confirmation-label input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.confirmation-actions { display: flex; gap: .7rem; justify-content: flex-end; margin-top: 1.5rem; }
.discussion-link { display: inline-block; padding-block: .7rem; font-size: .8rem; color: var(--muted-ink); }
@media(max-width:700px) {
  .management-page .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .management-page .stats .card:nth-child(3) { border-left: 0; padding-left: 0; }
  .management-page .stats .card:nth-child(n+3) { border-top: 1px solid var(--line); }
  .compact-row:has(.row-select) { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); column-gap: .6rem; }
  .compact-row:has(.row-select) > button { grid-column: 2; justify-self: start; }
  .compact-row:has(.row-select) > input { margin-top: .35rem; }
  .selection-tools > span { flex: 1; min-width: 7rem; }
  .selection-tools > button { flex: 1; padding-inline: .6rem; }
  .confirmation-dialog { width: calc(100vw - 1rem); padding: 1.1rem; }
  .confirmation-actions { flex-wrap: wrap; }
  .module-tabs { gap: 1rem; }
  .module-tabs a { letter-spacing: .05em; }
}

/* Boards page */

.boards-page {
  width: 100%;
}

.boards-heading {
  margin-bottom: 2.8rem;
}

.boards-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.boards-heading-info {
  flex: 1;
  min-width: 0;
}

.boards-heading-info .eyebrow {
  margin-top: 0;
}

.boards-heading-info h1 {
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  line-height: 1.08;
  margin: 0.75rem 0 0.8rem;
}

.boards-heading-info .lead {
  max-width: 42rem;
  margin: 0;
  font-family: var(--sans-font);
  font-size: 0.98rem;
  line-height: 1.75;
}

.boards-page .boards-create-button {
  flex-shrink: 0;
  margin-top: 0.3rem;
}

.boards-list {
  border-top: 1px solid var(--line);
}

.board-card {
  padding: 2rem 0 2.2rem;
  border-bottom: 1px solid var(--line);
}

.board-card:last-child {
  border-bottom: 0;
}

.board-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.board-main-info {
  flex: 1;
  min-width: 0;
}

.board-course {
  margin: 0 0 0.55rem;
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.board-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.boards-page .board-title {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(1.9rem, 3.5vw, 2.65rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.boards-page .board-title a {
  color: var(--ink);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.boards-page .board-title a:hover {
  text-decoration: underline;
}

.boards-page .board-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.7rem;
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  line-height: 1.6;
  text-transform: uppercase;
}

.boards-page .board-meta-separator {
  color: var(--line);
}

.boards-page .board-description-highlight {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  max-width: none;
  margin: 0.65rem 0 0;
  padding: 0 0 1.2rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(95, 91, 83, 0.35);
  border-radius: 0;
}

.boards-page .board-description-highlight::before {
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  margin-top: 0.7rem;
  margin-left: 0.2rem;
  border-radius: 50%;
  background: var(--muted-ink);
  content: "";
}

.boards-page .board-description-highlight p {
  margin: 0;
  color: var(--muted-ink);
  font-family: var(--display-font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.board-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-start;
  flex-shrink: 0;
  margin-top: 1.8rem;
}

.board-actions form {
  margin: 0;
}

.boards-page .board-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.65rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.boards-page .board-button-primary {
  border-color: var(--button);
  background: var(--button);
  color: var(--paper);
}

.boards-page .board-button-primary:hover {
  background: transparent;
  color: var(--button);
  text-decoration: none;
}

.boards-page .board-button-secondary:hover {
  border-color: var(--button);
  background: var(--paper-low);
  color: var(--ink);
}

.boards-page .board-button:disabled {
  background: transparent;
  color: var(--muted-ink);
  opacity: 0.65;
  cursor: not-allowed;
}

.posts-area {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin-top: 1.7rem;
  background: transparent;
}

.boards-page .board-list-post {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.boards-page .board-list-post + .board-list-post {
  margin-top: 3.5rem;
}

.boards-page .board-list-post + .board-list-post::before {
  position: absolute;
  top: -2.05rem;
  left: 50%;
  width: 28%;
  max-width: 20rem;
  height: 1px;
  background: rgba(95, 91, 83, 0.35);
  content: "";
  transform: translateX(-50%);
}

.boards-page .board-list-post-author {
  position: relative;
  z-index: 1;
  margin: 0 0 0.55rem 0.8rem;
  padding: 0;
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.boards-page .board-list-post-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1rem 1.25rem;
  background: rgba(95, 91, 83, 0.055);
  border: 0;
}

.boards-page .board-list-post-title {
  width: 100%;
  margin: 0 0 1.2rem;
  font-family: var(--display-font);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-align: center;
  overflow-wrap: anywhere;
}

.boards-page .board-list-post-title a {
  color: var(--ink);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.boards-page .board-list-post-title a:hover {
  text-decoration: underline;
}

.boards-page .board-list-post-body {
  display: -webkit-box;
  width: 100%;
  overflow: hidden;
  margin: 0 0 1.3rem;
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.95rem;
  line-height: 1.75;
  text-align: left;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.boards-page .board-list-post-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: auto;
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.85rem;
  line-height: 1.6;
}

.boards-page .board-list-post-footer a {
  color: inherit;
  text-decoration: none;
}

.boards-page .board-list-post-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.board-list-empty {
  padding: 1.4rem 0;
  text-align: center;
}

.board-list-empty .board-list-empty-title {
  margin: 0;
  color: var(--muted-ink);
  font-family: var(--display-font);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.5;
}

.board-list-empty p:last-child {
  margin: 0.25rem 0 0;
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.82rem;
  line-height: 1.7;
}

.boards-empty {
  padding: 3rem 0;
  text-align: center;
}

.boards-empty h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
}

.boards-empty p {
  margin: 0 0 1.4rem;
  color: var(--muted-ink);
  font-size: 0.9rem;
}

.boards-empty .board-button {
  display: inline-flex;
}

.board-messages {
  margin-bottom: 1.5rem;
}

.board-message {
  box-sizing: border-box;
  width: 100%;
  border: 0;
  border-left: 3px solid var(--toast-success);
  border-radius: 0;
  padding: 1rem 1.2rem;
  background: var(--toast-success-bg);
  color: var(--toast-success);
  box-shadow: none;
  font-family: var(--sans-font);
  font-size: 0.9rem;
  line-height: 1.5;
}

.board-message.success {
  border-left-color: var(--toast-success);
  background: var(--toast-success-bg);
  color: var(--toast-success);
}

.board-message.error {
  border-left-color: var(--toast-error);
  background: var(--toast-error-bg);
  color: var(--toast-error);
}

@media (max-width: 700px) {
  .boards-heading {
    margin-bottom: 2rem;
  }

  .boards-heading-row {
    align-items: flex-start;
    gap: 0.8rem;
  }

  .boards-heading-info h1 {
    font-size: clamp(2rem, 7.5vw, 3.2rem);
  }

  .boards-heading-info .lead {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  .boards-page .boards-create-button {
    margin-top: 2.2rem;
    padding: 0.6rem 0.7rem;
    font-size: 0.6rem;
  }

  .board-card {
    padding: 1.5rem 0 1.7rem;
  }

  .board-card-header {
    flex-direction: column;
    gap: 0.8rem;
  }

  .boards-page .board-title {
    font-size: clamp(1.8rem, 7vw, 2.3rem);
  }

  .boards-page .board-card-meta {
    margin-top: 0.6rem;
    font-size: 0.64rem;
  }

  .boards-page .board-description-highlight {
    max-width: 100%;
    margin-top: 0.55rem;
    padding-bottom: 1rem;
  }

  .boards-page .board-description-highlight p {
    font-size: 0.7rem;
    line-height: 1.5;
  }

  .board-actions {
    width: 100%;
    margin-top: 0.45rem;
  }

  .board-actions form {
    width: 100%;
  }

  .boards-page .board-button {
    max-width: 100%;
  }

  .board-actions form .board-button {
    width: 100%;
  }

  .posts-area {
    margin-top: 1.2rem;
    padding: 0;
  }

  .boards-page .board-list-post + .board-list-post {
    margin-top: 2.8rem;
  }

  .boards-page .board-list-post + .board-list-post::before {
    top: -1.65rem;
    width: 35%;
  }

  .boards-page .board-list-post-author {
    margin: 0 0 0.45rem 0.45rem;
    font-size: 0.82rem;
  }

  .boards-page .board-list-post-panel {
    padding: 0.85rem 0.85rem 0.8rem;
  }

  .boards-page .board-list-post-title {
    margin-bottom: 1rem;
    font-size: 1.4rem;
  }

  .boards-page .board-list-post-body {
    margin-bottom: 1.1rem;
    font-size: 0.88rem;
    line-height: 1.7;
  }

  .boards-page .board-list-post-footer {
    font-size: 0.82rem;
  }

  .boards-empty {
    padding: 2.5rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .boards-page .board-button {
    transition: none;
  }
}

/* Boards grouped by type */

.boards-type-section {
  margin: 2.5rem 0 3rem;
  min-width: 0;
}

.boards-type-heading {
  margin: 0 0 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.boards-type-heading h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.boards-type-heading p {
  margin: 0.45rem 0 0;
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.85rem;
  line-height: 1.6;
}

.boards-type-scroll {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 1.2rem;
  scrollbar-width: thin;
  scrollbar-color: var(--muted-ink) var(--paper-low);
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.boards-type-scroll::-webkit-scrollbar {
  height: 8px;
}

.boards-type-scroll::-webkit-scrollbar-track {
  background: var(--paper-low);
}

.boards-type-scroll::-webkit-scrollbar-thumb {
  background: var(--muted-ink);
}

.boards-type-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--ink);
}

.boards-type-track {
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  width: max-content;
  min-width: 100%;
}

.boards-type-track > .board-card {
  display: flex;
  flex: 0 0 340px;
  flex-direction: column;
  width: 340px;
  min-width: 0;
  padding: 1.4rem;
  border: 1px solid var(--line);
}

.boards-type-track > .board-card:last-child {
  border-bottom: 1px solid var(--line);
}

.boards-type-track > .board-card .board-card-header {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 1rem;
}

.boards-type-track > .board-card .board-main-info {
  width: 100%;
}

.boards-type-track > .board-card .board-title {
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
}

.boards-type-track > .board-card .board-actions {
  margin-top: 0;
}

.boards-type-track > .board-card .board-actions form {
  max-width: 100%;
}

.boards-type-track > .board-card .board-button {
  max-width: 100%;
}

.boards-type-track > .board-card .posts-area {
  margin-top: 1.3rem;
}

.boards-type-track > .board-card .board-list-post + .board-list-post {
  margin-top: 2.5rem;
}

.boards-type-track > .board-card .board-list-post + .board-list-post::before {
  top: -1.4rem;
  width: 40%;
}

.boards-type-track > .board-card .board-list-post-title {
  font-size: 1.4rem;
}

.boards-type-track > .board-card .board-list-post-panel {
  padding: 0.9rem;
}

.boards-type-track > .board-card .board-list-post-body {
  font-size: 0.88rem;
}

.boards-type-track > .board-card .board-list-post-footer {
  margin-top: auto;
}

.boards-type-empty {
  padding: 1.5rem 0;
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.9rem;
  line-height: 1.7;
}

.boards-type-track .board-list-empty {
  width: 100%;
  min-width: 250px;
}

@media (max-width: 700px) {
  .boards-type-section {
    margin: 2rem 0 2.5rem;
  }

  .boards-type-scroll {
    padding-bottom: 1rem;
  }

  .boards-type-track {
    gap: 1rem;
  }

  .boards-type-track > .board-card {
    flex-basis: min(82vw, 340px);
    width: min(82vw, 340px);
    padding: 1rem;
  }

  .boards-type-track > .board-card .board-title {
    font-size: 1.6rem;
  }
}

/* Board detail soft panel layout */
.board-description-highlight {
  display: table;
  max-width: 100%;
  margin: -0.25rem 0 0.35rem;
  padding: 0.05rem 0.45rem;
  background: rgba(95, 91, 83, 0.045);
}

.board-description-highlight .lead {
  margin: 0;
  color: var(--muted-ink);
  font-family: var(--display-font);
  font-size: clamp(0.8rem, 2vw, 1.3rem);
  line-height: 1.45;
}

.board-detail-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.board-detail-heading h1 {
    margin: 0;
    ransform: translateY(-25px);
}

.board-detail-heading .board-actions {
    margin-left: auto;
    flex-shrink: 0;
    transform: translateY(-16px);
}

.board-detail-heading .board-actions form {
    margin: 0;
}


.board-rules-inline {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 1.2rem 0.45rem;
  padding: 0;
  background: transparent;
  color: var(--muted-ink);
  font-family: var(--display-font);
  font-size: 0.95rem;
  line-height: 1.5;
}

.board-rules-label {
  font: inherit;
  color: inherit;
  letter-spacing: 0;
}

.board-rules-separator {
  color: var(--line);
}

.board-rules-text {
  color: var(--muted-ink);
  font: inherit;
  text-align: center;
}

.create-post-divider {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0 0 0rem;
}

.create-post-divider > span {
  flex: 1;
  min-width: 0;
  height: 1px;
  background: var(--line);
}

.create-post-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.9rem 1.5rem;
  color: var(--muted-ink);
  background: transparent;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 180ms ease, color 180ms ease;
}

.create-post-link:hover {
  background: var(--paper-low);
  color: var(--ink);
  text-decoration: none;
}

.create-post-link span {
  font-size: 0.9rem;
}

.board-detail-posts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.4rem;
}

.board-detail-post {
  padding: 0;
  margin: 0;
  border: 0;
}

.board-post-author {
  position: relative;
  z-index: 1;
  margin: -0.15rem 0 0.2rem 0.8rem;
  padding: 0;
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.72rem;
  line-height: 1.5;
  letter-spacing: 0.025em;
}

.board-post-panel {
  padding: 0.45rem 0.75rem 0.4rem;
  background: rgba(95, 91, 83, 0.045);
  border: 0;
  transition: background-color 180ms ease;
}

.board-detail-post:hover .board-post-panel {
  background: rgba(95, 91, 83, 0.065);
}

.board-detail-post .board-post-title {
  margin: 0 0 0.5rem;
  font-family: var(--display-font);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.025em;
  text-align: center;
}

.board-post-title a {
  color: var(--ink);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.board-post-title a:hover {
  text-decoration: underline;
}

.board-detail-post .board-post-body {
  margin: 0;
  padding: 0.15rem 0.25rem;
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.95rem;
  line-height: 1.7;
}

.board-post-comment {
  margin: 0.8rem 0 0;
  padding: 0.6rem 0.65rem;
  background: rgba(255, 255, 255, 0.22);
  border-left: 2px solid var(--line);
}

.board-post-comment small {
  font-size: 0.7rem;
  color: var(--muted-ink);
}

.board-post-comment p {
  margin: 0.35rem 0 0;
  padding: 0.1rem 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

.board-discussion-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1rem 0 0 0.25rem;
  padding: 0.2rem 0;
  color: var(--muted-ink);
  font-size: 0.76rem;
  line-height: 1.5;
  text-decoration: none;
  transition: color 180ms ease;
}

.board-discussion-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.board-detail-empty {
  padding: 3rem 1.5rem;
  border: 1px solid var(--line);
  background: rgba(95, 91, 83, 0.035);
  text-align: center;
}

.board-detail-empty h2 {
  margin: 0 0 0.7rem;
  font-size: 1.8rem;
}

.board-detail-empty p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .board-description-highlight {
    padding: 0.05rem 0.35rem;
  }

  .board-description-highlight .lead {
    line-height: 1.4;
  }

  .board-rules-inline {
    gap: 0.3rem;
    margin: 0 0 1rem 0.35rem;
    font-size: 0.85rem;
  }

  .create-post-divider {
    gap: 0.6rem;
    margin-bottom: -1rem;
  }

  .create-post-link {
    padding: 0.8rem 0.6rem;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
  }

  .board-detail-posts {
    gap: 1.1rem;
  }

  .board-post-author {
    margin: -0.1rem 0 0.2rem 0.45rem;
  }

  .board-post-panel {
    padding: 0.35rem 0.4rem 0.3rem;
  }

  .board-detail-post .board-post-title {
    font-size: 1.35rem;
    margin-bottom: 0.4rem;
  }

  .board-detail-post .board-post-body {
    padding-inline: 0.15rem;
  }

  .board-post-comment {
    padding: 0.5rem;
  }

  .board-discussion-link {
    margin: 0.9rem 0 0 0.15rem;
  }
}

/* Post detail page discussion styles */
#discussion-heading {
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.65;
  margin-bottom: 0.5rem;
}

section.card[aria-labelledby="discussion-heading"] > .empty {
  font-size: 0.95rem;
  line-height: 1.65;
  padding: 0;
  margin: 0;
}
.post-detail-soft {
  width: 100%;
}

.post-detail-soft .post-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.5rem;
  color: var(--muted-ink);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 180ms ease;
}

.post-detail-soft .post-back-link:hover {
  color: var(--ink);
}

.post-detail-soft .post-back-link span:first-child {
  font-size: 1.1rem;
}

.post-detail-soft .post-detail-header {
  margin-bottom: 1.3rem;
}

.post-detail-soft .post-detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
  color: var(--muted-ink);
  font-size: 0.76rem;
}

.post-detail-soft .post-meta-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  background: rgba(95, 91, 83, 0.075);
  border-radius: 3px;
}

.post-detail-soft .post-meta-dot {
  color: var(--line);
}

.post-detail-soft .post-detail-title {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.post-detail-soft .post-body-panel {
  margin: 0 0 2rem;
  padding: 0.6rem 1rem;
  background: rgba(95, 91, 83, 0.045);
  border: 0;
  border-radius: 0;
}

.post-detail-soft .post-detail-body {
  margin: 0;
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.98rem;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-detail-soft .post-discussion-section {
  margin-top: 0;
}

.post-detail-soft .post-discussion-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.post-detail-soft .post-section-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted-ink);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
}

.post-detail-soft #discussion-heading {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(1.45rem, 2.5vw, 1.8rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.post-detail-soft .post-comment-count {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  background: rgba(95, 91, 83, 0.065);
  border-radius: 3px;
  color: var(--muted-ink);
  font-size: 0.75rem;
}

.post-detail-soft .post-comments-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
}

.post-detail-soft .post-comment-card {
  min-width: 0;
  margin: 0;
  padding: 1rem 1.1rem 0.9rem;
  background: rgba(95, 91, 83, 0.035);
  border: 0;
  border-radius: 0;
  transition: background-color 180ms ease;
}

.post-detail-soft .post-comment-card:hover {
  background: rgba(95, 91, 83, 0.06);
}

.post-detail-soft .post-comment-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.post-detail-soft .post-comment-avatar {
  display: inline-flex;
  flex: 0 0 2rem;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: rgba(95, 91, 83, 0.1);
  border-radius: 50%;
  color: var(--muted-ink);
  font-family: var(--display-font);
  font-size: 1rem;
}

.post-detail-soft .post-comment-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 0;
}

.post-detail-soft .post-comment-author {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
}

.post-detail-soft .post-comment-number {
  color: var(--muted-ink);
  font-size: 0.72rem;
}

.post-detail-soft .post-comment-index {
  margin-left: auto;
  color: var(--muted-ink);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}

.post-detail-soft .post-comment-body {
  margin: 0.9rem 0 0;
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.93rem;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-detail-soft .post-comment-footer {
  margin-top: 0.8rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(95, 91, 83, 0.09);
  color: var(--muted-ink);
  font-size: 0.7rem;
}

.post-detail-soft .post-comments-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 1.4rem 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  text-align: center;
}

.post-detail-soft .post-comments-empty h3 {
  margin: 0;
  color: var(--muted-ink);
  font-family: var(--display-font);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.5;
}

.post-detail-soft .post-comments-empty p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 0.82rem;
  line-height: 1.5;
}

.post-detail-soft .pagination {
  margin-top: 1.3rem;
}

@media (max-width: 700px) {
  .post-detail-soft .post-back-link {
    margin-bottom: 1.2rem;
  }

  .post-detail-soft .post-detail-title {
    font-size: clamp(2rem, 9vw, 3rem);
  }

   .post-detail-soft .post-body-panel {
     margin-bottom: 0.85rem;
     padding: 0.45rem 0.425rem;
   }

  .post-detail-soft .post-detail-body {
    font-size: 0.92rem;
    line-height: 1.75;
  }

  .post-detail-soft .post-discussion-header {
    align-items: center;
    margin-bottom: 0.9rem;
  }

  .post-detail-soft .post-comment-card {
    padding: 0.85rem 0.8rem;
  }

  .post-detail-soft .post-comment-index {
    font-size: 0.58rem;
  }

  .post-detail-soft .post-comments-empty {
    padding: 1.2rem 0;
  }
}

/*creat post*/
.create-post-page {
  width: 100%;
}

.create-post-page .create-post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 2.4rem;
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.create-post-page .create-post-back:hover {
  color: var(--ink);
}

.create-post-page .create-post-header {
  margin-bottom: 2.5rem;
}

.create-post-page .create-post-eyebrow {
  font-family: var(--sans-font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted-ink);
  text-transform: uppercase;
  margin: 0 0 0.8rem;
}

.create-post-page .create-post-header h1 {
  margin: 0 0 0.75rem;
  font-family: var(--display-font);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.create-post-page .create-post-intro {
  margin: 0;
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.95rem;
  line-height: 1.7;
}

.create-post-page .create-post-form {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  width: 100%;
}

.create-post-page .create-post-field {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}

.create-post-page .create-post-field > label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  width: 100%;
  margin-bottom: 0.35rem;
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 1rem;
  font-weight: 400;
  text-align: center;
}

.create-post-page .create-post-field > label::before,
.create-post-page .create-post-field > label::after {
  content: "";
  flex: 1;
  min-width: 0;
  height: 1px;
  background: var(--line);
}

.create-post-page .create-post-field input[type="text"],
.create-post-page .create-post-field textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 1rem 1.1rem;
  border: none;
  border-radius: 0;
  outline: none;
  background: rgba(95, 91, 83, 0.045);
  color: var(--ink);
  font-family: var(--sans-font);
  font-size: 0.95rem;
  line-height: 1.7;
  transition: background 0.2s ease, outline-color 0.2s ease;
}

.create-post-page .create-post-field input[type="text"] {
  min-height: 3.2rem;
}

.create-post-page .create-post-field textarea {
  min-height: 15rem;
  resize: vertical;
}

.create-post-page .create-post-field input[type="text"]::placeholder,
.create-post-page .create-post-field textarea::placeholder {
  color: var(--muted-ink);
  opacity: 0.7;
}

.create-post-page .create-post-field input[type="text"]:focus,
.create-post-page .create-post-field textarea:focus {
  outline: 1px solid var(--line);
  outline-offset: 2px;
  background: rgba(95, 91, 83, 0.07);
}

.create-post-page .create-post-field > small {
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.78rem;
  line-height: 1.6;
}

.create-post-page .create-post-options {
  padding: 1.15rem 0;
  background: rgba(95, 91, 83, 0.045);
}

.create-post-page .create-post-anonymous {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.15rem 1rem;
  cursor: pointer;
}

.create-post-anonymous-notice {
    margin: 12px 0 20px;
    font-size: 12px;
    line-height: 1.5;
    color: #777;
}

.create-post-page .create-post-anonymous input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.create-post-page .create-post-checkbox {
  display: flex;
  flex: 0 0 1.1rem;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid var(--line);
  background: transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.create-post-page .create-post-checkbox::after {
  content: "";
  width: 0.3rem;
  height: 0.55rem;
  border: solid var(--ink);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}

.create-post-page .create-post-anonymous input:checked
  + .create-post-checkbox {
  background: rgba(95, 91, 83, 0.12);
}

.create-post-page .create-post-anonymous input:checked
  + .create-post-checkbox::after {
  transform: rotate(45deg) scale(1);
}

.create-post-page .create-post-anonymous input:focus-visible
  + .create-post-checkbox {
  outline: 2px solid var(--muted-ink);
  outline-offset: 3px;
}

.create-post-page .create-post-anonymous-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.create-post-page .create-post-anonymous-text strong {
  color: var(--ink);
  font-family: var(--sans-font);
  font-size: 0.9rem;
  font-weight: 500;
}

.create-post-page .create-post-anonymous-text small {
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.8rem;
  line-height: 1.6;
}

.create-post-page .create-post-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.2rem;
  padding-top: 0.4rem;
}

.create-post-page .create-post-cancel {
  color: var(--muted-ink);
  font-family: var(--sans-font);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.create-post-page .create-post-cancel:hover {
  color: var(--ink);
}

.create-post-page .create-post-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.8rem 1.25rem;
  border: none;
  border-radius: 0;
  background: rgba(95, 91, 83, 0.1);
  color: var(--ink);
  font-family: var(--sans-font);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.create-post-page .create-post-submit:hover {
  background: rgba(95, 91, 83, 0.17);
}

@media (max-width: 600px) {
  .create-post-page .create-post-back {
    margin-bottom: 1.8rem;
  }

  .create-post-page .create-post-header {
    margin-bottom: 2rem;
  }

  .create-post-page .create-post-form {
    gap: 1.5rem;
  }

  .create-post-page .create-post-field textarea {
    min-height: 12rem;
  }

  .create-post-page .create-post-options {
    padding: 1rem 0;
  }

  .create-post-page .create-post-anonymous {
    padding: 0.15rem 0.8rem;
  }

  .create-post-page .create-post-actions {
    gap: 1rem;
  }
}
.create-post-page .create-post-intro {
  font-family: var(--sans-font);
}

.create-post-page .create-post-field > label {
  font-family: var(--display-font);
}

.create-post-page .create-post-options {
  padding: 1.15rem 0;
  background: transparent;
}

.create-post-page .create-post-anonymous-text strong,
.create-post-page .create-post-anonymous-text small {
  font-family: var(--sans-font);
}

.boards-page .site-rules-panel {
  margin: 0 0 2.5rem;
  border-top: 1px solid var(--line, #d5d1c8);
  border-bottom: 1px solid var(--line, #d5d1c8);
}

.boards-page .site-rules-panel summary {
  padding: 1.25rem 0;
  cursor: pointer;
  color: var(--ink, #403d37);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.boards-page .site-rules-panel summary:focus-visible {
  outline: 2px solid var(--ink, #403d37);
  outline-offset: 4px;
}

.boards-page .site-rules-panel-content {
  padding: 0 0 1.5rem;
}

.boards-page .site-rules-intro {
  color: var(--muted, #817d75);
  line-height: 1.6;
}

.boards-page .site-rules-list {
  padding-left: 1.5rem;
}

.boards-page .site-rules-list li {
  margin-top: 1.25rem;
}

.boards-page .site-rules-list h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.boards-page .site-rules-list p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
/* Voting and comment composer (FR 2.1.4, FR 2.1.5). */
.vote-widget { display: inline-flex; align-items: center; gap: .25rem; margin-bottom: .6rem; }
/* Thumb icons: outlined when not selected, solid black once the viewer has voted. */
.vote-widget .vote-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); letter-spacing: 0; text-transform: none; cursor: pointer; }
.vote-widget .vote-button:hover { background: rgba(95, 91, 83, .08); color: #111; }
.vote-widget .vote-button.active { color: #111; }
.vote-widget .vote-button:disabled { opacity: .5; cursor: default; }
.vote-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: fill 120ms ease; }
.vote-button.active .vote-icon { fill: currentColor; }
.vote-score { min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; font-size: .9rem; }

/* FR 2.1.4 tree view: replies sit under their parent, indented one step per level. */
.post-detail-soft .post-comment-card.is-reply { border-left: 2px solid rgba(95, 91, 83, .18); }
.post-detail-soft .post-comment-card[data-depth="1"] { margin-left: 1.5rem; }
.post-detail-soft .post-comment-card[data-depth="2"] { margin-left: 3rem; }
.post-detail-soft .post-comment-card[data-depth="3"] { margin-left: 4.5rem; }
.post-detail-soft .post-comment-card[data-depth="4"] { margin-left: 6rem; }
@media (max-width: 700px) {
  .post-detail-soft .post-comment-card[data-depth="1"] { margin-left: .75rem; }
  .post-detail-soft .post-comment-card[data-depth="2"] { margin-left: 1.5rem; }
  .post-detail-soft .post-comment-card[data-depth="3"] { margin-left: 2.25rem; }
  .post-detail-soft .post-comment-card[data-depth="4"] { margin-left: 3rem; }
}

/* Comment composer: compact send button at the bottom right, keyboard hint on the left. */
#react-comment-form .comment-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; margin-top: .6rem; }
#react-comment-form .comment-form-hint { margin-right: auto; color: var(--muted-ink); font-size: .72rem; }
#react-comment-form .comment-submit-button { min-height: 34px; padding: .45rem .9rem; font-size: .66rem; }
.sort-tabs { display: flex; gap: 1rem; margin: .8rem 0; font-size: .85rem; }
.sort-tabs a { color: var(--muted-ink); }
.sort-tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: underline; }
.comment-form { display: flex; flex-direction: column; gap: .6rem; padding: 1rem 0; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.comment-form label { font-size: .8rem; color: var(--muted-ink); }
.comment-form textarea { min-height: 5rem; padding: .7rem; border: 1px solid var(--line); background: transparent; color: var(--ink); font-family: var(--sans-font); resize: vertical; }
.comment-form textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.comment-form button[type="submit"] { align-self: flex-start; }
.reply-context { font-size: .8rem; color: var(--muted-ink); }
.comment-actions { display: flex; align-items: center; gap: 1rem; margin-top: .4rem; }

/* Search results stay in document flow and are keyboard accessible. */
.post-search { margin: 1.5rem 0; max-width: 52rem; }
.post-search label { display: block; margin-bottom: .6rem; font-weight: 600; }
.post-search-controls { display: flex; gap: .6rem; }
.post-search-controls input { flex: 1; min-width: 0; padding: .75rem; border: 1px solid var(--line); background: transparent; color: inherit; font: inherit; }
.post-search-status { margin: .5rem 0; }
.post-search-results { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); max-height: 32rem; overflow-y: auto; }
.post-search-results li { padding: 1rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.post-search-results li:last-child { border-bottom: 0; }
.post-search-results a { display: block; font-weight: 600; }
.post-search-results p { margin: .5rem 0; }
.post-search-results a:focus-visible, .post-search-controls input:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.boards-page .board-membership-status {
  display: inline-block;
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 600;
}
