:root {
  --ink: #1d2a33; --muted: #5b6b76; --line: #d8e0e5; --bg: #f5f7f8; --panel: #ffffff;
  --brand: #12596b; --brand-ink: #ffffff; --accent: #7ab800;
  --red: #b42318; --red-bg: #fdecea; --amber: #8a5300; --amber-bg: #fff4e0; --green: #1e6b2d; --green-bg: #e6f4ea; --grey-bg: #eef1f3;
  --radius: 10px; --focus: #ffbf47;
}
* { box-sizing: border-box; }
html { font-size: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 10; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.demo-banner { background: var(--red); color: #fff; padding: 8px 16px; text-align: center; font-size: .9rem; }
.top { background: var(--brand); color: var(--brand-ink); border-bottom: 4px solid var(--accent); }
.top-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 10px; padding-bottom: 10px; }
.brand { color: #fff; font-weight: 700; text-decoration: none; display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.brand-mark { background: var(--accent); color: var(--brand); border-radius: 6px; padding: 2px 6px; font-size: .85rem; }
.top nav { display: flex; gap: 16px; flex-wrap: wrap; }
.top nav a { color: #fff; text-decoration: none; padding: 6px 0; }
.top nav a:hover { text-decoration: underline; }
.signout { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.who { font-size: .9rem; opacity: .9; }
.link { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; padding: 4px; }
.top .link { color: #fff; }
.danger { color: var(--red); }
main { padding-top: 20px; padding-bottom: 40px; }
h1 { font-size: 1.6rem; margin: 0 0 12px; line-height: 1.25; }
h2 { font-size: 1.2rem; margin: 28px 0 10px; }
.lede { font-size: 1.05rem; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .92rem; margin: 2px 0 8px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.button { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: var(--radius); padding: 12px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; min-height: 44px; }
.button:hover { filter: brightness(1.1); }
.button.secondary { background: #fff; color: var(--brand); border: 2px solid var(--brand); }
.flash { border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px; }
.flash-ok { background: var(--green-bg); color: var(--green); }
.flash-error { background: var(--red-bg); color: var(--red); }
.panel, .card, .empty, .line { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel { padding: 16px; margin-top: 20px; }
.empty { padding: 24px; text-align: center; }
.cards, .lines, .personas, .findings, .history { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.card-link, .card-body { display: grid; gap: 2px; padding: 14px 16px; color: inherit; text-decoration: none; }
.card-link:hover { background: #fafcfd; }
.card-title { font-weight: 700; } .card-meta { color: var(--muted); font-size: .9rem; } .card-amount { font-size: 1.15rem; font-weight: 700; }
.chip { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .85rem; font-weight: 600; }
.chip-grey { background: var(--grey-bg); } .chip-amber { background: var(--amber-bg); color: var(--amber); } .chip-green { background: var(--green-bg); color: var(--green); } .chip-red { background: var(--red-bg); color: var(--red); }
.persona { width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 2px; font: inherit; cursor: pointer; min-height: 44px; }
.persona:hover { border-color: var(--brand); }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 16px; margin: 0 0 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.summary dt { color: var(--muted); font-size: .85rem; } .summary dd { margin: 0; font-weight: 600; }
.line { padding: 12px 16px; }
.line-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.line-amount { font-weight: 700; }
.breakdown { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: .93rem; }
.breakdown th, .breakdown td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.breakdown td:last-child { text-align: right; }
.is-break td { color: var(--muted); font-style: italic; }
.note { background: var(--amber-bg); border-radius: 6px; padding: 6px 10px; font-size: .92rem; }
.total { font-size: 1.1rem; text-align: right; }
.purpose { margin: 6px 0 0; }
form.inline { display: inline; }
.stack { display: grid; gap: 6px; }
.stack > button, .stack > .button { justify-self: start; margin-top: 8px; }
label { font-weight: 600; }
input, select, textarea { font: inherit; width: 100%; padding: 10px; border: 2px solid #8a9aa5; border-radius: 8px; background: #fff; min-height: 44px; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; min-height: 0; margin: 0 8px 0 0; flex: none; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 6px 0; }
legend { font-weight: 700; padding: 0 4px; }
.check, .choice { display: flex; align-items: flex-start; font-weight: 400; padding: 6px 0; }
.check .muted { margin-left: .4em; }
.choice { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin: 6px 0; background: #fff; }
.choice.disabled { opacity: .55; }
.inline-choices { display: flex; gap: 20px; flex-wrap: wrap; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.preview { background: var(--grey-bg); border-radius: 8px; padding: 8px 12px; min-height: 1em; }
.preview:empty { display: none; }
.passengers .scroll { max-height: 220px; overflow-y: auto; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-button { border: 1px solid var(--brand); color: var(--brand); background: #fff; border-radius: 999px; padding: 8px 12px; font: inherit; cursor: pointer; min-height: 40px; }
.finding { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--radius); border-left: 6px solid; background: #fff; }
.finding-block { border-color: var(--red); background: var(--red-bg); }
.finding-exception { border-color: var(--amber); background: var(--amber-bg); }
.finding-warn { border-color: #c9a227; }
.finding-info { border-color: var(--line); }
.finding-label { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }
.finding-code { color: var(--muted); font-size: .8rem; }
.ok-note { background: var(--green-bg); color: var(--green); border-radius: var(--radius); padding: 10px 12px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.holder { font-size: 1.1rem; }
.timeline { list-style: none; padding: 0; margin: 10px 0 20px; display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 1fr; padding: 8px 0 8px 22px; border-left: 3px solid var(--line); position: relative; }
.step::before { content: ""; position: absolute; left: -9px; top: 12px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--line); }
.step-done::before { background: var(--green); border-color: var(--green); }
.step-current::before { background: var(--amber-bg); border-color: var(--amber); }
.step-name { font-weight: 700; } .step-detail { color: var(--muted); }
.history li { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.foot { color: var(--muted); font-size: .85rem; padding-bottom: 30px; }
@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
  h1 { font-size: 1.35rem; }
  .signout { margin-left: 0; }
  .total { text-align: left; }
}
.count { display: inline-block; min-width: 1.4em; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--brand); font-weight: 700; font-size: .85rem; text-align: center; }
.step-note { color: var(--muted); font-size: .85rem; }
.accepted { color: var(--green); font-size: .9rem; }
.msg-return, .msg-reject { border-left: 4px solid var(--red); }
.msg-question { border-left: 4px solid var(--amber); }
.updates h2 { margin-top: 0; }
