:root {
  --canvas: #f5f7f2;
  --ink: #1d3029;
  --muted: #607169;
  --line: #c6d1c9;
  --line-strong: #8fa298;
  --paper: #ffffff;
  --coral: #e65337;
  --lime: #b9d443;
  --sky: #98c6dc;
  --focus: #1b75a5;
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background-color: var(--canvas);
  background-image: linear-gradient(to right, rgba(29, 48, 41, 0.045) 1px, transparent 1px), linear-gradient(to bottom, rgba(29, 48, 41, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
}

body.reader-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  padding: 8px 12px;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px max(24px, calc((100% - 1180px) / 2));
  border-bottom: 1px solid rgba(29, 48, 41, 0.18);
  background: rgba(245, 247, 242, 0.93);
  backdrop-filter: blur(12px);
}

.wordmark {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0;
  align-items: baseline;
  width: max-content;
  color: var(--ink);
  text-decoration: none;
}

.wordmark-mark,
.wordmark-name {
  font-family: "IBM Plex Mono", monospace;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0;
}

.wordmark-mark {
  color: var(--coral);
}

.wordmark-caption {
  flex-basis: 100%;
  margin-top: 2px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--coral);
}

main,
.site-footer {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.opening {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  gap: 64px;
  align-items: center;
  min-height: 500px;
  padding: 64px 0 52px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.opening h1 {
  max-width: 650px;
  margin: 0;
  font-size: 60px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.opening-description {
  max-width: 610px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.trace-map {
  position: relative;
  min-height: 300px;
  margin: 0;
  overflow: hidden;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--lime);
}

.trace-map::before,
.trace-map::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.trace-map::before {
  top: 0;
  left: 0;
  width: 42%;
  height: 100%;
  border-right: 1px solid rgba(29, 48, 41, 0.28);
  background: rgba(255, 255, 255, 0.18);
}

.trace-map::after {
  right: 16px;
  bottom: 76px;
  width: 76px;
  height: 76px;
  border: 1px solid var(--ink);
  background: var(--coral);
}

#trace-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.trace-caption {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 15px;
  left: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.trace-caption strong {
  grid-column: 1 / -1;
  margin-top: 12px;
  color: var(--ink);
  font-size: 12px;
}

.metrics {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}

.metrics dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
}

.metrics div {
  min-width: 0;
  padding: 22px 26px 24px;
}

.metrics div + div {
  border-left: 1px solid var(--line);
}

.metrics dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.metrics dd {
  margin: 8px 0 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 32px;
  font-weight: 600;
}

.content-section {
  padding: 88px 0;
  border-bottom: 1px solid var(--ink);
  animation: section-enter 560ms both;
}

.content-section:nth-of-type(3) {
  animation-delay: 70ms;
}

.content-section:nth-of-type(4) {
  animation-delay: 140ms;
}

.section-heading {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(0, 340px);
  gap: 18px;
  align-items: end;
  margin-bottom: 34px;
}

.section-number {
  color: var(--coral);
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  font-weight: 600;
}

.section-heading h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0;
}

.section-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: right;
  overflow-wrap: anywhere;
}

.ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.ranking-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 88px;
  gap: 14px;
  align-items: center;
  min-height: 87px;
  padding: 16px 8px;
  border-bottom: 1px solid var(--line);
}

.ranking-row:first-child {
  border-top: 3px solid var(--coral);
}

.ranking-row-placeholder {
  pointer-events: none;
}

.ranking-number,
.ranking-score {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
}

.ranking-number {
  color: var(--muted);
  font-size: 15px;
}

.ranking-detail {
  min-width: 0;
}

.ranking-model {
  display: inline-block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

a.ranking-model:hover,
.article-card-title:hover,
.markdown-content a:hover {
  color: var(--coral);
}

.ranking-detail p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.ranking-score {
  justify-self: end;
  color: var(--coral);
  font-size: 26px;
  white-space: nowrap;
}

.ranking-score small {
  margin-left: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.ranking-pagination {
  display: flex;
  justify-content: center;
  padding-top: 24px;
}

.ranking-pagination-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.ranking-page-button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink);
  background: var(--paper);
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.ranking-page-button:hover:not(:disabled) {
  border-color: var(--coral);
  color: var(--coral);
}

.ranking-page-button[aria-current="page"] {
  border-color: var(--ink);
  color: var(--paper);
  background: var(--ink);
}

.ranking-page-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.ranking-page-button-move {
  font-size: 18px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.analysis-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.article-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 205px;
  padding: 23px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
}

.article-card:nth-child(3n + 1) {
  border-top: 4px solid var(--coral);
}

.article-card:nth-child(3n + 2) {
  border-top: 4px solid var(--lime);
}

.article-card:nth-child(3n) {
  border-top: 4px solid var(--sky);
}

.article-card-meta,
.reader-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.article-card-category {
  margin: 0;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.article-card-title {
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.article-card-summary {
  display: -webkit-box;
  margin: 12px 0 20px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.article-card-date {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.article-card-test-note {
  margin: auto 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.loading-message,
.empty-message {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.empty-message {
  padding: 22px 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 34px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  line-height: 1.6;
}

.article-reader {
  width: min(1050px, calc(100% - 32px));
  max-height: min(850px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 6px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 12px 12px 0 rgba(29, 48, 41, 0.18);
}

.article-reader::backdrop {
  background: rgba(29, 48, 41, 0.54);
}

.reader-shell {
  max-height: inherit;
  overflow: auto;
}

.reader-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 25px 30px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.reader-header h2 {
  margin: 7px 0 0;
  font-size: 25px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.reader-meta time {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.reader-test-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 4px;
  color: var(--ink);
  background: var(--paper);
  font-family: "IBM Plex Mono", monospace;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--paper);
  background: var(--coral);
}

.markdown-content {
  padding: 34px 30px 52px;
  color: #26362f;
  font-size: 15px;
  line-height: 1.83;
  overflow-wrap: anywhere;
}

.markdown-content > :first-child {
  margin-top: 0;
}

.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  margin: 42px 0 16px;
  color: var(--ink);
  line-height: 1.4;
}

.markdown-content h2 {
  font-size: 27px;
}

.markdown-content h3 {
  font-size: 21px;
}

.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  font-size: 17px;
}

.markdown-content p,
.markdown-content ul,
.markdown-content ol,
.markdown-content blockquote,
.markdown-content pre,
.markdown-content .table-wrap {
  margin: 0 0 19px;
}

.markdown-content ul,
.markdown-content ol {
  padding-left: 25px;
}

.markdown-content li + li {
  margin-top: 5px;
}

.markdown-content strong {
  color: var(--ink);
}

.markdown-content code {
  padding: 2px 5px;
  border-radius: 3px;
  background: #e8eee8;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.88em;
}

.markdown-content pre {
  padding: 17px;
  overflow: auto;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: #1d3029;
  color: #f6f8f3;
  line-height: 1.65;
}

.markdown-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 13px;
}

.markdown-content blockquote {
  padding: 11px 18px;
  border-left: 4px solid var(--coral);
  background: #f7f9f5;
  color: #52635b;
}

.markdown-content blockquote p {
  margin: 0;
}

.markdown-content hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.markdown-content a {
  color: #0f607d;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.markdown-content table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.55;
}

.markdown-content th,
.markdown-content td {
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-content th:last-child,
.markdown-content td:last-child {
  border-right: 0;
}

.markdown-content tbody tr:last-child td {
  border-bottom: 0;
}

.markdown-content th {
  background: #e8eee8;
  color: var(--ink);
  font-weight: 700;
}

@keyframes section-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .content-section {
    animation: none;
  }
}

@media (max-width: 920px) {
  .opening {
    grid-template-columns: 1fr;
    gap: 38px;
    min-height: auto;
  }

  .trace-map {
    min-height: 260px;
  }

  .analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    min-height: 102px;
    padding: 14px 18px;
  }

  .site-nav {
    max-width: 52%;
    gap: 12px;
    padding-top: 4px;
    overflow-x: auto;
    font-size: 12px;
    white-space: nowrap;
  }

  main,
  .site-footer {
    width: min(100% - 32px, 1180px);
  }

  .opening {
    padding: 46px 0 40px;
  }

  .opening h1 {
    font-size: 39px;
  }

  .opening-description {
    font-size: 16px;
  }

  .metrics div {
    padding: 17px 14px 20px;
  }

  .metrics dt {
    font-size: 11px;
  }

  .metrics dd {
    font-size: 25px;
  }

  .content-section {
    padding: 58px 0;
  }

  .section-heading {
    grid-template-columns: 35px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 26px;
  }

  .section-meta {
    grid-column: 2;
    text-align: left;
  }

  .section-heading h2 {
    font-size: 27px;
  }

  .ranking-row {
    grid-template-columns: 43px minmax(0, 1fr) 60px;
    gap: 8px;
  }

  .ranking-model {
    font-size: 16px;
  }

  .ranking-score {
    font-size: 21px;
  }

  .ranking-score small {
    display: block;
    margin: 0;
  }

  .article-grid,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .article-card {
    min-height: 180px;
    padding: 20px;
  }

  .site-footer {
    flex-direction: column;
    padding: 20px 0 28px;
  }

  .article-reader {
    width: calc(100% - 18px);
    max-height: calc(100% - 18px);
  }

  .reader-header,
  .markdown-content {
    padding-right: 18px;
    padding-left: 18px;
  }

  .reader-header h2 {
    font-size: 21px;
  }

  .markdown-content {
    font-size: 14px;
  }

  .markdown-content h2 {
    font-size: 23px;
  }
}