:root {
  --bg: #f6f4ef;
  --surface: #fffefa;
  --surface-soft: #eeece6;
  --surface-tint: #edf4f8;
  --ink: #162b3e;
  --ink-strong: #0e2234;
  --muted: #65717b;
  --line: #dcdedc;
  --line-strong: #c8cecf;
  --red: #d9374a;
  --red-dark: #b72437;
  --blue: #277fb8;
  --gold: #e4a829;
  --green: #3d8b70;
  --violet: #7e6baa;
  --slate: #596875;
  --navy: #152c41;
  --white: #fff;
  --shadow-sm: 0 2px 10px rgba(24, 44, 64, 0.06);
  --shadow-md: 0 18px 50px rgba(24, 44, 64, 0.11);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shell: 1240px;
  --font: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  --heading: "Arial Narrow", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #101a23;
  --surface: #162430;
  --surface-soft: #1b2c39;
  --surface-tint: #172d3c;
  --ink: #e8edf0;
  --ink-strong: #fff;
  --muted: #9daab3;
  --line: #2b3c48;
  --line-strong: #3b4f5c;
  --navy: #0c1720;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.16);
  --shadow-md: 0 20px 55px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-size: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  color: inherit;
}

img {
  max-width: 100%;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 7px;
  background: var(--ink-strong);
  color: var(--surface);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(var(--shell), calc(100% - 48px));
  margin-inline: auto;
}

.site-accent {
  height: 5px;
  background: linear-gradient(90deg, var(--red) 0 25%, var(--gold) 25% 50%, #f06443 50% 66%, var(--blue) 66% 100%);
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 93%, transparent);
  backdrop-filter: blur(18px);
}

.header-row {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 46px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--ink-strong);
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 11px;
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--red) 25%, transparent);
}

.brand-mark b {
  position: relative;
  z-index: 1;
  font: 900 24px/1 var(--heading);
  letter-spacing: -0.08em;
}

.brand-mark i {
  position: absolute;
  right: -12px;
  bottom: -15px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--blue);
}

.brand-copy {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 4px;
  line-height: 1;
}

.brand-copy strong {
  color: var(--red);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.brand-copy b {
  font: 800 24px/1 var(--heading);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.brand-copy small {
  grid-column: 1 / -1;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-self: stretch;
  gap: 30px;
}

.main-nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--ink-strong);
}

.main-nav a[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: var(--red);
  content: "";
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 17px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  transition: 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--red) 22%, transparent);
}

.button--primary:hover {
  border-color: var(--red-dark);
  background: var(--red-dark);
}

.button--ghost {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.button--ghost:hover {
  border-color: var(--ink);
}

.button--dark {
  background: var(--navy);
  color: #fff;
}

.button--large {
  min-height: 50px;
  padding-inline: 22px;
}

.button--block {
  width: 100%;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
}

.theme-toggle {
  font-size: 18px;
}

[data-theme="dark"] .theme-light,
.theme-dark {
  display: none;
}

[data-theme="dark"] .theme-dark {
  display: inline;
}

.notification-link {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.notification-link > span {
  font-size: 16px;
}

.notification-link b {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 9px;
}

.mobile-menu-button {
  width: 42px;
  height: 42px;
  display: none;
  place-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 10px;
}

.mobile-menu-button span {
  width: 19px;
  height: 2px;
  display: block;
  background: var(--ink);
}

.mobile-menu {
  display: grid;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 10px 24px 18px;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu a {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 81% 30%, color-mix(in srgb, var(--blue) 14%, transparent) 0 3px, transparent 4px),
    linear-gradient(115deg, var(--surface) 0 63%, var(--surface-tint) 63% 100%);
}

.hero::before {
  position: absolute;
  top: -250px;
  right: -160px;
  width: 550px;
  height: 550px;
  border: 1px solid color-mix(in srgb, var(--blue) 20%, transparent);
  border-radius: 50%;
  content: "";
}

.hero-grid {
  position: relative;
  min-height: 510px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.75fr);
  align-items: center;
  gap: 76px;
  padding-block: 70px;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-copy > .eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-copy > .eyebrow span {
  width: 23px;
  height: 2px;
  background: var(--red);
}

.hero h1,
.page-top h1,
.auth-visual h1,
.admin-heading h1,
.account-heading h1 {
  margin: 0;
  color: var(--ink-strong);
  font: 820 clamp(42px, 4.5vw, 68px)/0.98 var(--heading);
  letter-spacing: -0.055em;
}

.hero h1 em {
  position: relative;
  color: var(--red);
  font-style: normal;
}

.hero h1 em::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
  transform: rotate(-1deg);
}

.hero-lead {
  max-width: 650px;
  margin: 27px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
}

.text-link {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.text-link span {
  margin-left: 6px;
  color: var(--red);
}

.hero-panel {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--blue) 25%, var(--line));
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  box-shadow: var(--shadow-md);
  padding: 17px;
}

.hero-panel::before {
  position: absolute;
  z-index: -1;
  right: -16px;
  bottom: -16px;
  width: 100%;
  height: 100%;
  border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line));
  border-radius: var(--radius-lg);
  content: "";
}

.hero-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 15px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-panel-head strong {
  color: var(--green);
  font-size: 10px;
}

.hero-panel-head i,
.topic-status i,
.system-ok i {
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  background: #42a982;
  box-shadow: 0 0 0 4px color-mix(in srgb, #42a982 12%, transparent);
}

.hot-topic {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  padding: 19px;
}

.hot-topic-number {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.hot-topic > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.hot-topic small {
  color: #aebbc5;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hot-topic strong {
  font-size: 15px;
}

.hot-topic > b {
  color: var(--gold);
  font-size: 19px;
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 1px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--line);
}

.hero-stats p {
  display: grid;
  gap: 2px;
  margin: 0;
  background: var(--surface-soft);
  padding: 16px 18px;
}

.hero-stats strong {
  color: var(--ink-strong);
  font-size: 22px;
}

.hero-stats span {
  color: var(--muted);
  font-size: 10px;
}

.search-band {
  border-bottom: 1px solid var(--line);
  background: var(--navy);
  color: #fff;
}

.search-band-row {
  min-height: 102px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 36px;
}

.global-search {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.global-search > label {
  color: #b9c4cc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-input {
  height: 52px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid #405467;
  border-radius: 10px;
  background: #21384c;
}

.search-input > span {
  padding-left: 16px;
  color: var(--gold);
  font-size: 26px;
  transform: rotate(-15deg);
}

.search-input input {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  padding: 0 14px;
}

.search-input input::placeholder {
  color: #91a2ae;
}

.search-input button {
  align-self: stretch;
  border: 0;
  background: var(--red);
  color: #fff;
  padding-inline: 24px;
  font-weight: 850;
}

.popular-searches {
  display: flex;
  gap: 11px;
  color: #b2c0c9;
  font-size: 10px;
}

.popular-searches a {
  border-bottom: 1px dotted #778b99;
  color: #fff;
}

.categories-section {
  padding-block: 64px 52px;
}

.section-heading,
.feed-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2,
.feed-heading h2,
.sidebar-card h2,
.reply-composer h2,
.form-card h2,
.auth-card h2,
.admin-panel h2,
.creation-sidebar h2 {
  margin: 0;
  color: var(--ink-strong);
  font: 800 30px/1.1 var(--heading);
  letter-spacing: -0.035em;
}

.section-heading a {
  color: var(--red);
  font-size: 12px;
  font-weight: 850;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.category-card {
  --category: var(--slate);
  min-height: 102px;
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 21px;
  transition: 160ms ease;
}

.category-card:nth-child(3n) {
  border-right: 0;
}

.category-card:nth-child(n + 4) {
  border-bottom: 0;
}

.category-card:hover {
  background: color-mix(in srgb, var(--category) 7%, var(--surface));
}

.category-card > span {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--category) 13%, var(--surface));
  color: var(--category);
  font-size: 10px;
  font-weight: 900;
}

.category-card > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.category-card strong {
  color: var(--ink-strong);
  font-size: 14px;
}

.category-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-card > b {
  color: var(--category);
  font-size: 12px;
}

.category-card--red { --category: var(--red); }
.category-card--blue { --category: var(--blue); }
.category-card--gold { --category: var(--gold); }
.category-card--green { --category: var(--green); }
.category-card--violet { --category: var(--violet); }
.category-card--slate { --category: var(--slate); }

.archive-callout {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--slate) 9%, var(--surface)), var(--surface) 60%);
  box-shadow: var(--shadow-sm);
  padding: 14px 19px 14px 14px;
}

.archive-callout:hover {
  border-color: var(--slate);
}

.archive-callout-year {
  min-height: 58px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  line-height: 0.85;
  text-align: center;
}

.archive-callout > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.archive-callout small {
  color: var(--red);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.archive-callout strong {
  color: var(--ink-strong);
  font-size: 16px;
}

.archive-callout span > b {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.archive-callout > i {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}

.archive-callout > i b {
  margin-left: 9px;
  color: var(--red);
  font-size: 15px;
}

.forum-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 34px;
  padding-bottom: 74px;
}

.feed-tabs {
  display: flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  padding: 4px;
}

.feed-tabs button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 7px 11px;
  font-size: 10px;
  font-weight: 800;
}

.feed-tabs button.is-active {
  background: var(--navy);
  color: #fff;
}

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

.topic-card {
  min-height: 172px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 140px;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 24px 23px 21px 16px;
}

.topic-card:last-child {
  border-bottom: 0;
}

.topic-card--featured {
  background: linear-gradient(90deg, color-mix(in srgb, var(--red) 5%, var(--surface)), var(--surface) 44%);
}

.topic-vote {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 2px;
  color: var(--muted);
  padding-top: 2px;
}

.topic-vote span {
  color: var(--red);
  font-size: 17px;
}

.topic-vote strong {
  font-size: 12px;
}

.topic-main {
  min-width: 0;
}

.topic-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 4px 9px;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.pill--accent {
  background: color-mix(in srgb, var(--red) 11%, var(--surface));
  color: var(--red);
}

.topic-status {
  display: inline-flex;
  align-items: center;
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
}

.topic-main h3 {
  margin: 10px 0 5px;
  color: var(--ink-strong);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.topic-main h3 a:hover {
  color: var(--red);
}

.topic-main > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.topic-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 9px;
}

.topic-meta strong {
  color: var(--ink);
}

.avatar {
  width: 28px;
  height: 28px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--slate);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.avatar--large {
  width: 54px;
  height: 54px;
  font-size: 19px;
}

.avatar--red { background: var(--red); }
.avatar--blue { background: var(--blue); }
.avatar--gold { background: var(--gold); color: #26323a; }
.avatar--green { background: var(--green); }

.topic-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 12px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.topic-stats p {
  display: grid;
  margin: 0;
}

.topic-stats strong {
  color: var(--ink-strong);
  font-size: 15px;
}

.topic-stats span {
  color: var(--muted);
  font-size: 8px;
}

.topic-last {
  grid-column: 1 / -1;
  margin-top: 5px !important;
}

.topic-last strong {
  font-size: 10px;
}

.load-more {
  display: flex;
  justify-content: center;
  padding: 18px;
}

.forum-sidebar,
.thread-sidebar,
.creation-sidebar,
.admin-side-stack {
  display: grid;
  gap: 17px;
}

.sidebar-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 23px;
}

.guest-card {
  overflow: hidden;
  border-color: #314d62;
  background:
    radial-gradient(circle at 105% 0, #284b63 0 90px, transparent 91px),
    var(--navy);
  color: #fff;
}

.guest-card .eyebrow {
  color: var(--gold);
}

.guest-card h2 {
  max-width: 230px;
  color: #fff;
  font-size: 27px;
}

.guest-card > p:not(.eyebrow) {
  margin: 14px 0 18px;
  color: #b7c4ce;
  font-size: 12px;
}

.guest-card ol {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.guest-card li {
  display: flex;
  align-items: center;
  gap: 11px;
}

.guest-card li > span {
  width: 27px;
  height: 27px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #52697a;
  border-radius: 50%;
  color: var(--gold);
  font-size: 9px;
  font-weight: 850;
}

.guest-card li p {
  display: grid;
  margin: 0;
}

.guest-card li strong {
  font-size: 11px;
}

.guest-card li small {
  color: #9fb0bd;
  font-size: 9px;
}

.guest-card .button {
  width: 100%;
  background: #fff;
  color: var(--navy);
}

.sidebar-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-card-head i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.community-card dl {
  display: grid;
  gap: 0;
  margin: 15px 0 17px;
}

.community-card dl div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.community-card dt {
  color: var(--muted);
  font-size: 10px;
}

.community-card dd {
  margin: 0;
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 850;
}

.community-card > p {
  display: flex;
  align-items: center;
  margin: 0;
}

.community-card > p .avatar {
  margin-right: -7px;
  border: 2px solid var(--surface);
}

.community-card > p small {
  margin-left: 14px;
  color: var(--muted);
  font-size: 9px;
}

.rules-card,
.sidebar-note,
.moderation-explainer {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.rule-symbol,
.sidebar-note > span {
  width: 33px;
  height: 33px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--green) 13%, var(--surface));
  color: var(--green);
  font-weight: 900;
}

.rules-card strong,
.sidebar-note strong,
.moderation-explainer strong {
  color: var(--ink-strong);
  font-size: 12px;
}

.rules-card p,
.sidebar-note p,
.moderation-explainer p {
  margin: 5px 0;
  color: var(--muted);
  font-size: 10px;
}

.rules-card a {
  color: var(--red);
  font-size: 10px;
  font-weight: 850;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.site-footer > .site-accent {
  height: 3px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 50px;
  padding-block: 47px 38px;
}

.footer-grid > div > p {
  max-width: 330px;
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.footer-grid nav {
  display: grid;
  align-content: start;
  gap: 10px;
  font-size: 11px;
}

.footer-grid nav strong {
  margin-bottom: 5px;
  color: var(--ink-strong);
  font-size: 11px;
}

.footer-grid nav a {
  color: var(--muted);
}

.footer-grid nav a:hover {
  color: var(--red);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-block: 16px;
  color: var(--muted);
  font-size: 9px;
}

/* Thread */
.page-top {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(100deg, var(--surface) 0 68%, var(--surface-tint) 68%),
    var(--surface);
}

.page-top > .site-shell {
  padding-block: 35px 39px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 10px;
}

.breadcrumbs a:hover {
  color: var(--red);
}

.thread-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 40px;
}

.thread-heading h1 {
  max-width: 850px;
  margin-top: 12px;
  font-size: clamp(36px, 4vw, 55px);
}

.thread-heading p,
.narrow-heading > p:last-child,
.account-heading p,
.admin-heading > div > p:last-child {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.thread-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 278px;
  align-items: start;
  gap: 31px;
  padding-block: 40px 72px;
}

.conversation {
  display: grid;
  gap: 16px;
}

.post {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.post--original {
  border-top: 3px solid var(--red);
}

.post-author {
  display: grid;
  align-content: start;
  justify-items: center;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 26px 14px;
  text-align: center;
}

.post-author strong {
  margin-top: 10px;
  color: var(--ink-strong);
  font-size: 12px;
}

.post-author small {
  color: var(--blue);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.post-author .guest-label {
  color: var(--green);
}

.post-author > span:last-child {
  margin-top: 9px;
  color: var(--muted);
  font-size: 8px;
}

.post-body {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.post-body > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 11px 17px;
  color: var(--muted);
  font-size: 9px;
}

.post-body > header b {
  color: var(--red);
}

.post-body > header em {
  font-style: normal;
}

.post-body > header button {
  border: 0;
  background: transparent;
  color: var(--muted);
}

.post-copy {
  min-height: 150px;
  padding: 24px 27px;
  color: var(--ink);
  font-size: 14px;
}

.post-copy p {
  margin: 0 0 14px;
}

.post-copy p:last-child {
  margin-bottom: 0;
}

.post-copy blockquote {
  margin: 0 0 16px;
  border-left: 3px solid var(--gold);
  background: var(--surface-soft);
  color: var(--muted);
  padding: 12px 15px;
  font-size: 12px;
}

.post-body > footer {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 11px 17px;
}

.post-body > footer button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 9px;
  font-weight: 750;
}

.post-body > footer button:last-child {
  margin-left: auto;
  border-color: transparent;
}

.reply-composer {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 26px;
}

.composer-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.composer-heading > span {
  color: var(--gold);
  font-size: 9px;
  font-weight: 800;
}

.identity-tabs {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  padding: 4px;
}

.identity-tabs button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 8px 13px;
  font-size: 10px;
  font-weight: 800;
}

.identity-tabs button.is-active {
  background: var(--surface);
  color: var(--ink-strong);
  box-shadow: var(--shadow-sm);
}

.identity-panel {
  margin-top: 14px;
}

.identity-panel[hidden] {
  display: none;
}

.inline-info {
  margin: 0 0 11px;
  border-left: 3px solid var(--blue);
  background: var(--surface-tint);
  color: var(--muted);
  padding: 10px 13px;
  font-size: 10px;
}

.textarea-label,
.form-body > label,
.form-grid label,
.auth-card > label {
  display: grid;
  gap: 7px;
  color: var(--ink-strong);
  font-size: 11px;
  font-weight: 800;
}

.reply-composer > .textarea-label {
  margin-top: 17px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  padding: 12px 13px;
}

input,
select {
  min-height: 46px;
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 13%, transparent);
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.textarea-label > small,
.form-body > label > small {
  justify-self: end;
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
}

.composer-actions > small {
  color: var(--muted);
  font-size: 9px;
}

.thread-sidebar {
  position: sticky;
  top: 100px;
}

.thread-facts {
  display: grid;
  margin: 8px 0 0;
}

.thread-facts > div {
  display: grid;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.thread-facts > div:last-child {
  border-bottom: 0;
}

.thread-facts dt {
  color: var(--muted);
  font-size: 9px;
}

.thread-facts dd {
  margin: 0;
  color: var(--ink-strong);
  font-size: 11px;
  font-weight: 800;
}

.back-link {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

/* New topic */
.page-top--form {
  background:
    radial-gradient(circle at 90% 50%, color-mix(in srgb, var(--gold) 15%, transparent), transparent 18%),
    var(--surface);
}

.narrow-heading {
  max-width: 870px;
  margin-inline: auto;
  padding-block: 38px 48px !important;
  text-align: center;
}

.narrow-heading .breadcrumbs {
  justify-content: center;
}

.narrow-heading h1 {
  font-size: clamp(40px, 5vw, 62px);
}

.narrow-heading > p:last-child {
  max-width: 610px;
  margin-inline: auto;
}

.creation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 32px;
  padding-block: 42px 75px;
}

.creation-form {
  display: grid;
  gap: 18px;
}

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

.form-card > header {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 19px 24px;
}

.form-card > header > span {
  width: 37px;
  height: 37px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.form-card h2 {
  font-size: 23px;
}

.form-card header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.form-body {
  display: grid;
  gap: 20px;
  padding: 25px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.publish-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choice-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 15px;
  text-align: left;
}

.choice-card.is-selected {
  border-color: var(--red);
  background: color-mix(in srgb, var(--red) 4%, var(--surface));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--red) 10%, transparent);
}

.choice-radio {
  width: 17px;
  height: 17px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
}

.choice-card.is-selected .choice-radio {
  border: 5px solid var(--red);
}

.choice-card > div {
  display: grid;
}

.choice-card strong {
  color: var(--ink-strong);
  font-size: 11px;
}

.choice-card small {
  color: var(--muted);
  font-size: 8px;
}

.choice-card > b {
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 4px 7px;
  font-size: 8px;
  text-transform: uppercase;
}

.publish-panel[hidden] {
  display: none;
}

.verification-note {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 17px;
  border-radius: 9px;
  background: var(--surface-tint);
  padding: 14px;
}

.verification-note > span {
  width: 35px;
  height: 35px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
}

.verification-note p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.verification-note strong {
  color: var(--ink-strong);
  font-size: 10px;
}

.verification-note small {
  color: var(--muted);
  font-size: 9px;
}

.turnstile-placeholder {
  min-height: 76px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: var(--surface-soft);
  padding: 14px;
}

.turnstile-placeholder > span {
  color: var(--blue);
  font-size: 28px;
}

.turnstile-placeholder p {
  display: grid;
  margin: 0;
}

.turnstile-placeholder strong {
  color: var(--ink-strong);
  font-size: 10px;
}

.turnstile-placeholder small,
.turnstile-placeholder i {
  color: var(--muted);
  font-size: 8px;
}

.turnstile-placeholder i {
  font-style: normal;
}

.check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.check-label input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 auto;
  margin: 1px 0 0;
}

.form-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.form-submit-row p {
  display: grid;
  margin: 0;
}

.form-submit-row strong {
  color: var(--ink-strong);
  font-size: 10px;
}

.form-submit-row span {
  color: var(--muted);
  font-size: 9px;
}

.sticky-card {
  position: sticky;
  top: 100px;
}

.quality-list {
  display: grid;
  gap: 13px;
  margin: 19px 0;
  padding: 0;
  list-style: none;
}

.quality-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
}

.quality-list span {
  color: var(--green);
  font-weight: 900;
}

.sticky-card > a {
  color: var(--red);
  font-size: 10px;
  font-weight: 850;
}

.moderation-explainer > span {
  width: 43px;
  height: 43px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--gold) 18%, var(--surface));
  color: color-mix(in srgb, var(--gold) 75%, #543000);
  font-size: 9px;
  font-weight: 900;
}

/* Auth */
.auth-page {
  min-height: calc(100vh - 5px);
  display: grid;
  grid-template-columns: minmax(390px, 0.85fr) minmax(520px, 1.15fr);
  background: var(--surface);
}

.auth-visual {
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 20%, rgba(39, 127, 184, 0.3) 0 85px, transparent 86px),
    radial-gradient(circle at 10% 90%, rgba(228, 168, 41, 0.2) 0 120px, transparent 121px),
    var(--navy);
  color: #fff;
  padding: 44px clamp(34px, 5vw, 72px);
}

.brand--light {
  color: #fff;
}

.brand--light .brand-copy b,
.brand--light .brand-copy small {
  color: #fff;
}

.auth-visual > div {
  align-self: center;
  max-width: 560px;
}

.auth-visual > div .eyebrow {
  color: var(--gold);
}

.auth-visual h1 {
  color: #fff;
  font-size: clamp(43px, 5vw, 67px);
}

.auth-visual > div > p:last-child {
  max-width: 460px;
  margin-top: 23px;
  color: #b8c5ce;
  font-size: 15px;
}

.auth-visual blockquote {
  max-width: 470px;
  margin: 0;
  border-left: 3px solid var(--gold);
  color: #b8c5ce;
  padding-left: 18px;
  font-size: 11px;
}

.auth-form-wrap {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 35px clamp(35px, 7vw, 105px);
}

.auth-back {
  justify-self: end;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.auth-card {
  width: min(100%, 470px);
  display: grid;
  align-self: center;
  justify-self: center;
  gap: 17px;
  padding-block: 38px;
}

.auth-card h2 {
  font-size: 42px;
}

.auth-card > p:not(.eyebrow) {
  margin: -9px 0 5px;
  color: var(--muted);
  font-size: 11px;
}

.auth-card a {
  color: var(--red);
  font-weight: 800;
}

.oauth-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.oauth-buttons button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
}

.oauth-buttons span {
  margin-right: 8px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 900;
}

.oauth-buttons button:last-child span {
  color: #4267b2;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 8px;
}

.divider::before,
.divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  padding-right: 70px;
}

.password-wrap button {
  position: absolute;
  top: 50%;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 9px;
  font-weight: 800;
  transform: translateY(-50%);
}

.form-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
}

.check-label--small {
  align-items: center;
}

.check-label--small input {
  width: 15px;
  min-height: 15px;
}

.auth-note {
  color: var(--muted);
  font-size: 8px;
  text-align: center;
}

.auth-card--register {
  gap: 14px;
  padding-block: 25px;
}

.auth-card--register h2,
.auth-card--forgot h2 {
  font-size: 38px;
}

.password-strength {
  display: grid;
  gap: 6px;
  margin-top: -8px;
}

.password-strength > span {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.password-strength i {
  height: 3px;
  border-radius: 99px;
  background: var(--line);
}

.password-strength i:first-child {
  background: var(--gold);
}

.password-strength small {
  color: var(--muted);
  font-size: 8px;
}

.auth-card--register .verification-note {
  margin-top: 0;
}

.auth-card--forgot {
  max-width: 440px;
}

/* Account */
.compact-top > .site-shell {
  padding-block: 44px;
}

.compact-top h1,
.account-heading h1 {
  font-size: clamp(40px, 5vw, 58px);
}

.account-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.account-layout {
  min-height: 520px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
  padding-block: 38px 70px;
}

.account-nav {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.account-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 13px 15px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.account-nav a:last-child {
  border-bottom: 0;
}

.account-nav a.is-active {
  border-left: 3px solid var(--red);
  background: color-mix(in srgb, var(--red) 5%, var(--surface));
  color: var(--ink-strong);
}

.account-nav b {
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 8px;
}

.notification-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.notification-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  padding: 18px 21px;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item.is-new {
  background: color-mix(in srgb, var(--blue) 4%, var(--surface));
}

.notification-item > div p {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
}

.notification-item a {
  color: var(--red);
  font-weight: 800;
}

.notification-item small {
  color: var(--muted);
  font-size: 8px;
}

.notification-item > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

.notification-symbol {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--green);
  font-weight: 900;
}

/* Admin */
.admin-shell {
  min-height: calc(100vh - 5px);
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  background: var(--bg);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--navy);
  color: #fff;
  padding: 26px 18px 19px;
}

.brand--admin {
  color: #fff;
  padding: 0 8px;
}

.brand--admin .brand-copy b {
  color: #fff;
}

.brand--admin .brand-copy small {
  color: #93a4b0;
}

.admin-sidebar nav {
  display: grid;
  align-content: start;
  gap: 3px;
  margin-top: 35px;
}

.admin-sidebar nav > span {
  margin: 18px 11px 6px;
  color: #6f8594;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-sidebar nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  color: #b8c4cc;
  padding: 10px 11px;
  font-size: 10px;
  font-weight: 750;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.is-active {
  background: #223d53;
  color: #fff;
}

.admin-sidebar nav a.is-active {
  box-shadow: inset 3px 0 var(--red);
}

.admin-sidebar nav b {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 8px;
}

.admin-user {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #30485b;
  padding: 16px 6px 0;
}

.admin-user p {
  display: grid;
  margin: 0;
}

.admin-user strong {
  font-size: 9px;
}

.admin-user small {
  color: #8297a6;
  font-size: 8px;
}

.admin-user button {
  border: 0;
  background: transparent;
  color: #8297a6;
}

.admin-content {
  min-width: 0;
}

.admin-topbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 0 32px;
}

.admin-topbar > div {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-topbar p {
  display: grid;
  margin: 0;
}

.admin-topbar p span {
  color: var(--muted);
  font-size: 8px;
}

.admin-topbar p strong {
  color: var(--ink-strong);
  font-size: 10px;
}

.admin-topbar a {
  color: var(--red);
  font-size: 9px;
  font-weight: 800;
}

.admin-mobile-menu {
  display: none;
  border: 0;
  background: transparent;
}

.admin-main {
  width: min(1380px, calc(100% - 64px));
  margin-inline: auto;
  padding-block: 36px 60px;
}

.admin-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.admin-heading h1 {
  font-size: 45px;
}

.admin-heading .button > span {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--red);
  font-size: 8px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.admin-stats article {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 19px;
}

.admin-stats article::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--blue);
  content: "";
}

.admin-stats article:first-child::before {
  background: var(--red);
}

.admin-stats article > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.admin-stats article > strong {
  margin-top: 8px;
  color: var(--ink-strong);
  font-size: 32px;
  line-height: 1;
}

.admin-stats article > small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 8px;
}

.trend {
  justify-self: start;
  margin-top: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 12%, var(--surface));
  color: var(--green);
  padding: 4px 7px;
  font-size: 7px;
  font-style: normal;
  font-weight: 850;
}

.trend--red {
  background: color-mix(in srgb, var(--red) 10%, var(--surface));
  color: var(--red);
}

.trend--blue {
  background: color-mix(in srgb, var(--blue) 11%, var(--surface));
  color: var(--blue);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.7fr);
  align-items: start;
  gap: 17px;
  margin-top: 17px;
}

.admin-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.admin-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
}

.admin-panel h2 {
  font-size: 20px;
}

.admin-panel header .eyebrow {
  margin-bottom: 5px;
}

.admin-panel header a {
  color: var(--red);
  font-size: 9px;
  font-weight: 800;
}

.moderation-preview > article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
}

.moderation-preview > article:last-child {
  border-bottom: 0;
}

.moderation-preview article > div:nth-child(2) {
  min-width: 0;
}

.moderation-preview article p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 8px;
}

.moderation-preview article h3 {
  overflow: hidden;
  margin: 5px 0 2px;
  color: var(--ink-strong);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moderation-buttons {
  display: flex;
  gap: 5px;
}

.moderation-buttons button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 900;
}

.moderation-buttons button:first-child {
  border-color: color-mix(in srgb, var(--green) 35%, var(--line));
  color: var(--green);
}

.moderation-buttons button:nth-child(2) {
  border-color: color-mix(in srgb, var(--red) 35%, var(--line));
  color: var(--red);
}

.system-ok {
  color: var(--green);
  font-size: 8px;
  font-weight: 800;
}

.health-panel ul {
  margin: 0;
  padding: 9px 20px 16px;
  list-style: none;
}

.health-panel li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  color: var(--muted);
  font-size: 9px;
}

.health-panel li:last-child {
  border-bottom: 0;
}

.health-panel li strong {
  color: var(--ink);
  font-size: 8px;
}

.quick-actions > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 16px;
}

.quick-actions button {
  min-height: 57px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 9px;
  font-size: 8px;
  font-weight: 750;
}

/* Search */
.search-page-form {
  max-width: 820px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0;
  margin-top: 25px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 5px;
}

.search-page-form > span {
  padding-left: 13px;
  color: var(--red);
  font-size: 24px;
}

.search-page-form input {
  border: 0;
  box-shadow: none;
}

.search-results {
  padding-block: 38px 70px;
}

.search-results > header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
}

.search-results > header p {
  margin: 0;
}

.search-results > header strong {
  color: var(--ink-strong);
}

.demo-toast {
  position: fixed;
  z-index: 1000;
  right: 22px;
  bottom: 22px;
  width: min(360px, calc(100% - 44px));
  display: grid;
  gap: 3px;
  border-left: 4px solid var(--gold);
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
  padding: 15px 18px;
}

.demo-toast[hidden] {
  display: none;
}

.demo-toast strong {
  font-size: 11px;
}

.demo-toast span {
  color: #b9c6ce;
  font-size: 9px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 38%, transparent);
  outline-offset: 2px;
}

@media (max-width: 1120px) {
  .main-nav { display: none; }
  .hero-grid { gap: 44px; }
  .forum-layout { grid-template-columns: minmax(0, 1fr) 285px; gap: 24px; }
  .category-card { padding: 17px; }
  .thread-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; }
  .creation-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-side-stack { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .site-shell { width: min(100% - 32px, 820px); }
  .header-row { min-height: 70px; }
  .header-login, .notification-link { display: none; }
  .mobile-menu-button { display: grid; }
  .hero { background: var(--surface); }
  .hero-grid { min-height: 0; grid-template-columns: 1fr; padding-block: 55px; }
  .hero-panel { max-width: 620px; }
  .search-band-row { grid-template-columns: 1fr; gap: 0; padding-block: 19px; }
  .popular-searches { display: none; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-card, .category-card:nth-child(3n), .category-card:nth-child(n + 4) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .category-card:nth-child(even) { border-right: 0; }
  .category-card:nth-last-child(-n + 2) { border-bottom: 0; }
  .forum-layout { grid-template-columns: 1fr; }
  .forum-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guest-card { grid-row: span 2; }
  .thread-layout { grid-template-columns: 1fr; }
  .thread-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thread-sidebar > .button, .thread-sidebar > .back-link { grid-column: 1 / -1; }
  .creation-layout { grid-template-columns: 1fr; }
  .creation-sidebar { grid-template-columns: 1fr 1fr; }
  .sticky-card { position: static; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { min-height: 460px; }
  .auth-form-wrap { min-height: 650px; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-mobile-menu { display: block; }
}

@media (max-width: 680px) {
  .site-shell { width: min(100% - 24px, 620px); }
  .site-accent { height: 4px; }
  .header-row { min-height: 66px; }
  .brand-mark { width: 37px; height: 37px; }
  .brand-copy strong { font-size: 15px; }
  .brand-copy b { font-size: 20px; }
  .brand-copy small { display: none; }
  .header-actions .theme-toggle { display: none; }
  .header-actions > .button--primary { min-width: 42px; width: 42px; padding: 0; font-size: 0; }
  .header-actions > .button--primary span { font-size: 20px; }
  .hero-grid { padding-block: 42px; }
  .hero h1 { font-size: clamp(42px, 14vw, 57px); }
  .hero-lead { font-size: 14px; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 14px; }
  .hero-actions .text-link { padding-left: 3px; }
  .hero-panel { padding: 11px; }
  .hero-panel-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .hot-topic { grid-template-columns: auto 1fr; }
  .hot-topic > b { display: none; }
  .search-band-row { padding-block: 14px; }
  .global-search { grid-template-columns: 1fr; gap: 8px; }
  .search-input { height: 48px; }
  .search-input button { padding-inline: 14px; }
  .categories-section { padding-block: 43px 37px; }
  .section-heading, .feed-heading { align-items: flex-start; flex-direction: column; }
  .section-heading h2, .feed-heading h2 { font-size: 26px; }
  .category-grid { grid-template-columns: 1fr; }
  .category-card, .category-card:nth-child(even), .category-card:nth-last-child(-n + 2) { min-height: 87px; border-right: 0; border-bottom: 1px solid var(--line); }
  .category-card:last-child { border-bottom: 0; }
  .archive-callout { grid-template-columns: 50px minmax(0, 1fr); }
  .archive-callout > i { grid-column: 2; }
  .feed-tabs { width: 100%; overflow-x: auto; }
  .feed-tabs button { flex: 1 0 auto; }
  .topic-card { grid-template-columns: 37px minmax(0, 1fr); gap: 10px; padding: 19px 14px 18px 10px; }
  .topic-stats { grid-column: 2; grid-template-columns: auto auto 1fr; border-top: 1px solid var(--line); border-left: 0; padding: 11px 0 0; }
  .topic-last { grid-column: auto; justify-self: end; text-align: right; }
  .topic-main h3 { font-size: 16px; }
  .forum-sidebar { grid-template-columns: 1fr; }
  .guest-card { grid-row: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 22px; }
  .footer-grid > div { grid-column: 1 / -1; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 5px; }
  .page-top > .site-shell { padding-block: 28px 31px; }
  .thread-heading { grid-template-columns: 1fr; gap: 20px; }
  .thread-heading .button { justify-self: start; }
  .thread-heading h1 { font-size: 37px; }
  .thread-layout { padding-block: 24px 50px; }
  .post { grid-template-columns: 1fr; }
  .post-author { grid-template-columns: auto 1fr; justify-items: start; column-gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); padding: 13px 15px; text-align: left; }
  .post-author .avatar { grid-row: 1 / span 3; }
  .post-author strong { align-self: end; margin: 0; }
  .post-author small { align-self: start; }
  .post-author > span:last-child { display: none; }
  .post-copy { min-height: 0; padding: 20px 18px; }
  .reply-composer { padding: 20px 16px; }
  .composer-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .form-grid--two { grid-template-columns: 1fr; }
  .composer-actions { align-items: stretch; flex-direction: column; }
  .thread-sidebar { grid-template-columns: 1fr; }
  .thread-sidebar > .button, .thread-sidebar > .back-link { grid-column: auto; }
  .narrow-heading { text-align: left; }
  .narrow-heading .breadcrumbs { justify-content: flex-start; }
  .narrow-heading h1 { font-size: 41px; }
  .form-card > header { align-items: flex-start; padding: 17px; }
  .form-body { padding: 19px 16px; }
  .publish-choice { grid-template-columns: 1fr; }
  .turnstile-placeholder { grid-template-columns: auto 1fr; }
  .turnstile-placeholder i { grid-column: 2; }
  .form-submit-row { align-items: stretch; flex-direction: column; }
  .creation-sidebar { grid-template-columns: 1fr; }
  .auth-visual { min-height: 420px; padding: 30px 24px; }
  .auth-visual h1 { font-size: 43px; }
  .auth-visual blockquote { display: none; }
  .auth-form-wrap { min-height: 610px; padding: 24px; }
  .auth-back { justify-self: start; }
  .oauth-buttons { grid-template-columns: 1fr; }
  .account-heading { align-items: flex-start; flex-direction: column; }
  .account-layout { grid-template-columns: 1fr; padding-block: 24px 50px; }
  .account-nav { grid-template-columns: 1fr 1fr; }
  .account-nav a { border-right: 1px solid var(--line); }
  .account-nav a:nth-child(even) { border-right: 0; }
  .notification-item { padding: 15px; }
  .admin-topbar { padding: 0 16px; }
  .admin-main { width: min(100% - 24px, 620px); padding-block: 27px 45px; }
  .admin-heading { align-items: stretch; flex-direction: column; }
  .admin-heading h1 { font-size: 39px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-side-stack { grid-template-columns: 1fr; }
  .moderation-preview > article { grid-template-columns: auto minmax(0, 1fr); padding: 14px; }
  .moderation-buttons { grid-column: 2; }
  .search-page-form { grid-template-columns: auto 1fr; }
  .search-page-form .button { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 430px) {
  .hero-stats { grid-template-columns: 1fr; }
  .topic-stats { grid-template-columns: 1fr 1fr; }
  .topic-last { display: none !important; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div { grid-column: auto; }
  .identity-tabs { width: 100%; }
  .identity-tabs button { flex: 1; }
  .post-body > footer button:last-child { display: none; }
  .admin-stats { grid-template-columns: 1fr; }
  .quick-actions > div { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001ms !important; }
}

/* Live application states */
.inline-form {
  display: inline-flex;
  margin: 0;
}

.flash {
  margin-block: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  background: var(--surface);
  padding: 13px 16px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.flash--success { border-left-color: var(--green); }
.flash--error { border-left-color: var(--red); }
.flash--info { border-left-color: var(--blue); }

.form-error,
.field-error {
  color: var(--red) !important;
}

.form-error {
  border: 1px solid color-mix(in srgb, var(--red) 35%, var(--line));
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
}

.field-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
}

.cf-turnstile {
  min-height: 65px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 22px 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pagination a {
  color: var(--red);
  text-decoration: none;
}

.empty-state {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 34px 28px;
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 24px;
}

.empty-state p { margin: 0 0 18px; color: var(--muted); }

.configuration-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding-block: 40px;
}

.configuration-page .form-card { width: min(100%, 760px); }
.configuration-page code {
  border: 1px solid var(--line);
  background: var(--surface-muted);
  padding: 2px 5px;
}

@media (max-width: 720px) {
  .inline-form { display: none; }
  .pagination { justify-content: space-between; gap: 8px; }
}
