/* HRSCS Lab. 사이트 1차판 — 큰 글자 기본(본문 19px), 외부 글꼴·스크립트 없음 */
:root {
  --ink: #1b1f24;
  --muted: #4a525c;
  --line: #d5dae0;
  --bg: #ffffff;
  --soft: #f3f5f8;
  --accent: #0b4f8a;
  --accent-ink: #ffffff;
}
* { box-sizing: border-box; }
html { font-size: 19px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 3px solid #f0a500; outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }
h1 { font-size: 2rem; line-height: 1.35; margin: 1.2rem 0 .6rem; }
h2 { font-size: 1.4rem; line-height: 1.4; margin: 2rem 0 .6rem; }
h3 { font-size: 1.15rem; line-height: 1.4; margin: 0 0 .2rem; }
p { margin: .5rem 0 1rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.small { font-size: .9rem; color: var(--muted); }
.count { font-size: .8em; font-weight: normal; color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px; z-index: 9; }

/* 머리·메뉴 */
header.site { border-bottom: 1px solid var(--line); background: #fff; }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.05rem; }
.brand-en { color: var(--accent); }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
nav a { display: inline-block; padding: 8px 12px; border-radius: 6px; text-decoration: none; font-size: 1rem; }
nav a:hover { background: var(--soft); }
nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }

/* 첫 화면 */
.hero { padding: 1.5rem 0 .5rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 1.5rem 0; }
.series-box, .placeholder { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 8px 24px 16px; }
.series-box h2, .placeholder h2 { margin-top: 1rem; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 10px 18px; border-radius: 8px; font-weight: 600; }
.btn:hover { filter: brightness(1.1); }
figure.sky { margin: 2rem 0; }
figure.sky img { width: 100%; border-radius: 10px; }
figcaption { margin-top: .6rem; font-size: 1rem; color: var(--muted); text-align: left; }
figcaption strong { color: var(--ink); }
.tiles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tiles a, .tiles.static li { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-weight: 600; background: #fff; }
.tiles a:hover { background: var(--soft); }
.tiles.static { grid-template-columns: repeat(3, 1fr); }

/* 책 목록 */
.toc { margin: .5rem 0 1rem; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.book { display: grid; grid-template-columns: 160px 1fr; gap: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.book img { border: 1px solid var(--line); }
.book .sub { margin: 0 0 .4rem; color: var(--muted); }
.parts { margin: 0; padding-left: 1.1rem; font-size: .9rem; color: var(--muted); line-height: 1.6; }
section { scroll-margin-top: 16px; }

/* 권별 쪽 */
.crumb { margin-top: 1rem; font-size: .95rem; }
.bookhead { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; margin: 1rem 0 1.5rem; }
.bookhead img { border: 1px solid var(--line); }
.bookhead h1 { margin-top: .2rem; }
.series-name { color: var(--accent); font-weight: 700; margin: 0; }
.sub.big { font-size: 1.2rem; }
details { border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; background: #fff; }
summary { cursor: pointer; padding: 12px 16px; font-weight: 600; font-size: 1.05rem; }
details[open] summary { border-bottom: 1px solid var(--line); background: var(--soft); }
ol.items { margin: 8px 0 12px; padding-left: 1.4rem; list-style: none; }
ol.items li { padding: 3px 0; }
.plain { list-style: none; padding: 0; margin: .5rem 0; }
.plain.dots { list-style: disc; padding-left: 1.3rem; }
.plain li { padding: 3px 0; }
.prevnext { display: flex; justify-content: space-between; gap: 12px; margin: 2rem 0; flex-wrap: wrap; }
.prevnext a { padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }

/* 꼬리 */
footer.site { margin-top: 3rem; border-top: 1px solid var(--line); background: var(--soft); padding: 12px 0 20px; }

/* 좁은 화면 */
@media (max-width: 820px) {
  .two, .grid { grid-template-columns: 1fr; }
  .tiles, .tiles.static { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  html { font-size: 18px; }
  .wrap { padding: 0 16px; }
  h1 { font-size: 1.6rem; }
  .book { grid-template-columns: 96px 1fr; gap: 12px; padding: 12px; }
  .bookhead { grid-template-columns: 1fr; }
  .bookhead img { max-width: 200px; }
  .tiles, .tiles.static { grid-template-columns: 1fr; }
  nav a { padding: 6px 10px; }
}
