:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Segoe UI", sans-serif;
  background: #f5f7f5;
  color: #18231f;
  --surface: #ffffff;
  --surface-muted: #eef3ee;
  --line: #d7dfd8;
  --text-muted: #4f6259;
  --accent: #0c7c59;
  --accent-strong: #075f44;
  --accent-warm: #b66b12;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f7f5;
  color: #18231f;
}

a {
  color: inherit;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 max(20px, calc((100% - 1040px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 245, 0.92);
  backdrop-filter: blur(14px);
}

.brand-link,
.site-nav {
  display: flex;
  align-items: center;
}

.brand-link {
  gap: 10px;
  min-width: 0;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.86rem;
  letter-spacing: 0;
}

.site-nav {
  gap: 18px;
  font-size: 0.92rem;
  font-weight: 700;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.page-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.site-header {
  padding: 18px 0 24px;
  border-bottom: 1px solid var(--line);
}

.intro-section {
  display: grid;
  gap: 10px;
  padding: 18px 0 28px;
  border-bottom: 1px solid var(--line);
}

.article-header {
  max-width: 820px;
}

.site-kicker {
  margin: 0 0 8px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-strong);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.15rem, 6vw, 4.2rem);
  line-height: 1.02;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.28rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.lead {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--text-muted);
  line-height: 1.8;
}

.article-layout {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.section-block {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.section-block p {
  margin-bottom: 0;
  line-height: 1.85;
}

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

.section-label {
  margin-bottom: 6px;
  color: var(--accent-warm);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.article-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.article-card {
  display: grid;
  gap: 8px;
  min-height: 156px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  text-decoration: none;
}

.article-card-type {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.article-card-title {
  font-size: 1.2rem;
  font-weight: 800;
}

.article-card-text {
  color: var(--text-muted);
  line-height: 1.7;
}

.site-notes {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1.28fr);
  gap: 20px;
  margin-top: 24px;
}

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

.note-item {
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.note-item p {
  margin-bottom: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.inline-action {
  margin: 22px 0 0;
  font-weight: 800;
}

.inline-action a {
  color: var(--accent-strong);
}

.slhub-character-image:not([src]) {
  display: none;
}

.slhub-character-image[src] {
  display: block;
  width: min(160px, 42vw);
  height: auto;
  margin: 2px 0 14px;
  border-radius: 8px;
}

@media (max-width: 700px) {
  .top-bar {
    padding-inline: 16px;
  }

  .page-shell {
    width: min(100% - 28px, 1040px);
    padding-top: 24px;
  }

  .site-notes,
  .note-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-color-scheme: dark) {
  :root,
  body {
    background: #111815;
    color: #eef5ef;
    --surface: #18221e;
    --surface-muted: #1d2b25;
    --line: #304239;
    --text-muted: #b6c7bd;
    --accent: #19a878;
    --accent-strong: #7de1bf;
    --accent-warm: #f0ad4e;
  }

  .top-bar {
    background: rgba(17, 24, 21, 0.92);
  }

  .brand-mark {
    color: #07130f;
  }
}
