:root {
  --ink: #0a0a0a;
  --paper: #f3f3f3;
  --sheet: #ffffff;
  --mid: #6e6e6e;
  --line: #1a1a1a;
  --hair: #c8c8c8;
  --rail: 92px;
  --serif: "Noto Serif KR", "Song Myung", Georgia, serif;
  --sans: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: -0.01em;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.85'/%3E%3C/svg%3E");
}

.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--ink);
  background: var(--ink);
  color: var(--sheet);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 0 28px;
  z-index: 20;
}

.logo {
  text-decoration: none;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.logo__mark {
  width: 52px;
  height: 52px;
  display: block;
}

.logo__name {
  writing-mode: vertical-rl;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.42em;
  font-weight: 700;
}

.logo__sub {
  writing-mode: vertical-rl;
  font-size: 10px;
  letter-spacing: 0.28em;
  color: #bdbdbd;
}

.paper {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 0 168px 96px 48px;
  background: var(--sheet);
  border-right: 1px solid var(--hair);
}

.mast {
  padding: 28px 0 18px;
  border-bottom: 3px solid var(--ink);
}

.mast__issue {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mid);
}

.mast__rule {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 8px 0;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--mid);
}

.mast__word {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(52px, 9vw, 108px);
  line-height: 0.88;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero {
  display: grid;
  gap: 28px;
  padding: 36px 0 48px;
  border-bottom: 1px solid var(--ink);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.25;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.hero__lead {
  margin: 0;
  max-width: 42em;
  font-size: 18px;
  color: #222;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--ink);
}

.stats div {
  padding: 16px 14px;
  border-right: 1px solid var(--ink);
}

.stats div:last-child {
  border-right: 0;
}

.stats b {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.03em;
}

.stats span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--mid);
}

.visual {
  margin: 0;
}

.visual__frame {
  position: relative;
  overflow: hidden;
  background: #111;
  border: 1px solid var(--ink);
}

.visual__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.visual__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.04) 100%);
  animation: scan 7s linear infinite;
}

.visual--hero .visual__frame {
  aspect-ratio: 16 / 9;
  min-height: 380px;
}

.visual--portrait .visual__frame {
  aspect-ratio: 4 / 5;
  min-height: 420px;
  width: 100%;
}

.visual--wide .visual__frame {
  aspect-ratio: 2.4 / 1;
  min-height: 220px;
}

.visual--square .visual__frame {
  aspect-ratio: 1 / 1;
  min-height: 320px;
}

.visual--plate .visual__frame {
  aspect-ratio: 16 / 9;
  min-height: 300px;
}

.visual figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--mid);
  letter-spacing: 0.04em;
}

@keyframes scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.block {
  position: relative;
  padding: 56px 0 52px;
  border-bottom: 1px solid var(--hair);
}

.block__index {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--mid);
  margin: 0 0 10px;
}

.block h2 {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.3;
  letter-spacing: -0.035em;
}

.block h3 {
  margin: 28px 0 10px;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.03em;
}

.block h4 {
  margin: 18px 0 8px;
  font-size: 15px;
  font-weight: 700;
}

.block p {
  margin: 0 0 14px;
  max-width: 46em;
}

.block p:last-child {
  margin-bottom: 0;
}

.block--invert {
  background: var(--ink);
  color: var(--sheet);
  margin: 0 0 0 -48px;
  padding: 64px 48px 58px;
  border-bottom: 0;
}

.block--invert .block__index,
.block--invert p {
  color: #d2d2d2;
}

.block--invert h2,
.block--invert h3,
.block--invert h4 {
  color: var(--sheet);
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: start;
}

.split--flip {
  grid-template-columns: 1.1fr 0.9fr;
}

.split .copy p {
  max-width: none;
}

.sheet {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0 8px;
  font-size: 15px;
}

.sheet th,
.sheet td {
  border: 1px solid var(--ink);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.sheet th {
  background: var(--ink);
  color: var(--sheet);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sheet tr:hover td {
  background: var(--ink);
  color: var(--sheet);
}

.block--invert .sheet th {
  background: var(--sheet);
  color: var(--ink);
}

.block--invert .sheet th,
.block--invert .sheet td {
  border-color: #4a4a4a;
}

.block--invert .sheet tr:hover td {
  background: var(--sheet);
  color: var(--ink);
}

.log {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}

.log li {
  display: grid;
  grid-template-columns: 7.2em 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ink);
  font-size: 15px;
}

.block--invert .rank {
  border-top-color: #4a4a4a;
}

.block--invert .rank li {
  border-bottom-color: #4a4a4a;
}

.block--invert .steps li {
  border-color: #4a4a4a;
}

.sym {
  margin: 10px 0 0;
  padding-left: 1.15em;
}

.sym li {
  margin: 0 0 6px;
}

.rank {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  border-top: 1px solid var(--ink);
}

.rank li {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--ink);
}

.rank b {
  font-family: var(--serif);
  font-size: 22px;
}

.steps {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.steps li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--ink);
}

.steps span {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
}

.steps p {
  margin: 0;
}

.sheet-wrap {
  overflow-x: auto;
}

.site-foot {
  margin: 0 0 -96px -48px;
  padding: 40px 48px 56px;
  background: var(--ink);
  color: #d8d8d8;
}

.site-foot strong {
  display: block;
  color: var(--sheet);
  font-family: var(--serif);
  font-size: 20px;
  margin-bottom: 10px;
}

.site-foot p {
  margin: 0 0 18px;
  font-size: 13px;
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  border-top: 1px solid #3a3a3a;
  padding-top: 16px;
}

.site-foot a {
  color: var(--sheet);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid #666;
}

.site-foot a:hover {
  border-bottom-color: var(--sheet);
}

.stamp {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 50;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--sheet);
  text-decoration: none;
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: 0.04em;
  box-shadow:
    8px 8px 0 #000,
    0 18px 40px rgba(0, 0, 0, 0.28);
  animation: stamp-float 4.8s ease-in-out infinite;
}

.stamp:hover {
  transform: scale(1.05);
}

.stamp b {
  font-weight: 800;
}

@keyframes stamp-float {
  0%,
  100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: sticky;
    top: 0;
    height: auto;
    flex-direction: row;
    justify-content: flex-start;
    padding: 10px 16px;
    gap: 12px;
  }

  .logo {
    grid-auto-flow: column;
    align-items: center;
    gap: 10px;
  }

  .logo__mark {
    width: 36px;
    height: 36px;
  }

  .logo__name,
  .logo__sub {
    writing-mode: horizontal-tb;
    letter-spacing: 0.12em;
  }

  .logo__sub {
    display: none;
  }

  .paper {
    padding: 0 20px 88px;
    border-right: 0;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stats div:nth-child(1),
  .stats div:nth-child(2) {
    border-bottom: 1px solid var(--ink);
  }

  .stats div:nth-child(2),
  .stats div:nth-child(4) {
    border-right: 0;
  }

  .split,
  .split--flip {
    grid-template-columns: 1fr;
  }

  .block--invert,
  .site-foot {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-foot {
    margin-bottom: -88px;
    padding-bottom: 120px;
  }

  .stamp {
    right: 14px;
    bottom: 14px;
    width: 104px;
    height: 104px;
    font-size: 13px;
  }

  .visual--hero .visual__frame,
  .visual--portrait .visual__frame {
    min-height: 220px;
  }
}

@media (max-width: 720px) {
  .sheet th,
  .sheet td {
    padding: 10px 8px;
    font-size: 13px;
  }
}

.legal {
  padding: 40px 0 56px;
  max-width: 40em;
}

.legal h1 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 36px);
  letter-spacing: -0.035em;
}

.legal .updated {
  margin: 0 0 28px;
  font-size: 13px;
  color: var(--mid);
}

.legal h2 {
  margin: 28px 0 10px;
  font-family: var(--serif);
  font-size: 20px;
}

.legal p,
.legal li {
  margin: 0 0 12px;
}

.legal ul {
  margin: 0 0 16px;
  padding-left: 1.2em;
}

.back {
  margin: 0 0 24px;
}

.back a,
.legal .home {
  display: inline-block;
  margin-top: 8px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  font-size: 14px;
}

.back a:hover,
.legal .home:hover {
  letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .visual__frame::after,
  .stamp { animation: none; }
}
