:root {
  --bg: #f4efe8;
  --bg-soft: #fbf7f1;
  --bg-elevated: rgba(255, 251, 245, 0.88);
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: #fffdf9;
  --surface-dark: #141a1d;
  --line: rgba(31, 28, 24, 0.12);
  --line-strong: rgba(31, 28, 24, 0.2);
  --text: #181614;
  --muted: #645f58;
  --muted-strong: #413c37;
  --accent: #17353c;
  --accent-2: #9b6f3c;
  --accent-3: #365663;
  --accent-soft: rgba(23, 53, 60, 0.08);
  --success: #0f766e;
  --success-soft: rgba(15, 118, 110, 0.12);
  --danger: #b42318;
  --danger-soft: rgba(180, 35, 24, 0.12);
  --warning: #a16207;
  --warning-soft: rgba(161, 98, 7, 0.12);
  --shadow-lg: 0 28px 70px rgba(33, 24, 16, 0.12);
  --shadow-md: 0 16px 44px rgba(33, 24, 16, 0.08);
  --shadow-sm: 0 10px 26px rgba(33, 24, 16, 0.06);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: min(1280px, calc(100vw - 40px));
  --header-height: 92px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(155, 111, 60, 0.16), transparent 24%),
    radial-gradient(circle at 82% 12%, rgba(23, 53, 60, 0.17), transparent 22%),
    linear-gradient(180deg, #fbf8f4 0%, #f5efe7 40%, #efe7dc 100%);
  color: var(--text);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)),
    repeating-linear-gradient(90deg, rgba(23, 53, 60, 0.015) 0, rgba(23, 53, 60, 0.015) 1px, transparent 1px, transparent 120px),
    repeating-linear-gradient(0deg, rgba(23, 53, 60, 0.012) 0, rgba(23, 53, 60, 0.012) 1px, transparent 1px, transparent 120px);
  opacity: 0.6;
  z-index: -3;
}

img {
  max-width: 100%;
  display: block;
}

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

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

a:hover {
  text-decoration: none;
}

p,
ul,
ol {
  margin-top: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Noto Serif SC", "Source Han Serif SC", serif;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

code,
pre,
kbd,
samp {
  font-family: "SFMono-Regular", "JetBrains Mono", "Cascadia Code", monospace;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.site-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  overflow: hidden;
}

.backdrop-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(20px);
  opacity: 0.9;
}

.orb-one {
  width: 360px;
  height: 360px;
  left: -80px;
  top: 80px;
  background: radial-gradient(circle, rgba(221, 180, 133, 0.36), rgba(221, 180, 133, 0));
}

.orb-two {
  width: 420px;
  height: 420px;
  right: -80px;
  top: 40px;
  background: radial-gradient(circle, rgba(35, 88, 100, 0.22), rgba(35, 88, 100, 0));
}

.backdrop-grid {
  position: absolute;
  inset: auto -12% -20% auto;
  width: 64vw;
  max-width: 760px;
  height: 56vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 65%);
  filter: blur(40px);
}

.site-announcement-bar {
  position: relative;
  z-index: 20;
  background: linear-gradient(135deg, rgba(20, 26, 29, 0.95), rgba(23, 53, 60, 0.92));
  color: rgba(255, 251, 244, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-announcement-inner {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 4px;
}

.site-announcement-inner p {
  margin: 0;
  font-size: 0.95rem;
}

.announcement-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-strong);
}

.announcement-label {
  color: #f2d4b0;
  white-space: nowrap;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--accent-3);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 14px 0 0;
}

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-height);
  padding: 18px 26px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: rgba(255, 251, 246, 0.8);
  backdrop-filter: blur(24px) saturate(150%);
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, #182b30, #214954);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 24px rgba(23, 53, 60, 0.28);
}

.brand-mark span {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  border: 2px solid rgba(255, 248, 241, 0.92);
  position: relative;
}

.brand-mark span::before,
.brand-mark span::after {
  content: "";
  position: absolute;
  background: rgba(255, 248, 241, 0.92);
}

.brand-mark span::before {
  inset: 7px -2px 7px -2px;
  height: 2px;
}

.brand-mark span::after {
  inset: -2px 7px -2px 7px;
  width: 2px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-copy strong {
  font-size: 1.14rem;
  letter-spacing: 0.02em;
}

.brand-copy em {
  font-style: normal;
  font-size: 0.84rem;
  color: var(--muted);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  margin: 4px auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

.nav-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(180deg, transparent, var(--line), transparent);
}

.nav-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-cluster a,
.ghost-btn,
.user-chip,
.nav-notice {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  border: 1px solid transparent;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-cluster a:hover,
.ghost-btn:hover,
.user-chip:hover,
.nav-notice:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(23, 53, 60, 0.1);
}

.nav-cluster a.active,
.ghost-btn.active,
.nav-notice.active {
  background: linear-gradient(135deg, rgba(23, 53, 60, 0.12), rgba(155, 111, 60, 0.12));
  border-color: rgba(23, 53, 60, 0.18);
  color: var(--accent);
}

.ghost-btn {
  cursor: pointer;
}

.user-chip {
  padding: 6px 12px 6px 8px;
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(23, 53, 60, 0.09);
}

.nav-avatar,
.account-avatar,
.avatar-chip {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
}

.nav-avatar-fallback,
.avatar-chip.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), #325e6c);
  color: #fff;
  font-weight: 700;
}

.avatar-chip.large,
.message-conversation-avatar .avatar-chip,
.message-conversation-avatar .nav-avatar-fallback {
  width: 54px;
  height: 54px;
}

.avatar-chip.group.large {
  background: linear-gradient(135deg, var(--accent-2), #c39458);
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 0.74rem;
  line-height: 1;
}

.page-shell,
.page {
  padding: 28px 0 56px;
}

.panel,
.hero-panel,
.subtle-panel,
.message-panel-block,
.message-composer-card {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px) saturate(130%);
}

.panel {
  padding: 24px;
  margin-bottom: 18px;
}

.panel::before,
.hero-panel::before,
.message-panel-block::before,
.message-composer-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0), rgba(23, 53, 60, 0.08));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.panel-sheen {
  position: relative;
}

.section-block {
  margin-bottom: 18px;
}

.section-head,
.panel-head,
.split-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head.compact,
.panel-head {
  margin-bottom: 14px;
}

.section-head h2,
.panel-head h2,
.section-head h1 {
  font-size: clamp(1.32rem, 2vw, 2rem);
}

.section-link,
.secondary-link,
.inline-actions a {
  color: var(--accent);
  font-weight: 600;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.badges,
.chip-row,
.hero-actions,
.inline-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  min-height: 34px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(23, 53, 60, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted-strong);
}

.chip span {
  color: var(--muted);
}

.chip.active,
.badge.featured,
.badge.pin,
.badge.category,
.badge.ai-tag,
.badge.origin-tag,
.badge.ai-risk-high,
.badge.ai-risk-medium,
.badge.draft {
  border-color: transparent;
}

.badge.featured {
  background: linear-gradient(135deg, rgba(23, 53, 60, 0.12), rgba(54, 86, 99, 0.18));
  color: var(--accent);
}

.badge.pin {
  background: linear-gradient(135deg, rgba(155, 111, 60, 0.18), rgba(208, 159, 89, 0.18));
  color: #815625;
}

.badge.category,
.chip.active {
  background: linear-gradient(135deg, rgba(23, 53, 60, 0.14), rgba(23, 53, 60, 0.08));
  color: var(--accent);
}

.badge.ai-tag,
.badge.origin-tag,
.badge.ai-risk-medium {
  background: rgba(155, 111, 60, 0.14);
  color: #8f6332;
}

.badge.ai-risk-high,
.badge.draft {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
}

.simple-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.simple-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(23, 53, 60, 0.08);
}

.simple-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.simple-list li:last-child {
  padding-bottom: 0;
}

.compact-list li {
  padding: 12px 0;
}

.simple-list li > div,
.simple-list li > span,
.simple-list li > article {
  min-width: 0;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two-col,
.content-grid-main,
.post-layout-grid,
.support-grid,
.login-card,
.message-app-grid,
.editor-page-grid,
.message-composer-grid,
.message-hero-stats,
.three-up-grid,
.quick-links-grid,
.stats-grid,
.docs-card-grid {
  display: grid;
  gap: 18px;
}

.grid.two-col,
.support-grid,
.message-composer-grid,
.three-up-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-grid-main,
.post-layout-grid,
.home-hero,
.message-app-grid,
.editor-page-grid,
.login-card {
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.95fr);
  align-items: start;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.88fr);
  gap: 18px;
  margin-bottom: 20px;
}

.hero-panel {
  padding: 30px;
}

.home-hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: 18px;
}

.hero-copy h1,
.page-hero h1,
.login-copy h1,
.post-header-copy h1,
.profile-main h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  margin-bottom: 16px;
}

.hero-copy p,
.login-copy p,
.page-hero p,
.post-summary,
.profile-bio {
  color: var(--muted-strong);
  font-size: 1.04rem;
  max-width: 64ch;
}

.hero-actions {
  margin: 28px 0 24px;
}

.cta-primary,
.cta-secondary,
button,
.oauth-btn,
.search-form button,
.form-grid button,
.comment-form button,
.secondary,
.danger-btn,
.link-btn,
.inline-actions .link-btn,
.message-inline-control button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.cta-primary,
button,
.oauth-btn,
.search-form button,
.form-grid button,
.comment-form button,
.secondary,
.message-inline-control button {
  color: #fff;
  background: linear-gradient(135deg, #182a30, #315b67 58%, #4a7e8b 100%);
  box-shadow: 0 14px 28px rgba(23, 53, 60, 0.2);
}

.cta-primary:hover,
button:hover,
.oauth-btn:hover,
.search-form button:hover,
.form-grid button:hover,
.comment-form button:hover,
.secondary:hover,
.message-inline-control button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(23, 53, 60, 0.24);
}

button.secondary[data-active='1'],
button.secondary[data-following='1'] {
  background: linear-gradient(135deg, #8b5e33, #b57a43 58%, #cc9159 100%);
  box-shadow: 0 14px 28px rgba(155, 111, 60, 0.24);
}

.cta-secondary,
.ghost-btn,
.secondary-link,
.inline-actions a,
.user-chip,
.docs-card,
.guide-list-item,
.quick-links a,
.message-file-card,
.message-member-card,
.conversation-link,
.conversation-card,
.compact-post-card,
.docs-card-grid a {
  border: 1px solid rgba(23, 53, 60, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent);
}

.link-btn,
.inline-actions .link-btn {
  min-height: 38px;
  padding: 0 14px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(23, 53, 60, 0.12);
}

.danger-btn {
  color: #fff;
  background: linear-gradient(135deg, #7f1d1d, #b42318);
}

.hero-metrics,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.hero-metrics article,
.stats-grid > div {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(23, 53, 60, 0.08);
}

.hero-metrics strong,
.stats-grid span {
  display: block;
  font-size: clamp(1.4rem, 2vw, 2.2rem);
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  margin-bottom: 4px;
}

.hero-search,
.feature-spotlight,
.side-panel,
.editor-side-card,
.message-sidebar-card,
.message-main-shell-v2,
.message-sidebar-v2,
.message-conversation-head,
.message-stream-shell,
.author-side-card,
.post-content-card,
.comment-panel,
.version-panel,
.metrics-board,
.login-side-note > .panel {
  overflow: hidden;
}

.refined-search-form {
  grid-template-columns: minmax(0, 1.35fr) 180px 180px 150px;
}

.search-form,
.form-grid,
.report-form,
.comment-form,
.inline-form,
.search-inline,
.message-search-inline,
.message-inline-control {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form-grid,
.comment-form,
.login-copy,
.message-composer-card,
.editor-form-shell,
.editor-panel,
.editor-side-card {
  flex-direction: column;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
input[type="file"],
textarea,
select,
.message-box,
.quick-links a,
.inline-actions .secondary-link,
.docs-card,
.guide-list-item,
.secondary-link,
.message-empty-state,
.message-empty-inline,
.conversation-link,
.support-copy,
.support-qr-card,
.oauth-btn,
.not-found a {
  border-radius: 16px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
input[type="file"],
textarea,
select,
.message-box,
.search-inline input,
.search-inline select {
  width: 100%;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(23, 53, 60, 0.12);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(23, 53, 60, 0.38);
  box-shadow: 0 0 0 4px rgba(23, 53, 60, 0.08);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted-strong);
  font-weight: 600;
}

.search-form input,
.search-form select,
.search-form button {
  min-height: 54px;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.quick-links a,
.docs-card,
.guide-list-item,
.compact-post-card,
.message-file-card,
.message-member-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.quick-links a:hover,
.docs-card:hover,
.guide-list-item:hover,
.compact-post-card:hover,
.message-file-card:hover,
.message-member-card:hover,
.post-card:hover,
.conversation-link:hover,
.conversation-card:hover {
  transform: translateY(-2px);
  border-color: rgba(23, 53, 60, 0.18);
  box-shadow: var(--shadow-sm);
}

.post-stack,
.post-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.post-grid,
.deluxe-post-grid,
.docs-card-grid,
.three-up-grid {
  display: grid;
  gap: 18px;
}

.deluxe-post-grid,
.docs-card-grid,
.three-up-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card-immersive {
  padding: 0;
}

.post-card-body {
  padding: 0 24px 24px;
}

.article-cover-link,
.spotlight-cover-link {
  display: block;
}

.article-cover,
.post-hero,
.spotlight-cover {
  width: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.article-cover {
  aspect-ratio: 16 / 8.2;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.post-card-lead .article-cover {
  aspect-ratio: 16 / 7.2;
}

.spotlight-cover,
.post-hero {
  aspect-ratio: 4 / 3.2;
  border-radius: 22px;
}

.card-top,
.card-bottom,
.post-meta-line,
.post-stat-ribbon,
.spotlight-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.post-card h2,
.post-card h3,
.feature-spotlight h2,
.post-header-copy h1,
.compact-post-card h3,
.docs-card strong,
.guide-list-item strong,
.quick-links a {
  color: var(--text);
}

.post-card h2,
.post-card h3 {
  font-size: clamp(1.38rem, 2vw, 2rem);
  margin-bottom: 10px;
}

.post-card p,
.compact-post-card p,
.docs-card p,
.guide-list-item p,
.feature-spotlight p {
  color: var(--muted);
  margin-bottom: 0;
}

.post-inline-meta,
.message-head,
.profile-links,
.comment-item .meta,
.support-copy .meta,
.footer-bottom,
.message-file-card .meta,
.message-member-card .meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.feature-spotlight {
  padding: 26px;
}

.empty-state-card,
.message-empty-state,
.message-empty-inline,
.not-found,
.auth-panel,
.auth-panel-github,
.support-shell,
.acknowledgements-stage,
.legal-stage {
  text-align: left;
}

.empty-state-card h3,
.message-empty-state h2,
.not-found h1 {
  margin-bottom: 10px;
}

.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.page-hero h1 {
  max-width: 14ch;
}

.post-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.post-header-card {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.9fr);
  gap: 24px;
  padding: 28px;
}

.post-summary {
  margin: 18px 0;
}

.post-stat-ribbon {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(23, 53, 60, 0.08);
}

.post-content {
  color: var(--muted-strong);
}

.post-content > * + * {
  margin-top: 1.2em;
}

.post-content h1,
.post-content h2,
.post-content h3,
.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3 {
  scroll-margin-top: calc(var(--header-height) + 32px);
}

.post-content h1,
.markdown-preview h1 {
  font-size: clamp(1.7rem, 2.8vw, 2.6rem);
}

.post-content h2,
.markdown-preview h2 {
  font-size: clamp(1.42rem, 2.2vw, 2.1rem);
  margin-top: 1.7em;
}

.post-content h3,
.markdown-preview h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  margin-top: 1.45em;
}

.post-content p,
.post-content li,
.markdown-preview p,
.markdown-preview li {
  font-size: 1rem;
}

.post-content a,
.markdown-preview a,
.legal-content a {
  color: var(--accent);
  border-bottom: 1px solid rgba(23, 53, 60, 0.18);
}

.post-content blockquote,
.markdown-preview blockquote {
  margin: 1.4em 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent-2);
  background: rgba(155, 111, 60, 0.08);
  border-radius: 0 16px 16px 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(23, 53, 60, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.table-wrap table,
.post-content table,
.markdown-preview table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap th,
.table-wrap td,
.post-content th,
.post-content td,
.markdown-preview th,
.markdown-preview td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(23, 53, 60, 0.08);
  text-align: left;
}

.table-wrap tr:last-child td,
.post-content tr:last-child td,
.markdown-preview tr:last-child td {
  border-bottom: 0;
}

.code-block,
.post-content pre,
.markdown-preview pre {
  position: relative;
  margin: 1.4em 0;
  padding: 18px;
  overflow: auto;
  border-radius: 18px;
  background: linear-gradient(180deg, #14181b, #1d2529);
  color: #eff7f9;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.post-content pre code,
.markdown-preview pre code,
.code-block code {
  display: block;
  white-space: pre;
  background: transparent;
  color: inherit;
  padding: 0;
}

.post-content :not(pre) > code,
.markdown-preview :not(pre) > code {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(23, 53, 60, 0.08);
  color: var(--accent);
}

.code-copy-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #f7fbfc;
  cursor: pointer;
}

.comment-form textarea {
  min-height: 120px;
}

.comment-thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.comment-item {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(23, 53, 60, 0.08);
  background: rgba(255, 255, 255, 0.66);
}

.comment-item > p {
  margin: 12px 0;
}

.comment-parent-name {
  color: var(--accent);
}

.comment-children {
  margin-top: 14px;
  padding-left: 16px;
  border-left: 1px dashed rgba(23, 53, 60, 0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-reply-target {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(23, 53, 60, 0.08);
  color: var(--accent);
}

.ai-risk-card,
.warning-card,
.success,
.error {
  border-radius: 18px;
  padding: 16px 18px;
}

.ai-risk-card.low {
  background: rgba(23, 53, 60, 0.08);
}

.ai-risk-card.medium,
.warning-card {
  background: rgba(161, 98, 7, 0.11);
  border: 1px solid rgba(161, 98, 7, 0.16);
}

.ai-risk-card.high,
.error {
  background: rgba(180, 35, 24, 0.11);
  border: 1px solid rgba(180, 35, 24, 0.16);
}

.success {
  background: rgba(15, 118, 110, 0.12);
  border: 1px solid rgba(15, 118, 110, 0.18);
  color: #0d5c56;
}

.error {
  color: var(--danger);
}

.ai-risk-meter {
  height: 10px;
  border-radius: 999px;
  background: rgba(23, 53, 60, 0.08);
  overflow: hidden;
  margin: 14px 0 12px;
}

.ai-risk-meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f606b, #c08457);
}

.ai-risk-summary {
  font-weight: 600;
  color: var(--muted-strong);
}

.editor-page-grid {
  margin-bottom: 20px;
}

.editor-form-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.72fr);
  gap: 18px;
  align-items: start;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.upload-inline {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px dashed rgba(23, 53, 60, 0.2);
  background: rgba(255, 255, 255, 0.68);
  color: var(--accent);
  cursor: pointer;
  overflow: hidden;
}

.upload-inline input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.editor-cover-preview {
  margin-top: 16px;
}

.editor-cover-preview img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 20px;
}

.markdown-preview {
  padding: 20px;
}

.profile-hero,
.premium-profile-hero {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.profile-avatar {
  width: 144px;
  height: 144px;
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), #3b6773);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.profile-meta-grid > div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(23, 53, 60, 0.08);
}

.profile-meta-grid strong {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.auth-panel-github,
.login-stage {
  margin-top: 24px;
}

.login-card {
  gap: 18px;
}

.login-copy,
.login-side-note {
  padding: 10px;
}

.login-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.login-bullets span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(23, 53, 60, 0.08);
  color: var(--accent);
}

.oauth-btn {
  min-width: 260px;
}

.support-grid {
  align-items: stretch;
}

.support-qr-card,
.support-copy {
  justify-content: center;
}

.support-qr {
  width: min(320px, 100%);
  margin: 0 auto 14px;
  border-radius: 26px;
  box-shadow: var(--shadow-sm);
}

.legal-content,
.acknowledgements-stage .post-content {
  max-width: 78ch;
}

.message-app-grid {
  margin-top: 18px;
}

.message-sidebar-v2,
.message-main-shell-v2 {
  padding: 20px;
}

.message-sidebar-v2 {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message-sidebar-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(23, 53, 60, 0.08);
  background: rgba(255, 255, 255, 0.56);
}

.message-main-shell-v2 {
  min-height: 780px;
}

.message-conversation-head,
.message-stream-shell,
.message-panel-block,
.message-composer-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(23, 53, 60, 0.08);
  background: rgba(255, 255, 255, 0.62);
  margin-bottom: 16px;
}

.conversation-list-v2 {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.conversation-link,
.conversation-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.conversation-link.is-active,
.conversation-card.active {
  background: linear-gradient(135deg, rgba(23, 53, 60, 0.12), rgba(155, 111, 60, 0.12));
  border-color: rgba(23, 53, 60, 0.18);
}

.conversation-card-avatar,
.conversation-card-body {
  min-width: 0;
}

.conversation-card-body {
  flex: 1;
}

.conversation-card-top,
.conversation-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.conversation-card-bottom .meta {
  flex: 1;
}

.conversation-unread {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--danger);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
}

.conversation-main {
  min-width: 0;
  flex: 1;
}

.conversation-main strong,
.message-member-name strong {
  display: block;
  color: var(--text);
}

.message-conversation-identity {
  display: flex;
  align-items: center;
  gap: 16px;
}

.message-stream-header,
.message-box-v2,
.message-member-list,
.message-file-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.message-box {
  min-height: 360px;
  max-height: 620px;
  overflow: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(248, 242, 235, 0.8));
}

.message-bubble {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.message-bubble.self {
  justify-content: flex-end;
}

.message-bubble.system {
  justify-content: center;
}

.message-bubble-main {
  max-width: min(76%, 720px);
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(23, 53, 60, 0.08);
  box-shadow: var(--shadow-sm);
}

.message-bubble.self .message-bubble-main {
  background: linear-gradient(135deg, rgba(23, 53, 60, 0.96), rgba(49, 91, 103, 0.96));
  color: #f8fbfc;
}

.message-bubble.self .message-head,
.message-bubble.self .meta,
.message-bubble.self a,
.message-bubble.self .link-btn {
  color: rgba(248, 251, 252, 0.82);
}

.message-bubble.system .message-bubble-main,
.message-bubble.recalled .message-bubble-main {
  background: rgba(23, 53, 60, 0.08);
  color: var(--muted-strong);
}

.message-bubble-content {
  white-space: pre-wrap;
  word-break: break-word;
}

.message-bubble-avatar {
  padding-top: 8px;
}

.message-attachments,
.search-result-list,
.author-rank-list,
.post-admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-attachment-item,
.message-file-card,
.message-member-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(23, 53, 60, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.message-member-main {
  display: flex;
  gap: 12px;
  align-items: center;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.leaderboard-card {
  display: grid;
  grid-template-columns: 80px 72px minmax(0, 1fr) minmax(220px, 0.7fr);
  align-items: center;
  gap: 18px;
}

.leaderboard-rank {
  font-size: 1.6rem;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  color: var(--accent);
}

.directory-avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), #315b67);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.directory-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaderboard-main p {
  margin: 6px 0 0;
  color: var(--muted);
}

.leaderboard-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.leaderboard-stats > div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 53, 60, 0.08);
}

.leaderboard-stats strong {
  display: block;
  font-size: 1.28rem;
  margin-bottom: 4px;
}

.answer-list .answer-item {
  align-items: stretch;
}

.message-inline-control select,
.message-inline-control button,
.report-form select,
.report-form input,
.report-form button,
.search-inline input,
.search-inline button,
.search-inline select {
  flex: 1 1 140px;
}

.search-inline {
  align-items: stretch;
}

.message-search-inline {
  margin-bottom: 16px;
}

.message-empty-state,
.message-empty-inline,
.not-found {
  padding: 42px 28px;
  border-radius: 24px;
  border: 1px dashed rgba(23, 53, 60, 0.16);
  background: rgba(255, 255, 255, 0.58);
}

.report-form {
  align-items: stretch;
}

.toast-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 120;
}

.toast-item {
  min-width: 260px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #fff;
  background: rgba(23, 53, 60, 0.94);
  box-shadow: var(--shadow-md);
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.toast-item.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-item.error {
  background: rgba(180, 35, 24, 0.96);
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(180px, 1fr));
  gap: 22px;
  padding: 28px 0 18px;
}

.site-footer {
  margin-top: 28px;
  padding-bottom: 30px;
}

.site-footer h3 {
  font-size: 1.02rem;
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a,
.footer-note p,
.footer-intro p,
.footer-bottom {
  color: var(--muted);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(23, 53, 60, 0.08);
}

.not-found a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(23, 53, 60, 0.12);
  color: var(--accent);
}

.account-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.subtle-panel {
  background: rgba(255, 255, 255, 0.58);
}

.wrap-actions {
  row-gap: 12px;
}

.search-result-list li {
  align-items: flex-start;
}

.search-result-list li a {
  white-space: nowrap;
}

.toc-list li {
  padding-left: 0;
}

.toc-level-2 {
  padding-left: 12px;
}

.toc-level-3 {
  padding-left: 24px;
}

.question-shell,
.showcase-shell,
.tasks-shell,
.notifications-shell,
.series-shell,
.insights-shell,
.files-shell,
.developer-shell,
.support-shell,
.legal-shell,
.acknowledgements-stage {
  max-width: 100%;
}

.ops-shell {
  background:
    radial-gradient(circle at top left, rgba(163, 191, 181, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(194, 160, 107, 0.12), transparent 30%),
    linear-gradient(180deg, #f5f1e8 0%, #f2ede3 42%, #efe7da 100%);
}

.ops-brand-mark {
  text-decoration: none;
}

.ops-auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.ops-auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 420px);
  gap: 24px;
  align-items: stretch;
  padding-top: 48px;
  padding-bottom: 48px;
}

.ops-auth-copy,
.ops-auth-card,
.ops-panel-hero,
.ops-account-card,
.ops-insight-card,
.ops-overview-shell,
.ops-form-card,
.ops-list-card {
  position: relative;
  overflow: hidden;
}

.ops-auth-copy {
  padding: 38px;
  border-radius: 32px;
  background:
    linear-gradient(150deg, rgba(16, 41, 47, 0.92), rgba(24, 63, 69, 0.88)),
    linear-gradient(135deg, rgba(194, 160, 107, 0.18), rgba(255, 255, 255, 0));
  color: #f5efe4;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 60px rgba(12, 24, 27, 0.22);
}

.ops-auth-copy::before,
.ops-auth-card::before,
.ops-panel-hero::before,
.ops-overview-shell::before,
.ops-form-card::before,
.ops-list-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 48%);
  pointer-events: none;
}

.ops-auth-copy h1,
.ops-panel-hero h1,
.ops-overview-copy h1 {
  max-width: 14ch;
}

.ops-auth-copy p,
.ops-auth-copy .eyebrow {
  color: rgba(245, 239, 228, 0.86);
}

.ops-auth-points {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.ops-auth-points article,
.ops-stat-grid article {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ops-auth-points strong,
.ops-stat-grid strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.08rem;
}

.ops-auth-points span {
  display: block;
  color: rgba(245, 239, 228, 0.76);
}

.ops-auth-card {
  padding: 30px;
}

.ops-auth-card-head {
  margin-bottom: 14px;
}

.ops-auth-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 16px;
}

.ops-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 14px 0;
  background: rgba(247, 243, 235, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(23, 53, 60, 0.08);
}

.ops-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.ops-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ops-panel-shell {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.ops-panel-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
}

.ops-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.ops-panel-grid,
.ops-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.ops-account-card,
.ops-insight-card,
.ops-form-card,
.ops-list-card,
.ops-overview-shell {
  padding: 24px;
}

.ops-bullet-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.ops-overview-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
}

.ops-overview-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ops-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ops-stat-grid article {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 53, 60, 0.08);
}

.ops-stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.ops-form-stack {
  gap: 14px;
}

.ops-number-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ops-list {
  display: grid;
  gap: 14px;
}

.ops-row {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(23, 53, 60, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.ops-row-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  margin-bottom: 8px;
}

.ops-row-head strong {
  font-size: 1rem;
}

.ops-row-meta {
  color: var(--muted);
  font-size: 0.94rem;
  margin-top: 6px;
}

.ops-inline-form {
  margin-top: 12px;
}

.ops-toolbar {
  margin: 4px 0 18px;
}

.ops-actions {
  margin-top: 12px;
}

.ops-empty {
  padding: 16px 0 2px;
}

@media (max-width: 1180px) {
  .header-shell {
    padding: 18px 20px;
  }

  .nav-cluster {
    gap: 8px;
  }

  .nav-cluster a,
  .ghost-btn,
  .user-chip,
  .nav-notice {
    min-height: 38px;
    padding: 0 12px;
  }

  .home-hero,
  .content-grid-main,
  .post-layout-grid,
  .message-app-grid,
  .editor-page-grid,
  .login-card,
  .post-header-card,
  .editor-form-shell,
  .ops-auth-grid,
  .ops-panel-grid,
  .ops-section-grid,
  .ops-overview-shell {
    grid-template-columns: 1fr;
  }

  .home-hero-main {
    grid-template-columns: 1fr;
  }

  .post-side-column,
  .content-side-column,
  .editor-side-column {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

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

  .ops-panel-hero,
  .ops-topbar-inner,
  .ops-auth-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .ops-hero-actions,
  .ops-topbar-actions {
    justify-content: flex-start;
  }

  .ops-number-grid {
    grid-template-columns: 1fr;
  }

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

  .leaderboard-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .leaderboard-stats {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  :root {
    --container: min(100vw - 24px, 1280px);
  }

  .site-header {
    padding-top: 10px;
  }

  .header-shell {
    min-height: 76px;
    border-radius: 24px;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .nav-wrap {
    position: fixed;
    inset: 88px 12px auto 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 251, 246, 0.96);
    box-shadow: var(--shadow-lg);
  }

  body.nav-open .nav-wrap {
    display: flex;
  }

  .nav-divider {
    width: 100%;
    height: 1px;
  }

  .nav-cluster {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-cluster a,
  .ghost-btn,
  .nav-notice,
  .user-chip {
    justify-content: flex-start;
    width: 100%;
    min-height: 44px;
  }

  .site-announcement-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 0;
  }

  .refined-search-form {
    grid-template-columns: 1fr;
  }

  .grid.two-col,
  .support-grid,
  .message-composer-grid,
  .three-up-grid,
  .quick-links-grid,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .page-shell,
  .page {
    padding-top: 20px;
  }

  .panel,
  .hero-panel,
  .message-panel-block,
  .message-composer-card {
    padding: 20px;
  }

  .post-card-body {
    padding: 0 20px 20px;
  }

  .profile-hero,
  .premium-profile-hero {
    grid-template-columns: 1fr;
  }

  .profile-avatar {
    width: 108px;
    height: 108px;
  }

  .leaderboard-card {
    grid-template-columns: 1fr;
  }

  .leaderboard-rank {
    font-size: 1.1rem;
  }

  .directory-avatar {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .brand-copy em {
    display: none;
  }

  .hero-copy h1,
  .page-hero h1,
  .login-copy h1,
  .post-header-copy h1,
  .profile-main h1 {
    font-size: clamp(1.75rem, 8vw, 2.8rem);
  }

  .page-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-metrics,
  .stats-grid,
  .profile-meta-grid,
  .ops-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-actions,
  .chip-row,
  .inline-actions,
  .actions {
    gap: 8px;
  }

  .cta-primary,
  .cta-secondary,
  .secondary,
  .oauth-btn,
  button,
  .search-form button,
  .form-grid button,
  .comment-form button {
    width: 100%;
  }

  .message-bubble-main {
    max-width: 100%;
  }

  .message-bubble {
    flex-direction: column;
  }

  .message-bubble.self {
    align-items: stretch;
  }

  .post-stat-ribbon {
    flex-direction: column;
    align-items: flex-start;
  }

  .ops-auth-copy,
  .ops-auth-card,
  .ops-account-card,
  .ops-insight-card,
  .ops-form-card,
  .ops-list-card,
  .ops-overview-shell,
  .ops-panel-hero {
    padding: 20px;
  }

  .toast-root {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .toast-item {
    min-width: 0;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
