:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --panel: #f4f7f5;
  --ink: #0f1726;
  --muted: #667085;
  --line: #d8dde6;
  --blue: #0b6b5f;
  --blue-dark: #074b43;
  --accent: #0b6b5f;
  --max: 1370px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  background: #fff;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: grid;
  width: min(var(--max), calc(100% - 80px));
  min-height: 56px;
  grid-template-columns: 260px minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: center;
  margin: 0 auto;
}

.brand {
  color: var(--ink);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 800;
}

.top-nav a {
  color: var(--ink);
  opacity: 0.78;
}

.top-nav a:hover,
.top-nav .is-active {
  color: var(--accent);
  opacity: 1;
}

.top-nav .is-active {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  height: 38px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0 12px;
  color: var(--ink);
  outline: none;
}

.search-box button {
  border: 0;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.channel-hero {
  background: #f5f8f7;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  width: min(var(--max), calc(100% - 80px));
  min-height: 126px;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
  margin: 0 auto;
  padding: 30px 0 34px;
}

.hero-inner h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(46px, 6vw, 72px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.hero-inner p {
  margin: 10px 0 0;
  color: #344054;
  font-size: 17px;
  font-weight: 700;
}

.page-shell {
  width: min(var(--max), calc(100% - 80px));
  margin: 0 auto;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 34px;
  align-items: start;
  padding: 30px 0 64px;
}

.primary-column {
  min-width: 0;
}

.archive-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 10px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}

.archive-meta h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.archive-meta span,
.post-date {
  color: var(--muted);
  font-size: 13px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.list-item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.list-thumb {
  display: block;
  width: 220px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e8edf4;
}

.list-thumb img,
.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-copy {
  min-width: 0;
  padding-top: 4px;
}

.meta-link {
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.list-copy h2 {
  margin: 8px 0 10px;
  font-size: 23px;
  line-height: 1.38;
  letter-spacing: 0;
}

.list-copy p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: #344054;
  font-size: 15px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.empty-state {
  margin: 20px 0;
  padding: 24px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.side-column {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 18px;
}

.side-block {
  border: 1px solid #cfd6e1;
  background: var(--paper);
  padding: 24px 22px;
}

.side-block h2 {
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 23px;
  line-height: 1.25;
}

.popular-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: popular;
}

.popular-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  counter-increment: popular;
}

.popular-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.popular-list li::before {
  color: #000;
  content: counter(popular);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}

.popular-list a {
  display: block;
  color: #000;
  font-weight: 800;
  line-height: 1.45;
}

.popular-list span {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
}

.article-view {
  max-width: 880px;
  background: var(--paper);
}

.article-header {
  padding: 8px 0 26px;
  border-bottom: 2px solid var(--ink);
}

.article-header h1 {
  margin: 10px 0 14px;
  color: var(--ink);
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: 0;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.article-body {
  padding-top: 30px;
  color: #202b3c;
  font-size: 18px;
  line-height: 1.9;
}

.article-body img {
  width: 100%;
  height: auto;
  margin: 22px 0;
}

.article-body figure {
  margin: 28px 0;
}

.article-body figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.article-body h2,
.article-body h3 {
  margin: 46px 0 16px;
  color: var(--ink);
  line-height: 1.35;
}

.article-body h2 {
  font-size: 29px;
}

.article-body h3 {
  font-size: 23px;
}

.article-body p {
  margin: 0 0 22px;
}

.article-body a {
  color: var(--accent);
  border-bottom: 1px solid rgba(11, 107, 95, 0.35);
}

.article-body blockquote {
  margin: 30px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--blue);
  background: var(--panel);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 15px;
}

.article-body th,
.article-body td {
  padding: 12px;
  border: 1px solid var(--line);
  text-align: left;
}

.article-body th {
  background: var(--panel);
}

.tag-trail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
}

.tag-trail a {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.related-posts {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.section-head h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.related-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e8edf4;
}

.related-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.4;
}

.paging {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.paging a {
  display: inline-flex;
  min-width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.paging .selected,
.paging a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.paging .no-more-prev,
.paging .no-more-next {
  opacity: 0.35;
  pointer-events: none;
}

.site-footer {
  display: flex;
  width: min(var(--max), calc(100% - 80px));
  margin: 0 auto;
  padding: 32px 0 52px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  justify-content: space-between;
}

.site-footer strong {
  color: var(--ink);
}

.site-footer p {
  margin: 4px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer-links a {
  color: var(--muted);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--accent);
}

#tt-body-page .channel-hero {
  display: none;
}

#tt-body-page .content-layout {
  padding-top: 36px;
}

#tt-body-page .archive-meta {
  display: none;
}

@media (max-width: 1100px) {
  .header-inner {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .search-box {
    grid-column: 1 / -1;
    width: min(100%, 360px);
    margin-bottom: 12px;
  }

  .hero-inner,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .side-column {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner,
  .hero-inner,
  .page-shell,
  .site-footer {
    width: min(100% - 28px, var(--max));
  }

  .header-inner {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 0;
  }

  .brand {
    font-size: 28px;
  }

  .top-nav {
    gap: 16px;
  }

  .hero-inner {
    min-height: 132px;
    gap: 14px;
    padding: 30px 0 34px;
  }

  .hero-inner h1 {
    font-size: 46px;
  }

  .list-item {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 16px;
  }

  .list-thumb {
    width: 132px;
  }

  .list-copy h2 {
    font-size: 19px;
  }

  .list-copy p {
    -webkit-line-clamp: 1;
  }

  .content-layout {
    padding-top: 22px;
  }

  .article-header h1 {
    font-size: 34px;
  }

  .article-body {
    font-size: 17px;
  }

  .related-grid,
  .related-card {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    gap: 14px;
  }
}
