@font-face { font-family: MongdolSubset; src: url('fonts/Mongdol-subset.woff2') format('woff2'); font-weight: 45 930; font-style: normal; font-display: swap; }
:root {
  color-scheme: light dark;
  --bg: #f4f1e9; --surface: #e8e4d8; --ink: #202d27; --muted: #506157; --accent: #a84728; --accent-ink: #fffaf2; --line: #a4aea1; --focus: #b34929;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px; --space-24: 96px;
  --radius-root: 24px; --radius-floor: 12px; --radius-mark: 4px; --radius-pill: 999px;
  --type-meta: 13px; --type-body: 16px; --type-lead: 20px; --type-section: clamp(32px, 4vw, 56px); --type-display: clamp(92px, 20vw, 288px); --type-glyph: clamp(44px, 6vw, 80px);
  --progress-width: 160px; --border-width: 1px; --focus-width: 2px; --header-height: 88px; --header-height-small: 72px; --brand-size: 24px; --button-height: 48px; --status-height: 36px; --type-sample: clamp(24px, 3vw, 40px); --type-sample-small: 24px;
  --content-width: 1320px; --round: 100; --weight: 650;
}
@media (prefers-color-scheme: dark) { :root { --bg: #17231e; --surface: #26362d; --ink: #f1eee4; --muted: #c0cdc0; --accent: #f2a17e; --accent-ink: #17231e; --line: #748579; --focus: #ffb18f; } }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: MongdolSubset, sans-serif; font-size: var(--type-body); line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; text-decoration-thickness: var(--border-width); text-underline-offset: .2em; }
button, input, textarea { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button, .button, nav a, .brand { user-select: none; }
:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: var(--space-1); }
.wrap { width: min(calc(100% - var(--space-12) * 2), var(--content-width)); margin-inline: auto; }
.header { min-height: var(--header-height); display: flex; align-items: center; gap: var(--space-12); border-bottom: var(--border-width) solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 750; text-decoration: none; white-space: nowrap; }
.brand-mark { display: block; width: var(--brand-size); height: var(--brand-size); background: var(--accent); border-radius: 45% 55% 62% 38%; transform: rotate(-20deg); }
nav { display: flex; align-items: center; gap: var(--space-8); }
nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
nav a:hover { color: var(--ink); }
nav { margin-left: auto; }
.hero { padding-block: var(--space-12) var(--space-24); }
.hero-intro { display: block; }
.hero-intro h1, .hero-intro p { margin: 0; }
.hero-intro h1 { font-size: var(--type-lead); font-weight: 600; }
.hero-stage { padding-block: var(--space-8) var(--space-4); }
.hero-text { display: block; width: 100%; min-width: 0; min-height: 1.2em; padding: 0; border: 0; border-radius: var(--radius-floor); resize: none; overflow: hidden; color: var(--ink); background: transparent; font-family: MongdolFull, MongdolSubset, sans-serif; font-size: var(--type-display); line-height: 1.2; letter-spacing: 0; font-variation-settings: 'wght' var(--weight), 'ROND' var(--round); overflow-wrap: anywhere; }
.font-pending .hero-text { visibility: hidden; }
.font-status { min-height: var(--status-height); padding-top: var(--space-3); color: var(--muted); }
#font-loading:not([hidden]) { display: flex; align-items: center; gap: var(--space-3); }
#font-loading > span:first-child { flex: none; white-space: nowrap; }
#font-percent { flex: none; min-width: 5ch; white-space: nowrap; font-variant-numeric: tabular-nums; }
#font-progress { flex: 1 1 auto; min-width: 0; max-width: var(--progress-width); height: var(--space-3); accent-color: var(--accent); }
.font-status button { color: inherit; border: 0; padding: 0; background: transparent; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.hero-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: end; }
.hero-copy { grid-column: 2; grid-row: 1; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: var(--button-height); padding: var(--space-3) var(--space-6); border-radius: var(--radius-pill); text-decoration: none; font-weight: 650; white-space: nowrap; }
.primary { background: var(--ink); color: var(--bg); }
.secondary { box-shadow: inset 0 0 0 var(--border-width) var(--line); }
.button:hover { background: var(--accent); color: var(--accent-ink); }
.controls { grid-column: 1; grid-row: 1; display: grid; gap: var(--space-8); }
.control { display: grid; gap: var(--space-2); }
.control-label, .range-ends { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); }
.control-label label { font-weight: 700; }
.control-label label span, .range-ends { color: var(--muted); font-size: var(--type-meta); }
output { font-variant-numeric: tabular-nums; font-weight: 700; }
input[type='range'] { width: 100%; margin: 0; accent-color: var(--accent); cursor: pointer; }
.section { padding-block: var(--space-24); }
.section-head { display: grid; gap: var(--space-2); margin-bottom: var(--space-12); }
.section-head > * { margin: 0; }
.section-head h2 { font-size: var(--type-section); line-height: 1.15; letter-spacing: -.04em; }
.section-head > p { color: var(--muted); }
.weight-list { border-top: var(--border-width) solid var(--line); }
.weight-row { display: grid; grid-template-columns: 1fr 3fr; gap: var(--space-6); align-items: baseline; padding-block: var(--space-4); border-bottom: var(--border-width) solid var(--line); }
.weight-row span { color: var(--muted); font-size: var(--type-meta); }
.weight-row p { margin: 0; font-size: var(--type-sample); font-variation-settings: 'wght' var(--sample-weight), 'ROND' 100; }
.glyph-section { background: var(--surface); }
.glyph-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-2); }
.glyph { aspect-ratio: 1; min-width: 0; border: 0; border-radius: var(--radius-pill); background: var(--bg); color: var(--ink); font-size: var(--type-glyph); font-variation-settings: 'wght' 650, 'ROND' 100; cursor: pointer; transition: font-variation-settings .25s; }
.glyph[aria-pressed="true"], .glyph:not([data-toggled]):focus-visible { font-variation-settings: 'wght' 650, 'ROND' 0; }
@media (hover: hover) { .glyph:not([data-toggled]):hover { font-variation-settings: 'wght' 650, 'ROND' 0; } }
.code-panel { background: var(--surface); padding: var(--space-6); border-radius: var(--radius-root); }
.code-head { display: flex; align-items: center; gap: var(--space-4); font-size: var(--type-meta); font-weight: 700; color: var(--muted); }
.code-head > span:first-child, .code-head button { flex: none; white-space: nowrap; }
.code-head button { margin-left: auto; min-width: var(--button-height); min-height: var(--button-height); padding: var(--space-2) var(--space-4); border: 0; border-radius: var(--radius-pill); background: var(--ink); color: var(--bg); font-size: var(--type-body); cursor: pointer; }
.code-head button:hover { background: var(--accent); color: var(--accent-ink); }
#copy-error { flex: 1 1 auto; min-width: 0; color: var(--muted); text-align: right; word-break: keep-all; overflow-wrap: normal; }
pre { margin: var(--space-6) 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--type-body); }
code { font-family: ui-monospace, monospace; }
.downloads { margin-top: var(--space-16); }
h3 { font-size: var(--type-lead); margin: 0 0 var(--space-6); }
.download-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--space-8); padding-block: var(--space-4); border-bottom: var(--border-width) solid var(--line); }
.download-row:first-child { border-top: var(--border-width) solid var(--line); }
.download-row a { white-space: nowrap; }
.footer { display: flex; justify-content: space-between; gap: var(--space-8); padding-block: var(--space-12); border-top: var(--border-width) solid var(--line); }
.footer p { color: var(--muted); margin-block: var(--space-2); }
@media (max-width: 700px) {
  .wrap { width: calc(100% - var(--space-6) * 2); }
  .header { gap: var(--space-6); min-height: var(--header-height-small); }
  nav { gap: var(--space-4); margin-left: auto; }
  .hero { padding-block: var(--space-8) var(--space-16); }
  .hero-bottom { grid-template-columns: 1fr; gap: var(--space-12); }
  .hero-copy, .controls { grid-column: auto; grid-row: auto; }
  .section { padding-block: var(--space-16); }
  .section-head { margin-bottom: var(--space-8); }
  .weight-row { grid-template-columns: 1fr; gap: var(--space-1); }
  .weight-row p { font-size: var(--type-sample-small); }
  .glyph-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .download-row { gap: var(--space-4); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .glyph { transition: none; } }
