/* Tiny Treasure ops app: one stylesheet for the counter and the owner screens. Built for a phone or a tablet held in
   one hand at a busy counter: big targets, high contrast, one thing to do per screen. */

:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-2: #f0ebe3;
  --ink: #1f2421;
  --ink-2: #5b625e;
  --line: #ddd5c9;
  --brand: #1f6f5c;
  --brand-ink: #ffffff;
  --brand-soft: #dcefe8;
  --warn: #9a5b00;
  --warn-soft: #fdf0d8;
  --bad: #b3261e;
  --bad-soft: #fbe3e0;
  --good: #1e7a3c;
  --good-soft: #e1f3e6;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 4px 14px rgb(0 0 0 / 6%);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141716;
    --surface: #1d2120;
    --surface-2: #262b29;
    --ink: #eef1ef;
    --ink-2: #a9b1ad;
    --line: #353b39;
    --brand: #5cc3a5;
    --brand-ink: #0d1f1a;
    --brand-soft: #1e3a32;
    --warn: #f0b552;
    --warn-soft: #3a2d12;
    --bad: #ff8a80;
    --bad-soft: #3d1c1a;
    --good: #7fd69a;
    --good-soft: #17331f;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 0.75rem; }
small, .muted { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.bad-text { color: var(--bad); font-weight: 700; }
.right { text-align: right; }
.hidden { display: none !important; }

/* ---- layout */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar .title { font-weight: 700; white-space: nowrap; }
.topbar .pill { white-space: nowrap; }
.topbar .who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
@media (max-width: 560px) { .wide-only { display: none; } }
@media (max-width: 420px) { .topbar { gap: 0.5rem; padding: 0.5rem 0.75rem; } .topbar .title { font-size: 0.95rem; } .topbar .who { max-width: 28vw; } }
.topbar .spacer { flex: 1; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.narrow { max-width: 480px; margin: 0 auto; padding: 1.5rem 1rem; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 0.75rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.tabs {
  display: flex; gap: 0.25rem; overflow-x: auto; padding: 0.4rem 1rem;
  background: var(--surface); border-bottom: 1px solid var(--line); scrollbar-width: none;
}
.tabs button {
  border: 0; background: none; padding: 0.55rem 0.9rem; border-radius: 999px; font-weight: 600; color: var(--ink-2);
  white-space: nowrap; cursor: pointer;
}
.tabs button[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.badge {
  display: inline-block; min-width: 1.4em; padding: 0 0.4em; margin-left: 0.3em; border-radius: 999px;
  background: var(--bad); color: #fff; font-size: 0.8em; text-align: center;
}

/* ---- owner side menu: a drawer on phones, always open on wide screens */
.menu-button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 1.35rem; cursor: pointer; flex: none;
}
.menu-button .badge { position: absolute; top: -6px; right: -6px; margin: 0; }
.sidenav {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: min(82vw, 290px); display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line); box-shadow: var(--shadow); overflow-y: auto;
  overscroll-behavior: contain; transform: translateX(-105%); transition: transform 0.22s ease;
  padding: calc(0.75rem + env(safe-area-inset-top)) 0.75rem calc(0.75rem + env(safe-area-inset-bottom));
}
.sidenav-head { display: flex; align-items: center; gap: 0.7rem; padding: 0.4rem 0.4rem 0.9rem; border-bottom: 1px solid var(--line); margin-bottom: 0.5rem; }
.sidenav-head img { border-radius: 9px; }
.sidenav ul { list-style: none; margin: 0; padding: 0; flex: 1; }
.sidenav li button {
  width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.6rem 0.9rem; margin: 0.15rem 0; border: 0; border-radius: 12px; background: none; font-size: 1.05rem;
  font-weight: 600; text-align: left; cursor: pointer; color: var(--ink);
}
.sidenav li button:hover { background: var(--surface-2); }
.sidenav li button[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.sidenav-out { margin-top: 0.75rem; border-top: 1px solid var(--line); border-radius: 0; }
.scrim { position: fixed; inset: 0; z-index: 35; background: rgb(0 0 0 / 40%); opacity: 0; pointer-events: none; transition: opacity 0.22s ease; }
body.menu-open .sidenav { transform: none; }
body.menu-open .scrim { opacity: 1; pointer-events: auto; }
body.menu-open { overflow: hidden; }
@media (min-width: 900px) {
  .sidenav { transform: none; box-shadow: none; padding-top: 1rem; }
  .scrim, .menu-button { display: none; }
  .owner-bar, .with-sidenav { margin-left: 290px; }
  body.menu-open { overflow: auto; }
}
@media (prefers-reduced-motion: reduce) { .sidenav, .scrim { transition: none; } }

/* ---- cards and lists */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.card.warn { border-color: var(--warn); background: var(--warn-soft); }
.card.bad { border-color: var(--bad); background: var(--bad-soft); }
.card.good { border-color: var(--good); background: var(--good-soft); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list button.item {
  width: 100%; display: flex; justify-content: space-between; gap: 1rem; text-align: left;
  background: none; border: 0; padding: 0; cursor: pointer;
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.45rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.85rem; color: var(--ink-2); font-weight: 600; }
td.num, th.num { text-align: right; }
.table-scroll { overflow-x: auto; }

.pill { display: inline-block; padding: 0.1rem 0.6rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; background: var(--surface-2); }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }

.big-number { font-size: 2.4rem; font-weight: 800; letter-spacing: 0.02em; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem; }
.kpi .label { font-size: 0.85rem; color: var(--ink-2); }
.kpi .value { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 48px; padding: 0.6rem 1.1rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: none; border-color: transparent; }
.btn.small { min-height: 36px; padding: 0.3rem 0.8rem; font-size: 0.95rem; }
.btn.block { width: 100%; }
.btn.huge { min-height: 64px; font-size: 1.2rem; }

label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.field { margin-bottom: 0.9rem; }
.field .hint { font-weight: 400; font-size: 0.9rem; color: var(--ink-2); }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], input[type="date"], input[type="search"],
input[type="password"], select, textarea {
  width: 100%; min-height: 48px; padding: 0.55rem 0.75rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface);
}
textarea { min-height: 84px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--brand); outline-offset: 2px;
}
.check { display: flex; align-items: center; gap: 0.6rem; font-weight: 500; margin: 0.3rem 0; }
.check input { width: 22px; height: 22px; }
.segmented { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.segmented button { flex: 1 1 0; min-width: 110px; }
.segmented button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

/* ---- counter: people and PIN */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; }
.people button { min-height: 88px; font-size: 1.1rem; }
.pin-dots { display: flex; justify-content: center; gap: 0.8rem; margin: 1rem 0 1.25rem; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink-2); }
.pin-dots span.on { background: var(--ink); border-color: var(--ink); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; max-width: 320px; margin: 0 auto; }
.keypad button { min-height: 64px; font-size: 1.5rem; font-weight: 700; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }

/* ---- counter: selling */
/* minmax(0, …) stops the scrolling chip row from stretching the column past the screen. */
.sell { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.sell > * { min-width: 0; }
@media (min-width: 900px) { .sell { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .cart { position: sticky; top: 7.5rem; } }
.chips { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: none; }
.chips button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 0.45rem 0.9rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.6rem; }
.items button {
  min-height: 84px; text-align: left; padding: 0.6rem 0.75rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; display: flex; flex-direction: column; justify-content: space-between;
}
.items button .price { font-weight: 700; font-variant-numeric: tabular-nums; }
.items button.in-cart { border-color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 0.75rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.qty { display: flex; align-items: center; gap: 0.4rem; }
.qty button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 1.2rem; cursor: pointer; }
.cart-bar {
  position: sticky; bottom: 0; z-index: 5; padding: 0.75rem 1rem; background: var(--surface); border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .cart-bar { display: none; } }

/* ---- receipt */
.receipt { max-width: 380px; margin: 0 auto; font-variant-numeric: tabular-nums; }
.receipt .head { text-align: center; border-bottom: 1px dashed var(--line); padding-bottom: 0.6rem; margin-bottom: 0.6rem; }
.receipt .line { display: flex; justify-content: space-between; gap: 1rem; padding: 0.2rem 0; }
.receipt .total { font-weight: 800; font-size: 1.15rem; border-top: 1px dashed var(--line); margin-top: 0.4rem; padding-top: 0.4rem; }
.stamp { display: inline-block; border: 3px solid var(--bad); color: var(--bad); padding: 0.1rem 0.6rem; font-weight: 800; transform: rotate(-4deg); }

/* ---- cash count */
.notes { display: grid; grid-template-columns: auto 1fr auto; gap: 0.5rem 0.75rem; align-items: center; }
.notes input { text-align: center; }
.notes .amount { min-width: 6.5rem; text-align: right; font-variant-numeric: tabular-nums; }

/* ---- sheets, toasts */
.sheet-backdrop { position: fixed; inset: 0; background: rgb(0 0 0 / 40%); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 700px) { .sheet-backdrop { align-items: center; } }
.sheet {
  background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  border-radius: 18px 18px 0 0; padding: 1.25rem 1rem calc(1rem + env(safe-area-inset-bottom));
}
@media (min-width: 700px) { .sheet { border-radius: 18px; } }
.sheet .sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.toast {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 60; max-width: calc(100% - 2rem);
  background: var(--ink); color: var(--bg); padding: 0.75rem 1rem; border-radius: 12px; box-shadow: var(--shadow);
}
.toast.bad { background: var(--bad); color: #fff; }
.code-box { font-size: 2rem; font-weight: 800; letter-spacing: 0.15em; text-align: center; padding: 1rem; border: 2px dashed var(--brand); border-radius: 12px; font-family: ui-monospace, Consolas, monospace; }
.checks li { display: flex; gap: 0.6rem; align-items: flex-start; }
.checks .mark { width: 1.5rem; flex: none; text-align: center; font-weight: 800; }
.mark.ok { color: var(--good); } .mark.no { color: var(--bad); } .mark.maybe { color: var(--warn); }
pre.message { white-space: pre-wrap; background: var(--surface-2); padding: 0.75rem; border-radius: 10px; font: inherit; font-size: 0.95rem; margin: 0; }
.offline { background: var(--bad); color: #fff; text-align: center; padding: 0.4rem; font-weight: 600; }

@media print {
  body { background: #fff; color: #000; font-size: 12px; }
  .topbar, .tabs, .sidenav, .scrim, .no-print, .cart-bar, .toast { display: none !important; }
  .owner-bar, .with-sidenav { margin-left: 0 !important; }
  .sheet-backdrop { position: static; background: none; display: block; }
  .sheet { max-height: none; box-shadow: none; padding: 0; }
  .card { border: 0; box-shadow: none; padding: 0; }
}

/* ---- icons, picture tabs and help */
.ico { width: 1.35em; height: 1.35em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.25em; }
.ico.big { width: 2.2rem; height: 2.2rem; }
.btn .ico { margin-right: 0.1rem; }
.tabs.pics { justify-content: space-around; padding: 0.25rem 0.5rem; }
.tabs.pics button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.15rem; padding: 0.45rem 0.25rem; border-radius: 12px; font-size: 0.9rem; }
.tabs.pics button .ico { width: 1.7rem; height: 1.7rem; }
.items button .pic { font-size: 1.5rem; line-height: 1; }
.chips button .pic { margin-right: 0.3rem; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; flex: none; color: var(--ink); }
.icon-button .ico { width: 1.5rem; height: 1.5rem; }
.pay-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.pay-choice button { min-height: 76px; flex-direction: column; gap: 0.25rem; font-size: 1.05rem; }
.pay-choice button .ico { width: 1.8rem; height: 1.8rem; }
.pay-choice button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.title-row { display: flex; align-items: center; gap: 0.6rem; }
.title-row .ico { width: 2rem; height: 2rem; color: var(--brand); }
.help { display: grid; gap: 0.6rem; }
.help-topic { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.2rem 0.9rem; }
.help-topic summary { display: flex; align-items: center; gap: 0.75rem; min-height: 56px; font-weight: 700; font-size: 1.08rem; cursor: pointer; list-style: none; }
.help-topic summary::-webkit-details-marker { display: none; }
.help-topic summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; color: var(--ink-2); }
.help-topic[open] summary::after { content: "−"; }
.help-ico { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 1.3rem; flex: none; }
.help-ico .ico { width: 1.4rem; height: 1.4rem; }
.help-body { padding: 0 0 0.6rem 3.15rem; }
.help-body p { margin: 0 0 0.45rem; }
.sidenav li button .ico { color: var(--brand); width: 1.4rem; height: 1.4rem; }
.sidenav li button > span:first-of-type { display: inline-flex; align-items: center; gap: 0.75rem; }

/* ---- folding sections, price list, and feel (press feedback, quick drawer and sheet motion) */
:root { --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); }
details.fold > summary, details.price-group > summary {
  display: flex; align-items: center; gap: 0.6rem; min-height: 48px; cursor: pointer; list-style: none;
}
details.fold > summary::-webkit-details-marker, details.price-group > summary::-webkit-details-marker { display: none; }
details.fold > summary h3 { margin: 0; }
details.fold > summary::after, details.price-group > summary::after {
  content: ""; margin-left: auto; width: 0.6rem; height: 0.6rem; border-right: 2.5px solid var(--ink-2); border-bottom: 2.5px solid var(--ink-2);
  transform: rotate(45deg) translateY(-2px); transition: transform 180ms var(--ease-out); flex: none;
}
details[open].fold > summary::after, details[open].price-group > summary::after { transform: rotate(225deg) translateY(-2px); }
details.fold[open] > summary, details.price-group[open] > summary { margin-bottom: 0.4rem; }
details.price-group > summary { font-size: 1.1rem; }
details.price-group > summary .pic { font-size: 1.5rem; }
details.price-group > summary .pill { margin-left: 0.25rem; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.price-row .row { flex-wrap: nowrap; }
.search-box { display: flex; align-items: center; gap: 0.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 0.75rem; }
.search-box input { border: 0; min-height: 48px; padding-left: 0; background: transparent; }
.search-box input:focus-visible { outline: none; }
.search-box:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Buttons press in a little, so every tap feels answered. */
.btn, .icon-button, .menu-button, .items button, .chips button, .keypad button, .people button, .tabs button, .sidenav li button, .qty button {
  transition: transform 140ms var(--ease-out), background-color 140ms ease, border-color 140ms ease;
}
.btn:active, .icon-button:active, .menu-button:active, .items button:active, .chips button:active, .keypad button:active,
.tabs button:active, .sidenav li button:active, .qty button:active { transform: scale(0.97); }
@media (hover: none) { .sidenav li button:hover { background: none; } .sidenav li button[aria-current="page"]:hover { background: var(--brand-soft); } }

/* Side menu and sheets: quick, smooth slide (under 300 ms). */
.sidenav { transition: transform 260ms var(--ease-drawer); }
.scrim { transition: opacity 200ms ease; }
.sheet { transition: transform 240ms var(--ease-drawer), opacity 200ms ease; }
@starting-style { .sheet { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .btn:active, .icon-button:active, .menu-button:active, .items button:active, .chips button:active, .keypad button:active,
  .tabs button:active, .sidenav li button:active, .qty button:active { transform: none; }
  .sheet { transition: opacity 150ms ease; }
  @starting-style { .sheet { transform: none; } }
}
/* Messages appear at the top, so they never cover the main button at the bottom. */
.toast { top: calc(0.75rem + env(safe-area-inset-top)); bottom: auto; }

/* Prices: the type dropdown and search stay pinned under the top bar while the list scrolls. */
.price-picker {
  position: sticky; top: 61px; z-index: 6; display: grid; gap: 0.5rem; padding: 0.5rem 0;
  background: var(--bg); box-shadow: 0 6px 8px -8px rgb(0 0 0 / 25%);
}
.select-box select { min-height: 52px; font-size: 1.1rem; font-weight: 700; background: var(--surface); }
.select-box select:disabled { opacity: 0.5; }

/* ---- Money: chart colours checked with the dataviz validator (light and dark pass every check) */
:root { --c-income: #0b8a62; --c-spend: #c2571a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c-income: #1f9a72; --c-spend: #c9702e; } }
.c-income { fill: var(--c-income); background: var(--c-income); }
.c-spend { fill: var(--c-spend); background: var(--c-spend); }
.kpi.good { border-color: var(--good); background: var(--good-soft); }
.kpi.bad { border-color: var(--bad); background: var(--bad-soft); }
.legend { display: flex; gap: 0.9rem; font-size: 0.9rem; color: var(--ink-2); }
.legend .key { display: inline-flex; align-items: center; gap: 0.35rem; }
.legend .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.month-chart { width: 100%; height: auto; margin-top: 0.5rem; overflow: visible; }
.month-chart .grid { stroke: var(--line); stroke-width: 1; }
.month-chart .axis { fill: var(--ink-2); font-size: 13px; }
.month-chart path:hover { opacity: 0.8; }
.hbars { list-style: none; margin: 0.25rem 0 0; padding: 0; display: grid; gap: 0.65rem; }
.hbar { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.75rem; }
.hbar-label { display: flex; gap: 0.45rem; align-items: center; min-width: 0; }
.hbar-label span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-value { font-variant-numeric: tabular-nums; font-weight: 600; }
.hbar-track { grid-column: 1 / -1; height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 0 5px 5px 0; }
li.cancelled strong { text-decoration: line-through; color: var(--ink-2); }
.print-only-title { display: none; }
@media print {
  .print-only-title { display: block; }
  .month-chart path, .hbar-fill, .legend .sw { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  details.fold { display: block; }
  details.fold > *:not(summary) { display: block; }
}

/* How did they find us: big picture buttons, two per row on phones */
.found-us { border-color: var(--brand); }
.found-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.found-grid button { min-height: 54px; justify-content: flex-start; gap: 0.5rem; }
.found-grid button .pic { font-size: 1.35rem; }
.found-grid button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
