/* The community pages (kt8.com/community). Colours, type, top bar and footer come from /assets/site.css. */
.page { max-width: 880px; margin: 0 auto; padding: 0 16px 72px; }
.c-head { padding: 56px 0 24px; }
.c-head h1 { font-weight: 650; font-size: clamp(2.1rem, 1.6rem + 2.2vw, 3rem); letter-spacing: -0.04em; line-height: 1.05; margin: 12px 0 10px; text-wrap: balance; }
.c-head p { color: var(--ink-soft); margin: 0; max-width: 40em; }
.c-head .c-cta { margin-top: 20px; }
.c-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 18px; }
.c-bar .grow { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: 500 0.875rem/1 var(--f-sans); padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--sheet); color: var(--ink-soft); cursor: pointer; text-decoration: none;
}
.chip:hover { color: var(--ink); border-color: var(--ink-faint); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.blurb { color: var(--ink-soft); font-size: 0.9375rem; margin: 0 0 14px; min-height: 1.5em; }
select.sort { font: 500 0.875rem var(--f-sans); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--sheet); color: var(--ink); }

/* Topic list */
.topics { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sheet); overflow: hidden; }
.topics li { border-top: 1px solid var(--line); }
.topics li:first-child { border-top: 0; }
.topic-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; text-decoration: none; color: inherit; }
.topic-row:hover { background: var(--bg-2); }
.topic-row.hidden-item { opacity: .5; }
.t-title { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.t-meta { color: var(--ink-faint); font-size: 0.8125rem; margin-top: 3px; }
.t-count { color: var(--ink-faint); font-size: 0.8125rem; text-align: right; white-space: nowrap; }
.t-count b { display: block; color: var(--ink); font-size: 1rem; }
.icon-dot { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-2); color: var(--ink-soft); }
.icon-dot svg { display: block; }
.votes-box { width: 48px; text-align: center; border: 1px solid var(--line-2); border-radius: 10px; padding: 5px 0 4px; font-size: 0.6875rem; color: var(--ink-faint); line-height: 1.2; }
.votes-box b { display: block; font-size: 1rem; color: var(--ink); }
.votes-box.on { border-color: var(--post); background: var(--post-soft); }
.votes-box.on b { color: var(--post); }
.pill { display: inline-block; font: 600 0.6875rem/1 var(--f-sans); letter-spacing: .02em; padding: 4px 8px; border-radius: 999px; background: var(--bg-2); color: var(--ink-soft); vertical-align: 2px; margin-left: 6px; }
.pill.planned { background: #eef3fd; color: #2556b8; }
.pill.started { background: #fdf3e2; color: #9a5b00; }
.pill.done { background: var(--pass-soft); color: var(--pass); }
.pill.team { background: var(--post-soft); color: var(--post); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.planned { background: #15223a; color: #8fb2f2; } :root:not([data-theme="light"]) .pill.started { background: #2b2111; color: #e8b25a; } }
.empty { padding: 36px 18px; text-align: center; color: var(--ink-soft); }
.more { display: flex; justify-content: center; margin-top: 16px; }
@media (max-width: 560px) {
  .topic-row { padding: 12px 14px; gap: 12px; }
  .t-count { display: none; }
}

/* A topic */
.crumb { font-size: 0.875rem; color: var(--ink-soft); padding-top: 40px; }
.crumb a { color: var(--ink-soft); }
.topic-h { display: flex; gap: 16px; align-items: flex-start; margin: 14px 0 22px; }
.topic-h h1 { font-weight: 650; font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.25rem); letter-spacing: -0.03em; line-height: 1.15; margin: 0; overflow-wrap: anywhere; text-wrap: balance; }
.vote-btn { flex: none; width: 64px; padding: 8px 0 6px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--sheet); color: var(--ink-soft); cursor: pointer; font: 500 0.75rem/1.2 var(--f-sans); }
.vote-btn b { display: block; font-size: 1.25rem; color: var(--ink); }
.vote-btn svg { display: block; margin: 0 auto 2px; }
.vote-btn[aria-pressed="true"] { border-color: var(--post); background: var(--post-soft); color: var(--post); }
.vote-btn[aria-pressed="true"] b { color: var(--post); }
.notice { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; color: var(--ink-soft); font-size: 0.9375rem; margin: 0 0 16px; }
.post { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 12px; scroll-margin-top: 80px; }
.post.hidden-item { opacity: .55; border-style: dashed; }
.post.first { border-left: 3px solid var(--post); }
.post-h { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--ink-faint); margin-bottom: 6px; flex-wrap: wrap; }
.avatar { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; font: 600 0.8125rem/1 var(--f-sans); color: #fff; flex: none; }
.post-h .who { color: var(--ink); font-weight: 600; }
.post-body { overflow-wrap: anywhere; }
.post-body p { margin: 0 0 .8em; }
.post-body p:last-child, .post-body ul:last-child { margin-bottom: 0; }
.post-body ul { margin: 0 0 .8em; padding-left: 1.3em; }
.post-body a { color: var(--post); }
.post-tools { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; }
.link-btn { background: none; border: 0; padding: 4px 0; font: 500 0.8125rem var(--f-sans); color: var(--ink-faint); cursor: pointer; }
.link-btn:hover { color: var(--ink); }
.team-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); margin: 0 0 16px; font-size: 0.8125rem; color: var(--ink-soft); }
.team-tools select, .team-tools button { font: 500 0.8125rem var(--f-sans); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--sheet); color: var(--ink); cursor: pointer; }

/* Forms */
.compose { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-top: 20px; }
.compose h2 { font-size: 1.05rem; margin: 0 0 10px; }
label.f { display: block; font-weight: 600; font-size: 0.875rem; margin: 12px 0 6px; }
label.f:first-child { margin-top: 0; }
.in, textarea.in, select.in {
  width: 100%; font: 400 1rem/1.5 var(--f-sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 10px 12px;
}
textarea.in { min-height: 140px; resize: vertical; }
.in:focus { outline: 2px solid var(--post); outline-offset: 1px; border-color: transparent; }
.hint { color: var(--ink-faint); font-size: 0.8125rem; margin: 6px 0 0; }
.err { color: var(--post); font-size: 0.875rem; margin: 10px 0 0; min-height: 0; }
.err:empty { display: none; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Dialogs (sign in, new topic, your account) */
dialog.sheet { border: 1px solid var(--line); border-radius: 18px; padding: 24px; width: min(520px, calc(100vw - 32px)); background: var(--sheet); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.sheet.wide { width: min(680px, calc(100vw - 32px)); }
dialog.sheet::backdrop { background: rgba(10, 12, 16, .45); }
dialog.sheet h2 { margin: 0 0 6px; font-size: 1.3rem; letter-spacing: -0.02em; }
dialog.sheet p.lead { color: var(--ink-soft); margin: 0 0 14px; font-size: 0.9375rem; }
.x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--sheet); color: var(--ink-soft); cursor: pointer; font-size: 1.1rem; line-height: 1; }
.code-in { font: 600 1.5rem/1 var(--f-mono); letter-spacing: .35em; text-align: center; }

/* Account button in the top bar */
.acct { font: 500 0.875rem var(--f-sans); background: none; border: 1px solid var(--line-2); border-radius: 999px; height: 38px; padding: 0 14px; color: var(--ink); cursor: pointer; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 960px) { .top .acct { order: 2; margin-left: auto; } .top .acct + .btn { margin-left: 8px; } }
@media (max-width: 420px) { .top .acct + .btn { display: none; } }
.rules { font-size: 0.875rem; color: var(--ink-soft); margin-top: 40px; border-top: 1px solid var(--line); padding-top: 18px; }
.rules h2 { font-size: 0.9375rem; color: var(--ink); margin: 0 0 6px; }
.rules ul { margin: 0; padding-left: 1.2em; }
[hidden] { display: none !important; }
