/* M-Pesa statement tools. Every rule is scoped to .mst-tool so the theme is left alone. */
.mst-tool {
  --mst-accent: #0f7a4d;
  --mst-in: #17965f;
  --mst-out: #4a524d;
  --mst-mint: #e6f4ed;
  --mst-head: Lora, Georgia, serif;
  --mst-line: color-mix(in srgb, currentColor 22%, transparent);
  --mst-soft: color-mix(in srgb, currentColor 6%, transparent);
  box-sizing: border-box;
  max-width: 760px;
  margin: 1.5em auto;
  padding: 16px;
  border: 1px solid #ccc;
  border: 1px solid var(--mst-line);
  border-radius: 10px;
  font: inherit;
  color: inherit;
}
.mst-tool *, .mst-tool *::before, .mst-tool *::after { box-sizing: border-box; }
.mst-tool [hidden] { display: none !important; }
.mst-tool .mst-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.mst-tool .mst-drop {
  display: block; padding: 28px 16px; text-align: center; cursor: pointer;
  border: 2px dashed #aaa; border: 2px dashed var(--mst-line); border-radius: 10px;
}
.mst-tool .mst-drop:hover, .mst-tool .mst-over { border-color: var(--mst-accent); background: var(--mst-soft); }
.mst-tool .mst-file:focus-visible + .mst-drop { outline: 3px solid var(--mst-accent); outline-offset: 2px; }
.mst-tool .mst-drop-title { display: block; font-weight: 600; font-size: 1.05em; }
.mst-tool .mst-drop-sub { display: block; opacity: .7; margin-top: 4px; }
.mst-tool .mst-note { margin: 10px 0 0; font-size: .9em; opacity: .75; }
.mst-tool .mst-status { margin: 12px 0 0; min-height: 1.2em; }
.mst-tool .mst-error { color: #b3261e; font-weight: 600; }
.mst-tool .mst-h { margin: 8px 0; font-size: 1.1em; font-family: var(--mst-head); }
.mst-tool .mst-check { margin: 8px 0; padding: 8px 10px; border-radius: 6px; background: var(--mst-soft); font-size: .95em; }
.mst-tool .mst-ok { border-left: 4px solid #0f7a4d; }
.mst-tool .mst-warn { border-left: 4px solid #9a5b00; }
.mst-tool .mst-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.mst-tool .mst-btn {
  appearance: none; border: 1px solid var(--mst-accent); background: var(--mst-accent); color: #fff;
  padding: 10px 16px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px;
}
.mst-tool .mst-btn:hover { filter: brightness(1.08); }
.mst-tool .mst-btn:focus-visible { outline: 3px solid var(--mst-accent); outline-offset: 2px; }
.mst-tool .mst-btn-quiet { background: transparent; color: inherit; border-color: #aaa; border-color: var(--mst-line); }
.mst-tool .mst-pw { width: 100%; max-width: 320px; padding: 10px; font: inherit; border: 1px solid #aaa; border: 1px solid var(--mst-line); border-radius: 8px; background: transparent; color: inherit; }
.mst-tool .mst-pwhelp { margin: 0 0 8px; }
.mst-tool .mst-cta { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--mst-line); font-size: .95em; }
.mst-tool .mst-cta a { color: var(--mst-accent); font-weight: 600; }
.mst-disclaimer { max-width: 760px; margin: -.5em auto 1.5em; padding: 0 16px; font-size: .85em; opacity: .75; }
.mst-tool .mst-tablewrap { overflow-x: auto; margin-top: 8px; border: 1px solid #ccc; border: 1px solid var(--mst-line); border-radius: 8px; }
.mst-tool .mst-table { width: 100%; border-collapse: collapse; font-size: .88em; }
.mst-tool .mst-table th, .mst-tool .mst-table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--mst-line); white-space: nowrap; }
.mst-tool .mst-table th { background: var(--mst-soft); font-weight: 600; }
.mst-tool .mst-table .mst-num { text-align: right; font-variant-numeric: tabular-nums; }
.mst-tool .mst-table .mst-details { white-space: normal; min-width: 180px; max-width: 320px; }

/* analyzer */
.mst-tool .mst-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.mst-tool .mst-card { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid #ccc; border: 1px solid var(--mst-line); border-radius: 8px; background: var(--mst-soft); }
.mst-tool .mst-card-label { font-size: .85em; opacity: .8; }
.mst-tool .mst-card-value { font-size: 1.25em; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.mst-tool .mst-card-sub { font-size: .8em; opacity: .7; }
.mst-tool .mst-card-in { border-left: 4px solid var(--mst-in); }
.mst-tool .mst-card-out { border-left: 4px solid var(--mst-out); }
.mst-tool .mst-section { margin-top: 22px; }
.mst-tool .mst-h4 { margin: 0 0 6px; font-size: 1.1em; font-family: var(--mst-head); font-weight: 700; }
.mst-tool .mst-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0; font-size: .88em; }
.mst-tool .mst-key::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; }
.mst-tool .mst-in-key::before { background: var(--mst-in); }
.mst-tool .mst-out-key::before { background: var(--mst-out); }
.mst-tool .mst-chart { margin: 6px 0 10px; }
.mst-tool .mst-svg { display: block; width: 100%; height: auto; }
.mst-tool .mst-axis { stroke: currentColor; stroke-opacity: .35; stroke-width: 1; }
.mst-tool .mst-in { fill: var(--mst-in); }
.mst-tool .mst-out { fill: var(--mst-out); }
.mst-tool .mst-val { font-size: 11px; fill: currentColor; opacity: .85; }
.mst-tool .mst-tick { font-size: 12px; fill: currentColor; opacity: .8; }
.mst-tool .mst-bars { display: grid; gap: 10px; margin-top: 8px; }
.mst-tool .mst-barrow { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; }
.mst-tool .mst-barlabel { overflow-wrap: anywhere; }
.mst-tool .mst-barval { text-align: right; font-variant-numeric: tabular-nums; font-size: .9em; }
.mst-tool .mst-bartrack { grid-column: 1 / -1; display: block; height: 10px; border-radius: 5px; background: var(--mst-soft); overflow: hidden; }
.mst-tool .mst-barfill { display: block; height: 100%; border-radius: 5px; background: var(--mst-accent); }
.mst-tool .mst-fill-out { background: var(--mst-out); }
.mst-tool .mst-fill-in { background: var(--mst-in); }
.mst-tool .mst-more { margin-top: 18px; }
.mst-tool .mst-more summary { cursor: pointer; }
.mst-tool .mst-list { margin: 8px 0 0; padding-left: 20px; font-size: .9em; }
.mst-tool .mst-switch { display: inline-block; margin-top: 6px; cursor: pointer; font-weight: 600; }
.mst-tool .mst-switch input { width: 18px; height: 18px; vertical-align: -3px; accent-color: var(--mst-accent); }

/* search */
.mst-tool .mst-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 6px; align-items: end; }
.mst-tool .mst-field { display: flex; flex-direction: column; gap: 4px; }
.mst-tool .mst-field-wide { grid-column: 1 / -1; }
.mst-tool .mst-field label { font-size: .88em; font-weight: 600; }
.mst-tool .mst-input { width: 100%; min-height: 44px; padding: 8px 10px; font: inherit; color: inherit; background: transparent; border: 1px solid #aaa; border: 1px solid var(--mst-line); border-radius: 8px; }
.mst-tool .mst-input:focus-visible { outline: 3px solid var(--mst-accent); outline-offset: 1px; }
.mst-tool .mst-field-check { flex-direction: row; align-items: center; gap: 8px; grid-column: 1 / -1; }
.mst-tool .mst-field-check input { width: 18px; height: 18px; accent-color: var(--mst-accent); }
.mst-tool .mst-field-check label { font-weight: 400; }
.mst-tool .mst-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 10px; }
.mst-tool .mst-chips-label { font-size: .88em; opacity: .75; }
.mst-tool .mst-chip { appearance: none; padding: 6px 10px; min-height: 36px; font: inherit; font-size: .88em; color: inherit; background: var(--mst-soft); border: 1px solid #ccc; border: 1px solid var(--mst-line); border-radius: 999px; cursor: pointer; }
.mst-tool .mst-chip:hover { border-color: var(--mst-accent); }
.mst-tool .mst-chip:focus-visible { outline: 3px solid var(--mst-accent); outline-offset: 1px; }
.mst-tool .mst-feerow td { opacity: .75; }
.mst-tool .mst-badge { display: inline-block; margin-left: 6px; padding: 0 6px; font-size: .75em; border-radius: 4px; border: 1px solid var(--mst-line); }
.mst-tool .mst-receipt { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; white-space: nowrap; }
.mst-tool .mst-h5 { margin: 14px 0 6px; font-size: 1em; }
.mst-tool .mst-report .mst-section { margin-top: 16px; }

/* focus mode (analyzer) */
.mst-tool .mst-answer{font-size:1.2em;font-weight:600;margin:0 0 1em;line-height:1.4;font-family:var(--mst-head);padding:12px 14px;border-radius:8px;background:#e6f4ed;background:var(--mst-mint);color:#111}
.mst-rest{margin-top:1.2em}
.mst-rest>summary{cursor:pointer;font-weight:600;padding:.5em 0}

/* report (popup window) */
.mst-tool .mst-rep-brand { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 3px solid #17965f; }
.mst-tool .mst-rep-brand svg { flex: none; }
.mst-tool .mst-rep-name { font-family: var(--mst-head); font-size: 1.25em; line-height: 1.1; }
.mst-tool .mst-rep-tag { display: block; margin-top: 3px; font-size: .7em; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #4a524d; font-family: inherit; }
