/* Local assets only. Semantic tokens allow a future theme without changing markup. */
:root {
  color-scheme: light;
  --surface-page: #f4f5f7; --surface: #fff; --surface-subtle: #f8f9fb;
  --text: #202936; --text-muted: #566273; --border: #dce1e7; --border-input: #8490a0;
  --accent: #2459aa; --accent-hover: #194585; --profit: #17633d; --loss: #ad2936;
  --warning: #795300; --warning-surface: #fff7e2; --error-surface: #fff0f1;
  --success-surface: #edf6ef; --focus: #2459aa;
  font: 14px/1.5 system-ui, sans-serif; background: var(--surface-page); color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; }
.shell { max-width: 1560px; margin: auto; padding: 20px 28px; }
header, .heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
header { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
h1 { font-size: 24px; margin: 0; letter-spacing: -.7px; } h1 span { color: var(--text-muted); }
h2 { font-size: 25px; margin: 0 0 6px; letter-spacing: -.5px; }
h3 { font-size: 16px; margin: 0 0 16px; } p { margin: 8px 0 16px; }
small, .hint, footer, .intro p { color: var(--text-muted); }
small { font-size: 12px; } td small { display: block; margin-top: 2px; }
a { color: var(--accent); text-underline-offset: 3px; }
.intro { margin: 24px 0 20px; }
.stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.stats section, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 20px; }
.stats strong { display: block; font-size: clamp(18px,1.8vw,26px); margin: 8px 0; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.profit { color: var(--profit); } .loss { color: var(--loss); } .neutral { color: var(--text); }
.columns { display: grid; grid-template-columns: minmax(0,3fr) minmax(260px,1fr); gap: 20px; }
.panel { min-width: 0; margin-bottom: 20px; }
.grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 16px; }
label { display: block; font-size: 13px; margin-bottom: 14px; font-weight: 500; }
input, select { width: 100%; min-height: 40px; background: var(--surface); color: var(--text); border: 1px solid var(--border-input); border-radius: 5px; padding: 8px 10px; margin-top: 6px; font: inherit; }
input[inputmode] { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button { cursor: pointer; background: var(--accent); color: #fff; border: 1px solid transparent; border-radius: 5px; font: 600 13px/1.4 system-ui,sans-serif; padding: 10px 16px; min-height: 40px; }
button:hover { background: var(--accent-hover); } button:disabled { opacity: .55; cursor: wait; }
.secondary { background: var(--surface); color: var(--text); border-color: var(--border-input); }
.secondary:hover { background: var(--surface-subtle); }
.hint { font-size: 12px; line-height: 1.6; } .overflow { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
td, th { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; vertical-align: top; }
th { background: var(--surface-subtle); color: var(--text-muted); font-weight: 600; white-space: nowrap; }
td:first-child { min-width: 130px; } td { max-width: 320px; overflow-wrap: anywhere; }
.numeric { text-align: right; white-space: nowrap; }
td button { min-height: 32px; padding: 5px 10px; }
.empty { padding: 32px 20px; text-align: center; color: var(--text-muted); }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.error { background: var(--error-surface); color: var(--loss); border-radius: 5px; padding: 12px; }
.field-error { display: block; color: var(--loss); font-size: 12px; margin-top: 4px; }
.success { background: var(--success-surface); color: var(--profit); border-radius: 5px; padding: 12px; }
.login { max-width: 440px; margin: 72px auto; padding: 32px; } .login button { width: 100%; }
.login h2 { margin-top: 12px; } .login p { color: var(--text-muted); }
footer { font-size: 12px; padding: 8px 0 24px; }
.preview { padding: 12px 16px; background: var(--surface-subtle); border: 1px solid var(--border); border-radius: 5px; margin-bottom: 16px; font-variant-numeric: tabular-nums; }
.drafts { border-left: 3px solid var(--warning); } pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.filters { max-width: 420px; margin: 12px 0; }
@media(max-width: 800px) { .shell { padding: 16px; } .columns,.stats { grid-template-columns: 1fr; } .grid { grid-template-columns: 1fr; } .panel { padding: 16px; } .login { margin: 36px auto; padding: 24px; } h2 { font-size: 22px; } }

[x-cloak] { display: none !important; }

.landing { min-height: 100svh; padding: 40px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.landing-logo { display: block; width: min(720px, 100%); height: auto; max-height: 60svh; object-fit: contain; }
.landing p { margin: 24px 0; color: var(--text-muted); font-size: 18px; }
