/* KYNTRION CORE — forum presentation. Loaded after the existing functional CSS. */
:root {
  color-scheme: dark;
  --bg: #101211; --bg2: #191c19; --bg3: #232820; --border: #30362e;
  --fg: #f0f1e9; --fg2: #a7afa4; --fg3: #909b89;
  --accent: #c3ed67; --accent2: #d3f58d; --link: #c3ed67;
  --glass: #ffffff05; --glass2: #ffffff09; --glass3: #ffffff10;
  --card-hover: #1c2219; --warm: #e3bd7d;
  --r-sm: 9px; --r-md: 12px; --r-lg: 18px;
  --core-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --core-tint: #26311e; --core-header: #101211f2; --core-hover: #344428;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5ee; --bg2: #ffffff; --bg3: #e8eddf; --border: #d7dece;
  --fg: #20281c; --fg2: #55634b; --fg3: #68785c;
  --accent: #3f641a; --accent2: #315212; --link: #3f641a;
  --glass: #263b1205; --glass2: #263b1209; --glass3: #263b1212;
  --card-hover: #f0f4e9; --warm: #856225;
  --core-tint: #e9f1da; --core-header: #f4f5eef2; --core-hover: #b9d293;
}
html { scroll-padding-top: 110px; }
body.kyntrion-forum { font: 16px/1.65 system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
::selection { background: #c3ed67; color: #19220e; }
a, button, input, textarea, select { -webkit-tap-highlight-color: transparent; }
a { text-underline-offset: 4px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.container { width: min(1200px, calc(100% - 80px)); max-width: none; padding: 0; }
main.container { min-height: 65vh; padding-top: 30px; padding-bottom: 34px; }
.forum-skip { position: fixed; z-index: 200; left: 20px; top: -100px; padding: 12px 20px; border-radius: 8px; background: var(--accent); color: var(--bg); }
.forum-skip:focus { top: 12px; }
.topbar { background: var(--core-header); border-color: var(--border); backdrop-filter: blur(20px); z-index: 40; }
.topbar .container { height: 88px; flex-wrap: nowrap; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; text-decoration: none !important; }
.forum-brand-symbol { position: relative; display: block; width: 39px; height: 43px; overflow: hidden; border-radius: 5px; background: #101110; flex-shrink: 0; }
.forum-brand-symbol img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.83); transform-origin: 52% 50%; }
.brand .forum-brand-name { color: var(--fg); font-size: 21px; font-weight: 750; letter-spacing: .08em; line-height: 1.2; }
.forum-brand-name small { display: block; color: var(--fg3); margin-top: 5px; font: 9px/1.8 var(--core-mono); letter-spacing: .12em; }
.mainnav { margin-left: auto; gap: 2px; flex-wrap: nowrap; min-width: 0; }
.mainnav a { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 9px 11px; border-radius: 8px; font-size: 13px; min-height: 42px; color: var(--fg2); }
.mainnav a:hover { background: var(--glass3); color: var(--fg); }
.mainnav .nav-secondary { display: none; }
.mainnav-member .nav-site, .mainnav-member .nav-apk { display: none; }
.mainnav .nav-profile { max-width: 145px; overflow: hidden; text-overflow: ellipsis; }
.mainnav .btn-primary, html[data-theme="light"] .mainnav .btn-primary { padding-inline: 16px; background: #c3ed67; color: #19220e !important; border: 1px solid #c3ed67; }
.mainnav .btn-primary:hover { background: #d3f58d; }
.top-icons { gap: 6px; }
.top-icons .icon-search { display: none; }
.top-icons .theme-toggle, .hamburger, .icon-btn { width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 9px; padding: 0; background: transparent; color: var(--fg2); }
.top-icons .theme-toggle { display: inline-flex; align-items: center; justify-content: center; font-size: 19px; }
.hamburger { display: flex; }
.hamburger:hover, .theme-toggle:hover, .icon-btn:hover { background: var(--glass3); color: var(--accent); }
.hamburger span { background: currentColor; width: 18px; }
.online-dot.on, .av-round .dot.on, .conv-head .who .st .dot.on { background: var(--accent); box-shadow: none; }
.page-head { padding: 25px 0 30px; }
h1 { font-size: clamp(30px, 3.4vw, 46px); font-weight: 600; letter-spacing: -.045em; line-height: 1.15; margin: 10px 0 18px; overflow-wrap: anywhere; }
h2, h3 { font-weight: 600; letter-spacing: -.025em; line-height: 1.25; }
.forum-hero { padding: 28px 0 0; margin-bottom: 50px; }
.forum-eyebrow { display: flex; align-items: center; gap: 10px; color: var(--fg3); font: 10px/1.7 var(--core-mono); letter-spacing: .13em; }
.forum-eyebrow > span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.forum-hero-grid { display: grid; grid-template-columns: 1.3fr .75fr; gap: 80px; align-items: center; padding: 22px 0 38px; }
.forum-hero h1 { font-size: clamp(36px, 4.5vw, 59px); margin: 0 0 22px; letter-spacing: -.055em; }
.forum-hero h1 span { color: var(--accent); }
.forum-hero-copy { max-width: 570px; margin: 0; font-size: 16px; line-height: 1.85; color: var(--fg2); }
.forum-hero-actions { display: flex; align-items: center; gap: 25px; flex-wrap: wrap; margin-top: 26px; }
.forum-hero-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 24px; }
.forum-quiet-link { display: inline-flex; gap: 16px; align-items: center; min-height: 44px; color: var(--fg); font-size: 14px; font-weight: 550; }
.forum-community-note { position: relative; min-height: 208px; display: flex; flex-direction: column; justify-content: space-between; padding: 24px; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: linear-gradient(135deg, var(--core-tint), var(--bg2) 80%); }
.forum-community-note::after { content: ''; position: absolute; width: 180px; height: 180px; border: 1px solid var(--core-hover); border-radius: 50%; right: -66px; bottom: -66px; opacity: .45; }
.forum-note-label, .forum-note-footer { position: relative; z-index: 1; color: var(--fg3); font: 9px/1.8 var(--core-mono); letter-spacing: .02em; }
.forum-note-symbol { color: var(--accent); font: 46px/1.5 var(--core-mono); letter-spacing: -.12em; }
.stats { display: flex; flex-wrap: wrap; gap: 32px; padding: 19px 0; margin-top: 0; border-block: 1px solid var(--border); }
.stat { padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 12px; color: var(--fg2); }
.stat b { color: var(--fg); font: 19px/1.3 var(--core-mono); font-weight: 500; margin-right: 7px; }
.section-head { margin: 32px 0 21px; gap: 15px; flex-wrap: wrap; }
.section-head h2 { color: var(--fg); font-size: 26px; letter-spacing: -.035em; margin: 0; }
.section-head a { font-size: 12px; }
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cat-card { min-width: 0; padding: 27px; border-radius: 17px; background: var(--bg2); border: 1px solid var(--border); transition: background .18s, border-color .18s, transform .18s; }
.cat-card::before { display: none; }
.cat-card:hover { background: var(--card-hover); border-color: var(--core-hover); transform: translateY(-2px); text-decoration: none; }
.cat-icon { display: flex; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid var(--core-hover); border-radius: 12px; background: var(--core-tint); color: var(--accent); margin-bottom: 24px; }
.cat-icon svg { width: 22px; height: 22px; }
.cat-title { color: var(--fg); font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; overflow-wrap: anywhere; }
.cat-desc { color: var(--fg2); font-size: 13px; line-height: 1.8; margin-top: 11px; }
.cat-foot { border-top: 1px solid var(--border); margin-top: 22px; padding-top: 14px; }
.cat-count { background: none; border: 0; padding: 0; color: var(--fg3); font: 10px/1.6 var(--core-mono); }
.thread-list { gap: 10px; }
.t-card { padding: 20px 23px; gap: 18px; background: var(--bg2); border-color: var(--border); border-radius: 13px; align-items: center; }
.t-card:hover { background: var(--card-hover); border-color: var(--core-hover); }
.t-avatar, .chat-avatar, .av-round { background: var(--core-tint); color: var(--accent); border: 1px solid var(--core-hover); font-weight: 500; box-shadow: none; }
.t-avatar { width: 44px; height: 44px; border-radius: 12px; font: 17px var(--core-mono); display: flex; align-items: center; justify-content: center; }
.t-main { min-width: 0; }
.t-title { color: var(--fg); font-size: 16px; line-height: 1.5; font-weight: 550; overflow-wrap: anywhere; }
.t-meta { color: var(--fg3); font-size: 11px; margin-top: 7px; gap: 15px; flex-wrap: wrap; }
.t-meta b { color: var(--fg2); font-weight: 500; }
.t-side { min-width: 62px; }
.t-replies { color: var(--fg); font: 19px/1.4 var(--core-mono); }
.t-side small { color: var(--fg3); font-size: 8px; letter-spacing: .1em; }
.t-badge { font-size: 10px; font-weight: 500; }
.t-badge.cat, .t-badge.tag, .tag, .pill { background: var(--bg3); color: var(--fg2); }
.t-badge.pin, .pill.pinned { background: #4d3d191f; color: var(--warm); border-color: #806a3b55; }
.pill.status, .pill.status:hover { background: var(--core-tint); color: var(--accent); }
.card, .post, .thread-head { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; }
.card { padding: 25px; }
.card h2 { font-size: 20px; }
.thread-head { padding: 28px; margin: 8px 0 22px; }
.thread-head h1 { font-size: clamp(26px, 3vw, 39px); line-height: 1.25; font-weight: 600; }
.thread-crumb { font-size: 12px; margin-bottom: 20px; }
.thread-meta { font-size: 12px; }
.thread-actions { padding-top: 20px; }
.act-btn { min-height: 43px; padding: 10px 16px; border-radius: 9px; font-size: 12px; font-weight: 550; }
.act-btn:hover, .thread-tags a:hover { border-color: var(--core-hover); color: var(--accent); }
.act-btn.vote, .act-btn.sub.on, .post-chat-btn { border-color: var(--core-hover); color: var(--accent); background: var(--core-tint); }
.act-btn.vote:hover, .post-chat-btn:hover { background: var(--bg3); }
.act-btn.vote.on { background: #c3ed67; border-color: #c3ed67; color: #19220e; }
.post { margin: 15px 0; overflow: hidden; }
.post .head { padding: 17px 23px; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.post .head > span { min-width: 0; flex-wrap: wrap; overflow-wrap: anywhere; }
.post .body { padding: 23px; line-height: 1.85; }
.post .body p:first-child { margin-top: 0; }
.post .body p:last-child { margin-bottom: 0; }
.post .body pre { max-width: 100%; padding: 18px; border-radius: 10px; font: 13px/1.8 var(--core-mono); }
.post .body code { font-family: var(--core-mono); }
.post .body table { display: block; max-width: 100%; overflow-x: auto; }
.post .foot { padding: 13px 23px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.post-act.edit, .post-author-link, .post-author-link:hover { color: var(--accent); }
.post-act.edit:hover { background: var(--core-tint); }
.btn, .btn-primary { min-height: 46px; border: 1px solid #c3ed67; border-radius: 9px; padding: 11px 20px; background: #c3ed67; color: #19220e; font-size: 14px; font-weight: 600; text-decoration: none; }
.btn:hover, .btn-primary:hover { background: #d3f58d; color: #19220e; text-decoration: none; }
.btn.secondary { border-color: var(--border); background: var(--bg3); color: var(--fg); }
.btn.small { min-height: 36px; padding: 7px 12px; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], textarea, select { min-height: 46px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); color: var(--fg); font-size: 15px; padding: 12px 14px; max-width: 100%; }
input::placeholder, textarea::placeholder { color: var(--fg3); opacity: 1; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
form.stack { max-width: 480px; padding: 28px; background: var(--bg2); border: 1px solid var(--border); border-radius: 17px; gap: 13px; margin-block: 24px; }
form.stack label { color: var(--fg2); font-size: 13px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; min-width: 40px; border: 1px solid var(--border); border-radius: 8px; }
.pagination .active { background: #c3ed67; border-color: #c3ed67; color: #19220e; }
.alert { padding: 15px 19px; border-radius: 10px; }
.alert.ok { background: var(--core-tint); border-color: var(--core-hover); color: var(--accent); }
.chat-card, .chat-box, .conv-head { border-color: var(--border); }
.chat-head, .msg-head { flex-wrap: wrap; gap: 12px; }
.msg-head h1 { font-size: 32px; }
.chat-card:hover, .chat-row:hover { background: var(--card-hover); }
.msg-search input:focus, .composer input:focus { border-color: var(--accent); }
.msg-row .bubble { padding: 14px 18px; line-height: 1.7; max-width: 100%; border-radius: 14px; }
.msg-row.me .bubble, .msg.me { background: #c3ed67; color: #19220e; }
.msg-row.them .bubble, .msg.them { background: var(--bg3); color: var(--fg); }
.composer { padding-block: 15px; gap: 10px; }
.composer .composer-row { min-width: 0; }
.composer .composer-row input { min-width: 0; }
.composer .send { background: #c3ed67; color: #19220e; }
.composer .send:hover { background: #d3f58d; }
.composer .att-btn:hover { border-color: var(--core-hover); background: var(--core-tint); color: var(--accent); }
.btn-readall, .msg-inbox-btn { border-color: var(--border); color: var(--fg2); }
.chat-row .badge-new, .chat-unread, .d-link .badge { background: #c3ed67; color: #19220e; }
.drawer-panel { left: auto; width: min(430px, 100%); height: 100dvh; max-height: 100dvh; padding: 26px 26px 38px; background: var(--bg2); border-left: 1px solid var(--border); border-bottom: 0; border-radius: 0; animation: none; }
.drawer-head { margin-bottom: 27px; gap: 15px; }
.drawer-head .forum-brand-name { font-size: 18px; }
.drawer-head .forum-brand-name small { font-size: 8px; }
.drawer-close { width: 40px; height: 40px; border-radius: 9px; flex-shrink: 0; }
.d-tile { min-width: 0; padding: 14px 12px; font-size: 12px; background: var(--bg3); border-color: var(--border); font-weight: 550; }
.d-tile:hover { border-color: var(--core-hover); }
.d-btn { background: #c3ed67; color: #19220e; font-size: 14px; font-weight: 600; border-radius: 9px; }
.d-btn:hover { background: #d3f58d; }
.d-section { margin-top: 26px; color: var(--fg3); font: 10px/1.7 var(--core-mono); letter-spacing: .08em; }
.d-link { padding: 12px; min-height: 45px; font-size: 14px; font-weight: 450; overflow-wrap: anywhere; }
.drawer-theme { width: 100%; border: 0; background: transparent; text-align: left; font-family: inherit; }
.footer { border-color: var(--border); margin-top: 35px; padding: 31px 0; }
.footer .container { align-items: center; gap: 20px; }
.forum-footer-brand { color: var(--fg); letter-spacing: .1em; font-size: 15px; font-weight: 600; }
.forum-footer-brand small { display: block; color: var(--fg3); letter-spacing: 0; font-weight: 400; font-size: 11px; margin-top: 6px; }
.forum-footer-links { display: flex; align-items: center; gap: 24px; font-size: 12px; }
@media (max-width: 1240px) {
  .topbar .container { gap: 16px; }
  .mainnav a { padding-inline: 8px; font-size: 12px; }
  .mainnav-member .nav-profile { display: none; }
  .mainnav .nav-apk { display: none; }
}
@media (max-width: 1000px) {
  .mainnav { display: none; }
  .top-icons { margin-left: auto; }
  .top-icons .icon-search { display: inline-flex; }
  .forum-hero-grid { gap: 35px; grid-template-columns: 1.4fr .8fr; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .container { width: calc(100% - 36px); }
  main.container { padding-top: 20px; }
  .topbar .container { height: 72px; padding: 0; gap: 10px; }
  .brand { gap: 9px; }
  .forum-brand-symbol { width: 31px; height: 35px; }
  .brand .forum-brand-name { font-size: 16px; }
  .forum-brand-name small { font-size: 7px; letter-spacing: .1em; }
  .top-icons { gap: 4px; }
  .top-icons .theme-toggle { display: none; }
  .icon-btn, .hamburger { width: 38px; height: 40px; }
  .top-icons .icon-bell { display: none; }
  .forum-hero { padding-top: 18px; margin-bottom: 34px; }
  .forum-eyebrow { font-size: 9px; }
  .forum-hero-grid { display: block; padding: 22px 0 29px; }
  .forum-hero h1 { font-size: clamp(31px, 7.7vw, 44px); margin-bottom: 17px; }
  .forum-hero-copy { font-size: 14px; line-height: 1.85; }
  .forum-community-note { display: none; }
  .forum-hero-actions { gap: 18px; margin-top: 23px; }
  .forum-hero-actions .btn { padding-inline: 15px; font-size: 12px; gap: 15px; }
  .forum-quiet-link { font-size: 12px; gap: 10px; }
  .stats { gap: 18px; justify-content: space-between; padding-block: 18px; }
  .stat { font-size: 10px; }
  .stat b { display: block; font-size: 21px; margin: 0 0 5px; }
  .section-head h2 { font-size: 23px; }
  .cat-grid { gap: 12px; }
  .cat-card { padding: 20px; }
  .cat-icon { margin-bottom: 18px; width: 36px; height: 36px; border-radius: 10px; }
  .cat-title { font-size: 17px; }
  .cat-desc { font-size: 12px; line-height: 1.7; }
  .cat-foot { margin-top: 16px; padding-top: 11px; }
  .cat-count { font-size: 9px; }
  .t-card { padding: 17px 15px; gap: 12px; }
  .t-avatar { width: 34px; height: 36px; border-radius: 9px; font-size: 14px; }
  .t-title { font-size: 14px; line-height: 1.55; }
  .t-meta { font-size: 10px; gap: 10px; }
  .t-side { min-width: 32px; }
  .t-replies { font-size: 17px; }
  .t-side small { font-size: 6px; letter-spacing: .04em; }
  .t-badge { font-size: 8px; padding: 2px 5px; }
  .card, .thread-head { padding: 19px; }
  main [style*="grid-template-columns"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  main table { display: block; max-width: 100%; overflow-x: auto; }
  .thread-head h1 { font-size: 27px; }
  .thread-meta { gap: 9px; font-size: 11px; }
  .post .head { padding: 14px 17px; font-size: 11px; }
  .post .body { padding: 17px; font-size: 14px; }
  .post .foot { padding: 12px 17px; }
  form.stack { padding: 22px; }
  input[type="text"], input[type="email"], input[type="password"], textarea, select { font-size: 16px; }
  .msg-row { max-width: 90%; }
  .msg-row .bubble { padding: 12px 15px; font-size: 14px; }
  .footer .container { flex-direction: column; align-items: flex-start; gap: 21px; }
  .forum-footer-links { gap: 22px; }
}
@media (max-width: 420px) {
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 15px; padding: 20px; }
  .cat-icon { grid-row: span 3; margin: 0; }
  .cat-title, .cat-desc, .cat-foot { grid-column: 2; }
  .cat-desc { margin-top: 7px; }
  .cat-foot { border: 0; padding: 0; margin-top: 10px; }
  .t-avatar { display: none; }
  .drawer-panel { padding: 22px 20px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
