/* Lost Property demo (Skillkraft). Light and calm: warm paper, white cards, one plum accent, amber for "example" notes.
   No LNER colours, logos or branding. No inline styles anywhere (strict CSP on Labs): sizes go through the CSSOM. */
:root {
  color-scheme: light;
  --paper: #f6f5f1;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --hover: #f1eef6;
  --ink: #1b1d26;
  --ink-2: #363a48;
  --muted: #5a5f6e;
  --line: #e4e2dc;
  --line-2: #ccc9d4;
  --accent: #5b3f8c;
  --accent-2: #462e6f;
  --accent-soft: #efe9f7;
  --accent-mid: #a790cc;
  --ok: #1d6a47;
  --ok-soft: #e3f2ea;
  --warn: #84500f;
  --warn-soft: #fcf1df;
  --warn-line: #ecd3ab;
  --bad: #a3361c;
  --bad-soft: #fcebe5;
  --banner-bg: #23202e;
  --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(27, 29, 38, 0.05), 0 6px 20px rgba(27, 29, 38, 0.05);
}
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/instrument-sans-var-latin.woff2") format("woff2"); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.01em; font-weight: 650; margin: 0; }
p { margin: 0 0 10px; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.6; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: var(--mono); font-size: 0.95em; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.up { text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; box-shadow: var(--shadow); }
.skip:focus { top: 8px; }
.noscript { padding: 24px; }
.eyebrow { font-size: 13px; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }

/* ---------- honesty banner (always visible) ---------- */
.demo-banner { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 7px 16px; background: var(--banner-bg); color: #f4f2f8; font-size: 14px; line-height: 1.35; text-align: center; }
.demo-banner b { font-weight: 650; }
.demo-tag { flex: none; padding: 1px 8px; border-radius: 999px; background: #f2d9a6; color: #3a2606; font-size: 12px; font-weight: 650; letter-spacing: 0.03em; text-transform: uppercase; }
.banner-fiction { color: #cfcadb; }

/* ---------- header ---------- */
.top { position: relative; background: var(--surface); border-bottom: 1px solid var(--line); }
.bar1 { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1240px; margin: 0 auto; padding: 10px 24px 6px; }
.brand { display: flex; align-items: center; gap: 11px; flex: none; color: var(--ink); text-decoration: none; min-width: 0; }
.mark { width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.mark-ic { width: 21px; height: 21px; }
.brand-t { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-t b { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; white-space: nowrap; }
.brand-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick { display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink-2); }
.icon-btn:hover { background: var(--hover); }
.menu-btn { display: none; width: auto; padding: 0 12px; grid-auto-flow: column; gap: 6px; border-color: var(--line-2); font-weight: 600; font-size: 14px; }
.badge { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.panel { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; max-width: 1240px; margin: 0 auto; padding: 0 24px 8px; flex-wrap: wrap; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.nav-a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: 15px; }
.nav-a .ic { width: 17px; height: 17px; color: var(--muted); }
.nav-a:hover { background: var(--hover); color: var(--ink); }
.nav-a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-2); font-weight: 650; }
.nav-a[aria-current="page"] .ic { color: var(--accent); }
.count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.staff-tools { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; }
.tool { display: flex; align-items: center; gap: 6px; }
.tools-lbl { font-size: 13px; color: var(--muted); }
.select-sm { border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); padding: 6px 8px; font-size: 14px; max-width: 260px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: #eceae4; border-radius: 10px; }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seg-btn .ic { width: 16px; height: 16px; }
.seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--accent-2); box-shadow: 0 1px 3px rgba(27, 29, 38, 0.15); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 10px 18px; font-size: 15px; font-weight: 600; border: 1px solid transparent; line-height: 1.25; text-decoration: none; text-align: left; }
.btn .ic { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--hover); color: var(--ink); }
.btn-sm { padding: 7px 13px; font-size: 14px; }
.btn-lg { padding: 12px 20px; font-size: 16px; }
.btn-small { padding: 6px 11px; font-size: 14px; background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-small:hover { background: var(--hover); }
.btn-danger { color: var(--bad); border-color: #e5c2b6; }
.linkish { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0 4px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.link-arrow .ic { width: 15px; height: 15px; }
.strong-a { font-weight: 650; color: var(--ink); text-decoration: none; }
.strong-a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- layout ---------- */
main { outline: none; }
.view { max-width: 1240px; margin: 0 auto; padding: 26px 24px 48px; }
.page-head { margin-bottom: 20px; }
.page-head .actions { margin-top: 12px; }
.title { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; outline: none; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 780px; margin-bottom: 6px; }
.h2 { font-size: 21px; margin-bottom: 12px; }
.h3 { font-size: 17px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.h3 .ic { color: var(--accent); }
.h4 { font-size: 15px; margin: 10px 0 6px; }
.section { margin-top: 30px; }
.sec-gap { margin-top: 26px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-head .actions { margin: 0 0 10px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.two-col > div > .card + .card { margin-top: 18px; }
.grid-2 > .card + .card, .grid-3 > .card + .card, .two-col > .card + .card { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.card + .card { margin-top: 18px; }
.grid-2 > .card + .card, .grid-3 > .card + .card, .two-col > .card + .card { margin-top: 0; }
.narrow { max-width: 560px; }
.plain { margin: 0; padding-left: 18px; }
.plain li { margin-bottom: 7px; }
.prose p { margin-bottom: 12px; }
q { font-style: italic; }

/* ---------- home ---------- */
.hero { background: linear-gradient(135deg, #f3eefa 0%, #fbf9f4 60%); border: 1px solid var(--line); border-radius: 20px; padding: 34px 34px 26px; }
.hero-in { max-width: 760px; }
.hero-t { font-size: 38px; line-height: 1.12; }
.how { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.how-i { position: relative; background: rgba(255, 255, 255, 0.85); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 12px; }
.how-i p { color: var(--muted); font-size: 15px; }
.how-n { position: absolute; top: 14px; right: 16px; font-size: 13px; font-weight: 700; color: var(--accent-mid); }
.how-ic { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; }
.facts .fact p { margin: 0; }
.mine { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mine-a { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); padding: 12px 16px; }
.mine-a:hover { border-color: var(--accent-mid); color: var(--ink); }
.mine-t { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mine-art { flex: none; }
.tip { margin-top: 22px; display: flex; gap: 10px; align-items: flex-start; background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 12px; padding: 11px 14px; font-size: 14.5px; }
.tip p { margin: 0; }
.tip-tag { flex: none; padding: 1px 8px; border-radius: 999px; background: #f2d9a6; color: #3a2606; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin-top: 1px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--muted); padding: 22px 12px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--surface-2); }
.empty .ic { width: 26px; height: 26px; color: var(--accent-mid); }
.empty p { margin: 0; }

/* ---------- art and photos ---------- */
.art { display: block; width: 100%; height: auto; border-radius: 10px; background: #eef0ec; }
.art-xs { width: 46px; height: 35px; border-radius: 7px; }
.art-sm { width: 132px; height: 99px; }
.art-md { width: 260px; max-width: 100%; height: auto; aspect-ratio: 4 / 3; }
.art-lg { width: 100%; max-width: 440px; aspect-ratio: 4 / 3; }
canvas.photo { object-fit: cover; }
.blur { filter: blur(7px) saturate(0.8); }
.found { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.found-art { flex: none; overflow: hidden; border-radius: 10px; }
.found p { margin: 0; }
.photo-prev { margin-top: 8px; display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.photo-box { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.item-hero { margin-bottom: 16px; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.2); vertical-align: -3px; margin-left: 6px; }
.col .swatch { margin: 0 6px 0 0; }

/* ---------- forms ---------- */
.form-wrap { max-width: 860px; }
.form { padding: 22px 24px; }
.form .h3 { margin-top: 10px; }
.form-nav { justify-content: space-between; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; }
.field { margin-bottom: 14px; }
.lbl { display: block; font-weight: 600; font-size: 15px; margin-bottom: 5px; }
.req { color: var(--bad); }
.hint { font-size: 14px; color: var(--muted); margin: -2px 0 6px; }
.err { color: var(--bad); font-size: 14px; font-weight: 600; margin: 5px 0 0; }
.input { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); padding: 9px 12px; font-size: 16px; min-height: 44px; }
.input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.input[aria-invalid="true"], .has-err .input { border-color: var(--bad); background: #fff8f6; }
.input[readonly] { background: var(--surface-2); color: var(--muted); }
.input-num { width: 90px; min-height: 38px; padding: 6px 8px; }
.input-file { font-size: 15px; max-width: 100%; }
textarea.input { resize: vertical; }
.fs { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.fs.has-err .tiles { outline: 2px solid var(--bad); outline-offset: 4px; border-radius: 10px; }
.choice-row { display: flex; gap: 10px; flex-wrap: wrap; }
.choice { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 16px; background: var(--surface); font-weight: 600; cursor: pointer; }
.choice-sm { padding: 9px 13px; font-weight: 550; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.choice input, .tile input, .opt input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex: none; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tile { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 11px; font-size: 14.5px; background: var(--surface); cursor: pointer; }
.tile:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.check { margin-top: 6px; }
.check-l { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin-bottom: 10px; cursor: pointer; }
.check-l input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.err-summary { border: 2px solid var(--bad); background: #fff6f3; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; outline: none; }
.err-summary ul { margin: 4px 0 0; padding-left: 20px; }
.err-summary a { color: var(--bad); font-weight: 600; }
.note { display: flex; gap: 9px; align-items: flex-start; background: var(--accent-soft); border-radius: 10px; padding: 10px 13px; font-size: 14.5px; margin: 8px 0 14px; }
.note .ic { color: var(--accent); margin-top: 2px; }
.note.warn { background: var(--warn-soft); border: 1px solid var(--warn-line); }
.note.warn .ic { color: var(--warn); }
.note.ok { background: var(--ok-soft); }
.note.ok .ic { color: var(--ok); }
.rulebox:empty { display: none; }

/* stepper */
.stepper { list-style: none; margin: 0 0 18px; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; counter-reset: s; }
.stepper li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.stepper .st-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #eceae4; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.stepper .st-n .ic { width: 14px; height: 14px; }
.stepper li.done { color: var(--ok); }
.stepper li.done .st-n { background: var(--ok-soft); color: var(--ok); }
.stepper li.now { border-color: var(--accent); color: var(--accent-2); font-weight: 650; background: var(--accent-soft); }
.stepper li.now .st-n { background: var(--accent); color: #fff; }
.review { display: grid; gap: 14px; }
.rv { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface-2); }
.rv .h3 { justify-content: space-between; }

/* description lists */
.dl { margin: 0; display: grid; gap: 0; }
.dl-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.dl-row:last-child { border-bottom: 0; }
.dl dt { color: var(--muted); font-size: 14.5px; }
.dl dd { margin: 0; }
.rep { display: flex; gap: 16px; align-items: flex-start; }
.rep .dl { flex: 1; min-width: 0; }
.rep-art { flex: none; }

/* pills, scores */
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 650; background: #eceae4; color: var(--ink-2); white-space: nowrap; }
.pill-searching { background: #eef1f6; color: #34466a; }
.pill-match, .pill-check { background: var(--warn-soft); color: var(--warn); }
.pill-verified, .pill-paid, .pill-collect { background: var(--accent-soft); color: var(--accent-2); }
.pill-dispatched { background: #e6f0f7; color: #1f5274; }
.pill-returned { background: var(--ok-soft); color: var(--ok); }
.pill-closed { background: #ecebe8; color: var(--muted); }
.pill-i-stored { background: #eef1f6; color: #34466a; }
.pill-i-matched { background: var(--accent-soft); color: var(--accent-2); }
.pill-i-returned, .pill-i-dispatched { background: var(--ok-soft); color: var(--ok); }
.pill-i-transferred { background: #e6f0f7; color: #1f5274; }
.pill-i-disposed { background: #ecebe8; color: var(--muted); }
.pill-staff { background: #fbe9d6; color: #7a3f0a; font-size: 12px; margin-left: 6px; }
.score { display: inline-flex; align-items: center; gap: 8px; padding: 4px 11px 4px 4px; border-radius: 999px; font-size: 13px; font-weight: 650; flex: none; }
.score b { display: inline-grid; place-items: center; min-width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 15px; }
.score-strong { background: var(--ok-soft); color: var(--ok); }
.score-strong b { background: var(--ok); }
.score-good { background: var(--accent-soft); color: var(--accent-2); }
.score-good b { background: var(--accent); }
.score-possible { background: var(--warn-soft); color: var(--warn); }
.score-possible b { background: #b0731f; }
.reasons { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.reasons li { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; padding: 4px 10px; border-radius: 8px; }
.r-pos { background: var(--ok-soft); color: #18563a; }
.r-neg { background: var(--bad-soft); color: #8a2d16; }
.r-n { font-weight: 800; }

/* timeline, notes, thread */
.tl { list-style: none; margin: 0; padding: 0; }
.tl-i { position: relative; display: flex; gap: 12px; padding: 0 0 14px; }
.tl-i:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.tl-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); margin-top: 4px; box-shadow: 0 0 0 3px var(--accent-soft); }
.tl-int .tl-dot { background: #b0731f; box-shadow: 0 0 0 3px var(--warn-soft); }
.tl-what { margin: 0; }
.tl-meta { margin: 0; font-size: 13px; color: var(--muted); }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.note-new { border-left: 3px solid var(--accent); padding-left: 10px; }
.notes .note { display: flex; gap: 10px; align-items: flex-start; background: none; padding: 0; margin: 0; }
.notes .note p { margin: 0 0 2px; }
.note-s { font-weight: 650; }
.ch { flex: none; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: #e6f0f7; color: #1f5274; margin-top: 2px; }
.ch-sms { background: var(--ok-soft); color: var(--ok); }
.thread { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.msg p { margin: 0; }
.msg-me { justify-self: end; background: var(--accent-soft); border-color: #ded3ee; }
.msg-meta { font-size: 12.5px; color: var(--muted); margin-bottom: 3px !important; }
.composer { border-top: 1px solid var(--line); padding-top: 12px; }
.composer .select-sm { margin-bottom: 10px; }

/* tracking */
.stepper-track { margin-bottom: 20px; }
.act { border-color: var(--line); }
.act-hi { border: 2px solid var(--accent-mid); }
.code-big { font-size: 30px; font-weight: 700; letter-spacing: 0.06em; color: var(--accent-2); margin: 2px 0 10px; }
.done .code-big { font-size: 34px; }
.next { margin: 0; padding-left: 20px; }
.next li { margin-bottom: 8px; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: var(--surface); }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt-t { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.opt-p { font-weight: 700; white-space: nowrap; }
.rate { display: flex; gap: 8px; }
.rate-b { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; }
.rate-b[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }

/* checkout (test, Stripe-like) */
.checkout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
.co-sum { padding: 6px 4px; }
.co-amt { font-size: 38px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 16px; }
.co-item { display: flex; gap: 14px; align-items: center; padding: 12px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.co-item p { margin: 0; }
.co-art { flex: none; }
.co-art .art-sm { width: 96px; height: 72px; }
.co-pay { padding: 22px 24px; }
.co-test { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; background: #fff7e8; border: 1px solid var(--warn-line); border-radius: 10px; padding: 9px 12px; font-size: 14px; margin-bottom: 16px; }
.test-pill { padding: 1px 8px; border-radius: 6px; background: #f6a821; color: #2f1d00; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; }
.co-h { margin-top: 18px; }
.co-card { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px 0; background: var(--surface-2); margin-bottom: 14px; }
.btn-pay { width: 100%; justify-content: center; background: #2d2a8c; color: #fff; padding: 13px 18px; font-size: 16px; margin-top: 6px; }
.btn-pay:hover { background: #221f72; }
.co-foot { display: flex; gap: 6px; align-items: flex-start; margin-top: 12px; }
.co-foot .ic { width: 15px; height: 15px; margin-top: 2px; }
.spin { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- staff ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.kpi { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
a.kpi:hover { border-color: var(--accent-mid); color: var(--ink); }
.kpi b { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.kpi span { font-size: 14px; color: var(--muted); }
.kpi-hi { border-color: var(--accent-mid); background: linear-gradient(180deg, #fff 0%, #f7f3fc 100%); }
.kpi-hi b { color: var(--accent-2); }
.kpi-sub { font-size: 12.5px !important; }
.mini { list-style: none; margin: 0; padding: 0; }
.mini li + li { border-top: 1px solid var(--line); }
.mini-a { display: flex; align-items: center; gap: 12px; padding: 9px 4px; text-decoration: none; color: var(--ink); }
.mini-a:hover { background: var(--hover); color: var(--ink); }
.mini-t { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mini-t b { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-art { flex: none; }
.filters { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; padding: 14px 18px 2px; margin-bottom: 16px; }
.filters .field { flex: 1 1 200px; min-width: 0; max-width: 340px; }
.filters > p { flex: 0 0 auto; margin-bottom: 18px; }
.filters > .btn { margin-bottom: 14px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .table-wrap { box-shadow: none; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl thead th { font-size: 13px; color: var(--muted); font-weight: 650; background: var(--surface-2); white-space: nowrap; }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.tbl tbody tr:hover { background: #fbfaf8; }
.tbl .num, .tbl-num td { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-num thead th:not(:first-child) { text-align: right; }
.td-art { width: 58px; }
.tbl-rules th[scope="row"] { font-weight: 600; min-width: 170px; }
.tbl-rules td:last-child { min-width: 240px; }
.item-hero .art-lg { margin: 0 auto; }
.meter { height: 10px; border-radius: 999px; background: #eceae4; overflow: hidden; margin-top: 10px; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar-warn { background: #b0731f; }
.bar-bad { background: var(--bad); }
.sugs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sug { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.sug-h { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sug-h p { margin: 0; }
.sug-art { flex: none; }
.sug .actions { margin-top: 10px; }
.matches { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.match-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.match-top p { margin: 0; }
.match-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.side { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.side-k { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 8px; }
.side-k .ic { width: 15px; height: 15px; }
.side-b { display: flex; gap: 12px; align-items: flex-start; }
.side-b p { margin: 0 0 4px; }
.side-art { flex: none; }
.side-art .art-sm { width: 112px; height: 84px; }
.cmp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.cmp > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--accent); }
.tab[aria-current="page"] { color: var(--accent-2); border-bottom-color: var(--accent); }
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.evt { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.evt-h { margin: 0 0 6px; }
.code { margin: 0; font-family: var(--mono); font-size: 13px; background: #f4f2fa; border-radius: 8px; padding: 10px 12px; overflow-x: auto; white-space: pre; }
.mf { margin-bottom: 8px; }
.label-prev { border: 2px dashed var(--line-2); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.label-prev p { margin: 0 0 2px; }
.bagtag { border: 2px solid var(--ink); border-radius: 10px; padding: 14px 16px; margin-bottom: 8px; }
.bt-id { font-size: 26px; font-weight: 700; margin: 0 0 6px; }
.bt-bars { display: flex; gap: 2px; height: 42px; margin-bottom: 10px; }
.bt-bars span { display: block; background: var(--ink); }
.gate { text-align: center; max-width: 560px; margin: 30px auto; }
.gate .ic { width: 30px; height: 30px; color: var(--accent); }
.areas { list-style: none; margin: 0; padding: 0; }
.areas li { padding: 6px 0 12px; border-bottom: 1px solid var(--line); }
.areas li:last-child { border-bottom: 0; }
.areas p { margin: 0 0 4px; color: var(--ink-2); }

/* MI */
.kpis-mi .kpi b { font-size: 26px; }
.mi-grid { margin-bottom: 18px; }
.chart { display: block; width: 100%; height: auto; }
.chart .gl { stroke: #e7e5df; stroke-width: 1; }
.chart .ax { fill: #6b6f7c; font-size: 11px; font-family: var(--font); }
.chart .b1 { fill: var(--accent); }
.chart .b2 { fill: #3c9a74; }
.legend { display: flex; align-items: center; gap: 8px; margin: -4px 0 8px; color: var(--muted); }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.lg1 { background: var(--accent); }
.lg2 { background: #3c9a74; margin-left: 10px; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.hb { display: grid; grid-template-columns: minmax(84px, 38%) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.hb-k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.hb-track { height: 12px; background: #f0eee9; border-radius: 4px; overflow: hidden; }
.hb-fill { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.hb-v { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-x { font-weight: 500; color: var(--muted); }

/* ---------- dialogs, toast, footer ---------- */
.dlg { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 20px 60px rgba(27, 29, 38, 0.25); color: var(--ink); background: var(--surface); }
.dlg-wide { width: min(820px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(27, 29, 38, 0.45); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.dlg-title { font-size: 19px; }
.dlg-body { padding: 16px 22px 22px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 80; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.foot { border-top: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 14px; }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 20px 24px 28px; }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 0; }
.foot-mark { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .menu-btn { display: inline-grid; }
  .panel { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(27, 29, 38, 0.12); padding: 10px 16px 16px; flex-direction: column; align-items: stretch; }
  .panel.open { display: flex; }
  .nav-list { flex-direction: column; }
  .nav-a { width: 100%; padding: 11px 12px; }
  .staff-tools { border-top: 1px solid var(--line); padding-top: 12px; }
  .tool { flex: 1 1 220px; flex-direction: column; align-items: stretch; }
  .select-sm { max-width: none; width: 100%; min-height: 40px; }
}
@media (max-width: 980px) {
  .two-col, .checkout { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3, .how { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .bar1 { padding: 8px 16px 6px; }
  .view { padding: 18px 16px 40px; }
  .foot-in { padding: 18px 16px 24px; }
  .title { font-size: 25px; }
  .hero { padding: 22px 18px 18px; border-radius: 16px; }
  .hero-t { font-size: 29px; }
  .lead { font-size: 16.5px; }
  .grid-2, .match-pair, .cmp { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 16px; }
  .form, .co-pay { padding: 16px; }
  .dl-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rep { flex-direction: column; }
  .stepper { gap: 4px; }
  .stepper li { padding: 3px; }
  .stepper li.now { padding: 3px 10px 3px 3px; font-size: 14px; }
  .stepper .st-n { width: 24px; height: 24px; }
  .stepper li .st-t { display: none; }
  .stepper li.now .st-t { display: inline; }
  .demo-banner { font-size: 13px; padding: 6px 12px; }
  .banner-fiction { display: none; }
  .seg-btn span { display: none; }
  .seg-btn { padding: 7px 10px; }
  .brand-sub { display: none; }
  .brand { gap: 8px; }
  .mark { width: 32px; height: 32px; border-radius: 9px; }
  .mark-ic { width: 18px; height: 18px; }
  .brand-t b { font-size: 17px; }
  .quick { gap: 4px; }
  .seg-btn { padding: 7px 8px; }
  .menu-btn { padding: 0 9px; }
  .menu-t { display: none; }
  .mine-a { flex-wrap: wrap; gap: 10px 12px; }
  .mine-art .art-sm { width: 88px; height: 66px; }
  .mine-t { flex: 1 1 150px; }
  .dlg-body { padding: 14px 16px 18px; }
  .side-b { flex-direction: column; }
  .co-amt { font-size: 32px; }
  .hb { grid-template-columns: minmax(70px, 38%) minmax(0, 1fr) auto; }
}
@media (max-width: 400px) {
  .brand-sub { display: none; }
  .kpi b { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .demo-banner, .top, .foot, .view, .toast { display: none !important; }
  .dlg { box-shadow: none; position: static; width: auto; }
  .dlg-head, .dlg-body .actions { display: none; }
}
