/* Yolt v11 — number formatting reference grid (Section 5b-D)
 * Visual only — JS module land Phase 3 у v11/core/format.js
 */

/* ═════ D.2 Number formatting reference ═════ */
.num-grid {
  display: grid;
  grid-template-columns: 140px 1fr 1fr 1fr 1fr;
  gap: 0;
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
}
.num-grid > div {
  padding: 8px var(--space-md);
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  font-family: ui-monospace, monospace; font-size: 12.5px;
  color: var(--ink-1);
  font-variant-numeric: tabular-nums;
}
.num-grid > div:nth-child(5n) { border-right: none; }
.num-grid > div.h {
  background: var(--bg-2); color: var(--ink-3);
  font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
  font-weight: 600;
}
.num-grid > div.k { color: var(--ink-2); font-family: 'Inter Tight', sans-serif; font-size: 12px; }
.num-grid > div .pos { color: var(--good); }
.num-grid > div .neg { color: var(--bad); }
.num-grid > div .muted { color: var(--ink-3); }

/* ═════ E · Mobile shell ═════ */
.mobile-stage {
  display: grid;
  grid-template-columns: 320px 320px;
  gap: var(--space-xl);
  justify-content: start;
}
.phone-frame {
  width: 320px; height: 640px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 48px color-mix(in oklch, oklch(0 0 0) 50%, transparent);
  display: flex; flex-direction: column;
}
.phone-status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px 4px;
  font-family: ui-monospace, monospace; font-size: 11px;
  color: var(--ink-1);
  background: var(--bg-1);
  height: 26px;
  flex: none;
}
.phone-status .signal { display: inline-flex; gap: 2px; align-items: end; }
.phone-status .signal i { width: 2px; background: var(--ink-1); border-radius: 1px; }
.phone-status .signal i:nth-child(1) { height: 4px; }
.phone-status .signal i:nth-child(2) { height: 6px; }
.phone-status .signal i:nth-child(3) { height: 8px; }
.phone-status .signal i:nth-child(4) { height: 10px; opacity: 0.4; }
.phone-status .battery { width: 18px; height: 9px; border: 1px solid var(--ink-1); border-radius: 2px; position: relative; padding: 1px; }
.phone-status .battery::after { content: ""; position: absolute; right: -3px; top: 2px; width: 2px; height: 4px; background: var(--ink-1); border-radius: 0 1px 1px 0; }
.phone-status .battery i { display: block; height: 100%; width: 70%; background: var(--ink-1); }

.phone-topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line-soft);
  flex: none;
}
.phone-topbar .ham {
  border: none; background: transparent;
  width: 28px; height: 28px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.phone-topbar .ham svg { width: 16px; height: 16px; stroke: var(--ink-1); fill: none; stroke-width: 1.5; }
.phone-topbar .title { flex: 1; font-size: 13px; font-weight: 600; color: var(--ink-0); }
.phone-topbar .icon-btn { border: none; background: transparent; color: var(--ink-2); width: 28px; height: 28px; padding: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.phone-topbar .icon-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; }

.phone-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex; flex-direction: column;
}

/* mobile-sidebar */
.mobile-sidebar {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 80%;
  background: var(--bg-1); border-right: 1px solid var(--line);
  z-index: 50;
  display: flex; flex-direction: column;
  animation: slide-l 200ms ease-out;
}
.mobile-sidebar-bd { position: absolute; inset: 0; background: color-mix(in oklch, oklch(0 0 0) 50%, transparent); z-index: 40; }
@keyframes slide-l { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.mobile-sidebar .nav-h {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--line-soft);
}
.mobile-sidebar .nav-h .logo {
  width: 24px; height: 24px;
  border-radius: 5px;
  background: var(--brand); color: var(--bg-0);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
  font-family: ui-monospace, monospace;
}
.mobile-sidebar .nav-h .name { font-size: 13px; font-weight: 600; color: var(--ink-0); }
.mobile-sidebar .nav-list { flex: 1; overflow-y: auto; padding: 8px 6px; }
.mobile-sidebar .nav-grp { font-size: 10px; color: var(--ink-4); letter-spacing: 0.06em; text-transform: uppercase; padding: 8px 8px 4px; }
.mobile-sidebar .nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px; border-radius: var(--r-sm);
  font-size: 13px; color: var(--ink-1); cursor: pointer;
}
.mobile-sidebar .nav-item:hover { background: var(--bg-2); color: var(--ink-0); }
.mobile-sidebar .nav-item.active {
  background: color-mix(in oklch, var(--brand) 18%, var(--bg-2));
  color: var(--ink-0);
  font-weight: 600;
  border-left: 2px solid var(--brand);
  padding-left: 6px;
}
.mobile-sidebar .nav-item svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; flex: none; }

/* mobile bottom-nav */
.mobile-bottom-nav {
  display: flex; align-items: stretch; justify-content: space-around;
  background: var(--bg-1); border-top: 1px solid var(--line-soft);
  height: 56px;
  flex: none;
  padding-bottom: 4px;
}
.mobile-bottom-nav .nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  border: none; background: transparent;
  border-top: 2px solid transparent;
  font: inherit; font-size: 10px;
  color: var(--ink-3);
  cursor: pointer;
}
.mobile-bottom-nav .nav-item svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.mobile-bottom-nav .nav-item.active {
  color: var(--brand);
  border-top-color: var(--brand);
  background: color-mix(in oklch, var(--brand) 8%, transparent);
}

/* mobile bottom-sheet */
.mobile-bottom-sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--bg-1);
  border-top-left-radius: var(--r-lg); border-top-right-radius: var(--r-lg);
  box-shadow: 0 -16px 48px color-mix(in oklch, oklch(0 0 0) 40%, transparent);
  z-index: 60;
  max-height: 80%;
  display: flex; flex-direction: column;
  animation: slide-up 200ms ease-out;
}
@keyframes slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.mobile-bottom-sheet .grabber {
  width: 36px; height: 4px;
  background: var(--ink-3); opacity: 0.5;
  border-radius: 2px;
  margin: 8px auto;
}
.mobile-bottom-sheet .sheet-h {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 16px 8px;
  border-bottom: 1px solid var(--line-soft);
}
.mobile-bottom-sheet .sheet-h .title { font-size: 14px; font-weight: 600; color: var(--ink-0); }
.mobile-bottom-sheet .sheet-h .close { border: none; background: transparent; color: var(--ink-3); cursor: pointer; width: 22px; height: 22px; padding: 0; }
.mobile-bottom-sheet .sheet-body { padding: 12px 16px; overflow-y: auto; flex: 1; }
.mobile-bottom-sheet-bd { position: absolute; inset: 0; background: color-mix(in oklch, oklch(0 0 0) 50%, transparent); z-index: 50; }

/* mobile touch filters */
.mobile-touch-filter { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.mobile-touch-filter .seg-touch {
  display: flex; gap: 0;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 3px;
}
.mobile-touch-filter .seg-touch button {
  flex: 1; min-height: 44px;
  border: none; background: transparent; color: var(--ink-2);
  font: inherit; font-size: 13px;
  cursor: pointer; border-radius: 4px;
}
.mobile-touch-filter .seg-touch button.sel { background: var(--bg-3); color: var(--ink-0); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.mobile-touch-filter .field-row {
  display: flex; flex-direction: column; gap: 6px;
}
.mobile-touch-filter .field-row .label { font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.mobile-touch-filter .field-row .field {
  min-height: 44px; padding: 10px 14px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 14px; color: var(--ink-0);
  font-family: ui-monospace, monospace;
  display: flex; align-items: center; justify-content: space-between;
}
.mobile-touch-filter .full-cta {
  width: 100%; min-height: 44px;
  background: var(--brand); color: var(--bg-0);
  border: none; border-radius: var(--r-sm);
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
}

/* PWA install prompt */
.pwa-install-prompt {
  margin: 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, color-mix(in oklch, var(--brand) 22%, var(--bg-1)), color-mix(in oklch, var(--info) 22%, var(--bg-1)));
  border: 1px solid color-mix(in oklch, var(--brand) 30%, var(--line));
  border-radius: var(--r-md);
  display: flex; align-items: center; gap: 10px;
}
.pwa-install-prompt .logo {
  width: 36px; height: 36px;
  background: var(--brand); color: var(--bg-0);
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  font-family: ui-monospace, monospace;
}
.pwa-install-prompt .body { flex: 1; }
.pwa-install-prompt .body .t { font-size: 12.5px; font-weight: 600; color: var(--ink-0); }
.pwa-install-prompt .body .d { font-size: 11px; color: var(--ink-2); margin-top: 1px; }
.pwa-install-prompt .add-btn {
  border: none; background: var(--brand); color: var(--bg-0);
  font: inherit; font-size: 11.5px; font-weight: 600;
  padding: 6px 10px; border-radius: var(--r-sm); cursor: pointer;
}
.pwa-install-prompt .dismiss { border: none; background: transparent; color: var(--ink-2); width: 22px; height: 22px; padding: 0; cursor: pointer; font-family: ui-monospace, monospace; }

/* mobile scorecard stack */
.mobile-scorecard-stack { display: flex; flex-direction: column; gap: 8px; padding: 12px; overflow-y: auto; flex: 1; }
.m-scorecard {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.m-scorecard .l { font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.m-scorecard .v { font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 600; color: var(--ink-0); }
.m-scorecard .delta { font-size: 11px; color: var(--ink-2); }
.m-scorecard[data-tone="revenue"] { border-left: 3px solid color-mix(in oklch, var(--good) 35%, var(--line)); }
.m-scorecard[data-tone="revenue"] .v { color: var(--good); }
.m-scorecard[data-tone="expense"] { border-left: 3px solid color-mix(in oklch, var(--bad) 35%, var(--line)); }
.m-scorecard[data-tone="expense"] .v { color: var(--bad); }

.batch-foot {
  border-top: 1px solid var(--line-soft); padding-top: var(--space-md);
  font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: var(--space-md);
}
.batch-foot b { color: var(--ink-1); font-weight: 600; }