
  :root {
    --ink: #1d2733; --muted: #5b6776; --line: #dfe4ea; --bg: #f5f7fa; --card: #fff;
    --brand: #0b5cad; --brand-soft: #e6f0fb; --good: #1f8a4c; --warn: #b26a00; --bad: #b3261e;
    --radius: 10px;
  }
  * { box-sizing: border-box; }
  body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
  h1 { font-size: 1.35rem; margin: 0; }
  h2 { font-size: 1.2rem; margin: 0; }
  h3 { font-size: 1rem; margin: 0 0 .25rem; }
  a { color: var(--brand); }
  .topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.2rem; background: var(--card); border-bottom: 1px solid var(--line); }
  .subtitle { margin: .15rem 0 0; color: var(--muted); font-size: .9rem; }
  .tabs { display: flex; gap: .25rem; overflow-x: auto; padding: .4rem 1rem 0; background: var(--card); border-bottom: 1px solid var(--line); }
  .tab { border: 0; background: none; padding: .65rem .9rem; font: inherit; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
  .tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
  .filters { padding: .8rem 1.2rem; background: var(--card); border-bottom: 1px solid var(--line); }
  .filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; }
  .filter-grid label, .filter-options label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); gap: .2rem; }
  .filter-options { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; margin-top: .6rem; }
  .filter-options .switch { flex-direction: row; align-items: center; font-size: .9rem; color: var(--ink); }
  select, input[type=search] { font: inherit; padding: .45rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; min-width: 0; width: 100%; }
  .filter-summary { margin: .5rem 0 0; font-size: .85rem; color: var(--muted); }
  main { padding: 1rem 1.2rem 2rem; max-width: 1300px; margin: 0 auto; }
  .view-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .8rem; }
  .hint { color: var(--muted); font-size: .85rem; margin: .1rem 0 .5rem; }
  .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
  .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
  .card .label { color: var(--muted); font-size: .82rem; }
  .card .value { font-size: 1.6rem; font-weight: 700; margin: .1rem 0; }
  .card .note { color: var(--muted); font-size: .78rem; }
  .card.accent { border-left: 4px solid var(--brand); }
  .panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
  .chart-box svg { width: 100%; height: auto; display: block; }
  .chart .grid { stroke: #eef1f4; } .chart .tick { font-size: 11px; fill: var(--muted); } .chart .title { font-size: 13px; font-weight: 600; fill: var(--ink); }
  .chart .line { stroke: var(--brand); stroke-width: 2.2; } .chart .dot { fill: var(--brand); }
  .chart .bar { fill: var(--brand); } .chart .bar.neg { fill: var(--bad); } .chart .empty { fill: var(--muted); }
  .chart .line.alt { stroke: var(--warn); } .chart .dot.alt, .chart .swatch.alt { fill: var(--warn); } .chart .legend { font-size: 11px; fill: var(--ink); }
  .chart .slice { stroke: #fff; stroke-width: 1; }
  .chart .vlabels { pointer-events: none; } .chart .vlabel { font-size: 10px; fill: var(--ink); font-weight: 600; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
  .chart .vlabel.alt { fill: #7a4a00; } .chart .vlabel.on-slice { fill: #fff; stroke: rgba(0,0,0,.45); stroke-width: 2.5px; } .chart .vlabel.in-bar { fill: #fff; stroke: rgba(0,0,0,.4); stroke-width: 2px; }
  .chart-box.values-off .vlabels { display: none; }
  .chart .hit { fill: transparent; cursor: crosshair; outline: none; } .chart .hit.active, .chart .hit:focus { fill: rgba(11,92,173,.10); }
  .chart .hit:focus-visible { stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 3 2; }
  .chart .slice[data-tip-title] { cursor: pointer; outline: none; } .chart .slice.active, .chart .slice:focus { stroke: var(--ink); stroke-width: 2.5; }
  .values-toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); margin: 0 0 4px; cursor: pointer; }
  #chart-tip { position: fixed; z-index: 1000; pointer-events: none; background: #1d2530; color: #fff; font-size: 12px; line-height: 1.4; padding: 6px 9px; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.25); max-width: min(320px, calc(100vw - 16px)); }
  #chart-tip strong { display: block; font-weight: 600; margin-bottom: 2px; overflow-wrap: anywhere; }
  @media print { #chart-tip, .values-toggle, .drill-hint, dialog.drill { display: none !important; } }
  .chart .s0 { fill: #0b5cad; } .chart .s1 { fill: #1f8a4c; } .chart .s2 { fill: #b26a00; } .chart .s3 { fill: #b3261e; } .chart .s4 { fill: #6a4fb3; }
  .chart .s5 { fill: #0f8a8a; } .chart .s6 { fill: #c2185b; } .chart .s7 { fill: #5b6776; } .chart .s8 { fill: #8a6d1f; } .chart .s9 { fill: #4a90d9; }
  .caption { color: var(--muted); font-size: .78rem; margin: .4rem 0 0; font-style: italic; }
  input[type=date] { font: inherit; padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
  .day-mode { border: 0; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.day-mode legend { font-weight: 600; font-size: 13px; padding: 0; margin-right: 8px; float: left; }
.day-mode .mode-option { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.day-mode .hint { flex-basis: 100%; margin: 0; }
.daily-filters .filter-options { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .5rem; }
  .btn { font: inherit; padding: .45rem .8rem; border-radius: 6px; border: 1px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; }
  .btn.ghost { background: #fff; color: var(--brand); }
  .btn.small { padding: .25rem .55rem; font-size: .82rem; }
  .btn.link { border: 0; background: none; color: var(--brand); padding: .45rem 0; text-decoration: underline; }
  .btn[disabled] { opacity: .5; cursor: default; }
  .table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; }
  .table-tools { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; align-items: center; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
  .table-tools h3 { margin: 0; }
  .table-tools .tools { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
  .table-tools input[type=search] { width: 220px; }
  .scroll { overflow-x: auto; }
  table { border-collapse: collapse; width: 100%; font-size: .9rem; }
  th, td { padding: .5rem .6rem; border-bottom: 1px solid #eef1f4; text-align: left; vertical-align: middle; }
  th { background: #fafbfc; font-weight: 600; white-space: nowrap; }
  th.sortable { cursor: pointer; user-select: none; }
  th .orig { display: block; font-weight: 400; color: var(--muted); font-size: .72rem; }
  th[aria-sort=ascending]::after { content: " ▲"; font-size: .7rem; } th[aria-sort=descending]::after { content: " ▼"; font-size: .7rem; }
  td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
  tr.clickable { cursor: pointer; } tr.clickable:hover { background: var(--brand-soft); }
  .progress { display: flex; align-items: center; gap: .5rem; min-width: 140px; }
  .progress .bar { flex: 1; height: 8px; background: #edf0f3; border-radius: 4px; overflow: hidden; }
  .progress .bar span { display: block; height: 100%; background: var(--good); }
  .progress.low .bar span { background: var(--bad); } .progress.mid .bar span { background: var(--warn); }
  .progress .pct { width: 3.6rem; text-align: right; font-variant-numeric: tabular-nums; }
  .table-foot { padding: .5rem .8rem; color: var(--muted); font-size: .8rem; }
  .two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 1rem; }
  .notice { background: #fff8e6; border: 1px solid #f3d48b; padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
  .notice.error { background: #fdecea; border-color: #f2b8b5; }
  .notice.stale { background: #e8f0fe; border-color: #aecbfa; }
  .loading { padding: 2rem; text-align: center; color: var(--muted); }
  .quality-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: .7rem; }
  .quality-item .count { float: right; font-weight: 700; font-size: 1.2rem; }
  .quality-item.ok .count { color: var(--good); } .quality-item.issue .count { color: var(--warn); }
  .quality-item ul { margin: .4rem 0 0; padding-left: 1.2rem; color: var(--muted); font-size: .85rem; }
  .pill { display: inline-block; padding: .05rem .45rem; border-radius: 99px; background: #edf0f3; font-size: .75rem; color: var(--muted); }
  .footer { padding: 1rem 1.2rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); background: var(--card); }
  /* Chart drill-downs: marks that open details look clickable; the details open in a dialog. */
  .chart-box[data-drill] svg.chart [data-i][data-tip-title] { cursor: pointer; }
  .drill-hint { margin: .3rem 0 0; }
  #chart-tip .tip-hint { margin-top: .25rem; font-style: italic; opacity: .85; }
  dialog.drill { width: min(1100px, 94vw); max-height: 88vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; background: var(--card, #fff); }
  dialog.drill::backdrop { background: rgba(20, 24, 31, .45); }
  .drill-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; position: sticky; top: -1rem; background: inherit; padding: .2rem 0 .5rem; z-index: 1; }
  .drill-head h2 { margin: 0; font-size: 1.2rem; }
  .drill-people { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .6rem; }
  .drill-option { display: inline-flex; gap: .4rem; align-items: center; margin: .3rem 0 .6rem; }
  .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
  .toast { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 10; max-width: 90vw; }
  .preset-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: .7rem; }
  .preset-row label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); gap: .2rem; }
  /* The hidden attribute always wins over a display rule below (tabs, filters, banner). */
  [hidden] { display: none !important; }
  /* ---------- desktop defaults for the mobile-only parts ---------- */
  .tab .ico, .tab-short, .tab-more, .filters-toggle, .daily-filters-toggle, .filters-done, .table-tools .sort-mobile, .row-more { display: none; }
  .filters { display: flex; flex-direction: column; }
  .filters-bar { order: 2; }
  .two-col { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
  .offline-banner { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; padding: .55rem 1.2rem; font-size: .9rem; background: #e8f0fe; color: #17345f; border-bottom: 1px solid #aecbfa; }
  .offline-banner[hidden] { display: none; }
  .offline-banner.offline { background: #fff4ce; color: #5c4400; border-bottom-color: #e0c560; }
  .offline-banner .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: gwo-spin .9s linear infinite; vertical-align: -2px; margin-right: .35rem; }
  @keyframes gwo-spin { to { transform: rotate(360deg); } }
  @media (prefers-reduced-motion: reduce) { .offline-banner .spin { animation: none; } }
  .offline-banner .detail { color: inherit; opacity: .85; font-size: .82rem; flex-basis: 100%; margin: 0; }
  .saved-data { margin-top: .8rem; padding-top: .6rem; border-top: 1px solid var(--line); }
  .saved-title { font-size: .95rem; margin: 0 0 .2rem; color: var(--ink); }
  .saved-data p { margin: .2rem 0; }
  .btn-wrap { display: inline-block; }
  .footer-links { margin: 0; }
  dialog.sheet .sheet-head, dialog.drill .drill-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
  dialog#more-sheet { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; width: min(420px, 94vw); }
  dialog#more-sheet::backdrop { background: rgba(20, 24, 31, .45); }
  .more-list { display: grid; gap: .4rem; margin-top: .6rem; }
  .more-item { display: flex; align-items: center; gap: .8rem; width: 100%; min-height: 48px; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
  .more-item .ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
  .more-item.active { border-color: var(--brand); color: var(--brand); font-weight: 600; background: var(--brand-soft); }
  td.cell-lead { font-weight: 600; }

  /* ---------- phones (and small tablets in portrait) ---------- */
  @media (max-width: 720px) {
    html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
    body { font-size: 16px; padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
    .topbar { flex-direction: row; align-items: center; gap: .6rem; padding: calc(.55rem + env(safe-area-inset-top, 0px)) calc(.9rem + env(safe-area-inset-right, 0px)) .55rem calc(.9rem + env(safe-area-inset-left, 0px)); }
    .brand { min-width: 0; flex: 1; }
    h1 { font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
    .subtitle { font-size: .8rem; }
    .subtitle .tagline { display: none; }
    .topbar-actions .btn { min-height: 44px; white-space: nowrap; }
    .offline-banner { padding: .5rem .9rem; font-size: .88rem; }
    main { padding: .8rem calc(.75rem + env(safe-area-inset-right, 0px)) 1.5rem calc(.75rem + env(safe-area-inset-left, 0px)); }
    h2 { font-size: 1.1rem; }

    /* Bottom tab bar: the first views in the bar, the rest behind "More". */
    .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 0; overflow: visible; padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); border-top: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
    .tab { flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 2px; border-bottom: 0; border-top: 3px solid transparent; font-size: .72rem; line-height: 1.1; white-space: normal; text-align: center; }
    .tab.active { border-bottom: 0; border-top-color: var(--brand); }
    .tab .ico { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
    .tab-long { display: none; }
    .tab-short { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tab-more { display: flex; }
    .tab-more[hidden] { display: none; }
    .tab.in-more { display: none; }
    .tab-more.active { color: var(--brand); border-top-color: var(--brand); font-weight: 600; }

    /* Filters: a summary line with a button; the controls open in place. */
    .filters { padding: .5rem .9rem; }
    .filters-bar { order: 0; display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
    .filters-bar .filter-summary { margin: 0; flex: 1; min-width: 0; font-size: .85rem; }
    .filters-toggle { display: inline-flex; align-items: center; min-height: 44px; flex: 0 0 auto; }
    .filters-toggle[aria-expanded="true"] { background: var(--brand-soft); }
    .filters.collapsed .filters-body { display: none; }
    .filters-body { padding-top: .5rem; }
    .filter-grid { grid-template-columns: 1fr 1fr; }
    .filter-options { gap: .5rem 1rem; }
    .filter-options label:not(.switch) { flex: 1 1 100%; }
    .filters-done { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; min-width: 88px; }

    select, input[type=search], input[type=date] { font-size: 16px; min-height: 44px; }
    .btn { min-height: 44px; }
    .btn.small { min-height: 44px; padding: .4rem .7rem; font-size: .9rem; }
    .btn.link { min-height: 44px; padding: .4rem .2rem; }
    .switch, .drill-option, .values-toggle, .mode-option { min-height: 44px; }
    .values-toggle { font-size: .85rem; }
    .switch input, .drill-option input, .values-toggle input, .mode-option input { width: 20px; height: 20px; }

    /* Summary cards: two per row. */
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
    .card { padding: .65rem .75rem; min-width: 0; }
    .card .label { font-size: .78rem; }
    .card .value { font-size: 1.3rem; overflow-wrap: anywhere; }
    .card .note { font-size: .74rem; overflow-wrap: anywhere; }
    .panel { padding: .8rem; }
    .view-head .actions { width: 100%; }

    /* Tables become cards: the first fields show, the rest open with "Details". */
    .table-tools { padding: .6rem .75rem; }
    .table-tools h3 { flex: 1 1 100%; font-size: .98rem; }
    .table-tools .tools { width: 100%; }
    .table-tools input[type=search] { flex: 1 1 100%; width: 100%; }
    .table-tools .sort-mobile { display: flex; flex: 1 1 100%; gap: .4rem; align-items: center; font-size: .85rem; color: var(--muted); }
    .table-tools .sort-mobile select { flex: 1; }
    .table-wrap .scroll { overflow: visible; }
    .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
    .table-wrap thead { display: none; }
    .table-wrap tr { position: relative; padding: .55rem .75rem; border-bottom: 1px solid var(--line); }
    .table-wrap tr.has-more { padding-right: 3.6rem; }
    .table-wrap td { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .12rem 0; border: 0; text-align: right; overflow-wrap: anywhere; min-width: 0; }
    .table-wrap td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; text-align: left; flex: 0 1 45%; font-weight: 400; }
    .table-wrap td.cell-lead { display: block; text-align: left; font-size: 1rem; padding-bottom: .2rem; }
    .table-wrap td.cell-lead::before { content: none; }
    .table-wrap td.num { text-align: right; }
    .table-wrap td.cell-detail { display: none; }
    .table-wrap tr.open td.cell-detail { display: flex; }
    .table-wrap td[colspan] { display: block; text-align: left; }
    .table-wrap td[colspan]::before { content: none; }
    .table-wrap td .progress { min-width: 0; flex: 1 1 55%; }
    .row-more { display: inline-flex; position: absolute; top: .3rem; right: .3rem; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--brand); font: inherit; font-size: 1.1rem; cursor: pointer; }
    .row-more[aria-expanded="true"] { background: var(--brand-soft); }
    .row-more::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
    .row-more[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
    tr.clickable:hover { background: none; }
    tr.clickable:active { background: var(--brand-soft); }

    /* Charts use the full width; the SVG is drawn at the screen width (see app.js chartWidth). */
    .panel .chart-box { margin: 0 -.3rem; }
    .chart .tick { font-size: 11px; }

    .two-col { grid-template-columns: 1fr; gap: 0; }
    .preset-row label { flex: 1 1 100%; }
    .day-mode .mode-option { font-size: 15px; }
    .daily-filters .filter-grid { grid-template-columns: 1fr 1fr; }
    .daily-filters { display: flex; flex-direction: column; }
    .daily-filters #daily-summary { order: -2; margin: 0; }
    .daily-filters .daily-filters-toggle { order: -1; display: inline-flex; align-items: center; align-self: flex-start; margin: .4rem 0; }
    .daily-filters.collapsed .daily-filters-body { display: none; }
    .daily-filters .filter-options .btn.small { flex: 1 1 auto; }
    .quality-item { padding: .7rem .8rem; }

    .footer { padding: 1rem calc(.9rem + env(safe-area-inset-right, 0px)) 1rem calc(.9rem + env(safe-area-inset-left, 0px)); }
    .toast { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); width: calc(100vw - 24px); max-width: 520px; }

    /* Sheets (drill-down, "More"): full-screen, sliding up from the bottom, close button always in reach. */
    dialog.sheet, dialog#more-sheet { position: fixed; inset: auto 0 0 0; width: 100vw; max-width: 100vw; margin: 0; border: 0; border-radius: 14px 14px 0 0; box-shadow: 0 -6px 24px rgba(0,0,0,.2); animation: gwo-sheet-up .2s ease-out; }
    dialog.drill { height: 100dvh; max-height: 100dvh; border-radius: 0; padding: 0 calc(.9rem + env(safe-area-inset-right, 0px)) calc(1rem + env(safe-area-inset-bottom, 0px)) calc(.9rem + env(safe-area-inset-left, 0px)); }
    dialog#more-sheet { max-height: 85dvh; overflow: auto; padding: .8rem calc(.9rem + env(safe-area-inset-right, 0px)) calc(1rem + env(safe-area-inset-bottom, 0px)) calc(.9rem + env(safe-area-inset-left, 0px)); }
    dialog.drill .drill-head { position: sticky; top: 0; margin: 0 -.9rem; padding: calc(.5rem + env(safe-area-inset-top, 0px)) .9rem .5rem; background: var(--card); border-bottom: 1px solid var(--line); z-index: 2; }
    dialog.drill .drill-head h2 { font-size: 1.05rem; overflow-wrap: anywhere; }
    dialog.drill .drill-head .btn { min-width: 76px; }
    dialog.drill #drill-body { padding-top: .6rem; }
    dialog.drill .table-wrap { margin-left: -.2rem; margin-right: -.2rem; }
  }
  @keyframes gwo-sheet-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
  @media (prefers-reduced-motion: reduce) { dialog.sheet, dialog#more-sheet { animation: none !important; } }
  @media (max-width: 380px) {
    .filter-grid, .daily-filters .filter-grid { grid-template-columns: 1fr; }
    .card .value { font-size: 1.15rem; }
  }
  /* Tablets: the tab strip stays on top; tables keep their columns and scroll inside the panel. */
  @media (min-width: 721px) and (max-width: 1024px) {
    main { padding: 1rem; }
    .tab { padding: .7rem .75rem; min-height: 44px; }
    .btn { min-height: 40px; }
  }
  @media print {
    .tabs, .offline-banner, .saved-data, .filters .filter-options, .filters-toggle, .topbar-actions, .actions, .table-tools .tools, .footer, .toast, #filters .filter-grid { display: none !important; }
    body { background: #fff; } .panel, .card { break-inside: avoid; }
    .view:not([data-view=overview]) { display: none !important; }
    #view-overview { display: block !important; }
  }


/* Installable app only (appended to the shared styles by scripts/build-pwa.js). */
.pwa-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .55rem 1.2rem; background: var(--brand-soft); color: var(--ink); border-bottom: 1px solid var(--line); font-size: .92rem; }
.pwa-bar.update { background: #e8f5ec; color: var(--good); }
@media (max-width: 720px) {
  .pwa-bar { padding: .5rem calc(.9rem + env(safe-area-inset-left, 0px)); }
}
@media print { .pwa-bar { display: none !important; } }
.pwa-bar.auth { background: #fff4e0; color: var(--ink); }
/* Signed out: only the sign-in card (no dashboard skeleton behind it). */
.gwo-signed-out body > :not(#signin) { display: none !important; }
.signin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: var(--bg, #f5f7fa); }
.signin-card { max-width: 26rem; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.6rem; box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.signin-card h1 { font-size: 1.25rem; margin: 0 0 .6rem; }
.signin-message { color: var(--bad, #b42318); font-size: .92rem; }
