/* 신비한 웹사전 공개 페이지. A안(사전 지면): 미색 종이, 검정 글자, 강조는 형광 하나.
   각지고 평평하게 둔다(그림자·그라데이션·둥근 모서리 없음). 글꼴은 같은 폴더 fonts/ 에서만 읽는다. */

@font-face {
  font-family: 'Gowun Batang';
  src: url(fonts/GowunBatang-Bold.woff2) format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url(fonts/Pretendard-Regular.woff2) format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url(fonts/Pretendard-Bold.woff2) format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url(fonts/IBMPlexMono-Regular.woff2) format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f6f5f0;
  --ink: #141414;
  --ink-soft: #4a4a46;
  --highlight: #ffe14d;
  --serif: 'Gowun Batang', 'Noto Serif KR', 'Batang', 'AppleMyungjo', serif;
  --sans: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', 'Consolas', 'Menlo', monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

a:hover,
a:focus-visible {
  background: var(--highlight);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 머리띠: 사전 쪽머리처럼 아래에 겹줄 */
.site-header {
  border-bottom: 3px double var(--ink);
}

.site-header .inner,
main,
.site-footer .inner {
  max-width: 44rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.site-header .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.875rem;
}

.brand img {
  width: 56px;
  height: 56px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.site-nav a[aria-current='page'] {
  text-decoration: none;
  background: var(--highlight);
}

.hero {
  max-width: 60rem;
  margin: 0 auto;
  border-bottom: 1px solid var(--ink);
}

.hero img {
  width: 100%;
}

main {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.35;
}

h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.375rem;
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--ink);
}

main > h2:first-child,
main > section:first-child > h2:first-child {
  margin-top: 0;
}

h3 {
  font-size: 1.125rem;
  margin: 1.5rem 0 0.5rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.25rem;
}

/* 강조는 형광 하나 */
mark {
  color: inherit;
  background: var(--highlight);
}

code,
.scope {
  font-family: var(--mono);
  font-size: 0.875em;
  font-weight: 400;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.meta {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.status {
  color: var(--ink-soft);
}

dl dt {
  font-weight: 700;
}

dl dd {
  margin: 0 0 0.75rem;
}

.english {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
  color: var(--ink-soft);
}

.english h2 {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
  border: 0;
  padding: 0;
  letter-spacing: 0.04em;
}

.site-footer {
  border-top: 3px double var(--ink);
  font-size: 0.875rem;
}

.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 2rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 30rem) {
  h1 {
    font-size: 1.625rem;
  }

  .brand img {
    width: 48px;
    height: 48px;
  }
}
