/* The members' Q&A forum (cream and indigo by default). Built from brass.css (tokens, .phead,
   .btn, .ghost, .more); this sheet only adds the forum's own parts. Reading
   rules from docs/research/forum-design.md: one column, a measure that fits
   Korean (about 40 characters), line height well above 1.5. */

/* the crisis line: same place on every forum screen, straight under the head, one quiet line */
.fcrisis { border-bottom: 1px solid var(--line); }
.fcrisis p { padding: 6px 0; font-size: 14px; color: var(--muted); }
/* a tighter head on forum pages only (it is the head right before the crisis line) */
.phead:has(+ .fcrisis) { padding: 48px 0 28px; }
.phead:has(+ .fcrisis) .ctas { margin-top: 22px; align-items: center; }
/* My posts sits beside the Ask button on the list, not on a row of its own */
.phead .ctas .crumbs-end { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 12px; font-size: 15px; color: var(--muted); }
.phead .ctas .crumbs-end:hover { color: var(--ink); }
.fcrisis-num { display: inline-block; min-width: 44px; padding-block: 8px; margin-block: -8px; text-align: center; font-weight: 700; font-size: 17px; color: var(--acc-2); text-decoration: underline; text-underline-offset: 3px; }
.fcrisis-num:hover { color: var(--ink); }

.forum { padding: 28px 0 112px; }
.fq-list, .fempty, .fpager, .fback { max-width: 820px; }
.phead .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.phead--q h1 { max-width: 28ch; font-size: 40px; line-height: 1.25; }
.phead .fq-meta { margin-top: 18px; }
/* breadcrumb links get a 44px-tall hit area without moving the layout */
.phead .crumbs a { display: inline-block; padding-block: 11px; margin-block: -11px; }

/* the list: rows, not cards. The whole row is the link. */
.fq-list { list-style: none; margin: 0; padding: 0; }
.fq { position: relative; padding: 24px 0 22px; border-bottom: 1px solid var(--line); }
.fq:first-child { border-top: 1px solid var(--line); }
.fq h2 { font-size: 20px; line-height: 1.4; font-weight: 600; letter-spacing: -.01em; }
.fq h2 a::after { content: ""; position: absolute; inset: 0; }
.fq h2 a { padding-block: 12px; margin-block: -12px; transition: color .2s; }
.fq:hover h2 a { color: var(--acc-2); }
.fq-snip { margin-top: 6px; max-width: 40em; font-size: 16px; line-height: 1.7; color: var(--muted); }
.fq-meta { margin-top: 10px; font-size: 14px; color: var(--muted); }
.fpager { display: flex; gap: 12px; margin-top: 32px; }

.fempty { padding: 56px 0; }
.fempty h2 { font-size: 28px; }
.fempty p { margin: 12px 0 24px; max-width: 40em; color: var(--muted); }

/* a question's own words */
.fbody { max-width: 38em; font: 400 19px/1.75 var(--sans); color: var(--ink); }
.fbody p + p { margin-top: 1em; }
.fback { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }

/* the ask form */
.fform { max-width: 40em; }
.ffield + .ffield { margin-top: 28px; }
.ffield label { display: block; font-size: 16px; font-weight: 600; }
.fhelp { margin-top: 4px; font-size: 14px; color: var(--muted); }
.ffield input, .ffield textarea { display: block; width: 100%; margin-top: 10px; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); color: var(--ink); font: 400 17px/1.7 var(--sans); }
.ffield input { min-height: 52px; }
/* placeholder text must pass 4.5:1 too (the browser's grey does not on this field) */
.ffield ::placeholder, .fsearch ::placeholder { color: var(--muted); opacity: 1; }
/* the box you write in uses the same face and size as the post you will read (.fbody) */
.ffield textarea { min-height: 200px; resize: vertical; font: 400 19px/1.75 var(--sans); }
/* a clear ring on every field: the same 2px outline the links and buttons get (brass.css) */
.ffield input:focus, .ffield textarea:focus { outline: 2px solid var(--acc); outline-offset: 2px; border-color: var(--acc); }
.has-err input, .has-err textarea { border-color: var(--warm, #E8A08A); }
.ferr, .ferr-sum { margin-top: 8px; font-size: 15px; font-weight: 600; color: var(--warm-ink, #F0B5A2); }
.ferr-sum { margin: 0 0 28px; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--warm, #E8A08A) 12%, transparent); }
.fform-go { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

@media (max-width: 860px) {
  .phead:has(+ .fcrisis) { padding: 28px 0 20px; }
  .phead:has(+ .fcrisis) .ctas { margin-top: 18px; }
  .forum { padding: 24px 0 88px; }
  .phead--q h1 { font-size: 32px; }
  .fq h2 { font-size: 18px; }
  .fbody, .ffield textarea { font-size: 18px; }
  .fform-go .btn, .fform-go .ghost { flex: 1 1 100%; }
}

/* Members write in either language on a page whose language is one of them, so
   :lang(ko) alone would miss Korean posts on the English page. keep-all only
   changes how Korean wraps; Latin text is unaffected. */
.fq h2, .fq h3, .fq-snip, .fbody, .phead--q h1, .ffield input, .ffield textarea { word-break: keep-all; overflow-wrap: anywhere; }

/* answers */
/* brass.css gives every <section> 112px of padding; these are not page sections */
.fanswers { margin-top: 56px; padding: 0; }
.fanswers h2, .fform--answer h2 { font-size: 24px; }
.fanswer { max-width: 820px; padding: 28px 0 24px; border-bottom: 1px solid var(--line); }
.fanswer-body { max-width: 38em; font: 400 19px/1.75 var(--sans); color: var(--ink); word-break: keep-all; overflow-wrap: anywhere; }
.fanswer-body p + p { margin-top: 1em; }
.fanswer-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 14px; }
.fanswer-actions form { margin: 0; }
.fact { min-height: 44px; padding: 8px 18px; border: 0; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font: 600 15px/1.2 var(--sans); cursor: pointer; transition: box-shadow .25s, background .25s; }
.fact:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--ink); }
.fact[aria-pressed="true"] { background: var(--acc-1); box-shadow: inset 0 0 0 1px var(--acc); color: var(--ink); cursor: default; }
.fnone { margin-top: 16px; max-width: 40em; color: var(--muted); }

/* the best answer: its own box, first, with a jump link from the page head */
.fbest { max-width: 820px; margin-top: 20px; padding: 8px 28px 4px; border-radius: 16px; background: var(--acc-1); box-shadow: inset 0 0 0 1px var(--acc); }
.fbest h3 { margin-top: 20px; font-size: 16px; }
.fbest .fanswer { border-bottom: 0; padding-top: 14px; }
.fbadge { display: inline-block; padding: 3px 10px; border-radius: 6px; background: var(--acc); color: var(--on-acc); font-size: 13px; font-weight: 700; line-height: 1.6; vertical-align: middle; }
.fbadge--staff { background: transparent; box-shadow: inset 0 0 0 1px var(--acc); color: var(--ink); margin-left: 4px; }
.fq-solved { color: var(--acc-2); font-weight: 600; }
.fanswers > .fanswer:last-child { border-bottom: 0; }
.fform--answer { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--line); }
.fform--answer h2 { margin-bottom: 20px; }
.fform--answer textarea { min-height: 140px; }

/* list sort: plain text links */
.fsort { display: flex; flex-wrap: wrap; gap: 0 22px; max-width: 820px; margin-bottom: 8px; }
.fsort a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.fsort a:hover { color: var(--ink); }
.fsort a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--acc); }
@media (max-width: 860px) { .fbest { padding: 4px 18px 0; } .fanswer-body { font-size: 18px; } }

/* "already asked" hint under the title, and the list search */
.fsim:not(:empty) { margin-top: 12px; padding: 16px 20px; border-radius: 12px; background: var(--acc-1); box-shadow: inset 0 0 0 1px var(--line-2); }
.fsim + .ffield { margin-top: 28px; }
.fsim-h { font-size: 15px; font-weight: 600; }
.fsim-list { list-style: none; margin: 8px 0 0; padding: 0; }
.fsim-list li { padding: 2px 0; }
.fsim-list a { display: inline-block; padding-block: 11px; margin-block: -6px; font-size: 16px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.fsim-list a:hover { text-decoration-color: currentColor; }
.fsearch { display: flex; gap: 10px; max-width: 820px; margin-bottom: 16px; }
.fsearch input[type="search"] { flex: 1; min-width: 0; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--card); color: var(--ink); font: 400 16px/1.4 var(--sans); }
.fsearch input[type="search"]:focus { outline: 2px solid var(--acc); outline-offset: 2px; border-color: var(--acc); }

/* episode and topic links */
.fabout { max-width: 820px; margin: 28px 0 0; display: grid; gap: 10px; }
.fepisode { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.fepisode a { display: inline-block; padding-block: 13px; margin-block: -13px; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.fepisode a:hover { color: var(--ink); text-decoration-color: currentColor; }
.ftopics { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; }
.ftopics a { position: relative; display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 500; color: var(--muted); }
.ftopics a::after { content: ""; position: absolute; inset: -6px -2px; }  /* a 44px hit area on a 32px tag */
.ftopics a:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
/* "Show all" lines on the list keep the older pill */
.fchip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 15px; font-weight: 600; color: var(--ink); }
.fchip:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.fchip[aria-current="true"] { background: var(--acc); color: var(--on-acc); box-shadow: none; }
.fabout:has(.fchip) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fcheck { margin: 0; padding: 0; border: 0; min-width: 0; }
.fcheck legend { padding: 0; font-size: 16px; font-weight: 600; }
.fcheck div[id] { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 10px; }
.fcheck label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 15px; font-weight: 600; cursor: pointer; }
.fcheck label:has(input:checked) { background: var(--acc-1); box-shadow: inset 0 0 0 1px var(--acc); }
.fcheck input { width: 18px; height: 18px; margin: 0; accent-color: var(--acc); }
.ffield select { display: block; width: 100%; min-height: 52px; margin-top: 10px; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); color: var(--ink); font: 400 17px/1.4 var(--sans); }
.ffield select:focus { outline: 2px solid var(--acc); outline-offset: 2px; border-color: var(--acc); }

/* the section on the public watch page */
.fq-episode { padding: 72px 0 24px; }
.fq-episode h2 { font-size: 28px; }
.fq-episode .fq-list { margin-top: 16px; }
.fq-list--compact .fq { padding: 18px 0 16px; }
.fq-list--compact h3 { font-size: 18px; font-weight: 600; }
.fback--episode { margin-top: 20px; padding-top: 0; border-top: 0; }

/* report and hidden posts */
.fact--quiet { box-shadow: none; color: var(--muted); font-weight: 500; padding: 8px 12px; }
.fact--quiet:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.fact--done { display: inline-flex; align-items: center; box-shadow: none; color: var(--muted); font-weight: 500; padding: 8px 12px; }
.fhidden { max-width: 820px; margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--warm, #E8A08A) 12%, transparent); font-size: 15px; }
.fbadge--hidden { background: transparent; box-shadow: inset 0 0 0 1px var(--warm-ink, #F0B5A2); color: var(--warm-ink, #F0B5A2); }
.is-hidden { opacity: .8; }

/* care message after a crisis word */
.fcare { max-width: 820px; margin: 0 0 40px; padding: 28px 28px 24px; border-radius: 16px; background: var(--acc-1); box-shadow: inset 0 0 0 1px var(--acc); }
.fcare h2 { font-size: 24px; }
.fcare p { margin-top: 10px; max-width: 40em; }
.fcare-lines { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.fcare-lines span { font-size: 15px; color: var(--muted); max-width: 32em; }

/* a repeat question points to the older one */
.fdupe { max-width: 820px; margin: 0 0 40px; padding: 24px 28px; border-radius: 16px; background: var(--acc-1); box-shadow: inset 0 0 0 1px var(--acc); }
.fdupe h2 { font-size: 22px; }
.fdupe p { margin-top: 8px; max-width: 40em; }
.fdupe-answer { margin: 16px 0; padding: 0; max-width: 40em; font: 400 18px/1.75 var(--sans); word-break: keep-all; overflow-wrap: anywhere; }
.fdupe-answer footer { margin-top: 8px; font-family: var(--sans); }

/* links that look like the small action buttons */
a.fact { display: inline-flex; align-items: center; text-decoration: none; }

/* The "More" menu: rare actions (Report, Edit, Delete) sit behind one quiet word. Native <details>, no script. */
.fmore { display: inline-block; }
.fmore summary { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--muted); cursor: pointer; list-style: none; }
.fmore summary::-webkit-details-marker { display: none; }
.fmore summary:hover, .fmore[open] summary { color: var(--ink); }
.fmore summary:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.fmore-list { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; padding-bottom: 4px; }
.fmore-list form { margin: 0; }

/* the one extra link on forum pages: My posts, small, on the right */
.fsub { margin: 0 0 4px; text-align: right; }
.fsub a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; font-size: 15px; color: var(--muted); }
.fsub a:hover, .fsub a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* My posts: plain rows with a state badge and the member's own actions. */
.fmine { max-width: 820px; margin-bottom: 56px; padding: 0; }
.fmine h2 { font-size: 24px; margin-bottom: 8px; }
.fq--mine { display: block; }
.fq--mine .fanswer-actions { gap: 8px 28px; margin-top: 6px; position: relative; }  /* Edit and Delete well apart */
.fq--mine .fbadge { margin-left: 8px; }
.fq--mine h3 { margin-top: 6px; font-size: 20px; line-height: 1.4; font-weight: 600; letter-spacing: -.01em; }
.fq--mine h3 a { transition: color .2s; }
.fq--mine h3 a:hover { color: var(--acc-2); }
.fkind { margin: 0; }
.fkind-label { font-weight: 700; color: var(--ink); letter-spacing: .02em; }
/* posts waiting for a person: one soft block at the top of My posts */
.fwait { max-width: 820px; margin-bottom: 40px; padding: 8px 28px 12px; border-radius: 16px; background: var(--acc-1); box-shadow: inset 0 0 0 1px var(--line-2); }
.fwait h2 { margin-top: 20px; font-size: 22px; }
.fwait-note { margin-top: 4px; font-size: 15px; color: var(--muted); }
.fwait .fq:first-child { border-top: 0; }
.fwait .fq:last-child { border-bottom: 0; }
.fnone { padding: 24px 0; color: var(--muted); }
.phead .ctas .ghost { margin-left: 4px; }

/* Leaving: a quiet link on My posts, and the confirm page's plain list. */
.fleave { margin-top: 40px; }
.fleave-list { max-width: 40em; margin: 0 0 32px; padding-left: 1.2em; font-size: 18px; line-height: 1.7; }
.fleave-list li + li { margin-top: 12px; }
.fleave-list .more, .fleave .more { white-space: normal; }


/* The Ask form: the rest sits behind one closed "Add context". */
.fcontext { max-width: 820px; margin-top: 8px; border-top: 1px solid var(--line); }
.fcontext summary { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 4px; font-size: 16px; font-weight: 600; color: var(--muted); cursor: pointer; list-style: none; }
.fcontext summary::-webkit-details-marker { display: none; }
.fcontext summary::before { content: "+"; display: inline-block; width: 1.2em; font-weight: 400; }
.fcontext[open] summary::before { content: "–"; }
.fcontext summary:hover, .fcontext[open] summary { color: var(--ink); }
.fcontext summary:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.fcontext-body { padding: 4px 0 8px; }
.fposted { max-width: 820px; margin-top: 20px; font-size: 15px; color: var(--muted); }


/* head: the pen name, time and the question's More menu share one line; My posts sits at the end of the crumb row */
.fq-meta--row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
.fq-meta--row .fmore summary { min-height: 44px; padding-block: 0; margin-block: -8px; }  /* a 44px tap target that does not grow the line */
.phead .crumbs { align-items: center; }
.phead .crumbs .crumbs-end { margin-left: auto; color: var(--muted); }
.phead .crumbs a.crumbs-end:hover { color: var(--ink); }

.fbadge--new { margin-left: 8px; }
.fquiet { margin: 48px 0 0; font-size: 15px; }
.fquiet a { display: inline-block; padding-block: 14px; margin-block: -14px; color: var(--muted); }  /* a 44px tap target */
.fquiet a:hover { color: var(--ink); }
