/*
 * The EarlyOffice document pages — 통합약관 /terms/, 개인정보 처리방침 /privacy/ · /en/privacy/, 업데이트 내용 /updates/,
 * 오픈소스 라이선스 /licenses/, 404 (2026-11-02). Their frame is site/office/pages.py doc_page(); their words are not
 * touched by this sheet or that frame.
 *
 * The look is earlyadopter.io's (earlyadopter_homepage site/assets/site/ea.css): family colours only (static/family.css,
 * a copy of the family file generated from early-family tokens/family.json), ink buttons, hairlines, coral and orange
 * only as the brand's own marks. Unlike the always-dark EarlyOffice page, these pages are for reading and follow the
 * system's light or dark setting.
 *
 * Faces (사용자 "그렇게 해줘봐", 11/2): MaruBuri for what is read — titles, section headings and the running text of the
 * terms, the privacy policy and the release notes; Pretendard for what is pressed or scanned — buttons, menus, header,
 * footer, contents list, tables, numbers, dates, captions, small labels. The licence page keeps only its titles in
 * MaruBuri. Both faces are subsets served from this site (site/office/fonts.py, SIL OFL 1.1); when they cannot be
 * fetched the text falls back to Pretendard, then the system's own face, and stays readable. Running text in MaruBuri
 * is 17px with loose leading (small serif text looks thin on Windows).
 */
@font-face { font-family: "MaruBuri"; src: url("fonts/maruburi-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "MaruBuri"; src: url("fonts/maruburi-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Pretendard"; src: url("fonts/pretendard-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Pretendard"; src: url("fonts/pretendard-700.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }

/* ── tokens ── */
:root {
  color-scheme: light dark;
  --paper: var(--ea-light-canvas); --surface: var(--ea-light-surface); --ink: var(--ea-light-ink); --muted: var(--ea-light-muted);
  --line: var(--ea-light-line); --selected: var(--ea-light-selected); --primary: var(--ea-light-primary); --on-primary: var(--ea-light-onPrimary);
  --primary-hover: var(--ea-light-hover); --focus: var(--ea-coralDeep);
  --veil: rgb(247 248 250 / .82); --hair: rgb(32 34 40 / .07);
  --sans: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --serif: "MaruBuri", "Pretendard", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", serif;
  --wrap: 72rem; --gutter: clamp(16px, 4vw, 32px); --r: 12px; --head-h: 60px;
  --read: 42rem;   /* the reading column: about 40 Hangul syllables a line at 17px */
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: var(--ea-dark-canvas); --surface: var(--ea-dark-surface); --ink: var(--ea-dark-ink); --muted: var(--ea-dark-muted);
    --line: var(--ea-dark-line); --selected: var(--ea-dark-selected); --primary: var(--ea-dark-primary); --on-primary: var(--ea-dark-onPrimary);
    --primary-hover: var(--ea-dark-hover); --focus: var(--ea-orange);
    --veil: rgb(17 18 22 / .82); --hair: rgb(240 241 245 / .07);
  }
}

/* ── base ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.6; letter-spacing: -.005em;
  word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
h1, h2, h3 { font-weight: 400; text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: rgb(255 149 80 / .32); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.nb { white-space: nowrap; }
.sub-en { display: block; margin-top: 4px; font-family: var(--sans); font-size: 14px; color: var(--muted); }
.skip { position: absolute; left: var(--gutter); top: -60px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip:focus-visible { top: 10px; }

/* ── buttons: ink, never coral ── */
.btn, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border-radius: 10px; font-family: var(--sans); font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; text-decoration: none;
  background: var(--primary); color: var(--on-primary); border: 1px solid transparent;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover, .button:hover { background: var(--primary-hover); }
.btn.sm { min-height: 40px; padding: 0 15px; font-size: 14px; border-radius: 9px; }
.button.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.button.ghost:hover { border-color: var(--muted); background: var(--surface); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── header ── */
.top {
  position: sticky; top: 0; z-index: 30; background: var(--veil); border-bottom: 1px solid var(--hair);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
}
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: var(--head-h); }
.top .brand { display: flex; align-items: center; min-height: 44px; }
.top .brand img { height: 18px; width: auto; }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.top .right a.link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; font-size: 14px; color: var(--muted); text-decoration: none; border-radius: 8px; }
.top .right a.link:hover { color: var(--ink); }
.top .right .btn { margin-left: 8px; }
@media (max-width: 30rem) { .top .right a.intro { display: none; } }

/* ── page title ── */
.page-hero { padding-block: clamp(48px, 7vw, 96px) clamp(24px, 3vw, 40px); }
.eyebrow { font-family: var(--sans); font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.page-hero h1, .display {
  font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.12; letter-spacing: -.035em;
  max-width: 20ch; margin-top: 14px;
}
.lede { font-family: var(--serif); font-size: clamp(17px, 1.4vw, 19px); line-height: 1.8; color: var(--muted); max-width: var(--read); margin-top: 18px; text-wrap: pretty; }
.page-hero .actions { margin-top: 32px; }
.page-hero .callout { max-width: var(--read); }
.section { padding-bottom: clamp(72px, 9vw, 120px); }
.page-hero + .section { padding-top: clamp(8px, 2vw, 24px); }

/* ── the document: a reading column, the contents list beside it on wide screens ── */
.doc-layout { display: grid; gap: 28px 64px; align-items: start; }
@media (min-width: 64rem) {
  .doc-layout { grid-template-columns: 15rem minmax(0, 1fr); }
  .toc { position: sticky; top: calc(var(--head-h) + 24px); max-height: calc(100vh - var(--head-h) - 48px); overflow-y: auto; overscroll-behavior: contain; }
}
.toc { font-family: var(--sans); font-size: 14px; line-height: 1.4; }
.toc-h { font-weight: 700; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.toc ol { display: grid; gap: 0; }
.toc ol ol { margin: 0 0 6px 12px; padding-left: 10px; border-left: 1px solid var(--line); }
.toc a { display: flex; align-items: center; min-height: 32px; padding-block: 4px; color: var(--muted); text-decoration: none; }
.toc ol ol a { min-height: 28px; font-size: 13.5px; }
.toc a:hover { color: var(--ink); }
@media (max-width: 63.99rem) {
  .toc { padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
  .toc a { min-height: 40px; }
  .toc ol ol { display: none; }   /* the chapters only on a phone; the articles are a scroll away */
}

.doc, .wrap.doc { min-width: 0; }
.doc > *, .wrap.doc > * { max-width: var(--read); }
.doc > .table-scroll, .wrap.doc > .table-scroll { max-width: 60rem; }
.doc h2 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.3; letter-spacing: -.03em;
  margin: 64px 0 18px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--head-h) + 16px);
}
.doc > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc h3 {
  font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.45; letter-spacing: -.02em;
  margin: 36px 0 10px; scroll-margin-top: calc(var(--head-h) + 16px);
}
.doc h2 + h3 { margin-top: 20px; }
.doc p, .doc li { font-family: var(--serif); font-size: 17px; line-height: 1.85; }
.doc p + p { margin-top: 14px; }
.doc ul, .doc ol { padding-left: 1.25em; display: grid; gap: 8px; margin: 12px 0; }
.doc li::marker { color: var(--muted); }
.doc strong { font-weight: 700; }
.doc a { text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: .22em; }
.doc a:hover { text-decoration-color: currentColor; }
.doc li > a:only-child { display: inline-block; padding-block: 8px; margin-block: -8px; }
.doc code { font-size: .92em; overflow-wrap: anywhere; }

/* 핵심 요약 · 개정 안내: a quiet box above the text */
.callout {
  margin: 20px 0 28px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  font-family: var(--serif); font-size: 16.5px; line-height: 1.8; scroll-margin-top: calc(var(--head-h) + 16px);
}
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.doc .callout p, .doc .callout li { font-size: 16.5px; }
.page-hero .callout { font-size: 16px; }

/* tables: Pretendard, hairlines, a row header column */
.table-scroll { overflow-x: auto; margin: 16px 0 28px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.table-scroll table { border-collapse: collapse; width: 100%; min-width: 34rem; font-family: var(--sans); font-size: 14.5px; line-height: 1.55; font-variant-numeric: tabular-nums; }
.table-scroll th, .table-scroll td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: break-word; }   /* break-word, not anywhere: a name is not cut mid-word to squeeze a column (the table scrolls instead) */
.table-scroll thead th { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--selected); white-space: nowrap; }
.table-scroll th[scope="row"] { width: 9.5rem; font-weight: 700; white-space: normal; }
.table-scroll tr:last-child td, .table-scroll tr:last-child th[scope="row"] { border-bottom: 0; }
.table-scroll td > a:only-child { display: inline-block; padding: 10px 6px; margin: -10px -6px; white-space: nowrap; }
.table-scroll strong { font-weight: 700; }

/* ── 오픈소스 라이선스: titles in MaruBuri, the lists and texts in Pretendard ── */
.doc-licenses .doc p, .doc-licenses .doc li { font-family: var(--sans); font-size: 16px; line-height: 1.7; }
.doc details.license { border-top: 1px solid var(--line); }
.doc details.license:last-child { border-bottom: 1px solid var(--line); }
.doc details.license summary { cursor: pointer; font-family: var(--sans); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; min-height: 44px; padding-block: 11px; }
.doc details.license summary:hover { color: var(--muted); }
.doc pre.license {
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12.5px; line-height: 1.55; color: var(--muted);
  margin: 0 0 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
}

/* ── 업데이트 내용 (tools/news.py): one row per release, newest first — the build and date at the left, the words at the right ── */
.u-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.u-kind {
  display: inline-flex; align-items: center; margin: 0; font-family: var(--sans); font-size: 12.5px; font-weight: 700; line-height: 1;
  border-radius: 999px; padding: 6px 10px; letter-spacing: 0;
}
.u-kind-new { background: var(--primary); color: var(--on-primary); }
.u-kind-better { background: var(--selected); color: var(--ink); }
.u-kind-fix { border: 1px solid var(--line); color: var(--ink); padding: 5px 9px; }
.u-list { display: grid; border-bottom: 1px solid var(--line); max-width: 60rem; }
.u-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 40px; padding: 28px 0 32px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--head-h) + 16px); }
.u-card:target { box-shadow: inset 3px 0 0 var(--ink); padding-left: 16px; }
.u-head { display: contents; }
.u-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-family: var(--sans); font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.u-build { font-weight: 700; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.u-build:hover { text-decoration: underline; text-underline-offset: .22em; }
.u-target { font-size: 12px; font-weight: 700; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--muted); }
.u-meta time { margin-left: auto; }
.u-summary { font-family: var(--serif); font-weight: 400; font-size: clamp(20px, 2vw, 24px); line-height: 1.45; letter-spacing: -.025em; max-width: var(--read); }
.u-group { margin-top: 18px; max-width: var(--read); }
.u-group ul { margin: 10px 0 0; padding-left: 1.2em; display: grid; gap: 6px; }
.u-group li { font-family: var(--serif); font-size: 17px; line-height: 1.8; }
.u-group li::marker { color: var(--muted); }
.u-only { font-family: var(--sans); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
@media (min-width: 48rem) {
  .u-card { grid-template-columns: 9.5rem minmax(0, 1fr); }
  .u-meta { grid-column: 1; grid-row: 1 / span 9; align-self: start; align-content: flex-start; gap: 6px; margin: 2px 0 0; }
  .u-meta time { margin-left: 0; order: -1; flex-basis: 100%; color: var(--ink); }
  .u-meta .u-build { min-height: 0; font-weight: 400; color: var(--muted); }
  .u-summary, .u-group { grid-column: 2; }
}
.u-older { max-width: 60rem; margin-top: 8px; }
.u-older > summary {
  cursor: pointer; display: flex; align-items: center; min-height: 52px; font-family: var(--sans); font-weight: 700; font-size: 15px;
  border-bottom: 1px solid var(--line);
}
.u-older > summary:hover { color: var(--muted); }
.u-older[open] > summary { margin-bottom: 8px; }
.u-older .u-list { border-bottom: 0; }

/* ── 404 ── */
.doc-404 .page-hero { padding-block: clamp(72px, 12vw, 160px); }

/* ── footer ── */
.site-footer { padding-block: 56px 40px; border-top: 1px solid var(--line); font-family: var(--sans); }
.foot { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 48px; align-items: start; }
.foot-brand a { display: inline-flex; min-height: 40px; align-items: center; }
.foot-brand img { height: 16px; width: auto; }
.foot-brand p { margin-top: 10px; color: var(--muted); font-size: 14px; max-width: 40ch; }
.foot-links ul { display: flex; flex-wrap: wrap; gap: 0 24px; justify-content: flex-end; }
.foot-links li { display: flex; align-items: center; min-height: 40px; font-size: 14.5px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 40px; text-decoration: none; }
.foot-links a:hover, .foot-links a[aria-current="page"] { text-decoration: underline; text-underline-offset: .22em; }
.foot-links .mail { color: var(--muted); gap: 6px; }
.foot-links .mail a { color: var(--ink); }
.legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
@media (max-width: 48rem) {
  .foot { grid-template-columns: minmax(0, 1fr); }
  .foot-links ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .foot-links .mail { grid-column: 1 / -1; }
}
