/* UK Business Forum. One file, no framework. System fonts: nothing is fetched from anyone else. */
:root {
  --bg: #f7f6f2; --panel: #ffffff; --ink: #15191e; --soft: #5b6470; --faint: #8a929c; --line: #e4e1d9; --line-2: #efede7;
  --go: #0b7a53; --go-ink: #075c3e; --go-wash: #e7f4ee; --warn: #9a3412; --warn-wash: #fdf0e7; --gold: #b7791f;
  --radius: 12px; --shadow: 0 1px 2px rgba(20, 24, 30, .05), 0 8px 24px -16px rgba(20, 24, 30, .18);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111417; --panel: #191d22; --ink: #e8eaed; --soft: #a2abb5; --faint: #77808a; --line: #2a3038; --line-2: #22272e; --go: #34c38f; --go-ink: #5fd8ab; --go-wash: #14291f; --warn: #f0a070; --warn-wash: #2b1c12; --shadow: 0 1px 2px rgba(0, 0, 0, .3); }
}
@view-transition { navigation: auto; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--go-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--go); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.015em; }
h1 { font-size: clamp(1.55rem, 1.1rem + 1.8vw, 2.1rem); font-weight: 750; }
h2 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.shell { width: min(1080px, 100% - 32px); margin-inline: auto; }
main.shell { padding-block: 28px 64px; min-height: 70vh; }
.shell { --w: 1080px; }
main.shell:has(.posts) { width: min(860px, 100% - 32px); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--go-ink); font-weight: 800; }
.brand-mark { display: inline-flex; align-items: flex-end; gap: 3px; height: 22px; }
.brand-mark i { display: block; width: 6px; border-radius: 2px; background: var(--go); }
.brand-mark i:nth-child(1) { height: 10px; opacity: .55; }
.brand-mark i:nth-child(2) { height: 22px; }
.brand-mark i:nth-child(3) { height: 15px; opacity: .8; }
.find { flex: 1; max-width: 360px; margin-inline: auto; }
.find input { width: 100%; height: 38px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 0 16px; font: inherit; font-size: .93rem; transition: border-color .15s, box-shadow .15s; }
.find input:focus { outline: none; border-color: var(--go); box-shadow: 0 0 0 3px var(--go-wash); }
.acct { display: flex; align-items: center; gap: 14px; font-size: .93rem; font-weight: 550; white-space: nowrap; }
.acct > a:not(.pill) { color: var(--soft); }
.me { display: inline-flex; align-items: center; gap: 7px; color: var(--ink) !important; }
.inline { display: inline; margin: 0; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-size: .86rem; color: var(--soft); cursor: pointer; }
.linkish:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.pill { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--go); color: #fff; font: inherit; font-size: .93rem; font-weight: 650; cursor: pointer; transition: transform .12s ease, background .15s, box-shadow .15s; white-space: nowrap; }
.pill:hover { background: var(--go-ink); text-decoration: none; box-shadow: 0 6px 16px -8px var(--go); }
.pill:active { transform: scale(.97); }
.pill[disabled] { opacity: .6; cursor: progress; }
.pill-big { height: 46px; padding: 0 22px; font-size: 1rem; }
.pill-sm { height: 32px; padding: 0 12px; font-size: .85rem; }
@media (prefers-color-scheme: dark) { .pill { color: #06251a; } .pill:hover { color: #06251a; } }

/* ---------- home ---------- */
.welcome { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 28px; margin-bottom: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.welcome p { color: var(--soft); margin-top: 8px; max-width: 58ch; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 10px; }
.sec-head h2 { text-transform: uppercase; letter-spacing: .07em; font-size: .76rem; color: var(--soft); }
.sec-head a { font-size: .86rem; font-weight: 600; }
.side { display: grid; gap: 22px; }

/* ---------- thread rows ---------- */
.rows { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) 64px 120px; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-2); transition: background .15s; }
.row:last-child { border-bottom: 0; }
.row:hover { background: color-mix(in srgb, var(--go-wash) 45%, transparent); }
.row.is-pinned { background: color-mix(in srgb, var(--go-wash) 60%, transparent); }
.row-title { color: var(--ink); font-weight: 650; font-size: 1.02rem; line-height: 1.3; display: block; }
.row-title:visited { color: var(--soft); }
.row-meta { color: var(--faint); font-size: .84rem; margin-top: 3px; }
.who { color: inherit; font-weight: 600; }
.row-meta .who { color: var(--soft); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--line-2); color: var(--soft); font-size: .74rem; font-weight: 650; margin-right: 4px; }
.tag-pin { background: var(--go-wash); color: var(--go-ink); }
.row-count { text-align: center; line-height: 1.15; }
.row-count b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.row-count span, .row-last span { display: block; color: var(--faint); font-size: .76rem; }
.row-last { text-align: right; font-size: .86rem; color: var(--soft); line-height: 1.25; overflow: hidden; }
.row-last span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- avatars: twelve fixed colours, no inline styles ---------- */
.av { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; font-weight: 700; font-size: .84rem; letter-spacing: .02em; color: #fff; user-select: none; }
.av-sm { width: 26px; height: 26px; font-size: .64rem; }
.av-lg { width: 46px; height: 46px; font-size: .95rem; }
.av-xl { width: 84px; height: 84px; font-size: 1.7rem; }
.av-0 { background: #0b7a53; } .av-1 { background: #b45309; } .av-2 { background: #1d4ed8; } .av-3 { background: #9d174d; }
.av-4 { background: #4d7c0f; } .av-5 { background: #6d28d9; } .av-6 { background: #0e7490; } .av-7 { background: #b91c1c; }
.av-8 { background: #475569; } .av-9 { background: #a16207; } .av-10 { background: #be185d; } .av-11 { background: #166534; }

/* ---------- boards and tally ---------- */
.boards { list-style: none; margin: 0; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.board { display: block; padding: 10px 12px; border-radius: 9px; color: var(--ink); transition: background .15s; }
.board:hover { background: var(--go-wash); text-decoration: none; }
.board-name { display: block; font-weight: 650; }
.board-blurb { display: block; color: var(--soft); font-size: .86rem; line-height: 1.35; }
.board-meta { display: block; color: var(--faint); font-size: .76rem; margin-top: 3px; }
.tally { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.tally b { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.tally span { color: var(--faint); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.tally p { grid-column: 1 / -1; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); color: var(--soft); font-size: .86rem; }

/* ---------- page furniture ---------- */
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--faint); font-size: .86rem; margin-bottom: 14px; }
.crumbs a { color: var(--soft); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.page-head p { color: var(--soft); margin-top: 6px; }
.blank { padding: 40px 24px; text-align: center; background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--soft); }
.blank h3, .blank h1 { color: var(--ink); margin-bottom: 8px; }
.blank-page { margin-top: 8vh; } .blank-page p { margin-top: 10px; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: 18px; color: var(--soft); font-size: .9rem; }
.pager a:last-child { justify-self: end; }
.flash { padding: 11px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 550; animation: drop .35s ease both; }
.flash-ok { background: var(--go-wash); color: var(--go-ink); }
.flash-err { background: var(--warn-wash); color: var(--warn); }
.hint { color: var(--faint); font-size: .84rem; }
.note { padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--soft); margin-top: 20px; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- thread ---------- */
.thread-head { margin-bottom: 18px; }
.thread-head p { color: var(--faint); font-size: .9rem; margin-top: 8px; }
.posts { display: grid; gap: 12px; }
.post { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); scroll-margin-top: 84px; }
.post-op { border-color: color-mix(in srgb, var(--go) 35%, var(--line)); }
.post:target { box-shadow: 0 0 0 3px var(--go-wash), var(--shadow); }
.post-fresh { animation: arrive .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px); background: var(--go-wash); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.post-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.post-head .who { color: var(--ink); font-weight: 700; }
.badge { padding: 1px 8px; border-radius: 999px; background: var(--go-wash); color: var(--go-ink); font-size: .72rem; font-weight: 700; }
.post-where { color: var(--faint); font-size: .84rem; }
.post-time { margin-left: auto; color: var(--faint); font-size: .84rem; }
.post-body { margin-top: 8px; font-size: 1.02rem; line-height: 1.62; overflow-wrap: anywhere; max-width: 70ch; }
.post-body p + p, .post-body blockquote + p, .post-body p + blockquote { margin-top: .85em; }
.post-body blockquote { margin: 0; padding: 8px 14px; border-left: 3px solid var(--line); background: var(--line-2); border-radius: 0 8px 8px 0; color: var(--soft); font-size: .95rem; }
.post-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-2); color: var(--faint); font-size: .8rem; }
.post-acts { display: inline-flex; gap: 14px; align-items: flex-start; }
.report summary { list-style: none; cursor: pointer; } .report summary::-webkit-details-marker { display: none; }
.report[open] { flex-basis: 100%; }
.report form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 8px; }
.report label { display: grid; gap: 4px; flex: 1; min-width: 220px; }
.report input { height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); padding: 0 10px; font: inherit; font-size: .88rem; }
.fresh-pill { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 15; height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font: inherit; font-weight: 650; font-size: .9rem; cursor: pointer; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); animation: drop .3s ease both; }

/* ---------- forms ---------- */
.compose { display: grid; gap: 8px; margin-top: 20px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.compose label { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--soft); margin-top: 6px; }
.compose input:not([type="checkbox"]), .compose select, .compose textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); padding: 11px 13px; font: inherit; transition: border-color .15s, box-shadow .15s; }
.compose textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
.compose input:focus, .compose select:focus, .compose textarea:focus { outline: none; border-color: var(--go); box-shadow: 0 0 0 3px var(--go-wash); }
.compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 6px; }
.compose-new { margin-top: 0; }
.tick { font-weight: 500 !important; color: var(--ink) !important; }
.auth { width: min(440px, 100%); margin: 5vh auto 0; }
.auth > p { color: var(--soft); margin-top: 8px; }
.edit { margin: 18px 0; } .edit summary { cursor: pointer; font-weight: 650; color: var(--go-ink); }

/* ---------- profile and prose ---------- */
.profile { display: flex; gap: 22px; align-items: center; padding: 24px; margin-bottom: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.profile-line { color: var(--soft); margin-top: 4px; font-weight: 550; }
.profile-bio { margin-top: 8px; max-width: 60ch; }
.profile-meta { color: var(--faint); font-size: .86rem; margin-top: 8px; }
.prose { max-width: 68ch; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 32px; box-shadow: var(--shadow); }
.prose h1 { margin-bottom: 16px; } .prose h2 { margin: 26px 0 8px; font-size: 1.1rem; }
.prose p, .prose li { color: var(--ink); line-height: 1.65; } .prose p + p { margin-top: .8em; }
.prose ol, .prose ul { padding-left: 1.3em; display: grid; gap: 6px; }
.find-big { display: flex; gap: 10px; max-width: 560px; margin: 0 0 18px; } .find-big input { height: 44px; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--soft); font-size: .88rem; }
.foot-in { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 18px; } .foot a { color: var(--soft); }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .cols { grid-template-columns: 1fr; }
  .find { display: none; }
  .top-in { gap: 10px; }
  .acct { margin-left: auto; gap: 12px; }
  .acct .me span, .acct form.inline { display: none; }
}
@media (max-width: 620px) {
  .shell { width: calc(100% - 24px); }
  .welcome { flex-direction: column; align-items: flex-start; padding: 20px; }
  .row { grid-template-columns: auto minmax(0, 1fr) auto; padding: 12px 14px; gap: 12px; }
  .row-last { display: none; }
  .row-count { min-width: 40px; }
  .post { grid-template-columns: 1fr; gap: 10px; padding: 16px; }
  .post-side { display: none; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .brand-name { font-size: .95rem; }
  .compose-foot { flex-direction: column-reverse; align-items: stretch; }
  .profile { flex-direction: column; align-items: flex-start; }
  .prose { padding: 22px 18px; }
}
