/* ==============================
   RESET & BASE
   ============================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue:       #1D3D66;
  --blue-light: #e8eef6;
  --gold:       #c9a84c;
  --white:      #ffffff;
  --off-white:  #f7f8fa;
  --text:       #1a1a2e;
  --text-soft:  #4a5568;
  --text-muted: #8a96a8;
  --border:     #d0d9e8;
}

html, body {
  font-family: 'Montserrat', sans-serif;
  background: var(--off-white);
  color: var(--text);
}

a { text-decoration: none; color: inherit; }

/* ==============================
   PAGE
   ============================== */
.contents-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==============================
   HEADER
   ============================== */
.contents-header {
  background: var(--blue);
  padding: 28px 40px;
}

.contents-header-inner {
  max-width: 900px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 18px;
  transition: color 0.2s;
}

.back-link:hover { color: var(--white); }

.contents-title {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
}

/* ==============================
   MAIN
   ============================== */
.contents-main {
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  padding: 44px 32px 64px;
}

.contents-intro {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ==============================
   CHAPTERS LIST
   ============================== */
.chapters-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chapter-link {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.chapter-link:hover {
  border-color: var(--blue);
  transform: translateX(6px);
  box-shadow: -6px 0 0 var(--blue);
}

.chapter-num {
  min-width: 68px;
  padding: 22px 18px;
  background: var(--off-white);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  border-right: 1px solid var(--border);
  transition: background 0.25s, color 0.25s;
}

.chapter-link:hover .chapter-num {
  background: var(--blue-light);
  color: var(--blue);
}

.chapter-body {
  padding: 20px 22px;
  flex: 1;
}

.chapter-label {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.chapter-name {
  font-size: clamp(0.88rem, 2vw, 1rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.chapter-arrow {
  padding: 20px 22px;
  font-size: 1.2rem;
  color: var(--border);
  transition: color 0.25s, transform 0.25s;
}

.chapter-link:hover .chapter-arrow {
  color: var(--blue);
  transform: translateX(4px);
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 600px) {
  .contents-header { padding: 20px 16px; }
  .contents-main { padding: 28px 16px 48px; }
  .chapter-num { min-width: 48px; font-size: 1.1rem; padding: 18px 12px; }
  .chapter-body { padding: 16px 14px; }
  .chapter-arrow { padding: 18px 14px; }
}
