:root {
  --navy: #1d3557;
  --navy-2: #24426b;
  --accent: #0f766e;
  --accent-soft: #e6f4f2;
  --warn: #b45309;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --card: #ffffff;
  --text: #1f2937;
  --text-strong: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --container: 1200px;
  --content: 760px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-soft: #111c33;
  --card: #15213a;
  --text: #d6deea;
  --text-strong: #f1f5f9;
  --muted: #94a3b8;
  --line: #24324d;
  --accent: #2dd4bf;
  --accent-soft: #11313a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

h1,
h2,
h3,
h4 {
  color: var(--text-strong);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.narrow {
  max-width: var(--content);
}

.center {
  text-align: center;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: #fff;
  padding: 8px 12px;
}

/* top bar & header */
.topbar {
  background: var(--navy);
  color: #cbd5e1;
  font-size: 13px;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 34px;
  gap: 12px;
}

.topbar a {
  color: #e2e8f0;
  text-decoration: none;
  margin-left: 16px;
}

.topbar a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.header-inner>*,
.hero-inner>*,
.card-grid>*,
.feature-grid>*,
.post-layout>*,
.post-nav>* {
  min-width: 0;
}

.brand {
  flex-shrink: 0;
}

.brand img {
  display: block;
  width: 150px;
  height: auto;
  border-radius: 6px;
}

[data-theme="dark"] .brand img,
[data-theme="dark"] .footer-brand img {
  filter: none;
  background: #ffffff;
  padding: 3px 8px;
  border-radius: 8px;
}

.main-nav {
  flex: 1;
}

.main-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.main-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-strong);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.main-nav a:hover {
  background: var(--bg-soft);
  color: var(--accent);
}

.header-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--text-strong);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--bg-soft);
}

.nav-toggle {
  display: none;
}

/* hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #1f5c6b 100%);
  color: #e2e8f0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  padding: 56px 0;
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #5eead4;
}

.page-404 .eyebrow,
.page-list .eyebrow {
  color: var(--accent);
}

.hero h1 {
  color: #fff;
  font-size: clamp(30px, 4vw, 44px);
  margin: 0 0 16px;
}

.hero h1 span {
  display: block;
  font-size: .6em;
  font-weight: 600;
  color: #cbd5e1;
  margin-top: 6px;
}

.hero-lead {
  font-size: 17px;
  margin: 0 0 24px;
  color: #dbe4f0;
  max-width: 620px;
}

.hero-search {
  display: flex;
  gap: 8px;
  max-width: 560px;
}

.hero-search input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 16px;
  background: var(--card);
  color: var(--text);
}

.hero-search button,
.btn {
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

.hero .hero-search button {
  background: #14b8a6;
}

.hero-tools {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  padding: 22px;
}

.hero-tools-title {
  margin: 0 0 12px;
  font-weight: 700;
  color: #fff;
}

.hero-tools ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.hero-tools a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  color: #f1f5f9;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.hero-tools a:hover {
  background: rgba(255, 255, 255, .18);
}

/* sections & cards */
.section {
  margin: 56px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--text-strong);
  padding-bottom: 10px;
}

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

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.more-link {
  white-space: nowrap;
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.card-thumb {
  aspect-ratio: 2 / 1;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #ffffff;
}

.card-thumb-fallback {
  display: grid;
  place-items: center;
  height: 100%;
  background: var(--bg-soft);
  color: var(--muted);
  font-weight: 700;
}

.card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
}

.card-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.card-meta {
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  align-self: flex-start;
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
}

.card-lg .card-title {
  font-size: 24px;
}

.feature-side {
  display: grid;
  gap: 12px;
}

.card-sm .card-link {
  flex-direction: row;
}

.card-sm .card-thumb {
  flex: 0 0 144px;
  aspect-ratio: 2 / 1;
  border-bottom: 0;
  border-right: 1px solid var(--line);
}

.card-sm .card-body {
  padding: 10px 14px;
  gap: 4px;
}

.card-sm .card-title {
  font-size: 15px;
}

.about-box {
  background: var(--bg-soft);
  border-radius: 16px;
  padding: 32px;
}

.about-box h2 {
  margin-top: 0;
}

/* list pages */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13.5px;
  color: var(--muted);
  margin: 20px 0 8px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

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

.list-head {
  margin: 8px 0 28px;
}

.list-head h1 {
  font-size: clamp(26px, 3vw, 34px);
  margin: 0 0 8px;
}

.list-head p {
  color: var(--muted);
  margin: 0;
  max-width: 760px;
}

.list-head.center p {
  margin-inline: auto;
}

.list-head.center .hero-search {
  margin: 24px auto 40px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 600;
}

.chip span {
  color: var(--muted);
  font-weight: 500;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* structured category hub sections */
.cat-featured {
  margin: 28px 0 32px;
}

.cat-featured .card {
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow);
}

.cat-featured .card-link {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  align-items: stretch;
}

.cat-featured .card-thumb {
  border-bottom: 0;
  border-right: 1px solid var(--line);
}

.cat-featured .card-body {
  padding: 24px 28px;
  justify-content: center;
  gap: 10px;
}

.cat-featured .card-title {
  font-size: clamp(20px, 2.2vw, 24px);
}

.cat-featured .card-excerpt {
  font-size: 15px;
  line-height: 1.65;
}

.cat-group {
  margin: 36px 0 44px;
}

.cat-group-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.cat-group-title {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 23px);
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  line-height: 1.3;
}

.cat-group-lead {
  margin: 6px 0 0 16px;
  color: var(--muted);
  font-size: 14.5px;
}

.cat-group-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

@media (max-width: 780px) {
  .cat-featured .card-link {
    grid-template-columns: 1fr;
  }

  .cat-featured .card-thumb {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .cat-featured .card-body {
    padding: 18px 20px;
  }

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

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 40px 0;
}

.page-num,
.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-strong);
  font-weight: 600;
}

.page-num.is-current {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* post layout */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--content)) 300px;
  gap: 48px;
  justify-content: center;
}

.post {
  min-width: 0;
}

.post-head {
  margin: 8px 0 24px;
}

.post-head h1 {
  font-size: clamp(28px, 3.4vw, 38px);
  margin: 12px 0 14px;
}

.post-lead {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 16px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 14px;
  color: var(--muted);
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.post-meta .author {
  font-weight: 700;
  color: var(--text-strong);
}

.post-hero {
  margin: 0 0 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.post-hero img {
  width: 100%;
  height: auto;
  display: block;
  background: #ffffff;
}

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

.aside-sticky {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 20px;
}

.toc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 4px 0 8px;
}

.toc a {
  display: block;
  padding: 5px 16px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
  border-left: 2px solid transparent;
}

.toc a:hover,
.toc a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.toc .toc-l3 a {
  padding-left: 30px;
  font-size: 13.5px;
}

.toc-title,
.toc summary {
  margin: 0;
  padding: 12px 16px 6px;
  font-weight: 800;
  color: var(--text-strong);
  cursor: pointer;
}

.toc-side {
  max-height: calc(100vh - 360px);
  overflow: auto;
}

.toc-inline {
  display: none;
  margin: 0 0 24px;
}

/* article typography */
.post-body {
  font-size: 17px;
  line-height: 1.85;
}

.post-body>* {
  margin-top: 0;
  margin-bottom: 1.15em;
}

.post-body h2 {
  font-size: 25px;
  margin: 2.2em 0 .8em;
  padding: 0 0 0 14px;
  border-left: 5px solid var(--accent);
}

.post-body h3 {
  font-size: 20px;
  margin: 1.8em 0 .6em;
}

.post-body h4 {
  font-size: 18px;
  margin: 1.5em 0 .5em;
}

.post-body ul,
.post-body ol {
  padding-left: 1.4em;
}

.post-body li {
  margin: .35em 0;
}

.post-body blockquote {
  margin: 1.5em 0;
  padding: 14px 20px;
  border-left: 4px solid var(--navy);
  background: var(--bg-soft);
  border-radius: 0 10px 10px 0;
}

.post-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.4em 0;
}

.post-body figure {
  margin: 1.6em 0;
  max-width: 100% !important;
}

.post-body figure img,
.post-body>p img {
  border-radius: 8px;
  background: #ffffff;
  max-width: 100% !important;
  height: auto;
}

.post-body img[style*="height"] {
  height: auto !important;
}

.post-body pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

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

.post-body .fig-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.post-body .fig-center img {
  margin-inline: auto;
  display: block;
}

.post-body .text-center {
  text-align: center;
}

.post-body .text-left {
  text-align: left;
}

.post-body .text-lg {
  font-size: 1.12em;
}

.post-body .content-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.post-body .content-col {
  flex-basis: auto !important;
}

.post-body .image-gallery,
.post-body .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.post-body .image-gallery figure,
.post-body .gallery figure {
  margin: 0;
}

.post-body iframe {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.post-body mark {
  background: #fef08a;
  color: inherit;
  padding: 0 2px;
}

/* tables */
.table-wrap,
.post-body figure.table-figure {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.6em 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.6;
  background: var(--card);
}

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

.post-body thead th,
.post-body th {
  background: var(--bg-soft);
  color: var(--text-strong);
  font-weight: 700;
}

.post-body tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--bg-soft) 55%, transparent);
}

.post-body table caption {
  caption-side: top;
  font-weight: 700;
  padding: 0 0 8px;
  text-align: left;
  color: var(--text-strong);
}

.post-body .table-wrap table td[style],
.post-body .table-wrap table th[style] {
  border-color: var(--line) !important;
}

/* ergonomic & clinical scoring matrix cards */
.matrix-card {
  margin: 1.5em 0 1.9em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
  overflow: hidden;
}

.matrix-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 10px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.matrix-title {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-strong);
}

.matrix-note {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 9px;
  border-radius: 999px;
}

.matrix-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
}

.post-body table.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  background: var(--card);
}

.post-body table.matrix-table th,
.post-body table.matrix-table td {
  padding: 7px 6px;
  text-align: center;
  vertical-align: middle;
  border: 1px solid var(--line);
  min-width: 34px;
}

.post-body table.matrix-table tbody tr:nth-child(even) td {
  background: transparent;
}

.post-body table.matrix-table tbody tr:hover td:not([class*="mx-lv"]) {
  background: color-mix(in srgb, var(--accent-soft) 55%, transparent);
}

.post-body table.matrix-table th.mx-corner {
  background: var(--navy);
  color: #f8fafc;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border-color: rgba(255, 255, 255, .18);
}

.mx-c-top,
.mx-c-bot {
  display: block;
  line-height: 1.35;
}

.mx-c-top {
  color: #99f6e4;
  padding-bottom: 3px;
  margin-bottom: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, .2);
}

.mx-c-bot {
  color: #ffffff;
}

.post-body table.matrix-table th.mx-axis {
  background: var(--navy-2);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .01em;
  border-color: rgba(255, 255, 255, .18);
}

.post-body table.matrix-table th.mx-sub {
  background: color-mix(in srgb, var(--navy) 10%, var(--bg-soft));
  color: var(--text-strong);
  font-weight: 700;
  font-size: 12.5px;
}

.post-body table.matrix-table th.mx-idx {
  background: var(--bg-soft);
  color: var(--text-strong);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}

.post-body table.matrix-table .mx-gsep {
  border-left: 2px solid #94a3b8 !important;
}

[data-theme="dark"] .post-body table.matrix-table .mx-gsep {
  border-left-color: #475569 !important;
}

.post-body table.matrix-table .mx-rsep td,
.post-body table.matrix-table .mx-rsep th {
  border-top: 2px solid #94a3b8 !important;
}

[data-theme="dark"] .post-body table.matrix-table .mx-rsep td,
[data-theme="dark"] .post-body table.matrix-table .mx-rsep th {
  border-top-color: #475569 !important;
}

.post-body table.matrix-table td.mx-val {
  font-weight: 600;
  color: var(--text-strong);
}

.post-body table.matrix-table td.mx-lv1,
.mx-chip.mx-lv1 {
  background: #ecfdf5 !important;
  color: #065f46 !important;
  font-weight: 600;
}

.post-body table.matrix-table td.mx-lv2,
.mx-chip.mx-lv2 {
  background: #eff6ff !important;
  color: #1e40af !important;
  font-weight: 600;
}

.post-body table.matrix-table td.mx-lv3,
.mx-chip.mx-lv3 {
  background: #fffbeb !important;
  color: #92400e !important;
  font-weight: 700;
}

.post-body table.matrix-table td.mx-lv4,
.mx-chip.mx-lv4 {
  background: #fff7ed !important;
  color: #9a3412 !important;
  font-weight: 700;
}

.post-body table.matrix-table td.mx-lv5,
.mx-chip.mx-lv5 {
  background: #fef2f2 !important;
  color: #991b1b !important;
  font-weight: 800;
}

[data-theme="dark"] .post-body table.matrix-table td.mx-lv1,
[data-theme="dark"] .mx-chip.mx-lv1 {
  background: rgba(16, 185, 129, .18) !important;
  color: #6ee7b7 !important;
}

[data-theme="dark"] .post-body table.matrix-table td.mx-lv2,
[data-theme="dark"] .mx-chip.mx-lv2 {
  background: rgba(59, 130, 246, .20) !important;
  color: #93c5fd !important;
}

[data-theme="dark"] .post-body table.matrix-table td.mx-lv3,
[data-theme="dark"] .mx-chip.mx-lv3 {
  background: rgba(245, 158, 11, .20) !important;
  color: #fcd34d !important;
}

[data-theme="dark"] .post-body table.matrix-table td.mx-lv4,
[data-theme="dark"] .mx-chip.mx-lv4 {
  background: rgba(249, 115, 22, .22) !important;
  color: #fdba74 !important;
}

[data-theme="dark"] .post-body table.matrix-table td.mx-lv5,
[data-theme="dark"] .mx-chip.mx-lv5 {
  background: rgba(239, 68, 68, .24) !important;
  color: #fca5a5 !important;
}

.post-body table.matrix-table--compact th,
.post-body table.matrix-table--compact td {
  padding: 5px 4px;
  font-size: 12.5px;
  min-width: 26px;
}

.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  padding: 9px 14px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.matrix-legend-lbl {
  font-weight: 700;
  color: var(--muted);
  margin-right: 2px;
}

.mx-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, .08);
  line-height: 1.4;
}

/* dokdok ecosystem overview cards & pills */
.dok-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 1.2em 0 1.8em;
}

.dok-hub-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.dok-hub-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.dok-hub-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-strong);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.dok-hub-title span {
  color: var(--accent);
  font-size: 14px;
  flex-shrink: 0;
}

.dok-hub-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.dok-pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dok-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text-strong);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.dok-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.dok-shot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 1.4em 0 1.9em;
}

.post-body figure.dok-shot {
  margin: 0 !important;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 3px 12px rgba(15, 23, 42, .06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.post-body figure.dok-shot--wide {
  grid-column: 1 / -1;
}

.post-body figure.dok-shot:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.dok-shot-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.2;
}

.dok-shot-dots {
  display: inline-flex;
  gap: 5px;
  flex-shrink: 0;
}

.dok-shot-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  display: inline-block;
}

.dok-shot-dots i:nth-child(1) { background: #fca5a5; }
.dok-shot-dots i:nth-child(2) { background: #fcd34d; }
.dok-shot-dots i:nth-child(3) { background: #86efac; }

.dok-shot-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dok-shot-link {
  display: block;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.post-body figure.dok-shot .dok-shot-link img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0 !important;
  transition: transform .22s ease;
}

.post-body figure.dok-shot:hover .dok-shot-link img {
  transform: scale(1.012);
}

.post-body figure.dok-shot figcaption {
  margin: 0 !important;
  padding: 11px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  text-align: left;
  background: var(--card);
  flex: 1;
}

.post-body figure.dok-shot figcaption strong {
  color: var(--text-strong);
  font-weight: 700;
}

@media (max-width: 720px) {
  .dok-shot-grid {
    grid-template-columns: 1fr;
  }
}

/* interactive image slide carousel (.oh-slider) & zoom lightbox (.oh-lightbox) */
.oh-slider {
  margin: 1.6em 0 1.9em;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 3px 12px rgba(15, 23, 42, .06);
  overflow: hidden;
}

.oh-slider-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.oh-slider-info {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.oh-slider-badge {
  flex-shrink: 0;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.oh-slider-cap {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oh-slider-zoom {
  flex-shrink: 0;
  padding: 4px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text-strong);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.oh-slider-zoom::before {
  content: "🔍 ";
  font-size: 11.5px;
}

.oh-slider-zoom:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.oh-slider-stage {
  position: relative;
  background: var(--bg-soft);
}

.oh-slider-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.oh-slider-track::-webkit-scrollbar {
  display: none;
}

.oh-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 56px;
  min-height: 280px;
  box-sizing: border-box;
}

.post-body .oh-slide img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 500px !important;
  object-fit: contain;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 3px 12px rgba(15, 23, 42, .08);
  cursor: zoom-in;
  display: block;
}

.oh-slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text-strong);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .14);
  font-size: 24px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  padding: 0 0 2px;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.oh-slider-nav:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.oh-slider-prev { left: 10px; }
.oh-slider-next { right: 10px; }

.oh-slider-thumbs {
  display: flex;
  gap: 8px;
  padding: 9px 14px;
  background: var(--card);
  border-top: 1px solid var(--line);
  overflow-x: auto;
}

.oh-slider-thumb {
  flex: 0 0 auto;
  width: 62px;
  height: 44px;
  padding: 2px;
  border-radius: 7px;
  border: 2px solid var(--line);
  background: #ffffff;
  cursor: pointer;
  opacity: .58;
  overflow: hidden;
  transition: opacity .15s ease, border-color .15s ease, transform .15s ease;
}

.oh-slider-thumb:hover {
  opacity: .9;
}

.oh-slider-thumb.is-active {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.post-body .oh-slider-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 4px !important;
  display: block;
}

.post-body img.oh-zoom-img {
  cursor: zoom-in;
  border: 1px solid var(--line);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.post-body img.oh-zoom-img:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .10);
}

.post-body figure.oh-zoomable {
  position: relative;
}

.post-body figure.oh-zoomable::after {
  content: "🔍 클릭하여 크게 보기";
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .74);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transition: opacity .16s ease;
}

.post-body figure.oh-zoomable:hover::after {
  opacity: 1;
}

.oh-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, .92);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  color: #f8fafc;
}

.oh-lightbox[hidden],
.oh-lb-nav[hidden] {
  display: none !important;
}

.oh-lb-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(15, 23, 42, .85);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  flex-shrink: 0;
}

.oh-lb-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.oh-lb-count {
  flex-shrink: 0;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(45, 212, 191, .18);
  color: #5eead4;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.oh-lb-cap {
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oh-lb-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.oh-lb-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.oh-lb-btn:hover {
  background: rgba(255, 255, 255, .18);
}

.oh-lb-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
}

.oh-lb-stage {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 64px;
}

.oh-lb-img {
  max-width: min(92vw, 1440px);
  max-height: calc(100vh - 104px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
  cursor: zoom-in;
}

.oh-lightbox.is-zoomed .oh-lb-stage {
  align-items: flex-start;
  justify-content: safe center;
}

.oh-lightbox.is-zoomed .oh-lb-img {
  max-width: none;
  max-height: none;
  min-width: min(960px, 160vw);
  cursor: zoom-out;
}

.oh-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(15, 23, 42, .78);
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  padding: 0 0 3px;
}

.oh-lb-nav:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.oh-lb-prev { left: 14px; }
.oh-lb-next { right: 14px; }

@media (max-width: 640px) {
  .oh-slide {
    padding: 14px 44px;
    min-height: 210px;
  }

  .post-body .oh-slide img {
    max-height: 360px !important;
  }

  .oh-slider-nav {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .oh-slider-prev { left: 6px; }
  .oh-slider-next { right: 6px; }

  .oh-lb-stage {
    padding: 12px 12px;
  }

  .oh-lb-cap {
    display: none;
  }
}

.page-badge {
  font-size: .6em;
  color: var(--muted);
  font-weight: 600;
  margin-left: 6px;
}

.series-box {
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 28px 0;
}

.series-title {
  margin: 0 0 10px;
  font-weight: 800;
  color: var(--text-strong);
  font-size: 16px;
}

.series-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: 15px;
}

.series-list a {
  text-decoration: none;
  font-weight: 600;
}

.series-list a:hover {
  text-decoration: underline;
}

.series-list .is-current {
  font-weight: 700;
  color: var(--text-strong);
}

.series-list .is-current em {
  font-style: normal;
  font-size: 13px;
  color: var(--accent);
  margin-left: 4px;
}

.agency-table-wrap {
  margin: 1.6em 0;
}

.at-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.at-search {
  flex: 1 1 260px;
  max-width: 420px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  background: var(--card);
  color: var(--text);
}

.at-meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.at-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 999px;
}

.at-count {
  font-size: 14px;
  color: var(--muted);
}

.pop-ref-meta {
  display: inline-block;
  margin: 0 0 1em;
  padding: 7px 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
}

.at-scroll {
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0;
}

.at-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.at-tel {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.at-tel:hover {
  text-decoration: underline;
}

.at-empty {
  margin: 12px 0 0;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
}

/* components */
.callout,
.notice-box {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 1.6em 0;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}

.callout-note {
  border-left: 4px solid var(--navy);
}

.callout-tip {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
}

.callout-warning {
  border-left: 4px solid var(--warn);
  background: color-mix(in srgb, #fde68a 25%, var(--bg));
}

.callout-law {
  border-left: 4px solid #6d28d9;
}

.callout> :last-child {
  margin-bottom: 0;
}

.notice-box p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.faq-list {
  display: grid;
  gap: 10px;
  margin: 1.4em 0;
}

.faq {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}

.faq summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--text-strong);
  list-style: none;
  position: relative;
  padding-right: 44px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "Q";
  color: var(--accent);
  font-weight: 800;
  margin-right: 8px;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 12px;
  font-size: 20px;
  color: var(--muted);
}

.faq[open] summary::after {
  content: "−";
}

.faq-body {
  padding: 0 18px 14px;
}

.faq-body p {
  margin: .4em 0;
  font-size: 15.5px;
}

.file-card {
  margin: 1em 0;
}

.file-card a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-strong);
  background: var(--card);
}

.file-card a:hover {
  border-color: var(--accent);
}

.file-ext {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--navy);
  border-radius: 6px;
  padding: 3px 8px;
}

.file-name {
  flex: 1;
  font-weight: 600;
  font-size: 15px;
}

.file-action {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.tool-box {
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 28px;
}

.tool-box-title {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--accent);
}

.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.tool-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--card);
  color: var(--text-strong);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid var(--line);
}

.tool-item:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tool-go {
  color: var(--accent);
}

.author-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 24px 0;
  background: var(--card);
}

.author-box img {
  width: 44px;
  height: 44px;
  padding: 7px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  object-fit: contain;
  flex: 0 0 44px;
  margin-top: 2px;
}

.author-box p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}

.author-name {
  font-weight: 800;
  color: var(--text-strong) !important;
  font-size: 16px !important;
  margin-bottom: 4px !important;
}

.author-name span {
  font-weight: 500;
  color: var(--muted);
  font-size: 13px;
  margin-left: 6px;
}

.share {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
  font-size: 14px;
  color: var(--muted);
}

.share-btn {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text-strong);
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.share-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 28px 0 8px;
}

.post-nav-item {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-strong);
  font-weight: 600;
  font-size: 15px;
}

.post-nav-item span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
}

.post-nav-item.next {
  text-align: right;
}

.related {
  background: var(--bg-soft);
  padding: 48px 0;
  margin-top: 40px;
}

.related h2 {
  margin: 0 0 20px;
  font-size: 22px;
}

/* ads (CLS 방지용 높이 예약) */
.ad {
  margin: 28px 0;
  min-height: 120px;
  background: transparent;
}

.ad-content_top,
.ad-content_inline {
  min-height: 250px;
}

.ad-sidebar {
  min-height: 250px;
}

.ad ins.adsbygoogle[data-ad-status="unfilled"] {
  display: none !important;
}

.ad:has(ins[data-ad-status="unfilled"]) {
  min-height: 0;
  margin: 0;
}

/* search */
.search-status {
  color: var(--muted);
}

.search-results {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}

.search-results a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: var(--card);
}

.search-results a:hover {
  border-color: var(--accent);
}

.search-results strong {
  display: block;
  color: var(--text-strong);
  font-size: 17px;
}

.search-results small {
  color: var(--muted);
}

/* footer */
.site-footer {
  margin-top: 64px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.related+.site-footer {
  margin-top: 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr .9fr 1.1fr .9fr;
  gap: 28px;
  padding: 40px 0;
}

.footer-brand p {
  color: var(--muted);
  max-width: 420px;
}

.site-footer h2 {
  font-size: 15px;
  margin: 0 0 10px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
}

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 16px 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.footer-bottom p {
  margin: 2px 0;
}

/* responsive */
@media (max-width: 1100px) {
  .post-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-aside {
    display: none;
  }

  .toc-inline {
    display: block;
  }
}

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-grid;
  }

  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 8px 16px 16px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 40px 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .topbar-tagline {
    display: none;
  }

  .topbar-inner {
    justify-content: flex-start;
    font-size: 12px;
  }

  .topbar a {
    margin: 0 10px 0 0;
  }

  .header-inner {
    gap: 12px;
    min-height: 60px;
  }

  .brand img {
    width: 118px;
  }

  .post-body {
    font-size: 16.5px;
  }

  .post-body h2 {
    font-size: 22px;
  }

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

  .card-sm .card-thumb {
    flex-basis: 112px;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav-item.next {
    text-align: left;
  }

  .hero-tools ul {
    grid-template-columns: 1fr;
  }
}

@media print {

  .topbar,
  .site-header,
  .post-aside,
  .ad,
  .share,
  .post-nav,
  .related,
  .site-footer,
  .tool-box {
    display: none !important;
  }

  .post-layout {
    display: block;
  }

  body {
    color: #000;
  }
}