/* CyberPanel Community — design system
   Classic forum layout, modernized. Light + dark themes.
   Includes full styling for imported Discourse post markup. */

:root {
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #eaeef5;
  --border: #e3e8ef;
  --border-strong: #c9d2de;
  --ink: #101e38;
  --ink-2: #44546c;
  --ink-3: #586981;
  --brand: #0f9d8a;
  --brand-strong: #0b7d6e;
  --brand-ink: #ffffff;
  --brand-soft: #e0f4f0;
  --accent: #e08600;
  --accent-ink: #8f5400;
  --accent-soft: #fff1dc;
  --danger: #b81c40;
  --danger-soft: #fdedf1;
  --danger-border: #f5b8c6;
  --warn-soft: #fff7ec;
  --warn-ink: #8f4e08;
  --warn-border: #f3d9ae;
  --code-bg: #f1f4f9;
  --code-ink: #314058;
  --topbar: linear-gradient(100deg, #0b2530 0%, #0e3a37 100%);
  --topbar-ink: #eef7f4;
  --topbar-ink-2: #a8cdc5;
  --ring: rgba(15, 157, 138, .35);
  --shadow-sm: 0 1px 2px rgba(16, 31, 51, .06);
  --shadow: 0 6px 20px -8px rgba(16, 31, 51, .18);
  --radius: 12px;
  --radius-sm: 9px;
  --icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E");
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #141e30;
  --surface-2: #1a2538;
  --surface-3: #223047;
  --border: #2a3852;
  --border-strong: #3c4d6b;
  --ink: #ecf2fb;
  --ink-2: #b9c6da;
  --ink-3: #94a4bd;
  --brand: #34d9c3;
  --brand-strong: #21c5af;
  --brand-ink: #04211c;
  --brand-soft: #143733;
  --accent: #ffb04d;
  --accent-ink: #ffb04d;
  --accent-soft: #3d2c12;
  --danger: #ff8da1;
  --danger-soft: #3d1925;
  --danger-border: #6b2f42;
  --warn-soft: #322615;
  --warn-ink: #ffc987;
  --warn-border: #5d4422;
  --code-bg: #101a2b;
  --code-ink: #c4d3e8;
  --topbar: linear-gradient(100deg, #07151b 0%, #0a2723 100%);
  --topbar-ink: #e9f4f1;
  --topbar-ink-2: #93b5ad;
  --ring: rgba(52, 217, 195, .4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 10px 28px -10px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scrollbar-gutter: stable; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 15px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
[data-theme="dark"] a { color: var(--brand); }

::selection { background: var(--brand-soft); }

a:focus-visible, button:focus-visible, .button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  min-height: 64px;
  background: var(--topbar);
  color: var(--topbar-ink);
  box-shadow: var(--shadow-sm);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  font-size: 16px;
  color: var(--topbar-ink) !important;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand img { height: 30px; width: auto; display: block; }
.brand .brand-text { letter-spacing: .2px; }

.top-search {
  flex: 1;
  max-width: 460px;
  margin: 0;
  position: relative;
}
.top-search::before {
  content: "";
  position: absolute;
  left: 12px; top: 50%;
  width: 16px; height: 16px;
  transform: translateY(-50%);
  background: currentColor;
  opacity: .55;
  pointer-events: none;
  -webkit-mask: var(--icon-search) center / contain no-repeat;
  mask: var(--icon-search) center / contain no-repeat;
}
.top-search input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px 8px 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .1);
  color: var(--topbar-ink);
}
.top-search input::placeholder { color: var(--topbar-ink-2); }
.top-search input:focus {
  outline: none;
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .35);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.topnav .user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--topbar-ink);
  font-weight: 650;
  padding-right: 4px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  color: var(--topbar-ink);
  cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, .14); }
.icon-btn svg { width: 18px; height: 18px; }
#theme-toggle .moon { display: none; }
[data-theme="dark"] #theme-toggle .sun { display: none; }
[data-theme="dark"] #theme-toggle .moon { display: block; }

.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  background: var(--brand);
  color: var(--brand-ink) !important;
  border-radius: 10px;
  padding: 9px 15px;
  font: inherit;
  font-weight: 650;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, transform .05s;
}
.button:hover { background: var(--brand-strong); text-decoration: none; }
.button:active { transform: translateY(1px); }
[data-theme="dark"] .button { color: var(--brand-ink) !important; }
.button.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .4);
  color: var(--topbar-ink) !important;
}
.topnav .button.ghost:hover { background: rgba(255, 255, 255, .14); }
.button.outline {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink) !important;
}
.button.outline:hover { background: var(--surface-2); }
.button.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }

/* ---------- Layout ---------- */
.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 22px 60px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

h1 { font-size: 26px; line-height: 1.25; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 0 0 12px; }
.lede { color: var(--ink-2); margin: 2px 0 0; max-width: 70ch; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--ink-3);
  font-size: 13px;
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--ink-2); font-weight: 600; }
.breadcrumb .sep { opacity: .5; }

/* ---------- Board index ---------- */
.board { display: grid; gap: 18px; }

.board-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.board-section > .sec-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.sec-head .swatch {
  width: 6px; height: 26px; border-radius: 3px; flex: none;
  background: var(--cat, var(--brand));
}
.sec-head .sec-title { font-weight: 750; font-size: 15px; color: var(--ink); }
.sec-head .sec-desc { color: var(--ink-3); font-size: 13px; font-weight: 400; }
.sec-head .sec-metrics {
  margin-left: auto;
  display: flex;
  gap: 22px;
  flex: none;
  text-align: right;
  color: var(--ink-3);
  font-size: 12px;
}
.sec-head .sec-metrics b { display: block; color: var(--ink); font-size: 15px; font-weight: 700; }
.sec-head .sec-link { margin-left: 18px; font-size: 13px; font-weight: 650; white-space: nowrap; }

/* ---------- Topic rows ---------- */
.topic-list { display: grid; }
.topic-list.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.topic-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 70px 70px 132px;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--ink) !important;
}
.topic-row:last-child { border-bottom: 0; }
.topic-row:hover { background: var(--surface-2); text-decoration: none; }

.topic-main { min-width: 0; }
.topic-title {
  font-weight: 650;
  color: var(--ink);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topic-row:hover .topic-title { color: var(--brand-strong); }
[data-theme="dark"] .topic-row:hover .topic-title { color: var(--brand); }
.topic-meta { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.topic-meta a { color: var(--ink-2); font-weight: 600; }

.col-num { text-align: center; }
.col-num b { display: block; color: var(--ink); font-weight: 700; }
.col-num span { color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.col-last { color: var(--ink-3); font-size: 12.5px; text-align: right; }
.col-last b { color: var(--ink-2); font-weight: 650; }

/* ---------- Avatars ---------- */
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex: none;
  object-fit: cover;
  overflow: hidden;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.avatar.lg { width: 44px; height: 44px; font-size: 17px; }
.avatar.sm-av { width: 26px; height: 26px; font-size: 11px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
  margin-right: 6px;
}
.badge.pin { background: var(--accent-soft); color: var(--accent-ink); }
.badge.closed { background: var(--surface-3); color: var(--ink-2); }

/* ---------- Topic page / post stream ---------- */
.topic-head { margin-bottom: 16px; }
.topic-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.post-stream { display: grid; gap: 14px; margin: 18px 0; }

.replies-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.replies-divider::before, .replies-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--border);
}

.post {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
}
.post .post-aside { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.post-content { min-width: 0; }
.post-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--ink-3);
  font-size: 12.5px;
}
.post-head .name { font-weight: 700; color: var(--ink); font-size: 14px; }
.post-head .pnum { margin-left: auto; }

/* ---------- Post body: native + imported Discourse content ---------- */
.post-body { overflow-wrap: anywhere; line-height: 1.7; }
.post-body p { margin: 0 0 12px; }
.post-body p:last-child { margin-bottom: 0; }
.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.post-body a { word-break: break-word; }

.post-body h1, .post-body h2, .post-body h3, .post-body h4 {
  line-height: 1.3;
  margin: 20px 0 10px;
  letter-spacing: 0;
}
.post-body h1 { font-size: 20px; }
.post-body h2 { font-size: 18px; }
.post-body h3 { font-size: 16px; }
.post-body h4 { font-size: 15px; }
.post-body h1:first-child, .post-body h2:first-child, .post-body h3:first-child { margin-top: 0; }

.post-body ul, .post-body ol { margin: 0 0 12px; padding-left: 26px; }
.post-body li { margin: 3px 0; }
.post-body li p { margin-bottom: 6px; }

.post-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

/* Emoji (Discourse-imported and native) */
.post-body img.emoji {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: -4px;
  margin: 0 1px;
  border-radius: 0;
  box-shadow: none;
}
.emoji-fallback { color: var(--ink-3); font-size: .9em; }

/* Inline code + code blocks */
.post-body code {
  background: var(--code-bg);
  color: var(--code-ink);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}
.post-body pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  margin: 0 0 12px;
  overflow-x: auto;
  line-height: 1.55;
}
.post-body pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 13px;
  color: var(--code-ink);
  white-space: pre;
}
.post-body kbd {
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--ink);
}

/* Quotes (Discourse aside.quote and plain blockquote) */
.post-body blockquote {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-left: 3px solid var(--brand);
  background: var(--surface-2);
  border-radius: 0 8px 8px 0;
  color: var(--ink-2);
}
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body aside.quote {
  margin: 0 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2);
}
.post-body aside.quote .title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-2);
  background: var(--surface-3);
  border-bottom: 1px solid var(--border);
}
.post-body aside.quote .title img.avatar {
  width: 20px; height: 20px;
  border-radius: 50%;
  margin: 0;
}
.post-body aside.quote blockquote {
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 0;
  background: none;
}
.post-body .quote-controls { display: none; }

/* Onebox link previews (Discourse) */
.post-body aside.onebox {
  margin: 0 0 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: 10px;
  background: var(--surface-2);
  overflow: hidden;
}
.post-body aside.onebox header.source {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.post-body aside.onebox header.source a { color: var(--ink-3); font-weight: 600; }
.post-body aside.onebox img.site-icon { width: 16px; height: 16px; border-radius: 3px; }
.post-body aside.onebox h3, .post-body aside.onebox h4 {
  margin: 0 0 6px;
  font-size: 15px;
}
.post-body aside.onebox p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.post-body aside.onebox img.thumbnail,
.post-body aside.onebox .onebox-avatar {
  max-width: 96px;
  max-height: 96px;
  float: right;
  margin: 0 0 8px 14px;
  border-radius: 8px;
}
.post-body .onebox-metadata { color: var(--ink-3); font-size: 12px; }
.post-body aside.onebox::after { content: ""; display: block; clear: both; }
.post-body .youtube-onebox { display: block; max-width: 640px; margin: 0 0 12px; }

/* Mentions, hashtags, category badges (imported) */
.post-body .mention, .post-body .hashtag {
  background: var(--brand-soft);
  color: var(--brand-strong);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: .92em;
  font-weight: 650;
}
[data-theme="dark"] .post-body .mention,
[data-theme="dark"] .post-body .hashtag { color: var(--brand); }

.post-body .badge-wrapper,
.post-body .badge-category__wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: baseline;
}
.post-body .badge-category-bg {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 2px;
  flex: none;
}
.post-body .badge-category,
.post-body .badge-category__name,
.post-body .category-name {
  color: var(--ink-2);
  font-weight: 650;
  font-size: .92em;
  background: none;
}
/* newer Discourse badge markup carries inline CSS vars */
.post-body .badge-category.--has-parent::before,
.post-body .badge-category:not(.clear-badge)::before {
  content: "";
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: 0;
  background: var(--category-badge-color, var(--brand));
}
.post-body .badge-wrapper .badge-category::before { content: none; }

/* Tables */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
  font-size: 14px;
  display: block;
  overflow-x: auto;
}
.post-body th, .post-body td {
  border: 1px solid var(--border);
  padding: 7px 11px;
  text-align: left;
}
.post-body th { background: var(--surface-2); font-weight: 700; }

/* Media */
.post-body iframe, .post-body video {
  max-width: 100%;
  border: 0;
  border-radius: 8px;
}

/* Lightbox wrappers: keep image, hide Discourse meta/controls chrome */
.post-body .lightbox-wrapper { display: block; margin: 0 0 12px; }
.post-body .lightbox-wrapper .meta { display: none; }
.post-body svg.d-icon, .post-body svg.svg-icon, .post-body svg.fa { display: none; }
.post-body a.anchor { float: left; margin-left: -18px; opacity: 0; }

/* Imported polls and misc — neutralize layout damage */
.post-body [style*="clear: both"] { clear: both; }

/* ---------- Forms ---------- */
.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 14px;
  padding: 20px;
  margin-bottom: 20px;
}
.form.reply { margin-top: 8px; }
.form.compact { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.form.narrow { max-width: 560px; }
.form label, .copy-label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-2);
}
input, select, textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea {
  background: var(--surface-2);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.hint { color: var(--ink-3); font-size: 13px; margin: 0; }

.composer-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.composer-status { color: var(--ink-3); font-size: 13px; }
.composer-status.is-error { color: var(--danger); font-weight: 600; }

.post-body a.attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 11px;
  font-weight: 600;
  font-size: 14px;
}
.post-body a.attachment::before { content: "📎"; font-size: 13px; }

.auth-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  max-width: 920px;
  align-items: start;
}
.auth-grid .form { margin: 0; }
.text-link { color: var(--brand-strong); font-weight: 650; }
[data-theme="dark"] .text-link { color: var(--brand); }

.notice {
  background: var(--warn-soft);
  border: 1px solid var(--warn-border);
  color: var(--warn-ink);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 0 16px;
}
.notice.error { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }

.admin-actions { display: flex; gap: 8px; margin: 0 0 16px; }

.empty {
  color: var(--ink-2);
  padding: 32px 18px;
  text-align: center;
}

.error-page { text-align: center; padding: 48px 0 24px; }
.error-page .code { font-size: 56px; font-weight: 800; color: var(--border-strong); line-height: 1; }
.error-page h1 { margin: 12px 0 8px; }
.error-page p { color: var(--ink-2); margin: 0 0 20px; }

.hp-field { position: absolute; left: -10000px; top: auto; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 50px;
  padding: 24px 22px;
  color: var(--ink-3);
  font-size: 13px;
}
.site-footer .inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}
.site-footer a { color: var(--ink-2); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .topbar { gap: 12px; padding: 0 14px; }
  .brand .brand-text { display: none; }
  .nav-toggle { display: inline-grid; }
  .topnav {
    display: none;
    position: absolute;
    top: 64px; right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 12px;
    min-width: 210px;
  }
  .topnav.open { display: flex; }
  .topnav .button.ghost {
    color: var(--ink) !important;
    border-color: var(--border-strong);
    justify-content: flex-start;
  }
  .topnav .user { color: var(--ink); }

  .shell { padding: 18px 14px 48px; }
  h1 { font-size: 22px; }

  .topic-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .topic-row .col-last { display: none; }
  .topic-row .col-num.views { display: none; }
  .sec-head .sec-metrics { gap: 14px; }
  .sec-head .sec-link { display: none; }
  .form.compact { grid-template-columns: 1fr; }
  .auth-grid { grid-template-columns: 1fr; }
  .post { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .post-body aside.onebox img.thumbnail,
  .post-body aside.onebox .onebox-avatar { max-width: 64px; max-height: 64px; }
}

@media (max-width: 540px) {
  .topic-row .col-num.posts { display: none; }
  .sec-head .sec-desc { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
