:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --line: #d7e0e8;
  --line-strong: #b8c7d6;
  --text: #16202a;
  --muted: #647386;
  --accent: #1f6feb;
  --accent-strong: #174ea6;
  --green: #147d64;
  --amber: #a15c07;
  --red: #b42318;
  --teal: #0f766e;
  --shadow: 0 16px 40px rgba(21, 32, 43, 0.08);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #101418;
  --surface: #161c22;
  --surface-2: #1d2630;
  --line: #2a3642;
  --line-strong: #3a4957;
  --text: #ecf2f8;
  --muted: #9ba8b5;
  --accent: #5b9dff;
  --accent-strong: #84b7ff;
  --green: #38b48f;
  --amber: #d49a45;
  --red: #ff7b72;
  --teal: #2dd4bf;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(31, 111, 235, 0.05), transparent 220px),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--text);
  color: var(--surface);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  min-width: 0;
  white-space: nowrap;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav-tabs,
.auth-switch,
.segmented {
  display: flex;
  align-items: center;
  min-width: 0;
}

.nav-tabs {
  justify-content: center;
  gap: 4px;
}

.nav-tab,
.switch-tab,
.segmented button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 0 13px;
}

.nav-tab:hover,
.switch-tab:hover,
.segmented button:hover {
  border-color: var(--line);
  color: var(--text);
}

.nav-tab.is-active,
.switch-tab.is-active,
.segmented button.is-active {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 650;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.primary-button,
.ghost-button,
.icon-button,
.user-chip,
.attachment-chip,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  padding: 0 14px;
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.primary-button:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.ghost-button,
.icon-button,
.user-chip,
.attachment-chip {
  background: var(--surface);
  color: var(--text);
}

.ghost-button:hover,
.icon-button:hover,
.user-chip:hover,
.attachment-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.danger-button {
  border-color: var(--red);
  background: color-mix(in srgb, var(--red) 10%, transparent);
  color: var(--red);
}

.icon-button {
  width: 38px;
  padding: 0;
}

.theme-icon {
  font-weight: 800;
}

.full {
  width: 100%;
}

.site-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  width: min(1480px, calc(100vw - 40px));
  margin: 28px auto 64px;
}

.left-rail {
  position: sticky;
  top: 98px;
  align-self: start;
  display: grid;
  gap: 18px;
}

.rail-block,
.thread-detail,
.compose-panel,
.wide-form,
.feedback-form-card,
.feedback-list-card,
.admin-login,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.rail-block {
  padding: 18px;
}

.rail-label,
.eyebrow {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

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

.stat-grid div,
.admin-stats div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.stat-grid dt {
  overflow-wrap: anywhere;
  font-size: 22px;
  font-weight: 800;
}

.stat-grid dd {
  margin: 2px 0 0;
  color: var(--muted);
}

.compact-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.compact-item {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

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

.compact-item button {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  text-align: left;
  font-weight: 650;
}

.compact-item span {
  color: var(--muted);
  font-size: 12px;
}

.view {
  display: none;
  min-width: 0;
}

.view.is-active {
  display: block;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h1 {
  margin: 4px 0 6px;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.12;
}

.section-head h2,
.panel-head h2 {
  margin: 0;
}

.section-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.forum-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
  gap: 20px;
  align-items: start;
}

.forum-list-layout {
  grid-template-columns: minmax(0, 1fr);
}

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

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 14px;
  margin-bottom: 14px;
}

.segmented {
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.segmented button {
  flex: 0 0 auto;
  background: var(--surface);
}

.search-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.search-box span {
  color: var(--muted);
  font-size: 12px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

input,
select {
  height: 40px;
  padding: 0 12px;
}

textarea {
  min-height: 112px;
  resize: vertical;
  padding: 10px 12px;
}

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

.search-box input {
  height: 30px;
  border: 0;
  padding: 0;
}

.search-box input:focus {
  box-shadow: none;
}

.compose-panel,
.wide-form,
.admin-form {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  margin-bottom: 16px;
}

.wide-form {
  max-width: 840px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 650;
}

label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.thread-list {
  display: grid;
  gap: 12px;
}

.thread-card,
.download-card,
.notification-item,
.feature-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.thread-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 18px;
  padding: 16px;
}

.thread-card:hover {
  border-color: var(--accent);
}

.thread-card button {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  text-align: left;
}

.thread-card h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.thread-card button {
  grid-column: 1 / -1;
}

.thread-card p,
.detail-body,
.reply-body {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.thread-card p {
  margin: 0;
  color: var(--muted);
}

.meta-line,
.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--teal);
  padding: 0 8px;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 6px;
  background: color-mix(in srgb, var(--green) 12%, transparent);
  color: var(--green);
  padding: 0 8px;
  font-weight: 750;
}

.status-pill.locked {
  background: color-mix(in srgb, var(--amber) 14%, transparent);
  color: var(--amber);
}

.thread-detail {
  position: sticky;
  top: 98px;
  max-height: calc(100vh - 124px);
  overflow: auto;
  padding: 18px;
}

.thread-page {
  max-width: 980px;
}

.back-row {
  margin-bottom: 14px;
}

.thread-page-content {
  display: grid;
  gap: 16px;
}

.thread-article,
.conversation-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.thread-article {
  padding: 24px;
}

.conversation-card {
  padding: 20px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
}

.detail-head h2 {
  margin: 8px 0 10px;
  overflow-wrap: anywhere;
  font-size: 24px;
  line-height: 1.2;
}

.detail-body {
  margin: 16px 0 22px;
  color: var(--text);
}

.reply-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.reply-item {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.reply-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.avatar-dot {
  display: inline-flex;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.reply-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.download-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.download-card h2 {
  margin: 0;
  font-size: 18px;
}

.download-card p {
  margin: 0;
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(360px, 1.1fr);
  gap: 24px;
  align-items: start;
}

.project-carousel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.carousel-viewport {
  position: relative;
  min-height: 430px;
}

.project-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(360px, 1fr);
  gap: 26px;
  align-items: stretch;
  padding: 26px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.project-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.slide-copy {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
}

.slide-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.slide-copy h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.12;
}

.slide-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.slide-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slide-metrics span,
.slide-stack strong,
.slide-diagram div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px 12px;
  font-weight: 750;
}

.slide-media {
  display: grid;
  align-content: center;
  margin: 0;
  min-width: 0;
}

.slide-media img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.slide-diagram,
.slide-stack {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
}

.slide-diagram div {
  min-height: 82px;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 18px;
}

.slide-stack strong {
  min-height: 86px;
  display: grid;
  place-items: center;
  color: var(--teal);
  font-size: 18px;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-dots button {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--line-strong);
  padding: 0;
}

.carousel-dots button.is-active {
  background: var(--accent);
}

.project-copy {
  display: grid;
  gap: 12px;
}

.feature-item {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.feature-item strong {
  font-size: 17px;
}

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

.product-shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.product-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.product-shot figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}

.feedback-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.52fr);
  gap: 18px;
  align-items: start;
}

.feedback-form-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
}

.form-card-head {
  display: grid;
  gap: 7px;
  margin-bottom: 4px;
}

.form-card-head h2 {
  margin: 0;
  font-size: 22px;
}

.form-card-head p {
  margin: 0;
  color: var(--muted);
}

.feedback-side {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 14px;
}

.feedback-list-card {
  min-width: 0;
  padding: 16px;
}

.feedback-feed {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
}

.feedback-item {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 13px;
}

.feedback-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.feedback-item-head > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.feedback-item-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.feedback-item-head span,
.feedback-item p {
  color: var(--muted);
}

.feedback-item p {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.feedback-state-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.status-pill.processing {
  background: color-mix(in srgb, var(--amber) 14%, transparent);
  color: var(--amber);
}

.status-pill.closed {
  background: color-mix(in srgb, var(--red) 12%, transparent);
  color: var(--red);
}

.visibility-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 750;
}

.visibility-pill.is-public {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

.upload-field {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  padding: 14px;
}

.upload-field input {
  height: auto;
  border: 0;
  background: transparent;
  padding: 0;
}

.upload-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.paste-hint {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 13px 14px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.paste-hint strong {
  color: var(--text);
}

.paste-hint span {
  color: var(--muted);
  font-size: 12px;
}

.paste-hint.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.screenshot-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.screenshot-item {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  overflow: hidden;
}

.screenshot-item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.screenshot-item figcaption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
}

.screenshot-item span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.attachment-list {
  display: grid;
  gap: 6px;
}

.feedback-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachment-chip {
  min-width: 0;
  max-width: 100%;
  justify-content: flex-start;
  gap: 8px;
}

.attachment-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-chip small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.center-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1fr);
  gap: 18px;
}

.profile-panel,
.notifications-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

.profile-panel h2,
.notifications-panel h2 {
  margin: 0 0 12px;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-item {
  display: grid;
  gap: 6px;
  padding: 13px;
}

.notification-item.unread {
  border-color: var(--accent);
}

.notification-item p {
  margin: 0;
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 20, 24, 0.62);
}

.modal-panel {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-head h2 {
  margin: 4px 0 14px;
}

.auth-switch {
  gap: 6px;
  margin-bottom: 16px;
}

.auth-form {
  display: grid;
  gap: 13px;
}

.auth-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 40px));
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--text);
  color: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px 14px;
}

.admin-shell {
  width: min(1480px, calc(100vw - 40px));
  margin: 28px auto 64px;
}

.admin-login {
  max-width: 520px;
  padding: 20px;
}

.admin-stats {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  margin-bottom: 20px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.admin-grid.full {
  grid-template-columns: 1fr;
}

.admin-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.admin-panel {
  min-width: 0;
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
}

td {
  overflow-wrap: anywhere;
}

.status-open,
.status-active {
  color: var(--green);
  font-weight: 750;
}

.status-processing {
  color: var(--amber);
  font-weight: 750;
}

.status-closed,
.status-suspended,
.status-locked {
  color: var(--red);
  font-weight: 750;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 20px;
  }

  .nav-tabs {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .site-shell {
    grid-template-columns: 1fr;
  }

  .left-rail {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forum-layout,
  .project-grid,
  .feedback-layout,
  .center-layout {
    grid-template-columns: 1fr;
  }

  .feedback-side {
    position: static;
  }

  .project-slide {
    grid-template-columns: 1fr;
  }

  .thread-detail {
    position: static;
    max-height: none;
  }

  .admin-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body {
    font-size: 13px;
  }

  .site-shell,
  .admin-shell {
    width: min(100vw - 24px, 1480px);
    margin-top: 18px;
  }

  .left-rail,
  .toolbar,
  .form-row.two,
  .admin-grid,
  .admin-actions-grid {
    grid-template-columns: 1fr;
  }

  .left-rail {
    order: 2;
  }

  .view {
    order: 1;
  }

  .section-head,
  .form-actions,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-item-head,
  .feedback-state-line {
    justify-content: flex-start;
  }

  .section-head h1 {
    font-size: 26px;
  }

  .thread-card,
  .project-slide {
    grid-template-columns: 1fr;
  }

  .carousel-viewport {
    min-height: 680px;
  }

  .thread-article,
  .conversation-card {
    padding: 16px;
  }

  .brand small {
    white-space: normal;
  }

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

  .nav-tab,
  .switch-tab,
  .segmented button {
    padding: 0 10px;
  }
}
