/*!
 * LaTeX.css (https://latex.vercel.app/)
 *
 * Source: https://github.com/vincentdoerig/latex-css
 * Licensed under MIT (https://github.com/vincentdoerig/latex-css/blob/master/LICENSE)
*/

@font-face {
  font-family: 'Latin Modern';
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: url('./fonts/LM-regular.woff2') format('woff2'),
    url('./fonts/LM-regular.woff') format('woff'),
    url('./fonts/LM-regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Latin Modern';
  font-style: italic;
  font-weight: normal;
  font-display: swap;
  src: url('./fonts/LM-italic.woff2') format('woff2'),
    url('./fonts/LM-italic.woff') format('woff'),
    url('./fonts/LM-italic.ttf') format('truetype');
}

@font-face {
  font-family: 'Latin Modern';
  font-style: normal;
  font-weight: bold;
  font-display: swap;
  src: url('./fonts/LM-bold.woff2') format('woff2'),
    url('./fonts/LM-bold.woff') format('woff'),
    url('./fonts/LM-bold.ttf') format('truetype');
}

@font-face {
  font-family: 'Latin Modern';
  font-style: italic;
  font-weight: bold;
  font-display: swap;
  src: url('./fonts/LM-bold-italic.woff2') format('woff2'),
    url('./fonts/LM-bold-italic.woff') format('woff'),
    url('./fonts/LM-bold-italic.ttf') format('truetype');
}

@font-face {
  font-family: 'Libertinus';
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: url('./fonts/Libertinus-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Libertinus';
  font-style: italic;
  font-weight: normal;
  font-display: swap;
  src: url('./fonts/Libertinus-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Libertinus';
  font-style: normal;
  font-weight: bold;
  font-display: swap;
  src: url('./fonts/Libertinus-bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Libertinus';
  font-style: italic;
  font-weight: bold;
  font-display: swap;
  src: url('./fonts/Libertinus-bold-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Libertinus';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/Libertinus-semibold.woff2') format('woff2');
}

@font-face {
  font-family: 'Libertinus';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/Libertinus-semibold-italic.woff2') format('woff2');
}

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --body-color: hsl(0, 5%, 10%);
  --body-bg-color: hsl(210, 20%, 98%);
  --link-visited: hsl(0, 100%, 33%);
  --link-focus-outline: hsl(220, 90%, 52%);
  --pre-bg-color: hsl(210, 28%, 93%);
  --kbd-bg-color: hsl(210, 5%, 100%);
  --kbd-border-color: hsl(210, 5%, 70%);
  --table-border-color: black;
  --border-width-thin: 1.36px;
  --border-width-thick: 2.27px;
  --sidenote-target-border-color: hsl(55, 55%, 70%);
  --footnotes-border-color: hsl(0, 0%, 39%);
  --text-indent-size: 1.463rem; /* In 12pt [Latin Modern font] LaTeX article
  \parindent =~ 17.625pt; taking also into account the ratio
  1pt[LaTeX] = (72 / 72.27) * 1pt[HTML], with default 12pt/1rem LaTeX.css font
  size, the identation value in rem CSS units is:
  \parindent =~ 17.625 * (72 / 72.27) / 12 = 1.463rem. */
}

.latex-dark {
  --body-color: hsl(0, 0%, 86%);
  --body-bg-color: hsl(0, 0%, 16%);
  --link-visited: hsl(196 80% 77%);
  --link-focus-outline: hsl(215, 63%, 73%);
  --pre-bg-color: hsl(0, 1%, 25%);
  --kbd-bg-color: hsl(0, 0%, 16%);
  --kbd-border-color: hsl(210, 5%, 70%);
  --table-border-color: white;
  --sidenote-target-border-color: hsl(0, 0%, 59%);
  --footnotes-border-color: hsl(0, 0%, 59%);
  --proof-symbol-filter: invert(80%);
}

@media (prefers-color-scheme: dark) {
   .latex-dark-auto {
    --body-color: hsl(0, 0%, 86%);
    --body-bg-color: hsl(0, 0%, 16%);
    --link-visited: hsl(196 80% 77%);
    --link-focus-outline: hsl(215, 63%, 73%);
    --pre-bg-color: hsl(0, 1%, 25%);
    --kbd-bg-color: hsl(0, 0%, 16%);
    --kbd-border-color: hsl(210, 5%, 70%);
    --table-border-color: white;
    --sidenote-target-border-color: hsl(0, 0%, 59%);
    --footnotes-border-color: hsl(0, 0%, 59%);
    --proof-symbol-filter: invert(80%);
  }
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
ul[class],
ol[class],
li,
figure,
figcaption,
dl,
dd {
  margin: 0;
}

/* Make default font-size 1rem and add smooth scrolling to anchors */
html {
  font-size: 1rem;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body.libertinus {
  font-family: 'Libertinus', Georgia, Cambria, 'Times New Roman', Times, serif;
}

.text-justify {
  text-align: justify;
}

body {
  font-family: 'Latin Modern', Georgia, Cambria, 'Times New Roman', Times, serif;
  line-height: 1.8;

  max-width: 80ch;
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0 auto;
  padding: 2rem 1.25rem;

  counter-reset: theorem definition sidenote-counter;

  color: var(--body-color);
  background-color: var(--body-bg-color);

  text-rendering: optimizeLegibility;

  /* Allow automatic hyphenation for all text in the document */
  hyphens: auto;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
}

p {
  margin-top: 1rem;
}

/* Indents paragraphs like in LaTeX documents*/
.indent-pars p {
  text-indent: var(--text-indent-size);
}

.indent-pars p.no-indent,
p.no-indent {
  text-indent: 0;
}

.indent-pars ol p,
.indent-pars ul p {
  text-indent: 0;
}

.indent-pars h2 + p,
.indent-pars h3 + p,
.indent-pars h4 + p {
  text-indent: 0;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make links red */
a,
a:visited {
  color: var(--link-visited);
}

a:focus {
  outline-offset: 2px;
  outline: 2px solid var(--link-focus-outline);
}

/* Allow line breaks between any two characters */
.break-all {
  /*
    NOTE: Whith `break-all` value no hyphens are shown, even if the word breaks
    at a hyphenation point
  */
  word-break: break-all;
}

/* Make images easier to work with */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Prevent textarea from overflowing */
textarea {
  width: 100%;
}

/* Natural flow and rhythm in articles by default */
article > * + * {
  margin-top: 1em;
}

/* Styles for inline code or code snippets */
code,
pre,
kbd {
  font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;
  font-size: 85%;
  hyphens: none;
}
pre {
  padding: 1rem 1.4rem;
  max-width: 100%;
  overflow: auto;
  border-radius: 4px;
  background: var(--pre-bg-color);
}
pre code {
  font-size: 95%;
  position: relative;
}
kbd {
  background: var(--kbd-bg-color);
  border: 1px solid var(--kbd-border-color);
  border-radius: 2px;
  padding: 2px 4px;
  font-size: 75%;
}

/* Better tables */
table:not(.borders-custom) {
  border-collapse: collapse;
  border-spacing: 0;
  width: auto;
  max-width: 100%;
  border-top: var(--border-width-thick) solid var(--table-border-color);
  border-bottom: var(--border-width-thick) solid var(--table-border-color);
  /* display: block; */
  overflow-x: auto; /* does not work because element is not block */
  /* white-space: nowrap; */
  counter-increment: caption;
}
/* add bottom border on column table headings  */
table:not(.borders-custom) tr > th[scope='col'] {
  border-bottom: var(--border-width-thin) solid var(--table-border-color);
}
/* add right border on row table headings  */
table:not(.borders-custom) tr > th[scope='row'] {
  border-right: var(--border-width-thin) solid var(--table-border-color);
}
table:not(.borders-custom) > tbody > tr:first-child > td,
table:not(.borders-custom) > tbody > tr:first-child > th {
  border-top: var(--border-width-thin) solid var(--table-border-color);
}
table:not(.borders-custom) > tbody > tr:last-child > td,
table:not(.borders-custom) > tbody > tr:last-child > th {
  border-bottom: var(--border-width-thin) solid var(--table-border-color);
}

th,
td {
  text-align: left;
  padding: 0.5rem;
  line-height: 1.1;
}
/* Table caption */
caption {
  text-align: left;
  font-size: 0.923em;
  /* border-bottom: 2pt solid #000; */
  padding: 0 0.25em 0.25em;
  width: 100%;
  margin-left: 0;
}

caption::before {
  content: 'Table ' counter(caption) '. ';
  font-weight: bold;
}

/* allow scroll on the x-axis */
.scroll-wrapper {
  overflow-x: auto;
}

/* if a table is wrapped in a scroll wrapper,
  the table cells shouldn't wrap */
.scroll-wrapper > table td {
  white-space: nowrap;
}

/* Table custom borders */
table.borders-custom {
  border-collapse: collapse;
  border-spacing: 0;
  width: auto;
  max-width: 100%;
  overflow-x: auto;
  counter-increment: caption;
}

.border-top-thick {
  border-top: var(--border-width-thick) solid var(--table-border-color);
}
.border-right-thick {
  border-right: var(--border-width-thick) solid var(--table-border-color);
}
.border-bottom-thick {
  border-bottom: var(--border-width-thick) solid var(--table-border-color);
}
.border-left-thick {
  border-left: var(--border-width-thick) solid var(--table-border-color);
}

.border-top-thin {
  border-top: var(--border-width-thin) solid var(--table-border-color);
}
.border-right-thin {
  border-right: var(--border-width-thin) solid var(--table-border-color);
}
.border-bottom-thin {
  border-bottom: var(--border-width-thin) solid var(--table-border-color);
}
.border-left-thin {
  border-left: var(--border-width-thin) solid var(--table-border-color);
}

/* Table column alignment */
.col-1-l tr > :nth-child(1),
.col-2-l tr > :nth-child(2),
.col-3-l tr > :nth-child(3),
.col-4-l tr > :nth-child(4),
.col-5-l tr > :nth-child(5),
.col-6-l tr > :nth-child(6),
.col-7-l tr > :nth-child(7),
.col-8-l tr > :nth-child(8),
.col-9-l tr > :nth-child(9),
.col-10-l tr > :nth-child(10),
.col-11-l tr > :nth-child(11),
.col-12-l tr > :nth-child(12) {
  text-align: left;
}
.col-1-c tr > :nth-child(1),
.col-2-c tr > :nth-child(2),
.col-3-c tr > :nth-child(3),
.col-4-c tr > :nth-child(4),
.col-5-c tr > :nth-child(5),
.col-6-c tr > :nth-child(6),
.col-7-c tr > :nth-child(7),
.col-8-c tr > :nth-child(8),
.col-9-c tr > :nth-child(9),
.col-10-c tr > :nth-child(10),
.col-11-c tr > :nth-child(11),
.col-12-c tr > :nth-child(12) {
  text-align: center;
}
.col-1-r tr > :nth-child(1),
.col-2-r tr > :nth-child(2),
.col-3-r tr > :nth-child(3),
.col-4-r tr > :nth-child(4),
.col-5-r tr > :nth-child(5),
.col-6-r tr > :nth-child(6),
.col-7-r tr > :nth-child(7),
.col-8-r tr > :nth-child(8),
.col-9-r tr > :nth-child(9),
.col-10-r tr > :nth-child(10),
.col-11-r tr > :nth-child(11),
.col-12-r tr > :nth-child(12) {
  text-align: right;
}

/* Format figure captions (based on table captions) */
figure {
  counter-increment: figcaption;
}
figcaption {
  text-align: left;
  font-size: 0.923em;
  padding: 0.25em 0.25em 0;
  width: 100%;
  margin-left: 0;
}
figcaption::before {
  content: 'Figure ' counter(figcaption) '. ';
  font-weight: bold;
}

/* Center align the title */
h1:first-child {
  text-align: center;
}

/* Nested ordered list for ToC */
nav ol {
  counter-reset: item;
  padding-left: 2rem;
}
nav ol > li {
  display: block;
}
nav ol > li::before {
  content: counters(item, '.') ' ';
  counter-increment: item;
  padding-right: 0.85rem;
}

/* Center definitions (most useful for display equations) */
dl dd {
  text-align: center;
}

/* Theorem */
.theorem {
  counter-increment: theorem;
  display: block;
  margin: 12px 0;
  font-style: italic;
}
.theorem::before {
  content: 'Theorem ' counter(theorem) '. ';
  font-weight: bold;
  font-style: normal;
}

/* Lemma */
.lemma {
  counter-increment: theorem;
  display: block;
  margin: 12px 0;
  font-style: italic;
}
.lemma::before {
  content: 'Lemma ' counter(theorem) '. ';
  font-weight: bold;
  font-style: normal;
}

/* Proof */
.proof {
  display: block;
  margin: 12px 0;
  font-style: normal;
  position: relative;
}
.proof::before {
  content: 'Proof. ' attr(title);
  font-style: italic;
}
.proof::after {
  content: '◾️';
  filter: var(--proof-symbol-filter);
  position: absolute;
  right: -12px;
  bottom: -2px;
}

/* Definition */
.definition {
  counter-increment: definition;
  display: block;
  margin: 12px 0;
  font-style: normal;
}
.definition::before {
  content: 'Definition ' counter(definition) '. ';
  font-weight: bold;
  font-style: normal;
}

/* Center align author name, use small caps and add vertical spacing  */
.author {
  margin: 0.85rem 0;
  font-variant-caps: small-caps;
  text-align: center;
}

/* Sidenotes */

.sidenote {
  font-size: 0.8rem;
  float: right;
  clear: right;
  width: 18vw;
  margin-right: -20vw;
  margin-bottom: 1em;
  text-indent: 0;
  /* Right sidenotes explicitly aligned to left for wide screens */
  text-align: left;
}

.sidenote.left {
  float: left;
  margin-left: -20vw;
  margin-bottom: 1em;
  text-indent: 0;
  /* Left sidenotes explicitly aligned to right for wide screens */
  text-align: right;
}

/* Justify all sidenotes for wide screens when `text-justify` class is used */
body.text-justify .sidenote,
body.text-justify .sidenote.left {
    text-align: justify;
}

/* (WIP) add border when a sidenote is clicked on */
.sidenote:target {
  border: var(--sidenote-target-border-color) 1.5px solid;
  padding: 0 .5rem;
  scroll-margin-block-start: 10rem;
}

/* sidenote counter */
.sidenote-number {
  counter-increment: sidenote-counter;
}

.sidenote-number::after,
.sidenote::before {
  position: relative;
  vertical-align: baseline;
}

/* add number in main content */
.sidenote-number::after {
  content: counter(sidenote-counter);
  font-size: 0.7rem;
  top: -0.5rem;
  left: 0.1rem;
}

/* add number in front of the sidenote */
.sidenote-number ~ .sidenote::before {
  content: counter(sidenote-counter) ' ';
  font-size: 0.7rem;
  top: -0.5rem;
}

label.sidenote-toggle:not(.sidenote-number) {
  display: none;
}

/* sidenotes inside blockquotes are indented more */
blockquote .sidenote {
  margin-right: -24vw;
  width: 18vw;
}


label.sidenote-toggle {
  display: inline;
  cursor: pointer;
}

input.sidenote-toggle {
  display: none;
}

@media (max-width: 1050px) {
  label.sidenote-toggle:not(.sidenote-number) {
    display: inline;
  }
  .sidenote {
    display: none;
  }
  .sidenote-toggle:checked + .sidenote {
    display: block;
    margin: 0.5rem 1.25rem 1rem 0.5rem;
    float: left;
    left: 1rem;
    clear: both;
    width: 95%;
  }

  /* All sidenotes explicitly aligned to left for narrow screens */
  .sidenote-toggle:checked + .sidenote.left {
    text-align: left;
  }

  /* Justify all sidenotes for narrow screens when `text-justify` class is used */
  body.text-justify .sidenote-toggle:checked + .sidenote.left {
    text-align: justify;
  }

  /* tweak indentation of sidenote inside a blockquote */
  blockquote .sidenote {
    margin-right: -25vw;
    width: 16vw;
  }
}

/* Make footnote text smaller */
.footnotes p {
  line-height: 1.5;
  font-size: 85%;
  margin-bottom: 0.4rem;
}
.footnotes {
  border-top: 1px solid var(--footnotes-border-color);
}

/* Center title and paragraph */
.abstract,
.abstract p {
  text-align: center;
  margin-top: 0;
}
.abstract {
  margin: 2.25rem 0;
}
.abstract > h2 {
  font-size: 1rem;
  margin-bottom: -0.2rem;
}

/* Format the LaTeX symbol correctly (a higher up, e lower) */
.latex span:nth-child(1) {
  text-transform: uppercase;
  font-size: 0.75em;
  vertical-align: 0.28em;
  margin-left: -0.48em;
  margin-right: -0.15em;
  line-height: 1ex;
}

.latex span:nth-child(2) {
  text-transform: uppercase;
  vertical-align: -0.5ex;
  margin-left: -0.1667em;
  margin-right: -0.125em;
  line-height: 1ex;
}

/* Prevent line breaks inside an element */
.whitespace-nowrap {
  white-space: nowrap;
}

/* Heading typography */
h1 {
  font-size: 2.5rem;
  line-height: 3.25rem;
  margin-bottom: 1.625rem;
}

h2 {
  font-size: 1.7rem;
  line-height: 2rem;
  margin-top: 3rem;
}

h3 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
}

h4 {
  font-size: 1.2rem;
  margin-top: 2rem;
}

h5 {
  font-size: 1rem;
  margin-top: 1.8rem;
}

h6 {
  font-size: 1rem;
  font-style: italic;
  font-weight: normal;
  margin-top: 2.5rem;
}

h3,
h4,
h5,
h6 {
  line-height: 1.625rem;
}

h1 + h2 {
  margin-top: 1.625rem;
}

h2 + h3,
h3 + h4,
h4 + h5 {
  margin-top: 0.8rem;
}

h5 + h6 {
  margin-top: -0.8rem;
}

h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 0.8rem;
}
/* ── 덧칠 ────────────────────────────────────────────────────────────────
   바탕 CSS(latex/water)가 글자·여백을 이미 잡아 줍니다.
   여기서는 카드·버튼·묶음처럼 바탕에 없는 것만 더합니다.  최대한 짧게.
   ------------------------------------------------------------------- */

body { max-width: 62rem; margin: 0 auto; padding: 1.6rem 1.2rem 4rem; }
header { margin: 1.5rem 0 2.5rem; }
header h1 { margin: .2rem 0 .4rem; line-height: 1.25; }
.tag { opacity: .72; margin: 0; }
.crumb { font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
         opacity: .55; margin: 0 0 .3rem; }
section { margin: 2.6rem 0; }
section h2 { margin: .2rem 0 .8rem; }

/* 절 이름표 */
.lab { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
       opacity: .5; }

/* 연구 묶음 제목 */
.gt { margin: 2rem 0 .8rem; font-size: 1rem; opacity: .6;
      border-bottom: 1px solid currentColor; padding-bottom: .4rem; }
.gt:first-child { margin-top: .6rem; }

/* 카드 · 타일 공통 격자 */
.grid { display: grid; gap: .9rem;
        grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }

.card, .tile { display: block; padding: 1.1rem 1.2rem; text-decoration: none;
               border: 1px solid; border-color: currentColor; border-radius: 6px;
               opacity: .95; transition: transform .12s ease, opacity .12s ease; }
.card:hover, .tile:hover { transform: translateY(-2px); opacity: 1; }
.card b, .tile b { display: block; font-size: 1.05rem; margin: .35rem 0 .3rem; }
.ci, .ti { font-size: 1.4rem; line-height: 1; }
.cl, .cq, .cm, .tile small { display: block; font-size: .88rem; opacity: .72; }
.cq { margin: .55rem 0; padding-left: .7rem; border-left: 2px solid currentColor;
      opacity: .6; }
.cq:empty { display: none; }
.cm { margin-top: .7rem; font-size: .82rem; opacity: .55; }
.card.on { border-width: 2px; }

/* 이전 · 홈 — 두 개뿐입니다 */
.pager { display: flex; gap: .6rem; margin: 1.6rem 0; }
.pager a { flex: 1; text-align: center; padding: .6rem .9rem; font-size: .9rem;
           text-decoration: none; border: 1px solid currentColor; border-radius: 6px;
           opacity: .8; }
.pager a:hover { opacity: 1; }

/* 번호 목록 */
.nl { padding-left: 1.2rem; }
.nl li { margin: .6rem 0; }
.nl b { display: block; }
.nl span { opacity: .78; }

/* 인용 질문 */
blockquote.q { font-size: 1.1rem; }

/* 연구자 */
.who { display: flex; gap: 1rem; align-items: center; }
.ph { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }

footer { margin-top: 3.5rem; padding-top: 1rem; border-top: 1px solid currentColor;
         opacity: .55; text-align: center; }

img, video, table { max-width: 100%; }
@media (max-width: 640px) {
  body { padding: 1rem .9rem 3rem; }
  .who { flex-direction: column; align-items: flex-start; }
}

/* 표지 영상 — 넣은 사람만 보입니다 */
.hero { margin: 0 0 1.4rem; border-radius: 8px; overflow: hidden;
        aspect-ratio: 16 / 9; background: #0000000d; }
/* contain 이라야 자막이 잘리지 않습니다. cover 로 두면 위아래가 깎입니다. */
.hero video { width: 100%; height: 100%; object-fit: contain; display: block; }

/* 자료실 문서 본문 — 표와 코드가 많아 따로 잡아 줍니다 */
.doc h2 { margin: 2.2rem 0 .7rem; padding-bottom: .3rem;
          border-bottom: 1px solid currentColor; }
.doc h3 { margin: 1.6rem 0 .5rem; }
.doc table { border-collapse: collapse; width: 100%; margin: 1rem 0;
             font-size: .92rem; display: block; overflow-x: auto; }
.doc th, .doc td { border: 1px solid currentColor; padding: .45rem .7rem;
                   text-align: left; vertical-align: top; }
.doc th { opacity: .75; font-weight: 600; }
.doc pre { overflow-x: auto; padding: .8rem 1rem; border: 1px solid currentColor;
           border-radius: 6px; font-size: .88rem; line-height: 1.5; }
.doc blockquote { margin: 1rem 0; padding: .1rem 1rem; border-left: 3px solid currentColor;
                  opacity: .85; }
.doc hr { border: none; border-top: 1px solid currentColor; opacity: .3; margin: 2rem 0; }
.doc li { margin: .3rem 0; }

/* 그림 모음 */
.figlist { display: grid; gap: 2rem; margin: 1.5rem 0; }
.figitem { margin: 0; }
.figitem img { width: 100%; height: auto; display: block;
               border: 1px solid currentColor; border-radius: 4px; }
.figitem figcaption { margin-top: .6rem; }
.figitem figcaption b { display: block; margin-bottom: .25rem; }
.figitem figcaption span { display: block; font-size: .9rem; opacity: .72;
                           line-height: 1.6; }
.figdl { margin-top: .5rem !important; font-size: .85rem !important; }
.figdl a { margin-right: .2rem; }
/* ── latex — 학술 논문 ────────────────────────────────────────────────────
   상자를 쓰지 않습니다. 저널 목차처럼 가로줄과 번호로만 나눕니다.
   흑백, 세리프, 좁은 단. 화면이 아니라 인쇄물처럼 보이게 합니다.
   ------------------------------------------------------------------- */

body { max-width: 46rem; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; }

/* 절 이름표 — 작은 대문자 + 가로줄 */
.lab, .crumb {
  display: block; font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; opacity: .45; font-variant: small-caps;
}
section { margin: 3rem 0; }
section h2 { margin: .3rem 0 1rem; padding-bottom: .5rem;
             border-bottom: 1px solid rgba(0,0,0,.18); }

/* 연구 묶음 — 제목만 남기고 선은 뺍니다 */
.gt { border: none; font-size: .78rem; letter-spacing: .16em;
      text-transform: uppercase; opacity: .45; margin: 1.6rem 0 .2rem; }

/* 카드를 없앱니다. 목차 항목처럼 줄로 나열합니다 */
.grid { display: block; }
.card {
  display: grid; grid-template-columns: 2.2rem 1fr; gap: 0 .9rem;
  border: none; border-top: 1px solid rgba(0,0,0,.14); border-radius: 0;
  padding: 1.1rem 0; margin: 0;
}
.card:hover { transform: none; background: rgba(0,0,0,.02); }
.card:last-child { border-bottom: 1px solid rgba(0,0,0,.14); }
.card .ci { grid-row: 1 / span 4; font-size: 1.1rem; opacity: .5; padding-top: .15rem; }
.card b { font-size: 1.12rem; margin: 0 0 .2rem; }
.card .cl { opacity: .8; }
.card .cq { margin: .4rem 0 0; padding: 0; border: none;
            font-style: italic; opacity: .6; }
.card .cm { margin-top: .45rem; opacity: .45; }
.card.on { border-top-width: 1px; }

/* 도구·자료 타일은 작게, 한 줄로 */
.tile { border: none; border-top: 1px solid rgba(0,0,0,.14); border-radius: 0;
        padding: .75rem 0; display: grid;
        grid-template-columns: 1.8rem 1fr auto; align-items: baseline; gap: .7rem; }
.tile:hover { transform: none; background: rgba(0,0,0,.02); }
.tile b { margin: 0; font-size: 1rem; }
.tile small { text-align: right; }

/* 이전 · 홈 — 단추가 아니라 글로 */
.pager { border-top: 1px solid rgba(0,0,0,.14);
         border-bottom: 1px solid rgba(0,0,0,.14); padding: .5rem 0; gap: 1.4rem; }
.pager a { flex: 0 0 auto; border: none; border-radius: 0; padding: 0;
           text-decoration: underline; text-underline-offset: 3px;
           font-size: .88rem; opacity: .65; }
.pager a:last-child { margin-left: auto; }

/* 인용 질문 */
blockquote.q { border-left: none; padding: 0 0 0 1.2rem;
               border-left: 2px solid rgba(0,0,0,.25);
               font-style: italic; opacity: .85; }

.who { gap: 1.2rem; }
.ph { border-radius: 2px; width: 76px; height: 96px; }

footer { border-top: 1px solid rgba(0,0,0,.14); }

/* 주의: 홈 카드는 <a class="card">, 본문 상자는 <div class="card"> 입니다.
   이름이 같으므로 여기서는 div.card 로만 잡습니다. */
/* ── 옮겨 온 본문을 밝은 테마에 맞춘다 ───────────────────────────────────
   원문은 딥네이비 바탕으로 만들어져 있었습니다. 구조(HTML)는 그대로 두고
   보이는 옷만 갈아입힙니다. 색을 직접 박지 않고 currentColor 를 써서
   latex · water · cream 어느 테마에도 얹힙니다.
   ------------------------------------------------------------------- */

.wrap { max-width: none; padding: 0; margin: 0; }

/* 작은 머리말 */
.sec-sub { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
           opacity: .55; margin: 1.6rem 0 .3rem; }

/* 상자들 — 테두리로만 구분합니다 */
div.card, .note, .warn, .ok, .hyp, .sum, .sumcard, .eq {
  border: 1px solid currentColor; border-radius: 6px;
  padding: .85rem 1.05rem; margin: 1rem 0;
}
.note  { border-left-width: 3px; opacity: .92; }
.warn  { border-left-width: 3px; border-style: dashed; }
.ok    { border-left-width: 3px; }
.hyp   { border-left-width: 3px; }
.sum, .sumcard { border-width: 2px; }
.eq    { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
         font-size: .95rem; text-align: center; padding: 1rem; }

div.card > :first-child, .note > :first-child, .warn > :first-child,
.ok > :first-child, .hyp > :first-child, .sum > :first-child,
.sumcard > :first-child { margin-top: 0; }
div.card > :last-child, .note > :last-child, .warn > :last-child,
.ok > :last-child, .hyp > :last-child, .sum > :last-child,
.sumcard > :last-child { margin-bottom: 0; }

/* 두 칸 배치 */
.grid2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }

/* 표 — 숫자가 많아 따로 잡습니다 */
table { border-collapse: collapse; width: 100%; margin: 1rem 0;
        font-size: .92rem; display: block; overflow-x: auto; }
th, td { border: 1px solid currentColor; padding: .42rem .65rem;
         text-align: left; vertical-align: top; }
th { opacity: .75; font-weight: 600; }
td.num, th.num { text-align: right;
                 font-variant-numeric: tabular-nums; white-space: nowrap; }
td.sig { font-weight: 700; }                    /* 유의 */
td.ns  { opacity: .55; }                        /* 유의하지 않음 */
td.mrg { font-style: italic; }                  /* 경계 */
.l { text-align: left; }
.n { text-align: right; font-variant-numeric: tabular-nums; }

/* 그림 */
.fig, .figwide { margin: 1.4rem 0; }
.figwide img, .fig img { width: 100%; height: auto; display: block;
                         border: 1px solid currentColor; border-radius: 4px; }
.fig-t { font-weight: 600; margin: .6rem 0 .2rem; }
.fig-c { font-size: .88rem; opacity: .7; line-height: 1.6; }
.zoom { cursor: zoom-in; }
.legendkey { display: inline-block; font-size: .85rem; opacity: .7;
             margin-right: .9rem; }

/* 딥네이비 시절에 박혀 있던 색을 무력화합니다 */
[style*="background"], [style*="color"] { background-image: none; }
