:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-muted: #f7f9fc;
  --ink: #0f172a;
  --ink-soft: #475569;
  --accent: #00a16a;
  --accent-strong: #007e53;
  --line: #d9e2ec;
  --line-strong: #bac8d6;
  --shadow-sm: 0 6px 16px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 16px 34px rgba(15, 23, 42, 0.08);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --max-width: 1320px;
  --reading-max: 88ch;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: "Noto Sans KR", "Source Sans 3", "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(180deg, #f8fafc 0%, #f2f6fa 100%);
}

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

a:hover {
  color: var(--accent-strong);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6rem;
  font-family: "Noto Sans KR", "Manrope", "Source Sans 3", "Segoe UI", sans-serif;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: #0b1220;
}

p {
  margin: 0;
  color: #334155;
  line-height: 1.82;
  word-break: keep-all;
  overflow-wrap: break-word;
}

ul,
ol {
  margin: 0;
  padding-left: 1.2rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ambient-layer {
  display: none;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 120;
  opacity: 0;
  transition: opacity 140ms ease;
}

.reading-progress.is-visible {
  opacity: 1;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #00c67f, #009d66);
}

.container {
  width: min(var(--max-width), calc(100% - 2rem));
  margin: 0 auto;
}

.top-ribbon {
  border-bottom: 1px solid #153040;
  background: #10222f;
}

.top-ribbon-inner {
  padding: 0.45rem 0;
}

.top-ribbon p {
  color: #d3dee6;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 110;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  color: var(--ink);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(140deg, #00b976, #008f5e);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
}

.brand-name {
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
}

.site-nav {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.site-nav a {
  color: #334155;
  font-size: 0.96rem;
  font-weight: 700;
  padding: 0.28rem 0.1rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: #0f172a;
  border-bottom-color: #00a16a;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.44rem 0.72rem;
  font-weight: 700;
}

.desktop-only {
  display: inline-flex;
}

.site-main {
  padding: 2rem 0 3.2rem;
}

.eyebrow {
  margin: 0 0 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  color: #0f766e;
  font-weight: 700;
}

.card-surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.66rem 0.98rem;
  line-height: 1;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(140deg, #00b377, #008f5d);
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
  filter: brightness(0.95);
}

.btn-secondary {
  border-color: var(--line-strong);
  color: #1e293b;
  background: #fff;
}

.btn-secondary:hover {
  border-color: #97a8bb;
  background: #f8fafc;
}

.btn-ghost {
  border-color: var(--line-strong);
  color: #334155;
  background: #f8fafc;
}

.btn-ghost:hover {
  background: #eef3f8;
  color: #0f172a;
}

.home-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  margin-bottom: 1.65rem;
}

.hero-main,
.hero-aside {
  padding: 1.3rem;
}

.hero-main {
  border-left: 5px solid #00a16a;
}

.hero-main h1 {
  font-size: clamp(2.05rem, 4vw, 3.35rem);
  line-height: 1.05;
  margin-bottom: 0.82rem;
}

.hero-copy {
  max-width: 66ch;
  margin-bottom: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
}

.hero-aside h2 {
  font-size: 1.48rem;
  margin-bottom: 0.74rem;
}

.hero-aside ul {
  display: grid;
  gap: 0.4rem;
  color: #475569;
  line-height: 1.58;
}

.home-section {
  margin-top: 1.85rem;
}

.section-headline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.78rem;
}

.section-headline h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
}

.link-arrow {
  font-weight: 700;
  color: #0369a1;
}

.link-arrow::after {
  content: " ->";
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.featured-grid .post-card {
  border-color: #bfd9cc;
}

.post-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.post-card[data-card-link] {
  cursor: pointer;
}

.post-card[data-card-link]:hover {
  border-color: #a9bcd0;
  box-shadow: var(--shadow-md);
}

.post-card[data-card-link]:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 2px;
}

.card-cover,
.post-cover,
.search-cover {
  min-height: 132px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.76rem;
}

.cover-intent,
.badge,
.cover-category {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.23rem 0.54rem;
  font-size: 0.71rem;
  font-weight: 700;
}

.cover-intent,
.cover-category {
  background: rgba(255, 255, 255, 0.88);
  color: #243444;
}

.badge {
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
}

.tone-amber {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 242, 214, 0.92), transparent 42%),
    linear-gradient(140deg, #f8c87a, #e6a843 58%, #b87519);
}

.tone-teal {
  background:
    radial-gradient(circle at 18% 12%, rgba(220, 255, 247, 0.9), transparent 44%),
    linear-gradient(140deg, #76e0cc, #38b39a 56%, #187260);
}

.tone-indigo {
  background:
    radial-gradient(circle at 20% 10%, rgba(228, 238, 255, 0.88), transparent 44%),
    linear-gradient(142deg, #8db0ff, #5f84da 56%, #3c599a);
}

.tone-rose {
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 232, 239, 0.9), transparent 42%),
    linear-gradient(140deg, #ee9bbb, #d0668f 56%, #984568);
}

.tone-slate {
  background:
    radial-gradient(circle at 18% 8%, rgba(233, 241, 251, 0.88), transparent 45%),
    linear-gradient(140deg, #8fa5bd, #60768f 56%, #3c4f65);
}

.post-card-body {
  padding: 0.92rem 0.95rem 1rem;
  display: grid;
  gap: 0.52rem;
}

.meta-line {
  font-size: 0.82rem;
  color: #617487;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.36rem;
  align-items: center;
}

.post-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.post-card h3 a {
  color: #0f172a;
}

.post-card h3 a:hover {
  color: #006b46;
}

.excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.tag,
.rail-chip,
.query-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #c6d3de;
  background: #f7fafc;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.58rem;
}

.tag:hover,
.rail-chip:hover,
.query-chip:hover {
  border-color: #87a5be;
  color: #0f172a;
  background: #eef5fb;
}

.category-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.newsletter-block {
  margin-top: 1.9rem;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1rem;
}

.newsletter-block h2 {
  font-size: clamp(1.48rem, 2.7vw, 2rem);
}

.newsletter-form {
  display: grid;
  align-content: center;
  gap: 0.58rem;
}

.newsletter-form input {
  height: 45px;
  border-radius: 8px;
  border: 1px solid #b8c8d8;
  padding: 0 0.8rem;
  font-size: 0.98rem;
  color: var(--ink);
  background: #fff;
}

.newsletter-note {
  font-size: 0.84rem;
}

.collection-hero {
  margin-bottom: 1rem;
  padding: 1.2rem;
}

.collection-hero h1 {
  font-size: clamp(1.8rem, 3.3vw, 2.7rem);
}

.collection-meta {
  margin-top: 0.78rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.term-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.term-card {
  padding: 1rem;
}

.term-card p {
  margin-bottom: 0.76rem;
}

.pager {
  margin-top: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.82rem;
  flex-wrap: wrap;
}

.pager-status {
  color: #475569;
  font-weight: 600;
}

.policy-page {
  padding: 1.4rem;
}

.policy-header {
  margin-bottom: 1rem;
}

.post-article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.2rem;
  justify-content: center;
  align-items: start;
}

.post-main {
  min-width: 0;
  max-width: 960px;
}

.post-header,
.post-body,
.source-block,
.faq-block,
.aside-card {
  padding: 1.6rem;
}

.post-header {
  border-top: 5px solid #00a16a;
}

.post-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.36rem;
  margin-bottom: 0.86rem;
  font-size: 0.82rem;
  color: #64748b;
  text-transform: none;
  letter-spacing: 0;
}

.post-breadcrumb a {
  color: #475569;
}

.post-breadcrumb a:hover {
  color: #0369a1;
}

.post-header h1 {
  font-size: clamp(1.95rem, 3.2vw, 2.9rem);
  line-height: 1.18;
  margin-bottom: 0.72rem;
  text-wrap: balance;
}

.lead {
  font-size: clamp(1.03rem, 1.5vw, 1.16rem);
  color: #334155;
  line-height: 1.75;
  max-width: var(--reading-max);
}

.post-header .meta-line {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  gap: 0.46rem;
}

.post-header .tag {
  font-size: 0.83rem;
  padding: 0.32rem 0.66rem;
}

.post-body {
  margin-top: 1rem;
  padding: 1.8rem 1.9rem;
}

.prose {
  color: #1e293b;
  line-height: 1.95;
  font-size: clamp(1.03rem, 1.15vw, 1.15rem);
  letter-spacing: -0.005em;
  max-width: none;
  margin: 0 auto;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.prose > * + * {
  margin-top: 1.15rem;
}

.prose h2,
.prose h3,
.prose h4 {
  color: #0f172a;
  line-height: 1.22;
}

.prose h2 {
  margin-top: 2.2rem;
  margin-bottom: 0.64rem;
  font-size: clamp(1.5rem, 2.1vw, 1.9rem);
  line-height: 1.34;
}

.prose h3 {
  margin-top: 1.7rem;
  margin-bottom: 0.5rem;
  font-size: clamp(1.18rem, 1.7vw, 1.42rem);
  line-height: 1.4;
}

.prose p,
.prose li {
  color: #1f2937;
  line-height: 1.92;
}

.prose ul,
.prose ol {
  display: grid;
  gap: 0.56rem;
  margin-top: 0.45rem;
  padding-left: 1.35rem;
}

.prose blockquote {
  margin: 1rem 0;
  border-left: 4px solid #00a16a;
  padding: 0.3rem 0 0.3rem 1rem;
  color: #334155;
  background: #f7fbf9;
}

.prose figure {
  margin: 1rem 0 1.2rem;
}

.prose img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #ccd8e3;
  background: #f8fbfe;
}

.prose figcaption {
  margin-top: 0.48rem;
  font-size: 0.92rem;
  color: #64748b;
}

.prose a {
  color: #00795a;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose .zola-anchor {
  display: none;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.9rem;
  font-size: 0.98rem;
}

.prose th,
.prose td {
  border: 1px solid #d8e2ec;
  padding: 0.65rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: #f8fbff;
  font-weight: 700;
  color: #0f172a;
}

.prose pre {
  padding: 0.95rem;
  border-radius: 10px;
  background: #0f172a;
  color: #e2e8f0;
  overflow-x: auto;
  line-height: 1.6;
}

.prose code {
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.source-block,
.faq-block {
  margin-top: 1rem;
  max-width: 960px;
}

.source-block h2,
.faq-block h2,
.source-block ul,
.faq-block details {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.source-block h2,
.faq-block h2 {
  font-size: 1.5rem;
}

.source-block ul {
  display: grid;
  gap: 0.42rem;
}

.source-block li::marker {
  color: #0f766e;
}

.faq-block details {
  border: 1px solid #cbd8e3;
  border-radius: 10px;
  padding: 0.72rem;
  background: #f9fbfd;
}

.faq-block details + details {
  margin-top: 0.55rem;
}

.faq-block summary {
  font-weight: 700;
  cursor: pointer;
  color: #0f172a;
}

.post-aside {
  display: grid;
  gap: 0.95rem;
  align-content: start;
}

.aside-card h2 {
  font-size: 1.1rem;
}

.aside-card p,
.aside-card li {
  color: #475569;
  line-height: 1.62;
}

.aside-card ul {
  margin-top: 0.58rem;
}

.post-aside .toc-card {
  position: sticky;
  top: 88px;
}

.toc-card nav ul {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 0.34rem;
}

.toc-card nav ul ul {
  margin-top: 0.18rem;
  padding-left: 0.7rem;
  border-left: 2px solid #d3e0ea;
}

.toc-card a {
  color: #334155;
  font-size: 0.92rem;
}

.toc-card a:hover {
  color: #00795a;
}

.ad-slot {
  margin-top: 1rem;
  min-height: 92px;
  border-radius: 10px;
  border: 1px dashed #afc3d5;
  background: #f7fbff;
  padding: 0.45rem;
}

.search-hero,
.search-shell {
  padding: 1rem;
}

.search-shell {
  margin-top: 1rem;
}

.search-label {
  display: inline-block;
  margin-bottom: 0.38rem;
  font-weight: 700;
  color: #1e293b;
}

.quick-queries {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.44rem;
}

.query-chip {
  cursor: pointer;
}

.search-input-wrap {
  position: relative;
}

#search-input {
  width: 100%;
  height: 47px;
  border-radius: 8px;
  border: 1px solid #b8c8d8;
  background: #fff;
  color: var(--ink);
  padding: 0 0.85rem;
  font-size: 1rem;
}

.search-status {
  margin: 0.55rem 0 0.85rem;
  font-size: 0.92rem;
}

.search-results {
  display: grid;
  gap: 0.72rem;
}

.search-result-card {
  overflow: hidden;
}

.search-result-body {
  padding: 0.92rem;
}

.search-result-body h3 {
  font-size: 1.12rem;
}

.search-meta {
  margin-top: 0.4rem;
  font-size: 0.84rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.site-footer {
  margin-top: 2.4rem;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 2rem 0 1.28rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.2rem;
}

.footer-grid h3,
.footer-grid h4 {
  margin-bottom: 0.45rem;
}

.footer-grid a,
.footer-grid p {
  display: block;
  margin-bottom: 0.34rem;
}

.muted {
  font-size: 0.92rem;
}

.copyright {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.86rem;
  color: #64748b;
}

[data-reveal] {
  opacity: 1;
  transform: none;
}

[data-reveal].reveal-in {
  opacity: 1;
  transform: none;
}

@media (min-width: 1200px) {
  .site-main {
    padding-top: 2.2rem;
  }

  .post-body,
  .post-header,
  .source-block,
  .faq-block {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (max-width: 980px) {
  .home-hero,
  .newsletter-block,
  .post-article {
    grid-template-columns: 1fr;
  }

  .post-aside .toc-card {
    position: static;
    top: auto;
  }

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

  .nav-wrap {
    grid-template-columns: auto auto auto;
  }

  .desktop-only {
    display: none;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .container {
    width: min(var(--max-width), calc(100% - 1.2rem));
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    right: 0.6rem;
    z-index: 130;
    border-radius: 10px;
    padding: 0.5rem;
    min-width: 188px;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    background: #fff;
    border: 1px solid #c8d6e3;
    box-shadow: var(--shadow-md);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    border-bottom: 0;
    padding: 0.5rem 0.52rem;
    border-radius: 8px;
  }

  .site-nav a:hover {
    background: #f1f5f9;
  }

  .site-main {
    padding-top: 1.25rem;
  }

  .home-section {
    margin-top: 1.45rem;
  }

  .post-grid,
  .term-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-actions,
  .collection-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .newsletter-form .btn {
    width: 100%;
  }

  .post-header h1 {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .post-body {
    padding: 1.25rem 1.2rem;
  }

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

@media (max-width: 480px) {
  .top-ribbon p {
    font-size: 0.72rem;
  }

  .brand-name {
    font-size: 1.04rem;
  }

  .hero-main,
  .hero-aside,
  .collection-hero,
  .search-hero,
  .search-shell,
  .policy-page,
  .post-header,
  .post-body,
  .source-block,
  .faq-block,
  .aside-card {
    padding: 0.92rem;
  }

  .post-breadcrumb {
    font-size: 0.76rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
