:root {
  color-scheme: light;
  --ink: #171613;
  --paper: #f4efe3;
  --paper-deep: #e4dbc8;
  --white: #fffdf8;
  --muted: #69645b;
  --red: #bd3026;
  --line: #c9c0af;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
}

a {
  color: inherit;
}

.topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 18px clamp(20px, 5vw, 72px);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 253, 248, 0.24);
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
}

nav a {
  text-decoration: none;
}

.book-hero {
  position: relative;
  min-height: min(72vh, 690px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #171613 url("../assets/regulation-history-cover.jpg") center 40% / cover no-repeat;
  color: var(--white);
}

.book-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 14, 12, 0.68);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 128px clamp(20px, 5vw, 72px) clamp(48px, 8vw, 86px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 840px;
  margin: 0;
  font-family: "KoPubWorldBatang", "Noto Serif KR", "AppleMyungjo", serif;
  font-size: clamp(52px, 9vw, 104px);
  line-height: 1;
}

.subtitle {
  margin: 22px 0 0;
  font-size: clamp(19px, 2vw, 27px);
  font-weight: 700;
}

.byline {
  margin: 8px 0 0;
  color: #d8d1c2;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid rgba(255, 253, 248, 0.66);
  border-radius: 6px;
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  border-color: var(--red);
  background: var(--red);
}

.overview {
  display: grid;
  grid-template-columns: minmax(230px, 340px) minmax(0, 720px);
  justify-content: center;
  gap: clamp(38px, 7vw, 92px);
  align-items: center;
  padding: clamp(68px, 10vw, 122px) clamp(20px, 5vw, 72px);
  background: var(--paper);
}

.cover {
  margin: 0;
}

.cover img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #918a7c;
  box-shadow: 18px 22px 0 var(--paper-deep);
}

.summary h2,
.section-head h2 {
  margin: 0;
  font-family: "KoPubWorldBatang", "Noto Serif KR", "AppleMyungjo", serif;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.12;
}

.summary .lead {
  margin-top: 24px;
  font-size: 19px;
}

.summary > p:not(.eyebrow) {
  color: var(--muted);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 32px 0 0;
  border-block: 1px solid var(--line);
}

.facts div {
  padding: 16px 12px 16px 0;
}

.facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.facts dd {
  margin: 3px 0 0;
  font-size: 20px;
  font-weight: 850;
}

.reader-section,
.downloads-section {
  padding: clamp(62px, 9vw, 108px) clamp(20px, 5vw, 72px);
}

.reader-section {
  background: #1c1b18;
  color: var(--white);
}

.section-head {
  width: min(1180px, 100%);
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin: 0 auto 28px;
}

.section-head > p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
}

.text-link {
  color: inherit;
  font-weight: 800;
}

.reader-section iframe {
  width: min(1180px, 100%);
  height: min(82vh, 960px);
  display: block;
  margin: 0 auto;
  border: 1px solid #5a574f;
  border-radius: 6px;
  background: var(--white);
}

.reader-fallback {
  width: min(1180px, 100%);
  margin: 14px auto 0;
  color: #aaa397;
  font-size: 13px;
}

.downloads-section {
  background: var(--white);
}

.download-list {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 auto;
}

.download-list a {
  min-height: 118px;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-decoration: none;
}

.download-list a:hover {
  border-color: var(--red);
}

.download-list strong,
.download-list small {
  display: block;
}

.download-list strong {
  font-size: 20px;
}

.download-list small,
.download-list b {
  color: var(--muted);
  font-size: 13px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(20px, 5vw, 72px);
  background: var(--paper-deep);
  color: var(--muted);
  font-size: 14px;
}

footer p {
  margin: 0;
}

@media (max-width: 780px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .book-hero {
    min-height: 650px;
  }

  .overview,
  .download-list {
    grid-template-columns: 1fr;
  }

  .cover {
    width: min(310px, 82vw);
    margin: 0 auto;
  }

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

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

@media (max-width: 520px) {
  .topbar nav {
    gap: 12px;
  }

  h1 {
    font-size: 52px;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .reader-section iframe {
    height: 68vh;
  }

  .download-list a,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
