:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #162033;
  --muted: #69758c;
  --line: #dbe2ef;
  --primary: #2f6fed;
  --primary-dark: #1b4cb5;
  --danger: #cc3b3b;
  --shadow: 0 12px 40px rgba(20, 32, 61, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

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

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header,
.site-footer {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(219, 226, 239, 0.8);
}

.site-footer {
  border-top: 1px solid rgba(219, 226, 239, 0.8);
  border-bottom: none;
  color: var(--muted);
  padding: 24px 0 32px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  font-size: 20px;
  font-weight: 700;
}

.header-nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.page-main {
  min-height: calc(100vh - 145px);
}

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

.hero h1,
.section-head h1,
.article-detail h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.hero-text,
.muted,
.post-meta,
.site-footer,
.empty-card p,
.article-summary {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
}

.section-space {
  padding: 24px 0 56px;
}

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

.section-head.stacked {
  align-items: flex-start;
  flex-direction: column;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.post-card,
.panel,
.empty-card,
.article-detail,
.table-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.post-card,
.article-detail,
.panel,
.empty-card {
  padding: 24px;
}

.post-card h3 {
  margin: 10px 0 12px;
  font-size: 22px;
}

.post-card p {
  margin: 0 0 18px;
}

.button,
.button-secondary,
.link-button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

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

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

.button-secondary {
  background: #edf3ff;
  color: var(--primary);
}

.link-button {
  background: transparent;
  padding: 0;
  color: var(--primary);
}

.link-button.danger {
  color: var(--danger);
}

.text-link {
  color: var(--primary);
  font-weight: 600;
}

.inline-form,
.table-actions form {
  display: inline;
}

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

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

textarea {
  resize: vertical;
}

.alert {
  margin-bottom: 18px;
  background: #fff2f2;
  color: #a12626;
  border: 1px solid #f3c1c1;
  border-radius: 12px;
  padding: 12px 14px;
}

.narrow {
  max-width: 680px;
}

.narrow-wide {
  max-width: 860px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

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

.data-table th {
  color: var(--muted);
  font-size: 13px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.article-content {
  font-size: 16px;
}

.detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

code {
  background: #f0f4fa;
  border-radius: 8px;
  padding: 2px 8px;
}

@media (max-width: 720px) {
  .header-inner,
  .section-head,
  .detail-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table th,
  .data-table td,
  .data-table tr {
    display: block;
    width: 100%;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    border-bottom: 1px solid var(--line);
  }

  .data-table td {
    padding: 10px 16px;
  }
}
