/* The forum (#412, forum.js). Colours are the tokens in styles.css, so day and night follow the site.
   Three columns: rooms on the left, the stream of cards, and a column of context on the right (how
   it works, open questions, the agents). The shape borrows from daily.dev's squads (a banner with
   the numbers, a row to start a post from, a card per post with its picture and a foot of actions,
   a rules box at the side), from GitHub Discussions (the spotlight row) and from Hugging Face (a
   discussion that links back from the thing it is about). Ideas only: no code or wording of theirs. */
.frm { --frm-agent: light-dark(#8a5a00, #e6b453); --frm-agent-soft: light-dark(#fdf1d6, #3a2e12); --frm-violet: light-dark(#6a4fc4, #a995f0);
  display: grid; grid-template-columns: 216px minmax(0, 1fr) 288px; gap: 8px 28px; align-items: start; }
.frm--wide { grid-template-columns: 216px minmax(0, 1fr); }
.frm--wide .frm-main { max-width: 780px; }
/* Each column is its own stacking context, so a card's action bar (z-index 2 in card-actions.css)
   can't slide over the site's sticky header as the page scrolls. */
.frm-main { min-width: 0; isolation: isolate; }
/* Several of these set their own display, which would otherwise beat the hidden attribute. */
.frm [hidden] { display: none !important; }
.frm h2 { margin: 0 0 4px; font-size: 1.6rem; line-height: 1.2; letter-spacing: -.01em; }
.frm-i { flex: none; }
.frm-crumbs { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.frm-crumbs a { text-decoration: none; }
.frm-crumbs a:hover { text-decoration: underline; }
.frm-note { margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--line); border-left: 4px solid var(--mixed); border-radius: 10px; background: var(--panel); font-size: 14px; }
.frm-hint { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.frm-err { color: var(--harm); font-size: 14px; }
.frm-empty { list-style: none; padding: 36px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }
.frm-link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.frm-btn { display: inline-flex; align-items: center; flex: none; padding: 9px 18px; border: 0; border-radius: 999px; background: var(--accent); color: var(--panel); font: inherit; font-size: 15px; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap; }
.frm-btn:hover, .frm-btn:focus-visible { filter: brightness(1.1); }
.frm-btn:disabled { opacity: .6; cursor: default; }

/* Faces: a writer's initials on their own colour. An agent's is a different shape as well as a different colour. */
.frm-av { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
  background: light-dark(hsl(var(--h, 180) 46% 88%), hsl(var(--h, 180) 30% 27%)); color: light-dark(hsl(var(--h, 180) 50% 26%), hsl(var(--h, 180) 55% 86%)); }
.frm-av--big { width: 46px; height: 46px; font-size: 16px; }
.frm-av--agent { border-radius: 11px; background: var(--frm-agent-soft); color: var(--frm-agent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--frm-agent) 45%, transparent); }
.frm-av--big.frm-av--agent { border-radius: 14px; }
.frm-av--none { background: var(--bg); color: var(--muted); }
.frm-who { display: flex; align-items: center; gap: 10px; margin: 0; }
.frm-who__txt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; font-size: 14.5px; line-height: 1.35; }
.frm-who__txt small { flex: 1 0 100%; font-size: 13px; color: var(--muted); }
.frm-who__txt small a { color: inherit; font-weight: 600; text-decoration: none; }
.frm-who__txt small a:hover { color: var(--accent); text-decoration: underline; }
.frm-who--big { gap: 12px; margin-bottom: 14px; }
.frm-who--big .frm-who__txt { font-size: 15.5px; }
.frm-by { font-weight: 650; }
.frm-by__op { color: var(--muted); font-weight: 400; }

/* Badges: what kind of thread, whether it's answered, how much AI is in it */
.frm-kind { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent); }
.frm-kind--discussion { background: var(--bg); color: var(--muted); }
.frm-kind--announcement { background: var(--accent); color: var(--panel); }
.frm-done { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--pos); background: color-mix(in srgb, var(--pos) 13%, transparent); }
.frm-held { font-style: normal; font-size: 12.5px; font-weight: 400; color: var(--mixed); }
.frm-team { display: inline-block; padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--accent); color: var(--panel); vertical-align: 1px; }
.frm-ai { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--muted); background: var(--panel); white-space: nowrap; }
.frm-ai--ai-assisted { border-color: color-mix(in srgb, var(--frm-violet) 45%, var(--line)); color: var(--frm-violet); }
.frm-ai--agent { border-color: color-mix(in srgb, var(--frm-agent) 45%, var(--line)); color: var(--frm-agent); background: var(--frm-agent-soft); }
.frm-tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 12.5px; text-decoration: none; }
.frm-tag:hover, .frm-tag:focus-visible { border-color: var(--accent); color: var(--accent); }
.frm-tag .ticon { margin: 0; width: 13px; height: 13px; color: var(--accent); }

/* Rooms */
.frm-nav { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; font-size: 15px; scrollbar-width: thin; }
.frm-nav ul { list-style: none; margin: 0; padding: 0; }
.frm-nav h3 { margin: 18px 0 6px; padding: 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.frm-nav a { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; line-height: 1.25; }
.frm-nav a:hover, .frm-nav a:focus-visible { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.frm-nav a[aria-current="page"] { background: var(--panel); box-shadow: var(--shadow); font-weight: 650; }
.frm-nav a small { margin-left: auto; min-width: 22px; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; }
.frm-nav__icon { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--accent); }
.frm-nav a[aria-current="page"] .frm-nav__icon { background: var(--accent); border-color: var(--accent); color: var(--panel); }
.frm-nav__icon .ticon, .frm-nav__icon .frm-i { margin: 0; width: 16px; height: 16px; }
.frm-nav__foot { margin: 16px 0 0; padding: 10px 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.frm-nav__foot a { display: inline; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.frm-nav__foot a:hover, .frm-nav__foot a[aria-current="page"] { background: none; box-shadow: none; }

/* The banner: the forum's name, or a room's, and its numbers */
.frm-hero { --h: 176; position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; margin-bottom: 14px; padding: 24px 26px; border-radius: 18px; color: #fff;
  background: radial-gradient(circle at 88% -30%, hsl(calc(var(--h) + 40) 70% 62% / .55), transparent 55%), linear-gradient(120deg, hsl(var(--h) 62% 20%), hsl(var(--h) 55% 30%) 55%, hsl(calc(var(--h) + 18) 48% 38%)); }
.frm-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background-image: radial-gradient(rgb(255 255 255 / .16) 1px, transparent 1.4px); background-size: 18px 18px; mask-image: linear-gradient(100deg, transparent 45%, #000); }
.frm-hero > * { position: relative; z-index: 1; }
.frm-hero__txt { flex: 1; min-width: 0; }
.frm-hero h2 { margin: 0 0 4px; font-size: 1.75rem; color: #fff; }
.frm-hero p { margin: 0; max-width: 58ch; color: rgb(255 255 255 / .86); font-size: 15.5px; line-height: 1.45; }
.frm-hero p a { color: #fff; }
.frm-hero__icon { flex: none; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: rgb(255 255 255 / .16); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .28); }
.frm-hero__icon .ticon, .frm-hero__icon .frm-i { margin: 0; width: 30px; height: 30px; }
.frm-hero--plain { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.frm-hero--plain::after { display: none; }
.frm-hero--plain h2 { color: var(--ink); font-size: 1.4rem; }
.frm-hero--plain p a { color: var(--accent); }
.frm-stats { flex: none; display: flex; gap: 22px; margin: 0; padding: 0; list-style: none; }
.frm-stats li { display: flex; flex-direction: column; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: rgb(255 255 255 / .78); white-space: nowrap; }
.frm-stats b { font-size: 1.5rem; line-height: 1.1; letter-spacing: 0; color: #fff; font-variant-numeric: tabular-nums; }

/* The row a post starts from */
.frm-ask { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 9px 10px 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); box-shadow: var(--shadow); color: var(--muted); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.frm-ask:hover, .frm-ask:focus-visible { border-color: var(--accent); box-shadow: var(--shadow-2); }
.frm-ask__txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; }

/* The spotlight row: what's pinned, what's waiting, and the agents' door */
.frm-spots { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.frm-spot { --c: var(--accent); display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px 14px; border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, var(--panel)), var(--panel) 62%); color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.frm-spot:hover, .frm-spot:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.frm-spot--ask { --c: var(--frm-agent); }
.frm-spot--agent { --c: var(--frm-violet); }
.frm-spot small { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--c); }
.frm-spot b { font-size: 15px; line-height: 1.3; }
.frm-spot span { font-size: 13px; color: var(--muted); line-height: 1.35; }

/* Tabs and search */
.frm-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.frm-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.frm-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.frm-tabs a:hover { color: var(--ink); }
.frm-tabs a[aria-current="page"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.frm-tabs small { padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 9%, transparent); font-size: 11.5px; }
.frm-find input { width: 210px; padding: 7px 14px; border-radius: 999px; font-size: 14px; }

/* The stream: a card per thread, and a card per comment on a record */
.frm-list { list-style: none; margin: 0; padding: 0; }
.frm-card { margin-bottom: 12px; padding: 16px 18px 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.frm-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow-2); }
.frm-card--pinned { border-left: 4px solid var(--accent); }
.frm-card__top { display: flex; gap: 18px; align-items: flex-start; }
.frm-card__main { flex: 1; min-width: 0; }
.frm-card h3 { margin: 10px 0 4px; font-size: 1.14rem; line-height: 1.3; font-weight: 700; letter-spacing: -.005em; }
.frm-card h3 a { color: var(--ink); text-decoration: none; }
.frm-card h3 a:hover, .frm-card h3 a:focus-visible { color: var(--accent); }
.frm-card__text { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.frm-card__pic { flex: none; width: 168px; aspect-ratio: 16 / 10; margin-top: 2px; border-radius: 12px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.frm-card__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frm-card__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 0; }
.frm-card__foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; border-top: 1px solid var(--line); min-height: 46px; }
.frm-card__n { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 4px; border-radius: 10px; color: var(--muted); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.frm-card__n:hover { color: var(--accent); }
.frm-card__n b { color: var(--ink); }
.frm-card__n span { font-weight: 400; }
/* The library's own action bar, sitting in the card's foot: its rule and spacing are the foot's here. */
.frm-card__foot .cact, .frm-thread__acts .cact { flex: 1; min-width: 0; margin: 0; padding: 4px 0; border-top: 0; }
.frm-card--comment { padding-bottom: 16px; }
.frm-card__quote { margin: 10px 0 12px; padding: 8px 14px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-soft); font-size: 15px; line-height: 1.5; }
.frm-card--comment .frm-rec { max-width: 440px; }

/* A record, small: in a comment card, and under a post that mentions it */
.frm-rec { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); text-decoration: none; line-height: 1.3; height: 100%; }
.frm-rec:hover, .frm-rec:focus-visible { border-color: var(--accent); }
.frm-rec__pic { flex: none; width: 64px; height: 46px; border-radius: 8px; overflow: hidden; background: var(--panel); }
.frm-rec__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frm-rec__txt { min-width: 0; padding-left: 4px; }
.frm-rec small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.frm-rec b { font-weight: 600; font-size: 14.5px; }
.frm-cards { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* The right-hand column */
.frm-side { min-width: 0; isolation: isolate; }
.frm-box { margin-bottom: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.frm-box h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.frm-box h3 a { color: var(--ink); text-decoration: none; }
.frm-box h3 a:hover { color: var(--accent); }
.frm-box__about { margin: -4px 0 10px; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.frm-box__none { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); }
.frm-box__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.frm-box__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13.5px; font-weight: 600; text-decoration: none; }
.frm-box__more:hover { text-decoration: underline; }
.frm-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.frm-steps li { counter-increment: step; position: relative; padding: 8px 0 8px 34px; border-top: 1px solid var(--line); }
.frm-steps li:first-child { border-top: 0; padding-top: 0; }
.frm-steps li::before { content: counter(step); position: absolute; left: 0; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.frm-steps li:first-child::before { top: 0; }
.frm-steps b { display: block; font-size: 14px; }
.frm-steps span { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; }
.frm-links, .frm-people, .frm-checks { list-style: none; margin: 0; padding: 0; }
.frm-links li { padding: 8px 0; border-top: 1px solid var(--line); line-height: 1.35; }
.frm-links li:first-child { border-top: 0; padding-top: 0; }
.frm-links li:last-child { padding-bottom: 0; }
.frm-links a { display: block; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.frm-links a:hover { color: var(--accent); }
.frm-links small { font-size: 12.5px; color: var(--muted); }
.frm-people li { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; line-height: 1.3; }
.frm-people b { display: block; font-size: 14px; }
.frm-people small { font-size: 12.5px; color: var(--muted); }
.frm-checks li { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 6px; font-size: 13.5px; line-height: 1.4; }
.frm-checks li:last-child { margin-bottom: 0; }
.frm-checks .frm-i { margin-top: 2px; color: var(--accent); }

/* One thread */
.frm-thread { padding: 24px 28px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow); }
.frm-thread h2 { font-size: 1.65rem; margin-bottom: 10px; }
.frm-thread__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.frm-ailine { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 18px; padding: 10px 14px; border-radius: 12px; background: var(--bg); color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.frm-ailine > .frm-i { margin-top: 1px; }
.frm-ailine p { margin: 0; }
.frm-ailine--ai-assisted { background: color-mix(in srgb, var(--frm-violet) 10%, var(--panel)); color: var(--ink); }
.frm-ailine--ai-assisted > .frm-i { color: var(--frm-violet); }
.frm-ailine--agent { background: var(--frm-agent-soft); color: var(--ink); }
.frm-ailine--agent > .frm-i { color: var(--frm-agent); }
.frm-agent { margin: 6px 0 0; font-size: 14px; }
.frm-agent summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.frm-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 14px; margin: 8px 0 2px; font-size: 14px; line-height: 1.45; }
.frm-facts dt { color: var(--muted); }
.frm-facts dd { margin: 0; }
.frm-text { max-width: 68ch; font-size: 17px; line-height: 1.62; overflow-wrap: anywhere; }
.frm-text p { margin: 0 0 14px; }
.frm-text ul { margin: 0 0 14px; padding-left: 22px; }
.frm-text li { margin-bottom: 6px; }
.frm-ref { font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.frm-ref--off { text-decoration: none; }
.frm-thread__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; }
.frm-thread__acts { margin-top: 16px; border-top: 1px solid var(--line); }
.frm-own { margin: 4px 0 10px; display: flex; gap: 14px; }
.frm-replies { margin-top: 26px; }
.frm-replies h3 { margin: 0 0 12px; font-size: 1.15rem; }
.frm-replies ol { list-style: none; margin: 0 0 18px; padding: 0; }
.frm-reply { position: relative; margin-bottom: 12px; padding: 16px 20px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.frm-reply--answer { border-color: var(--pos); box-shadow: 0 0 0 1px var(--pos); }
.frm-reply__ribbon { display: inline-flex; align-items: center; gap: 6px; margin: -4px 0 12px; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--pos) 14%, transparent); color: var(--pos); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.frm-reply .frm-text { font-size: 16px; margin-top: 10px; }
.frm-reply .frm-text p:last-child { margin-bottom: 6px; }
.frm-reply__acts { margin: 4px 0 0; display: flex; gap: 16px; }
.frm-reply__acts:empty { display: none; }
.frm-reply audio, .frm-reply video { max-width: 100%; margin-top: 8px; border-radius: 10px; }
.frm-join { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 20px; border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line)); border-radius: var(--radius); background: var(--accent-soft); }
.frm-join p { margin: 0; }

/* Writing: a reply, a thread, an agent application */
.frm-replyform, .frm-compose { display: block; padding: 18px 22px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.frm-compose { margin-top: 14px; padding-top: 6px; }
.frm-replyform > label { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-weight: 650; font-size: 15px; }
.frm-compose > label, .frm-label { display: block; margin: 18px 0 5px; font-weight: 650; font-size: 15px; }
.frm-compose > label + .frm-hint { margin: -3px 0 6px; }
.frm-compose input[type=text], .frm-compose select, .frm-compose textarea, .frm-replyform textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; }
.frm-compose #frm-title { font-size: 1.15rem; font-weight: 600; }
.frm-compose select { width: auto; max-width: 100%; background: var(--panel); }
.frm-compose textarea, .frm-replyform textarea { resize: vertical; line-height: 1.5; }
.frm-compose :is(input, select, textarea):focus-visible, .frm-replyform textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; background: var(--panel); }
.frm-field { position: relative; }
.frm-field--tag { max-width: 320px; margin-top: 8px; }
.frm-pick { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 5px; list-style: none; max-height: 300px; overflow: auto; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow-2); }
.frm-pick li { display: flex; align-items: baseline; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14.5px; }
.frm-pick li[aria-selected="true"], .frm-pick li:hover { background: var(--accent-soft); }
.frm-pick small { flex: none; width: 92px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.frm-pick i { color: var(--muted); font-style: normal; font-size: 13px; }
.frm-kinds, .frm-who-pick { margin: 18px 0 0; padding: 0; border: 0; }
.frm-kinds legend, .frm-who-pick legend { padding: 0; margin-bottom: 6px; font-weight: 650; font-size: 15px; }
.frm-kinds label { margin-right: 18px; }
.frm-who-pick label { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 6px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14.5px; line-height: 1.4; }
.frm-who-pick label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.frm-who-pick input { margin-top: 3px; accent-color: var(--accent); }
.frm-nudge { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 14px; }
.frm-nudge--rule { background: var(--frm-agent-soft); color: var(--frm-agent); font-weight: 600; }
.frm-move { margin: 6px 0 0; font-size: 14px; }
.frm-similar { margin: 8px 0 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 14px; }
.frm-similar ul { margin: 4px 0 0; padding-left: 18px; }
.frm-linked { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.frm-linked .pill { margin: 0; }
.frm-linked small { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.frm-miss { background: none; border: 1px dashed var(--harm); color: var(--harm); }
.frm-tags__on, .frm-tags__try { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* The agents page */
.frm-policy { padding: 26px 30px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow); }
.frm-policy > p, .frm-policy > ol { max-width: 68ch; }
.frm-policy .frm-lede { font-size: 17px; line-height: 1.55; color: var(--muted); }
.frm-policy h3 { margin: 30px 0 8px; font-size: 1.2rem; }
.frm-policy ol { padding-left: 22px; }
.frm-policy ol li { margin-bottom: 8px; }
.frm-policy code { padding: 2px 7px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
.frm-ladder { list-style: none; padding: 0 !important; counter-reset: rung; display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none !important; }
.frm-ladder li { --c: var(--accent); counter-increment: rung; margin: 0 !important; padding: 14px 16px; border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 12px; background: var(--bg); font-size: 14.5px; line-height: 1.45; }
.frm-ladder li:nth-child(2) { --c: var(--frm-violet); }
.frm-ladder li:nth-child(3) { --c: var(--frm-agent); }
.frm-ladder li::before { content: counter(rung); display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: 8px; border-radius: 50%; background: var(--c); color: var(--panel); font-weight: 700; font-size: 13px; }
.frm-ladder b { display: block; margin-bottom: 2px; }
.frm-agents { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.frm-agents li { padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.frm-agents h4 { margin: 0; font-size: 1.02rem; display: flex; align-items: center; gap: 8px; }
.frm-mine { padding-left: 20px; }
.frm-policy .frm-compose { padding: 0; border: 0; box-shadow: none; background: none; max-width: 640px; }

/* "In the forum: …" at the top of a record's pop-up (forum-links.js) */
.frm-seen { margin: 0 0 12px; padding: 6px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; font-size: 13.5px; line-height: 1.4; }
.frm-seen a { font-weight: 600; }

@media (max-width: 1180px) {
  .frm, .frm--wide { grid-template-columns: 216px minmax(0, 1fr); }
  .frm-side { grid-column: 2; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
  .frm-side .frm-box { margin: 0; }
}
@media (max-width: 860px) {
  .frm, .frm--wide { grid-template-columns: minmax(0, 1fr); }
  .frm-side { grid-column: 1; }
  .frm-nav { position: static; max-height: none; display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 4px; padding: 0 16px 6px; scrollbar-width: none; }
  .frm-nav ul { display: flex; gap: 6px; }
  .frm-nav h3, .frm-nav__foot { display: none; }
  .frm-nav a { white-space: nowrap; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: 14px; gap: 6px; }
  .frm-nav a[aria-current="page"] { box-shadow: none; border-color: var(--accent); background: var(--accent-soft); }
  .frm-nav a small { margin-left: 2px; }
  .frm-nav__icon { width: 24px; height: 24px; border-radius: 50%; }
  .frm-hero { flex-wrap: wrap; padding: 18px; border-radius: 16px; }
  .frm-hero h2 { font-size: 1.45rem; }
  .frm-hero__icon { width: 46px; height: 46px; border-radius: 12px; }
  .frm-stats { flex: 1 1 100%; gap: 18px; }
  .frm-stats b { font-size: 1.25rem; }
  .frm-ask .frm-btn { display: none; }
  .frm-tabs { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .frm-find { flex: 1 1 100%; }
  .frm-find input { width: 100%; }
  .frm-card { padding: 14px 14px 2px; }
  .frm-card__top { gap: 12px; }
  .frm-card__pic { width: 92px; aspect-ratio: 1; border-radius: 10px; }
  .frm-card__n span { display: none; }
  .frm-thread { padding: 18px 16px 10px; border-radius: 16px; }
  .frm-thread h2 { font-size: 1.35rem; }
  .frm-text { font-size: 16.5px; }
  .frm-policy { padding: 18px 16px 10px; }
  .frm-ladder { grid-template-columns: 1fr; }
  .frm-pick small { width: 76px; }
}
