*, *::before, *::after { box-sizing: border-box; }

:root {
  --teal: #2a9d8f;
  --teal-dark: #1f7268;
  --peach: #f4a261;
  --peach-soft: #fef3e2;
  --bg: #f8faf9;
  --surface: #ffffff;
  --ink: #1a3330;
  --muted: #5c736f;
  --line: #d4e8e4;
  --footer: #1a3330;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 3px solid var(--peach);
  box-shadow: 0 2px 12px rgba(26, 51, 48, 0.06);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 14px clamp(16px, 4vw, 32px);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
  color: var(--teal-dark);
}

.brand-mark {
  color: var(--peach);
  font-size: 18px;
  line-height: 1;
}

.brand-text {
  font-size: clamp(22px, 4vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.primary-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
}

.primary-nav a:hover {
  background: var(--peach-soft);
  color: var(--teal-dark);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--teal-dark);
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}

.site-main {
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px) clamp(16px, 4vw, 24px) 48px;
}

.page h1 {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.15;
  margin: 0 0 24px;
  letter-spacing: -0.03em;
  color: var(--teal-dark);
}

.page-home h1 {
  font-size: clamp(32px, 6vw, 48px);
}

.section-title {
  margin: 0 0 18px;
  font-size: 22px;
  color: var(--teal-dark);
  letter-spacing: -0.02em;
}

.home-intro {
  background: linear-gradient(135deg, var(--peach-soft) 0%, #fff 60%);
  border-left: 5px solid var(--teach, var(--teal));
  border-left-color: var(--teal);
  padding: 24px 28px;
  margin-bottom: 32px;
  border-radius: 0 16px 16px 0;
}

.intro-lead {
  margin: 0;
  font-size: clamp(17px, 2.5vw, 20px);
  color: var(--muted);
  max-width: 720px;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.topic-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0 14px 14px 0;
  border-left: 4px solid var(--teal);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(42, 157, 143, 0.12);
}

.topic-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--peach-soft);
  color: var(--teal-dark);
  font-weight: 800;
  border-radius: 10px;
  font-size: 18px;
}

.topic-body strong {
  display: block;
  margin-bottom: 4px;
  color: var(--teal-dark);
}

.topic-desc {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.article-grid > .section-title {
  grid-column: 1 / -1;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 0 12px 12px 0;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.3;
}

.card h2 a {
  color: var(--teal-dark);
  text-decoration: none;
}

.card h2 a:hover {
  color: var(--peach);
}

.card p {
  margin: 0 0 14px;
  flex: 1;
  font-size: 14px;
  color: var(--muted);
}

.card-more {
  align-self: flex-start;
  font-size: 14px;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
}

.card-more:hover {
  text-decoration: underline;
}

.content {
  font-size: 17px;
  max-width: 780px;
}

.content > *:first-child { margin-top: 0; }
.content p { margin: 0 0 16px; }
.content h2 { margin: 28px 0 12px; font-size: 26px; color: var(--teal-dark); }
.content h3 { margin: 22px 0 10px; font-size: 21px; }
.content ul, .content ol { padding-left: 22px; margin: 0 0 18px; }
.content li { margin: 4px 0; }
.content a { color: var(--teal); }
.content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0 18px;
}

.content table {
  max-width: 100%;
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 16px 0;
}

.content td, .content th {
  border: 1px solid var(--line);
  padding: 8px 10px;
}

.pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 28px 0 8px;
}

.pagination a, .pagination span {
  display: inline-flex;
  min-width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--teal-dark);
  font-weight: 700;
  text-decoration: none;
}

.pagination span {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.pagination a:hover {
  background: var(--peach-soft);
}

.related {
  max-width: 780px;
  margin: 36px 0 0;
  padding: 22px 24px;
  background: var(--peach-soft);
  border-radius: 12px;
  border: 1px solid #f0dcc0;
}

.related h2 {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--teal-dark);
}

.related ul {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  gap: 24px;
}

.related a {
  color: var(--teal-dark);
}

.site-footer {
  margin-top: 48px;
  background: var(--footer);
  color: #e8f2f0;
  padding: 32px clamp(16px, 4vw, 24px);
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand p {
  margin: 8px 0 0;
  color: #a8c4be;
  font-size: 14px;
  max-width: 320px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.sitemap-list {
  columns: 2;
  gap: 28px;
  padding-left: 20px;
}

@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .primary-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0 4px;
    border-top: 1px solid var(--line);
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 10px 8px; }
  .topics-grid, .article-grid { grid-template-columns: 1fr; }
  .related ul, .sitemap-list { columns: 1; }
  .home-intro { padding: 18px 20px; }
}
