@font-face {
  font-family: "Freesentation";
  src: url("../fonts/Freesentation-4Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Freesentation";
  src: url("../fonts/Freesentation-5Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Freesentation";
  src: url("../fonts/Freesentation-6SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Freesentation";
  src: url("../fonts/Freesentation-7Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Shared layout and brand foundations. */
:root {
  --bg: #fff;
  --side: #fafafc;
  --ink: #202127;
  --muted: #626570;
  --quiet: #90939d;
  --line: #e9eaf0;
  --accent: #282F66;
  --soft: #EAEFF6;
  --font: "Freesentation", "Pretendard", "Apple SD Gothic Neo", sans-serif;
  --header-height: 64px;
  --sidebar-width: 260px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 24px); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex="0"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
b, strong { font-weight: 600; }
[hidden] { display: none !important; }
::selection { background: var(--soft); color: var(--accent); }

.top {
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brandmark { display: block; width: 132px; height: auto; max-height: 35px; object-fit: contain; }
.brand-divider { height: 17px; width: 1px; background: var(--line); }
.brand-guide { font-size: 14px; font-weight: 500; color: var(--accent); letter-spacing: .01em; }
.topright { display: flex; gap: 24px; align-items: center; font-size: 13px; color: var(--muted); }
.topright a:hover { color: var(--accent); }
.menu-btn { display: none; border: 0; background: none; color: var(--ink); padding: 8px; }
.shell {
  margin-left: var(--sidebar-width);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 208px;
  min-height: calc(100vh - var(--header-height));
}
.sidebar {
  position: fixed;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  z-index: 4;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: 28px 18px 40px 24px;
  scrollbar-width: thin;
}
.search {
  min-height: 40px;
  border: 1px solid #dfe1e8;
  background: var(--bg);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border-radius: 7px;
  color: var(--quiet);
  margin: 0 0 28px;
}
.search:focus-within { border-color: var(--accent); outline: 2px solid var(--soft); }
.search svg { flex-shrink: 0; }
.search input { border: 0; width: 100%; min-width: 0; background: transparent; font-size: 14px; color: var(--ink); }
.search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.nav-group { margin-bottom: 30px; }
.nav-title {
  font-size: 12px;
  line-height: 1.5;
  color: var(--quiet);
  font-weight: 400;
  padding: 0 12px;
  margin: 0 0 10px;
  cursor: default;
}
.navlink {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 12px;
  margin: 2px 0;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.7;
  color: #464955;
}
.navlink:hover { background: #f0f1f5; color: #303343; }
.navlink.active, .navlink.active:hover { background: var(--soft); color: var(--accent); font-weight: 600; }
.search-empty { padding: 0 12px; color: var(--muted); font-size: 13px; }
.main { padding: 36px clamp(28px, 4vw, 72px) 72px; min-width: 0; }
.article { max-width: 740px; margin: 0 auto; }
.breadcrumbs { color: #797d88; font-size: 12px; line-height: 1.6; margin-bottom: 18px; }
.breadcrumbs span { margin: 0 9px; }

/* Document primitives: shared by current and future HTML fragments. */
#page-content { overflow-wrap: anywhere; }
#page-content h1, #page-content h2, #page-content h3 {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -.02em;
  scroll-margin-top: 0; /* html scroll-padding clears the sticky header. */
}
#page-content h1 { font-size: 36px; line-height: 1.35; margin: 0 0 24px; }
#page-content h2 { font-size: 25px; line-height: 1.5; margin: 40px 0 16px; }
#page-content h3 { font-size: 20px; line-height: 1.55; margin: 28px 0 12px; }
#page-content h2 + h3 { margin-top: 20px; }
#page-content p { margin: 0 0 20px; color: #464955; }
#page-content .lead { font-size: 18px; line-height: 1.85; max-width: 650px; margin-bottom: 32px; }
#page-content .content-origin { font-size: 13px; line-height: 1.6; color: #797d88; margin: -10px 0 28px; }
#page-content section { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
#page-content section > h2:first-child { margin-top: 0; }
#page-content section:last-of-type { border-bottom: 0; margin-bottom: 0; }
#page-content > :last-child { margin-bottom: 0; }
#page-content ul, #page-content ol { padding-left: 1.5em; margin: 20px 0 24px; color: #464955; }
#page-content li { padding-left: 4px; margin: 8px 0; }
#page-content li > ul, #page-content li > ol { margin: 8px 0; }
#page-content li > p { margin-bottom: 8px; }
#page-content li::marker { color: var(--muted); }
#page-content a, .textlink {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: #bfc1d1;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
#page-content a:hover, .textlink:hover { text-decoration-color: var(--accent); }
#page-content blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid #bfc1d1;
  color: var(--muted);
}
#page-content blockquote > :last-child { margin-bottom: 0; }
#page-content img { display: block; max-width: 100%; height: auto; margin: 24px 0; border-radius: 4px; }
#page-content figure { max-width: 100%; margin: 28px 0; }
#page-content figure img { margin: 0; }
#page-content figcaption, #page-content .image-caption { font-size: 14px; line-height: 1.7; color: var(--muted); margin: 10px 0 24px; }
#page-content table {
  display: block;
  max-width: 100%;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 16px;
  line-height: 1.75;
  text-align: left;
}
#page-content th, #page-content td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
#page-content th { background: #f7f8fb; color: #535765; font-weight: 500; border-top: 1px solid var(--line); }
#page-content .mini-table { display: table; table-layout: fixed; }
#page-content .mini-table td:first-child, #page-content .mini-table th:first-child { width: 30%; }
#page-content .mini-table td:first-child { font-weight: 600; word-break: keep-all; }
#page-content table caption { font-size: 14px; text-align: left; color: var(--muted); padding-bottom: 10px; }
.info-table { border-top: 1px solid var(--line); margin: 24px 0; }
.info-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); padding: 15px 2px; border-bottom: 1px solid var(--line); gap: 20px; }
.info-row dt { color: var(--muted); font-size: 15px; }
.info-row dd { margin: 0; color: #3d404b; font-size: 16px; }
#page-content .plain-list { list-style: none; padding: 0; margin: 24px 0; }
#page-content .plain-list li { display: grid; grid-template-columns: 29px minmax(0, 1fr); gap: 12px; margin: 0; padding: 18px 0; border-bottom: 1px solid var(--line); }
#page-content .plain-list li:first-child { border-top: 1px solid var(--line); }
.num { font-size: 12px; color: var(--quiet); padding-top: 4px; }
.itemtitle { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.itemdesc { font-size: 16px; color: var(--muted); }
.note, .callout {
  margin: 24px 0;
  padding: 16px 20px;
  border: 1px solid #e2e5ef;
  border-left: 3px solid #7e82a4;
  border-radius: 0 6px 6px 0;
  background: #f7f8fc;
  color: #535765;
  font-size: 16px;
  line-height: 1.8;
}
.note strong, .callout > strong { display: block; color: var(--accent); margin-bottom: 6px; }
#page-content .note > :last-child, #page-content .callout > :last-child { margin-bottom: 0; }
.note--warning, .callout--warning { background: #fcfaf5; border-color: #ebe3d2; border-left-color: #9b783f; }
.note--warning strong, .callout--warning > strong { color: #795d2e; }
.pending-note, .note--pending, .callout--pending { background: #f8f8fa; border-color: #e5e5ec; border-left-color: #a0a2b5; }
#page-content code, #page-content pre, kbd, .kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; letter-spacing: 0; }
#page-content code { background: #f1f2f7; border-radius: 4px; padding: 2px 5px; color: var(--accent); }
#page-content pre { overflow-x: auto; max-width: 100%; margin: 24px 0; padding: 18px 20px; background: #f6f7fa; border: 1px solid var(--line); border-radius: 6px; line-height: 1.7; }
#page-content pre code { padding: 0; background: none; border-radius: 0; color: #3d404b; font-size: inherit; overflow-wrap: normal; }
kbd, .kbd { display: inline-block; padding: 1px 6px; border: 1px solid #dfe1e8; border-bottom-width: 2px; border-radius: 4px; background: #fafafc; color: #535765; }

/* Quiet navigation around the document. */
.bottom-nav { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); margin-top: 36px; padding-top: 20px; font-size: 15px; }
.bottom-nav a { max-width: 48%; min-height: 48px; padding: 4px 0; overflow-wrap: anywhere; text-decoration: none; }
.bottom-nav a:hover { text-decoration: underline; }
.bottom-nav .next-page { margin-left: auto; text-align: right; }
.bottom-nav small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.footer { font-size: 12px; color: var(--quiet); margin-top: 44px; }
.toc { padding: 40px 24px 28px 0; min-width: 0; }
.toc-sticky { position: sticky; top: 104px; max-height: calc(100vh - 132px); overflow-y: auto; scrollbar-width: thin; }
.toc-heading { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.toc a { display: block; font-size: 13px; color: #6d7180; padding: 8px 10px 8px 14px; border-left: 1px solid var(--line); line-height: 1.65; overflow-wrap: anywhere; }
.toc a.toc-subheading { padding-left: 26px; font-size: 12px; color: #7d818c; }
.toc a:hover { background: #f7f8fb; color: var(--accent); }
.toc a.selected { color: var(--accent); border-left: 2px solid var(--accent); padding-left: 13px; font-weight: 500; }
.toc a.toc-subheading.selected { padding-left: 25px; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 20; background: #fff; color: var(--accent); padding: 8px 16px; border: 1px solid var(--accent); }
.skip-link:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#page-content h1:focus, .main:focus { outline: none; }

@media (max-width: 1100px) {
  :root { --sidebar-width: 244px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .main { padding-inline: clamp(28px, 5vw, 56px); }
  .sidebar { padding-left: 18px; }
}
@media (max-width: 720px) {
  :root { --header-height: 58px; }
  .top { padding: 0 16px; }
  .topright { display: none; }
  .brand { gap: 10px; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 44px; margin-left: -6px; }
  .shell { display: block; margin-left: 0; }
  .sidebar { display: none; z-index: 10; width: 280px; max-width: calc(100vw - 24px); box-shadow: 8px 0 30px #00000010; padding: 24px 18px 40px; }
  .sidebar.open { display: block; }
  .navlink { min-height: 44px; }
  .main { padding: 28px 22px 52px; }
  .breadcrumbs { margin-bottom: 16px; }
  #page-content h1 { font-size: 30px; margin-bottom: 22px; }
  #page-content h2 { font-size: 23px; margin-top: 32px; }
  #page-content h3 { font-size: 19px; margin-top: 24px; }
  #page-content .lead { font-size: 18px; }
  .info-row { grid-template-columns: 100px minmax(0, 1fr); gap: 14px; }
  #page-content th, #page-content td { padding: 12px 10px; }
  #page-content .mini-table td:first-child, #page-content .mini-table th:first-child { width: 36%; }
  .note, .callout { padding: 14px 16px; }
  .bottom-nav { gap: 16px; font-size: 14px; }
}
@media (max-width: 360px) {
  .top { padding-inline: 12px; }
  .brand { gap: 8px; }
  .brandmark { width: 112px; }
  .brand-guide { font-size: 13px; }
  .main { padding-inline: 18px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
