:root { color-scheme: light; --ink: #202322; --muted: #555d59; --line: #c8ceca; --paper: #f8f8f6; --surface: #ffffff; --soft: #eef1ee; --focus: #245dad; --error: #9c3030; --success: #285d3c; font-synthesis: none; }
:root[data-theme="dark"] { color-scheme: dark; --ink: #ecefeb; --muted: #bbc5be; --line: #545e57; --paper: #181a19; --surface: #222623; --soft: #2c322e; --focus: #9fc2ff; --error: #ffb2b2; --success: #abe0ba; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { color-scheme: dark; --ink: #ecefeb; --muted: #bbc5be; --line: #545e57; --paper: #181a19; --surface: #222623; --soft: #2c322e; --focus: #9fc2ff; --error: #ffb2b2; --success: #abe0ba; } }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.7 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .2em; }
a, button, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select, input { min-height: 44px; }
button { cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.35; font-weight: 650; overflow-wrap: anywhere; }
h1 { font-size: clamp(30px, 4.5vw, 48px); letter-spacing: -.035em; }
h2 { font-size: 24px; }
h3 { font-size: 21px; }
h4 { font-size: 15px; margin-bottom: 8px; }
p { max-width: 75ch; margin: 0 0 16px; }
.site-header, main, footer { width: min(100% - 48px, 1040px); margin-inline: auto; }
.site-header { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.brand { font-size: 22px; font-weight: 650; text-decoration: none; }
.site-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; font-size: 14px; }
.site-header select { padding: 5px 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; }
#theme-message:empty { display: none; }
#theme-message { flex-basis: 100%; color: var(--error); font-size: 14px; margin: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 10px 16px; background: var(--ink); color: var(--paper); z-index: 2; }
.skip-link:focus { top: 16px; }
main { padding: 36px 0 48px; }
footer { border-top: 1px solid var(--line); padding: 24px 0 36px; }
.eyebrow { font-size: 12px; color: var(--muted); letter-spacing: .07em; font-weight: 650; }
.page-intro > p:not(.eyebrow) { font-size: 18px; color: var(--muted); }
.ledger-notice { padding: 20px 24px; border: 1px solid var(--line); background: var(--soft); margin: 26px 0; }
.ledger-notice p { font-size: 14px; margin: 6px 0; }
.ledger-panel { padding: 28px; border: 1px solid var(--line); margin: 28px 0; background: var(--surface); }
.ledger-panel h2 { margin-top: 0; margin-bottom: 20px; }
.ledger-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin-bottom: 20px; }
.ledger-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; font-size: 14px; margin-bottom: 16px; }
.ledger-field input, .ledger-field select, .ledger-field textarea { color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 11px; width: 100%; }
.ledger-field textarea { resize: vertical; line-height: 1.65; }
.ledger-hint, .ledger-field small { font-size: 13px; color: var(--muted); line-height: 1.75; }
.ledger-details { margin: 24px 0; padding: 17px 0; border-top: 1px solid var(--line); }
.ledger-details summary { cursor: pointer; font-weight: 600; margin-bottom: 18px; }
.ledger-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 22px 0; }
.ledger-actions .ledger-field { margin: 0; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--ink); border-radius: 4px; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 600; }
.button:hover { opacity: .85; }
.button.secondary { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.button.secondary:hover { background: var(--soft); opacity: 1; }
.ledger-import { position: relative; overflow: hidden; cursor: pointer; }
.ledger-import input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.ledger-import:focus-within { outline: 3px solid var(--focus); outline-offset: 4px; }
.ledger-message { padding: 15px 20px; border: 1px solid var(--line); background: var(--soft); overflow-wrap: anywhere; }
.ledger-message[data-state="error"] { color: var(--error); }
.ledger-message[data-state="success"] { color: var(--success); }
.ledger-record { border-top: 1px solid var(--line); padding: 24px 0; overflow-wrap: anywhere; }
.ledger-record-meta, .ledger-empty { color: var(--muted); font-size: 14px; }
.ledger-readout { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; font: 14px/1.8 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.ledger-record dt { font-size: 13px; color: var(--muted); }
.ledger-record dd { margin: 5px 0 18px; white-space: pre-wrap; line-height: 1.75; font-size: 14px; }
@media (max-width: 560px) { .site-header, main, footer { width: calc(100% - 32px); } .ledger-panel, .ledger-notice { padding: 20px 16px; } .ledger-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; } .ledger-field input, .ledger-field select, .ledger-field textarea { font-size: 16px; } .site-header nav { gap: 8px 10px; } }
