/* Copyright (c) 2026 Hwasub Lee. All rights reserved. */

/* Evaluator PC HTML manual. Hierarchy comes from rules and type size, without cards, shadows, gradients or decorative icons.
   Blue marks only links and the current position; orange only the screen marks drawn by lib.mjs and their legend.
   Wide screens put each section's text on the left and its screenshot on the right. */
/* JetBrains Mono comes from its GitHub release through jsDelivr, pinned to the release fetch-fonts.sh uses. */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono@v2.304/fonts/webfonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono@v2.304/fonts/webfonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
:root {
  --bg: #fff;
  --ink: oklch(0.22 0.02 255);
  --ink-2: oklch(0.36 0.02 257);
  --muted: oklch(0.5 0.015 258);
  --rule: oklch(0.915 0.006 255);
  --rule-2: oklch(0.83 0.01 255);
  --surface: oklch(0.975 0.004 255);
  --accent: oklch(0.45 0.15 256);
  --mark: #e8590c;
  --tip: oklch(0.45 0.12 252);
  --warn: oklch(0.5 0.12 60);
  --bar-h: 54px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--bar-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  font-size: 17px; line-height: 1.65; letter-spacing: -0.005em; word-break: keep-all; overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 8px 14px; background: var(--ink); color: #fff; }
.skip:focus { left: 8px; }
b.ui { font-weight: 650; color: var(--ink); }
code { font-family: var(--mono); font-size: 0.86em; padding: 0 4px; border: 1px solid var(--rule-2); border-radius: 4px; background: var(--surface); white-space: nowrap; }
.ico { display: inline-flex; vertical-align: -0.17em; margin-right: 3px; }
.ico svg { width: 1.1em; height: 1.1em; fill: currentColor; }
.ico.device-desktop { color: var(--muted); }
.ico.cloud { color: oklch(0.5 0.12 155); }
.ico.cloud-delay { color: oklch(0.52 0.12 65); }

.topbar {
  position: sticky; top: 0; z-index: 20; min-height: var(--bar-h);
  display: flex; align-items: center; padding: 6px 28px;
  background: var(--bg); border-bottom: 1px solid var(--rule);
}
.topbar a { color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.35; }
.topbar a span { display: inline-block; }

.layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 44px; max-width: 1600px; margin: 0 auto; padding: 0 28px; }
.toc { position: sticky; top: var(--bar-h); align-self: start; max-height: calc(100vh - var(--bar-h)); overflow: auto; padding: 24px 0 40px; font-size: 15px; line-height: 1.45; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc > ol > li { margin-bottom: 2px; }
.toc a { display: block; color: var(--ink-2); text-decoration: none; padding: 3px 0 3px 10px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); }
.toc a.ch { display: flex; gap: 8px; font-weight: 600; color: var(--ink); padding-top: 5px; padding-bottom: 5px; }
.toc a.ch .n { width: 22px; flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; }
.toc ol ol { padding-left: 30px; margin-bottom: 6px; }
.toc ol ol a { color: var(--muted); font-size: 14.5px; }
.toc a.on { color: var(--accent); border-left-color: var(--accent); }
.toc a.ch.on .n { color: var(--accent); }
main { min-width: 0; padding: 32px 0 64px; }

.title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 40px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
h1 { margin: 0 0 6px; font-size: 34px; line-height: 1.25; letter-spacing: -0.025em; font-weight: 750; }
.meta { margin: 0; font-size: 15px; color: var(--muted); }
.orgs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; font-size: 14px; color: var(--muted); }
.org { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.orgs img { width: auto; }
/* Same proportions as the service footer (Institutions.svelte). */
.orgs .logo-opm { height: 32px; }
.orgs .logo-kypi { height: 14px; }
.orgs .logo-kyf { height: 23px; }
.flow-title { margin: 22px 0 10px; font-size: 15px; font-weight: 650; color: var(--muted); }
/* Any number of steps: one row on wide screens; each cell draws its own row line so a short last row stays tidy. */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-top: 1px solid var(--rule); }
.flow li { border-bottom: 1px solid var(--rule); }
.flow li + li { border-left: 1px solid var(--rule); }
.flow a { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; color: var(--ink); text-decoration: none; font-weight: 650; }
.flow li:first-child a { padding-left: 0; }
.flow a:hover { color: var(--accent); }
.flow .n { color: var(--accent); }

.chapter { margin-top: 56px; }
.ch-head { border-top: 2px solid var(--ink); padding-top: 14px; margin-bottom: 4px; display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 8px 40px; align-items: baseline; }
.ch-head h2 { margin: 0; font-size: 28px; line-height: 1.3; letter-spacing: -0.02em; font-weight: 750; display: flex; gap: 12px; }
.ch-head h2 .no { color: var(--accent); }
.ch-head p { margin: 0; color: var(--ink-2); max-width: 72ch; }

.sec { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 40px; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.sec:last-child { border-bottom: 0; }
.sec .copy { align-self: start; position: sticky; top: calc(var(--bar-h) + 20px); }
.sec.text-only { grid-template-columns: minmax(0, 1fr); }
.sec.text-only .copy { position: static; max-width: 920px; }
h3 { margin: 0 0 10px; font-size: 21px; line-height: 1.4; letter-spacing: -0.015em; font-weight: 700; }
h3 .num { color: var(--accent); margin-right: 10px; font-weight: 650; }
.copy p { margin: 10px 0 0; color: var(--ink-2); }
.copy h3 + p { margin-top: 0; }
.bullets { margin: 0; padding-left: 1.2em; color: var(--ink-2); }
.bullets li { margin-bottom: 4px; }
.facts { margin: 14px 0 0; font-size: 16px; border-top: 1px solid var(--rule); }
.facts div { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--ink-2); }
table { border-collapse: collapse; width: 100%; }
.grid { margin-top: 12px; font-size: 16px; }
.grid th, .grid td { text-align: left; vertical-align: top; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--rule); }
.grid thead th { font-size: 14px; color: var(--muted); font-weight: 600; border-bottom-color: var(--rule-2); }
.grid tbody th { white-space: nowrap; font-weight: 650; width: 10em; }
.grid td { color: var(--ink-2); }
.legend { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--rule); font-size: 16px; color: var(--ink-2); display: grid; gap: 6px; }
.copy h3 + .legend { margin-top: 0; padding-top: 0; border-top: 0; }
.legend li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.mk { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 11px; background: var(--mark); color: #fff; font-size: 13px; font-weight: 700; line-height: 1; transform: translateY(-1px); }
.note { margin: 14px 0 0; padding-left: 14px; border-left: 2px solid; font-size: 16px; color: var(--ink-2); }
.note strong { margin-right: 4px; }
.note.tip { border-color: var(--tip); }
.note.tip strong { color: var(--tip); }
.note.warn { border-color: var(--warn); }
.note.warn strong { color: var(--warn); }
figure { margin: 0; min-width: 0; display: grid; gap: 16px; align-content: start; }
.shot { display: block; width: 100%; padding: 0; border: 1px solid var(--rule-2); border-radius: 4px; overflow: hidden; background: #fff; cursor: zoom-in; }
.shot picture { display: block; }
.shot:hover { border-color: var(--muted); }

.trouble, .faq { margin: 0; border-top: 1px solid var(--rule); }
.trouble div, .faq div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 6px 32px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.trouble dt, .faq dt { font-weight: 650; }
.trouble dd, .faq dd { margin: 0; color: var(--ink-2); }
.sec.text-only .copy.wide { max-width: none; }

.foot { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14.5px; color: var(--muted); }
.foot p { margin: 0; text-align: right; }

.lb { border: 0; padding: 0; max-width: 96vw; max-height: 96vh; background: transparent; cursor: zoom-out; }
.lb::backdrop { background: oklch(0.2 0.02 255 / 0.86); }
.lb img { max-width: 96vw; max-height: 90vh; width: auto; border-radius: 4px; }
.lb p { margin: 8px 0 0; text-align: center; color: #fff; font-size: 14px; }

@media (max-width: 1180px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 1000px) {
  .flow { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .flow li:nth-child(4n + 1) { border-left: 0; }
  .flow li:nth-child(4n + 1) a { padding-left: 0; }
}
@media (max-width: 900px) {
  .sec, .ch-head { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sec .copy { position: static; }
  .trouble div, .faq div { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar { padding: 6px 16px; }
  .topbar a { font-size: 14.5px; }
  .layout { padding: 0 16px; }
  main { padding-top: 20px; }
  h1 { font-size: 28px; }
  .ch-head h2 { font-size: 24px; }
  h3 { font-size: 19px; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow li:nth-child(even) { border-left: 1px solid var(--rule); }
  .flow li:nth-child(even) a { padding-left: 14px; }
  .flow li:nth-child(odd) { border-left: 0; }
  .flow li:nth-child(odd) a { padding-left: 0; }
  .grid tbody th { white-space: normal; width: 7em; }
  .facts div { grid-template-columns: 6em minmax(0, 1fr); }
  .foot p { text-align: left; }
}
