* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans KR", "Noto Sans", "Yu Gothic", Meiryo, sans-serif;
  color: #202820;
  background: #f7f8f5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

body {
  min-width: 320px;
  margin: 0;
  line-height: 1.75;
}

a {
  color: #176b4a;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

a:hover {
  color: #0c4b33;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: -100vw;
  z-index: 5;
  padding: 0.6rem 0.9rem;
  background: #fff;
  border-radius: 0.4rem;
}

.skip-link:focus {
  left: 0.5rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, 1040px);
  margin: 0 auto;
  padding: 1.15rem 0;
  border-bottom: 1px solid #dfe5dc;
}

.brand {
  color: #173d2c;
  font-size: 1.1rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.brand span {
  color: #718078;
  font-size: 0.82rem;
  font-weight: 500;
}

.primary-nav,
.language-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
}

.primary-nav a,
.language-switch a {
  font-size: 0.9rem;
}

.document {
  width: min(100% - 2rem, 760px);
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: 1.4rem 0 4rem;
}

.document-meta {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.25rem;
}

.language-switch a[aria-current="page"] {
  color: #26342a;
  font-weight: 700;
  text-decoration: none;
}

h1 {
  margin: 0 0 2rem;
  color: #173d2c;
  font-size: clamp(1.65rem, 6vw, 2.15rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.prose {
  font-size: 1rem;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.prose h2,
.prose h3,
.prose h4 {
  margin: 2rem 0 0.7rem;
  color: #243b2f;
  line-height: 1.5;
  scroll-margin-top: 1rem;
}

.prose h2 {
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #dfe5dc;
  font-size: 1.3rem;
}

.prose h3 {
  font-size: 1.12rem;
}

.prose p {
  margin: 0.65rem 0 1rem;
}

.prose ol,
.prose ul {
  padding-left: 1.5rem;
  margin: 0.6rem 0 1.25rem;
}

.prose li {
  padding-left: 0.2rem;
  margin: 0.35rem 0;
}

.prose blockquote {
  margin: 1rem 0;
  padding: 0.1rem 1rem;
  border-left: 3px solid #b4c9ba;
  color: #46584d;
}

.language-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.language-cards section {
  padding: 1rem 1.1rem;
  border: 1px solid #dfe5dc;
  border-radius: 0.8rem;
  background: #fff;
}

.language-cards h2 {
  margin-top: 0;
  color: #173d2c;
  font-size: 1.15rem;
}

.site-footer {
  padding: 1.1rem 1rem 2rem;
  border-top: 1px solid #dfe5dc;
  color: #718078;
  font-size: 0.85rem;
  text-align: center;
}

.site-footer a {
  color: inherit;
}

@media (max-width: 600px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.9rem 0;
  }

  .primary-nav {
    gap: 0.35rem 0.9rem;
  }

  .primary-nav a,
  .language-switch a {
    font-size: 0.88rem;
  }

  .document {
    width: min(100% - 1.5rem, 760px);
    padding-top: 1rem;
  }

  .prose {
    font-size: 1rem;
    line-height: 1.85;
  }
}
