:root {
  color-scheme: light;
  --blue: #3168e8;
  --blue-dark: #2454c6;
  --blue-soft: #eef3fb;
  --navy: #1a2638;
  --ink: #30373e;
  --muted: #666d6b;
  --line: #e3e7ed;
  --surface: #ffffff;
  --surface-alt: #f6f8fb;
  --blog-canvas: #ffffff;
  --shadow-soft: 0 8px 24px rgba(26, 38, 56, 0.06);
  --radius: 22px;
  --radius-sm: 13px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--blog-canvas);
  font-family: Pretendard, "Pretendard Variable", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 3px;
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
  outline: 3px solid rgba(53, 109, 243, 0.36);
  outline-offset: 3px;
}

.shell {
  width: min(1040px, calc(100% - 40px));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 9px;
  color: white;
  background: var(--navy);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(227, 231, 237, 0.92);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  color: var(--navy);
  font-size: 18px;
  font-weight: 650;
  text-decoration: none;
}

.brand strong {
  color: var(--blue);
}

.brand-label {
  margin-left: 3px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(145deg, #5687ff, #2f67ec);
  box-shadow: 0 8px 20px rgba(53, 109, 243, 0.25);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.service-link:hover {
  color: var(--blue-dark);
}

.breadcrumb {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.breadcrumb a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.breadcrumb [aria-current="page"] {
  overflow: hidden;
  color: var(--blue-dark);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-hero {
  padding: 44px 0 34px;
}

.eyebrow,
.category-label {
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.blog-hero h1 {
  margin: 8px 0 9px;
  color: var(--navy);
  font-size: clamp(32px, 4.5vw, 43px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.blog-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.blog-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding-bottom: 90px;
}

.category-sidebar {
  position: sticky;
  top: 96px;
}

.category-heading {
  padding: 0 8px 14px;
  border-bottom: 1px solid var(--line);
}

.category-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.4;
}

.category-heading span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.category-nav {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.category-nav a {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.category-nav a[aria-current="page"],
.category-nav a:hover {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.category-count {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: #536178;
  font-size: 12px;
  font-weight: 750;
}

.category-nav a[aria-current="page"] .category-count {
  border-color: #c7d7fa;
  color: var(--blue-dark);
}

.post-archive {
  min-width: 0;
}

.archive-header {
  display: flex;
  min-height: 66px;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 8px 14px;
}

.archive-kicker {
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.archive-header h2 {
  margin: 1px 0 0;
  color: var(--navy);
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.archive-header p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 13px;
}

.archive-header strong {
  color: var(--navy);
}

.empty-archive {
  padding: 42px 24px;
  border-block: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.empty-archive strong {
  display: block;
  color: var(--navy);
  font-size: 18px;
}

.empty-archive p {
  margin: 5px 0 0;
  font-size: 14px;
}

.post-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.post-list > li {
  border-bottom: 1px solid var(--line);
}

.post-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 24px;
  gap: 24px;
  align-items: center;
  min-height: 132px;
  padding: 22px 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    padding 0.15s ease;
}

.post-row:hover {
  padding-inline: 14px;
  background: var(--surface-alt);
}

.post-meta {
  display: grid;
  align-content: start;
  gap: 3px;
}

.post-meta time {
  color: var(--muted);
  font-size: 13px;
}

.post-summary {
  min-width: 0;
}

.post-summary h3 {
  margin: 0 0 7px;
  color: var(--navy);
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: -0.025em;
}

.post-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.post-row svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.article-shell {
  width: min(760px, calc(100% - 40px));
  margin-inline: auto;
}

.article-header {
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  margin: 13px 0 17px;
  color: var(--navy);
  font-size: clamp(34px, 6vw, 51px);
  line-height: 1.2;
  letter-spacing: -0.045em;
}

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

.article-lead {
  margin: 30px 0 0;
  color: #4f575c;
  font-size: 19px;
  line-height: 1.75;
}

.article-body {
  padding: 28px 0 18px;
}

.article-body h2 {
  margin: 52px 0 15px;
  color: var(--navy);
  font-size: 28px;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.article-body h3 {
  margin: 34px 0 10px;
  color: var(--navy);
  font-size: 20px;
  line-height: 1.45;
}

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

.article-body ul,
.article-body ol {
  margin: 0 0 24px;
  padding-left: 25px;
}

.article-body li + li {
  margin-top: 8px;
}

.article-body strong {
  color: #27313a;
}

.article-note {
  margin: 34px 0;
  padding: 22px 24px;
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--blue-soft);
  color: #46535d;
}

.article-note p:last-child {
  margin-bottom: 0;
}

.recommendations {
  display: grid;
  gap: 22px;
  padding: 44px 0 12px;
  border-top: 1px solid var(--line);
}

.recommendations h2 {
  margin: 0;
  color: var(--navy);
  font-size: 24px;
}

.recommendations > p {
  margin: -15px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.tool-card,
.related-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 126px;
  padding: 22px 24px;
  border: 1px solid #cddaf2;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #f5f7fb, var(--surface));
  text-decoration: none;
}

.tool-card:hover,
.related-card:hover {
  border-color: #91aff1;
}

.tool-card span,
.related-card span {
  display: block;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.tool-card strong,
.related-card strong {
  display: block;
  margin-top: 4px;
  color: var(--navy);
  font-size: 18px;
}

.tool-card p,
.related-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.tool-card svg,
.related-card svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sources {
  margin: 44px 0 0;
  padding: 27px 0 0;
  border-top: 1px solid var(--line);
}

.sources h2 {
  margin: 0 0 13px;
  color: var(--navy);
  font-size: 21px;
}

.sources ul {
  margin: 0;
  padding-left: 21px;
  color: var(--muted);
  font-size: 14px;
}

.sources a:hover {
  color: var(--blue-dark);
}

.sources a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.medical-note {
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.blog-index-return {
  display: flex;
  justify-content: center;
  padding: 46px 0 82px;
}

.blog-index-return a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 10px 19px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-dark);
  background: var(--surface);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
}

.site-footer .shell {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer p {
  margin: 0;
}

.site-footer strong {
  color: #414a50;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 18px;
  flex-wrap: wrap;
  color: #535d61;
  font-weight: 700;
}

.footer-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

@media (max-width: 700px) {
  .shell,
  .article-shell {
    width: min(100% - 28px, 760px);
  }

  .header-inner {
    min-height: 66px;
  }

  .brand {
    gap: 8px;
    font-size: 16px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .brand-label {
    padding-left: 9px;
    font-size: 12px;
  }

  .service-link {
    font-size: 12px;
  }

  .blog-hero {
    padding: 32px 0 26px;
  }

  .blog-hero p {
    font-size: 15px;
  }

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

  .blog-layout {
    display: block;
    padding-bottom: 58px;
  }

  .category-sidebar {
    position: static;
    margin-bottom: 30px;
  }

  .category-heading {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 0 0 9px;
    border-bottom: 0;
  }

  .category-heading h2 {
    font-size: 16px;
  }

  .category-heading span {
    margin: 0;
  }

  .category-nav {
    display: flex;
    gap: 8px;
    margin: 0;
    padding-bottom: 3px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .category-nav a {
    flex: 0 0 auto;
    min-width: 82px;
    padding-inline: 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
  }

  .archive-header {
    min-height: 0;
    padding: 0 0 11px;
  }

  .archive-header h2 {
    font-size: 25px;
  }

  .post-row {
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 12px 16px;
    min-height: 0;
    padding: 20px 0;
  }

  .post-row:hover {
    padding-inline: 8px;
  }

  .post-meta {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
  }

  .post-summary h3 {
    font-size: 20px;
  }

  .post-summary p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .article-header {
    padding-top: 34px;
  }

  .article-body h2 {
    margin-top: 42px;
    font-size: 25px;
  }

  .article-note {
    padding: 19px 18px;
  }

  .tool-card,
  .related-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px 18px;
  }

  .tool-card svg,
  .related-card svg {
    justify-self: end;
  }

  .site-footer .shell {
    display: block;
    padding-block: 22px;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 12px;
    gap: 4px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
