/* The look of the consent page and the Expense UI. The only copy of the colours and the base shapes.
   The gateway embeds this file and the UI serves it. Page-specific rules live beside each page.
   The value scale (step 48, tmp/value-scale-reference.md): navigation and normal use carry no hue and move in value from the paper
   to a dark umber; hue is kept for judgement and urgency, each as a text-and-border colour with a soft fill. */
:root {
  --bg: #f4f1ea; --card: #fffdf8; --ink: #1d2320; --muted: #5d665f; --line: #d9d3c4;
  --chosen: #e9e2d3; --umber: #5a4636; --umber-dark: #3a2a1e; --umber-ink: #fffdf8;
  --wait: #1f5d50; --wait-soft: #e3efe9; --caution: #7a5a00; --caution-soft: #f6e3a1; --urgent: #9c2a1c; --urgent-soft: #f8dcd5;
  --scrim: rgba(58, 42, 30, 0.3);
  --float-line: transparent;
  --shadow-menu: 0 0 0 0.5px rgba(58, 42, 30, 0.18), 0 4px 10px rgba(58, 42, 30, 0.10), 0 14px 34px rgba(58, 42, 30, 0.18);
  --shadow-under: 0 1px 0 rgba(58, 42, 30, 0.10), 0 6px 12px rgba(58, 42, 30, 0.14);
  --shadow-dialog: 0 0 0 0.5px rgba(58, 42, 30, 0.20), 0 6px 14px rgba(58, 42, 30, 0.10), 0 24px 70px 2px rgba(58, 42, 30, 0.34);
}
/* Step 62: a page may ask for a theme with data-theme="light" or "dark" on its root element; only the Expense UI's signed-in page does.
   A page with no attribute gets exactly what it got before: the system's setting. The dark values are written twice, once under the
   media query and once for a page that asks for dark, because a media query cannot share a selector with an attribute. Change both. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151a18; --card: #1d2421; --ink: #e8ece8; --muted: #9aa59d; --line: #33403b;
    --chosen: #2b322e; --umber: #cfc2ab; --umber-dark: #e9e2d3; --umber-ink: #1d2421;
    --wait: #5fb89f; --wait-soft: #23342e; --caution: #e0c068; --caution-soft: #3a3216; --urgent: #e58a7c; --urgent-soft: #3d211d;
    --scrim: rgba(0, 0, 0, 0.5);
    --float-line: var(--line);
    --shadow-menu: 0 0 0 0.5px rgba(255, 255, 255, 0.12), 0 4px 10px rgba(0, 0, 0, 0.35), 0 14px 34px rgba(0, 0, 0, 0.5);
    --shadow-under: 0 1px 0 rgba(0, 0, 0, 0.35), 0 6px 12px rgba(0, 0, 0, 0.5);
    --shadow-dialog: 0 0 0 0.5px rgba(255, 255, 255, 0.14), 0 6px 14px rgba(0, 0, 0, 0.4), 0 24px 70px 2px rgba(0, 0, 0, 0.65);
  }
}
:root[data-theme="dark"] {
  --bg: #151a18; --card: #1d2421; --ink: #e8ece8; --muted: #9aa59d; --line: #33403b;
  --chosen: #2b322e; --umber: #cfc2ab; --umber-dark: #e9e2d3; --umber-ink: #1d2421;
  --wait: #5fb89f; --wait-soft: #23342e; --caution: #e0c068; --caution-soft: #3a3216; --urgent: #e58a7c; --urgent-soft: #3d211d;
  --scrim: rgba(0, 0, 0, 0.5);
  --float-line: var(--line);
  --shadow-menu: 0 0 0 0.5px rgba(255, 255, 255, 0.12), 0 4px 10px rgba(0, 0, 0, 0.35), 0 14px 34px rgba(0, 0, 0, 0.5);
  --shadow-under: 0 1px 0 rgba(0, 0, 0, 0.35), 0 6px 12px rgba(0, 0, 0, 0.5);
  --shadow-dialog: 0 0 0 0.5px rgba(255, 255, 255, 0.14), 0 6px 14px rgba(0, 0, 0, 0.4), 0 24px 70px 2px rgba(0, 0, 0, 0.65);
}
* { box-sizing: border-box; }
html { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex; align-items: center; justify-content: center; padding: 24px 16px;
}
main {
  width: 100%; max-width: 520px; background: var(--card); border: 1px solid var(--line);
  border-radius: 0; padding: 40px;
}
/* From 600px wide the card stays in one place through the whole sign-in, as on the Auth0 screens (step 41): its top 80px
   below the top of the page, at least as tall as the window less 160px, content from its top and spare room at the bottom.
   The title is 121px below the top of the page on every screen. */
@media (min-width: 600px) {
  body { align-items: flex-start; padding-top: 80px; padding-bottom: 80px; }
  main { min-height: calc(100vh - 160px); }
}
/* Below 600px wide the page takes the layout Auth0's screens have there (step 42): no ground, the card colour fills the
   window, and the card is a square-cornered column at most 400px wide, centred across, from the top of the window and at
   least as tall as it (dvh follows a phone browser's toolbar; vh is the fallback). Content from its top, spare room at the
   bottom. The title is 41px below the top of the window and 41px in from the card's left edge on every screen. */
@media (max-width: 599.98px) {
  body { background: var(--card); padding: 0; align-items: flex-start; min-height: 100vh; min-height: 100dvh; }
  main { max-width: 400px; border-radius: 0; min-height: 100vh; min-height: 100dvh; }
}
/* The title: the word EXPENSE as typed, first in every card. A screen's own heading is the h2 under it. */
h1 { font-size: 24px; line-height: 36px; font-weight: 400; color: var(--ink); letter-spacing: normal; margin: 0 0 16px; }
h2 { font-size: 20px; line-height: 28px; font-weight: 650; margin: 0 0 12px; }
.lead { font-size: 14px; line-height: 21px; color: var(--ink); margin: 0 0 24px; }
p { margin: 0 0 16px; }
.muted { color: var(--muted); font-size: 14px; }
.who { border-left: 3px solid var(--umber-dark); padding: 2px 0 2px 14px; margin: 0 0 24px; }
.who strong { font-weight: 650; }
.who code { font-size: 13px; color: var(--muted); word-break: break-all; }
button {
  font: inherit; font-weight: 400; border-radius: 10px; padding: 12px 18px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
}
button.allow { background: var(--umber-dark); color: var(--umber-ink); border-color: var(--umber-dark); }
button:focus-visible { outline: 2px solid var(--umber-dark); outline-offset: 2px; }
