/* Avoxy Portal. Tokens follow the Avoxy site (Portfolio/avoxy/app/globals.css). Fonts are self-hosted: the CSP allows nothing third-party.
   No inline styles anywhere (CSP): every mock-up inline style is a named class below. Widths that depend on data are set from JS via el.style. */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/Inter-Regular.woff2) format('woff2'); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/Inter-Medium.woff2) format('woff2'); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/Inter-SemiBold.woff2) format('woff2'); }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/Inter-Bold.woff2) format('woff2'); }

:root {
  color-scheme: light;
  --base: #F0EEE6;
  --surface: #FFFFFF;
  --surface-2: #FAF8F2;
  --border: #D9D5C7;
  --border-soft: #E9E5D9;
  --border-strong: #B8B0A0;
  --hover: rgba(31, 31, 30, 0.05);
  --ink: #1F1F1E;
  --ink-2: #3D3929;
  --muted: #6B6B6B;
  --on-ink: #FFFFFF;
  --accent: #CC785C;
  --accent-ink: #A8503D;
  --accent-bg: #A8503D;
  --accent-tint: rgba(204, 120, 92, 0.12);
  --good: #0CA30C;
  --good-ink: #006300;
  --warn: #FAB219;
  --warn-ink: #7A5200;
  --crit: #D03B3B;
  --crit-ink: #B42318;
  --win-bg: #E7F4E7;
  --info-bg: #EEF0F3;
  --info-ink: #3F4A5A;
  --warn-bg: #FDF0CF;
  --crit-bg: #FBE3E1;
  --skel: #ECE9DF;
  --skel-hi: #F6F4EE;
  /* product identity: fixed categorical order, never re-assigned */
  --p-hallmatch: #2A78D6;
  --p-podrescale: #EB6834;
  --p-quarterinch: #1BAF7A;
  --p-gomask: #EDA100;
  --p-atomside: #E87BA4;
  --p-avoxy: #6250D6;
  --series: #2A78D6;
  --series-prev: #B8B0A0;
  --meter: #DCE8F8;
  --grid: #E9E5D9;
  --axis: #C9C4B4;
  --focus: #2A78D6;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --r: 10px;
}
/* Dark: its own chosen values, not an invert. Text tokens keep >= 4.5:1 on --surface and --base. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --base: #161513;
    --surface: #211F1C;
    --surface-2: #1B1A17;
    --border: #3A3732;
    --border-soft: #2D2B27;
    --border-strong: #5A564D;
    --hover: rgba(242, 240, 232, 0.06);
    --ink: #F1EEE6;
    --ink-2: #D5D0C2;
    --muted: #A6A091;
    --on-ink: #161513;
    --accent: #D98A6E;
    --accent-ink: #EBA085;
    --accent-bg: #B5583F;
    --accent-tint: rgba(217, 138, 110, 0.16);
    --good-ink: #74D374;
    --warn-ink: #F3C55B;
    --crit-ink: #FF8F85;
    --win-bg: rgba(12, 163, 12, 0.18);
    --info-bg: rgba(160, 175, 200, 0.16);
    --info-ink: #C3CCDA;
    --warn-bg: rgba(250, 178, 25, 0.16);
    --crit-bg: rgba(208, 59, 59, 0.2);
    --skel: #2A2824;
    --skel-hi: #34312C;
    --series-prev: #6F695D;
    --meter: #233247;
    --grid: #302E29;
    --axis: #4B4841;
    --focus: #6FA8F0;
    --p-hallmatch: #3D8AE6;
    --p-avoxy: #8476E8;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--base); color: var(--ink); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h1 { font: 600 28px/1.15 var(--serif); letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.num, .tile .v, .kv b, table.t td.r { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.chart svg:focus-visible { outline-offset: 4px; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 20; background: var(--ink); color: var(--on-ink); padding: 8px 12px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; text-decoration: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* shell */
.shell { display: flex; min-height: 100vh; }
.side { width: 244px; flex: none; background: var(--surface-2); border-right: 1px solid var(--border); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.plist { display: flex; flex-direction: column; gap: 4px; min-height: 240px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font: 600 18px var(--serif); color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand i { width: 26px; height: 26px; border-radius: 7px; background: var(--accent-bg); display: grid; place-items: center; color: #fff; font: 700 14px var(--sans); font-style: normal; }
.nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; min-height: 40px; }
.nav:hover { background: var(--hover); text-decoration: none; }
.nav.on { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--border); }
.nav svg { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.nav .count.hot { background: var(--accent-bg); color: #fff; border-radius: 999px; padding: 1px 8px; }
.side h3 { font: 600 11px var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 18px 10px 6px; }
.pdot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin: 0 4px; background: var(--muted); display: inline-block; }
.pdot--hallmatch { background: var(--p-hallmatch); }
.pdot--podrescale { background: var(--p-podrescale); }
.pdot--quarterinch { background: var(--p-quarterinch); }
.pdot--gomask { background: var(--p-gomask); }
.pdot--atomside { background: var(--p-atomside); }
.pdot--avoxy { background: var(--p-avoxy); }
.pdot--shared { background: var(--muted); }
.h1-dot { width: 12px; height: 12px; vertical-align: 3px; margin: 0 8px 0 0; }
.me { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.me-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so { margin: 0; flex: none; }
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--accent-ink); font: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.mob-foot { display: none; }
.main { flex: 1; min-width: 0; padding: 28px 36px 48px; display: flex; flex-direction: column; gap: 22px; max-width: 1280px; }
.main:focus { outline: none; }
#content { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* header */
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.head p { margin: 4px 0 0; color: var(--muted); }
.head p a { white-space: nowrap; }
.tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 3px; min-height: 40px; }
.seg a, .seg button { padding: 7px 13px; border-radius: 6px; color: var(--ink-2); font-weight: 500; font-size: 13px; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.seg button:hover { background: var(--hover); }
.seg a.on, .seg button.on, .seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.seg a:hover { text-decoration: none; }
.fresh { font-size: 12.5px; color: var(--muted); min-width: 9em; text-align: right; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: 600 13px var(--sans); white-space: nowrap; cursor: pointer; min-height: 34px; }
.btn.pri { background: var(--accent-bg); border-color: var(--accent-bg); color: #fff; }
.btn.sm { padding: 6px 10px; font-size: 12.5px; min-height: 32px; }
.btn:hover { text-decoration: none; border-color: var(--border-strong); }
.btn.pri:hover { filter: brightness(1.06); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; min-width: 0; }
.card > header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.card h2 { font: 600 15px var(--sans); }
.card header span, .card header a { font-size: 12.5px; }
.card header .sub { text-align: right; }
.cap { font: 600 11px var(--sans); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.cap.mt { display: block; margin: 14px 0 4px; }
.sub { color: var(--muted); font-size: 12.5px; }
.sub.mt { margin-top: 10px; }
.foot-note { padding-top: 10px; border-top: 1px solid var(--border-soft); margin-top: 4px; }
.grid { display: grid; gap: 16px; }
.g5 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.g6 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.gfill { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.cols > .wide { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cols > .narrow { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cols > .col-3 { flex: 3 1 480px; }
.cols > .col-2 { flex: 2 1 320px; }
.cols > .col-3b { flex: 3 1 440px; }
.cols > .col-2b { flex: 2 1 360px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 14px; margin-bottom: 10px; }
.section-head h2 { font: 600 15px var(--sans); }

/* status strip */
.strip { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; padding: 12px 18px; min-height: 48px; }
.stat { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.ic { width: 18px; height: 18px; flex: none; }
.ic-ok { fill: var(--good); }
.ic-bad { fill: var(--crit); }
.ic-warn { fill: var(--warn); }
.ic-line { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-mark { stroke: #1F1F1E; stroke-width: 1.7; stroke-linecap: round; fill: none; }
.ic-live { fill: #2A78D6; }
.ic-ring { fill: none; stroke: #2A78D6; stroke-opacity: 0.35; stroke-width: 1.5; }
.ic-dim { fill: var(--axis); }
.strip .sub { margin-left: auto; }

/* stat tile */
.tile { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; text-align: left; font: inherit; color: inherit; }
.tile .v { font: 600 27px/1.1 var(--sans); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.tile .v small { font-size: 15px; font-weight: 600; color: var(--ink-2); margin-left: 6px; white-space: nowrap; }
button.tile { cursor: pointer; width: 100%; }
button.tile:hover { border-color: var(--border-strong); }
button.tile[aria-pressed="true"] { border-color: var(--series); box-shadow: inset 0 0 0 1px var(--series); }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--good-ink); }
.delta.down { color: var(--crit-ink); }
.delta.flat { color: var(--muted); }
.delta + .sub { margin-left: 6px; }
.spark { width: 100%; height: 34px; display: block; margin-top: 4px; }
.spark-svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* rows / lists */
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border-soft); }
.row:first-of-type { border-top: 0; }
.row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.row b { font-weight: 600; text-align: right; }
.row b .sub { font-weight: 600; }
.kv .row { padding: 7px 0; font-size: 13.5px; }
.kv.mt { margin-top: 12px; }
.row.total { border-top-color: var(--border); }
.tag { display: inline-flex; align-items: center; gap: 6px; font: 600 11.5px var(--sans); padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2); white-space: nowrap; }
.tag .pdot { margin: 0; width: 7px; height: 7px; }
.kind { font: 600 10.5px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.kind.win, .kind.good { background: var(--win-bg); color: var(--good-ink); }
.kind.info { background: var(--info-bg); color: var(--info-ink); }
.kind.warn { background: var(--warn-bg); color: var(--warn-ink); }
.kind.crit { background: var(--crit-bg); color: var(--crit-ink); }
.kind.todo { background: var(--accent-tint); color: var(--accent-ink); }
.age { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.age.old { color: var(--crit-ink); font-weight: 600; }
.age.soon { color: var(--warn-ink); font-weight: 600; }
.v-crit { color: var(--crit-ink); }
.v-warn { color: var(--warn-ink); }
.v-good { color: var(--good-ink); }

/* inbox item */
.item { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--border-soft); }
.item:first-of-type { border-top: 0; }
.item .body { flex: 1 1 300px; min-width: 0; }
.item .t { font-weight: 600; overflow-wrap: anywhere; }
.item a.t { color: inherit; }
.inboxcard { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }

/* product card */
.pcard { display: flex; flex-direction: column; gap: 12px; color: inherit; }
.pcard:hover { text-decoration: none; border-color: var(--border-strong); }
.pcard .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pcard .name { display: flex; align-items: center; gap: 8px; font: 600 16px var(--sans); }
.pcard .big { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.pcard .big .v { font: 600 26px/1 var(--sans); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pcard .kv { flex: 1; }
.pcard .foot { display: flex; justify-content: space-between; gap: 8px 12px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--border-soft); padding-top: 10px; }
.pcard .foot span { flex: none; white-space: nowrap; }
.pcard .foot span:last-child { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pcard .spark { width: 140px; height: 40px; margin: 0; flex: none; }
.pcard .empty { padding: 16px 0; flex: 1; }

/* charts */
.chart { width: 100%; position: relative; min-width: 0; }
.chart-box { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font: 11.5px var(--sans); fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart-h230 { min-height: 230px; }
.chart-h190 { min-height: 190px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend i.ln { height: 2px; width: 14px; border-radius: 0; vertical-align: 3px; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--on-ink); font-size: 12px; padding: 6px 9px; border-radius: 6px; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -10px; opacity: 0; z-index: 5; font-variant-numeric: tabular-nums; }
.tip.on { opacity: 1; }
.tip.tip-l { transform: translate(-12px, -100%); }
.tip.tip-r-edge { transform: translate(calc(-100% + 12px), -100%); }
.tip b { display: block; margin-bottom: 2px; }
.tip-r i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.funnel .st { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; font-size: 13.5px; }
.funnel .st-l { grid-column: 1; grid-row: 1; min-width: 0; }
.funnel .n { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; }
.funnel .n span { color: var(--muted); font-weight: 400; margin-left: 6px; }
.funnel .bar { grid-column: 1 / -1; grid-row: 2; height: 10px; border-radius: 0 4px 4px 0; background: var(--series); min-width: 3px; }
.meter { height: 8px; border-radius: 99px; background: var(--meter); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--series); border-radius: 99px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font: 600 11px var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 0 8px 8px 0; }
table.t td { padding: 9px 8px 9px 0; border-top: 1px solid var(--border-soft); vertical-align: middle; }
table.t td.r, table.t th.r { text-align: right; padding-right: 0; padding-left: 16px; white-space: nowrap; }
table.t td + td:not(.r), table.t th + th:not(.r) { padding-left: 16px; }
table.t th.rowh { font: 600 13.5px var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); padding: 9px 8px 9px 0; border-top: 1px solid var(--border-soft); vertical-align: middle; }
table.t th.rowh.r { padding-right: 0; }
.scroll { overflow-x: auto; }
/* a product page tints its charts with the product colour */
.theme-hallmatch { --series: var(--p-hallmatch); }
.theme-podrescale { --series: var(--p-podrescale); }
.theme-quarterinch { --series: var(--p-quarterinch); }
.theme-gomask { --series: var(--p-gomask); }
.theme-atomside { --series: var(--p-atomside); }
.theme-avoxy { --series: var(--p-avoxy); }
#content.ready[aria-busy="true"] { opacity: 0.65; transition: opacity 0.2s 0.15s; }
.note { font-size: 12px; color: var(--muted); text-align: center; padding-top: 6px; }
.narrow .item .body, .item.tight .body { flex-basis: 150px; }

/* filters (inbox) */
.filters { display: flex; flex-direction: column; gap: 2px; padding: 12px; }
.filters a, .filters button { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: 7px; color: var(--ink-2); font-weight: 500; min-height: 40px; background: none; border: 0; text-align: left; cursor: pointer; width: 100%; }
.filters a.on, .filters button.on, .filters button[aria-pressed="true"] { background: var(--base); color: var(--ink); font-weight: 600; }
.filters a:hover, .filters button:hover { text-decoration: none; background: var(--surface-2); }
.filters .cap { padding: 12px 10px 6px; }

/* sign-in */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth .card { width: 100%; max-width: 400px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.auth h1 { font-size: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; }
.field input { height: 44px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 0 12px; font: 15px var(--sans); background: var(--surface); color: var(--ink); }
.auth .btn { height: 46px; justify-content: center; font-size: 15px; }

/* states */
.empty { color: var(--muted); font-size: 13px; padding: 18px 0; text-align: center; }
.chart .empty { padding: 60px 0; }
.errbox { border: 1px solid var(--crit); background: var(--crit-bg); border-radius: var(--r); padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.errbox .sub { flex: 1 1 200px; color: var(--ink-2); }
.errbox-t { font-weight: 600; color: var(--crit-ink); flex: 1 1 100%; }
.panelnote { font-size: 12.5px; color: var(--muted); padding: 10px 14px; border: 1px dashed var(--border); border-radius: var(--r); }
.skel { background: linear-gradient(90deg, var(--skel) 0%, var(--skel-hi) 50%, var(--skel) 100%); background-size: 200% 100%; animation: skel 1.4s ease-in-out infinite; border-radius: 6px; color: transparent; }
.skel-card { border-color: var(--border-soft); }
.sk-line { height: 12px; margin: 8px 0; }
.sk-w30 { width: 30%; } .sk-w50 { width: 50%; } .sk-w70 { width: 70%; } .sk-w90 { width: 90%; }
.sk-big { height: 28px; width: 55%; margin: 6px 0 10px; }
.sk-h48 { min-height: 48px; }
.sk-h120 { min-height: 132px; }
.sk-h170 { min-height: 170px; }
.sk-h240 { min-height: 240px; }
.sk-h300 { min-height: 300px; }
.sk-h330 { min-height: 330px; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* phone */
.mobbar { display: none; }
@media (max-width: 860px) {
  .side { display: none; }
  .main { padding: 16px 16px 92px; gap: 16px; }
  #content { gap: 16px; }
  h1 { font-size: 23px; }
  .head { align-items: flex-start; }
  .tools { width: 100%; justify-content: space-between; }
  .fresh { min-width: 0; text-align: left; }
  .seg { max-width: 100%; }
  .seg button { padding: 7px 10px; }
  .mobbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; z-index: 10; }
  .mobbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); min-width: 56px; min-height: 44px; padding: 6px 4px; position: relative; }
  .mobbar a:hover { text-decoration: none; }
  .mobbar a.on { color: var(--accent-ink); }
  .mobbar svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .mobbar .count { position: absolute; top: 0; right: 8px; background: var(--accent-bg); color: #fff; border-radius: 99px; font-size: 10px; padding: 0 5px; }
  .mob-foot { display: flex; justify-content: center; padding-top: 4px; font-size: 13px; }
  .strip { gap: 8px 20px; }
  .strip .sub { margin-left: 0; flex-basis: 100%; }
  .g5, .g6, .gfill { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: minmax(0, 1fr); }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .cols > * { flex-basis: 100% !important; }
  .card { padding: 16px; }
  .tile { padding: 14px; }
  .tile .v { font-size: 23px; }
  .tile .v small { display: block; margin: 2px 0 0; font-size: 13px; }
  .pcard .spark { width: 110px; }
  .item .body { flex-basis: 100%; }
  .item .age { margin-left: auto; }
  .item .tag + .body, .item .kind + .body { flex-basis: calc(100% - 120px); }
}
@media (max-width: 380px) {
  .g5, .g6, .gfill { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .skel { animation: none; }
}
