/* SAP API: one stylesheet for every page.
   The look comes from engraved money paper: an ink-navy masthead with a guilloche, serif headings and figures,
   brass only for "you are here", white sheets with hairlines. Green, red, amber and blue only ever mean a state. */

@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&display=swap");

@view-transition { navigation: auto; }

:root {
  color-scheme: light;
  --mast: #071a33; --mast-2: #0d2748; --mast-ink: #ffffff; --mast-dim: #a9bdd8; --mast-line: rgba(169, 189, 216, .24); --brass: #d9b566;
  --top: var(--mast); --top-ink: #fff; --top-dim: #a9bdd8; --top-line: var(--mast-line);
  --shell: #0b2342; --shell-ink: #ffffff; --shell-dim: #b6c6dd;
  --signal: #1455c0;
  --bg: #f1f4f8; --card: #ffffff; --tint: #eef2f7; --ink: #0b1d36; --muted: #55657d;
  --line: #dde4ed; --line-2: #bfcad9; --rule: #dde4ed;
  --brand: #1455c0; --brand-ink: #ffffff; --brand-hover: #0f449c;
  --link: #1455c0;
  --ok: #0a7a55;   --ok-bg: #e7f5ef;  --ok-ink: #075c40;
  --warn: #a85f00; --warn-bg: #fdf3e1; --warn-line: #e0a33d; --warn-ink: #7c4700;
  --err: #cf2240;  --err-bg: #fdecef; --err-ink: #9c1530;
  --open: #1d4fa8; --open-bg: #e9f0fc; --info: #1d4fa8; --info-bg: #e9f0fc;
  --sel: #f2f6fd; --changed: #fdf3e1; --drop: #fbfcfe; --bar: #dde4ed; --xl-head: #f1f4f8; --xl-grid: #dde4ed;
  --shadow: 0 1px 2px rgba(7, 26, 51, .06);
  --lift: 0 1px 2px rgba(7, 26, 51, .05), 0 12px 32px -12px rgba(7, 26, 51, .18);
  --r: 4px; --r-lg: 6px; --shell-h: 64px;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --serif: "Source Serif 4", "Sitka Heading", Cambria, "Times New Roman", serif;
  --mono: var(--sans);
  --code: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --out: cubic-bezier(.23, 1, .32, 1); --inout: cubic-bezier(.77, 0, .175, 1);
  --i-ok: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%230a7a55'/%3E%3Cpath d='M4.6 8.3 7 10.7 11.5 5.6' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); --i-no: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23cf2240'/%3E%3Cpath d='M5.4 5.4l5.2 5.2M10.6 5.4l-5.2 5.2' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); --i-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23b86a04'/%3E%3Cpath d='M8 4.2v4.6M8 11.6v.1' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); --i-wait: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%232b62c9'/%3E%3Cpath d='M8 4.4V8l2.5 1.6' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); --i-none: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%238392a8'/%3E%3Cpath d='M5 8h6' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --mast: #050f1e; --mast-2: #0a1c34;
    --shell: #16304f; --shell-ink: #f1f5f9; --shell-dim: #94a9c6;
    --signal: #8ab4ff; --link: #8ab4ff;
    --bg: #0a1626; --card: #101f33; --tint: #182a42; --ink: #e6edf7; --muted: #9db0c9;
    --line: #1e334f; --line-2: #35506f; --rule: #1e334f;
    --brand: #3b7de8; --brand-ink: #ffffff; --brand-hover: #5a94f2;
    --ok: #3ecf98; --ok-bg: #0b2f25; --ok-ink: #7fe3bd;
    --warn: #f0b456; --warn-bg: #30230c; --warn-line: #9a6a16; --warn-ink: #f6cd88;
    --err: #ff7d92; --err-bg: #3a1420; --err-ink: #ffaab8;
    --open: #9fc0ff; --open-bg: #16294a; --info: #9fc0ff; --info-bg: #16294a;
    --sel: #15273f; --changed: #30230c; --drop: #101f33; --bar: #1e334f; --xl-head: #182a42; --xl-grid: #1e334f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4); --lift: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -16px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
       font: 14px/21px var(--sans); font-variant-numeric: tabular-nums lining-nums; -webkit-font-smoothing: antialiased; }
::selection { background: #f0dfb4; color: #071a33; }
input, textarea { caret-color: var(--signal); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
a { color: var(--link); }
code, .code, pre { font-family: var(--code); }
h1, h2, h3 { letter-spacing: -.01em; }
h2 { font: 600 20px/26px var(--serif); margin: 0 0 14px; }
* { scrollbar-color: var(--line-2) transparent; }

/* ---------- masthead ---------- */
.shell { background: var(--mast); color: var(--top-ink); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--mast-line);
         view-transition-name: shell; }
.shell-in { display: flex; align-items: stretch; gap: 40px; padding: 0 32px; min-height: var(--shell-h); max-width: 1560px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; font: 600 19px/1 var(--serif); letter-spacing: -.01em; white-space: nowrap;
         color: #fff; text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.shell nav { display: flex; align-items: stretch; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; }
.shell nav::-webkit-scrollbar { display: none; }
.shell nav a { position: relative; display: flex; align-items: center; color: var(--top-dim); text-decoration: none; white-space: nowrap;
               font-weight: 500; padding: 0 16px; transition: color .15s ease; }
.shell nav a::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 3px;
                      background: transparent; transform: scaleX(0); transform-origin: left; transition: transform .22s var(--out), background-color .15s ease; }
.shell nav a[aria-current] { color: #fff; font-weight: 600; }
.shell nav a[aria-current]::after { background: var(--brass); transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .shell nav a:hover { color: #fff; } .shell nav a:hover::after { background: var(--brass); transform: scaleX(1); } }
.shell :focus-visible, .mast :focus-visible { outline-color: var(--brass); }
.shell nav a:focus-visible { outline-offset: -4px; }
/* who is signed in, and the way out (only when sign-in is on) */
.shell .who { display: flex; align-items: center; gap: 12px; margin: 0; padding-left: 16px; border-left: 1px solid var(--mast-line); align-self: center;
              font-size: 12.5px; color: var(--top-ink); white-space: nowrap; }
.shell .who button { font: 600 12.5px/18px var(--sans); padding: 5px 11px; background: transparent; color: var(--top-dim);
                     border: 1px solid var(--mast-line); border-radius: var(--r); }
.shell .who button:hover:not(:disabled) { background: rgba(255, 255, 255, .08); color: #fff; border-color: var(--top-dim); }
@media (max-width: 760px) { .shell .who span { display: none; } .shell .who { padding-left: 10px; } }
.conn, header .conn { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--top-dim); white-space: nowrap; max-width: 34vw; min-width: 0; }
.conn span { overflow: hidden; text-overflow: ellipsis; }
.conn svg { width: 14px; height: 14px; flex: none; color: var(--brass); }

/* the engraved band under the bar: a page's name, and whatever belongs to it */
.mast, .pagehead { position: relative; background: var(--mast); color: #fff; isolation: isolate; }
html { overflow-x: clip; }
.mast::before, .pagehead::before { content: ""; position: absolute; z-index: -1; left: -100vw; width: 300vw; top: 0; bottom: 0; background: var(--mast); }
.mast::after, .pagehead::after { content: ""; position: absolute; inset: 0 -40px 0 auto; width: 900px; max-width: 100%; pointer-events: none;
  background: url("/static/guilloche.svg") right center / auto 330px no-repeat; opacity: .42; }
.mast > *, .pagehead > * { position: relative; z-index: 1; }
.mast h1, .pagehead h1 { font: 500 38px/44px var(--serif); letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.mast p, .pagehead p { margin: 6px 0 0; color: var(--mast-dim); font-size: 15px; line-height: 22px; max-width: 62ch; }
.pagehead { max-width: 1560px; margin: 0 auto; padding: 36px 32px 84px; }
.pagehead + main { margin-top: -48px; position: relative; }
/* what a page does, shown until there is something to work on */
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 48px; list-style: none; counter-reset: n; margin: 40px 0 0; padding: 0 28px; }
.how li { counter-increment: n; border-top: 1px solid var(--line-2); padding-top: 16px; color: var(--muted); max-width: 44ch; }
.how li b { display: block; font: 600 18px/24px var(--serif); color: var(--ink); margin-bottom: 4px; }
.how li b::before { content: counter(n); color: var(--signal); margin-right: 12px; }
#itemsCard:not([hidden]) ~ .how { display: none; }
@media (max-width: 760px) { .how { grid-template-columns: 1fr; gap: 20px; padding: 0 4px; } }
#poTitle { font: 500 28px/34px var(--serif); letter-spacing: -.02em; }

main, .layout { max-width: 1560px; margin: 0 auto 64px; padding: 0 32px; }
main.narrow { max-width: 1320px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 28px; margin-bottom: 18px;
        box-shadow: var(--shadow); scroll-margin-top: 130px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.sub { font-size: 12px; line-height: 16px; color: var(--muted); }
.neg { color: var(--err); }
label { font-weight: 600; }

/* ---------- controls ---------- */
input[type=text], input[type=number], input[type=search], input[type=email], input[type=date], select, textarea {
  font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line-2);
  border-radius: var(--r); padding: 9px 12px; min-height: 42px; transition: border-color .15s ease, box-shadow .15s ease; }
input[type=text]:hover, input[type=search]:hover, select:hover { border-color: var(--muted); }
input[type=text]:focus, input[type=number]:focus, input[type=search]:focus, input[type=email]:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 22%, transparent); }
input[type=number] { text-align: right; }
input::placeholder { color: var(--muted); opacity: .85; }
input[type=checkbox], input[type=radio] { accent-color: var(--shell); width: 16px; height: 16px; vertical-align: -3px; }
@media (prefers-color-scheme: dark) { input[type=checkbox], input[type=radio] { accent-color: var(--signal); } }

button, .btn { font: 600 14px/20px var(--sans); border: 1px solid var(--brand); background: var(--brand);
  color: var(--brand-ink); border-radius: var(--r); padding: 8px 16px; min-height: 40px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .14s var(--out); }
button:active:not(:disabled), .btn:active { transform: scale(.975); }
button:hover:not(:disabled), .btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
button.ghost, .btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line-2); }
button.ghost:hover:not(:disabled), .btn.ghost:hover { background: var(--tint); border-color: var(--line-2); }
button.small { padding: 4px 10px; min-height: 30px; font-size: 12px; line-height: 16px; letter-spacing: .02em; }
button.danger { background: var(--err); border-color: var(--err); color: #fff; }
button:disabled { opacity: .45; cursor: not-allowed; }

/* filter chips: pills, the chosen one filled navy */
.chips { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.chips button { background: var(--tint); color: var(--ink); border: 1px solid transparent; border-radius: 999px;
  font-weight: 500; font-size: 13px; letter-spacing: 0; padding: 6px 14px; min-height: 34px; }
.chips button:hover:not(:disabled) { background: var(--line); color: var(--ink); border-color: transparent; }
.chips button[aria-pressed=true], .chips button[aria-pressed=true]:hover:not(:disabled) { background: var(--shell); color: var(--shell-ink); border-color: var(--shell); }
.chips button span { font-weight: 400; opacity: .8; }
@media (prefers-color-scheme: dark) { .chips button[aria-pressed=true], .chips button[aria-pressed=true]:hover:not(:disabled) { background: var(--ink); color: var(--card); border-color: var(--ink); } }

/* segmented switch: a tinted track with a white thumb */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--tint); border-radius: var(--r-lg); }
.seg button { border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-weight: 600; min-height: 34px; }
.seg button:hover:not(:disabled) { background: transparent; color: var(--ink); border: 0; }
.seg button[aria-pressed=true], .seg button[aria-pressed=true]:hover:not(:disabled) { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- messages: tinted note with a status pill ---------- */
.msg { overflow-wrap: anywhere; display: none; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line);
       border-radius: var(--r-lg); white-space: pre-line; background: var(--card); }
.msg.err, .msg.ok, .msg.warn, .msg.info { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.msg.err::before, .msg.ok::before, .msg.warn::before, .msg.info::before {
  font: 600 11px/20px var(--sans); letter-spacing: .04em; text-transform: uppercase; padding: 0 9px; border-radius: 999px; }
.msg.err { color: var(--ink); border-color: color-mix(in srgb, var(--err) 30%, transparent); background: var(--err-bg); }
.msg.err::before { content: "Error"; background: var(--err); color: #fff; }
.msg.ok { color: var(--ink); border-color: color-mix(in srgb, var(--ok) 30%, transparent); background: var(--ok-bg); }
.msg.ok::before { content: "Done"; background: var(--ok); color: #fff; }
.msg.warn { color: var(--ink); border-color: color-mix(in srgb, var(--warn-line) 45%, transparent); background: var(--warn-bg); }
.msg.warn::before { content: "Check"; background: var(--warn-line); color: #1f1300; }
.msg.info { color: var(--ink); background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 20%, transparent); }
.msg.info::before { content: "Info"; background: var(--info); color: var(--card); }

/* ---------- KPI cards ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--card); }
.kpi { background: var(--card); border: 1px solid var(--line); border-width: 0 1px 1px 0; margin: 0 -1px -1px 0; padding: 16px 20px; }
.kpi .k { font-size: 12.5px; line-height: 17px; font-weight: 500; color: var(--muted); }
.kpi .v { font: 500 25px/31px var(--serif); letter-spacing: -.02em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.alert { border-color: color-mix(in srgb, var(--err) 35%, transparent); background: var(--err-bg); }
.kpi.alert .v { color: var(--err); }

/* ---------- tables ---------- */
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody td { border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent); }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; line-height: 16px;
     white-space: nowrap; vertical-align: bottom; background: var(--card); }
thead tr:last-child th, table > tr:first-child th { border-bottom: 1px solid var(--line); }
td.num, th.num { text-align: right; white-space: nowrap; }
td .sub { font-size: 12px; color: var(--muted); }
@media (hover: hover) { tbody tr:hover td { background: var(--sel); } }
tr.dim td { color: var(--muted); }
tr.changed td { background: var(--changed); }
tr.selected td { background: var(--sel); }

/* status: a mark in the state's colour and its words */
.pill { display: inline-flex; align-items: center; gap: 7px; font: 600 13px/18px var(--sans); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 16px; height: 16px; background: var(--i-none) center / contain no-repeat; flex: none; }
.pill.ok { color: var(--ok-ink); } .pill.ok::before { background-image: var(--i-ok); }
.pill.warn { color: var(--warn-ink); } .pill.warn::before { background-image: var(--i-warn); }
.pill.err { color: var(--err-ink); } .pill.err::before { background-image: var(--i-no); }
.pill.open, .pill.info { color: var(--open); } .pill.open::before, .pill.info::before { background-image: var(--i-wait); }
.status { font: 600 12px/1.4 var(--sans); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.status.ok { color: var(--ok); } .status.err { color: var(--err); }
.count { font-size: 12px; color: var(--muted); }
.count.over { color: var(--err); font-weight: 700; }

/* progress bar */
.bar { height: 6px; background: var(--bar); margin-top: 6px; overflow: hidden; border-radius: 999px; }
.bar i { display: block; height: 100%; background: var(--ok); border-radius: 999px; }
.bar i.over { background: var(--err); }

/* ---------- findings ---------- */
.find { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 0;
        border-bottom: 1px solid var(--line); margin: 0; background: transparent; color: var(--ink); border-radius: 0; }
.find::before { font: 600 11px/20px var(--sans); letter-spacing: .04em; text-transform: uppercase; padding: 0 9px; border-radius: 999px; min-width: 64px; text-align: center; }
.find.ok::before { content: "Match"; color: var(--ok-ink); background: var(--ok-bg); }
.find.warn::before { content: "Check"; color: var(--warn-ink); background: var(--warn-bg); }
.find.err::before { content: "Mismatch"; color: var(--err-ink); background: var(--err-bg); }
.find.info::before { content: "Info"; color: var(--open); background: var(--open-bg); }
.find a { color: var(--link); font-weight: 600; }
.badge { font: 600 11px/18px var(--sans); letter-spacing: .04em; padding: 0 8px; border-radius: 999px; color: var(--open);
         background: var(--open-bg); text-transform: uppercase; }
.badge.ocr { color: var(--warn-ink); background: var(--warn-bg); }

/* ---------- forms ---------- */
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; margin: 12px 0; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted);
              letter-spacing: .02em; }
.form label input, .form label select { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 14px; }
.form label.wide { grid-column: 1 / -1; }
.form input, .form select { width: 100%; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-lg); margin: 16px 0 0; padding: 12px 16px 16px; }
legend { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 0 6px; }

/* drop zones */
.drop { display: block; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); padding: 24px; text-align: center;
        background: var(--drop); cursor: pointer; transition: border-color .12s, background .12s; }
.drop:hover, .drop.over { border-color: var(--signal); background: var(--sel); }
.drop b { color: var(--ink); }

details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 600; }
pre { white-space: pre-wrap; font-size: 12px; line-height: 1.5; background: var(--tint); border: 1px solid var(--line);
      padding: 10px; border-radius: var(--r); max-height: 420px; overflow: auto; margin: 6px 0 0; }

.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--signal);
           border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { transition-property: opacity, color, background-color, border-color !important; animation-duration: .01ms !important; }
  .spinner { animation-duration: 1.6s !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; animation-timing-function: var(--out); }
::view-transition-group(po-no) { animation-duration: .32s; animation-timing-function: var(--inout); }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .shell-in { flex-wrap: wrap; gap: 0 18px; padding: 0 16px; }
  .mast h1, .pagehead h1 { font-size: 30px; line-height: 36px; }
  .mast::after, .pagehead::after { opacity: .3; }
  .mast p, .pagehead p { font-size: 14px; }
  .shell nav a { padding: 0 12px; } .shell nav a::after { left: 12px; right: 12px; }
  .brand { min-height: 48px; }
  .shell { position: static; }
  .conn { order: 2; display: block; max-width: none; flex: 1 1 0; min-width: 0; align-self: center; text-align: right; overflow: hidden; text-overflow: ellipsis; }
  .conn svg { display: none; }
  .shell nav { order: 3; flex-basis: 100%; gap: 0; min-height: 42px; margin: 0 -12px; }
  .pagehead { padding: 22px 16px 68px; }
  main, .layout { padding: 0 16px; }
  .card { padding: 16px; }
  button, .btn { min-height: 44px; }
  button.small { min-height: 32px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi { padding: 12px 14px; } .kpi .v { font-size: 19px; line-height: 25px; }
  .chips { display: flex; width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .chips button { flex: none; }
  /* wide record tables become cards: each row a white rounded block */
  table.cards thead { display: none; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 16px; margin-bottom: 12px; background: var(--card); }
  table.cards td { border: 0; padding: 3px 0; display: grid; grid-template-columns: 40% 1fr; gap: 0 10px; text-align: left; }
  table.cards td > input { justify-self: stretch; width: 100%; }
  table.cards td:empty, table.cards td:has(> .status:empty) { display: none; }
  table.cards td.num { text-align: left; }
  table.cards td > * { grid-column: 2; justify-self: start; min-width: 0; max-width: 100%; }
  table.cards td > ul, table.cards td > div { justify-self: stretch; }
  table.cards td, table.cards th { border-left: 0 !important; }
  table.cards td::before { content: attr(data-k); font: 600 11px/1.8 var(--sans); color: var(--muted);
                           text-transform: uppercase; letter-spacing: .04em; }
  @media (hover: hover) { table.cards tbody tr:hover td { background: transparent; } }
}

.layout > main { margin: 0; padding: 0; max-width: none; }
