:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #182230;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --accent: #0f766e;
  --accent-strong: #0b5c55;
  --accent-soft: #e6f4f1;
  --code: #eef2f6;
  --soft: var(--accent-soft);
  --shadow: 0 18px 44px rgba(16, 24, 40, 0.1);
  --shadow-sm: 0 8px 22px rgba(16, 24, 40, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
}

::selection {
  background: rgba(15, 118, 110, 0.16);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
  padding: 12px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0;
  color: #101828;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.nav a {
  border-radius: 10px;
  padding: 8px 12px;
  transition: background 160ms ease, color 160ms ease;
}

.nav a:hover,
.nav a:focus-visible,
.section-heading a:hover,
.article-item a:hover {
  color: var(--accent);
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--accent-soft);
  outline: none;
}

.nav-logout {
  margin: 0;
}

.nav-logout button {
  width: auto;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
}

.nav-logout button:hover,
.nav-logout button:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.site-main {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 76px;
}

.site-main:has(.page-detail) {
  width: min(920px, calc(100% - 48px));
}

.site-main:has(.article-detail) {
  width: min(760px, calc(100% - 48px));
}

.page-detail {
  max-width: 100%;
  margin: 0 auto;
}

.page-hero {
  margin-bottom: 34px;
  padding: 4px 0 26px;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 0;
  color: #101828;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.16;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.page-hero p {
  max-width: 48em;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.admin-login-main {
  display: grid;
  width: min(480px, calc(100% - 48px));
  min-height: calc(100vh - 86px);
  padding: 48px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 42px;
  align-items: end;
  min-height: 320px;
  padding: 46px 0 56px;
}

.eyebrow,
.article-meta,
.muted,
.empty {
  color: var(--muted);
}

.eyebrow,
.article-meta {
  font-size: 13px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(38px, 6vw, 68px);
}

h2 {
  font-size: 27px;
}

h3 {
  font-size: 19px;
}

.lead {
  max-width: 62ch;
  margin: 18px 0 8px;
  color: #344054;
  font-size: 20px;
  line-height: 1.78;
}

.hero-search,
.search-form {
  display: flex;
  gap: 10px;
  width: 100%;
}

input,
textarea,
select,
button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(15, 118, 110, 0.5);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: none;
}

button {
  width: auto;
  cursor: pointer;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  transition: background 160ms ease, transform 160ms ease;
}

button:hover {
  background: var(--accent-strong);
}

button:active {
  transform: translateY(1px);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 9px 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button-link:hover,
.button-link:focus-visible {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
  outline: none;
}

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

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--accent);
  outline: none;
}

.section {
  margin-top: 44px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

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

.category-card,
.article-item,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

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

.category-card:hover,
.article-item:hover {
  border-color: rgba(15, 118, 110, 0.24);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.07);
  transform: translateY(-1px);
}

.content-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 8px;
  position: sticky;
  top: 78px;
}

.sidebar a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
}

.sidebar a:hover {
  background: var(--surface);
  color: var(--accent);
}

.page-title {
  margin-bottom: 32px;
}

.page-title form {
  margin-top: 16px;
}

.page-title h1 {
  font-size: 42px;
}

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

.article-item {
  padding: 20px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.article-item p {
  margin: 8px 0 0;
  color: var(--muted);
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 600;
}

.article-meta a,
.article-meta span {
  border-radius: 999px;
  padding: 2px 9px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.article-meta time {
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tags span {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.1);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  line-height: 1.6;
}

.article-detail {
  max-width: 100%;
  margin: 0 auto;
}

.article-detail header {
  position: relative;
  margin-bottom: 34px;
  padding: 4px 0 28px;
  border-bottom: 1px solid var(--line);
}

.article-detail h1 {
  max-width: 100%;
  margin-top: 0;
  color: #101828;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.18;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.article-detail .lead {
  max-width: 48em;
  margin: 18px 0 0;
  padding: 14px 16px 15px;
  border: 1px solid rgba(228, 231, 236, 0.9);
  border-left: 3px solid rgba(15, 118, 110, 0.42);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.52);
  color: #5f6f82;
  font-size: 16px;
  line-height: 1.85;
  font-weight: 400;
}

.article-detail .lead::before {
  content: "摘要";
  display: block;
  margin-bottom: 4px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.article-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 22px;
  margin-top: 16px;
}

.article-detail .article-meta {
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.article-detail .tags {
  justify-content: flex-end;
  margin-top: 0;
}

.prose {
  color: #263442;
  font-size: 17px;
  line-height: 1.92;
  overflow-wrap: break-word;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose > h1:first-child {
  display: none;
}

.prose > h1:first-child + h2,
.prose > h1:first-child + h3 {
  margin-top: 0;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose table {
  margin: 0 0 22px;
}

.prose h1 {
  margin: 54px 0 20px;
  color: #101828;
  font-size: 32px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.prose h2 {
  margin: 52px 0 18px;
  padding-top: 6px;
  color: #101828;
  font-size: 27px;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.prose h3 {
  margin: 38px 0 14px;
  color: #101828;
  font-size: 22px;
  line-height: 1.36;
  overflow-wrap: anywhere;
}

.prose a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.prose strong {
  color: #111827;
  font-weight: 800;
}

.prose ul,
.prose ol {
  padding-left: 1.45em;
}

.prose li + li {
  margin-top: 8px;
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 10px 0 10px 18px;
  color: #475467;
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.07), rgba(15, 118, 110, 0));
}

.prose pre {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(208, 213, 221, 0.9);
  border-left: 4px solid rgba(15, 118, 110, 0.52);
  border-radius: 8px;
  background: #f3f7fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  padding: 18px 20px;
  color: #172033;
  font-family: "JetBrains Mono", "Fira Code", Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 14.5px;
  line-height: 1.7;
  tab-size: 2;
}

.prose pre[data-enhanced="true"] {
  padding-top: 46px;
}

.code-toolbar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  border-bottom: 1px solid rgba(208, 213, 221, 0.7);
  background: rgba(248, 250, 252, 0.82);
  padding: 6px 8px 6px 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.code-language {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.code-copy {
  min-height: 24px;
  border: 1px solid rgba(208, 213, 221, 0.95);
  border-radius: 6px;
  background: #ffffff;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 9px;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.code-copy:hover,
.code-copy:focus-visible {
  border-color: rgba(15, 118, 110, 0.45);
  background: #f0fdfa;
  color: var(--accent-strong);
  outline: none;
}

.prose pre::-webkit-scrollbar {
  height: 10px;
}

.prose pre::-webkit-scrollbar-track {
  background: rgba(228, 231, 236, 0.45);
  border-radius: 999px;
}

.prose pre::-webkit-scrollbar-thumb {
  background: rgba(102, 112, 133, 0.32);
  border-radius: 999px;
}

.prose code {
  border-radius: 5px;
  background: #eef2f6;
  padding: 2px 5px;
  color: #172033;
  font-family: "JetBrains Mono", "Fira Code", Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 0.9em;
}

.prose pre code {
  display: block;
  min-width: max-content;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.prose img {
  display: block;
  width: auto;
  max-width: 100%;
  margin: 30px auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.65;
  white-space: normal;
}

.prose th,
.prose td {
  min-width: 120px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
}

.prose th {
  background: var(--surface-soft);
  color: #101828;
}

.prose hr {
  height: 1px;
  margin: 34px 0;
  border: 0;
  background: var(--line);
}

.resume-page .prose > div:first-of-type {
  margin: 0 0 30px !important;
  border: 1px solid rgba(228, 231, 236, 0.9);
  border-left: 3px solid rgba(15, 118, 110, 0.42);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.52);
  padding: 16px 18px;
}

.resume-page .prose > div:first-of-type h2 {
  margin: 0 0 8px !important;
  color: #101828 !important;
  font-size: 22px;
  line-height: 1.35;
}

.resume-page .prose > div:first-of-type p {
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: 15px !important;
  line-height: 1.7;
}

.resume-page .prose ul ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 2px;
  padding-left: 0;
  list-style: none;
}

.resume-page .prose ul ul li {
  margin: 0;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 999px;
  background: rgba(230, 244, 241, 0.78);
  color: var(--accent-strong);
  padding: 2px 9px;
  font-size: 13px;
  line-height: 1.6;
}

.about-page .prose p:has(> strong:first-child:last-child) {
  margin: 26px 0 8px;
  color: #101828;
  font-size: 19px;
  line-height: 1.4;
}

.about-page .prose p:has(> strong:first-child:last-child) + p {
  margin-top: 0;
}

.age-display {
  border: 1px solid rgba(228, 231, 236, 0.9);
  border-left: 3px solid rgba(15, 118, 110, 0.42);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.52);
  padding: 14px 16px;
  color: #344054;
  font-weight: 600;
}

.age-display [data-age-value] {
  color: var(--accent-strong);
  font-weight: 850;
}

.login-shell {
  display: grid;
  align-items: center;
  width: 100%;
  margin: auto 0;
}

.login-panel {
  display: grid;
  align-content: start;
  gap: 22px;
  width: 100%;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.login-heading img {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.14);
}

.login-panel h1 {
  margin-top: 1px;
  font-size: 28px;
  line-height: 1.1;
}

.login-fields {
  display: grid;
  gap: 14px;
}

.login-fields label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.login-fields input {
  min-height: 48px;
  font-weight: 500;
}

.login-panel button {
  width: 100%;
  min-height: 48px;
}

.form-error {
  margin: 0;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fef2f2;
  color: #b42318;
  font-size: 14px;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 10px;
  align-items: stretch;
}

.captcha-row input {
  height: 48px;
  min-height: 48px;
}

.captcha-code {
  display: grid;
  place-items: center;
  width: 100%;
  height: 48px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--surface-soft);
  color: var(--accent-strong);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 4px;
  user-select: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.captcha-code:hover,
.captcha-code:focus-visible {
  border-color: rgba(15, 118, 110, 0.38);
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.captcha-code:disabled {
  cursor: wait;
  opacity: 0.7;
}

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

.admin-hero {
  margin-bottom: 22px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(16, 24, 40, 0.05);
}

.admin-hero h1 {
  font-size: 38px;
}

.admin-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

.admin-hero .eyebrow {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-weight: 800;
}

.row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.admin-grid > .panel:last-child {
  position: sticky;
  top: 82px;
  max-height: calc(100vh - 104px);
  overflow: auto;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-heading h2 {
  font-size: 24px;
}

.panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 15px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
}

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

.admin-table tbody tr {
  transition: background 160ms ease;
}

.admin-table tbody tr:hover {
  background: var(--surface-soft);
}

.admin-table th {
  background: var(--surface-soft);
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}

.article-title-col {
  width: 54%;
}

.article-category-col {
  width: 14%;
}

.article-status-col {
  width: 12%;
}

.article-date-col {
  width: 12%;
}

.article-action-col {
  width: 8%;
}

.article-title-cell a,
.article-title-cell span {
  display: block;
}

.article-title-cell a {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.article-title-cell a:hover,
.article-title-cell a:focus-visible {
  color: var(--accent);
  outline: none;
}

.article-title-cell span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-label,
.date-cell {
  color: #475467;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 9px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.6;
}

.row-actions {
  min-width: 90px;
  justify-content: flex-start;
}

.row-actions a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.row-actions a:hover,
.row-actions a:focus-visible {
  border-color: rgba(15, 118, 110, 0.16);
  background: var(--accent-soft);
  outline: none;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.pagination a,
.pagination span,
.pagination strong {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.pagination a {
  color: var(--accent-strong);
  font-weight: 700;
}

.pagination a:hover,
.pagination a:focus-visible {
  border-color: rgba(15, 118, 110, 0.32);
  background: var(--accent-soft);
  outline: none;
}

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

.stack-form {
  display: grid;
  gap: 14px;
}

.stack-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.stack-form input,
.stack-form select {
  min-height: 44px;
}

.stack-form textarea {
  min-height: 96px;
}

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

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

.compact-list,
.page-editor-grid {
  display: grid;
  gap: 10px;
}

.compact-list a {
  display: grid;
  gap: 6px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  transition: color 160ms ease;
}

.compact-list a:hover {
  color: var(--accent);
}

.compact-list strong {
  line-height: 1.42;
}

.compact-list span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.compact-list b {
  border-radius: 999px;
  padding: 1px 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.page-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.page-editor summary {
  cursor: pointer;
  padding: 14px 16px;
  list-style: none;
}

.page-editor summary::-webkit-details-marker {
  display: none;
}

.page-editor summary span {
  display: grid;
  gap: 3px;
}

.page-editor summary strong {
  color: var(--text);
}

.page-editor summary small {
  color: var(--muted);
  font-size: 13px;
}

.page-editor[open] summary {
  border-bottom: 1px solid var(--line);
}

.page-editor form {
  padding: 16px;
}

.EasyMDEContainer {
  color: var(--text);
  font-weight: 500;
}

.EasyMDEContainer .editor-toolbar,
.EasyMDEContainer .CodeMirror {
  border-color: var(--line);
}

.EasyMDEContainer .editor-toolbar {
  border-radius: 8px 8px 0 0;
  background: #f8fafc;
  opacity: 1;
}

.EasyMDEContainer .editor-toolbar button {
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #344054 !important;
}

.EasyMDEContainer .editor-toolbar button::before {
  color: #344054 !important;
}

.EasyMDEContainer .editor-toolbar button:hover,
.EasyMDEContainer .editor-toolbar button.active {
  border-color: var(--line-strong);
  background: #eef4f3;
  color: var(--accent-strong) !important;
}

.EasyMDEContainer .editor-toolbar i.separator {
  border-left-color: #98a2b3;
  border-right-color: transparent;
}

.EasyMDEContainer .editor-toolbar.disabled-for-preview button:not(.no-disable) {
  opacity: 0.55;
}

.EasyMDEContainer .CodeMirror {
  border-radius: 0 0 8px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  line-height: 1.7;
}

.EasyMDEContainer .editor-preview,
.EasyMDEContainer .editor-preview-side {
  background: var(--surface);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
  padding: 18px 20px 22px;
  border-top: 1px solid rgba(228, 231, 236, 0.9);
  background: rgba(255, 255, 255, 0.28);
  color: #7a8798;
  font-size: 13px;
  line-height: 1.6;
}

.site-footer a,
.site-footer span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}

.site-footer a {
  border-radius: 999px;
  padding: 2px 10px;
  transition: background 160ms ease, color 160ms ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-strong);
  outline: none;
}

.site-footer span {
  position: relative;
}

.site-footer span::before {
  content: "";
  width: 1px;
  height: 14px;
  margin-right: 16px;
  background: var(--line-strong);
}

@media (max-width: 820px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    align-items: center;
  }

  .site-footer span::before {
    display: none;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero,
  .content-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid > .panel:last-child {
    position: static;
    max-height: none;
  }

  .admin-hero {
    padding: 22px;
  }

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

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

  .site-main {
    width: min(100% - 32px, 720px);
    padding-top: 34px;
  }

  .site-main:has(.page-detail) {
    width: min(100% - 32px, 760px);
  }

  .site-main:has(.article-detail) {
    width: min(100% - 32px, 760px);
  }

  .admin-login-main {
    width: min(100% - 32px, 480px);
    min-height: calc(100vh - 86px);
  }

  .article-detail h1 {
    font-size: clamp(28px, 7vw, 36px);
  }

  .article-detail .lead {
    font-size: 15px;
  }

  .article-info {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-detail .tags {
    justify-content: flex-start;
  }

  .lead {
    font-size: 18px;
  }
}

@media (max-width: 540px) {
  .category-grid,
  .sidebar {
    grid-template-columns: 1fr;
  }

  .hero-search,
  .search-form {
    flex-direction: column;
  }

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

  .admin-hero {
    padding: 18px;
  }

  .admin-hero h1 {
    font-size: 30px;
  }

  button {
    width: 100%;
  }

  .button-link {
    width: 100%;
  }

  .row-actions .button-link,
  .row-actions a {
    width: auto;
  }

  .site-header {
    gap: 10px;
  }

  .nav {
    gap: 4px;
    font-size: 13px;
  }

  .nav a {
    padding: 6px 8px;
  }

  .site-main {
    width: min(100% - 28px, 480px);
    padding: 26px 0 56px;
  }

  .site-main:has(.page-detail) {
    width: min(100% - 28px, 520px);
  }

  .site-main:has(.article-detail) {
    width: min(100% - 28px, 520px);
  }

  .page-hero {
    margin-bottom: 30px;
    padding-bottom: 22px;
  }

  .page-hero h1 {
    font-size: 34px;
  }

  .admin-login-main {
    width: min(100% - 28px, 480px);
    padding: 24px 0 42px;
  }

  .login-panel {
    padding: 24px;
  }

  .login-heading {
    align-items: flex-start;
  }

  .captcha-row {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 28px 0 36px;
  }

  h1 {
    font-size: clamp(34px, 12vw, 48px);
  }

  .page-title h1 {
    font-size: 34px;
  }

  .article-detail header {
    margin-bottom: 30px;
    padding-bottom: 24px;
  }

  .article-detail .lead {
    padding: 12px 14px;
    line-height: 1.78;
  }

  .prose {
    font-size: 16px;
    line-height: 1.86;
  }

  .prose h2 {
    margin-top: 42px;
    font-size: 24px;
  }

  .prose h3 {
    font-size: 20px;
  }
}
