@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/barlow-semi-condensed-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/barlow-semi-condensed-700.woff2) format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/public-sans-var.woff2) format("woff2"); }
/* Tokens: see DESIGN.md ("Fleet sign and work ticket"). */
:root {
  --ink: #15211d; --ink-2: #4a5852; --ink-3: #5e6b66; --rule: #aab5b0; --rule-2: #c3ccc8; --line: #d9dfdc; --line-2: #e9edeb;
  --bg: #eff2f0; --head: #f6f8f7; --card: #fff; --brand: #0b4f3a; --brand-2: #0e6249; --accent: #f5c518;
  --blue: #2f6db5; --orange: #d9622b; --focus: #1f5fbf;
  --good: #157a3c; --good-bg: #e5f3ea; --good-ink: #0f5c2d;
  --warn: #c98500; --warn-bg: #fbf0d6; --warn-ink: #6e4a00;
  --crit: #c8372d; --crit-bg: #fbe7e4; --crit-ink: #9c241b;
  --r: 8px; --r-sm: 6px; --r-xs: 4px; --sp: 16px;
  --sh-pop: 0 1px 2px rgba(16,32,26,.08), 0 8px 24px rgba(16,32,26,.14);
  --sh-modal: 0 1px 3px rgba(16,32,26,.1), 0 24px 60px rgba(16,32,26,.24);
  --ease: cubic-bezier(.2, .7, .3, 1);
  --font: "Public Sans", "Segoe UI", Arial, sans-serif;
  --display: "Barlow Semi Condensed", "Arial Narrow", "Public Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 14px/1.45 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.15; }
h1 { font-size: 27.5px; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 14px; }
p { margin: 0; }
a { color: var(--blue); }
.num, td.n, th.n { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--ink-2); }
.small { font-size: 12px; }
.hide { display: none !important; }

/* header */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 10px 24px; background: var(--brand); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { display: block; font-family: var(--display); font-size: 20px; font-weight: 700; line-height: 1.1; }
.brand span { display: block; font-size: 12px; color: #c5d9d1; }
.source { flex: 1; min-width: 0; font-size: 12.5px; color: #d3e3dc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source .pill { display: inline-block; padding: 1px 7px; border-radius: var(--r-xs); border: 1px solid rgba(255,255,255,.35); color: #fff; margin-right: 8px; font-weight: 600; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.top .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.32); }
.top .btn:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.5); }
.top .btn.danger { color: #ffd6d6; }
.menu { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-pop); padding: 4px; min-width: 240px; z-index: 40; }
.menu-pop button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: var(--r-xs); cursor: pointer; transition: background-color 150ms var(--ease); }
.menu-pop button:hover { background: var(--bg); }

.tabs { position: sticky; top: 56px; z-index: 25; display: flex; gap: 2px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 12px 12px 9px; font-weight: 600; color: var(--ink-2); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; transition: color 150ms var(--ease), border-color 150ms var(--ease); }
.tabs button:hover { color: var(--ink); border-bottom-color: var(--line); }
.tabs button.on { color: var(--brand); border-bottom-color: var(--accent); }

main { max-width: 1360px; margin: 0 auto; padding: 22px 24px 40px; outline: none; }
.foot { max-width: 1360px; margin: 0 auto; padding: 14px 24px 30px; color: var(--ink-3); font-size: 12px; }

/* buttons + inputs */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--r-sm); border: 1px solid var(--rule-2); background: #fff; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease); }
.btn:hover { border-color: var(--rule); background: var(--head); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input[type=number], input[type=text], select { border: 1px solid var(--rule-2); border-radius: var(--r-sm); padding: 7px 10px; background: #fff; min-width: 0; }
input[type=number] { width: 100%; }
input:focus-visible, select:focus-visible, button:focus-visible, [tabindex]:focus-visible, label:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
input:focus, select:focus { border-color: var(--focus); }
label.f { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
label.f small { font-weight: 400; color: var(--ink-3); }
.in-unit { display: flex; align-items: center; border: 1px solid var(--rule-2); border-radius: var(--r-sm); background: #fff; overflow: hidden; }
.in-unit input { border: 0; border-radius: 0; }
.in-unit span { padding: 0 9px; color: var(--ink-3); font-size: 12px; white-space: nowrap; }
input[type=range] { width: 100%; accent-color: var(--brand); }
.seg { display: inline-flex; background: var(--line-2); border-radius: var(--r-sm); padding: 2px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: var(--r-xs); font-weight: 600; color: var(--ink-2); cursor: pointer; transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(16,32,26,.12); }

/* layout */
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-h p { color: var(--ink-2); margin-top: 4px; max-width: 760px; }
.grid { display: grid; gap: var(--sp); }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) 380px; }
.g-side-l { grid-template-columns: 360px minmax(0, 1fr); }
.g-labor { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; }
.card > h2, .card > h3 { margin-bottom: 4px; }
.card .sub { color: var(--ink-2); font-size: 13px; margin-bottom: 12px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.mt { margin-top: var(--sp); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp); margin-bottom: var(--sp); }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.kpi .l { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.kpi .v { font-family: var(--display); font-size: 34px; font-weight: 700; line-height: 1.1; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.kpi.bad .v { color: var(--crit-ink); }
.kpi.hero { background: var(--brand); color: #fff; border-color: var(--brand); }
.kpi.hero .l, .kpi.hero .s { color: #cfe0d8; }
.card .kpi { border: 0; background: var(--head); }
.card .kpi.hero { background: var(--brand); }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px 2px 5px; border-radius: var(--r-xs); font-size: 12px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip i { font-style: normal; font-size: 10px; width: 14px; height: 14px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; }
.chip.green { background: var(--good-bg); color: var(--good-ink); } .chip.green i { background: var(--good); }
.chip.amber { background: var(--warn-bg); color: var(--warn-ink); } .chip.amber i { background: var(--warn); color: #fff; }
.chip.red { background: var(--crit-bg); color: var(--crit-ink); } .chip.red i { background: var(--crit); }
.chip.gray { background: var(--line-2); color: var(--ink-2); }
.chip.flag { background: var(--crit); color: #fff; }
.tag { display: inline-block; padding: 1px 7px; border-radius: var(--r-xs); background: var(--line-2); color: var(--ink-2); font-size: 11.5px; font-weight: 600; margin: 1px 2px 1px 0; white-space: nowrap; }
.tag.r { background: var(--crit-bg); color: var(--crit-ink); }

/* tables */
.tw { overflow: auto; max-height: 560px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.tw.tall { max-height: 70vh; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.t th { position: sticky; top: 0; z-index: 2; background: var(--head); text-align: left; font-size: 12.5px; color: var(--ink-2); font-weight: 650; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t th[data-sort] { cursor: pointer; user-select: none; }
table.t th[data-sort]:hover { color: var(--ink); }
table.t th .arr { opacity: .35; margin-left: 2px; }
table.t th.sorted .arr { opacity: 1; color: var(--brand); }
table.t td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tbody tr:hover td { background: var(--head); }
table.t tbody tr.click { cursor: pointer; }
table.t tfoot td { position: sticky; bottom: 0; background: var(--line-2); font-weight: 700; border-top: 1px solid var(--line); }
table.t td.name { font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.t td.name small { display: block; font-weight: 400; color: var(--ink-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
td.neg, span.neg { color: var(--crit-ink); }
.empty { text-align: center; padding: 48px 20px; color: var(--ink-2); }
.empty h2 { color: var(--ink); margin-bottom: 6px; }
.empty .row { justify-content: center; margin-top: 16px; }
.empty svg { margin-bottom: 10px; }

/* bank vs reality */
.bvr { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; }
.bvr .side { padding: 4px 0 12px; border-bottom: 3px solid var(--blue); }
.bvr .real { border-bottom-color: var(--crit); }
.bvr .real.ok { border-bottom-color: var(--good); }
.bvr .big { font-family: var(--display); font-size: 43px; font-weight: 700; line-height: 1.05; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.bvr .real .big { color: var(--brand); }
.bvr .vs { align-self: center; font-weight: 700; color: var(--ink-3); }
.hidden-list { margin-top: 12px; }
.hidden-list .hl { display: grid; grid-template-columns: 1fr 120px 80px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.hidden-list .bar { height: 8px; border-radius: 2px; background: var(--orange); }
.quote { padding: 4px 0 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.quote::after { content: "From the r/sweatystartup thread this tool answers"; display: block; margin-top: 4px; font-size: 12px; color: var(--ink-3); }

/* charts */
.chart { width: 100%; display: block; overflow: visible; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--ink-2); }
.chart .lbl { fill: var(--ink); font-weight: 650; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; background: var(--c); }
.spark { vertical-align: middle; }
.hbar { display: flex; height: 22px; border-radius: var(--r-xs); overflow: hidden; gap: 2px; background: var(--line-2); }
.hbar > div { height: 100%; }

/* tooltip, toast, modal */
.tip { position: fixed; z-index: 90; pointer-events: none; background: var(--ink); color: #fff; padding: 7px 10px; border-radius: var(--r-sm); font-size: 12px; max-width: 280px; box-shadow: var(--sh-pop); white-space: pre-line; }
.toast { position: fixed; z-index: 95; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--brand); color: #fff; padding: 10px 16px; border-radius: var(--r); font-weight: 600; box-shadow: var(--sh-pop); }
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(16, 32, 26, .45); display: grid; place-items: center; padding: 20px; }
.modal-card { background: #fff; border-radius: 10px; width: min(880px, 100%); max-height: calc(100vh - 40px); overflow: auto; box-shadow: var(--sh-modal); }
.modal-h { position: sticky; top: 0; background: #fff; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.modal-b { padding: 16px 20px 20px; }
.x { border: 0; background: var(--line-2); border-radius: var(--r-sm); width: 32px; height: 32px; font-size: 18px; cursor: pointer; flex: none; }

/* cost breakdown lines */
.lines { width: 100%; border-collapse: collapse; font-size: 13px; }
.lines td { padding: 7px 4px; border-bottom: 1px solid var(--line-2); }
.lines td:first-child { font-weight: 600; }
.lines td.how { color: var(--ink-3); font-size: 12px; }
.lines tr.tot td { font-weight: 750; border-top: 2px solid var(--ink); border-bottom: 0; font-size: 14px; }
.lines tr.subt td { font-weight: 700; background: var(--head); }

/* wizard */
.steps { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.steps button { border: 1px solid var(--rule-2); background: #fff; border-radius: var(--r-sm); padding: 6px 12px 6px 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.steps button b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--line-2); font-size: 11px; }
.steps button.on { border-color: var(--brand); color: var(--brand); }
.steps button.on b, .steps button.done b { background: var(--brand); color: #fff; }
.headline { font-family: var(--display); font-size: 34px; font-weight: 700; line-height: 1.12; }
.headline em { font-style: normal; color: var(--crit-ink); }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.note { background: var(--warn-bg); border: 1px solid #ecd9a6; color: var(--warn-ink); border-radius: var(--r-sm); padding: 9px 12px; font-size: 12.5px; }
.note.info { background: #edf3fa; border-color: #cfdcee; color: #1f3f66; }
.wiz-nav { display: flex; justify-content: space-between; margin-top: 18px; gap: 10px; }

/* import */
.drop { border: 2px dashed var(--rule-2); border-radius: var(--r); padding: 34px 20px; text-align: center; background: #fff; cursor: pointer; transition: border-color 150ms var(--ease), background-color 150ms var(--ease); }
.drop:hover { border-color: var(--rule); }
.drop.over { border-color: var(--brand); background: var(--good-bg); }
.drop h3 { font-size: 16px; margin-bottom: 4px; }
.map-row { display: grid; grid-template-columns: 170px 1fr 1.4fr; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.map-row .ex { color: var(--ink-3); font-family: var(--mono); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-row.missing select { border-color: var(--crit); }
.req { color: var(--crit); }

/* what-if */
.wi-out { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wi-big { font-family: var(--display); font-size: 43px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.delta-up { color: var(--good-ink); } .delta-down { color: var(--crit-ink); }
.slider-row { display: grid; grid-template-columns: 1fr 70px; gap: 10px; align-items: center; }
.slider-row output { font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; }
.drop-list { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.drop-list label { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line-2); align-items: center; cursor: pointer; font-size: 13px; }

/* pricing */
.price-big { font-family: var(--display); font-size: 54px; font-weight: 700; line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; }

/* flagged cards */
.flags { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 24px; }
.flagcard { border-top: 1px solid var(--line); padding: 14px 8px 16px; margin: 0 -8px; cursor: pointer; border-radius: var(--r-xs); transition: background-color 150ms var(--ease); }
.flagcard:hover { background: var(--crit-bg); }
.flagcard .nm { font-weight: 700; }
.flagcard .fig { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; }
.flagcard .fix { margin-top: 8px; font-size: 13px; }
.flagcard .fix b:first-child { color: var(--brand); }

/* report */
.report { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 32px 36px; max-width: 860px; margin: 0 auto; }
.report h1 { font-size: 22px; }
.report .rk { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.report .rk div { border-top: 3px solid var(--brand); padding: 8px 2px 4px; }
.report .rk b { display: block; font-family: var(--display); font-size: 27.5px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.report .rk span { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.report table.t { font-size: 12px; }
.report table.t th { position: static; }
.report h3 { margin: 16px 0 6px; }

/* responsive */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .g-side, .g-side-l, .g-labor { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .top { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .brand span { display: none; }
  .source { order: 3; flex-basis: 100%; }
  .top-actions { margin-left: auto; }
  .top-actions #btn-sample, .top-actions #btn-reset { display: none; }
  .bvr .big { font-size: 34px; }
  .kpi .v { font-size: 27.5px; }
  h1 { font-size: 22px; }
  .tabs { top: 0; position: sticky; padding: 0 8px; }
  main { padding: 14px 12px 30px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px; }
  .kpi .v { font-size: 21px; }
  .kpi.hero { grid-column: 1 / -1; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .card { padding: 14px; }
  .bvr { grid-template-columns: 1fr; }
  .bvr .vs { display: none; }
  .hide-sm { display: none !important; }
  .tw { max-height: 70vh; }
  table.t td.name { max-width: 150px; }
  .map-row { grid-template-columns: 1fr; gap: 4px; }
  .wi-out { grid-template-columns: 1fr; }
  .modal { padding: 0; place-items: end stretch; }
  .modal-card { border-radius: 10px 10px 0 0; max-height: 92vh; }
  .report { padding: 18px; }
  .report .rk { grid-template-columns: 1fr 1fr; }
  .headline { font-size: 27.5px; }
}

/* print: only the monthly report */
@media print {
  @page { size: letter; margin: 0.45in; }
  body { background: #fff; font-size: 11px; }
  .top, .tabs, .foot, .no-print, #toast, #tip, #modal { display: none !important; }
  main { padding: 0; max-width: none; }
  .report { border: 0; padding: 0; max-width: none; }
  .report .rk b { font-size: 16px; }
  table.t td, table.t th { padding: 4px 6px; }
  .tw { max-height: none; overflow: visible; border: 0; }
  .chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.seg button { white-space: nowrap; }
@media (max-width: 760px) {
  .page-h p { font-size: 13px; }
  .page-h .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
}
table.t th.n { text-align: right; }

/* guided demo */
.top .btn.tour-btn { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.top .btn.tour-btn:hover { background: #ffd43d; border-color: #ffd43d; }
.tour-hl { position: relative; z-index: 26; outline: 3px solid var(--accent); outline-offset: 4px; box-shadow: 0 0 0 9999px rgba(16, 32, 26, .2); border-radius: var(--r); }
#modal-card.tour-hl { box-shadow: var(--sh-modal); }
.tour-card { position: fixed; z-index: 85; right: 24px; bottom: 24px; width: min(380px, calc(100vw - 32px)); background: #fff; color: var(--ink); border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--sh-modal); padding: 16px 18px 14px; animation: tour-in 200ms var(--ease); }
.tour-card h3 { margin: 4px 0 6px; font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.15; }
.tour-card p { margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.tour-step { font-size: 12.5px; color: var(--ink-3); font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes tour-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.foot svg { vertical-align: -2px; margin-right: 4px; }
.tour-nav { display: flex; gap: 8px; align-items: center; }
.tour-sp { flex: 1; }
@media (max-width: 760px) {
  .tour-card { left: 8px; right: 8px; bottom: 8px; width: auto; padding: 12px 14px; }
  .tour-card h3 { font-size: 15px; }
  .tour-card p { font-size: 13px; margin-bottom: 10px; }
  .tour-hl { outline-offset: 2px; }
}
@media print { .tour-card { display: none !important; } }
@media (max-width: 760px) {
  .card .seg { display: flex; max-width: 100%; }
  .card .seg button { flex: 1 1 auto; white-space: normal; padding: 6px 8px; font-size: 13px; line-height: 1.2; }
  .report { overflow-x: auto; }
  .report table.t { font-size: 11px; }
  .report table.t td, .report table.t th { padding: 6px 5px; }
}
.grid > * { min-width: 0; }

/* 768-1100: header source drops to its own row; KPIs 3-up with the hero leading */
@media (max-width: 1100px) and (min-width: 761px) {
  .top { flex-wrap: wrap; row-gap: 6px; }
  .brand span { display: none; }
  .source { order: 3; flex-basis: 100%; }
  .top-actions { margin-left: auto; }
  .tabs { top: 0; position: sticky; }
  .kpi.hero { grid-column: span 2; order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* below 1100 the header scrolls away and the tab bar stays pinned at the top */
@media (max-width: 1100px) { .top { position: relative; } }
