/* EGKB interface. System fonts only: teachers open this on mobile data in the evening, so nothing is downloaded
   that is not needed. One strong element, the claim's path; everything else stays quiet. */
:root {
  --ink: #15233b; --muted: #55637a; --paper: #fff; --mist: #eef2f6; --line: #d3dae3;
  --teal: #0b5d57; --teal-dark: #084742; --teal-tint: #e3f1ef;
  --amber: #7a4a00; --amber-tint: #fff3d9; --red: #a1241c; --red-tint: #fdecea; --green: #17613f; --green-tint: #e4f3ea;
  --step: 0.5rem; --radius: 6px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--mist); color: var(--ink); line-height: 1.5;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Noto Sans", Roboto, sans-serif; }
a { color: var(--teal); text-underline-offset: 0.15em; }
a:hover { color: var(--teal-dark); }
:focus-visible { outline: 3px solid #f2a900; outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 650; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.125rem; } h3 { font-size: 1rem; }
p { margin: 0; max-width: 68ch; }
.muted { color: var(--muted); } .small { font-size: 0.875rem; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.top { background: var(--ink); color: #fff; }
.top-in { max-width: 72rem; margin: 0 auto; padding: 0.625rem 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; }
.brand { font-weight: 650; color: #fff; text-decoration: none; margin-right: auto; }
.top a { color: #dfe7f1; } .top a:hover { color: #fff; }
.top .who { font-size: 0.875rem; color: #c3cedd; }
.top form { display: inline; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: #dfe7f1; text-decoration: underline; cursor: pointer; }
.tabs { background: var(--paper); border-bottom: 1px solid var(--line); }
.tabs ul { max-width: 72rem; margin: 0 auto; padding: 0 0.5rem; list-style: none; display: flex; overflow-x: auto; }
.tabs a { display: block; padding: 0.75rem 0.75rem; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--teal); font-weight: 600; }

main { max-width: 72rem; margin: 0 auto; padding: 1.25rem 1rem 4rem; }
main.narrow { max-width: 36rem; }
.sheet { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.sheet + .sheet, .sheet + h2, .stack > * + * { margin-top: 1rem; }
.sheet > h2 { margin-bottom: 0.75rem; }
.row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; }
.row .push { margin-left: auto; }

.flash { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid; }
.flash.ok { background: var(--green-tint); border-color: #b4dcc5; color: var(--green); }
.flash.err { background: var(--red-tint); border-color: #f1bdb8; color: var(--red); }
.notice { padding: 0.75rem 1rem; border-left: 4px solid var(--amber); background: var(--amber-tint); color: #4d3000; border-radius: 0 var(--radius) var(--radius) 0; }
.notice.bad { border-color: var(--red); background: var(--red-tint); color: #6e1812; }

/* The month's money: the one large thing on the teacher's screen. */
.sum { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.monthnav { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.monthnav h1 { margin-right: auto; }
.monthnav a, .monthnav span { padding: 0.375rem 0.625rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); text-decoration: none; font-size: 0.875rem; }
.monthnav span { color: #9aa5b5; }

/* The claim's path. A real sequence, so it is drawn as one: a line the claim travels along. */
.rail { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); }
.rail li { position: relative; padding-top: 1.5rem; font-size: 0.8125rem; text-align: center; color: var(--muted); line-height: 1.25; padding-inline: 0.125rem; }
.rail li::before { content: ""; position: absolute; top: 0.3125rem; left: calc(50% - 0.4375rem); width: 0.875rem; height: 0.875rem; border-radius: 50%; background: var(--paper); border: 2px solid #aab4c3; z-index: 1; }
.rail li::after { content: ""; position: absolute; top: 0.6875rem; left: -50%; width: 100%; height: 2px; background: #c5cdd9; }
.rail li:first-child::after { display: none; }
.rail .done { color: var(--ink); } .rail .done::before { background: var(--teal); border-color: var(--teal); } .rail .done::after { background: var(--teal); }
.rail .now { color: var(--ink); font-weight: 650; } .rail .now::before { border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-tint); } .rail .now::after { background: var(--teal); }
.rail .failed { color: var(--red); font-weight: 650; } .rail .failed::before { background: var(--red); border-color: var(--red); } .rail .failed::after { background: var(--teal); }
@media (max-width: 30rem) {
  .rail { grid-template-columns: 1fr; gap: 0; }
  .rail li { text-align: left; padding: 0 0 0.875rem 1.75rem; font-size: 0.9375rem; }
  .rail li::before { top: 0.25rem; left: 0; }
  .rail li::after { top: -0.875rem; left: 0.375rem; width: 2px; height: 1.25rem; }
}

.pill { display: inline-block; padding: 0.0625rem 0.5rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; border: 1px solid; white-space: nowrap; }
.pill.wait { background: var(--amber-tint); color: var(--amber); border-color: #ecd193; }
.pill.good { background: var(--green-tint); color: var(--green); border-color: #b4dcc5; }
.pill.bad { background: var(--red-tint); color: var(--red); border-color: #f1bdb8; }
.pill.plain { background: var(--mist); color: var(--muted); border-color: var(--line); }

label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.25rem; }
input, select, textarea { font: inherit; color: inherit; width: 100%; padding: 0.625rem 0.75rem; border: 1px solid #98a4b5; border-radius: var(--radius); background: var(--paper); min-height: 2.75rem; }
input[type="checkbox"] { width: 1.25rem; min-height: 1.25rem; height: 1.25rem; vertical-align: -0.2em; margin-right: 0.375rem; accent-color: var(--teal); }
input[type="file"] { padding: 0.375rem; }
textarea { min-height: 4.5rem; resize: vertical; }
.fields { display: grid; gap: 0.875rem; grid-template-columns: 1fr 1fr; }
.fields .wide { grid-column: 1 / -1; }
details summary { cursor: pointer; color: var(--teal); padding: 0.25rem 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0.5rem 1.125rem; border-radius: var(--radius); border: 1px solid var(--teal); background: var(--teal); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--teal-dark); color: #fff; }
.btn.quiet { background: var(--paper); color: var(--teal); }
.btn.quiet:hover { background: var(--teal-tint); color: var(--teal-dark); }
.btn.danger { background: var(--paper); color: var(--red); border-color: #d9a39e; }
.btn.small { min-height: 2.25rem; padding: 0.25rem 0.75rem; font-size: 0.875rem; }
.btn.full { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-start; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 0.75rem 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: center; }
.list > li:first-child { border-top: 0; padding-top: 0; }
.list .grow { flex: 1 1 12rem; min-width: 0; }
.flaglist { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.flaglist li { padding: 0.5rem 0 0.5rem 0.875rem; border-left: 3px solid var(--amber); margin-top: 0.5rem; }
.flaglist li.block { border-color: var(--red); } .flaglist li.info { border-color: #9aa5b5; } .flaglist li.cleared { border-color: var(--green); }
.flaglist form { margin-top: 0.5rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.flaglist form input { flex: 1 1 14rem; width: auto; }

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.8125rem; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 0.625rem 0.75rem 0.625rem 0; border-bottom: 1px solid #e6ebf1; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th.r, td.r { text-align: right; }
th, td { padding-left: 0.75rem; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
tfoot td { font-weight: 650; border-top: 2px solid var(--line); }
.bar { height: 0.5rem; background: var(--mist); border-radius: 999px; overflow: hidden; min-width: 5rem; }
.bar i { display: block; height: 100%; background: var(--teal); }
.bar.over i { background: var(--red); }
.cols { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); align-items: start; }
.cols > .sheet { margin-top: 0; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; margin: 0; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; }
.big { font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.devbar { background: #5b3a00; color: #fff; text-align: center; font-size: 0.8125rem; padding: 0.25rem 1rem; }
.brand .module { font-weight: 400; opacity: 0.75; margin-left: 0.35rem; font-size: 0.875em; }
.foot { color: var(--muted); font-size: 0.8125rem; text-align: center; padding: 2rem 1rem 1.5rem; }
@media (max-width: 40rem) {
  .fields { grid-template-columns: 1fr 1fr; }
  .sheet { padding: 1rem; border-left: 0; border-right: 0; border-radius: 0; margin-inline: -1rem; }
  .sum { font-size: 2.125rem; }
}
@media (prefers-reduced-motion: no-preference) { .btn, .tabs a { transition: background-color 0.12s, color 0.12s; } }

/* Inbox count, search results, forms in a grid */
.count { display: inline-block; min-width: 1.25rem; padding: 0 0.375rem; border-radius: 0.625rem; background: #f2a900; color: #2b1d00; font-size: 0.75rem; font-weight: 700; text-align: center; line-height: 1.25rem; }
.chips { margin-top: 0.375rem; font-size: 0.875rem; line-height: 1.9; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.75rem 1rem; }

/* Printable forms: a sheet of paper on screen, and only the sheet on paper. */
body.printable { background: #dfe5ec; }
.printbar { max-width: 50rem; margin: 1rem auto 0; padding: 0 1rem; display: flex; align-items: center; justify-content: space-between; }
.paper { max-width: 50rem; margin: 1rem auto 3rem; background: #fff; padding: 2.5rem; border: 1px solid var(--line); color: #000; }
.paper-head { border-bottom: 2px solid #000; padding-bottom: 0.75rem; margin-bottom: 1.25rem; }
.paper h2 { margin: 1.5rem 0 0.5rem; font-size: 1rem; }
.paper table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.paper th, .paper td { padding: 0.3rem 0.5rem; border-bottom: 1px solid #c9c9c9; text-align: left; vertical-align: top; }
.paper th.r, .paper td.r { text-align: right; }
.paper thead th { border-bottom: 1px solid #000; font-weight: 650; }
.paper tfoot td { border-top: 1px solid #000; border-bottom: 0; font-weight: 700; }
.paper table.tight { width: auto; min-width: 60%; }
.paper tr.group th { padding-top: 0.9rem; border-bottom: 1px solid #000; }
.paper tr.sub td { font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.25rem 2rem; margin: 0; font-size: 0.9375rem; }
.facts div { display: flex; gap: 0.75rem; border-bottom: 1px solid #e3e3e3; padding: 0.25rem 0; }
.facts dt { flex: 0 0 9.5rem; color: #444; } .facts dd { margin: 0; }
.paper-foot { margin-top: 2rem; padding-top: 0.75rem; border-top: 1px solid #000; font-size: 0.8125rem; color: #333; }
.paper-foot p { max-width: none; }
@media (max-width: 40rem) { .paper { padding: 1.25rem; } .facts { grid-template-columns: 1fr; } }
@media print {
  @page { size: A4; margin: 15mm; }
  body.printable { background: #fff; }
  .printbar { display: none; }
  .devbar { background: #fff !important; color: #000 !important; border-bottom: 1px solid #000; }
  .paper { border: 0; margin: 0; padding: 0; max-width: none; }
  .paper tr { break-inside: avoid; }
  .paper h2 { break-after: avoid; }
}
.facts + table { margin-top: 1.25rem; }
.warn{color:#9a3412;font-weight:600}
