/* =============================================================================================
   RootedWuudwerksOps design system
   Warm off-white, walnut, maple/cream, charcoal and muted forest green. The staff screens use system
   fonts only (they work offline on the shop network) and favour speed and legibility. The customer
   site has its own look on top of the same tokens (.storefront, near the end): its own paper and ink,
   two self-hosted open-licence fonts, and corners chosen by what each thing is.
   ============================================================================================= */

:root {
    color-scheme: light;

    /* Surfaces */
    --rw-bg: #faf7f2;
    --rw-bg-sunken: #f3eee5;
    --rw-surface: #ffffff;
    --rw-surface-tinted: #fcfaf6;
    --rw-cream: #f6efe4;
    --rw-overlay: rgba(38, 36, 31, 0.45);

    /* Text */
    --rw-ink: #26241f;
    --rw-ink-strong: #15130f;
    --rw-muted: #6b665c;
    --rw-subtle: #8a8478;
    --rw-on-dark: #ffffff;

    /* Lines */
    --rw-border: #e3ddd1;
    --rw-border-strong: #cec6b5;
    --rw-border-subtle: #eee9df;

    /* Brand */
    --rw-walnut: #5b3a29;
    --rw-walnut-dark: #3f271b;
    --rw-walnut-soft: #f3ebe4;
    --rw-forest: #3d5a3a;
    --rw-forest-hover: #334c31;
    --rw-forest-active: #2a3f28;
    --rw-forest-soft: #eaf0e7;
    --rw-forest-border: #c3d4bd;
    --rw-forest-text: #2f4a2d;
    --rw-maple: #e3c99a;

    /* Status */
    --rw-success: #2f6b46; --rw-success-soft: #e7f2ea; --rw-success-border: #bcd9c6;
    --rw-warning: #8a5d12; --rw-warning-soft: #fbf1de; --rw-warning-border: #ecd7ac;
    --rw-danger: #a33327;  --rw-danger-soft: #fbeae7;  --rw-danger-border: #eec4bc;
    --rw-info: #2b5470;    --rw-info-soft: #e8f0f6;    --rw-info-border: #bed4e3;
    --rw-neutral-soft: #f1efea;

    /* Species (material chips) */
    --rw-species-walnut: #5b3a29;
    --rw-species-cherry: #9c4a2f;
    --rw-species-maple: #d9b77e;
    --rw-species-mahogany: #7d3b26;
    --rw-species-oak: #b5874f;

    /* Chart lines that name things (Business → Sales trends): eight, always in this order. The order is what keeps neighbours apart
       for colour-blind readers, so a ninth is never invented: more lines fold into one. Neutral is for a line that isn't one thing. */
    --rw-series-1: #2a78d6; --rw-series-2: #eb6834; --rw-series-3: #1baf7a; --rw-series-4: #eda100;
    --rw-series-5: #e87ba4; --rw-series-6: #008300; --rw-series-7: #6250d6; --rw-series-8: #e34948;
    --rw-series-neutral: #9a9285;

    /* Environment banner — deliberately NOT a site colour */
    --rw-env: #7b2cbf;
    --rw-env-dark: #5a1f8f;

    /* Type */
    --rw-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --rw-font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --rw-font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", SFMono-Regular, Menlo, Consolas, monospace;
    --rw-text-xs: .75rem; --rw-text-sm: .8125rem; --rw-text-base: .9375rem; --rw-text-md: 1rem;
    --rw-text-lg: 1.125rem; --rw-text-xl: 1.3125rem; --rw-text-2xl: 1.5rem; --rw-text-3xl: 1.875rem; --rw-text-4xl: 2.5rem;

    /* Space / shape / depth */
    --rw-space-1: .25rem; --rw-space-2: .5rem; --rw-space-3: .75rem; --rw-space-4: 1rem; --rw-space-5: 1.25rem;
    --rw-space-6: 1.5rem; --rw-space-8: 2rem; --rw-space-10: 2.5rem; --rw-space-12: 3rem; --rw-space-16: 4rem;
    --rw-radius-sm: 6px; --rw-radius: 10px; --rw-radius-lg: 14px; --rw-radius-pill: 999px;
    --rw-shadow-xs: 0 1px 2px rgba(38, 36, 31, .05);
    --rw-shadow-sm: 0 1px 3px rgba(38, 36, 31, .07), 0 1px 2px rgba(38, 36, 31, .04);
    --rw-shadow-md: 0 4px 12px rgba(38, 36, 31, .08), 0 1px 3px rgba(38, 36, 31, .05);
    --rw-focus: 0 0 0 3px color-mix(in srgb, var(--rw-forest) 28%, transparent);

    /* Layout */
    --rw-sidebar: 236px;
    --rw-sidebar-rail: 64px;   /* the desktop sidebar folded to icons */
    --rw-topbar: 56px;
    --rw-tabbar: 58px;         /* the phone tab bar, above the home-indicator inset */
    --rw-touch: 44px;
    --rw-touch-shop: 56px;
    --rw-page-pad: var(--rw-space-4);
    --rw-content-max: 1360px;
}
@media (min-width: 768px) { :root { --rw-page-pad: var(--rw-space-6); } }
@media (prefers-contrast: more) { :root { --rw-border: #a89f8c; --rw-muted: #4f4a41; } }

/* ---------------- Base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--rw-bg); color: var(--rw-ink); font-family: var(--rw-font); font-size: var(--rw-text-base); line-height: 1.5; }
/* Safe areas (iPhone). App.razor's viewport says viewport-fit=cover, so on an iPhone the page fills the whole screen: under
   the home-indicator strip at the bottom, the notch or Dynamic Island at a side in landscape, and the status bar in a Home
   Screen web app. env(safe-area-inset-*) measures those strips (0 on other screens). Without viewport-fit=cover iOS reports
   0 and still draws a bar pinned to the bottom on the home-indicator strip: that is what cut off the tab bar's words on an
   iPhone. So everything pinned to an edge keeps its content out of the strip (backgrounds may run under it), and the body
   keeps the page's own content clear of the sides. --rw-safe-top is the top strip still to clear: 0 under an environment
   banner, which clears it itself. Smoke/AppShellSidebarTests emulates an iPhone's insets. */
:root { --rw-safe-top: env(safe-area-inset-top, 0px); }
body { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
h1, h2, h3, h4 { color: var(--rw-ink-strong); line-height: 1.25; margin: 0 0 var(--rw-space-3); letter-spacing: -.011em; }
h1 { font-size: var(--rw-text-2xl); font-weight: 650; }
h2 { font-size: var(--rw-text-xl); font-weight: 600; }
h3 { font-size: var(--rw-text-lg); font-weight: 600; }
h4 { font-size: var(--rw-text-md); font-weight: 600; }
p { margin: 0 0 var(--rw-space-3); }
a { color: var(--rw-forest-text); text-underline-offset: 2px; }
a:hover { color: var(--rw-forest-active); }
:focus-visible { outline: 2px solid var(--rw-forest); outline-offset: 2px; }
code, .mono { font-family: var(--rw-font-mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; }
hr { border: 0; border-top: 1px solid var(--rw-border); margin: var(--rw-space-5) 0; }
img { max-width: 100%; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

.muted { color: var(--rw-muted); }
.subtle { color: var(--rw-subtle); }
.small { font-size: var(--rw-text-sm); }
.xs { font-size: var(--rw-text-xs); }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* What a setup-checklist link came to change (rwo.setupHighlight): a steady outline that pulses twice to catch the eye. */
[data-setup-target] { outline: 3px solid var(--rw-walnut); outline-offset: 3px; border-radius: var(--rw-radius-sm); animation: setup-target 1s ease-in-out 2; }
@keyframes setup-target { 50% { outline-offset: 8px; outline-color: transparent; } }
/* Where an action-needed link lands (?focus=… — rwo.focusTarget): the section scrolls clear of the top bar, and the field
   it is about is marked in the warning colour. */
.focus-target { scroll-margin-top: calc(var(--rw-topbar) + var(--rw-safe-top) + var(--rw-space-3)); }
.focus-target:focus { outline: none; }
.field-focus { background: var(--rw-warning-soft); box-shadow: inset 3px 0 0 var(--rw-warning); scroll-margin-top: calc(var(--rw-topbar) + var(--rw-safe-top) + var(--rw-space-3)); }
dt.field-focus { padding-left: 6px; }
.stack { display: flex; flex-direction: column; gap: var(--rw-space-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--rw-space-2); }
.row { display: flex; align-items: center; gap: var(--rw-space-3); flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--rw-space-3); flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
/* min(…, 100%): one column on a phone narrower than the column (a 320px phone has 288px inside the page's padding). */
.grid-2 { display: grid; gap: var(--rw-space-4); grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid-3 { display: grid; gap: var(--rw-space-4); grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-4 { margin-top: var(--rw-space-4); } .mb-4 { margin-bottom: var(--rw-space-4); }

/* ---------------- Environment banner ---------------- */
.env-banner {
    position: sticky; top: 0; z-index: 100;
    background: repeating-linear-gradient(-45deg, var(--rw-env), var(--rw-env) 14px, var(--rw-env-dark) 14px, var(--rw-env-dark) 28px);
    color: #fff; text-align: center; font-weight: 700; letter-spacing: .06em; font-size: var(--rw-text-sm);
    padding: 6px var(--rw-space-4); text-transform: uppercase; box-shadow: 0 2px 6px rgba(0,0,0,.18);
    padding-top: calc(6px + env(safe-area-inset-top, 0px));  /* the banner clears the status bar for the page below it */
}
.env-banner span { background: rgba(0,0,0,.28); padding: 2px 10px; border-radius: var(--rw-radius-pill); }
.env-banner .env-name { font-weight: 500; opacity: .9; margin-left: .5em; }
/* Local Live Data: real Etsy data, so a different colour from the demo banner. */
.env-banner-live { --rw-env: #b45309; --rw-env-dark: #92400e; }
body.has-env { --rw-env-offset: calc(32px + env(safe-area-inset-top, 0px)); --rw-safe-top: 0px; }
.env-banner .env-mode { background: none; padding: 0; letter-spacing: .1em; }
/* TEMP PRODUCTION (the shop laptop, staff pages only) is red so it can't be mistaken for the dedicated server, which shows
   no banner, or for Development. */
.env-banner-prod { box-shadow: none; }
.env-banner-temp { background: repeating-linear-gradient(-45deg, #8f1d14, #8f1d14 18px, #7a170f 18px, #7a170f 36px); }
.env-banner-prod ~ .shell, .env-banner-prod ~ main { --rw-env-offset: calc(32px + env(safe-area-inset-top, 0px)); --rw-safe-top: 0px; }
/* A test order: the test colour, in words, wherever it could pass for a real order. */
.test-order-banner {
    background: repeating-linear-gradient(-45deg, var(--rw-env), var(--rw-env) 14px, var(--rw-env-dark) 14px, var(--rw-env-dark) 28px);
    color: #fff; border-radius: var(--rw-radius); padding: var(--rw-space-2) var(--rw-space-4); margin: var(--rw-space-3) 0 var(--rw-space-4);
    font-size: var(--rw-text-sm); overflow-wrap: anywhere;
}
.test-order-banner strong { letter-spacing: .06em; }

/* ---------------- Internal shell ---------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--rw-sidebar); flex: 0 0 var(--rw-sidebar); background: var(--rw-surface); border-right: 1px solid var(--rw-border);
    position: sticky; top: var(--rw-env-offset, 0); height: calc(100vh - var(--rw-env-offset, 0px)); overflow: hidden; display: flex; flex-direction: column;
    padding-top: var(--rw-safe-top); padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* Only the nav and footer scroll: the brand stays above them, so the nav's scrollbar never takes width from the name. */
.sidebar-scroll { flex: 1 1 auto; min-height: 0; position: relative; overflow-x: hidden; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: var(--rw-space-3); padding: var(--rw-space-4) var(--rw-space-4) var(--rw-space-3); text-decoration: none; color: var(--rw-ink-strong); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-mark img { display: block; width: 100%; height: 100%; }
/* The shop's own logo and icon (Settings → Shop & website → Logo and icon): drawn whole, whatever their proportions. A wide logo
   stands in for the name in the site's header: as tall as the square mark, never wider than the row allows. */
.brand-pic { object-fit: contain; }
.brand-logo { display: block; height: 40px; width: auto; max-width: min(260px, 55vw); object-fit: contain; object-position: left center; flex: 0 1 auto; min-width: 0; }
.brand-name { font-family: var(--rw-font-display); font-size: 1.15rem; font-weight: 600; line-height: 1.1; }
.brand-sub { font-size: var(--rw-text-xs); color: var(--rw-muted); letter-spacing: .04em; text-transform: uppercase; }
/* "RootedWuudwerks" reads in full in the sidebar's width; an unusually wide fallback font gets an ellipsis, never a clip. */
.sidebar .brand { flex: none; gap: var(--rw-space-2); padding-right: var(--rw-space-3); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.sidebar .brand-name { font-size: 1.0625rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-section { padding: var(--rw-space-2) var(--rw-space-3); }
.nav-heading { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--rw-subtle); padding: var(--rw-space-3) var(--rw-space-2) var(--rw-space-1); font-weight: 600; }
.nav-link {
    display: flex; align-items: center; gap: var(--rw-space-3); min-height: 38px; padding: 0 var(--rw-space-3); border-radius: var(--rw-radius-sm);
    color: var(--rw-ink); text-decoration: none; font-size: var(--rw-text-base);
}
.nav-link:hover { background: var(--rw-bg-sunken); color: var(--rw-ink-strong); }
.nav-link.active { background: var(--rw-forest-soft); color: var(--rw-forest-text); font-weight: 600; }
.nav-link svg { flex: none; opacity: .85; }
.nav-count { margin-left: auto; background: var(--rw-danger); color: #fff; border-radius: var(--rw-radius-pill); font-size: 11px; padding: 1px 7px; font-weight: 700; }
.sidebar-footer { margin-top: auto; padding: var(--rw-space-4); border-top: 1px solid var(--rw-border-subtle); font-size: var(--rw-text-sm); }

.main-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: calc(var(--rw-topbar) + var(--rw-safe-top)); display: flex; align-items: center; gap: var(--rw-space-3); padding: var(--rw-safe-top) var(--rw-page-pad) 0;
    background: color-mix(in srgb, var(--rw-bg) 90%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rw-border-subtle);
    position: sticky; top: var(--rw-env-offset, 0); z-index: 20;
}
.topbar .search { flex: 1 1 auto; max-width: 420px; }
.topbar .user { margin-left: auto; display: flex; align-items: center; gap: var(--rw-space-3); font-size: var(--rw-text-sm); }
/* Two hamburgers in the same spot, one per layout: .rail-toggle folds the desktop sidebar, .menu-toggle opens the drawer
   on narrow screens (below). ".topbar" outranks .btn's display. */
.topbar .menu-toggle { display: none; }
.page { padding: var(--rw-page-pad); width: 100%; max-width: var(--rw-content-max); margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--rw-space-4); flex-wrap: wrap; margin-bottom: var(--rw-space-5); }
.page-head h1 { margin: 0; }
.page-head .lede { color: var(--rw-muted); margin: var(--rw-space-1) 0 0; }
/* A Settings area (docs/UI-CONVENTIONS.md → Settings): titled sections down one page, each with one line on what it is for,
   the rare parts folded under Advanced at the end. No tabs. */
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--rw-space-3); flex-wrap: wrap; margin: var(--rw-space-8) 0 var(--rw-space-3); scroll-margin-top: var(--rw-space-6); }
.section-head:first-child { margin-top: 0; }
.section-head h2 { margin: 0 0 2px; font-size: var(--rw-text-lg); }
.section-head .section-line { margin: 0; }
.settings-advanced { margin-top: var(--rw-space-8); }
.settings-advanced > summary { cursor: pointer; font-weight: 600; color: var(--rw-muted); min-height: var(--rw-touch); display: flex; align-items: center; gap: var(--rw-space-2); }
.settings-advanced > summary .small { font-weight: 400; }
.settings-advanced[open] > summary { margin-bottom: var(--rw-space-3); }
/* Settings rows: a list where each row is one place, with its title, one line and its state (the Settings list, the search's
   results, Workshop, Connections). */
.settings-rows { list-style: none; margin: 0; padding: 0; }
.settings-rows > li + li { border-top: 1px solid var(--rw-border-subtle); }
.settings-row { display: flex; align-items: center; gap: var(--rw-space-3); min-height: var(--rw-touch); padding: var(--rw-space-3) var(--rw-space-4); text-decoration: none; color: var(--rw-ink); }
a.settings-row:hover { background: var(--rw-bg-sunken); }
a.settings-row:focus-visible { outline: none; box-shadow: inset var(--rw-focus); }
.settings-row-icon { flex: none; display: inline-flex; color: var(--rw-forest-text); }
.settings-row-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.settings-row-title { font-weight: 600; color: var(--rw-ink-strong); }
.settings-row-line { font-size: var(--rw-text-sm); color: var(--rw-muted); }
.settings-row-state { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: var(--rw-space-2); font-size: var(--rw-text-sm); }
.settings-row-chevron { flex: none; display: inline-flex; color: var(--rw-subtle); }
.settings-row-state .badge { white-space: normal; }
@media (max-width: 640px) {
    .settings-row { flex-wrap: wrap; }
    .settings-row-text { flex-basis: calc(100% - 60px); }
    .settings-row-state { order: 3; flex-basis: 100%; padding-left: calc(18px + var(--rw-space-3)); }
}
.crumbs { font-size: var(--rw-text-sm); color: var(--rw-muted); margin-bottom: var(--rw-space-2); }
.crumbs a { color: var(--rw-muted); }
/* SectionNav (layout): the way back to the Settings hub, and the Business tabs shared by its pages. */
.section-crumbs a { text-decoration: none; font-weight: 600; }
.section-crumbs a:hover { text-decoration: underline; }
.section-tabs { display: flex; gap: var(--rw-space-1); flex-wrap: wrap; border-bottom: 1px solid var(--rw-border); margin: 0 0 var(--rw-space-5); }
.section-tab {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--rw-space-3); margin-bottom: -1px; text-decoration: none;
    color: var(--rw-muted); font-size: var(--rw-text-sm); font-weight: 600; border-bottom: 2px solid transparent;
}
.section-tab:hover { color: var(--rw-ink-strong); }
.section-tab.active { color: var(--rw-forest-text); border-bottom-color: var(--rw-forest); }
.section-tab:focus-visible { outline: none; box-shadow: var(--rw-focus); border-radius: var(--rw-radius-sm); }
/* The layout draws the Business tabs before the page; they read under the page's own heading (crumbs and title first, then the
   tabs, then the page). Only on a page with the tab row. */
main.page:has(> .section-tabs) { display: flex; flex-direction: column; }
main.page:has(> .section-tabs) > * { order: 3; }
main.page:has(> .section-tabs) > .crumbs, main.page:has(> .section-tabs) > .page-head { order: 1; }
main.page:has(> .section-tabs) > .section-tabs { order: 2; }
main.page:has(> .section-tabs) > .page-head { margin-bottom: var(--rw-space-3); }
.nav-section-quiet { margin-top: var(--rw-space-2); border-top: 1px solid var(--rw-border-subtle); }
.nav-section-quiet .nav-link { color: var(--rw-muted); font-size: var(--rw-text-sm); min-height: 34px; }
/* FocusOnNavigate moves focus to the page heading for screen readers; no visible ring needed there */
h1:focus, h1:focus-visible { outline: none; }
.show-sm { display: none; }
@media (max-width: 640px) { .hide-sm { display: none !important; } .show-sm { display: inline; } }

@media (max-width: 960px) {
    .sidebar { position: fixed; left: 0; z-index: 60; transform: translateX(-100%); transition: transform .18s ease; box-shadow: var(--rw-shadow-md); }
    /* Fixed to the window, outside the body's side padding: the drawer clears a landscape notch itself. */
    .sidebar { width: calc(var(--rw-sidebar) + env(safe-area-inset-left, 0px)); padding-left: env(safe-area-inset-left, 0px); }
    .shell.nav-open .sidebar { transform: none; }
    .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: var(--rw-overlay); z-index: 50; }
    .topbar .menu-toggle { display: inline-flex; }
    .topbar .rail-toggle { display: none; }
    .topbar .search { display: none; }
}

/* Phones: an app-style tab bar along the bottom (Layout/TabBar.razor) instead of the hamburger. Its More tab opens the
   same sidebar as a sheet above the bar, holding what the bar doesn't show (Business, Settings, the quiet links and the
   account); the sheet is hidden, not just moved off screen, while closed. Tablets keep the drawer above. */
.tabbar, .topbar-brand { display: none; }
@media (max-width: 640px) {
    .topbar .menu-toggle { display: none; }
    .topbar .search { display: block; }
    .topbar-brand { display: flex; flex: none; border-radius: var(--rw-radius-sm); }
    .topbar-brand img { display: block; }

    .tabbar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
        padding: 0 max(var(--rw-space-1), env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(var(--rw-space-1), env(safe-area-inset-left, 0px));
        background: var(--rw-surface); border-top: 1px solid var(--rw-border); box-shadow: 0 -1px 3px rgba(38, 36, 31, .05);
    }
    .tabbar-item {
        flex: 1 1 0; min-width: 0; min-height: calc(var(--rw-tabbar) - 1px); padding: 0;  /* + the bar's border = --rw-tabbar */ border: 0; background: none; font: inherit; cursor: pointer;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
        color: var(--rw-muted); text-decoration: none; font-size: 11px; font-weight: 600; line-height: 1.2;
        -webkit-tap-highlight-color: transparent;
        container-type: inline-size;  /* the label sizes itself to the tab's width (cqi, below) */
    }
    .tabbar-item:hover { color: var(--rw-ink-strong); }
    .tabbar-icon { display: grid; place-items: center; width: min(52px, 100%); height: 30px; border-radius: var(--rw-radius-pill); transition: background-color .15s ease; }
    /* The words are never cut off. Nothing around them hides overflow, and the line is taller than any phone font's letters
       (a 1.2 line cut the tops and the tails of p and g). One line, at most 11px, and smaller only when the tab is too narrow
       for the longest word ("Production", about 5.5em of semibold text, + 4px): a 320px phone, a 280px fold-out cover
       screen, or text zoomed larger (Safari's and Chrome's zoom and iOS Display Zoom narrow the page). A longer tab label
       needs a new divisor; Smoke/AppShellSidebarTests measures every label at 280–430px. */
    .tabbar-label {
        max-width: 100%; padding: 0 2px; white-space: nowrap; line-height: 1.4;
        font-size: 11px; font-size: min(11px, calc((100cqi - 4px) / 5.5));
    }
    .tabbar-item.active, .tabbar-item[aria-expanded="true"] { color: var(--rw-forest-text); }
    .tabbar-item.active .tabbar-icon, .tabbar-item[aria-expanded="true"] .tabbar-icon { background: var(--rw-forest-soft); }
    .tabbar:has([aria-expanded="true"]) a.tabbar-item { color: var(--rw-muted); }  /* while More is open, only More is lit */
    .tabbar:has([aria-expanded="true"]) a.tabbar-item .tabbar-icon { background: none; }
    .tabbar-item:focus-visible { outline: none; }
    .tabbar-item:focus-visible .tabbar-icon { box-shadow: var(--rw-focus); }

    /* The page ends above the bar, and anything pinned to the bottom of the window sits on top of it. */
    .shell .page { padding-bottom: calc(var(--rw-page-pad) + var(--rw-tabbar) + env(safe-area-inset-bottom, 0px)); }
    html:has(.shell .tabbar) { scroll-padding-bottom: calc(var(--rw-tabbar) + env(safe-area-inset-bottom, 0px)); }
    .shell .toast {
        left: calc(var(--rw-space-3) + env(safe-area-inset-left, 0px)); right: calc(var(--rw-space-3) + env(safe-area-inset-right, 0px));
        bottom: calc(var(--rw-tabbar) + env(safe-area-inset-bottom, 0px) + var(--rw-space-3));
    }
    .shell ~ #blazor-error-ui { bottom: calc(var(--rw-tabbar) + env(safe-area-inset-bottom, 0px)); padding-bottom: 10px; }  /* above the bar, which clears the strip */

    .sidebar {
        top: auto; bottom: calc(var(--rw-tabbar) + env(safe-area-inset-bottom, 0px)); left: 0; right: 0;
        width: auto; height: auto; padding: var(--rw-space-2) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
        max-height: calc(100vh - var(--rw-tabbar) - env(safe-area-inset-bottom, 0px) - env(safe-area-inset-top, 0px) - var(--rw-space-16));
        border-right: 0; border-radius: var(--rw-radius-lg) var(--rw-radius-lg) 0 0; box-shadow: 0 -6px 20px rgba(38, 36, 31, .14);
        transform: translateY(100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s;
    }
    .shell.nav-open .sidebar { visibility: visible; transition: transform .2s ease; }
    .sidebar .brand, .sidebar .on-tabbar { display: none; }
    .sidebar .nav-link, .sidebar .nav-section-quiet .nav-link { min-height: var(--rw-touch); }
}

/* Desktop: the hamburger folds the sidebar to an icon rail (html.sidebar-collapsed, remembered in this browser by
   app.js). The words stay in the page as accessible names (hidden like .visually-hidden) and show as hover titles. */
@media (width > 960px) {
    .sidebar { transition: width .18s ease, flex-basis .18s ease; }
    .sidebar-collapsed .sidebar { width: var(--rw-sidebar-rail); flex-basis: var(--rw-sidebar-rail); }
    .sidebar-collapsed .sidebar .brand { justify-content: center; padding-inline: 0; }
    .sidebar-collapsed .brand-text, .sidebar-collapsed .nav-label, .sidebar-collapsed .nav-heading, .sidebar-collapsed .sidebar-user {
        position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
    }
    /* Gutters on both sides keep the icons centred under the brand mark whether or not a scrollbar shows. */
    .sidebar-collapsed .sidebar-scroll { scrollbar-width: thin; scrollbar-gutter: stable both-edges; }
    .sidebar-collapsed .nav-section { padding-inline: 0; }
    .sidebar-collapsed .nav-section + .nav-section { border-top: 1px solid var(--rw-border-subtle); }
    .sidebar-collapsed .nav-link { width: 38px; margin-inline: auto; justify-content: center; padding: 0; }  /* square, like .btn-icon */
    .sidebar-collapsed .nav-link .badge, .sidebar-collapsed .nav-count { display: none; }
    .sidebar-collapsed .sidebar-footer { display: flex; justify-content: center; padding: var(--rw-space-3) 0; }
    .sidebar-collapsed .sidebar-footer form { margin-top: 0; }
}

/* ---------------- Surfaces ---------------- */
.card { background: var(--rw-surface); border: 1px solid var(--rw-border); border-radius: var(--rw-radius); box-shadow: var(--rw-shadow-xs); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--rw-space-3); padding: var(--rw-space-3) var(--rw-space-4); border-bottom: 1px solid var(--rw-border-subtle); }
.card-head h2, .card-head h3 { margin: 0; font-size: var(--rw-text-md); }
.card-body { padding: var(--rw-space-4); }
.card-body.tight { padding: 0; }
.card-foot { padding: var(--rw-space-3) var(--rw-space-4); border-top: 1px solid var(--rw-border-subtle); background: var(--rw-surface-tinted); border-radius: 0 0 var(--rw-radius) var(--rw-radius); }
/* A card folded to its head (<details class="card"><summary class="card-head">): read now and then, opened with one click. */
details.card > summary.card-head { cursor: pointer; list-style: none; }
details.card > summary.card-head::-webkit-details-marker { display: none; }
details.card:not([open]) > summary.card-head { border-bottom: none; }
/* Settings (docs/UI-CONVENTIONS.md → Settings): what a section is for, in one line under its title. */
.section-line { margin: 0 0 var(--rw-space-3); font-size: var(--rw-text-sm); color: var(--rw-muted); }
.settings-list > .section-line { margin-bottom: 0; }
.panel-note { background: var(--rw-cream); border: 1px solid var(--rw-border); border-radius: var(--rw-radius); padding: var(--rw-space-3) var(--rw-space-4); }

/* Subtle woodgrain divider — a few soft curves, never a fake texture */
.grain-divider {
    height: 14px; border: 0; margin: var(--rw-space-6) 0;
    background:
        radial-gradient(120% 70% at 20% 120%, transparent 60%, color-mix(in srgb, var(--rw-walnut) 18%, transparent) 61%, transparent 63%),
        radial-gradient(140% 80% at 70% -40%, transparent 60%, color-mix(in srgb, var(--rw-walnut) 14%, transparent) 61%, transparent 63%),
        linear-gradient(var(--rw-border), var(--rw-border)) center / 100% 1px no-repeat;
}

/* ---------------- Buttons ---------------- */
.btn {
    --_bg: var(--rw-surface); --_fg: var(--rw-ink); --_bd: var(--rw-border-strong);
    display: inline-flex; align-items: center; justify-content: center; gap: var(--rw-space-2);
    min-height: 38px; padding: 0 var(--rw-space-4); border-radius: var(--rw-radius-sm); border: 1px solid var(--_bd);
    background: var(--_bg); color: var(--_fg); font: inherit; font-weight: 550; font-size: var(--rw-text-base); cursor: pointer;
    text-decoration: none; white-space: nowrap; transition: background-color .12s, border-color .12s, color .12s;
}
.btn:hover { --_bg: var(--rw-bg-sunken); color: var(--_fg); }
.btn:focus-visible { outline: none; box-shadow: var(--rw-focus); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { --_bg: var(--rw-forest); --_fg: #fff; --_bd: var(--rw-forest); }
.btn-primary:hover { --_bg: var(--rw-forest-hover); --_fg: #fff; }
.btn-walnut { --_bg: var(--rw-walnut); --_fg: #fff; --_bd: var(--rw-walnut); }
.btn-walnut:hover { --_bg: var(--rw-walnut-dark); --_fg: #fff; }
.btn-soft { --_bg: var(--rw-forest-soft); --_fg: var(--rw-forest-text); --_bd: var(--rw-forest-border); }
.btn-ghost { --_bg: transparent; --_bd: transparent; }
.btn-danger { --_bg: var(--rw-surface); --_fg: var(--rw-danger); --_bd: var(--rw-danger-border); }
.btn-danger:hover { --_bg: var(--rw-danger-soft); }
.btn-danger-solid { --_bg: var(--rw-danger); --_fg: #fff; --_bd: var(--rw-danger); }
.btn-warning { --_bg: var(--rw-warning-soft); --_fg: var(--rw-warning); --_bd: var(--rw-warning-border); }
.btn-sm { min-height: 30px; padding: 0 var(--rw-space-3); font-size: var(--rw-text-sm); }
.btn-lg { min-height: 48px; padding: 0 var(--rw-space-6); font-size: var(--rw-text-md); }
.btn-block { width: 100%; }
.btn-icon { width: 38px; padding: 0; }
.btn-group { display: flex; flex-wrap: wrap; gap: var(--rw-space-2); }

/* ---------------- Forms ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-weight: 600; font-size: var(--rw-text-sm); color: var(--rw-ink-strong); }
.hint { font-size: var(--rw-text-xs); color: var(--rw-muted); }
.input, .select, .textarea, input.form-control, select.form-control, textarea.form-control {
    width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--rw-border-strong); border-radius: var(--rw-radius-sm);
    background: var(--rw-surface); color: var(--rw-ink); font: inherit; font-size: max(16px, var(--rw-text-base));
}
.textarea, textarea.form-control { min-height: 96px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus, .form-control:focus { outline: none; border-color: var(--rw-forest); box-shadow: var(--rw-focus); }
.input.mono { font-family: var(--rw-font-mono); }
.check { display: flex; align-items: center; gap: var(--rw-space-2); min-height: 32px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--rw-forest); }
.form-grid { display: grid; gap: var(--rw-space-4); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.form-actions { display: flex; gap: var(--rw-space-2); flex-wrap: wrap; justify-content: flex-end; margin-top: var(--rw-space-4); }
.validation-message { color: var(--rw-danger); font-size: var(--rw-text-sm); }
.invalid { border-color: var(--rw-danger) !important; }
.otp { font-family: var(--rw-font-mono); font-size: 1.6rem; letter-spacing: .4em; text-indent: .4em; text-align: center; font-weight: 700; }
.filters { display: flex; flex-wrap: wrap; gap: var(--rw-space-2); align-items: center; margin-bottom: var(--rw-space-4); }
.filters .input, .filters .select { width: auto; min-width: 160px; }
.filter-chip {
    display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: var(--rw-radius-pill);
    border: 1px solid var(--rw-border); background: var(--rw-surface); color: var(--rw-ink); text-decoration: none; font-size: var(--rw-text-sm); cursor: pointer;
}
.filter-chip.active { background: var(--rw-forest-soft); border-color: var(--rw-forest-border); color: var(--rw-forest-text); font-weight: 600; }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: var(--rw-text-base); }
.table th { text-align: left; font-size: var(--rw-text-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--rw-muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--rw-border); background: var(--rw-surface-tinted); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--rw-border-subtle); vertical-align: top; }
.table tbody tr:hover { background: var(--rw-surface-tinted); }
.table tr.is-test td:first-child { box-shadow: inset 3px 0 0 var(--rw-env); }
.table .num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-compact td, .table-compact th { padding: 6px 10px; }
/* Phones: .table-stack turns each row into a small two-column card. The first cell spans the card;
   other cells show their data-label above the value; .span-all cells take the full width. */
@media (max-width: 640px) {
    .table-stack thead { display: none; }
    .table-stack, .table-stack tbody { display: block; }
    .table-stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: var(--rw-space-2) var(--rw-space-4); padding: var(--rw-space-3) var(--rw-space-4); border-bottom: 1px solid var(--rw-border-subtle); }
    .table-stack td { display: block; border: 0; padding: 0; min-width: 0; }
    .table-stack td.num { text-align: left; }
    .table-stack td:first-child, .table-stack td.span-all { grid-column: 1 / -1; }
    .table-stack td[data-label]::before { content: attr(data-label); display: block; font-size: var(--rw-text-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--rw-muted); font-weight: 600; margin-bottom: 1px; }
    .table-stack td:empty { display: none; }
    .table-stack tr.is-test { box-shadow: inset 3px 0 0 var(--rw-env); }
    .table-stack tr.is-test td:first-child { box-shadow: none; }
}
.row-link { color: inherit; text-decoration: none; font-weight: 600; }
.row-link:hover { color: var(--rw-forest-text); text-decoration: underline; }
.def { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 6px var(--rw-space-4); margin: 0; }
.def dt { color: var(--rw-muted); font-size: var(--rw-text-sm); }
.def dd { margin: 0; min-width: 0; overflow-wrap: anywhere; } /* a long folder path or address wraps instead of widening the page */
/* A 320px phone (or a larger one with Display Zoom) has no room for a 120px label column beside a date box or a button:
   the label goes above its value. */
@media (max-width: 359.98px) {
    .def { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
    .def dd + dt { margin-top: var(--rw-space-2); }
}
.def .critical { font-weight: 700; color: var(--rw-ink-strong); }

/* ---------------- Badges, pills, chips ---------------- */
.badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--rw-radius-pill); font-size: var(--rw-text-xs);
    font-weight: 650; letter-spacing: .02em; border: 1px solid transparent; white-space: nowrap; line-height: 1.6;
    background: var(--rw-neutral-soft); color: var(--rw-muted); border-color: var(--rw-border);
}
.badge-success { background: var(--rw-success-soft); color: var(--rw-success); border-color: var(--rw-success-border); }
.badge-warning { background: var(--rw-warning-soft); color: var(--rw-warning); border-color: var(--rw-warning-border); }
.badge-danger { background: var(--rw-danger-soft); color: var(--rw-danger); border-color: var(--rw-danger-border); }
.badge-info { background: var(--rw-info-soft); color: var(--rw-info); border-color: var(--rw-info-border); }
.badge-primary { background: var(--rw-forest-soft); color: var(--rw-forest-text); border-color: var(--rw-forest-border); }
.badge-walnut { background: var(--rw-walnut-soft); color: var(--rw-walnut); border-color: #e2d3c7; }
.badge-test { background: #f3e8fb; color: var(--rw-env-dark); border-color: #dcc2f0; }

.species { display: inline-flex; align-items: center; gap: 6px; font-size: var(--rw-text-sm); font-weight: 600; white-space: nowrap; }
.species::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--_c, var(--rw-subtle)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.species-walnut { --_c: var(--rw-species-walnut); }
.species-cherry { --_c: var(--rw-species-cherry); }
.species-maple { --_c: var(--rw-species-maple); }
.species-mahogany { --_c: var(--rw-species-mahogany); }
.species-oak { --_c: var(--rw-species-oak); }

.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--rw-text-sm); white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--_s, var(--rw-subtle)); }
.status-ready { --_s: var(--rw-success); }
.status-active { --_s: var(--rw-info); }
.status-blocked { --_s: var(--rw-danger); }
.status-review { --_s: var(--rw-warning); }
.status-done { --_s: var(--rw-forest); }
.jobno { font-family: var(--rw-font-mono); font-weight: 700; letter-spacing: .01em; }

/* ---------------- Alerts / messages ---------------- */
.alert { display: flex; gap: var(--rw-space-3); padding: var(--rw-space-3) var(--rw-space-4); border-radius: var(--rw-radius); border: 1px solid var(--rw-border); background: var(--rw-surface); align-items: flex-start; }
.alert svg { flex: none; margin-top: 2px; }
.alert-info { background: var(--rw-info-soft); border-color: var(--rw-info-border); color: var(--rw-info); }
.alert-success { background: var(--rw-success-soft); border-color: var(--rw-success-border); color: var(--rw-success); }
.alert-warning { background: var(--rw-warning-soft); border-color: var(--rw-warning-border); color: var(--rw-warning); }
.alert-danger { background: var(--rw-danger-soft); border-color: var(--rw-danger-border); color: var(--rw-danger); }
.alert strong { color: inherit; }
.alert a { color: inherit; font-weight: 600; }
.alert ul { margin: 4px 0 0; padding-left: 1.1em; }

/* ---------------- Dashboard ---------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--rw-space-3); }
.kpi { background: var(--rw-surface); border: 1px solid var(--rw-border); border-radius: var(--rw-radius); padding: var(--rw-space-3) var(--rw-space-4); text-decoration: none; color: inherit; display: block; }
a.kpi:hover { border-color: var(--rw-forest-border); box-shadow: var(--rw-shadow-sm); }
.kpi-label { font-size: var(--rw-text-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--rw-muted); font-weight: 600; }
.kpi-value { font-size: var(--rw-text-2xl); font-weight: 700; color: var(--rw-ink-strong); font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 2px; }
.kpi-hint { font-size: var(--rw-text-xs); color: var(--rw-subtle); }
.due-overdue { color: var(--rw-danger); font-weight: 700; }
.due-soon { color: var(--rw-warning); font-weight: 700; }
/* Shop dashboard + Production Board (layout lives in each page's .razor.css) */
.due-label { font-size: var(--rw-text-xs); font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--rw-muted); white-space: nowrap; }
.due-label.due-late { color: var(--rw-danger); }
.due-label.due-near { color: var(--rw-warning); }
.test-mark { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--rw-env); vertical-align: 1px; font-family: var(--rw-font); }   /* no opacity: at .7 the purple was 3.75:1 on white, under WCAG AA's 4.5 (axe, 2026-11-25) */
.reason { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; line-height: 1.7; padding: 0 7px; border-radius: var(--rw-radius-pill); border: 1px solid var(--rw-border); color: var(--rw-muted); background: var(--rw-surface); white-space: nowrap; }
.reason.tone-critical { background: var(--rw-danger); border-color: var(--rw-danger); color: #fff; }
.reason.tone-warning { background: var(--rw-warning-soft); border-color: var(--rw-warning-border); color: var(--rw-warning); }
.reason.tone-info { background: var(--rw-info-soft); border-color: var(--rw-info-border); color: var(--rw-info); }
.count-pill { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 8px; border-radius: var(--rw-radius-pill); background: var(--rw-neutral-soft); color: var(--rw-muted); font-size: var(--rw-text-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.count-pill.has { background: var(--rw-ink-strong); color: #fff; }

/* ---------------- Timeline (routing + customer tracking) ---------------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 var(--rw-space-4) 34px; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 22px; bottom: -2px; width: 2px; background: var(--rw-border); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--rw-surface); border: 2px solid var(--rw-border-strong); color: var(--rw-subtle); font-size: 12px; font-weight: 800; }
.timeline .done .dot { background: var(--rw-forest); border-color: var(--rw-forest); color: #fff; }
.timeline .done::before { background: var(--rw-forest-border); }
.timeline .current .dot { border-color: var(--rw-walnut); background: var(--rw-walnut); color: #fff; box-shadow: 0 0 0 5px color-mix(in srgb, var(--rw-walnut) 18%, transparent); }
.timeline .step-name { font-weight: 650; }
.timeline .upcoming .step-name { color: var(--rw-subtle); font-weight: 500; }
.timeline .step-desc { font-size: var(--rw-text-sm); color: var(--rw-muted); }

/* ---------------- Shop-floor (QR) page: big, legible, touch-first ---------------- */
.shop { max-width: 640px; margin: 0 auto; padding: var(--rw-space-4); }
.shop-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--rw-space-3); }
.shop-jobno { font-family: var(--rw-font-mono); font-size: 2.1rem; font-weight: 800; letter-spacing: .01em; line-height: 1; color: var(--rw-ink-strong); }
.shop-title { font-size: var(--rw-text-lg); font-weight: 600; margin-top: 6px; }
.shop-now { background: var(--rw-walnut); color: #fff; border-radius: var(--rw-radius-lg); padding: var(--rw-space-4) var(--rw-space-5); margin: var(--rw-space-4) 0; }
.shop-now .label { color: rgba(255,255,255,.75); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.shop-now .value { font-size: 1.7rem; font-weight: 800; line-height: 1.15; }
.shop-now .sub { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: var(--rw-text-sm); color: rgba(255,255,255,.88); flex-wrap: wrap; }
.shop-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--rw-space-3); }
.shop-actions .btn { min-height: var(--rw-touch-shop); font-size: 1.15rem; border-radius: var(--rw-radius); width: 100%; white-space: normal; }
.shop-actions .secondary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--rw-space-3); }
.shop-actions .secondary .btn { font-size: 1rem; }
.shop-actions form { margin: 0; }
.shop-spec { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: var(--rw-text-md); }
.shop-spec dt { color: var(--rw-muted); }
.shop-spec dd { margin: 0; font-weight: 600; }
.shop-spec .critical { color: var(--rw-ink-strong); font-weight: 800; }
details.shop-more { background: var(--rw-surface); border: 1px solid var(--rw-border); border-radius: var(--rw-radius); padding: var(--rw-space-3) var(--rw-space-4); }
details.shop-more summary { font-weight: 650; cursor: pointer; min-height: 32px; display: flex; align-items: center; }

/* ---------------- Public / customer portal ---------------- */
/* The customer site reads larger and wider than the staff screens (owner's review of 0.7.4, 2026-11-16: "much slimmer and smaller
   ... harder to read everything, and a lot of empty space on the sides"). Its own type scale, every size a step up from the staff
   screens' (text 17px instead of 15px, small print 15px instead of 13px, a form field's words 17px), and its own width: up to 1360px
   of page between side margins that grow with the window (16px on a phone, 48px on a computer), where it was 1120px. Set here once,
   so every customer page, its header, phone menu and footer follow; the staff screens keep the tokens in :root.
   Centred on a computer (owner's testing, 2026-11-17: "all content is now on the sides of the screen, They used to be centered"): at
   1440px the 1360px page ran almost edge to edge (48px margins). A gutter outside the page now grows from nothing at tablet width
   (800px) to 96px (1600px and wider), so a 1440px screen keeps about 125px of room each side and a 1920px one shows the full 1360px. */
.public {
    --rw-text-xs: .8125rem; --rw-text-sm: .9375rem; --rw-text-base: 1.0625rem; --rw-text-md: 1.125rem;
    --rw-text-lg: 1.25rem; --rw-text-xl: 1.5rem; --rw-text-2xl: 1.75rem; --rw-text-3xl: 2.125rem; --rw-text-4xl: 2.75rem;
    --rw-page-pad: clamp(1rem, 3.5vw, 3rem);
    --rw-public-gutter: clamp(0px, 12vw - 6rem, 6rem);
    --rw-public-width: min(calc(1360px + 2 * var(--rw-page-pad)), calc(100% - 2 * var(--rw-public-gutter)));
    min-height: 100vh; display: flex; flex-direction: column; background: var(--rw-bg); font-size: var(--rw-text-base); line-height: 1.6;
}
.public-header { background: var(--rw-surface); border-bottom: 1px solid var(--rw-border); padding-top: var(--rw-safe-top); }
.public-nav { max-width: var(--rw-public-width); margin: 0 auto; padding: var(--rw-space-3) var(--rw-page-pad); display: flex; align-items: center; gap: var(--rw-space-5); flex-wrap: wrap; }
.public-nav .links { display: flex; gap: var(--rw-space-5); flex-wrap: wrap; margin-left: auto; align-items: center; }
.public-nav .links a { color: var(--rw-ink); text-decoration: none; font-weight: 550; }
.public-nav .links a:hover, .public-nav .links a.active { color: var(--rw-walnut); }
/* The customer site's nav (PublicLayout): the logo (Home), then plain links in the same row. Below 880px the links fold under
   one Menu button (a <details>, no script needed) at the right of that row, opening as a full-width panel of 48px rows. Every
   link is at least 44px tall to tap. */
.site-nav { position: relative; flex-wrap: nowrap; }
.site-nav .brand { min-width: 0; }
.site-nav .brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* One row: with every link showing (Contact since 2026-11-15, and a staff member's My orders + Shop Ops on the single-address set-up)
   the shop's name shortens with "…" just above 880px, rather than a link wrapping under the others. */
.site-nav .site-links { flex-wrap: nowrap; white-space: nowrap; }
.site-nav .site-links a { min-height: var(--rw-touch); display: inline-flex; align-items: center; }
.site-nav .site-links .btn { min-height: 36px; }
.site-menu { display: none; margin-left: auto; flex: none; }
.site-menu-button {
    list-style: none; display: inline-flex; align-items: center; gap: var(--rw-space-2); min-height: var(--rw-touch); min-width: var(--rw-touch);
    padding: 0 var(--rw-space-4) 0 var(--rw-space-3); border: 1px solid var(--rw-border); border-radius: var(--rw-radius); background: var(--rw-surface);
    color: var(--rw-ink-strong); font-weight: 600; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
    font-size: .9375rem;  /* its 0.7.4 size, not the customer site's larger text: the shop's whole name still fits beside it on a 320px phone */
}
.site-menu-button::-webkit-details-marker { display: none; }
.site-menu-button::marker { content: ""; }
.site-menu-button:hover { border-color: var(--rw-walnut); }
.site-menu-button:focus-visible { outline: none; box-shadow: var(--rw-focus); }
.site-menu-open, .site-menu-close { display: inline-flex; }
.site-menu-close, .site-menu[open] .site-menu-open { display: none; }
.site-menu[open] .site-menu-close { display: inline-flex; }
.site-menu[open] .site-menu-button { background: var(--rw-cream); border-color: var(--rw-walnut); }
.site-menu-panel {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 60; display: flex; flex-direction: column;
    padding: var(--rw-space-1) var(--rw-page-pad) var(--rw-space-4); background: var(--rw-surface);
    border-bottom: 1px solid var(--rw-border); box-shadow: var(--rw-shadow-md);
}
.site-menu-panel a {
    display: flex; align-items: center; min-height: 48px; padding: 0 var(--rw-space-1); border-bottom: 1px solid var(--rw-border);
    color: var(--rw-ink); text-decoration: none; font-weight: 600; font-size: var(--rw-text-md);
}
.site-menu-panel a:hover, .site-menu-panel a.active { color: var(--rw-walnut); }
.site-menu-panel a.btn { justify-content: center; min-height: var(--rw-touch); margin-top: var(--rw-space-4); border: 1px solid var(--rw-border); }
@media (max-width: 879.98px) {
    .site-nav { gap: var(--rw-space-3); padding-block: var(--rw-space-2); }
    .site-nav .site-links { display: none; }
    .site-menu { display: block; }
}
/* The narrowest phones: the button is its icon alone (its word stays for screen readers), so the shop's name fits beside it. */
@media (max-width: 359.98px) {
    .site-menu-button { padding: 0; justify-content: center; }
    .site-menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}
.public-main { flex: 1; width: 100%; max-width: var(--rw-public-width); margin: 0 auto; padding: var(--rw-space-8) var(--rw-page-pad); }
.public-footer { border-top: 1px solid var(--rw-border); background: var(--rw-cream); color: var(--rw-muted); font-size: var(--rw-text-sm); padding-bottom: env(safe-area-inset-bottom, 0px); }
.public-footer .inner { max-width: var(--rw-public-width); margin: 0 auto; padding: var(--rw-space-6) var(--rw-page-pad); display: flex; justify-content: space-between; gap: var(--rw-space-4); flex-wrap: wrap; }
.display { font-family: var(--rw-font-display); font-weight: 600; letter-spacing: -.01em; }
.hero { display: grid; gap: var(--rw-space-8); grid-template-columns: 1.1fr .9fr; align-items: center; padding: var(--rw-space-6) 0 var(--rw-space-10); }
.hero h1 { font-family: var(--rw-font-display); font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.08; color: var(--rw-walnut-dark); }
.hero p { font-size: var(--rw-text-lg); color: var(--rw-muted); max-width: 52ch; }
.hero-art { border-radius: 22px; overflow: hidden; background: var(--rw-cream); border: 1px solid var(--rw-border); aspect-ratio: 4 / 3; display: grid; place-items: center; }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; } }
.product-card { background: var(--rw-surface); border: 1px solid var(--rw-border); border-radius: var(--rw-radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.product-card .art { aspect-ratio: 4 / 3; background: var(--rw-cream); display: grid; place-items: center; border-bottom: 1px solid var(--rw-border-subtle); }
.product-card .body { padding: var(--rw-space-4) var(--rw-space-5) var(--rw-space-5); display: flex; flex-direction: column; gap: var(--rw-space-2); flex: 1; }
.product-card h3 { font-family: var(--rw-font-display); font-size: var(--rw-text-xl); margin: 0; }
.product-card .price { color: var(--rw-walnut); font-weight: 700; }
.woods { display: flex; gap: 10px; flex-wrap: wrap; }
/* Test data on a public page (built-in mock Etsy shop): said plainly, never passed off as the real shop */
.test-notice { display: flex; gap: var(--rw-space-3); align-items: flex-start; margin: 0 0 var(--rw-space-6); padding: var(--rw-space-3) var(--rw-space-4); background: #f8f1fd; border: 1px dashed #c9a2e8; border-radius: var(--rw-radius); color: var(--rw-env-dark); max-width: 760px; }
.test-notice p { margin: 0; line-height: 1.55; }
.test-notice .badge { flex: none; margin-top: 2px; }
.test-listing-note { margin: 0; font-size: var(--rw-text-sm); color: var(--rw-env-dark); }
.btn:disabled.btn-test-listing, .btn-test-listing[aria-disabled="true"] { opacity: 1; cursor: not-allowed; background: var(--rw-neutral-soft); color: var(--rw-muted); border: 1px dashed var(--rw-border); box-shadow: none; }
.track-card { background: var(--rw-surface); border: 1px solid var(--rw-border); border-radius: var(--rw-radius-lg); padding: var(--rw-space-5); }
.track-status { font-family: var(--rw-font-display); font-size: var(--rw-text-3xl); color: var(--rw-walnut-dark); margin: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--rw-space-3); }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--rw-radius); border: 1px solid var(--rw-border); }
.auth-wrap { max-width: 440px; margin: var(--rw-space-8) auto; }
.auth-card { background: var(--rw-surface); border: 1px solid var(--rw-border); border-radius: var(--rw-radius-lg); padding: var(--rw-space-8); box-shadow: var(--rw-shadow-sm); }

/* ---------------- The customer site's look (.storefront) ---------------- */
/* The storefront project's first step (2026-11-22; docs/STOREFRONT.md → The look). PublicLayout puts .storefront beside .public on
   the customer site only: the shop's own address (its sign-in and messages, also drawn by PublicLayout) and every staff screen keep
   the tokens above, unchanged. Furniture-grade and quiet: the wood in the photos is the colour, so the page is a warm paper (never
   pure white, which made the photos' mixed backdrops look patchy, and less yellow than the staff screens' #faf7f2), all text is
   walnut ink, notes are graphite, buttons stay walnut and links forest. Every text colour passes WCAG AA on the paper, the stone
   bands and white (walnut ink 13.0:1 on the paper, graphite 5.2:1 on the paper and 4.7:1 on stone, forest 9.1:1, white on walnut
   10.1:1), and a field's edge is 3:1 so it can be seen. */

/* Two open-licence fonts (SIL OFL 1.1; the licences sit beside the files), served from this site: Libre Franklin for the words,
   Brygada 1918 for headings and piece names (chosen over Besley on 2026-11-22: docs/STOREFRONT.md → Fonts). Each is one variable
   file per alphabet: the Latin file (preloaded by PublicLayout, about 53 KB for both) and an extended-Latin one the browser only
   fetches for a page that has such a letter (a reviewer's name with "ł"). swap: the words show at once in the fallback font. */
@font-face {
    font-family: "Libre Franklin"; font-style: normal; font-weight: 100 900; font-display: swap;
    src: url("/fonts/libre-franklin/libre-franklin-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Libre Franklin"; font-style: normal; font-weight: 100 900; font-display: swap;
    src: url("/fonts/libre-franklin/libre-franklin-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Brygada 1918"; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url("/fonts/brygada-1918/brygada-1918-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Brygada 1918"; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url("/fonts/brygada-1918/brygada-1918-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --rw-sf-paper: #f8f6f3;     /* the page */
    --rw-sf-stone: #edebe7;     /* bands: the footer, the side panels, a greyed button */
    --rw-sf-ink: #3a281e;       /* walnut ink: all text */
    --rw-sf-ink-strong: #2f2018;/* headings */
    --rw-sf-graphite: #6b6762;  /* notes, captions, the footer's words */
    --rw-sf-forest: #2f4a2d;    /* links and the focus ring */
    --rw-sf-edge: #8f8a83;      /* a field's, a choice's or an outline button's edge: 3:1 on white and on the paper */
}
.storefront {
    --rw-bg: var(--rw-sf-paper);
    --rw-bg-sunken: var(--rw-sf-stone);
    --rw-cream: var(--rw-sf-stone);
    --rw-surface: #ffffff;
    --rw-surface-tinted: #fbfaf8;
    --rw-ink: var(--rw-sf-ink);
    --rw-ink-strong: var(--rw-sf-ink-strong);
    --rw-walnut-dark: var(--rw-sf-ink-strong);
    --rw-muted: var(--rw-sf-graphite);
    --rw-subtle: var(--rw-sf-graphite);
    --rw-border: #dedad3;
    --rw-border-subtle: #e8e5e0;
    --rw-border-strong: var(--rw-sf-edge);  /* fields, choices and outline buttons */
    --rw-forest: var(--rw-sf-forest);
    --rw-forest-text: var(--rw-sf-forest);
    /* A solid ring like the links' 2px outline (final check, 2026-11-22: the 30% forest ring was about 1.7:1 on the paper): a 2px paper
       gap, then 2px of forest (9:1 on the paper), so it shows on the walnut buttons and on white fields alike (WCAG 1.4.11, 3:1). */
    --rw-focus: 0 0 0 2px var(--rw-sf-paper), 0 0 0 4px var(--rw-sf-forest);
    --rw-font: "Libre Franklin", "Franklin Gothic Book", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --rw-font-display: "Brygada 1918", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    /* Corners by role (no more 14-22px cards): photos and panels nearly square, like prints; buttons, fields and choices 6px, so
       they read as things to press. No drop shadows: a panel is a stone band, not a floating card. */
    --rw-radius-photo: 2px;
    --rw-radius-panel: 2px;
    --rw-radius-sm: 6px; --rw-radius: 6px; --rw-radius-lg: 6px;
    --rw-shadow-xs: none; --rw-shadow-sm: none;
    font-family: var(--rw-font);
    color: var(--rw-ink);
}
@media (prefers-contrast: more) { .storefront { --rw-border: #a89f8c; --rw-muted: #4f4a41; } }
/* The page around the site (an iPhone's rubber-band scroll) in the same paper. */
body:has(> .storefront) { background: var(--rw-sf-paper); }
.storefront .display { letter-spacing: -.005em; }
.storefront .public-header { background: var(--rw-bg); }
.storefront .brand-name { color: var(--rw-ink-strong); }
.storefront .site-menu-button { border-color: var(--rw-sf-edge); }
.storefront .site-menu[open] .site-menu-button { background: var(--rw-bg-sunken); }
.storefront .site-menu-panel { background: var(--rw-bg); }
/* Buttons: walnut for the main one (a sign-in or 404 page's forest "primary" reads as the customer site's walnut here), an outline
   in the edge colour for the rest (--rw-border-strong above), both 6px. */
.storefront .btn-primary { --_bg: var(--rw-walnut); --_fg: #fff; --_bd: var(--rw-walnut); }
.storefront .btn-primary:hover { --_bg: var(--rw-walnut-dark); --_fg: #fff; }
/* Sign-in, the messages and 404 on the customer site: on the page itself, no floating card. */
.storefront .auth-card { background: transparent; border: 0; padding: var(--rw-space-4) 0; }
.storefront .photo-grid img { border-radius: var(--rw-radius-photo); }
/* A shop announcement (Settings): a stone band under the header. */
.storefront .public-announcement { margin: 0; padding: var(--rw-space-3) var(--rw-page-pad); background: var(--rw-bg-sunken); color: var(--rw-ink); text-align: center; }

/* Skip to the page's own content, past the header (keyboard and screen-reader visitors): the first thing Tab reaches, shown only
   while it has focus. */
.skip-link {
    position: absolute; z-index: 200; top: calc(var(--rw-safe-top) + var(--rw-space-2)); left: max(var(--rw-space-2), env(safe-area-inset-left, 0px));
    display: inline-flex; align-items: center; min-height: var(--rw-touch); padding: 0 var(--rw-space-4);
    background: var(--rw-walnut); color: #fff; border-radius: var(--rw-radius-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { color: #fff; outline: 2px solid var(--rw-ink-strong); outline-offset: 2px; }
.skip-link:not(:focus) { width: 1px; height: 1px; min-height: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.storefront .public-main:focus { outline: none; }
/* About's walnut bands run the width of the window (About.razor.css works that width out with 100vw). Where a scrollbar takes room
   that is a few pixels more than the page, in a window wider than 1648px: cut off here, so the page never scrolls sideways. clip,
   not hidden: the page still scrolls as a whole and nothing inside it stops sticking. */
.storefront:has([data-about]) { overflow-x: clip; }

/* The footer: a stone band; the shop's name with "Dayton, Ohio" under it, and links at least 44px tall to tap (they were 24px). */
.storefront .public-footer { background: var(--rw-bg-sunken); border-top: 0; }
.storefront .public-footer .inner { align-items: center; }
/* A piece's page on a phone keeps its buy bar at the bottom of the screen (ShopItem): the footer ends above it, script or not. */
@media (max-width: 860px) {
    .storefront:has([data-buybar]) .public-footer { padding-bottom: calc(var(--rw-touch) + var(--rw-space-8) + env(safe-area-inset-bottom, 0px)); }
}
.footer-name { margin: 0; display: flex; flex-direction: column; line-height: 1.35; }
.footer-name .display { font-size: var(--rw-text-lg); color: var(--rw-ink-strong); }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--rw-space-5); }
.footer-links a { display: inline-flex; align-items: center; min-height: var(--rw-touch); overflow-wrap: anywhere; }

/* ---------------- Misc components ---------------- */
.empty { text-align: center; color: var(--rw-muted); padding: var(--rw-space-8) var(--rw-space-4); }
.empty svg { color: var(--rw-border-strong); margin-bottom: var(--rw-space-2); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rw-border); margin-bottom: var(--rw-space-4); overflow-x: auto; }
.tab { padding: 10px 14px; border: 0; background: none; font: inherit; color: var(--rw-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; font-weight: 550; }
.tab.active { color: var(--rw-forest-text); border-bottom-color: var(--rw-forest); }
.diff-old { background: var(--rw-danger-soft); color: var(--rw-danger); text-decoration: line-through; padding: 0 4px; border-radius: 4px; }
.diff-new { background: var(--rw-success-soft); color: var(--rw-success); padding: 0 4px; border-radius: 4px; font-weight: 700; }
.svg-preview { background: #fff; border: 1px solid var(--rw-border); border-radius: var(--rw-radius); padding: var(--rw-space-2); overflow: auto; }
.svg-preview svg { width: 100%; height: auto; max-height: 520px; }
.cost-table td.num { width: 120px; }
.cost-section td { background: var(--rw-surface-tinted); font-weight: 700; color: var(--rw-ink-strong); }
.cost-total td { font-weight: 800; border-top: 2px solid var(--rw-border-strong); }
.pos { color: var(--rw-success); }
.neg { color: var(--rw-danger); }
.tip { border-bottom: 1px dotted var(--rw-subtle); cursor: help; }
.kbd { font-family: var(--rw-font-mono); font-size: .85em; border: 1px solid var(--rw-border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--rw-surface); }
.pre { white-space: pre-wrap; font-family: var(--rw-font-mono); font-size: var(--rw-text-sm); background: var(--rw-bg-sunken); border: 1px solid var(--rw-border); border-radius: var(--rw-radius-sm); padding: var(--rw-space-3); overflow-x: auto; }
.markdown h1 { font-size: var(--rw-text-xl); } .markdown h2 { font-size: var(--rw-text-lg); margin-top: var(--rw-space-5); } .markdown h3 { font-size: var(--rw-text-md); }
.markdown ul { padding-left: 1.3em; } .markdown code { background: var(--rw-bg-sunken); padding: 0 4px; border-radius: 4px; }
.toast { position: fixed; right: calc(var(--rw-space-4) + env(safe-area-inset-right, 0px)); bottom: calc(var(--rw-space-4) + env(safe-area-inset-bottom, 0px)); z-index: 90; max-width: 420px; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
/* Before a staff page is drawn (no prerendering): "Loading…" in its place, gone as soon as the page is drawn after it. */
.boot-loading { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40vh; color: var(--rw-muted); font-size: var(--rw-text-sm); }
body:has(> .boot-loading + :not(script, dialog)) > .boot-loading { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
dialog.modal { border: 1px solid var(--rw-border); border-radius: var(--rw-radius-lg); padding: 0; max-width: min(640px, 94vw); width: 100%; box-shadow: var(--rw-shadow-md); }
dialog.modal::backdrop { background: var(--rw-overlay); }
.modal-head { padding: var(--rw-space-4) var(--rw-space-5); border-bottom: 1px solid var(--rw-border-subtle); display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; font-size: var(--rw-text-lg); }
.modal-body { padding: var(--rw-space-5); }
.modal-foot { padding: var(--rw-space-3) var(--rw-space-5); border-top: 1px solid var(--rw-border-subtle); display: flex; justify-content: flex-end; gap: var(--rw-space-2); background: var(--rw-surface-tinted); }

/* File drops (app.js, data-drop-for): a Production card, an order line or a Files card files are dragged over says where they go.
   data-drop-label is the sentence ("Drop to add to RW-1048"). */
[data-drop-for].is-drop-over { position: relative; outline: 2px dashed var(--rw-forest); outline-offset: 2px; background-color: var(--rw-forest-soft); }
[data-drop-for][data-drop-label].is-drop-over::after {
    content: attr(data-drop-label); position: absolute; inset: auto 8px 8px auto; z-index: 2; pointer-events: none;
    padding: 4px 10px; border-radius: var(--rw-radius-pill); background: var(--rw-forest); color: var(--rw-on-dark); font-size: var(--rw-text-sm); font-weight: 650;
}

/* Blazor */
#blazor-error-ui {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; background: var(--rw-danger-soft); color: var(--rw-danger); border-top: 1px solid var(--rw-danger-border); box-shadow: var(--rw-shadow-md);
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
#blazor-error-ui .reload { font-weight: 700; margin-left: 8px; }
#blazor-error-ui .dismiss { cursor: pointer; float: right; }
.blazor-error-boundary { background: var(--rw-danger-soft); border: 1px solid var(--rw-danger-border); color: var(--rw-danger); padding: 1rem; border-radius: var(--rw-radius); }
.blazor-error-boundary::after { content: "Something went wrong on this part of the page. It has been logged — reload to try again."; }

/* ---------------- Print (production sheets printed from the browser) ---------------- */
@media print {
    .sidebar, .topbar, .tabbar, .env-banner, .no-print, .btn { display: none !important; }
    body { background: #fff; }
    .card { box-shadow: none; }
    .page { padding: 0; max-width: none; }
}
