/* Ledger: IBHQ's design system. One file for the server pages and the app.
   Contrast checked (WCAG AA): ink 15.6:1, muted 5.3:1 on bg, white on action 5.0:1,
   status pairs 5.8–6.6:1. --brand-orange is 3.2:1 with white: accents and large type only. */
@font-face {
  font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/instrument-sans-latin.woff2) format('woff2');
}
/* JetBrains Mono for amounts and times: same files as /static/fonts.css (latin and latin-ext only),
   declared here so this stylesheet does not depend on fonts.css. */
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwgknk-6nFg.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwgknk-4.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwgknk-6nFg.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/static/fonts/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwgknk-4.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #F5F6F8; --surface: #FFFFFF; --line: #E1E5EB; --ink: #0F1E2E; --muted: #5C6877;
  --brand: #10263F; --action: #B8501C; --action-hover: #9E4417; --brand-orange: #E0703C;
  --overdue-fg: #A3341F; --overdue-bg: #FBE9E7;
  --paid-fg: #22663F; --paid-bg: #E5F3EC;
  --waiting-fg: #8A4B0E; --waiting-bg: #FFF3E3;
  --unconfirmed-fg: #4A5565; --unconfirmed-bg: #EEF0F4; --unconfirmed-line: #A7B0BD;
  --focus: #1F5F8B;
  --font: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --t-12: 12px; --t-13: 13px; --t-15: 15px; --t-17: 17px; --t-20: 20px; --t-26: 26px;
  --r: 8px; --tap: 44px;
}
.lg-page { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-15)/1.5 var(--font); -webkit-font-smoothing: antialiased; }
.lg-page *, .lg-page *::before, .lg-page *::after { box-sizing: border-box; }
/* Plain links are brand coloured; a link styled as a button keeps its button colour. */
.lg-page a:not(.lg-btn) { color: var(--brand); }
.lg-page :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.lg-h1 { font: 600 var(--t-26)/1.15 var(--font); letter-spacing: -0.01em; margin: 0 0 8px; text-wrap: balance; }
.lg-muted { color: var(--muted); }
/* Visually hidden, still read by screen readers. */
.lg-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.lg-mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* sign-in and setup */
.lg-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.lg-auth__brand { background: var(--brand); color: #fff; padding: 40px; display: flex; flex-direction: column; gap: 16px; justify-content: space-between; }
.lg-auth__mark { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.lg-auth__mark img { width: 40px; height: 40px; border-radius: 8px; background: #fff; padding: 3px; }
.lg-auth__brand p { color: #C9D3DF; max-width: 34ch; margin: 0; }
.lg-auth__brand strong { font-size: var(--t-20); font-weight: 600; color: #fff; display: block; margin-bottom: 6px; }
.lg-auth__form { display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.lg-auth__card { width: 100%; max-width: 380px; }
@media (max-width: 767px) {
  .lg-auth { grid-template-columns: 1fr; min-height: auto; }
  .lg-auth__brand { padding: 20px 16px; }
  .lg-auth__brand p { display: none; }
  .lg-auth__form { padding: 28px 16px 40px; align-items: flex-start; }
}

/* fields, buttons, banners */
.lg-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.lg-field label { font-weight: 500; font-size: var(--t-13); }
.lg-field input { font: 400 16px/1.4 var(--font); min-height: var(--tap); padding: 10px 12px; border: 1px solid #C3CAD3; border-radius: var(--r); background: var(--surface); color: var(--ink); }
.lg-field input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.lg-field .lg-help { font-size: var(--t-13); color: var(--muted); }
.lg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 18px; border: 0; border-radius: var(--r); background: var(--action); color: #fff; font: 600 var(--t-15) var(--font); text-decoration: none; cursor: pointer; }
.lg-btn:hover:not(:disabled) { background: var(--action-hover); }
.lg-btn--block { width: 100%; }
.lg-btn--secondary { background: var(--surface); color: var(--brand); border: 1px solid var(--brand); }
.lg-btn--secondary:hover:not(:disabled) { background: var(--bg); }
.lg-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* A locked button also changes its wording, so the state is never shown by tone alone. */
.lg-btn:disabled { opacity: .65; cursor: progress; }
.lg-linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer; }
.lg-banner { border-radius: var(--r); padding: 10px 12px; margin-bottom: 16px; font-size: var(--t-13); }
.lg-banner--error { background: var(--overdue-bg); color: var(--overdue-fg); }
.lg-banner--ok { background: var(--paid-bg); color: var(--paid-fg); }

/* single-message pages (refusals, errors) */
.lg-center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.lg-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px; max-width: 460px; width: 100%; }
@media (prefers-reduced-motion: reduce) { .lg-page * { transition: none !important; animation: none !important; } }
