/* 원장 · Ledger — a private statement of account.
   Ink on paper. Colour appears only where a figure carries meaning (my block, the 3-year lock, warnings).
   Display: Noto Serif (self-hosted Latin subset) with the reader's own Myeongjo for Hangul; body: system sans;
   figures: Noto Serif tabular, condensed for the large ones. Totals get the accountant's single + double rule. */

@font-face { font-family: "Npt Serif"; src: url(../../fonts/noto-serif-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: u+0020-007e, u+00a0-00ff, u+0131, u+0152-0153, u+02c6, u+02da, u+02dc, u+2000-206f, u+2190-2199, u+2212, u+2215, u+2248, u+2260, u+2264-2265, u+25cf; }
@font-face { font-family: "Npt Serif"; src: url(../../fonts/noto-serif-600.woff2) format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap;
  unicode-range: u+0020-007e, u+00a0-00ff, u+0131, u+0152-0153, u+02c6, u+02da, u+02dc, u+2000-206f, u+2190-2199, u+2212, u+2215, u+2248, u+2260, u+2264-2265, u+25cf; }
@font-face { font-family: "Npt Serif Condensed"; src: url(../../fonts/noto-serif-condensed-600.woff2) format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap;
  unicode-range: u+0020-007e, u+00a0-00ff, u+0131, u+0152-0153, u+02c6, u+02da, u+02dc, u+2000-206f, u+2190-2199, u+2212, u+2215, u+2248, u+2260, u+2264-2265, u+25cf; }

/* ---- tokens: light (default) ---- */
[data-skin="ledger"] {
  /* Hangul headings: a Myeongjo that has a real heavy weight, else the body sans (Batang and AppleMyungjo would be faked bold) */
  --font-display: "Npt Serif", "Noto Serif KR", "Noto Serif CJK KR", "Source Han Serif K", "Source Han Serif KR", "Nanum Myeongjo",
                  "NanumMyeongjo", "나눔명조", var(--font-body);
  --font-figure: "Npt Serif", var(--font-body);
  --font-figure-lg: "Npt Serif Condensed", "Npt Serif", var(--font-body);
  --fs-3xl: clamp(2rem, 1.45rem + 2vw, 2.75rem); --fs-hero: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); --fs-xl: 1.5rem;
  --fs-figure: 2.125rem; --fs-figure-lg: 3.25rem;
  --fw-display: 600; --fw-figure: 600; --track-display: -.01em; --track-figure: 0;
  --wrap: 1120px; --section-gap: 72px; --panel-pad: 0; --cell-y: 13px; --cell-x: 14px; --figure-pad: 18px 22px;
  --r-1: 2px; --r-2: 2px; --r-3: 3px; --r-btn: 2px; --r-chip: 2px; --r-notice: 0; --r-field: 2px;
  --panel-bg: transparent; --panel-border: 0; --table-border: 0; --table-bg: transparent;
  --mast-h: 76px; --mast-border: 1px solid var(--text);
  --chart-bar-r: 0; --chart-stroke: 1.75px; --band-opacity: .13; --area-opacity: 0; --grid-dash: 2 4; --tip-shadow: none; --step-dot: 30px;

  --bg: #fcfcfa; --bg-2: #f3f3ef; --surface: #ffffff; --surface-2: #f5f5f1;
  --line: #e2e1db; --line-strong: #85847d;
  --text: #141414; --text-2: #5a5953;
  --link: #1f3a8a; --accent: #141414; --accent-hover: #3a3a37; --on-accent: #fcfcfa; --accent-soft: #ecebe5; --accent-line: #141414;
  --focus: #2f5fd0;
  --ok: #19744a; --mine: #19744a; --on-mine: #ffffff; --on-ok: #ffffff; --locked: #5b3c9e; --warn: #8f5800; --danger: #b3261e; --info: #1f4f8f;
  --ok-soft: #e8f2ec; --warn-soft: #f8f0df; --danger-soft: #f9e7e4; --info-soft: #eaf0f8;
  --chip-bg: transparent; --chip-border: #d6d5ce; --th-bg: transparent; --row-hover: #f7f7f3; --field-bg: #ffffff;
  --mast-bg: #fcfcfa; --mast-text: #141414; --mast-text-2: #4d4c47; --mast-accent: #141414; --mast-line: #d6d5ce; --mast-hover: #f0efea; --mark: #141414;
  --status-bg: #fcfcfa; --code-bg: #f3f3ef; --code-text: #1c1c1a;
  --c-s1: #1f3a8a; --c-s2: #8f8e86; --c-s3: #c2410c; --c-mine: #19744a; --c-pool: #44607f; --c-other: #8f8e86; --c-grid: #e4e3dd;
}

/* ---- tokens: dark, chosen with the theme button (keep identical to the block below) ---- */
[data-theme="dark"] [data-skin="ledger"] {
  --bg: #141413; --bg-2: #1b1b19; --surface: #191917; --surface-2: #20201e;
  --line: #2e2e2b; --line-strong: #7a7972;
  --text: #ecebe6; --text-2: #a8a69e;
  --link: #a9b8ff; --accent: #ecebe6; --accent-hover: #ffffff; --on-accent: #141413; --accent-soft: #2a2a27; --accent-line: #ecebe6;
  --focus: #7d9bff;
  --ok: #5cc98d; --mine: #5cc98d; --on-mine: #0f1a13; --on-ok: #0f1a13; --locked: #b79cf2; --warn: #e5a640; --danger: #ff8a7a; --info: #8fb4ec;
  --ok-soft: #17271e; --warn-soft: #2b2210; --danger-soft: #321a17; --info-soft: #172234;
  --chip-bg: transparent; --chip-border: #3a3a36; --th-bg: transparent; --row-hover: #1c1c1a; --field-bg: #191917;
  --mast-bg: #141413; --mast-text: #ecebe6; --mast-text-2: #b3b1a9; --mast-accent: #ecebe6; --mast-line: #3a3a36; --mast-hover: #22221f; --mark: #ecebe6;
  --status-bg: #141413; --code-bg: #1b1b19; --code-text: #e2e0d9;
  --c-s1: #a9b8ff; --c-s2: #8d8b83; --c-s3: #f08a4b; --c-mine: #5cc98d; --c-pool: #7f9cc0; --c-other: #6f6e68; --c-grid: #2a2a27;
}
/* ---- tokens: dark, following the system setting (keep identical to the block above) ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-skin="ledger"] {
    --bg: #141413; --bg-2: #1b1b19; --surface: #191917; --surface-2: #20201e;
    --line: #2e2e2b; --line-strong: #7a7972;
    --text: #ecebe6; --text-2: #a8a69e;
    --link: #a9b8ff; --accent: #ecebe6; --accent-hover: #ffffff; --on-accent: #141413; --accent-soft: #2a2a27; --accent-line: #ecebe6;
    --focus: #7d9bff;
    --ok: #5cc98d; --mine: #5cc98d; --on-mine: #0f1a13; --on-ok: #0f1a13; --locked: #b79cf2; --warn: #e5a640; --danger: #ff8a7a; --info: #8fb4ec;
    --ok-soft: #17271e; --warn-soft: #2b2210; --danger-soft: #321a17; --info-soft: #172234;
    --chip-bg: transparent; --chip-border: #3a3a36; --th-bg: transparent; --row-hover: #1c1c1a; --field-bg: #191917;
    --mast-bg: #141413; --mast-text: #ecebe6; --mast-text-2: #b3b1a9; --mast-accent: #ecebe6; --mast-line: #3a3a36; --mast-hover: #22221f; --mark: #ecebe6;
    --status-bg: #141413; --code-bg: #1b1b19; --code-text: #e2e0d9;
    --c-s1: #a9b8ff; --c-s2: #8d8b83; --c-s3: #f08a4b; --c-mine: #5cc98d; --c-pool: #7f9cc0; --c-other: #6f6e68; --c-grid: #2a2a27;
  }
}

/* ---- layout: statement masthead, ruled sections, figure strip ---- */
@media (min-width: 641px) { [data-skin="ledger"] { --gutter: 28px; } }
[data-skin="ledger"] h1, [data-skin="ledger"] h2, [data-skin="ledger"] h3, [data-skin="ledger"] .brand { font-synthesis: none; }
[data-skin="ledger"] .brand { font-size: 1.3rem; gap: 10px; }
[data-skin="ledger"] .brand-mark { width: 26px; height: 26px; }
[data-skin="ledger"] .nav-list a { font-size: .9375rem; padding-inline: 11px; }
[data-skin="ledger"] .nav-list a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--mast-accent); }
[data-skin="ledger"] .statusline { border-bottom-color: var(--line); }
[data-skin="ledger"] .statusline-in { justify-content: flex-end; font-variant-numeric: tabular-nums; }
[data-skin="ledger"] .statusline .chip { border: 0; padding-inline: 0; background: transparent; }
[data-skin="ledger"] .page { padding-top: 56px; }
[data-skin="ledger"] .kicker { font-family: var(--font-figure); font-size: .8125rem; font-weight: 600; letter-spacing: .04em; color: var(--text-2); }
[data-skin="ledger"] .lead { font-size: 1.1875rem; line-height: 1.7; }
[data-skin="ledger"] .section > .section-head, [data-skin="ledger"] .panel > .section-head { border-top: 1px solid var(--text); padding-top: 14px; }
[data-skin="ledger"] .section-head h2 { font-size: 1.5rem; }
[data-skin="ledger"] .panel { gap: 20px; }
[data-skin="ledger"] .figures { --figure-gap: 0; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
[data-skin="ledger"] .figure { box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); border-radius: 0; }
[data-skin="ledger"] .figure-label { font-size: .8125rem; }
[data-skin="ledger"] .section-head + .figures { margin-top: -4px; }
[data-skin="ledger"] thead th { border-bottom: 1px solid var(--text); }
[data-skin="ledger"] td.num, [data-skin="ledger"] .num { font-family: var(--font-figure); }
[data-skin="ledger"] .chip { font-weight: 600; }
[data-skin="ledger"] .notice { border-left-width: 2px; }
[data-skin="ledger"] .tools .btn, [data-skin="ledger"] .tools button { border-color: transparent; font-weight: 600; text-decoration: underline;
  text-decoration-color: var(--mast-line); text-underline-offset: .3em; }
@media (min-width: 1321px) and (pointer: fine) { [data-skin="ledger"] .tools .btn, [data-skin="ledger"] .tools button { min-height: 34px; } }
[data-skin="ledger"] .tools .btn:hover, [data-skin="ledger"] .tools button:hover { text-decoration-color: currentColor; }
[data-skin="ledger"] .steps > li::before { font-family: var(--font-figure); }
[data-skin="ledger"] .flow { gap: 0; border-top: 1px solid var(--line); }
[data-skin="ledger"] .flow > li { padding: 18px 24px 4px 0; }
[data-skin="ledger"] .flow > li + li { padding-left: 24px; box-shadow: -1px 0 0 var(--line); }
[data-skin="ledger"] .flow > li::before { font-family: var(--font-figure-lg); font-size: 2rem; color: var(--text); }
@media (max-width: 760px) { [data-skin="ledger"] .flow > li + li { padding-left: 0; box-shadow: 0 -1px 0 var(--line); } }
[data-skin="ledger"] .chart-tip { border-color: var(--text); }

/* home: headline on the left, the block-reward statement as a sheet on the right */
[data-skin="ledger"] .hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: end; }
[data-skin="ledger"] .hero h1 { font-size: var(--fs-hero); line-height: 1.12; letter-spacing: -.02em; }
[data-skin="ledger"] .hero-copy { display: flex; flex-direction: column; gap: 18px; }
[data-skin="ledger"] .hero-copy .actions { margin-top: 10px; }
[data-skin="ledger"] .sheet { background: var(--surface); border: 1px solid var(--line); padding: 22px 26px 20px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -30px rgba(20, 20, 20, .35); }
[data-skin="ledger"] .sheet-title { font-size: 1rem; font-family: var(--font-body); font-weight: 650; letter-spacing: 0; color: var(--text-2); }
[data-skin="ledger"] .sheet .statement dd { font-size: 1.125rem; }
[data-skin="ledger"] .sheet .statement .is-total dd { font-size: 1.375rem; }
[data-skin="ledger"] .sheet-note { font-size: .8125rem; color: var(--text-2); }
@media (max-width: 900px) { [data-skin="ledger"] .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
