:root {
  --ink: #13243a;
  --ink-soft: #405268;
  --navy: #0d2847;
  --navy-2: #163b63;
  --mint: #66dec2;
  --mint-dark: #147b69;
  --mint-soft: #e4f8f2;
  --paper: #f7f8f5;
  --white: #ffffff;
  --line: #d9e2e8;
  --warm: #f4efe5;
  --danger: #a33d3d;
  --shadow: 0 20px 55px rgba(13, 40, 71, .10);
  --radius: 22px;
  --radius-sm: 12px;
  --measure: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", "Nanum Gothic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .18em; }
button, input { font: inherit; }
button { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: .75rem;
  left: .75rem;
  padding: .7rem 1rem;
  color: var(--white);
  background: var(--navy);
  border-radius: 8px;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  background: rgba(247, 248, 245, .94);
  border-bottom: 1px solid rgba(217, 226, 232, .9);
  backdrop-filter: blur(16px);
}
.header-inner,
.container {
  width: min(calc(100% - 2.5rem), var(--measure));
  margin-inline: auto;
}
.header-inner {
  display: flex;
  min-height: 4.6rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 850;
  letter-spacing: -.035em;
  text-decoration: none;
}
.brand img { width: 2.05rem; height: 2.05rem; }
.nav-list {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-list a {
  display: block;
  padding: .65rem .78rem;
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 720;
  text-decoration: none;
}
.nav-list a:hover,
.nav-list a[aria-current="page"] { color: var(--navy); background: var(--mint-soft); }

main { min-height: 64vh; }
.section { padding: 5.6rem 0; }
.section.compact { padding: 3.6rem 0; }
.section.alt { background: var(--white); border-block: 1px solid var(--line); }
.section.navy { color: var(--white); background: var(--navy); }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}
.section-head > :first-child { max-width: 46rem; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0 0 .7rem;
  color: var(--mint-dark);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.eyebrow::before { width: 1.6rem; height: 2px; content: ""; background: currentColor; }
h1, h2, h3 { margin: 0; color: var(--navy); line-height: 1.24; letter-spacing: -.045em; }
h1 { font-size: clamp(2.35rem, 7vw, 5.2rem); }
h2 { font-size: clamp(1.72rem, 4vw, 2.75rem); }
h3 { font-size: 1.16rem; }
p { margin: 0; }
.lede { max-width: 47rem; margin-top: 1.2rem; color: var(--ink-soft); font-size: clamp(1rem, 2vw, 1.22rem); }
.prose { max-width: 48rem; }
.prose > * + * { margin-top: 1.05rem; }
.prose h2 { margin-top: 3.3rem; }
.prose h3 { margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: .55rem; }
.prose a { color: var(--mint-dark); font-weight: 700; }
.fine { color: var(--ink-soft); font-size: .88rem; }

.hero { overflow: hidden; padding: 5.5rem 0 4.8rem; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(20rem, 1.08fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 6rem);
}
.hero h1 strong { color: var(--mint-dark); font-weight: inherit; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.button {
  display: inline-flex;
  min-height: 3.05rem;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.15rem;
  border: 1px solid var(--navy);
  border-radius: 11px;
  color: var(--white);
  background: var(--navy);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(13, 40, 71, .14);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(13, 40, 71, .2); }
.button.secondary { color: var(--navy); background: transparent; box-shadow: none; }
.button.mint { border-color: var(--mint); color: var(--navy); background: var(--mint); }
.button.small { min-height: 2.55rem; padding: .55rem .9rem; font-size: .88rem; }
.hero-visual {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-visual::after {
  position: absolute;
  inset: auto 1rem 1rem auto;
  padding: .45rem .7rem;
  content: "독립 편집 디렉터리";
  color: var(--navy);
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: .72rem;
  font-weight: 850;
  backdrop-filter: blur(8px);
}
.hero-note {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.3rem;
  margin-top: 1.6rem;
  color: var(--ink-soft);
  font-size: .85rem;
  font-weight: 700;
}
.hero-note span { display: inline-flex; align-items: center; gap: .42rem; }
.hero-note span::before { width: .48rem; height: .48rem; content: ""; background: var(--mint); border-radius: 50%; }

.breadcrumb { padding: 1.25rem 0 0; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: .82rem; }
.breadcrumb li + li::before { margin-right: .45rem; content: "/"; color: #8b9aab; }
.breadcrumb a { color: var(--mint-dark); }

.page-hero { padding: 3.9rem 0 3rem; }
.page-hero h1 { max-width: 54rem; font-size: clamp(2.25rem, 6vw, 4rem); }
.page-kicker { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .32rem .66rem;
  color: var(--navy);
  background: var(--mint-soft);
  border: 1px solid #b9e9dd;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 800;
  text-decoration: none;
}
.pill.neutral { background: var(--white); border-color: var(--line); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 2.3rem; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.stat { padding: 1.05rem 1.2rem; background: var(--white); }
.stat strong { display: block; color: var(--navy); font-size: 1.18rem; }
.stat span { color: var(--ink-soft); font-size: .78rem; }

.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.category-card {
  min-height: 13.5rem;
  padding: 1.45rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.category-card:hover { transform: translateY(-3px); border-color: #9edecf; box-shadow: var(--shadow); }
.category-icon { display: grid; width: 2.7rem; height: 2.7rem; place-items: center; margin-bottom: 1.3rem; color: var(--navy); background: var(--mint); border-radius: 11px; font-size: .86rem; font-weight: 900; }
.category-card p { margin-top: .55rem; color: var(--ink-soft); font-size: .9rem; }
.category-card .count { display: block; margin-top: 1rem; color: var(--mint-dark); font-size: .78rem; font-weight: 850; }

.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.principle { padding: 1.6rem; border-top: 3px solid var(--mint); background: rgba(255, 255, 255, .06); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.principle h3 { color: var(--white); }
.principle p { margin-top: .6rem; color: #cfdae5; font-size: .91rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, .92fr); align-items: center; gap: clamp(2rem, 7vw, 5rem); }
.section-visual { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.check-list { margin: 1.5rem 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 1.8rem; }
.check-list li + li { margin-top: .75rem; }
.check-list li::before { position: absolute; left: 0; top: .24rem; display: grid; width: 1.2rem; height: 1.2rem; place-items: center; content: "✓"; color: var(--navy); background: var(--mint); border-radius: 50%; font-size: .7rem; font-weight: 900; }

.directory-tools {
  position: sticky;
  z-index: 20;
  top: 5.3rem;
  margin-bottom: 1.6rem;
  padding: 1rem;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 32px rgba(13, 40, 71, .08);
  backdrop-filter: blur(10px);
}
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; }
.search-label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.search-input {
  width: 100%;
  min-height: 3rem;
  padding: .72rem 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.search-input:focus { outline: 3px solid rgba(102, 222, 194, .35); border-color: var(--mint-dark); }
.result-count { min-width: 7rem; align-self: center; color: var(--ink-soft); font-size: .83rem; font-weight: 750; text-align: right; }
.filter-list { display: flex; flex-wrap: wrap; gap: .42rem; margin-top: .75rem; }
.filter-button { padding: .45rem .72rem; color: var(--ink-soft); background: var(--white); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .78rem; font-weight: 780; }
.filter-button:hover, .filter-button[aria-pressed="true"] { color: var(--navy); background: var(--mint-soft); border-color: #9edecf; }

.site-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.site-card { display: flex; min-height: 18rem; flex-direction: column; padding: 1.35rem; background: var(--white); border: 1px solid var(--line); border-radius: 17px; }
.site-card[hidden] { display: none; }
.site-card .card-top { display: flex; align-items: start; justify-content: space-between; gap: .75rem; }
.site-card h2, .site-card h3 { font-size: 1.18rem; }
.site-card .domain { margin-top: .22rem; color: var(--mint-dark); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; word-break: break-all; }
.site-card .summary { margin-top: .9rem; color: var(--ink-soft); font-size: .88rem; }
.site-card .operator { margin-top: auto; padding-top: 1rem; color: var(--ink-soft); font-size: .76rem; }
.site-card .card-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: .7rem; color: var(--navy); font-size: .84rem; font-weight: 850; text-decoration: none; }
.site-card .card-link::after { content: "→"; }
.empty-state { display: none; padding: 3rem 1rem; color: var(--ink-soft); text-align: center; }
.empty-state.visible { display: block; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; gap: 3.5rem; }
.detail-main > section + section { margin-top: 3.7rem; }
.detail-main h2 { margin-bottom: 1rem; font-size: 1.72rem; }
.fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.fact { min-height: 7rem; padding: 1.15rem; background: var(--white); }
.fact dt { color: var(--ink-soft); font-size: .75rem; font-weight: 760; }
.fact dd { margin: .35rem 0 0; color: var(--navy); font-weight: 780; }
.domain-text { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; word-break: break-all; }
.official-card { padding: 1.5rem; background: var(--navy); border-radius: var(--radius); color: var(--white); }
.official-card h2 { color: var(--white); font-size: 1.4rem; }
.official-card p { margin: .7rem 0 1.2rem; color: #cfdae5; font-size: .9rem; }
.official-card .button { width: 100%; }
.notice { padding: 1.15rem 1.2rem; color: var(--ink); background: var(--warm); border-left: 4px solid #d7a748; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.review-box { padding: 1.4rem; background: var(--mint-soft); border: 1px solid #b9e9dd; border-radius: 16px; }
.review-box h3 { margin-bottom: .55rem; }
.review-box p { color: var(--ink-soft); font-size: .9rem; }
.aside-stack > * + * { margin-top: 1rem; }
.toc { padding: 1.2rem; background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.toc strong { display: block; margin-bottom: .65rem; color: var(--navy); font-size: .85rem; }
.toc a { display: block; padding: .28rem 0; color: var(--ink-soft); font-size: .83rem; }

.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 2.3rem 2rem; border-left: 1px solid var(--line); }
.timeline li::before { position: absolute; top: .2rem; left: -.42rem; width: .78rem; height: .78rem; content: ""; background: var(--mint); border: 3px solid var(--paper); border-radius: 50%; box-shadow: 0 0 0 1px var(--mint-dark); }
.timeline time { display: block; margin-bottom: .4rem; color: var(--mint-dark); font-size: .78rem; font-weight: 850; }
.timeline p { margin-top: .65rem; color: var(--ink-soft); }

.site-footer { padding: 3.7rem 0 2.2rem; color: #cfdae5; background: #081e36; }
.footer-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 3rem; }
.footer-title { color: var(--white); font-weight: 850; }
.footer-copy { max-width: 28rem; margin-top: .8rem; color: #aebdca; font-size: .85rem; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem 1rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.footer-links a { color: #cfdae5; font-size: .83rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 2rem; margin-top: 3rem; padding-top: 1.3rem; border-top: 1px solid rgba(255, 255, 255, .12); color: #93a7b9; font-size: .76rem; }

.no-js { padding: .9rem 1rem; color: var(--navy); background: var(--warm); border-radius: 10px; }
:focus-visible { outline: 3px solid rgba(20, 123, 105, .42); outline-offset: 3px; }

@media (max-width: 900px) {
  .header-inner { min-height: auto; padding: .75rem 0; align-items: flex-start; flex-direction: column; }
  .nav-list { width: 100%; overflow-x: auto; padding-bottom: .2rem; }
  .nav-list a { white-space: nowrap; }
  .hero-grid, .split, .detail-layout { grid-template-columns: 1fr; }
  .hero-visual { max-width: 43rem; }
  .category-grid, .site-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { gap: 2rem; }
  .aside-stack { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .aside-stack > * + * { margin-top: 0; }
  .directory-tools { top: 8.3rem; }
}

@media (max-width: 620px) {
  body { word-break: normal; overflow-wrap: anywhere; }
  .header-inner, .container { width: min(calc(100% - 1.4rem), var(--measure)); }
  .section { padding: 4rem 0; }
  .hero { padding: 3.6rem 0; }
  .hero-grid { gap: 2rem; }
  .hero-visual { border-radius: 20px; }
  .category-grid, .site-grid, .principle-grid, .fact-grid, .stats, .footer-grid, .aside-stack { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; gap: 1rem; }
  .category-card { min-height: auto; }
  .search-row { grid-template-columns: 1fr; }
  .result-count { text-align: left; }
  .directory-tools { position: static; }
  .site-card { min-height: 16rem; }
  .footer-bottom { flex-direction: column; gap: .5rem; }
}

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

@media print {
  .site-header, .site-footer, .hero-actions, .directory-tools, .button { display: none !important; }
  body { color: #000; background: #fff; }
  .section { padding: 2rem 0; }
  a { color: #000; }
}
