:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --text: #24344d;
  --muted: #5f6f83;
  --subtle: #8a96a6;
  --line: #edf0f4;
  --line-strong: #dce2ea;
  --accent: #5d8bdc;
  --accent-strong: #4f7fce;
  --accent-soft: #edf3ff;
  --green: #6f9a72;
  --orange: #c58a49;
  --red: #c96565;
  --blue: #5d8bdc;
  --shadow: 0 16px 38px rgba(39, 55, 77, 0.08);
  --shadow-soft: 0 10px 28px rgba(39, 55, 77, 0.06);
  --radius: 12px;
  --header-h: 64px;
  --max: 1040px;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #14171d;
  --surface: #1e232b;
  --surface-soft: #232933;
  --text: #eef3f8;
  --muted: #b5c0ce;
  --subtle: #8693a5;
  --line: #2e3642;
  --line-strong: #3a4452;
  --accent: #77a3f3;
  --accent-strong: #8fb5ff;
  --accent-soft: rgba(119, 163, 243, 0.14);
  --green: #9fc89b;
  --orange: #e1ad6e;
  --red: #e38c8c;
  --blue: #8fb5ff;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 max(28px, calc((100vw - var(--max)) / 2));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.brand-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand-copy {
  display: grid;
  gap: 0;
}

.brand-copy strong {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
}

.brand-copy small {
  color: var(--subtle);
  font-size: 12px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
}

.top-nav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.top-nav a:hover,
.top-nav a.active {
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: var(--shadow-soft);
}

.header-actions,
.auth-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn,
.plain-btn,
.primary-btn,
.ghost-btn,
.danger-btn {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.icon-btn:hover,
.plain-btn:hover,
.ghost-btn:hover,
.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.icon-btn {
  width: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
}

.plain-btn,
.primary-btn,
.ghost-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 15px;
}

.primary-btn {
  background: var(--accent);
  color: #ffffff;
  font-weight: 500;
}

.primary-btn:hover {
  background: var(--accent-strong);
}

.ghost-btn,
.plain-btn {
  background: var(--surface);
  color: var(--muted);
}

.danger-btn {
  background: var(--surface);
  color: var(--red);
}

.sun,
.moon {
  width: 17px;
  height: 17px;
  display: inline-block;
  border-radius: 50%;
}

.sun {
  border: 2px solid currentColor;
  box-shadow: 0 -8px 0 -6px currentColor, 0 8px 0 -6px currentColor, 8px 0 0 -6px currentColor, -8px 0 0 -6px currentColor;
}

.moon {
  background: currentColor;
  box-shadow: inset -6px 0 0 var(--surface);
}

.app-shell {
  max-width: var(--max);
  flex: 1;
  min-height: 0;
  margin: 0 auto;
  padding: 28px 28px 76px;
  outline: 0;
}

.site-footer {
  margin-top: auto;
  padding: 12px 28px 24px;
  color: var(--subtle);
  font-size: 13px;
  text-align: center;
}


.page-head {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin: 10px auto 34px;
  text-align: center;
}

.page-head > div {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 500;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 34px;
  font-weight: 300;
  line-height: 1.28;
}

h2 {
  margin-bottom: 18px;
  font-size: 23px;
  font-weight: 400;
  line-height: 1.36;
}

h3 {
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.42;
}

.lead {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
  font-size: 15px;
}

.hero-panel {
  display: block;
  margin: 0 auto 50px;
}

.intro-block {
  position: relative;
  max-width: 100%;
  min-height: 290px;
  margin: 0 auto 34px;
  padding: 50px 28px 42px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #121820;
  box-shadow: none;
  text-align: center;
  color: #f4f7ff;
}

.intro-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/hero-bg.png") center / cover no-repeat;
  opacity: 0.78;
}

.intro-block::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 16, 0.56);
}

.intro-block > * {
  position: relative;
  z-index: 1;
}

.intro-block .eyebrow {
  color: rgba(218, 229, 255, 0.78);
}

.intro-block h1 {
  margin-top: 18px;
  color: #f4f7ff;
  font-size: 42px;
  font-weight: 300;
}

.intro-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 34px;
}

.metric {
  min-height: 0;
  padding: 9px 20px;
  border: 0;
  border-radius: 999px;
  background: rgba(20, 26, 38, 0.74);
  color: rgba(236, 243, 255, 0.88);
  box-shadow: none;
  backdrop-filter: blur(8px);
}

.metric strong {
  display: inline;
  margin-right: 7px;
  color: #7fa7ff;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
}

.metric span {
  color: rgba(236, 243, 255, 0.88);
  font-size: 13px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.feature-card,
.tool-card,
.article-card,
.recent-card,
.empty-state,
.detail-panel,
.submission-strip,
.info-box,
.pending-item,
.modal,
.preview-frame {
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.feature-card {
  min-height: 326px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px 30px 32px;
  text-align: center;
  transform: translateY(0);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.feature-card:hover,
.article-card:hover,
.tool-card:hover,
.recent-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-icon,
.mini-icon {
  display: grid;
  place-items: center;
  color: var(--accent);
  background: transparent;
  border: 0;
}

.feature-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
}

.mini-icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
}

.feature-icon svg {
  width: 44px;
  height: 44px;
  stroke-width: 1.5;
}

.mini-icon svg,
.btn-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.feature-card p,
.article-card p,
.tool-card p,
.recent-card p {
  color: var(--muted);
}

.feature-card p {
  min-height: 78px;
  margin-bottom: 18px;
  font-size: 14px;
}

.card-foot,
.detail-actions,
.list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.arrow-link {
  min-height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 7px;
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
}

.section-band {
  margin-top: 44px;
}

.section-title-row {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 22px;
  text-align: center;
}

.recent-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  max-width: 940px;
  margin: 0 auto;
}

.recent-list,
.article-list {
  display: grid;
  gap: 14px;
}

.recent-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  padding: 20px 22px;
}

.recent-card h3 {
  margin-bottom: 4px;
}

.recent-card p {
  margin-bottom: 5px;
}

.recent-card time,
.article-meta,
.tool-meta {
  color: var(--subtle);
  font-size: 12px;
}

.article-list {
  max-width: 920px;
  margin: 0 auto;
}

.article-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 22px;
  align-items: center;
  min-height: 154px;
  padding: 24px 26px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.article-visual {
  width: 96px;
  height: 96px;
  min-height: 0;
  justify-self: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(93, 139, 220, 0.12), rgba(93, 139, 220, 0.02)), var(--accent-soft);
  position: relative;
  overflow: hidden;
}

.article-visual::before,
.article-visual::after {
  content: "";
  position: absolute;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 45%, transparent);
}

.article-visual::before {
  left: 26px;
  right: 26px;
  top: 32px;
  box-shadow: 0 15px 0 color-mix(in srgb, var(--accent) 32%, transparent), 0 30px 0 color-mix(in srgb, var(--accent) 20%, transparent);
}

.article-visual::after {
  left: 34px;
  right: 34px;
  top: 22px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 12px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}

.tool-card {
  overflow: hidden;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tool-cover {
  aspect-ratio: 16 / 9;
  display: block;
  background: var(--surface-soft);
  overflow: hidden;
}

.tool-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.tool-body {
  padding: 24px 26px 28px;
}

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 12px;
}

.points-pill {
  color: var(--accent);
  font-weight: 600;
}

.empty-state {
  min-height: 300px;
  display: grid;
  place-items: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 46px 34px;
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 10px;
  font-size: 30px;
  font-weight: 300;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
}

.detail-panel {
  padding: 34px;
}

.detail-panel h2 {
  margin-top: 30px;
}

.detail-panel h2:first-child {
  margin-top: 0;
}

.detail-aside {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: grid;
  gap: 14px;
}

.info-box {
  padding: 20px;
}

.info-box dl {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 0;
}

.info-box dt {
  color: var(--subtle);
}

.info-box dd {
  margin: 0;
  word-break: break-word;
}

.module-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.module-list li {
  padding: 13px 14px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
}

.preview-frame {
  overflow: hidden;
  background: var(--surface-soft);
  box-shadow: none;
}

.preview-frame img {
  width: 100%;
  display: block;
}

.submission-strip {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  max-width: 920px;
  margin: 26px auto;
  padding: 22px 24px;
}

.submission-strip p {
  margin-bottom: 0;
  color: var(--muted);
}

.pending-list {
  display: grid;
  gap: 10px;
  max-width: 920px;
  margin: 12px auto 0;
}

.pending-item {
  padding: 16px 18px;
  background: var(--surface);
}

.pending-item small {
  color: var(--subtle);
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(22, 28, 36, 0.44);
}

.modal-root.open {
  display: flex;
}


.modal-root:not(.open) {
  pointer-events: none;
}

.modal-root.open {
  pointer-events: auto;
}

.modal {
  position: relative;
  z-index: 1;
}

.field input,
.field textarea,
.field select {
  position: relative;
  z-index: 1;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}
.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 12px;
}

.modal-body {
  padding: 8px 22px 24px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 10px 12px;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.form-note {
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 110;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}

.user-chip strong {
  color: var(--text);
  font-weight: 500;
}


.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.metric-card {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.metric-card span {
  color: var(--subtle);
  font-size: 13px;
}

.metric-card strong {
  color: var(--text);
  font-size: 30px;
  font-weight: 300;
  line-height: 1.1;
}

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

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

.chart-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.chart-card h3 {
  margin-bottom: 0;
  font-size: 15px;
}

.bar-chart {
  height: 160px;
  display: flex;
  align-items: end;
  gap: 6px;
  padding-top: 8px;
  border-bottom: 1px solid var(--line);
}

.bar-chart span {
  flex: 1 1 0;
  min-width: 8px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 38%, transparent));
}

.chart-card small {
  color: var(--subtle);
  font-size: 12px;
}

.table-wrap {
  overflow-x: auto;
}

.analytics-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.analytics-table th,
.analytics-table td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.analytics-table th {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 500;
}

.analytics-table td {
  color: var(--muted);
}

.analytics-table tbody tr:last-child td {
  border-bottom: 0;
}

.rank-list,
.event-list {
  display: grid;
  gap: 12px;
}

.rank-item,
.event-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.rank-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.rank-item strong,
.event-item strong {
  color: var(--text);
  font-weight: 500;
}

.rank-item span,
.event-item span {
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.event-item small {
  color: var(--subtle);
  font-size: 12px;
}

.analytics-empty,
.compact-state {
  min-height: 160px;
  display: grid;
  place-items: center;
  padding: 24px 20px;
  color: var(--subtle);
  text-align: center;
}

.analytics-empty {
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.analytics-dashboard {
  display: grid;
  gap: 18px;
}

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

.source-path {
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}


.analytics-panel {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.admin-stack {
  display: grid;
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
}

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

.content-editor-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.content-editor-item {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.content-editor-item strong {
  color: var(--text);
  font-weight: 500;
}

/* Admin management surfaces */
.page-head.admin-hero,
.page-head.admin-section-head,
.page-head.admin-login-head {
  max-width: 1120px;
}

.page-head.admin-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  justify-items: stretch;
  align-items: end;
  gap: 22px;
  margin: 0 auto 26px;
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.page-head.admin-hero > div,
.page-head.admin-section-head > div,
.page-head.admin-login-head > div {
  max-width: none;
}

.page-head.admin-hero .lead,
.page-head.admin-section-head .lead,
.page-head.admin-login-head .lead {
  margin-left: 0;
  margin-right: 0;
}

.page-head.admin-section-head {
  grid-template-columns: minmax(0, 1fr) auto;
  justify-items: stretch;
  align-items: center;
  gap: 20px;
  margin: 0 auto 22px;
  text-align: left;
}

.admin-tabs,
.admin-segmented {
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  box-shadow: var(--shadow-soft);
}

.admin-tabs .primary-btn,
.admin-tabs .ghost-btn,
.admin-tabs .plain-btn,
.admin-segmented .primary-btn,
.admin-segmented .ghost-btn {
  min-height: 38px;
  border-radius: 8px;
  box-shadow: none;
}

.admin-tabs .primary-btn,
.admin-segmented .primary-btn {
  background: var(--text);
  color: var(--surface);
}

.admin-tabs .ghost-btn,
.admin-tabs .plain-btn,
.admin-segmented .ghost-btn {
  background: transparent;
  color: var(--muted);
}

.admin-tabs .plain-btn {
  color: var(--red);
}

.admin-login-panel {
  width: min(520px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
}

.admin-stack,
.analytics-dashboard {
  gap: 20px;
}

.analytics-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 14px;
  max-width: 1120px;
  margin: 0 auto 20px;
}

.metric-card {
  position: relative;
  min-height: 116px;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--surface) 94%, var(--accent-soft));
}

.metric-card:nth-child(2) { border-left-color: var(--green); }
.metric-card:nth-child(3) { border-left-color: var(--orange); }
.metric-card:nth-child(4) { border-left-color: var(--blue); }
.metric-card:nth-child(5) { border-left-color: var(--red); }

.metric-card span {
  color: var(--muted);
  font-weight: 500;
}

.metric-card strong {
  font-size: 32px;
  font-weight: 500;
}

.analytics-panel {
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.analytics-panel .section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  justify-items: stretch;
  gap: 18px;
  margin-bottom: 18px;
  text-align: left;
}

.analytics-panel .section-title-row h2 {
  margin-bottom: 0;
}

.chart-card,
.rank-item,
.event-item,
.analytics-empty {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-soft) 88%, var(--surface));
}

.chart-card {
  min-height: 236px;
}

.bar-chart {
  height: 168px;
  gap: 5px;
  padding: 8px 0 0;
}

.bar-chart span {
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.analytics-table th,
.analytics-table td {
  padding: 12px 13px;
}

.analytics-table tbody tr:hover td {
  background: color-mix(in srgb, var(--accent-soft) 52%, transparent);
}

.admin-list {
  display: grid;
  gap: 0;
}

.admin-item {
  display: grid;
  gap: 8px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.admin-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.admin-item:last-child {
  padding-bottom: 0;
}

.admin-item strong {
  color: var(--text);
  font-weight: 500;
}

.admin-item p,
.admin-item span,
.admin-item small {
  color: var(--muted);
}

.admin-item small {
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 6px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  vertical-align: middle;
}

.content-editor-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
}

.content-editor-list {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  overflow: hidden;
}

.content-editor-item {
  gap: 14px;
  padding: 18px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.content-editor-item:first-child {
  border-top: 0;
}

.content-editor-item > strong {
  display: block;
  padding-bottom: 2px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.field {
  gap: 8px;
}

.field label {
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field textarea,
.field select {
  min-height: 42px;
  border-color: var(--line-strong);
  background: var(--surface);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.field textarea {
  min-height: 118px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 0;
  border-color: color-mix(in srgb, var(--accent) 72%, var(--line-strong));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft) 78%, transparent);
}

.admin-panel .list-actions,
.analytics-panel .list-actions {
  justify-content: flex-start;
}

.route-text {
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

@media (max-width: 980px) {
  .site-header {
    height: auto;
    min-height: var(--header-h);
    flex-wrap: wrap;
    padding: 12px 18px;
  }

  .top-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .header-actions {
    margin-left: auto;
  }

  .feature-grid,
  .tool-grid,
  .detail-grid,
  .analytics-grid,
  .content-editor-grid {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    position: static;
  }

  .analytics-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .app-shell {
    padding: 22px 14px 56px;
  }

  .brand {
    min-width: 0;
  }

  .brand-copy small {
    display: none;
  }

  .auth-actions .plain-btn,
  .auth-actions .primary-btn {
    padding: 0 10px;
  }

  h1,
  .intro-block h1 {
    font-size: 29px;
  }

  .feature-grid {
    gap: 16px;
  }

  .feature-card {
    min-height: 270px;
    padding: 28px 24px;
  }

  .recent-card,
  .article-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .recent-card .mini-icon,
  .article-visual {
    justify-self: center;
  }

  .submission-strip,
  .module-list {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .modal-root {
    align-items: end;
    padding: 10px;
  }

  .analytics-toolbar {
    justify-content: center;
    text-align: center;
  }

  .analytics-metrics {
    grid-template-columns: 1fr;
  }

  .analytics-panel {
    padding: 18px;
  }

  .analytics-chart {
    gap: 4px;
  }

  .chart-bar em {
    display: none;
  }
}










@media (max-width: 980px) {
  .page-head.admin-hero,
  .page-head.admin-section-head {
    grid-template-columns: 1fr;
    justify-items: stretch;
    text-align: left;
  }

  .admin-tabs,
  .admin-segmented {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .analytics-panel .section-title-row {
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .admin-tabs,
  .admin-segmented {
    padding: 5px;
  }

  .admin-tabs .primary-btn,
  .admin-tabs .ghost-btn,
  .admin-tabs .plain-btn,
  .admin-segmented .primary-btn,
  .admin-segmented .ghost-btn {
    min-height: 36px;
    padding: 0 12px;
  }

  .analytics-panel .section-title-row {
    display: grid;
    gap: 8px;
  }

  .content-editor-item {
    padding: 14px;
  }
}
