/* Roadside theme: a calm, data-dense workspace in the Dirt Road Software design system (dirtroadsoftware.com,
   docs/BRAND.md): DM Sans text, Libre Baskerville headings, DRS ink green and harvest orange, flat cards with
   small corners. The look is fixed: workspaces don't recolour the admin. The light tokens map onto DRS's own;
   the dark theme is derived from DRS ink's hue and its dark sections (DRS itself is light only).
   Customer pages that load this file (store, blog, pay, email list) re-derive accent shades under .shop-page.
   Local assets only (CSP style-src 'self'). Breakpoints: 560, 760, 900 and 1100px. Text is never below 12px. */
/* Fonts (SIL Open Font License, see fonts/*-OFL.txt). */
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/dm-sans-regular.ttf') format('truetype'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/dm-sans-bold.ttf') format('truetype'); }
@font-face { font-family: 'Libre Baskerville'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/libre-baskerville.ttf') format('truetype'); }

:root {
  /* Surfaces and text, from dirtroadsoftware.com: --paper is DRS mist, --surface DRS paper, --ink and --ink-2 DRS ink and body. */
  --paper: #F2F5F1;
  --paper-2: #E7EEE4;
  --tan-2: #BAC7B8;
  --surface: #FFFFFF;
  --surface-2: #F8FAF7;
  --ink: #19392D;
  --ink-2: #4D5B53;
  --muted: #5F6A5B;
  --line: #D8DFD6;
  --line-strong: #CCD7C9;
  /* Field borders and placeholders: DRS colours that pass WCAG AA (3:1 for borders, 4.5:1 for text). */
  --field-line: #788C7C;
  --placeholder: #687166;
  /* Brand. Primary buttons are DRS orange with dark green text, like the website's calls to action. */
  --accent: #F18A43;
  --accent-hover: #FFA361;
  --accent-ink: #182C22;
  --accent-strong: color-mix(in srgb, var(--accent) 70%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, var(--surface));
  --accent-text: #A84B20;
  --link-line: #8D9D8A;
  /* DRS rust, not its #E96C25 ring, which is only 2.88:1 on mist. */
  --focus: #A84B20;
  /* The sidebar is DRS ink in both themes, with DRS's on-dark colours. */
  --sidebar-bg: #19392D;
  --sidebar-ink: #D5DFD2;
  --sidebar-muted: #C0D1B2;
  --sidebar-hover: #274638;
  --sidebar-current: #36533F;
  --sidebar-line: #54705B;
  --sidebar-accent: #F4AD72;
  /* The sidebar follows the theme (Erran, Oct 17: readable in the light theme). Light: a tinted light green-grey on the page's
     surface, dark ink (10:1), the muted ink for locked screens still 5.6:1, a light-green pill for the current page. The top
     menu and its account panel keep DRS ink in both themes (--sidebar-* above). */
  --side-bg: #E9EFE6;
  --side-edge: #CCD7C9;
  --side-ink: #19392D;
  --side-strong: #0E2019;
  --side-muted: #4E6153;
  --side-hover: #DCE5D8;
  --side-current: #BFD8BC;
  --side-current-ink: #0E2019;
  --side-line: #CCD7C9;
  --side-shade: rgba(25, 57, 45, .09);
  --side-accent: #A84B20;
  --side-focus: #A84B20;
  --side-field-bg: #FFFFFF;
  --side-field-ink: #19392D;
  --side-field-line: #8D9D8A;
  --side-switch-on-bg: #19392D;
  --side-switch-on-ink: #FFFFFF;
  --side-scheme: light;
  /* The light surface the Dirt Road Software logo sits on (its wordmark is black). */
  --brand-plate: #FFFFFF;
  /* Semantic tones: text on its soft background passes WCAG AA. ok and warn are DRS colours; DRS has no danger, info or violet. */
  --ok: #557747; --ok-soft: #F2F5EF;
  --warn: #945024; --warn-soft: #FFF5DF;
  --danger: #B42318; --danger-soft: #FDE8E7;
  --info: #1D5FBF; --info-soft: #E5EEFB;
  --violet: #6941C6; --violet-soft: #EFEBFA;
  --radius: 6px; --radius-sm: 4px;
  /* DRS cards and fields are flat at rest. */
  --shadow: none;
  --shadow-pop: 0 12px 30px rgba(25, 57, 45, .08);
  --shadow-lift: 0 6px 14px rgba(25, 57, 45, .07);
  --shadow-dialog: 0 20px 100px rgba(19, 44, 37, .5);
  --scrim: rgba(12, 30, 23, .66);
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --sidebar-w: 268px;
  /* DRS's header height on narrow screens: holds the 192×56 logo with 8px clear above and below. */
  --topbar-h: 72px;
  /* One horizontal inset for the top bar, the banners, the page and the footer, so crumbs, banner text, titles and the
     footer share a left edge (16px on a phone, see the 560px block). */
  --content-pad: clamp(16px, 3vw, 40px);
  color-scheme: light;
}
/* Dark (opt-in per browser): lightness steps of DRS ink's hue, with the text, border and accent colours of DRS's dark sections. */
html[data-theme=dark] {
  --paper: #0E2019;
  --paper-2: #163227;
  --tan-2: #54705B;
  --surface: #11271F;
  --surface-2: #142C23;
  --ink: #EDF0E8;
  --ink-2: #D6E2D0;
  --muted: #B4C4B5;
  --line: #2C4A38;
  --line-strong: #36533F;
  --field-line: #6D8572;
  --placeholder: #93A186;
  --accent-soft: color-mix(in srgb, var(--accent) 18%, var(--surface));
  --accent-text: #F4AD72;
  --link-line: #6D8572;
  --focus: #F4AD72;
  --brand-plate: #E3EBDF;
  --side-bg: #19392D;
  --side-edge: #19392D;
  --side-ink: #D5DFD2;
  --side-strong: #FFFFFF;
  --side-muted: #C0D1B2;
  --side-hover: #274638;
  --side-current: #36533F;
  --side-current-ink: #FFFFFF;
  --side-line: #54705B;
  --side-shade: rgba(0, 0, 0, .4);
  --side-accent: #F4AD72;
  --side-focus: #FFFFFF;
  --side-field-bg: #274638;
  --side-field-ink: #FFFFFF;
  --side-field-line: #6D8572;
  --side-switch-on-bg: #E5EEDD;
  --side-switch-on-ink: #19392D;
  --side-scheme: dark;
  --ok: #6FD49A; --ok-soft: rgba(52, 199, 116, .14);
  --warn: #F5B95C; --warn-soft: rgba(245, 166, 35, .14);
  --danger: #FF9C92; --danger-soft: rgba(255, 107, 94, .14);
  --info: #8AB8F5; --info-soft: rgba(84, 150, 255, .15);
  --violet: #C4B0FF; --violet-soft: rgba(150, 120, 255, .16);
  --shadow: none;
  --shadow-pop: 0 18px 50px rgba(0, 0, 0, .55);
  --shadow-lift: 0 6px 14px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
/* Links: DRS's text-link colours (a grey-green underline that turns rust with the text on hover). */
a { color: inherit; text-decoration-color: var(--link-line); text-underline-offset: 3px; }
a:hover { color: var(--accent-text); text-decoration-color: currentColor; }
h1, h2, h3 { font-family: var(--font); font-weight: 700; letter-spacing: 0; margin: 0; color: var(--ink); }
/* Page titles and section titles use the website's serif at its one weight; cards and smaller headings stay in DM Sans. */
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.3vw, 31px); line-height: 1.22; }
p { margin: 0 0 .75em; }
code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
small { font-size: 12px; }
kbd { display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; font: 700 12px/17px var(--font); color: var(--muted); text-align: center; background: var(--surface-2); }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; vertical-align: -3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* The hidden attribute always wins, even over a class that sets display (.button is inline-flex). */
[hidden] { display: none !important; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }
/* One keyboard focus ring everywhere. */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.eyebrow { text-transform: uppercase; letter-spacing: 0; font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 8px; }
/* The website's short accent rule before a page's eyebrow (DRS .small-line, 27×1). */
.page-head .eyebrow::before, .plan-band-head .eyebrow::before { content: ''; display: inline-block; width: 27px; height: 1px; margin-right: 10px; vertical-align: middle; background: var(--accent); }
.lead { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.req { color: var(--danger); }

/* Buttons: one primary per view, ghost for the rest. */
/* Dense admin sizes (38px, small 32px); DRS's own colours: orange with a lighter orange hover, outline, deep green. */
.button { display: inline-flex; align-items: center; gap: 8px; justify-content: center; min-height: 38px; padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: 700 13px/1.2 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer; box-shadow: none; transition: background .15s, border-color .15s, color .15s; }
.button .icon { width: 16px; height: 16px; }
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button--ghost { background: var(--surface); color: var(--ink); border-color: var(--tan-2); box-shadow: none; }
.button--ghost:hover { background: var(--paper); border-color: var(--tan-2); color: var(--ink); }
/* The product editor's "New brand name" box, under the Brand picker (product-editor.js). */
.brand-new { margin-top: 10px; }
.button.is-waiting, .button.is-waiting:hover { background: var(--surface); color: var(--muted); cursor: default; opacity: .75; }
/* "Publishing to your website…" (product page): an accent glow that breathes slowly while the publish runs, so it's noticed;
   with reduced motion it holds still at half glow. */
.button.is-publishing, .button.is-publishing:hover { opacity: 1; color: var(--ink); border-color: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 0 10px 1px color-mix(in srgb, var(--accent) 35%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .button.is-publishing { animation: publish-breathe 2.4s ease-in-out infinite; }
  @keyframes publish-breathe {
    0%, 100% { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 0 0 0 transparent, 0 0 2px 0 color-mix(in srgb, var(--accent) 15%, transparent); }
    50% { border-color: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent), 0 0 16px 3px color-mix(in srgb, var(--accent) 45%, transparent); }
  }
}
/* Deep green, like the website's header button: for a second strong action beside an orange one. */
.button--dark { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.button--dark:hover { color: var(--surface); background: #2C5140; border-color: #2C5140; }
html[data-theme=dark] .button--dark:hover { background: color-mix(in srgb, var(--ink) 86%, #000); border-color: color-mix(in srgb, var(--ink) 86%, #000); }
.button--danger { background: var(--surface); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); box-shadow: var(--shadow); }
.button--danger:hover { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.button--small { min-height: 32px; padding: 5px 12px; font-size: 12.5px; }
/* An icon-only button the same height as its neighbours, square (the trash can beside Publish and Preview). */
.button--icon { flex: none; width: 38px; padding: 0; }
.button--ghost.button--danger { box-shadow: none; }
/* List rows with actions at the end (Articles): buttons side by side, right-aligned on a wide screen. */
td.row-actions { white-space: nowrap; text-align: right; }
td.row-actions form { display: inline-block; margin: 0 0 0 6px; }
.button--block { width: 100%; }
/* Inside workspace cards, form buttons sit compact on the left instead of spanning the card. */
.app-page .card .button--block { width: auto; justify-self: start; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.button-row form { margin: 0; }
.text-button { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 3px; }
.text-button:hover { color: var(--accent-text); text-decoration-color: currentColor; }
.text-button.danger { color: var(--danger); }
.icon-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: var(--radius-sm); background: transparent; color: inherit; cursor: pointer; font-size: 22px; }
.icon-button:hover { background: var(--paper-2); }
/* 44px touch target without changing the drawn size. */
.icon-button::after { content: ''; position: absolute; inset: -4px; }
.icon-button--quiet, .icon-button--danger { color: var(--muted); }
.icon-button--quiet:hover { color: var(--ink); }
.icon-button--danger:hover { color: var(--danger); }
.icon-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
td .icon-button { margin: -8px 0; }

/* Forms */
.stack { display: grid; gap: 14px; }
.stack-lg { display: grid; gap: 20px; align-content: start; }
.field { display: grid; gap: 6px; min-width: 0; }
/* Show password (app.js): the eye sits inside the box, at its right end. */
.password-field { position: relative; display: block; min-width: 0; }
.password-field > input { padding-right: 42px; }
.password-reveal { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); display: inline-grid; place-items: center; width: 32px; height: 30px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer; }
.password-reveal:hover { color: var(--ink); background: var(--paper-2); }
.password-reveal:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.password-reveal .icon { width: 18px; height: 18px; vertical-align: 0; }
.password-field > input::-ms-reveal, .password-field > input::-ms-clear { display: none; }
.field--wide { grid-column: 1 / -1; }
.field label, .field > .label { font-weight: 700; font-size: 12.5px; color: var(--ink-2); }
input, select, textarea { width: 100%; font: 14px var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--field-line); border-radius: var(--radius-sm); padding: 8px 11px; min-height: 38px; box-shadow: none; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: var(--muted); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; min-height: 0; accent-color: var(--accent-strong); margin: 0; flex: 0 0 auto; padding: 0; box-shadow: none; }
/* The public invoice acceptance box (pay/invoice.php) is a 2.5.8 target. Admin checks stay 16px. */
.pay-sign .check input[type=checkbox] { width: 24px; height: 24px; min-width: 24px; min-height: 24px; flex: 0 0 24px; }
input[type=color] { padding: 3px; height: 38px; }
/* File pickers: the field's box with a small ghost button inside it, instead of the browser's grey "Choose File". */
input[type=file] { padding: 4px 11px 4px 4px; font-size: 13px; color: var(--muted); cursor: pointer; }
input[type=file]::file-selector-button { min-height: 28px; margin-right: 12px; padding: 4px 12px; border: 1px solid var(--tan-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: 700 12.5px/1.2 var(--font); cursor: pointer; transition: background .15s; }
input[type=file]:hover::file-selector-button { background: var(--paper); }
/* Date and time pickers draw their calendar and clock icons for the page's theme. */
html[data-theme=dark] :is(input, select, textarea) { color-scheme: dark; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; cursor: pointer; }
.hint { color: var(--muted); font-size: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; align-items: start; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px 20px; }
.copy-field { font-family: ui-monospace, monospace; font-size: 12px; width: min(100%, 560px); }
.inline-form { margin-top: 14px; text-align: center; }

/* Alerts, badges and status pills */
.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 16px; border: 1px solid; font-size: 13.5px; }
.alert p:last-child { margin: 0; }
.alert--notice { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 28%, transparent); color: var(--ink); }
.alert--error { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); color: var(--ink); }
.alert--warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--ink); }
.alert--error::before, .alert--notice::before, .alert--warn::before { content: ''; flex: 0 0 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--ok); }
.alert--error::before { background: var(--danger); }
.alert--warn::before { background: var(--warn); }
.js .alert.is-toasted { display: none; }
.badge { display: inline-flex; align-items: center; gap: 5px; line-height: 18px; align-self: center; flex: 0 0 auto; padding: 1px 8px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 700; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--muted { background: var(--paper-2); color: var(--muted); }
.badge--customer { background: var(--accent-soft); color: var(--accent-text); }
.badge--prospect { background: var(--info-soft); color: var(--info); }
.badge--vendor { background: var(--violet-soft); color: var(--violet); }
/* A leading dot marks a state (as opposed to a category). */
.badge--dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); text-decoration: none; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }

/* Toasts (app.js turns success notices into these) */
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 10px 12px 14px; border: 1px solid var(--line-strong); border-left: 3px solid var(--ok); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); font-size: 13.5px; line-height: 1.45; pointer-events: auto; animation: toast-in .22s ease-out; }
.toast--error { border-left-color: var(--danger); }
.toast p { margin: 0; flex: 1; }
.toast button { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; margin: -2px 0 0; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.toast button::after { content: ''; position: absolute; inset: -10px; }
.toast button:hover { background: var(--paper-2); color: var(--ink); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Signed-out pages (sign-in, password, invitation and two-step pages, installer, errors): a flat DRS mist page,
   the Dirt Road Software logo above a flat card, and DRS's 44px small-button height for fields and buttons. */
.auth-page { min-height: 100vh; background: var(--paper); }
.auth-shell { max-width: 440px; margin: 0 auto; padding: 56px 16px 32px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-pop); padding: 30px 28px; }
.auth-card h1 { font-size: 23px; margin-bottom: 6px; }
.auth-card form { margin-top: 18px; }
.auth-page input:not([type=checkbox], [type=radio], [type=color]), .auth-page select, .auth-page .button { min-height: 44px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }
/* The card's footnote ("Forgot your password?", "Back to sign in") stands 14px under the form, the form's own rhythm,
   and the card ends on its padding, with no paragraph margin under the last line. */
.auth-card > :is(form, .sso-buttons, .alert) + p { margin-top: 14px; }
.auth-card > :last-child, .auth-card form > :last-child { margin-bottom: 0; }
.demo-pill { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 12.5px; background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); border-radius: var(--radius-sm); padding: 6px 12px; margin: 0 0 16px; text-align: center; }
.code-input { font-size: 22px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.enroll { display: flex; gap: 18px; align-items: center; margin: 16px 0 4px; flex-wrap: wrap; }
.qr { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 6px; width: 180px; height: 180px; }
.secret { display: inline-block; background: var(--surface-2); border: 1px dashed var(--line-strong); padding: 6px 8px; border-radius: var(--radius); word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; padding: 14px 16px 14px 34px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); margin: 14px 0; }
.codes code { font-size: 13.5px; }
.recovery { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.recovery summary, .unlock summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.recovery form { margin-top: 12px; }

/* Brand: the supplied Dirt Road Software logos, unchanged (assets/brand). The horizontal logo is never narrower
   than 184px, keeps at least 8px clear on every side and always sits on a light surface: --paper, or the
   --brand-plate in dark mode, because its wordmark is black. The mark alone works on any background. */
.drs-logo { display: block; line-height: 0; border-radius: var(--radius); }
.drs-logo img { display: block; width: 225px; height: 65px; }
.drs-logo--small img { width: 192px; height: 56px; }
html[data-theme=dark] .drs-logo { padding: 8px 12px; background: var(--brand-plate); }
@media (max-width: 760px) { .drs-logo img { width: 192px; height: 56px; } }
/* Roadside's signed-out logo (app/templates/layout/brand.php): the Roadside by DRS logo on the page's own background,
   the light logo in light mode and the dark-mode logo in dark mode. */
.rs-logo { display: block; line-height: 0; border-radius: var(--radius); }
.rs-logo img { display: block; width: 240px; height: 80px; }
.rs-logo .rs-logo-dark, html[data-theme=dark] .rs-logo .rs-logo-light { display: none; }
html[data-theme=dark] .rs-logo .rs-logo-dark { display: block; }
.rs-logo:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
@media (max-width: 760px) { .rs-logo img { width: 192px; height: 64px; } }
/* Product names are set the way DRS sets "Fencepost CRM": DM Sans bold after a small orange dot. A DRS-only class,
   so a store's product titles (.product-name) never pick it up. */
.drs-product { display: inline-flex; align-items: center; gap: 10px; margin: 0; font: 700 20px/1.3 var(--font); color: var(--ink); }
.drs-product::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* App shell */
/* The sidebar is DRS ink in both themes. Its top is a white logo band exactly as tall as the topbar, so band and
   topbar meet on one bottom line and read as one header strip, the way dirtroadsoftware.com's header does.
   The top and the account block stay put; the menu between them scrolls. The menu never shrinks below a usable height:
   when the account block's open sections need more room than that leaves (a short window), the whole sidebar scrolls
   instead, so the area list and Sign out both stay reachable (the whole sidebar, always, on very short screens). */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--side-bg); color: var(--side-ink); border-right: 1px solid var(--side-edge); box-sizing: border-box; display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; z-index: 40; }
.sidebar-top { position: relative; flex: none; margin-bottom: 4px; }
/* A shade on whichever edge has more menu beyond it, so a row the footer cuts off reads as "scroll for more", and room under
   the last row so it clears the footer. The shades are the fixed background; the covers scroll with the content and hide
   a shade once that end is reached. */
.sidebar-scroll { flex: 1; min-height: 120px; padding: 0 10px 20px; scroll-padding: 8px 0 20px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--side-muted) transparent;
  background: linear-gradient(var(--side-bg) 30%, transparent) top / 100% 28px no-repeat local, linear-gradient(to top, var(--side-bg) 30%, transparent) bottom / 100% 28px no-repeat local,
    linear-gradient(var(--side-shade), transparent) top / 100% 10px no-repeat scroll, linear-gradient(to top, var(--side-shade), transparent) bottom / 100% 10px no-repeat scroll; }
@media (max-height: 560px) { .sidebar-scroll { flex: none; min-height: 0; overflow: visible; } }
.sidebar-brand { display: block; color: inherit; text-decoration: none; }
/* The dark-mode horizontal logo sits straight on the DRS green: no light plate. */
.sidebar-logo { display: flex; align-items: center; height: var(--topbar-h); padding: 0 16px; }
.sidebar-logo img { display: block; width: 192px; height: 56px; flex: none; }
/* The light-theme logo on the light sidebar, the dark-mode one on DRS ink (both ride along; theme.js sets the theme before paint). */
.sidebar-logo .sidebar-logo-dark, html[data-theme=dark] .sidebar-logo .sidebar-logo-light { display: none; }
html[data-theme=dark] .sidebar-logo .sidebar-logo-dark { display: block; }
.sidebar-brand .drs-product { display: flex; padding: 14px 18px 10px; font-size: 19px; color: #EDF0E8; }
.sidebar-brand:hover .drs-product { color: var(--side-strong); }
/* Focus: DRS rust inside the always-light band and a white ring on the green product line, drawn on the parts
   rather than the link, because a white ring on the link would paint over the band's rust one. */
.sidebar .sidebar-brand:focus-visible { outline: none; }
.sidebar-brand:focus-visible .sidebar-logo { box-shadow: inset 0 0 0 3px var(--side-focus); }
.sidebar-brand:focus-visible .drs-product { outline: 3px solid var(--side-focus); outline-offset: -3px; }
.sidebar-close { display: none; position: absolute; top: calc((var(--topbar-h) - 36px) / 2); right: 12px; color: var(--side-strong); }
.sidebar-close:hover { background: var(--side-hover); }
.sidebar .sidebar-close:focus-visible { outline-color: var(--side-focus); }
/* The workspace picker is a DRS dark-form field, with no box around it. */
.workspace-switch { margin: 0 6px 6px; }
.workspace-switch label { display: block; font-size: 12px; color: var(--side-muted); margin-bottom: 4px; font-weight: 700; }
.workspace-switch select, .workspace-name { background: var(--side-field-bg); color: var(--side-field-ink); border: 1px solid var(--side-field-line); border-radius: var(--radius-sm); min-height: 36px; padding: 6px 9px; font-size: 13.5px; box-shadow: none; }
.workspace-switch select { color-scheme: var(--side-scheme); }
.workspace-switch select:hover:not(:focus) { border-color: var(--side-muted); }
.workspace-name { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
/* With JavaScript the picker shows the whole workspace name, wrapping onto a second line if it must, in a box drawn like the
   select; the real select lies over it, transparent, so a click or a key still opens the list (layout/account-block.php). */
.workspace-picker { position: relative; display: grid; }
.workspace-current { display: none; }
.js .workspace-current { display: block; position: relative; min-height: 36px; padding: 7px 30px 7px 9px; background: var(--side-field-bg); color: var(--side-field-ink); border: 1px solid var(--side-field-line); border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.js .workspace-current::after { content: ''; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; margin-top: -5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.js .workspace-picker select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.js .workspace-picker:hover .workspace-current { border-color: var(--side-muted); }
.js .workspace-picker:has(select:focus-visible) .workspace-current { outline: 3px solid var(--side-focus); outline-offset: 2px; }
/* The menu (docs/plans/sidebar): Home, then the task groups as an accordion. A heading is a button with the group's icon,
   its label, a count or a lock, and a chevron that turns a quarter when the group opens. One group is open at a time in
   Everyday. How it moves (RX-18, the plan's "How the menu moves" table): a panel opens in 220 ms (grid rows 0fr to 1fr)
   while its lines arrive together, sliding 6 px and fading in over 160 ms, with the road line growing down through
   them; it shuts in 160 ms. The highlight glides to a stop the person opens (300 ms, app.js). Everyday to Full grows the
   extra screens and stops in (220 ms, app.js). Words to icons takes 260 ms, the words fading in once the width has
   mostly arrived. A rail card slides 6 px out in 160 ms and back in 90. Transitions only start once the page has arrived
   in its remembered state (html.nav-ready, app.js): loading never animates, but for the one glow of a screen that was
   just turned on. Under reduced motion every change is instant (the rule at "prefers-reduced-motion: reduce" below
   stops every transition and animation; app.js skips its own).
   Choosing a screen loads its page and nothing else: there is no page-to-page transition rule here. It was measured
   (RX-18) and left out, because on a slow computer it held the new page's first paint back and never ran. */
:root { --nav-ease: cubic-bezier(.2, .8, .2, 1); --nav-glow: rgba(244, 173, 114, .42); }
.nav { position: relative; isolation: isolate; display: block; padding-top: 4px; }
.sidebar nav a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 7px 10px; margin: 1px 0; border-radius: var(--radius-sm); text-decoration: none; color: var(--side-ink); font-size: 13.5px; font-weight: 500; }
.sidebar nav a .icon { flex: none; color: var(--side-muted); }
.sidebar nav a:hover { background: var(--side-hover); color: var(--side-strong); }
.sidebar nav a:hover .icon { color: var(--side-strong); }
.sidebar nav a[aria-current=page] { background: var(--side-current); color: var(--side-current-ink); font-weight: 700; }
.sidebar nav a[aria-current=page]::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.sidebar nav a[aria-current=page] .icon { color: var(--side-accent); }
.nav-home { font-weight: 700; margin-bottom: 6px; }
.nav-group { margin: 0; }
.nav-group-head { margin: 0; font: inherit; }
.nav-group-button { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; margin: 1px 0; padding: 7px 8px 7px 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--side-ink); font: 700 13px/1.2 var(--font); text-align: left; cursor: pointer; }
.nav-group-button .icon { flex: none; color: var(--side-muted); }
.nav-group-button:hover { background: var(--side-hover); color: var(--side-strong); }
.nav-group-button:hover .icon { color: var(--side-strong); }
.nav-group.is-open > .nav-group-button { color: var(--side-strong); }
/* Where I am: the highlight sits behind the current area's stop. It is the stop's own ::before, so it is there before
   any script runs; app.js moves is-stop to a stop the person opens and glides the highlight there. It is drawn under
   the whole menu (the menu is its own stacking context), so it passes behind the other stops' words on its way. */
.nav-group.is-stop > .nav-group-button, .nav-group.is-stop > .nav-group-button:hover { background: none; color: var(--side-current-ink); }
.nav-group.is-stop > .nav-group-button > .icon { color: var(--side-accent); }
.nav-group.is-stop > .nav-group-button::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--side-current); pointer-events: none; }
/* One fill, not two: under a highlighted stop the current screen keeps its orange bar, its accent icon and its bold
   words, and gives up its own fill (it is back when the highlight is on another stop). */
.nav-group.is-stop a[aria-current=page] { background: none; }
.nav-group.is-stop a[aria-current=page]:hover { background: var(--side-hover); }
.nav-group.is-locked > .nav-group-button { color: var(--side-muted); }
.nav-label { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-chevron { flex: none; margin-left: auto; display: inline-flex; color: var(--side-muted); }
.nav-chevron .icon { width: 14px; height: 14px; }
.nav-group:is(.is-open, [open]) .nav-chevron .icon { transform: rotate(90deg); }
.nav-group-button:focus-visible { outline: 2px solid var(--side-focus); outline-offset: -2px; }
/* The panel: a grid whose one row grows from nothing, so the height animates without measuring. A group is a native
   disclosure, which hides its panel the moment it closes, so app.js draws it shut first (is-shut) and closes it once
   the 160 ms have passed; [open] alone draws it open, for no script and for the browser's find-in-page. */
.nav-panel { display: grid; grid-template-rows: 0fr; }
.nav-panel[hidden] { display: none; }
.nav-panel-inner { min-height: 0; overflow: hidden; }
.nav-panel-title { display: none; }
.nav-list { list-style: none; margin: 0; padding: 1px 0 8px; opacity: 0; transform: translateY(-6px); }
.nav-list li { position: relative; margin: 0; }
/* The road line: it runs down the open submenu under the stop's icon, broken where each screen's icon sits, and grows
   with the panel because the panel clips it. */
.nav-list li:not(.nav-more)::before, .nav-list li:not(.nav-more)::after { content: ''; position: absolute; left: 18px; width: 2px; height: calc(50% - 14px); background: var(--side-line); pointer-events: none; }
.nav-list li::before { top: 0; }
.nav-list li::after { bottom: 0; }
.nav-group:is(.is-open, [open]) > .nav-panel { display: grid; grid-template-rows: 1fr; }
.nav-group:is(.is-open, [open]) > .nav-panel .nav-list { opacity: 1; transform: none; }
.nav-group.is-shut > .nav-panel { grid-template-rows: 0fr; }
.nav-group.is-shut > .nav-panel .nav-list { opacity: 0; transform: translateY(-6px); }
.nav-group.is-shut .nav-chevron .icon { transform: none; }
html.nav-ready .nav-panel { transition: grid-template-rows .22s var(--nav-ease); }
html.nav-ready .nav-list { transition: opacity .16s ease, transform .22s var(--nav-ease); }
html.nav-ready .nav-chevron .icon { transition: transform .22s var(--nav-ease); }
/* Leaving is quicker than arriving. */
html.nav-ready .nav-group.is-shut > .nav-panel, html.nav-ready .nav-group.is-shut .nav-list, html.nav-ready .nav-group.is-shut .nav-chevron .icon { transition-duration: .16s; }
html.nav-ready .sidebar { transition: width .26s var(--nav-ease); }
html.nav-ready .app-main { transition: margin-left .26s var(--nav-ease); }
/* Icons to words: the words fade in once the width has mostly arrived, and are there when it stops: 120 ms after a
   140 ms wait, inside the 260 ms (app.js sets nav-widening for that press only). */
html.nav-widening .sidebar :is(.nav-label, .sidebar-logo, .drs-product, .nav-chevron, .nav-depth-switch span, .nav-view-note, .nav-everyday-help, .sidebar-foot > .nav-panel) { animation: nav-words-in .12s .14s both; }
@keyframes nav-words-in { from { opacity: 0; } }
/* A screen that was just turned on (Navigation::showNew): app.js glows its line once, for 1.5 s. These two are that
   glow where it can't run: held still under reduced motion (is-nav-new), and drawn by the style sheet without script. */
.is-nav-new, html:not(.js) [data-nav-new] { background-color: var(--nav-glow); }
@media (prefers-reduced-motion: no-preference) {
  html:not(.js) [data-nav-new] { background-color: transparent; animation: nav-glow 1.5s ease-out; }
  @keyframes nav-glow { 0%, 35% { background-color: var(--nav-glow); } }
}
/* A screen the store's plan doesn't include: a working link to its upgrade page, in the muted ink (7:1 on the sidebar green) with a lock. */
.nav-link.is-locked, .nav-link.is-locked .icon { color: var(--side-muted); }
.nav-link.is-locked:hover, .nav-link.is-locked:hover .icon { color: var(--side-strong); }
.nav-lock { flex: none; margin-left: auto; display: inline-flex; color: var(--side-muted); }
.nav-lock .icon { width: 14px; height: 14px; }
.nav-group-button > .nav-lock { margin-right: 0; }
/* A count beside a menu item (new messages): a bold red pill that can't be missed. It is still: loading never animates (RX-18). */
.nav-badge { margin-left: auto; flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: #E5484D; color: #FFFFFF; font-size: 12px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px var(--side-bg); }
/* A quiet word beside a menu item, in the shape of the editor's "For you" chip. */
.nav-chip { margin-left: auto; flex: none; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--side-line); color: var(--side-muted); font-size: 11px; font-weight: 700; line-height: 16px; }
.sidebar nav a:hover .nav-chip, .sidebar nav a[aria-current=page] .nav-chip { color: var(--side-strong); border-color: var(--side-muted); }
/* A closed group still shows its total, so a new message is never hidden behind a closed heading. */
.nav-badge--group { margin: 0 6px 0 auto; min-width: 20px; height: 20px; padding: 0 6px; font-size: 11px; text-transform: none; }
.nav-group.is-open .nav-badge--group { display: none; }
/* The sidebar's top: the brand, then the collapse toggle (the icon rail). */
.sidebar-mark { display: none; }
.sidebar-collapse { display: flex; align-items: center; gap: 8px; width: calc(100% - 24px); margin: 0 12px; min-height: 32px; padding: 4px 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--side-muted); font: 700 12px/1.2 var(--font); text-align: left; cursor: pointer; }
.sidebar-collapse:hover { color: var(--side-strong); background: var(--side-hover); }
.sidebar-collapse:focus-visible { outline: 2px solid var(--side-focus); outline-offset: -2px; }
.sidebar-collapse-icon { display: inline-flex; flex: none; }
.sidebar-collapse-icon .icon { width: 18px; height: 18px; }
.sidebar-collapse-icon .icon + .icon { display: none; }
.sidebar-foot { flex: none; margin: 0 10px; padding: 0 2px 10px; border-top: 1px solid var(--side-line); }
.sidebar-foot .sidebar-me { display: none; }
.sidebar-foot > .nav-panel { display: block; }
.sidebar-foot .nav-panel-inner { overflow: visible; }
.sidebar-foot .workspace-switch { margin: 10px 0 0; }
.sidebar-foot .sidebar-bottom { margin: 0; padding: 12px 0 0; border-top: 0; }
.sidebar-foot .workspace-switch + .sidebar-bottom { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--side-line); }
.sidebar-me { display: inline-flex; padding: 2px; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.sidebar-me:hover .avatar { background: var(--accent-hover); }
.sidebar-me:focus-visible { outline: 2px solid var(--side-focus); outline-offset: 2px; }
/* The account menu's own links (My time), in the panel's dark style. */
.account-link { display: flex; align-items: center; gap: 10px; margin-top: 2px; padding: 8px 6px; border-radius: var(--radius-sm); color: var(--side-ink); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.account-link .icon { color: var(--side-muted); }
.account-link:hover, .account-link[aria-current=page] { background: var(--side-hover); color: var(--side-strong); }
.menu-toggle { position: relative; }
.nav-badge--toggle { position: absolute; top: -5px; right: -5px; margin: 0; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; box-shadow: 0 0 0 2px var(--surface); }
.sidebar :focus-visible { outline-color: var(--side-focus); }
@media (prefers-reduced-motion: reduce) {
  html.nav-ready .nav-panel, html.nav-ready .nav-list, html.nav-ready .nav-chevron .icon, html.nav-ready .sidebar, html.nav-ready .app-main, .nav-group.is-leaving > .nav-panel { transition: none; }
  .nav-group.is-flyout > .nav-panel, html.nav-widening .sidebar * { animation: none; }
}
.sidebar-bottom { flex: none; margin: 0 12px; padding: 14px 2px 12px; border-top: 1px solid var(--side-line); }
.me { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--side-ink); padding: 6px; border-radius: var(--radius-sm); }
.me:hover, .me[aria-current=page] { background: var(--side-hover); color: var(--side-strong); }
.me strong { display: block; font-size: 13px; color: var(--side-strong); overflow-wrap: anywhere; }
.me small { color: var(--side-muted); font-size: 12px; }
.me-row { display: flex; align-items: center; gap: 4px; }
.me-row .me { flex: 1; min-width: 0; }
.me-link { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius-sm); color: var(--side-muted); }
.me-link:hover, .me-link[aria-current=page] { background: var(--side-hover); color: var(--side-strong); }
.me-link:focus-visible { outline: 2px solid var(--side-focus); outline-offset: 1px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 12px; flex: 0 0 auto; }
.avatar--sm { width: 30px; height: 30px; font-size: 12px; background: var(--paper-2); color: var(--ink-2); }
.account-actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.account-actions form { margin: 0; min-width: 0; }
.signout { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px; background: none; border: 0; border-radius: var(--radius-sm); color: var(--side-muted); font: 500 13px var(--font); cursor: pointer; }
.signout:hover { color: var(--side-strong); background: var(--side-hover); }
/* DRS's segmented control on dark (the contact form's). */
.theme-switch { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--side-field-line); border-radius: var(--radius-sm); background: transparent; }
.theme-switch[hidden] { display: none; }
.theme-switch button { position: relative; display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 4px 9px; border: 0; border-radius: 2px; background: transparent; color: var(--side-muted); font: 700 12px var(--font); cursor: pointer; }
.theme-switch button::after { content: ''; position: absolute; inset: -7px 0; }
.theme-switch button .icon { width: 14px; height: 14px; }
.theme-switch button:hover { color: var(--side-strong); }
.theme-switch button[aria-pressed=true] { background: var(--side-switch-on-bg); color: var(--side-switch-on-ink); }
/* The account block's theme switch (Nov 8, after kaolti's toggle): one switch, a rounded-square knob in a pill track.
   Day: knob right, a dot-matrix sun. Night: knob left, a dot-matrix moon. On a switch the dots scatter and re-form as the
   other icon (theme.js) and a rim light (store orange by day, moonlight by night) sweeps around the knob's edge, holds
   2 s, then fades out over 2 s. It is off at rest. The profile page keeps the labelled Light / Dark buttons above. */
@property --tt-rim { syntax: '<angle>'; inherits: true; initial-value: 45deg; }
@property --tt-day { syntax: '<number>'; inherits: true; initial-value: 1; }
.theme-toggle { --w: 64px; --k: 28px; --pad: 3px; flex: none; position: relative; width: var(--w); height: 34px; padding: 0; border: 0; border-radius: 11px; cursor: pointer;
  background: color-mix(in srgb, #D3DECF calc(var(--tt-day) * 100%), #08140F);
  box-shadow: inset 0 1px 3px rgb(0 0 0 / .28), 0 1px 0 rgb(255 255 255 / .3);
  transition: --tt-day .6s ease, --tt-rim .7s cubic-bezier(.6, 0, .3, 1); }
.theme-toggle[hidden] { display: none; }
.theme-toggle[aria-checked=true] { --tt-day: 0; --tt-rim: 225deg; }
.theme-toggle:focus-visible { outline: 2px solid var(--side-focus); outline-offset: 3px; }
.theme-toggle__knob { position: absolute; top: var(--pad); left: var(--pad); width: var(--k); height: var(--k); border-radius: 8px;
  transform: translateX(calc(var(--w) - var(--k) - var(--pad) * 2));
  background: color-mix(in srgb, #FFFDF8 calc(var(--tt-day) * 100%), #162A21);
  box-shadow: 0 2px 5px rgb(0 0 0 / .3), inset 0 1px 0 rgb(255 255 255 / .25);
  transition: transform .55s cubic-bezier(.5, 1.5, .45, 1); }
.theme-toggle[aria-checked=true] .theme-toggle__knob { transform: translateX(0); }
.theme-toggle__knob::before, .theme-toggle__knob::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; opacity: 0; pointer-events: none;
  --c: color-mix(in srgb, #F6A35E calc(var(--tt-day) * 100%), #B8CCFF);
  background: conic-gradient(from calc(var(--tt-rim) - 70deg), transparent 0deg, var(--c) 50deg, var(--c) 90deg, transparent 140deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.theme-toggle__knob::after { inset: -3px; padding: 4px; filter: blur(5px); }
.theme-toggle.is-lit .theme-toggle__knob::before { animation: tt-rim 4s forwards; }
.theme-toggle.is-lit .theme-toggle__knob::after { animation: tt-rim-glow 4s forwards; }
@keyframes tt-rim { 0%, 50% { opacity: 1; animation-timing-function: ease-in-out; } 100% { opacity: 0; } }
@keyframes tt-rim-glow { 0%, 50% { opacity: .9; animation-timing-function: ease-in-out; } 100% { opacity: 0; } }
.theme-toggle svg { position: absolute; inset: 5px; width: 18px; height: 18px; overflow: visible; }
.theme-toggle rect { fill: color-mix(in srgb, #19392D calc(var(--tt-day) * 100%), #EEF3FF); }
/* While the theme changes, colours fade instead of snapping (the switch keeps its own motion). */
html.theme-fading, html.theme-fading *:not(.theme-toggle, .theme-toggle *) { transition: background-color .5s ease, color .5s ease, border-color .5s ease, fill .5s ease !important; }
@media (prefers-reduced-motion: reduce) {
  .theme-toggle, .theme-toggle__knob { transition-duration: .01s; }
}
/* The last line of the sidebar: DRS's text-link form, out to dirtroadsoftware.com in a new tab. */
.sidebar-credit { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 12px 0 2px 6px; border-top: 1px solid var(--side-line); color: var(--side-muted); font: 700 12px/1.4 var(--font); text-decoration: underline; text-decoration-color: var(--side-line); text-underline-offset: 5px; }
.sidebar-credit .icon { width: 14px; height: 14px; }
.sidebar-credit:hover { color: var(--side-strong); text-decoration-color: currentColor; }
.app-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

/* The icon rail (docs/plans/sidebar 4.6): the sidebar at 76px, Home and one button per group as icons, the groups'
   panels as flyouts beside the rail (the same lists, not copies), a tooltip on keyboard focus, and the person's avatar
   at the bottom, which opens the account menu. Desktop only: the drawer under 900px keeps the accordion. */
@media (min-width: 900px) {
  :root { --nav-desktop: 1; }
  html[data-nav-rail] { --sidebar-w: 76px; }
  html[data-nav-rail] .sidebar { overflow: visible; }
  html[data-nav-rail] .sidebar-scroll { overflow-y: auto; overflow-x: hidden; min-height: 0; }
  html[data-nav-rail] .sidebar-scroll { padding: 0 8px 12px; background: none; }
  html[data-nav-rail] .sidebar-logo, html[data-nav-rail] .sidebar-brand .drs-product, html[data-nav-rail] .sidebar-collapse .nav-label, html[data-nav-rail] .nav-label,
  html[data-nav-rail] .nav-chevron, html[data-nav-rail] .nav-group-button > .nav-lock { display: none; }
  html[data-nav-rail] .sidebar-mark { display: flex; align-items: center; justify-content: center; height: var(--topbar-h); }
  html[data-nav-rail] .sidebar-mark img { display: block; width: 28px; height: 32px; }
  html[data-nav-rail] .sidebar-brand:focus-visible .sidebar-mark { box-shadow: inset 0 0 0 3px var(--side-focus); }
  /* The collapsed rail's mark: the Roadside mark for the sidebar's colour (light sidebar, dark sidebar). */
  html[data-nav-rail] .sidebar-mark .sidebar-mark-dark { display: none; }
  html[data-nav-rail][data-theme=dark] .sidebar-mark .sidebar-mark-light { display: none; }
  html[data-nav-rail][data-theme=dark] .sidebar-mark .sidebar-mark-dark { display: block; }
  html[data-nav-rail] .sidebar-collapse { width: 40px; margin: 6px 8px 2px; padding: 0; justify-content: center; }
  html[data-nav-rail] .sidebar-collapse-icon .icon:first-child { display: none; }
  html[data-nav-rail] .sidebar-collapse-icon .icon + .icon { display: inline; }
  html[data-nav-rail] .nav-home, html[data-nav-rail] .nav-group-button { width: 40px; height: 40px; min-height: 0; margin: 2px 0; padding: 0; justify-content: center; gap: 0; }
  html[data-nav-rail] .sidebar nav .nav-home[aria-current=page]::before { left: -8px; }
  html[data-nav-rail] .nav-group.is-stop > .nav-group-button::before, html[data-nav-rail] .nav-list li::before, html[data-nav-rail] .nav-list li::after { content: none; }
  html[data-nav-rail] .nav-group.is-stop a[aria-current=page] { background: var(--side-current); } /* a rail card stands apart from its stop: its current screen keeps the fill */
  html[data-nav-rail] .nav-group[data-nav-here] > .nav-group-button { background: var(--side-current); color: var(--side-current-ink); }
  html[data-nav-rail] .nav-group[data-nav-here] > .nav-group-button > .icon { color: var(--side-accent); }
  html[data-nav-rail] .nav-group.is-locked > .nav-group-button::after { content: ''; position: absolute; right: 5px; bottom: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--side-muted); }
  html[data-nav-rail] .nav-group-button > .nav-badge--group { display: inline-flex; position: absolute; top: 1px; right: 1px; margin: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }
  /* A tooltip on keyboard focus (pointing at a button opens its flyout instead). */
  html[data-nav-rail] .nav-home, html[data-nav-rail] .sidebar-collapse, html[data-nav-rail] .sidebar-me { position: relative; }
  html[data-nav-rail] .nav-home:focus-visible::after, html[data-nav-rail] .nav-group-button:focus-visible::after, html[data-nav-rail] .sidebar-collapse:focus-visible::after, html[data-nav-rail] .sidebar-me:focus-visible::after {
    content: attr(data-label); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%); z-index: 71; padding: 5px 9px; border-radius: var(--radius-sm);
    background: #0E2019; color: #EDF0E8; font: 700 12px/1.2 var(--font); white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-lift); }
  /* Fixed, so the scrolling menu can't clip it. The script supplies the button's centre line; without script, top: auto
     leaves the label on its button's own line. */
  html[data-nav-rail] .sidebar-scroll .nav-home:focus-visible::after, html[data-nav-rail] .sidebar-scroll .nav-group-button:focus-visible::after { position: fixed; left: calc(var(--sidebar-w) + 6px); top: var(--nav-label-top, auto); }
  html:not(.js)[data-nav-rail] .sidebar-scroll .nav-home:focus-visible::after, html:not(.js)[data-nav-rail] .sidebar-scroll .nav-group-button:focus-visible::after { top: auto; transform: none; }
  html[data-nav-rail] .sidebar-collapse:focus-visible::after, html[data-nav-rail] .sidebar-me:focus-visible::after { content: attr(aria-label); }
  /* The flyout: the group's own panel, fixed beside the rail, above the page, never clipped, scrolling when taller than the window. */
  html[data-nav-rail] .nav-panel { display: none; }
  /* A rail card (a press only, app.js): it slides 6 px out from its stop in 160 ms. Closed, it slides back in 90 ms:
     app.js keeps it drawn that long (is-leaving) and inert, then puts it away. A card opened as the page loads is
     drawn still (is-still). */
  html[data-nav-rail] .nav-group:is(.is-flyout, .is-leaving) > .nav-panel { display: block; position: fixed; left: var(--sidebar-w); top: 8px; z-index: 70; width: 268px; max-height: calc(100vh - 16px); overflow-y: auto; margin-left: 6px; padding: 10px 8px 8px;
    background: var(--side-bg); color: var(--side-ink); border: 1px solid var(--side-line); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
  html[data-nav-rail] .nav-group.is-flyout > .nav-panel { animation: nav-flyout .16s var(--nav-ease); }
  html[data-nav-rail] .nav-group.is-flyout.is-still > .nav-panel { animation: none; }
  html[data-nav-rail] .nav-group.is-leaving > .nav-panel { opacity: 0; transform: translateX(-6px); pointer-events: none; transition: opacity .09s ease, transform .09s ease; }
  html[data-nav-rail] .nav-group.is-flyout > .nav-panel::before { content: ''; position: absolute; left: -8px; top: 0; bottom: 0; width: 8px; } /* keeps the pointer inside while it crosses the gap */
  html[data-nav-rail] .nav-group:is(.is-flyout, .is-leaving) .nav-panel-inner { overflow: visible; }
  html[data-nav-rail] .nav-group:is(.is-flyout, .is-leaving) .nav-panel-title { display: block; margin: 0 0 6px; padding: 0 10px; font: 600 13px/1.2 var(--font); color: var(--side-muted); }
  html[data-nav-rail] .nav-group:is(.is-flyout, .is-leaving) .nav-list { opacity: 1; transform: none; padding: 0; }
  html[data-nav-rail] .nav-group:is(.is-flyout, .is-leaving) .nav-panel .nav-label { display: block; }
  html[data-nav-rail] .nav-group:is(.is-flyout, .is-leaving) .nav-panel a[aria-current=page]::before { left: -8px; }
  html[data-nav-rail] .sidebar-foot { display: flex; justify-content: center; margin: 0 8px; padding: 8px 0 12px; border-top: 1px solid var(--side-line); }
  html[data-nav-rail] .sidebar-foot .sidebar-me { display: inline-flex; }
  html[data-nav-rail] .sidebar-foot > .nav-panel { display: none; }
  html[data-nav-rail] .sidebar-foot:is(.is-flyout, .is-leaving) > .nav-panel { display: block; width: 272px; padding: 12px; }
  html[data-nav-rail] .sidebar-foot:is(.is-flyout, .is-leaving) .sidebar-bottom { padding-top: 0; }
  html[data-nav-rail] .sidebar-foot:is(.is-flyout, .is-leaving) .workspace-switch + .sidebar-bottom { padding-top: 10px; }
  @keyframes nav-flyout { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
}
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: var(--topbar-h); padding: 0 var(--content-pad); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.menu-toggle { display: none; }
/* The DRS mark leads the topbar while the sidebar is a drawer (below 900px). */
.topbar-mark { display: none; flex: none; align-items: center; border-radius: var(--radius-sm); }
.topbar-mark img { display: block; width: 28px; height: 32px; }
.topbar-mark .topbar-mark-dark { display: none; }
html[data-theme=dark] .topbar-mark .topbar-mark-light { display: none; }
html[data-theme=dark] .topbar-mark .topbar-mark-dark { display: block; }
.crumbs { color: var(--muted); font-size: 13px; display: flex; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs span:last-child { color: var(--ink); font-weight: 700; }
.crumbs .sep { color: var(--tan-2); }
.topbar-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-search { position: relative; width: min(360px, 38vw); }
.topbar-search > .icon { position: absolute; left: 11px; top: 10px; color: var(--muted); width: 16px; height: 16px; pointer-events: none; }
.topbar-search input { padding-left: 34px; padding-right: 34px; height: 36px; min-height: 36px; background: var(--surface-2); box-shadow: none; }
/* + New is as tall as the search box beside it. */
.topbar-tools .menu > summary.button { min-height: 36px; }
.topbar-search kbd { position: absolute; right: 9px; top: 9px; pointer-events: none; }
.topbar-search input:focus ~ kbd, .topbar-search.has-value kbd { display: none; }
.topbar-search.is-loading > .icon { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.find-results { position: absolute; top: calc(100% + 6px); right: 0; width: max(100%, 440px); max-width: calc(100vw - 24px); max-height: min(70vh, 480px); overflow-y: auto; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-pop); z-index: 60; }
.find-results[hidden] { display: none; }
.find-group { margin: 8px 8px 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.find-results a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); }
/* Only a result's title stays on one line (cut with an ellipsis); its details and hints wrap, so nothing is cut mid-word. */
.find-results a span { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.find-results a > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.find-results a > .find-type { white-space: nowrap; }
.find-results a:hover, .find-results a.is-active { background: var(--accent-soft); color: var(--ink); }
.find-results .find-all { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 4px; }
.find-empty { margin: 10px; color: var(--muted); font-size: 13px; }
.find-results a > * { grid-column: 1; }
.find-results a > .find-type { grid-column: 2; grid-row: 1; align-self: center; justify-self: end; color: var(--muted); padding: 0 7px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 12px; line-height: 18px; }
.find-results a .badge { font-size: 12px; margin-left: 4px; vertical-align: 1px; }
.find-results .find-match { color: var(--ink-2); }
.find-results mark, .search-main mark { background: color-mix(in srgb, var(--accent) 20%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.find-all a strong { color: var(--accent-text); }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-pop); z-index: 60; }
.menu-list a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); font-size: 13.5px; }
.menu-list a .icon { color: var(--muted); }
.menu-list a:hover, .menu-list a:focus-visible { background: var(--paper-2); color: var(--ink); outline-offset: -2px; }
/* The top menu (Settings\Navigation, ported from the console): the same groups as drop-downs in a DRS-ink band under the
   top bar. In top mode the account block and workspace switcher sit in the top-right account panel at every width.
   From 900px the sidebar hides, the logo leads the top bar and the top menu appears. Below that, the sidebar is the
   drawer whatever the preference. The account block is rendered once, in its selected location. */
:root { --top-nav-h: 0px; }
.topbar-brand, .top-nav { display: none; }
.top-account { display: block; position: relative; }
.topbar-logo img { display: block; height: 44px; width: auto; }
.topbar-logo .topbar-logo-dark, html[data-theme=dark] .topbar-logo .topbar-logo-light { display: none; }
html[data-theme=dark] .topbar-logo .topbar-logo-dark { display: block; }
@media (min-width: 900px) {
  body[data-menu-placement=top] { --top-nav-h: 50px; }
  body[data-menu-placement=top] .sidebar { display: none; }
  body[data-menu-placement=top] .app-main { margin-left: 0; }
  body[data-menu-placement=top] .topbar-brand { display: flex; align-items: center; gap: 12px; flex: none; color: inherit; text-decoration: none; border-radius: var(--radius-sm); }
  body[data-menu-placement=top] .topbar-brand .drs-product { font-size: 17px; }
  body[data-menu-placement=top] .topbar-brand:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
  body[data-menu-placement=top] .crumbs span:first-child, body[data-menu-placement=top] .crumbs .sep { display: none; }
  body[data-menu-placement=top] .top-nav { display: flex; }
}
.top-nav, .top-account__panel { --side-bg: var(--sidebar-bg); --side-edge: var(--sidebar-bg); --side-ink: var(--sidebar-ink); --side-strong: #FFFFFF; --side-muted: var(--sidebar-muted); --side-hover: var(--sidebar-hover); --side-current: var(--sidebar-current); --side-current-ink: #FFFFFF; --side-line: var(--sidebar-line); --side-accent: var(--sidebar-accent); --side-focus: #FFFFFF; --side-field-bg: #274638; --side-field-ink: #FFFFFF; --side-field-line: #6D8572; --side-switch-on-bg: #E5EEDD; --side-switch-on-ink: #19392D; --side-scheme: dark; }
.top-nav { position: sticky; top: var(--topbar-h); z-index: 19; align-items: center; flex-wrap: wrap; gap: 2px; min-height: var(--top-nav-h); padding: 6px calc(var(--content-pad) - 12px); background: var(--sidebar-bg); color: var(--sidebar-ink); border-bottom: 1px solid var(--sidebar-line); }
.top-group > summary, .top-link { white-space: nowrap; }
.top-group { position: relative; }
.top-group > summary, .top-link { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 7px 12px; border-radius: var(--radius-sm); list-style: none; font: 700 13px/1.2 var(--font); color: var(--sidebar-ink); cursor: pointer; text-decoration: none; user-select: none; }
.top-group > summary::-webkit-details-marker { display: none; }
.top-group > summary::after { content: ''; width: 6px; height: 6px; margin: 0 0 3px 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.top-group[open] > summary::after { transform: rotate(225deg); margin-bottom: -3px; }
.top-group > summary:hover, .top-link:hover { background: var(--sidebar-hover); color: #FFFFFF; }
.top-group[open] > summary, .top-group[data-current-group] > summary, .top-link[aria-current=page] { background: var(--sidebar-current); color: #FFFFFF; }
.top-link .icon { width: 16px; height: 16px; color: var(--sidebar-muted); }
.top-link:hover .icon, .top-link[aria-current=page] .icon { color: var(--sidebar-accent); }
.top-nav :focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.top-links { position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-pop); z-index: 60; }
/* Keeps the pointer inside the group while it crosses the gap to the list, so hovering down into a link doesn't close it. */
.top-links::before { content: ''; position: absolute; top: -7px; left: 0; right: 0; height: 7px; }
.top-group:last-child .top-links { left: auto; right: 0; }
.top-links a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); font-size: 13.5px; font-weight: 500; }
.top-links a .icon { color: var(--muted); }
.top-links a:hover, .top-links a:focus-visible { background: var(--paper-2); color: var(--ink); outline-offset: -2px; }
.top-links a[aria-current=page] { background: var(--accent-soft); color: var(--accent-text); }
.top-links a[aria-current=page] .icon { color: var(--accent-text); }
.top-links a.is-locked, .top-links a.is-locked .icon, .top-links .nav-lock { color: var(--muted); }
.top-group.is-locked > summary { color: var(--sidebar-muted); }
.top-group > summary .nav-lock { margin-left: 2px; }
.top-links .nav-chip { color: var(--muted); border-color: var(--line-strong); }
.top-links a:hover .nav-chip, .top-links a[aria-current=page] .nav-chip { color: inherit; }
.top-links .nav-badge, .top-link .nav-badge { box-shadow: none; }
.top-group > summary .nav-badge--group { margin: 0 0 0 2px; }
.top-account > summary { display: inline-flex; align-items: center; min-height: 36px; padding: 2px; border-radius: 999px; list-style: none; cursor: pointer; }
.top-account > summary::-webkit-details-marker { display: none; }
.top-account > summary:hover { background: var(--paper-2); }
.top-account > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.top-account__panel { max-height: calc(100dvh - var(--topbar-h) - 24px); overflow-y: auto; position: absolute; right: 0; top: calc(100% + 8px); width: 300px; padding: 12px; background: var(--sidebar-bg); color: var(--sidebar-ink); border: 1px solid var(--sidebar-line); border-radius: var(--radius); box-shadow: var(--shadow-pop); z-index: 60; }
.top-account__panel .workspace-switch { margin: 0; }
.top-account__panel .sidebar-bottom { margin: 0; padding: 0; border-top: 0; }
.top-account__panel .workspace-switch + .sidebar-bottom { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--sidebar-line); }
.top-account__panel :focus-visible { outline-color: #FFFFFF; }
@media (prefers-reduced-motion: reduce) { .top-group > summary::after { transition: none; } }
/* The banner's icon hangs in the inset, so its words start on the page's left edge; a phone's 16px inset has no room for it. */
.banner { display: flex; gap: 10px; align-items: center; padding: 8px var(--content-pad) 8px max(0px, calc(var(--content-pad) - 28px)); font-size: 13px; border-bottom: 1px solid; }
/* Below 900px (the drawer layout) the inset is too narrow to hang the icon in it: the icon hides and the text keeps the shared edge. */
@media (width < 900px) { .banner { padding-left: var(--content-pad); } .banner > .icon { display: none; } }
.banner--demo { background: var(--warn-soft); color: var(--ink-2); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.banner--demo .icon { color: var(--warn); }
.banner--warn { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.banner--info { background: var(--info-soft); color: var(--ink-2); border-color: color-mix(in srgb, var(--info) 22%, transparent); }
.banner--info .icon { color: var(--info); }
.banner--danger { background: var(--danger-soft); color: var(--ink-2); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.banner--danger .icon, .banner--warn .icon { color: var(--danger); }
.banner a { color: inherit; font-weight: 600; }
/* Full width: list, table and dashboard pages use the whole screen. Forms and long text keep their own reading widths. */
.content { padding: 28px var(--content-pad) 48px; width: 100%; }
.app-foot { margin-top: auto; padding: 14px var(--content-pad); color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

/* Page building blocks */
/* The head's actions (buttons, a status badge) sit level with the middle of the title block, not its last line. */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px 20px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head > div:first-child { min-width: 0; }
/* A second line in the title block (a link under the lead) stands 4px under the lead; the block ends without a margin. */
.page-head > div:first-child > p + p { margin-top: 4px; }
.page-head > div:first-child > p:last-child { margin-bottom: 0; }
/* A link line under the lead (Roles: "Permission sets and default roles") is its own line, not a wrapped second line of the lead. */
.page-head > div:first-child > .page-head-more { margin-top: 10px; font-size: 13px; font-weight: 700; }
.page-head-more .muted { font-weight: 400; }
/* A status badge that belongs to the page title sits on the title's line (Scheduled tasks: "Cron is not set up"). */
.page-head-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.back { margin: 0 0 16px; font-size: 13px; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--ink); }
.card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.card--flush { padding: 0; overflow-x: auto; }
.card--muted { background: var(--surface-2); box-shadow: none; margin-top: 24px; }
/* In a gap-spaced column the gap is the spacing; the muted card's own margin would double it. */
:is(.stack, .stack-lg, .form-layout, .two-col, .detail-grid) > .card--muted { margin-top: 0; }
.card--warn { border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); background: color-mix(in srgb, var(--warn-soft) 60%, var(--surface)); }
.card-title { font-family: var(--font); font-size: 14px; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.card-title .icon { color: var(--muted); }
/* A card's title with its count or buttons at the end of the row, level with the title's middle (defined once). */
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head .card-title { margin: 0; }
.card-title--pad { padding: 18px 20px 0; }
.text-danger { color: var(--danger); }
.section-title { font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 1.3; margin: 30px 0 12px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.two-col--wide-left { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); }
/* Cards side by side share a top and a bottom edge. */
.two-col--even { align-items: stretch; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
:where(.card--flush) > .card-title:not(.card-title--pad, .card-head--pad) { padding: 18px 20px 0; }
:where(.card--flush) > .card-head:not(.card-head--pad, .card-title--pad) { padding: 14px 20px 0; margin-bottom: 12px; }
/* Text and forms beside a table inside an edge-to-edge card. */
.card-pad { padding: 14px 20px; }
.form-layout { display: grid; gap: 18px; max-width: 900px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
/* Tiles in a row share their label, value and hint rows (subgrid), so the values line up even when one label wraps;
   where subgrid isn't supported, align-content keeps each tile's content at the top of its stretched box. */
.stat { position: relative; display: grid; grid-row: span 3; grid-template-rows: subgrid; gap: 2px; align-content: start; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 15px 18px 16px; text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.stat:hover { border-color: var(--tan-2); color: inherit; box-shadow: var(--shadow-lift); }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: 0; line-height: 1.25; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat-hint { font-size: 12px; color: var(--muted); }
/* Dashboard cards side by side share a top and a bottom edge. */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 20px; align-items: stretch; }
.dash-grid > .dash-wide { grid-column: 1 / -1; } /* a widget that asks for the width (dashboard.widgets 'wide'), as Roadside's Today gives it */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 13px; }
.feed li:last-child { border: 0; }
.feed-who { font-weight: 700; }
.feed time { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.list-plain li:last-child { border: 0; }
/* The upgrade page: the screen's icon beside what the package brings, the deal and the two buttons. */
.upgrade-card { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 16px 24px; align-items: start; }
.upgrade-picture { margin: 0; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.upgrade-picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.upgrade-picture--placeholder { display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line-strong); color: var(--muted); }
.upgrade-picture--placeholder .icon { width: 56px; height: 56px; }
.upgrade-card h2 { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.25; margin-bottom: 8px; }
.upgrade-card p { color: var(--ink-2); }
.upgrade-card .upgrade-deal { color: var(--ink); font-weight: 700; }
.upgrade-card .button-row { margin-top: 14px; }
@media (max-width: 560px) { .upgrade-card { grid-template-columns: minmax(0, 1fr); } }
/* All of Roadside (templates/upgrade/index.php): three bands of cards along a road, no tables. */
.road-band { margin-bottom: 32px; }
.road-band h2 { font-size: 18px; margin: 0; }
.road-sub { color: var(--ink-2); margin: 4px 0 0; }
.road-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.road-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; }
a.road-chip:hover { border-color: var(--ink); color: var(--ink); }
.road-chip .icon { width: 18px; height: 18px; color: var(--accent-text); }
.road-list { position: relative; list-style: none; margin: 14px 0 0; padding: 0 0 0 34px; }
.road-list::before { content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px; border-left: 3px solid var(--accent); }
.road-band--far .road-list::before { border-left-style: dashed; border-left-color: var(--line-strong); }
.road-item { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 16px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.road-item::before { content: ''; position: absolute; left: -30px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--paper); border: 3px solid var(--accent); box-sizing: border-box; }
.road-band--far .road-item { background: var(--surface-2); border-style: dashed; }
.road-band--far .road-item::before { border: 3px dashed var(--line-strong); }
.road-item > .icon { width: 24px; height: 24px; color: var(--accent-text); flex: 0 0 auto; }
.road-item p { flex: 1 1 220px; min-width: 0; margin: 0; }
.road-item p b { display: block; }
.road-item p span { color: var(--ink-2); }
.road-item p .road-screens { display: block; margin-top: 4px; color: var(--ink); }
.road-item p .road-screens span { color: inherit; }
.road-item p .road-note { display: block; margin-top: 4px; color: var(--ink); font-weight: 700; }
.road-item .badge .icon { width: 13px; height: 13px; }
.road-ready { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; }
.road-ready p { margin: 0; font-weight: 700; }
/* Turn it on (RX-20): the line's own form sits beside its tag; a line in the Everyday menu has a filled stop on the road. */
.road-item form { margin: 0; }
.road-item.is-on::before { background: var(--accent); }
/* Set it up (RX-23, approved screen 23): the sheet over All of Roadside, drawn by the server so it works without script. */
.road-item .road-owner { color: var(--ink-2); font-weight: 700; }
.setup-backdrop { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; background: var(--scrim); backdrop-filter: blur(3px); }
.setup-sheet { box-sizing: border-box; width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; margin: auto; padding: 26px 28px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-dialog); }
.setup-sheet h2 { margin: 0 0 14px; font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.3vw, 31px); line-height: 1.22; }
.setup-sheet h3, .setup-off h2 { margin: 16px 0 6px; font-size: 16px; font-weight: 700; }
.setup-list { list-style: none; margin: 0; padding: 0; }
.setup-list li { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; }
.setup-list .icon { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 3px; color: var(--accent-text); }
.setup-list li[data-need="withheld"] .icon, .setup-list li[data-need="unavailable"] .icon { color: var(--muted); }
.setup-note { margin: 14px 0 0; color: var(--ink-2); }
.setup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 18px 0 0; }
.setup-step-up { display: grid; gap: 10px; flex-basis: 100%; }
.setup-step-up label { display: grid; gap: 4px; }
.setup-later { min-height: 44px; display: inline-flex; align-items: center; }
.road-list--plain { padding-left: 0; }
.road-list--plain::before, .road-list--plain .road-item::before { display: none; }
@media (max-width: 560px) { .setup-sheet { padding: 20px 18px; } }
.road-more { margin: 0 0 8px; color: var(--ink-2); }
.road-more summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; }
@media (max-width: 560px) { .road-list { padding-left: 26px; } .road-list::before { left: 7px; } .road-item::before { left: -26px; } .road-item .badge { white-space: normal; } }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tile { position: relative; display: block; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 18px 20px 20px; text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.tile:hover { border-color: var(--tan-2); color: inherit; box-shadow: var(--shadow-lift); }
.tile h2 { font-family: var(--serif); font-weight: 400; font-size: 18px; margin-bottom: 6px; }
.tile p { color: var(--muted); margin: 0; font-size: 13.5px; }
.tile-go { position: absolute; right: 16px; top: 16px; color: var(--muted); }
.tile:hover .tile-go { color: var(--accent-text); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 14px; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts--2 { grid-template-columns: max-content 1fr; }
/* Wide detail cards show their facts in two label/value pairs per row instead of one long narrow list. */
.detail-grid > .stack-lg > .card { container-type: inline-size; }
@container (min-width: 720px) { .facts--2 { grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr); column-gap: 24px; } }
.note-block { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13.5px; }

/* Menu location (partials/menu-choices): radio cards, each with a small picture of its layout. */
.menu-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.menu-choice { position: relative; display: grid; align-content: start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.menu-choice:hover { border-color: var(--tan-2); }
.menu-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.menu-choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.menu-choice input { position: absolute; top: 12px; right: 12px; }
.menu-choice strong { display: block; margin-bottom: 3px; padding-right: 22px; font-size: 13px; }
.menu-choice small { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; }
.menu-choice__preview { display: grid; grid-template-columns: 18px 1fr 1fr; grid-template-rows: 10px 14px 14px; gap: 4px; width: 92px; padding: 5px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--paper-2); }
.menu-choice__preview i { grid-row: 1 / -1; border-radius: 2px; background: var(--sidebar-bg); }
.menu-choice__preview b { border-radius: 2px; background: var(--line-strong); }
.menu-choice__preview b:first-of-type { grid-column: 2 / -1; }
.menu-choice__preview--top i { grid-column: 1 / -1; grid-row: 1; }
.menu-choice__preview--top b:first-of-type { grid-column: 1 / -1; }
.menu-choice__preview--workspace { opacity: .6; }
@media (max-width: 560px) {
  .menu-choices { grid-template-columns: minmax(0, 1fr); }
  .menu-choice { grid-template-columns: 72px minmax(0, 1fr); align-items: center; padding-right: 36px; }
  .menu-choice__preview { width: 72px; grid-template-columns: 14px 1fr 1fr; grid-template-rows: 8px 11px 11px; }
}
/* A setting someone else controls: says who, and where to change it. */
.setting-note { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; }
.setting-note .icon { flex: none; color: var(--muted); }

/* My account (core/profile): a head with the person's initials, then sections as tabs (app.js; every section shows without it). */
.profile-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 16px; margin-bottom: 20px; }
/* The two-factor badge follows the name and email instead of floating at the far right of the page. */
.profile-head > div { flex: 0 1 auto; min-width: 0; }
.profile-head .lead { overflow-wrap: anywhere; }
.profile-status { margin: 0; }
.avatar--lg { width: 56px; height: 56px; font-size: 18px; }
.profile { display: grid; gap: 20px; }
.profile-tabs { display: flex; flex-wrap: wrap; gap: 4px; width: fit-content; max-width: 100%; padding: 4px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-2); }
.profile-tabs button { min-height: 36px; padding: 7px 14px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font: 700 13px var(--font); cursor: pointer; }
.profile-tabs button:hover { color: var(--ink); }
.profile-tabs button[aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong); }
.profile-tabs button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.profile-grid .card { min-width: 0; }
/* With app.js the cards are masonry ([data-masonry]): each spans as many 1 px rows as it is tall, so a short card no
   longer leaves a gap under it beside a tall one (Erran, Nov 4). Its 20 px gap moves to the card's own margin. */
.profile-grid.is-masonry { grid-auto-rows: 1px; row-gap: 0; }
.profile-grid.is-masonry > .card { margin-bottom: 20px; }
.profile-grid .stack > .button { justify-self: start; }
/* The theme switch on a light card (the sidebar's is drawn for DRS ink). */
.theme-switch--page { border-color: var(--line-strong); }
.theme-switch--page button { color: var(--ink-2); }
.theme-switch--page button:hover { color: var(--ink); background: var(--paper-2); }
.theme-switch--page button[aria-pressed=true] { background: var(--ink); color: var(--surface); }
@media (max-width: 900px) { .profile-grid { grid-template-columns: minmax(0, 1fr); } }

/* Quick view (app.js, a link with data-peek): a record's summary slides in from the right, so people can look something up
   without leaving the list. The link itself goes to the full page (a middle click, or no JavaScript). */
.peek-link { width: 28px; height: 28px; margin-left: 2px; vertical-align: middle; font-size: 0; }
.peek-link .icon { width: 16px; height: 16px; }
.peek { position: fixed; inset: 0 0 0 auto; width: min(460px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-dialog); }
.peek[open] { display: flex; flex-direction: column; }
.peek::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
.peek__bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--line); }
.peek__label { flex: 1 1 auto; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 13px; }
.peek__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 20px; }
.peek__body h2 { margin: 0 0 4px; font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; }
.peek__body .badges { margin: 0 0 12px; }
.peek__body .facts { margin: 16px 0; }
.peek__body .note-block { margin-bottom: 14px; }
.peek__loading { margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .peek[open] { animation: peek-in .2s ease-out; }
  @keyframes peek-in { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
}
.unlock { margin: 0 0 16px; padding: 10px 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); }
.unlock form { margin-top: 12px; max-width: 420px; }
.unlock--open { color: var(--ok); font-size: 13px; border-style: solid; border-color: color-mix(in srgb, var(--ok) 25%, transparent); background: var(--ok-soft); display: flex; gap: 8px; align-items: center; }
.empty-state { display: grid; justify-items: center; gap: 4px; padding: 36px 20px; text-align: center; color: var(--muted); }
.empty-state .icon { width: 28px; height: 28px; margin-bottom: 6px; color: var(--tan-2); }
.empty-state strong { color: var(--ink); font-size: 14.5px; }
.empty-state p { margin: 0 0 8px; max-width: 46ch; }

/* Tables */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th { position: sticky; top: 0; text-align: left; font-size: 12px; letter-spacing: 0; color: var(--muted); font-weight: 700; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
/* A long address breaks inside the column instead of pushing the last column (a Change button) out of the card. */
.table td code { overflow-wrap: anywhere; }
.table tbody tr:last-child td { border-bottom: 0; }
.table--rows tbody tr:hover, .table tr[data-row-href]:hover { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.table tr[data-row-href] { cursor: pointer; }
.table--dense td { padding: 8px 14px; }
.table th a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.table th a:hover { color: var(--ink); }
.table th[aria-sort] a { color: var(--ink); }
.sort-arrow { font-size: 12px; color: var(--accent-text); }
.row-link { text-decoration: none; }
.row-link:hover { text-decoration: underline; }
.row-muted td { opacity: .55; }
.empty-row { text-align: center; color: var(--muted); padding: 0 !important; }
.empty-row:not(:has(.empty-state)) { padding: 32px !important; }
/* Scrollable tables: a shadow on the right edge shows there are more columns (pure CSS: the cover
   scrolls with the content, the shadow stays put). app.js makes the wrapper a focusable, labelled region. */
.card--flush { background: linear-gradient(to left, var(--surface) 45%, transparent) right / 36px 100% no-repeat local, linear-gradient(to left, color-mix(in srgb, var(--ink) 13%, transparent), transparent) right / 14px 100% no-repeat scroll, var(--surface); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters .field--grow { flex: 1 1 280px; }
.filters select { min-width: 150px; width: auto; }
.js .filters[data-live] .filters-apply { display: none; }
/* A filter row with a labelled field: the buttons and the count line up with the field's box, not with its label. */
.filters:has(> .field > label) { align-items: flex-end; }
.filters:has(> .field > label) > .button--small { margin-bottom: 3px; }
.filters:has(> .field > label) > p { display: flex; align-items: center; min-height: 38px; margin: 0; }
.inline-search { display: flex; gap: 8px; }
.inline-search input { min-width: 240px; }
.pager { display: flex; gap: 18px; align-items: center; justify-content: center; margin: 0; font-size: 13px; color: var(--muted); }
/* Customer pages (store, blog) have no page rhythm: the pager keeps its own room there. */
:is(.shop-main, .blog-main) .pager { margin: 18px 0; }
.pager a { padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); text-decoration: none; color: var(--ink); }
.pager a:hover { background: var(--surface-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 700; text-decoration: none; }
.chip:hover { border-color: var(--tan-2); color: var(--ink); }
.chip[aria-current=true] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip-count { min-width: 20px; padding: 0 6px; border-radius: 2px; background: var(--paper-2); color: var(--muted); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.chip[aria-current=true] .chip-count { background: color-mix(in srgb, var(--surface) 22%, transparent); color: var(--surface); }
[data-list].is-loading { opacity: .6; transition: opacity .15s; }

/* People & timeline */
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; gap: 11px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.people li:last-child { border: 0; }
.people li > div { flex: 1; min-width: 0; }
.compose textarea { min-height: 64px; }
.compose-row { display: flex; gap: 8px; justify-content: space-between; }
.compose-row select { width: auto; min-height: 32px; padding: 4px 8px; }
.timeline { list-style: none; margin: 16px 0 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 16px 16px; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--tan-2); }
.timeline li.timeline-call::before, .timeline li.timeline-visit::before { border-color: var(--accent); }
.timeline li.timeline-system::before { border-color: var(--line-strong); background: var(--paper-2); }
.timeline-meta { font-size: 12px; color: var(--muted); }
.timeline p { margin: 3px 0 0; font-size: 13.5px; }
.empty { max-width: 520px; margin: 60px auto; text-align: center; }

/* Responsive */
/* Search results (/search): record types on the left, results grouped by type on the right. */
.search-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.search-layout > .search-main:only-child { grid-column: 1 / -1; max-width: 760px; }
.search-types ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; position: sticky; top: calc(var(--topbar-h) + 16px); }
.search-types a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.search-types a > span:first-of-type { flex: 1; }
.search-types a .icon { width: 16px; height: 16px; flex: none; color: var(--muted); }
.search-types a:hover { background: var(--surface-2); color: var(--ink); }
.search-types a[aria-current=true] { background: var(--accent-soft); color: var(--ink); font-weight: 650; }
.search-main { display: grid; gap: 16px; min-width: 0; }
.search-section { overflow: visible; }
.search-section .card-head { padding: 14px 16px 2px; margin: 0; flex-wrap: wrap; gap: 6px 12px; }
.search-list { list-style: none; margin: 0; padding: 0; }
.search-list li { border-top: 1px solid var(--line); }
.search-hit { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; color: var(--ink); text-decoration: none; }
.search-hit:hover { background: var(--surface-2); }
.search-hit > .icon { width: 18px; height: 18px; margin-top: 2px; flex: none; color: var(--muted); }
.search-hit-body { display: grid; gap: 2px; min-width: 0; }
.search-hit-title { font-weight: 600; overflow-wrap: anywhere; }
.search-hit-meta, .search-hit-match { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.search-hit-match { color: var(--ink-2); }
.search-hit-match > span { color: var(--muted); }
.search-capped { margin: 0; text-align: center; }
.search-tips .tips { display: grid; gap: 10px; margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
.search-form .button .icon { width: 15px; height: 15px; }
/* Deep links from search (#contact-12, #note-40, #two-factor) land below the top bar and stand out briefly. */
/* --top-nav-clear is the top menu's measured height (app.js), which grows when the menu wraps to a second row. */
section[id], li[id], details[id], h2[id] { scroll-margin-top: calc(var(--topbar-h) + var(--top-nav-clear, var(--top-nav-h)) + 16px); }
.card:target, details:target { box-shadow: 0 0 0 2px var(--accent); }
.people li:target, .timeline li:target { background: var(--accent-soft); border-radius: var(--radius-sm); }
@media (max-width: 1100px) { .detail-grid, .two-col--wide-left { grid-template-columns: minmax(0, 1fr); } }
@media (width < 900px) {
  /* A drawer wide enough for the 192px logo and the close button side by side. */
  /* The shadow comes with the open drawer only: on the closed one it would bleed into the page's left edge. */
  .sidebar { width: min(288px, 86vw); transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .topbar-mark { display: inline-flex; }
  .nav-scrim { display: none; position: fixed; inset: 0; background: var(--scrim); backdrop-filter: blur(3px); z-index: 30; }
  body.nav-open .nav-scrim { display: block; }
  .sidebar-close, .menu-toggle { display: inline-flex; }
  .sidebar-collapse { display: none; } /* the drawer keeps the accordion; the icon rail is for desktops */
  .app-main { margin-left: 0; }
  .topbar { gap: 8px; } /* keeps --content-pad, the page's one left edge */
  .topbar-tools { flex: 1; }
  .topbar-search { width: auto; flex: 1; }
  .topbar-search kbd { display: none; }
  .crumbs { display: none; }
  body.app-page .savebar { left: 0; }
}
@media (max-width: 900px) {
  .two-col, .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .content { padding: 20px 16px 40px; }
  .auth-card { padding: 24px 18px; }
  .codes { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat-value { font-size: 23px; }
  .inline-search input { min-width: 0; }
  .table th, .table td { padding: 10px 12px; }
  .quick-create-label { display: none; }
  .find-results { position: fixed; top: calc(var(--topbar-h) + 4px); left: 12px; right: 12px; min-width: 0; width: auto; }
  .filters select { flex: 1 1 140px; }
  /* Stacked list rows: each cell carries its column name in data-label. */
  .table--stack thead { display: none; }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; }
  .table--stack tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table--stack tbody tr:last-child { border-bottom: 0; }
  .table--stack td { padding: 2px 0; border: 0; }
  .table--stack td:first-child { margin-bottom: 4px; }
  .table--stack td[data-label]:not(:first-child) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-size: 13px; }
  .table--stack td[data-label]:not(:first-child)::before { content: attr(data-label); flex: 0 0 106px; color: var(--muted); font-size: 12px; }
  .table--stack td.empty-row { padding: 0 !important; }
  .table--stack td.row-actions { text-align: left; }
  .table--stack td.row-actions::before { display: none; }
  .table--stack td.row-actions form { margin: 6px 6px 0 0; }
}
@media print { .sidebar, .topbar, .banner, .app-foot, .toast-region { display: none; } .app-main { margin: 0; } }
@media print { .phone-bar { display: none !important; } body.app-page { padding-bottom: 0; --app-action-bottom: 0px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Simple horizontal bars (widths set from data-w by app.js; CSP forbids inline styles) */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.bars li { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr 32px; gap: 10px; align-items: center; font-size: 13px; }
.bar { height: 8px; background: var(--paper-2); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
.bars strong { text-align: right; font-variant-numeric: tabular-nums; }

/* Sign-in options, email settings */
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 18px 0 12px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.sso-buttons { display: grid; gap: 10px; }
.center { text-align: center; }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 14px; margin: 0; display: grid; gap: 12px; }
.fieldset legend { font-weight: 700; font-size: 12.5px; padding: 0 6px; color: var(--ink-2); }
.fieldset .check { align-items: flex-start; }
.fieldset .check input { margin-top: 3px; }
.howto { border-top: 1px solid var(--line); padding-top: 10px; font-size: 13px; }
.howto summary { cursor: pointer; color: var(--accent-text); font-weight: 700; }
.howto ol { padding-left: 18px; display: grid; gap: 8px; margin: 10px 0 0; }
.tips { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 13px; color: var(--ink-2); }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover { color: var(--accent-text); }
.auth-foot .legal-links { justify-content: center; margin-top: 8px; }
.app-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }
.app-foot-credit { color: inherit; text-decoration: none; }
.app-foot-credit:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.legal { max-width: 820px; }
.legal h1 { margin-bottom: 6px; }
.legal h2 { font-size: 18px; margin: 26px 0 8px; }
.legal p, .legal li { font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.legal ul, .legal ol { padding-left: 20px; }
.legal .draft { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); color: var(--ink-2); border-radius: var(--radius); padding: 10px 14px; font-size: 13px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 13.5px; margin: 10px 0; }
.legal th, .legal td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; overflow-wrap: break-word; }
/* A table of three or more columns squeezes or scrolls sideways on a phone, so below 480px it is hidden and each row is a
   card instead: the first cell heads the card and the other columns are the list under it. Both copies come from one set
   of rows, and display: none keeps the hidden one out of the accessibility tree. */
.legal-cards { display: none; }
@media (max-width: 480px) {
  .legal table.legal-table-wide { display: none; }
  .legal-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 12px 0; }
  .legal-card { min-width: 0; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 12px 14px; }
  .legal-card h3 { font-size: 15px; margin: 0 0 10px; color: var(--ink); }
  .legal-card p { margin: 0; }
  .legal-card dl { margin: 0; }
  .legal-card dt { font-size: 12px; font-weight: 700; color: var(--muted); }
  .legal-card dd { margin: 1px 0 10px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
  .legal-card dd:last-child { margin-bottom: 0; }
}
.legal-page { min-height: 100vh; background: var(--paper); }
.legal-shell { max-width: 880px; margin: 0 auto; padding: 36px 20px 60px; }
.legal-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }

/* Error pages (layout/error.php) */
.error-page { max-width: 480px; margin: 0 auto; padding: 72px 20px 40px; text-align: center; }
.error-page .auth-brand { margin-bottom: 28px; }
.error-code { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--muted); }
.error-page h1 { margin-bottom: 8px; }
.error-page > p { color: var(--muted); } /* the code and message, not the product name in .auth-brand */
.error-page .button-row { justify-content: center; margin-top: 20px; }

/* Installer */
.install-shell { max-width: 720px; margin: 0 auto; padding: 48px 16px 40px; }
.step { font-family: var(--font); font-size: 15px; display: flex; align-items: center; gap: 10px; margin: 26px 0 10px; }
.step span { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); font-size: 12.5px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.checks .ok strong { color: var(--ok); }
.checks .bad strong { color: var(--danger); }
.mt-1{margin-top:1rem}
/* Devices & API keys (admin/devices.php): the pairing code with its steps, the connected computers, the API keys. */
.pairing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px 36px; margin-bottom: 20px; border-color: color-mix(in srgb, var(--ok) 40%, var(--line-strong)); }
.pairing--key { display: block; }
.pairing .card-title { margin-bottom: 6px; }
/* The code never wraps: monospace, one line, sized to the screen (11 characters fit a 375px phone). */
.pairing-code { margin: 0 0 4px; font: 700 clamp(28px, 8.5vw, 42px)/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .1em; white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums; user-select: all; }
.pairing__status { margin: 0 0 14px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.pairing.is-expired .pairing-code { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.pairing.is-expired .pairing__status { color: var(--warn); font-weight: 700; }
.pairing-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 12px; align-self: center; font-size: 13.5px; }
.pairing-steps li { position: relative; padding-left: 36px; counter-increment: step; }
.pairing-steps li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--surface); font: 700 12px/24px var(--font); text-align: center; }
.pairing-address { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.pairing-address code { font-size: 13px; overflow-wrap: anywhere; }
.copy-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.copy-row .copy-field { flex: 1 1 240px; width: auto; }
.card--primary { border-color: var(--accent); }
.card-head--pad { padding: 14px 20px 0; margin-bottom: 12px; }
.device-list { list-style: none; margin: 0; padding: 0; }
.device { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 13.5px; }
.device--off { color: var(--muted); }
.device__name strong { overflow-wrap: anywhere; }
.device__seen { display: flex; align-items: flex-start; gap: 8px; }
.status-dot { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--tan-2); }
.status-dot--on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.device__actions { display: flex; justify-content: flex-end; }
.device__actions form { margin: 0; }
/* Disclosures: one chevron for every summary that opens a panel (cards, and the post editor's "Publish later" and "Add a category"),
   drawn as a block so it keeps its size in a summary that isn't a flex row. */
:is(details.card, details.post-later, details.post-inline-add) > summary { cursor: pointer; list-style: none; }
:is(details.card, details.post-later, details.post-inline-add) > summary::-webkit-details-marker { display: none; }
:is(details.card, details.post-later, details.post-inline-add) > summary::before { content: ''; display: inline-block; flex: none; width: 7px; height: 7px; margin: 0 7px 2px 2px; vertical-align: middle; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
:is(details.card, details.post-later, details.post-inline-add)[open] > summary::before { transform: rotate(45deg); margin-bottom: 4px; }
details.card[open] > summary { margin-bottom: 10px; }
@media (prefers-reduced-motion: reduce) { :is(details.card, details.post-later, details.post-inline-add) > summary::before { transition: none; } }
@media (max-width: 900px) {
  .pairing { grid-template-columns: minmax(0, 1fr); }
  .pairing-steps { align-self: start; }
}
@media (max-width: 760px) {
  .device { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 16px; }
  .device__actions { grid-column: 2; grid-row: 1 / span 3; }
  .device__name, .device__paired, .device__seen { grid-column: 1; }
  .card-head--pad { padding: 14px 16px 0; }
  .card-pad { padding: 14px 16px; }
}

/* Password prompt for sensitive changes (partials/step-up.php). */
/* "Fetch with AI" (inventory/form.php) and "Update stock" (inventory/editor/stock.php) on the product page use the same look. */
.ai-dialog, .stock-dialog { width: min(520px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-dialog); }
.ai-dialog::backdrop, .stock-dialog::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
.ai-dialog p, .stock-dialog p { margin: 0; }
.ai-working { display: grid; gap: 8px; }
.ai-progress { height: 8px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.ai-progress-bar { width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s ease-out; }
/* Fetch from my browser: its install steps (inventory/from-browser-install.php) and the page it opens (inventory/from-browser.php). */
.from-browser-help { margin-top: 4px; }
.from-browser-steps { display: grid; gap: 10px; margin-top: 10px; }
.from-browser-steps p { margin: 0; }
.bookmarklet-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.bookmarklet { cursor: grab; }
.from-browser-facts { margin: 0; }
.from-browser-facts dd { font-weight: 700; }
.fb-results { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fb-results .check { align-items: baseline; flex-wrap: wrap; }
/* Photos Fetch with AI found (inventory/editor/ai-photos.php), offered checked in the Photos section. */
.ai-photos { display: grid; gap: 10px; margin-bottom: 16px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.ai-photos-title { margin: 0; }
.ai-photos-list { display: flex; flex-wrap: wrap; gap: 10px; }
.ai-photo { position: relative; display: block; cursor: pointer; }
.ai-photo img { display: block; width: 96px; height: 96px; object-fit: contain; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.ai-photo input { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.ai-photo input:checked + img { border-color: var(--accent); }
.ai-photo input:not(:checked) + img { opacity: .45; }
.ai-photo input:focus-visible + img { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Sizes Fetch with AI found (inventory/editor/ai-sizes.php), offered unticked under Size and price, or in Sizes. */
.ai-sizes { display: grid; gap: 10px; margin-top: 16px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.ai-sizes-title { margin: 0; }
.ai-sizes-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ai-size { display: grid; grid-template-columns: minmax(120px, 1fr) auto minmax(0, 1.3fr); gap: 6px 16px; align-items: center; }
.ai-size-price { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.ai-size-price input { width: 104px; font-weight: 400; }
@media (max-width: 560px) { .ai-size { grid-template-columns: minmax(0, 1fr) auto; } .ai-size .hint { grid-column: 1 / -1; } }
/* The options Fetch with AI found (inventory/editor/ai-options.php): what the page sells and which combinations to carry,
   or what it has that a saved product doesn't; then the colors' photos coming in after the save (ai-color-photos.php). */
.ai-options, .ai-color-photos { display: grid; gap: 10px; margin-bottom: 16px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.ai-options p, .ai-color-photos p { margin: 0; }
.ai-options-list { display: grid; gap: 6px; margin: 0; }
.ai-options-list > div { display: grid; grid-template-columns: minmax(90px, max-content) minmax(0, 1fr); gap: 4px 14px; align-items: baseline; }
.ai-options-list dt { font-weight: 700; font-size: 13px; }
.ai-options-list dd { margin: 0; font-size: 13px; }
.ai-chips, .ai-picks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; }
.ai-chip, .ai-picks .check, .ai-cp { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.ai-carry, .ai-offer { display: grid; gap: 6px; }
.ai-codes { margin: 0; padding-left: 18px; }
.ai-options .val-swatch, .ai-color-photos .val-swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); flex: none; }
.ai-options .val-swatch.is-none, .ai-color-photos .val-swatch.is-none { background: repeating-linear-gradient(45deg, var(--line-strong) 0 2px, transparent 2px 5px); }
.ai-cp-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ai-cp-label { font-weight: 700; }
.ai-cp[data-state=done] [data-cp-said] { color: var(--ok); }
.ai-cp[data-state=missed] [data-cp-said] { color: var(--warn); }
.ai-cp[data-state=working] [data-cp-said] { color: var(--accent-text); }
@media (max-width: 560px) { .ai-options-list > div { grid-template-columns: minmax(0, 1fr); } }
/* What's left for the person after Fetch with AI: highlighted until they change it. */
.card.ai-todo { box-shadow: 0 0 0 2px var(--warn); }
.field.ai-todo input, .field.ai-todo select, .field.ai-todo textarea { border-color: var(--warn); box-shadow: 0 0 0 2px var(--warn-soft); }
.editor-menu a.is-todo:not(.is-dirty)::after { content: 'For you'; flex: none; padding: 1px 6px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 11px; font-weight: 700; }
.editor-menu a.is-todo:not(.is-dirty) small { display: none; }
.step-up-dialog { width: min(420px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-dialog); }
.step-up-dialog::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
.step-up-dialog h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; }
.confirm-dialog p { margin: 0; font-size: 15px; line-height: 1.5; }
.step-up-dialog p { margin: 0; }

/* ---------------------------------------------------------------- inventory and orders (module packages) */
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { border-top: 1px solid var(--line); border-bottom: 0; padding-top: 8px; padding-bottom: 8px; }
.product-cell { display: flex; align-items: center; gap: 12px; }
.thumb { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; background: var(--paper-2); flex: none; }
.thumb--empty { display: grid; place-items: center; color: var(--muted); }
.thumb--lg { width: 140px; height: 140px; }
.product-overview { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
/* Barcodes (inventory/barcodes/*, barcode.js): the bars stay black on white, a small label of their own in dark mode. */
.barcode-show, .barcode-preview { display: grid; gap: 6px; justify-items: start; }
.barcode-digits { font-variant-numeric: tabular-nums; }
.barcode-img { display: block; width: 150px; max-width: 100%; height: auto; background: #fff; border-radius: var(--radius-sm); }
.barcode-img--small { width: 96px; margin-top: 4px; }
html[data-theme=dark] .barcode-img { padding: 3px; }
.barcode-cell { display: inline-grid; justify-items: start; }
.barcode-make { margin: 6px 0 0; }
.barcode-actions { margin-bottom: 12px; }
.barcode-downloads { justify-content: flex-end; flex-wrap: nowrap; }
.barcode-preview { margin-top: 2px; }
.barcode-preview .barcode-img { width: 140px; }
.barcode-preview .hint:empty { display: none; }
/* A product's Photos and Sizes cards: a list of rows, each with its own small forms (.card-head is defined with .card). */
.card-count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.card-count b { color: var(--ink); font-variant-numeric: tabular-nums; }
.item-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.item-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.item-row--plain { grid-template-columns: minmax(0, 1fr) auto; }
.item-row.is-cover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.item-row.is-pending { border-style: dashed; border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.item-img { width: 92px; height: 92px; border-radius: var(--radius-sm); border: 1px solid var(--line); object-fit: cover; background: var(--paper-2); }
.item-img--empty { display: grid; place-items: center; border-style: dashed; color: var(--muted); font-size: 11px; text-align: center; padding: 6px; }
.item-main { display: grid; gap: 8px; min-width: 0; }
.item-line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12.5px; }
.item-line strong { font-size: 14px; }
.item-pos { font-weight: 700; color: var(--ink-2); }
.item-fields { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; margin: 0; }
.item-fields--two { grid-template-columns: minmax(0, 1fr) auto; }
.item-fields .field { margin: 0; }
.item-tools { display: grid; gap: 6px; justify-items: end; }
.item-tools .button-row { flex-wrap: nowrap; }
.item-tools form { margin: 0; }
.item-add { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.item-add > summary, .item-edit > summary { cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--accent-text); }
.item-edit > summary { font-size: 12.5px; }
.item-edit[open] > summary { margin-bottom: 10px; }
.item-add[open] > summary { margin-bottom: 12px; }
/* The product description editor (inventory/assets/rich-text.js) and the feed tag table. */
.rich-text { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.rich-text-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); }
.rich-text-area { min-height: 220px; padding: 12px 14px; outline: none; line-height: 1.6; }
.rich-text-area:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.rich-text-area h3 { font-size: 17px; margin: 14px 0 6px; } .rich-text-area h4 { font-size: 15px; margin: 12px 0 4px; }
.rich-text-area ul, .rich-text-area ol { padding-left: 22px; } .rich-text-area p { margin: 0 0 10px; }
.rich-text-area table { border-collapse: collapse; margin: 0 0 10px; font-size: 13px; } .rich-text-area th, .rich-text-area td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; }
.analysis-table input, .analysis-table select { width: 100%; min-width: 0; }
.analysis-table td { padding: 4px 6px; }
.badge--cover { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-text); }
/* The blog's Authors screen (posts/authors.php). */
.author-list { list-style: none; margin: 0; padding: 0; }
.author-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.author-row:last-child { border-bottom: 0; }
.author-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--paper-2); }
.author-photo--empty { display: grid; place-items: center; font-weight: 700; font-size: 20px; color: var(--muted); }
.author-main { display: grid; gap: 4px; min-width: 0; }
.author-main .hint { margin: 0; }
@media (max-width: 700px) { .author-row { grid-template-columns: 48px minmax(0, 1fr); } .author-row .item-tools { grid-column: 1 / -1; justify-items: start; } .author-photo { width: 48px; height: 48px; } }
.statline { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }
.statline a { color: var(--accent-text); font-weight: 700; text-decoration: none; }
.statline a:hover { text-decoration: underline; }
.rich-text-sep { width: 1px; align-self: stretch; margin: 2px 2px; background: var(--line-strong); }
/* The product editor (inventory/form.php, product-editor.js): a side menu that stays, the sections in one column, one save bar. */
.editor-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; align-items: start; }
.editor-menu { position: sticky; top: calc(var(--topbar-h) + 16px); display: grid; gap: 2px; }
.editor-menu a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-left: 2px solid transparent; border-radius: var(--radius); color: var(--ink-2); font-size: 13.5px; text-decoration: none; }
.editor-menu a small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.editor-menu a.is-warn small { padding: 1px 6px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-weight: 700; }
.editor-menu a:hover { background: var(--surface); color: var(--ink); }
.editor-menu a[aria-current] { background: var(--surface); color: var(--ink); font-weight: 700; border-left-color: var(--accent); }
.editor-menu a.is-dirty::after { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.editor-menu a.is-dirty small { display: none; }
.editor-menu-note { margin: 12px 10px 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.editor-sections { display: grid; gap: 16px; min-width: 0; padding-bottom: 72px; }
.editor-sections > .card { margin: 0; }
.card-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.card-head > div { min-width: 0; }
.saved-as-you-go { display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 8px; border-radius: var(--radius-sm); background: var(--ok-soft); color: var(--ok); font-size: 11.5px; font-weight: 700; vertical-align: 2px; }
.sizes-tax { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.counter { justify-self: end; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.is-over { color: var(--warn); font-weight: 700; }
.serp { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.serp p { margin: 0; }
.serp-title { font-size: 17px; line-height: 1.3; color: #1A0DAB; overflow-wrap: anywhere; }
.serp-desc { margin-top: 3px !important; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.stock-table .input-num { width: 96px; min-height: 34px; text-align: right; }
.stock-table .check { justify-content: flex-start; }
.stock-table .stock-sell { width: auto; min-height: 34px; padding: 4px 8px; }
.stock-table .stock-onhand { display: inline-flex; align-items: center; justify-content: flex-end; gap: 12px; }
.table-wrap { overflow-x: auto; }
.savebar { position: fixed; left: var(--sidebar-w); right: 0; bottom: var(--app-action-bottom, 0px); z-index: 25; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 28px; border-top: 1px solid var(--line-strong); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); }
.savebar-status { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.savebar-status.is-dirty { color: var(--warn); font-weight: 700; }
/* The saved product's one save (row 6c): what the save bar says of the product's status, a save stopped in the browser,
   sizes and photos marked to go, photos chosen but not saved yet, and the preview of what customers will see. */
.savebar-live { font-size: 13px; color: var(--ink); }
.savebar-live a { margin-left: 6px; }
.savebar-refused { flex-basis: 100%; order: -3; margin: 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--danger-soft, var(--warn-soft)); color: var(--ink); font-size: 13.5px; font-weight: 700; }
.item-row.is-going { opacity: .55; border-style: dashed; }
.item-row.is-going .item-main strong { text-decoration: line-through; }
.item-row.is-new { border-style: dashed; border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.item-row.is-too-large { border-color: var(--danger, var(--warn)); }
.item-tools .check { font-size: 13px; }
.new-photo-row { display: grid; gap: 10px; }
.field-static { margin: 0; padding: 9px 0; font-size: 14px; }
/* "Where this shows" (inventory/editor/preview.php; the approved screen 40): what customers see now and after the save,
   at the register and on the website. From 1200px it is a panel to the right of the fields that stays in view while the
   page scrolls (the section menu moves above the fields until there is room for three columns); below that it follows
   the last section, and Save changes brings it up in a window first (product-live.js). */
.editor-preview { min-width: 0; }
.preview-panel { margin: 0; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.preview-panel > .card-title { margin: 0 0 10px; }
.pv-label { margin: 14px 0 6px; font-size: 14px; font-weight: 700; color: var(--ink); }
.pv-label:first-child { margin-top: 0; }
.pv-label--sub { font-size: 13px; }
.where { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.where > li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.where > li > .icon { width: 20px; height: 20px; margin-top: 1px; color: var(--accent-text); }
.where > li > span { display: grid; gap: 2px; min-width: 0; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.where > li b { color: var(--ink); }
.where--new > li { border-style: dashed; border-color: color-mix(in srgb, var(--accent) 70%, var(--line)); }
.where-photos { display: flex !important; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.where-photos img { width: 44px; height: 44px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.where-photos img.is-new { border: 2px dashed var(--accent); }
.pv-changes { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 14px; color: var(--ink); }
.pv-hint { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.pv-error { margin: 12px 0 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--warn-soft); font-size: 13.5px; color: var(--ink); }
.pv-working { font-style: italic; }
.pv-more { margin: 6px 0 0; font-size: 14px; }
.pv-more > summary { cursor: pointer; color: var(--accent-ink, var(--accent)); font-weight: 600; }
.pv-more > .pv-changes { margin-top: 6px; }
.pv-error .button { margin-left: 6px; }
.savebar-failed { flex-basis: 100%; order: -2; margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 13.5px; color: var(--ink); }
.savebar-failed li { padding: 6px 10px; border-radius: var(--radius-sm); background: var(--warn-soft); }
.look-over { scroll-margin-top: calc(var(--topbar-h) + 12px); }
.editor-preview.is-asking .preview-panel { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent); }
.when-beside { display: none; }
.editor-menu-preview { display: flex; }
.preview-confirm { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 18px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); overflow-y: auto; }
.preview-confirm::backdrop { background: rgba(10, 20, 16, .5); }
.preview-confirm .card-title { margin: 0 0 12px; }
.preview-confirm .button-row { margin-top: 14px; }
@media (min-width: 1200px) {
  .editor-layout--preview { grid-template-columns: minmax(0, 1fr) 320px; }
  .editor-layout--preview > .editor-menu { grid-column: 1 / -1; position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .editor-layout--preview > .editor-menu a { flex: none; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); }
  .editor-layout--preview > .editor-menu a[aria-current] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
  .editor-layout--preview > .editor-menu a small, .editor-layout--preview > .editor-menu .editor-menu-note { display: none; }
  .editor-layout--preview > .editor-preview { position: sticky; top: calc(var(--topbar-h) + 16px); max-height: calc(100vh - var(--topbar-h) - 112px); overflow-y: auto; }
  .editor-layout--preview .editor-menu-preview { display: none; }
  .when-beside { display: inline; }
  .when-below { display: none; }
}
@media (min-width: 1640px) {
  .editor-layout--preview { grid-template-columns: 200px minmax(0, 1fr) 340px; }
  .editor-layout--preview > .editor-menu { grid-column: auto; position: sticky; display: grid; gap: 2px; }
  .editor-layout--preview > .editor-menu a { flex: initial; padding: 8px 10px; border: 0; border-left: 2px solid transparent; border-radius: var(--radius); background: none; }
  .editor-layout--preview > .editor-menu a[aria-current] { border-left-color: var(--accent); background: var(--surface); color: var(--ink); }
  .editor-layout--preview > .editor-menu a small { display: inline; }
  .editor-layout--preview > .editor-menu .editor-menu-note { display: block; }
}
@media (max-width: 1199px) {
  .editor-layout--preview > .editor-preview { grid-column: 1 / -1; padding-bottom: 130px; }
  .editor-layout--preview > .editor-sections { padding-bottom: 0; }
}
@media (max-width: 720px) {
  .savebar-live { flex-basis: 100%; }
}
/* Someone else saved the product while it was open (inventory/editor/conflict.php, product-editor.js). */
.savebar-changed { flex-basis: 100%; order: -2; margin: 0; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--warn-soft); font-size: 12.5px; color: var(--ink); }
.conflict-body { flex: 1; min-width: 0; display: grid; gap: 8px; }
.conflict-body p { margin: 0; }
.conflict-diff > summary { cursor: pointer; font-weight: 700; }
.conflict-diff .table-wrap { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.conflict-diff .table td, .conflict-diff .table tbody th { vertical-align: top; }
.conflict-diff .table td { overflow-wrap: anywhere; }
.conflict-diff .table tbody th { position: static; min-width: 7.5em; white-space: normal; background: none; color: var(--ink); font-size: 13px; }
.conflict-actions { align-items: flex-start; }
.conflict-confirm > summary { list-style: none; }
.conflict-confirm > summary::-webkit-details-marker { display: none; }
.conflict-confirm-body { display: grid; gap: 8px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
/* A draft's banner under its title (inventory/draft-banner.php): the words, then Put it on the website at the end of the row. */
.draft-banner { padding: 12px 16px; font-size: 14px; }
.draft-banner::before { align-self: center; margin-top: 0; }
.draft-banner-body { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 16px; }
.draft-banner-body p, .draft-banner-body form { margin: 0; }
@media (max-width: 900px) {
  .draft-banner::before { align-self: flex-start; margin-top: 7px; }
  .draft-banner-body { grid-template-columns: minmax(0, 1fr); }
  .editor-menu a.is-warn { border-color: color-mix(in srgb, var(--warn) 50%, var(--line-strong)); color: var(--warn); }
  .savebar { left: 0; padding: 10px 12px; }
  .savebar-status { flex-basis: 100%; margin: 0; order: -1; }
  .conflict-diff .table th, .conflict-diff .table td { padding: 8px 10px; }
  .editor-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .editor-menu { top: var(--topbar-h); z-index: 10; display: flex; gap: 6px; overflow-x: auto; margin: 0 -12px; padding: 8px 12px; background: var(--paper); border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .editor-menu a { flex: none; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); }
  .editor-menu a[aria-current] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
  .editor-menu a small, .editor-menu-note { display: none; }
  .editor-sections { padding-bottom: 110px; }
  .editor-sections > [id] { scroll-margin-top: calc(var(--topbar-h) + 64px); }
  .sizes-tax { grid-template-columns: minmax(0, 1fr); }
}
html[data-theme=dark] .serp-title { color: #8AB4F8; }
@media (max-width: 700px) {
  .item-row { grid-template-columns: 72px minmax(0, 1fr); }
  .item-row--plain { grid-template-columns: minmax(0, 1fr); }
  .item-img { width: 72px; height: 72px; }
  .item-tools { grid-column: 1 / -1; justify-items: start; }
  .item-fields { grid-template-columns: 1fr; }
}
.big-number { font-size: 36px; font-weight: 700; letter-spacing: 0; line-height: 1; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.big-number--warn { color: var(--warn); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 700; font-size: 13.5px; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); border-bottom-color: var(--accent); }
/* On a phone the tabs stay one row that scrolls sideways; a fade at the right edge shows there are more (it scrolls away at the end). */
@media (max-width: 560px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; background: linear-gradient(to left, var(--paper) 40%, transparent) right / 40px 100% no-repeat local, linear-gradient(to left, color-mix(in srgb, var(--ink) 16%, transparent), transparent) right / 16px 100% no-repeat scroll; }
  .tabs { border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line); } /* a scroller clips what hangs below it: the line is drawn inside */
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: none; white-space: nowrap; margin-bottom: 0; }
}
.tabs .count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: var(--radius-sm); background: var(--paper-2); color: var(--ink-2); font-size: 12px; text-align: center; }
.check-row { display: flex; flex-wrap: wrap; gap: 6px 18px; }
/* Ticking rows of a list to act on several (the email list's Delete selected). */
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px; }
.table .col-check { width: 1%; padding-right: 0; }
.col-check-hit { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; cursor: pointer; }
.top-gap { margin-top: 16px; }
.card-actions { padding: 12px 16px; border-top: 1px solid var(--line); }
.button.danger, .button--ghost.danger { color: var(--danger); border-color: var(--danger); }

/* ---------------------------------------------------------------- public online store (always light; customer facing) */
.shop-page { background: var(--paper); color: var(--ink); margin: 0; }
.shop-top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.shop-bar { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
.shop-name { font-family: var(--serif); font-size: 22px; font-weight: 400; color: var(--ink); text-decoration: none; white-space: nowrap; }
.shop-search { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 14px; max-width: 520px; }
.shop-search input { border: 0; background: transparent; min-height: 40px; padding: 0; box-shadow: none; }
.shop-search input:focus { outline: none; box-shadow: none; }
.shop-cart { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; margin-left: auto; }
.shop-count { background: var(--accent); color: var(--accent-ink); border-radius: 999px; min-width: 22px; padding: 1px 7px; font-size: 12px; text-align: center; }
.shop-nav { max-width: 1180px; margin: 0 auto; padding: 0 20px 10px; display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 14px; }
.shop-nav a { color: var(--ink-2); text-decoration: none; font-weight: 700; }
.shop-nav a:hover { color: var(--accent-text); }
.shop-main { max-width: 1180px; margin: 0 auto; padding: 24px 20px 48px; }
.shop-hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 24px; }
.shop-hero h1 { font-family: var(--serif); margin: 0 0 8px; }
.shop-pickup { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 700; }
/* Store bars: a preview notice for staff, and the store's own announcement. */
.shop-preview, .shop-notice { padding: 8px 20px; text-align: center; font-size: 13.5px; }
.shop-preview { background: var(--warn-soft); color: var(--ink); border-bottom: 1px solid var(--line); }
.shop-notice { background: var(--ink); color: var(--surface); font-weight: 700; }
.shop-nav a[aria-current=page] { color: var(--accent-text); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.shop-main .section-title { margin: 8px 0 14px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 14px; padding: 0; font-size: 13.5px; color: var(--muted); }
.breadcrumbs li + li::before { content: '›'; margin-right: 8px; color: var(--muted); }
.breadcrumbs a { color: var(--ink-2); }
/* Product listings. Store settings pick the layout, columns and photo shape through classes (the store's CSP allows no inline styles). */
.product-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.product-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-grid--cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.product-grid--cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.product-link { display: flex; flex-direction: column; gap: 4px; padding: 14px; color: var(--ink); text-decoration: none; flex: 1; }
.product-link:hover .product-name { color: var(--accent-text); }
.product-media { display: block; margin-bottom: 8px; }
.product-media img, .product-media .product-noimg { display: grid; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-sm); background: var(--paper-2); }
.product-grid--portrait .product-media img, .product-grid--portrait .product-media .product-noimg { aspect-ratio: 4 / 5; }
.product-grid--landscape .product-media img, .product-grid--landscape .product-media .product-noimg { aspect-ratio: 4 / 3; }
.product-grid--contain .product-media img { object-fit: contain; background: var(--surface); }
.product-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.product-meta { font-size: 13px; }
.product-excerpt { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.product-noimg { display: grid; place-items: center; color: var(--tan-2); }
.product-noimg .icon { width: 40px; height: 40px; }
.product-noimg--lg { min-height: 320px; }
.product-buy { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }
.product-buy form { margin: 0; }
.product-add { display: flex; gap: 6px; align-items: center; }
.product-add .qty-input { width: 64px; min-height: 32px; padding: 4px 8px; }
.stock { font-size: 12.5px; font-weight: 700; }
.stock--ok { color: var(--ok); }
.stock--warn { color: var(--warn); }
.stock--muted { color: var(--muted); }
/* List layout: photo, details and price side by side, one product per row. */
.product-grid--list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.product-grid--list .product-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.product-grid--list .product-link { flex-direction: row; align-items: center; gap: 16px; }
.product-grid--list .product-media { width: 120px; flex: none; margin: 0; }
.product-grid--list .product-buy { padding: 14px; flex-direction: column; align-items: flex-end; justify-content: center; }
.shop-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin: 0 0 6px; }
.shop-toolbar .field { min-width: 170px; }
.js .shop-toolbar[data-live] .filters-apply { display: none; }
.shop-toolbar .check { min-height: 38px; }
.view-switch { display: flex; gap: 4px; margin-left: auto; }
.view-switch a { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--muted); background: var(--surface); }
.view-switch a[aria-current=true] { color: var(--ink); border-color: var(--ink); }
.view-switch .icon { width: 18px; height: 18px; }
.shop-count-line { margin: 0 0 12px; font-size: 13px; }
.pager--numbers { gap: 6px; }
.pager-current, .pager-gap { padding: 6px 10px; }
.pager-current { border-radius: var(--radius-sm); background: var(--ink); color: var(--surface); font-weight: 700; }
.pager--more { flex-direction: column; gap: 8px; }
.category-tiles { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.category-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.category-tile:hover strong { color: var(--accent-text); }
.category-tiles.product-grid--portrait .product-media img, .category-tiles.product-grid--portrait .product-noimg { aspect-ratio: 4 / 5; }
.category-tiles.product-grid--landscape .product-media img, .category-tiles.product-grid--landscape .product-noimg { aspect-ratio: 4 / 3; }
.price { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.price--lg { font-size: 26px; margin: 0; }
.product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.product-photo img { width: 100%; border-radius: var(--radius); background: var(--surface); }
.product-detail h1 { font-family: var(--serif); margin: 0; }
.buy-row { display: flex; gap: 10px; align-items: center; }
.buy-row input, .qty-input { width: 84px; }
.related { margin-top: 36px; }
.shop-call { font-weight: 700; }
.thanks-message { margin: 0 0 16px; font-size: 15px; }
.prose { line-height: 1.6; max-width: 760px; }
.shop-next { justify-content: flex-end; margin-top: 16px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.order-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 20px; flex-wrap: wrap; }
.order-steps li { padding: 8px 14px; border-radius: 999px; background: var(--paper-2); color: var(--muted); font-weight: 700; font-size: 13.5px; }
.order-steps li.done { background: var(--ok-soft); color: var(--ok); }
.shop-foot { max-width: 1180px; margin: 0 auto; padding: 24px 20px 40px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.shop-foot__grid { display: grid; grid-template-columns: 2fr repeat(3, minmax(0, 1fr)); gap: 20px 28px; margin-bottom: 12px; }
.shop-foot__grid p { margin: 0 0 8px; }
.shop-foot__title { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px; }
.shop-foot__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
@media (max-width: 1024px) {
  .product-grid--cols-5, .product-grid--cols-6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shop-foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .product-grid--cols-4, .product-grid--cols-5, .product-grid--cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .search-layout { grid-template-columns: minmax(0, 1fr); }
  .search-types ul { position: static; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
  .search-types a { min-height: 36px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); white-space: nowrap; font-size: 13px; }
}
@media (max-width: 760px) {
  .shop-bar { flex-wrap: wrap; }
  .shop-search { order: 3; max-width: none; flex-basis: 100%; }
  .product-detail { grid-template-columns: minmax(0, 1fr); }
  .product-grid, .product-grid--phone-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-grid--phone-1, .product-grid--list { grid-template-columns: minmax(0, 1fr); }
  .product-grid--list .product-card { grid-template-columns: minmax(0, 1fr); }
  .product-grid--list .product-link { padding-bottom: 6px; }
  .product-grid--list .product-media { width: 88px; }
  .product-grid--list .product-buy { flex-direction: row; align-items: center; padding-top: 0; }
  .shop-toolbar .field { min-width: 0; flex: 1 1 140px; }
  .shop-foot__grid { grid-template-columns: minmax(0, 1fr); }
  .pager-word { display: none; }
}

/* Store settings: option cards, and the layout preview on the Product listings tab. */
.choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.choice-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.choice-card input { margin-top: 2px; }
.choice-card span { display: grid; gap: 2px; }
.choice-card strong { font-size: 13.5px; }
.choice-card small { color: var(--muted); font-size: 12px; font-weight: 400; }
.choice-card:has(input:checked) { border-color: var(--accent-strong); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.check--block { align-items: flex-start; }
.check--block input { margin-top: 2px; }
.check--block span { display: grid; gap: 2px; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { font-weight: 700; font-size: 12.5px; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.settings-split { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.layout-preview { margin: 0; padding: 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--paper); position: sticky; top: calc(var(--topbar-h) + 16px); }
.layout-preview__items { display: grid; gap: 6px; }
.layout-preview figcaption { margin-top: 8px; text-align: center; }
.lp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 4px; display: grid; gap: 3px; }
.lp-card--row { grid-template-columns: 34px 1fr; align-items: center; }
.lp-photo { background: var(--paper-2); border-radius: 3px; aspect-ratio: 1 / 1; }
.lp-photo--portrait { aspect-ratio: 4 / 5; }
.lp-photo--landscape { aspect-ratio: 4 / 3; }
.lp-text { display: grid; gap: 3px; }
.lp-line { height: 4px; border-radius: 2px; background: var(--line-strong); }
.lp-line--short { width: 60%; }
.lp-line--accent { width: 40%; background: var(--accent); }
.lp-cols-2 { grid-template-columns: repeat(2, 1fr); } .lp-cols-3 { grid-template-columns: repeat(3, 1fr); } .lp-cols-4 { grid-template-columns: repeat(4, 1fr); }
.lp-cols-5 { grid-template-columns: repeat(5, 1fr); } .lp-cols-6 { grid-template-columns: repeat(6, 1fr); } .lp-cols-1 { grid-template-columns: 1fr; }
/* The always-sticky footer of a long single-purpose form: primary first, left-aligned, buttons at natural width. */
.form-actions { position: sticky; bottom: var(--app-action-bottom, 0px); z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
/* Older markup with .button-row inside the bar still renders as one row. */
.form-actions > .button-row { display: contents; }
/* "Unsaved changes" from the data-form-actions watcher (app.js): after the buttons, wrapping beneath them when the row is full. */
.form-actions-status { font-size: 12.5px; font-weight: 700; color: var(--warn); }
.form-actions-status:empty { display: none; }
@media (max-width: 720px) { :is(.form-actions, [data-form-actions]) .button { min-height: 44px; white-space: normal; text-align: center; } }
/* A very short viewport (a phone on its side, or with the keyboard up) puts the bar back in the flow so the fields keep room. */
@media (max-height: 480px) { .form-actions { position: static; } }
/* A field reached with the keyboard scrolls clear of the sticky bar (about 63px tall) instead of stopping behind it. */
html:has(.form-actions) { scroll-padding-bottom: 84px; }
form:has(.form-actions) :is(input, select, textarea, button, [contenteditable]) { scroll-margin-bottom: 84px; }
@media (max-width: 900px) { .settings-split { grid-template-columns: minmax(0, 1fr); } .layout-preview { position: static; } }

/* ---------------------------------------------------------------- printed pick ticket */
.print-page { background: #fff; color: #000; font: 14px/1.4 var(--font); padding: 24px; }
.print-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.print-table th, .print-table td { border: 1px solid #999; padding: 8px; text-align: left; }
.print-table td.box { width: 28px; }
.print-sign { margin-top: 40px; }
/* The cash discount's counter sign (Store settings > Payments): one big notice on a letter page. */
.counter-sign { min-height: 85vh; display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 24px; }
.counter-sign h1 { font-size: 56px; line-height: 1.15; margin: 0; }
.counter-sign p { font-size: 40px; line-height: 1.25; margin: 0; }
.counter-sign .counter-sign__store { font-size: 22px; color: #333; }
.counter-sign__tools { text-align: center; }
@media print { .counter-sign__tools { display: none; } }

/* Products: standard sizes, suppliers; Admin > Modules families */
.size-row { display: grid; grid-template-columns: minmax(80px, 1fr) minmax(110px, 1.2fr) minmax(120px, 1.4fr); gap: 10px; }
@media (max-width: 560px) { .size-row { grid-template-columns: 1fr 1fr; } }
.size-pieces > summary { cursor: pointer; width: fit-content; font-weight: 700; font-size: 12.5px; color: var(--accent-text); }
.size-pieces[open] > summary { margin-bottom: 10px; }
.pieces-row { display: grid; grid-template-columns: minmax(80px, 1fr) minmax(140px, 2.6fr); gap: 10px; margin-bottom: 6px; }
.hint--warn { color: var(--warn); }
.supplier-form { margin-top: 14px; }
.supplier-form > summary { cursor: pointer; color: var(--accent-text); font-weight: 700; margin-bottom: 10px; }
.module-family { margin-bottom: 22px; scroll-margin-top: calc(var(--topbar-h) + 74px); }
.module-family-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin-bottom: 10px; }
.module-family-head .section-title { margin: 0; }
.module-family-summary { margin: 0; font-size: 13.5px; }
/* Admin > Modules: one row per module (name and state, what it does, the switch), with packages and
   connections folded away; modules still on the roadmap are small tiles at the end. */
.module-tools[hidden], .module-tools__none[hidden] { display: none; }
.module-tools { position: sticky; top: var(--topbar-h); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 18px; padding: 10px 0; background: var(--paper); }
.module-tools__search { position: relative; flex: 1 1 260px; max-width: 420px; }
.module-tools__search .icon { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); }
.module-tools__search input { padding-left: 34px; min-height: 38px; }
.module-tools__none { flex-basis: 100%; margin: 0; }
.segmented { display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 3px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.segmented__item { min-height: 32px; padding: 4px 13px; border: 0; border-radius: 2px; background: transparent; font: 600 13px/1 var(--font); color: var(--ink-2); cursor: pointer; }
.segmented__item:hover { background: var(--surface-2); }
.segmented__item[aria-pressed=true] { background: var(--sidebar-bg); color: #FFFFFF; }
.segmented__count { margin-left: 3px; font-weight: 700; opacity: .7; }
.module-list { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); }
.module-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, auto); gap: 6px 24px; align-items: center; padding: 13px 18px; scroll-margin-top: calc(var(--topbar-h) + 74px); }
.module-row + .module-row { border-top: 1px solid var(--line); }
.module-row:target, .module-tile:target { box-shadow: inset 3px 0 0 var(--accent); }
.module-row header, .module-tile header { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.module-row h3, .module-tile h3 { font-size: 15px; }
.module-row__main > p { margin: 3px 0 0; color: var(--muted); font-size: 13px; max-width: 90ch; }
.module-row__action { justify-self: end; text-align: right; }
.module-row__action p { margin: 0; max-width: 260px; }
.module-row__action form { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.module-more { margin-top: 4px; font-size: 12.5px; }
.module-more > summary { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; color: var(--muted); list-style: none; }
.module-more > summary::-webkit-details-marker { display: none; }
.module-more > summary::after { content: ''; width: 6px; height: 6px; margin-left: 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.module-more[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.module-more > summary:hover { color: var(--accent-text); }
.module-more .module-facts { margin-top: 6px; padding: 8px 12px; border-radius: var(--radius); background: var(--surface-2); }
.module-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.module-tile { display: grid; gap: 5px; align-content: start; padding: 12px 14px; border: 1px dashed var(--tan-2); border-radius: var(--radius); scroll-margin-top: calc(var(--topbar-h) + 74px); }
.module-tile h3 { font-size: 14px; }
.module-tile > p { margin: 0; color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.module-tile__meta { margin: 0; font-size: 12px; color: var(--ink-2); }
[data-module-filter-hide] { display: none !important; }
@media (max-width: 760px) {
  .module-row { grid-template-columns: minmax(0, 1fr); }
  .module-row__action { justify-self: start; text-align: left; }
  .module-row__action form { align-items: flex-start; }
  .module-tools { position: static; }
}
.product-brand { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0; color: var(--muted); }

/* Admin > Modules: "Your plan" reads like the website's pricing section: a full-width band of plan cards,
   with packages the CRM doesn't include yet as deep green offer cards. */
.plan-band { margin: 4px calc(-1 * var(--content-pad)) 22px; padding: 22px var(--content-pad) 24px; background: var(--surface); border-block: 1px solid var(--line); }
.plan-band-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 20px; } /* the lead reads under its title */
.plan-band-title { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2vw, 27px); line-height: 1.22; }
.plan-band-lead { max-width: 560px; margin: 0; color: var(--muted); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; align-items: stretch; }
.plan-card { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.plan-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.plan-card-top .icon { width: 22px; height: 22px; color: var(--accent-text); }
.plan-index { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.plan-card h3 { font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.25; }
.plan-summary { color: var(--ink-2); font-size: 13.5px; margin: 0; }
.plan-state { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 2px 0 0; font-weight: 700; font-size: 13px; color: var(--ok); }
.plan-state .icon { width: 16px; height: 16px; }
.plan-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.plan-tally { margin-left: auto; font-weight: 600; color: var(--muted); }
.plan-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.plan-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 12.5px; line-height: 18px; color: var(--ink-2); text-decoration: none; }
a.plan-chip:hover { border-color: var(--tan-2); color: var(--ink); }
.plan-chip__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tan-2); flex: 0 0 auto; }
.plan-chip--on .plan-chip__dot { background: var(--ok); }
.plan-chip--off .plan-chip__dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.plan-chip--coming { border-style: dashed; color: var(--muted); }
.plan-card--offer { background: var(--sidebar-bg); border-color: var(--sidebar-bg); color: #FFFFFF; }
.plan-card--offer h3 { color: #FFFFFF; }
.plan-card--offer .plan-index, .plan-card--offer .plan-summary, .plan-card--offer .plan-state { color: #D5DFD2; }
.plan-card--offer .plan-card-top .icon { color: #C8D7A7; }
.plan-card--offer .plan-chips { border-color: color-mix(in srgb, #FFFFFF 22%, var(--sidebar-bg)); }
.plan-card--offer .plan-chip { background: color-mix(in srgb, #FFFFFF 10%, var(--sidebar-bg)); border-color: transparent; color: #E9EFE6; }
.plan-card--offer .plan-chip__dot { background: #C8D7A7; }
.plan-card--offer :focus-visible { outline-color: #FFFFFF; }
.plan-cta { justify-content: space-between; margin-top: auto; min-height: 42px; }
.plan-cta .icon { width: 16px; height: 16px; }
html[data-theme=dark] .plan-card--offer { background: color-mix(in srgb, var(--sidebar-bg) 80%, #000); }
.module-facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; font-size: 13px; }
.module-facts dt { color: var(--muted); }
.module-facts dd { margin: 0; }
.logo-preview { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #FFFFFF; }
.logo-preview img { display: block; max-height: 72px; max-width: 100%; }
/* Store settings › Default photo: the store's default product photo, as a product card shows it (square, the whole photo). */
.default-photo-preview { margin: 0; width: 240px; max-width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #FFFFFF; }
.default-photo-preview img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }

/* ---------------------------------------------------------------- store front page and look (Store settings › Front page, Look)
   Choices arrive as classes on <body> (look--…); colours and the banner's corners come from the store's theme.css. */
.shop-page {
  --shop-w: 1180px; --shop-gap: 48px; --card-r: 6px; --card-r-lg: 8px;
  /* Recomputed here so a store's own button colour (theme.css) carries into its softer shades. */
  --accent-strong: color-mix(in srgb, var(--accent) 70%, #000);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, var(--surface));
  --accent-text: color-mix(in srgb, var(--accent) 62%, #000);
  --accent-hover: color-mix(in srgb, var(--accent) 88%, #FFFFFF);
  --focus: color-mix(in srgb, var(--accent) 75%, #000);
  --link-line: color-mix(in srgb, var(--accent) 55%, transparent);
  background: var(--shop-bg, var(--paper)); overflow-x: clip;
}
.shop-page .chip, .shop-page .chip-count, .shop-page .tag, .shop-page .badge { border-radius: 999px; }
.shop-page .shop-bar, .shop-page .shop-nav, .shop-page .shop-main, .shop-page .shop-foot { max-width: var(--shop-w); }
.look--width-wide { --shop-w: 1600px; }
.look--width-full { --shop-w: 100%; }
.look--spacing-compact { --shop-gap: 28px; }
.look--spacing-airy { --shop-gap: 84px; }
.look--corners-square { --card-r: 0; --card-r-lg: 0; }
.look--corners-round { --card-r: 16px; --card-r-lg: 22px; }
.look--corners-leaf { --card-r: 4px 22px; --card-r-lg: 4px 30px; }
.look--buttons-square .button { border-radius: 3px; }
.look--buttons-rounded .button { border-radius: 8px; }
.look--buttons-pill .button { border-radius: 999px; }
.look--headings-sans h1, .look--headings-sans h2, .look--headings-sans .shop-name, .look--headings-sans .section-title,
.look--headings-sans .shop-section-title, .look--headings-sans .shop-banner__title, .look--headings-sans .shop-tabs__panel h3,
.look--headings-sans .shop-callout h3, .look--headings-sans .shop-hero h1, .look--headings-sans .product-detail h1 { font-family: var(--font); font-weight: 700; letter-spacing: -.01em; }
.shop-page .product-card, .shop-page .category-tile, .shop-page .shop-hero { border-radius: var(--card-r); }
.shop-page .product-media img, .shop-page .product-media .product-noimg { border-radius: calc(var(--card-r) * .6); }
.look--corners-leaf .product-media img, .look--corners-leaf .product-media .product-noimg { border-radius: 2px 12px; }
.shop-main > .shop-hero, .shop-main > .shop-catalog { margin-bottom: var(--shop-gap); }
.button--large { min-height: 50px; padding: 13px 22px; font-size: 14.5px; }
.button--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.button--outline:hover { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.button--glass { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .6); color: #FFFFFF; }
.button--glass:hover { background: rgba(255, 255, 255, .24); border-color: rgba(255, 255, 255, .6); color: #FFFFFF; }
.button--light { background: var(--shop-bg, var(--paper)); border-color: var(--shop-bg, var(--paper)); color: var(--ink); }
.button--light:hover { background: color-mix(in srgb, var(--shop-bg, var(--paper)) 88%, #FFFFFF); border-color: color-mix(in srgb, var(--shop-bg, var(--paper)) 88%, #FFFFFF); color: var(--ink); }
.shop-section-title { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3vw, 44px); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 14px; }
.shop-page .lead { font-size: 16px; line-height: 1.65; color: var(--ink-2); }

/* Header and footer logo */
.shop-name--logo { display: flex; align-items: center; gap: 12px; }
.shop-name--logo img { display: block; height: 52px; width: auto; max-width: 240px; object-fit: contain; }
.shop-foot__brand { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 14px !important; }
.shop-foot__brand img { display: block; height: 44px; width: auto; max-width: 210px; object-fit: contain; }
.shop-foot__brand span { font-family: var(--serif); font-size: 16px; color: var(--ink); }

/* Photo banner (one photo) or slider (several) */
.shop-banner { position: relative; overflow: hidden; isolation: isolate; color: #FFFFFF; background: var(--shop-dark, var(--sidebar-bg)); margin: 0 0 var(--shop-gap);
  border-radius: var(--hero-r-tl, 6px) var(--hero-r-tr, 6px) var(--hero-r-br, 6px) var(--hero-r-bl, 6px); min-height: 520px; display: grid; }
.shop-banner--short { min-height: 380px; }
.shop-banner--tall { min-height: 680px; }
.shop-banner--full { margin-inline: calc(50% - 50vw); }
.shop-main > .shop-banner--full:first-child { margin-top: -24px; }
.shop-banner__slides, .shop-banner__slide { display: grid; min-height: inherit; }
.shop-banner__slide { position: relative; align-items: center; }
.shop-banner__slide[hidden] { display: none; }
.shop-banner__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.shop-banner__shade { position: absolute; inset: 0; z-index: -1; --s1: .8; --s2: .55; --s3: .12; background:
  linear-gradient(90deg, rgba(15, 35, 25, var(--s1)) 0%, rgba(18, 39, 25, var(--s2)) 32%, rgba(20, 37, 24, var(--s3)) 70%, rgba(20, 35, 24, 0)),
  linear-gradient(0deg, rgba(10, 27, 16, calc(var(--s2) * .8)), transparent 30%); }
.shop-banner--shade-none .shop-banner__shade { display: none; }
.shop-banner--shade-light .shop-banner__shade { --s1: .55; --s2: .32; --s3: .05; }
.shop-banner--shade-strong .shop-banner__shade { --s1: .92; --s2: .78; --s3: .4; }
.shop-banner--align-center .shop-banner__shade { background: radial-gradient(ellipse at center, rgba(15, 35, 25, var(--s1)) 0%, rgba(15, 35, 25, var(--s2)) 45%, rgba(15, 35, 25, var(--s3)) 100%); }
.shop-banner__copy { position: relative; max-width: 680px; padding: clamp(32px, 5vw, 72px) clamp(24px, 5vw, 72px) clamp(64px, 7vw, 96px); }
.shop-banner--full .shop-banner__copy { margin-left: max(0px, calc((100vw - var(--shop-w)) / 2)); }
.shop-banner--align-center .shop-banner__copy { margin-inline: auto; text-align: center; }
.shop-banner--align-center .shop-banner__actions { justify-content: center; }
.shop-banner__title { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5.2vw, 80px); line-height: 1.08; letter-spacing: -.025em; color: #FFFFFF; margin: 0; }
.shop-banner__title em { display: block; font-style: italic; color: color-mix(in srgb, var(--accent) 60%, #FFFFFF); }
.shop-banner__text { font-size: 17px; line-height: 1.65; color: rgba(255, 255, 255, .92); margin: 20px 0 0; max-width: 540px; }
.shop-banner--align-center .shop-banner__text { margin-inline: auto; }
.shop-banner__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.shop-banner__stamp { position: absolute; z-index: 2; right: clamp(16px, 6%, 96px); bottom: clamp(104px, 17%, 150px); width: 156px; height: 156px; border-radius: 50%; padding: 18px;
  display: grid; place-content: center; justify-items: center; text-align: center; gap: 2px; background: var(--accent); color: var(--accent-ink); text-decoration: none; margin: 0;
  transform: rotate(-8deg); box-shadow: 0 16px 40px rgba(10, 27, 16, .35); transition: transform .3s; }
a.shop-banner__stamp:hover { transform: rotate(0); color: var(--accent-ink); }
.shop-banner__stamp .icon { width: 24px; height: 24px; }
.shop-banner__stamp strong { font-family: var(--serif); font-weight: 400; font-size: 19px; line-height: 1.12; }
.shop-banner__stamp span { font-size: 12px; line-height: 1.3; }
.shop-banner__caption { position: absolute; z-index: 1; left: clamp(24px, 5vw, 72px); right: clamp(24px, 5vw, 72px); bottom: 16px; margin: 0; padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .28); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .9); }
.shop-banner__controls { position: absolute; z-index: 3; right: clamp(16px, 3vw, 32px); bottom: 46px; display: flex; align-items: center; gap: 8px; }
.shop-banner__controls[hidden] { display: none; }
.shop-banner__arrow { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); background: rgba(10, 27, 16, .35); color: #FFFFFF; cursor: pointer; }
.shop-banner__arrow:hover { background: rgba(10, 27, 16, .6); }
.shop-banner__arrow .icon { width: 18px; height: 18px; }
.shop-banner__dots { display: flex; gap: 6px; padding: 0 4px; }
.shop-banner__dots button { width: 11px; height: 11px; padding: 0; border-radius: 50%; border: 1px solid #FFFFFF; background: transparent; cursor: pointer; }
.shop-banner__dots button[aria-current=true] { background: #FFFFFF; }
@media (prefers-reduced-motion: no-preference) {
  .shop-banner__slide.is-entering { animation: shop-banner-in .7s ease both; }
  @keyframes shop-banner-in { from { opacity: 0; } to { opacity: 1; } }
}

/* Highlight strip */
.shop-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 18px 0; margin: 0 0 var(--shop-gap); border-block: 1px solid var(--line); }
.shop-banner + .shop-strip { margin-top: calc(var(--shop-gap) * -.5); }
.shop-strip p { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 16px; }
.shop-strip .icon { width: 24px; height: 24px; color: var(--accent-text); }

/* Shop by category tabs */
.shop-tabs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr); gap: clamp(24px, 4vw, 56px); align-items: start; margin: 0 0 var(--shop-gap); }
.shop-tabs__finder { background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-r-lg); overflow: hidden; }
.shop-tabs__list { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); }
.shop-tabs__list[hidden] { display: none; }
.shop-tabs__list button { flex: 1 0 auto; padding: 16px 18px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--ink-2); font: 700 14px/1.2 var(--font); cursor: pointer; }
.shop-tabs__list button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--accent); background: var(--surface-2); }
.shop-tabs__panel { padding: 24px 28px 26px; }
.shop-tabs__panel + .shop-tabs__panel { border-top: 1px solid var(--line); }
.js .shop-tabs__panel + .shop-tabs__panel { border-top: 0; }
.shop-tabs__panel[hidden] { display: none; }
.shop-tabs__panel h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.25; margin: 0 0 8px; }
.shop-tabs__panel > p { color: var(--ink-2); line-height: 1.65; margin: 0 0 16px; max-width: 720px; }
.shop-tabs__panel .product-grid { margin: 0 0 18px; }

/* Photo and story */
.shop-story { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 76px); align-items: center; margin: 0 0 var(--shop-gap); }
.shop-story--photo-right .shop-story__photo { order: 2; }
.shop-story:not(:has(.shop-story__photo)) { grid-template-columns: minmax(0, 760px); }
.shop-story__photo { position: relative; margin: 0; }
.shop-story__photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--card-r-lg); }
.shop-story__photo figcaption { position: absolute; left: 16px; bottom: 16px; display: grid; gap: 2px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 13px; box-shadow: var(--shadow-pop); }
.shop-story__photo figcaption span:first-child { font-weight: 700; font-size: 14px; }
.shop-story__copy p { font-size: 16px; line-height: 1.75; color: var(--ink-2); margin: 0 0 16px; }

/* Photo band */
.shop-band { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center; min-height: 460px; margin: 0 calc(50% - 50vw) var(--shop-gap); color: #FFFFFF; background: var(--shop-dark, var(--sidebar-bg)); }
.shop-band__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.shop-band::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12, 30, 20, .82), rgba(12, 30, 20, .45) 45%, rgba(12, 30, 20, .05)); }
.shop-band--right::before { background: linear-gradient(270deg, rgba(12, 30, 20, .82), rgba(12, 30, 20, .45) 45%, rgba(12, 30, 20, .05)); }
.shop-band__copy { width: min(100% - 40px, var(--shop-w)); margin-inline: auto; padding: 64px 0; }
.shop-band__copy > * { max-width: 540px; }
.shop-band--right .shop-band__copy > * { margin-left: auto; }
.shop-band h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 52px); line-height: 1.18; letter-spacing: -.02em; color: #FFFFFF; margin: 0 0 14px; }
.shop-band p { font-size: 17px; line-height: 1.65; color: rgba(255, 255, 255, .92); margin: 0 0 20px; }

/* Callout cards */
.shop-callouts { margin: 0 0 var(--shop-gap); }
.shop-callouts__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.shop-callout { display: flex; flex-direction: column; gap: 10px; padding: 26px; border: 1px solid var(--line); border-radius: var(--card-r-lg); background: var(--surface); }
.shop-callout h3 { font-family: var(--serif); font-weight: 400; font-size: 23px; line-height: 1.25; margin: 0; color: inherit; }
.shop-callout p { margin: 0; line-height: 1.6; color: inherit; }
.shop-callout--light p { color: var(--ink-2); }
.shop-callout__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); }
.shop-callout__icon .icon { width: 22px; height: 22px; }
.shop-callout--dark { background: var(--shop-dark, var(--sidebar-bg)); border-color: transparent; color: var(--shop-dark-ink, #FFFFFF); }
.shop-callout--accent { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.shop-callout--dark .shop-callout__icon, .shop-callout--accent .shop-callout__icon { background: rgba(255, 255, 255, .16); color: inherit; }
.shop-callout__action { margin-top: auto !important; padding-top: 6px; }
.shop-callout--dark .button { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Visit us */
.shop-visit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; margin: 0 0 var(--shop-gap); }
.shop-visit__photo { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-top: 22px; border-radius: var(--card-r-lg); }
.shop-visit__card { padding: 28px; border: 1px solid var(--line); border-radius: var(--card-r-lg); background: var(--surface); }
.shop-visit__card h3 { display: flex; align-items: center; gap: 8px; margin: 18px 0 6px; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.shop-visit__card h3:first-child { margin-top: 0; }
.shop-visit__card h3 .icon { width: 16px; height: 16px; color: var(--accent-text); }
.shop-visit__card address, .shop-visit__card p { font-style: normal; font-size: 16px; line-height: 1.6; margin: 0; }
.shop-visit__contact { display: grid; gap: 8px; margin: 20px 0 !important; }
.shop-visit__contact a { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.shop-visit__contact .icon { width: 18px; height: 18px; color: var(--accent-text); }

/* Category cards */
.category-tile__text { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); margin: 2px 0 0; }
.category-tile__action { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--accent-text); }
.category-tile__action .icon { width: 15px; height: 15px; }

/* Phones: "Call" and "Find us" along the bottom */
.shop-mobile-bar { display: none; }

/* Sections ease in as they scroll into view (app.js adds .is-visible; never with reduced motion). */
@media (prefers-reduced-motion: no-preference) {
  .js .look--motion [data-reveal] { transition: opacity .7s ease, transform .7s ease; }
  .js .look--motion [data-reveal]:not(.is-visible) { opacity: 0; transform: translateY(22px); }
}

@media (max-width: 900px) {
  .shop-tabs, .shop-story, .shop-visit { grid-template-columns: minmax(0, 1fr); }
  .shop-story--photo-right .shop-story__photo { order: 0; }
  .shop-banner { min-height: 460px; }
  .shop-banner--short { min-height: 340px; }
  .shop-banner--tall { min-height: 560px; }
}
@media (max-width: 760px) {
  .shop-name--logo img { height: 40px; max-width: 180px; }
  .shop-banner__copy { padding-bottom: 110px; }
  .shop-banner__stamp { width: 96px; height: 96px; padding: 10px; right: 14px; bottom: 30px; }
  .shop-banner__stamp strong { font-size: 14px; }
  .shop-banner__stamp span, .shop-banner__stamp .icon { display: none; }
  .shop-banner__controls { left: 20px; right: auto; bottom: 44px; }
  .shop-banner__shade { background: linear-gradient(0deg, rgba(10, 27, 16, var(--s1)) 0%, rgba(10, 27, 16, var(--s2)) 55%, rgba(10, 27, 16, var(--s3))); }
  .shop-tabs__panel { padding: 20px 18px 22px; }
  .category-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .shop-band { min-height: 380px; }
  .shop-band::before, .shop-band--right::before { background: rgba(12, 30, 20, .62); }
  .has-mobile-bar { padding-bottom: 56px; }
  .shop-mobile-bar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; background: var(--line); }
  .shop-mobile-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; font-weight: 700; text-decoration: none; background: var(--shop-dark, var(--sidebar-bg)); color: var(--shop-dark-ink, #FFFFFF); }
  .shop-mobile-bar a:first-child { background: var(--accent); color: var(--accent-ink); }
  .shop-mobile-bar .icon { width: 18px; height: 18px; }
}

/* Store settings › Front page and Look */
.subhead { font-size: 14px; margin: 22px 0 10px; }
.section-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.section-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.section-row .check span { display: grid; gap: 2px; }
.section-position { min-height: 34px; padding: 4px 8px; }
.slide-editor { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 14px; margin: 0 0 8px; background: var(--surface); }
.slide-editor[open] { padding-bottom: 14px; }
.slide-editor summary { cursor: pointer; padding: 12px 0; font-weight: 700; }
.image-field__now { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 4px 0 8px; }
.image-field__now img { width: 180px; height: 100px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.field-label { font-weight: 700; font-size: 13px; }
.radius-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 140px)); gap: 8px 16px; }
.radius-preview { margin: 0; padding: 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--paper); }
.radius-preview__box { height: 120px; background: linear-gradient(135deg, var(--sidebar-bg), color-mix(in srgb, var(--sidebar-bg) 55%, var(--accent))); }
.color-field__row { display: flex; gap: 8px; align-items: center; }
.color-field__row input[type=color] { width: 46px; min-width: 46px; height: 38px; padding: 2px; }

/* ---------------------------------------------------------------- blog (the Blog module)
   Staff: earlier versions. The post editor's own styles are in the module (app/modules/blog/assets/editor.css).
   Public: /blog/<workspace> uses the store's header and footer, with post cards, a sidebar and
   readable post pages (about 70 characters a line). */
.revision-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.revision-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.revision-list details { margin-top: 10px; }
.revision-list summary { cursor: pointer; color: var(--accent-text); font-weight: 700; font-size: 13px; }

.blog-links { display: flex; gap: 16px; margin-left: auto; }
.blog-links a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.blog-links a:hover { color: var(--accent-text); }
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px 44px; align-items: start; margin-bottom: var(--shop-gap, 40px); }
.blog-layout--side-left { grid-template-columns: 280px minmax(0, 1fr); }
.blog-layout--side-left > .blog-aside { order: -1; }
.blog-layout--side-none { grid-template-columns: minmax(0, 1fr); }
.blog-head { margin-bottom: 22px; }
.blog-head h1, .post-title { font-family: var(--serif); font-weight: 400; margin: 0 0 8px; }
.blog-aside { display: grid; gap: 24px; font-size: 14px; position: sticky; top: 120px; }
.blog-aside__title { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px; }
.blog-aside__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.blog-aside__list a { color: var(--ink); font-weight: 700; text-decoration: none; }
.blog-aside__list a:hover { color: var(--accent-text); text-decoration: underline; }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.post-list { display: grid; gap: 20px; }
.post-list--cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.post-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-r, var(--radius)); overflow: hidden; }
.post-card__media { display: block; }
.post-card__media img, .post-card__media .product-noimg { display: grid; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--paper-2); }
.post-card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.post-card__title { font-family: var(--serif); font-weight: 400; font-size: 19px; line-height: 1.3; margin: 0; }
.post-card__title a { color: var(--ink); text-decoration: none; }
.post-card__title a:hover { color: var(--accent-text); text-decoration: underline; }
.post-card__excerpt { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.post-card__more { margin-top: auto; padding-top: 4px; font-weight: 700; font-size: 13.5px; color: var(--accent-text); }
.post-card--list { display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.post-card--list .post-card__media img, .post-card--list .post-card__media .product-noimg { height: 100%; aspect-ratio: auto; min-height: 160px; }
.post-eyebrow { margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.post-eyebrow a { color: var(--accent-text); text-decoration: none; }
.post-meta { margin: 0; color: var(--muted); font-size: 13px; }
.post-meta a { color: var(--ink-2); font-weight: 700; }
.post { max-width: 760px; }
.post--narrow { max-width: 660px; }
.post--wide { max-width: 940px; }
.blog-layout--post.blog-layout--side-none .post { margin: 0 auto; width: 100%; }
.post-header { margin-bottom: 18px; }
.post-header .post-title { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; }
.post-hero { margin: 0 0 22px; }
.post-hero img { display: block; width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--card-r-lg, var(--radius)); background: var(--paper-2); }
.post-body { font-size: 17px; line-height: 1.7; max-width: none; }
.post-body > * + * { margin-top: 1em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--serif); font-weight: 400; line-height: 1.3; margin: 1.6em 0 .5em; }
.prose h2 { font-size: 1.45em; } .prose h3 { font-size: 1.2em; } .prose h4 { font-size: 1.05em; }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.4em; }
.prose li + li { margin-top: .3em; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--ink-2); font-style: italic; }
.prose figure { margin: 1.4em 0; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.prose figcaption { margin-top: 6px; color: var(--muted); font-size: .85em; text-align: center; }
.prose hr { border: 0; border-top: 1px solid var(--line-strong); margin: 2em 0; }
.prose code { padding: 1px 5px; border-radius: 3px; background: var(--paper-2); font-size: .9em; }
.prose a { color: var(--accent-text); }
.post .tag-list { margin: 26px 0 0; }
.post-footer { margin-top: 26px; padding: 16px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); max-width: none; }
.post-footer > :last-child { margin-bottom: 0; }
.post-share { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 22px 0 0; font-size: 14px; }
.post-share span { color: var(--muted); }
.post-share a { font-weight: 700; color: var(--ink); }
.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.post-nav a { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); }
.post-nav a:hover { border-color: var(--tan-2); }
.post-nav small { color: var(--muted); font-size: 12px; font-weight: 700; }
.post-nav span { font-family: var(--serif); }
.post-nav__newer { grid-column: 2; text-align: right; }
.post-related { max-width: 1180px; margin: 20px auto 0; width: 100%; }
.blog-full { display: grid; gap: 40px; }
.post--in-list + .post--in-list { padding-top: 36px; border-top: 1px solid var(--line); }
.post--in-list .post-title { font-size: 28px; }
.post--in-list .post-title a { color: var(--ink); text-decoration: none; }
@media (max-width: 900px) {
  .blog-layout { grid-template-columns: minmax(0, 1fr); }
  .blog-aside { position: static; }
  .post-card--list { grid-template-columns: 140px minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .post-card--list { grid-template-columns: minmax(0, 1fr); }
  .post-card--list .post-card__media img, .post-card--list .post-card__media .product-noimg { aspect-ratio: 16 / 10; min-height: 0; }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav__newer { grid-column: auto; text-align: left; }
  .post-body { font-size: 16px; }
  .blog-links { margin-left: 0; }
}

/* Email list: public sign-up, confirmation and unsubscribe pages carry the business's name */
.email-business { font-family: var(--serif); font-size: 22px; font-weight: 400; color: var(--ink); text-align: center; }

/* Blog settings › Post lists, Sidebar and Post page: card columns, photo shapes, card styles, the featured
   post, page numbers, sidebar boxes, the post's photo banner, a big first letter and the end-of-post band. */
.post-list--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-list--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-list--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.post-list--cards { gap: clamp(16px, 2vw, 26px); }
.post-list--ratio-landscape .post-card__media img, .post-list--ratio-landscape .post-card__media .product-noimg { aspect-ratio: 3 / 2; }
.post-list--ratio-wide .post-card__media img, .post-list--ratio-wide .post-card__media .product-noimg { aspect-ratio: 16 / 9; }
.post-list--ratio-square .post-card__media img, .post-list--ratio-square .post-card__media .product-noimg { aspect-ratio: 1; }
.post-list--ratio-portrait .post-card__media img, .post-list--ratio-portrait .post-card__media .product-noimg { aspect-ratio: 4 / 5; }
.post-list--style-plain .post-card { background: transparent; border: 0; overflow: visible; }
.post-list--style-plain .post-card__media img, .post-list--style-plain .post-card__media .product-noimg { border-radius: var(--card-r, var(--radius)); }
.post-list--style-plain .post-card__body { padding: 12px 2px 0; }
.post-list--cards.post-list--style-overlay .post-card { border: 0; color: #FFFFFF; background: var(--shop-dark, var(--sidebar-bg)); }
.post-list--cards.post-list--style-overlay .post-card__media img, .post-list--cards.post-list--style-overlay .post-card__media .product-noimg { height: 100%; }
.post-list--cards.post-list--style-overlay .post-card__body { position: absolute; inset: auto 0 0; padding: 60px 18px 18px; background: linear-gradient(0deg, rgba(10, 24, 16, .88), rgba(10, 24, 16, .55) 60%, transparent); }
.post-list--cards.post-list--style-overlay .post-card__title a, .post-list--cards.post-list--style-overlay .post-eyebrow a, .post-list--cards.post-list--style-overlay .post-card__more { color: #FFFFFF; }
.post-list--cards.post-list--style-overlay .post-meta, .post-list--cards.post-list--style-overlay .post-card__excerpt { color: rgba(255, 255, 255, .86); }
.post-list--cards.post-list--style-overlay .post-card__excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-list--cards.post-list--style-overlay .post-card__tags { display: none; }
.post-card__title a::after { content: ''; position: absolute; inset: 0; z-index: 0; }
.post-card__body a:not(.post-card__title a), .post-card__body .chip { position: relative; z-index: 1; }
.post-card__more { pointer-events: none; }
.post-card__tags { margin-top: 2px; }
.post-card__tags .chip { min-height: 26px; padding: 2px 10px; font-size: 12px; }
.post-card--featured { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); margin-bottom: clamp(18px, 2.4vw, 30px); }
.post-card--featured .post-card__media img, .post-card--featured .post-card__media .product-noimg { height: 100%; min-height: 300px; aspect-ratio: auto; }
.post-card--featured .post-card__body { justify-content: center; gap: 10px; padding: clamp(20px, 3vw, 40px); }
.post-card--featured .post-card__title { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.2; }
.post-card--featured .post-card__excerpt { font-size: 15.5px; }
.post-card--featured .post-card__more { margin-top: 6px; }
.pager__numbers { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pager__numbers .pager__page { min-width: 36px; text-align: center; }
.pager__numbers span.pager__page { padding: 6px 10px; border-radius: var(--radius-sm); background: var(--ink); color: var(--surface); font-weight: 700; }
.blog-about { overflow: hidden; border: 1px solid var(--line); border-radius: var(--card-r, var(--radius)); background: var(--surface); }
.blog-about__photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.blog-about__body { display: grid; gap: 8px; justify-items: start; padding: 16px 18px 18px; }
.blog-about__body p { margin: 0; color: var(--ink-2); }
.blog-about__title { font-family: var(--serif); font-weight: 400; font-size: 20px; margin: 0; }
.blog-signup { padding: 16px 18px; border-radius: var(--card-r, var(--radius)); background: var(--accent-soft); }
.blog-signup p { margin: 0 0 10px; }
.blog-signup__form { display: grid; gap: 8px; margin-bottom: 8px; }
.blog-recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.blog-recent a { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; text-decoration: none; color: var(--ink); font-weight: 700; line-height: 1.35; }
.blog-recent a:hover span { color: var(--accent-text); text-decoration: underline; }
.blog-recent img, .blog-recent__noimg { width: 64px; height: 64px; object-fit: cover; border-radius: calc(var(--card-r, 6px) * .8); background: var(--paper-2); display: grid; place-items: center; color: var(--muted); }
.blog-recent small { display: block; margin-top: 2px; font-weight: 400; color: var(--muted); }
.blog-banner .shop-banner__copy { max-width: 760px; }
.post-banner { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: end; min-height: clamp(340px, 46vw, 560px); margin: 0 0 var(--shop-gap, 40px);
  border-radius: var(--hero-r-tl, 6px) var(--hero-r-tr, 6px) var(--hero-r-br, 6px) var(--hero-r-bl, 6px); background: var(--shop-dark, var(--sidebar-bg)); color: #FFFFFF; }
.post-banner__photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.post-banner::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(10, 26, 17, .86) 0%, rgba(10, 26, 17, .5) 45%, rgba(10, 26, 17, .05) 80%); }
.post-banner__copy { width: min(100% - 40px, 760px); margin: 0 auto; padding: 48px 0 40px; }
.post-banner--narrow .post-banner__copy { width: min(100% - 40px, 660px); }
.post-banner--wide .post-banner__copy { width: min(100% - 40px, 940px); }
.post-banner .post-title { color: #FFFFFF; font-size: clamp(30px, 4.2vw, 52px); line-height: 1.12; margin-bottom: 12px; }
.post-banner .post-eyebrow a, .post-banner .post-meta a { color: #FFFFFF; }
.post-banner .post-meta { color: rgba(255, 255, 255, .85); }
.post-body--drop-cap > p:first-child::first-letter { float: left; margin: 6px 12px 0 0; font-family: var(--serif); font-size: 3.6em; line-height: .82; color: var(--accent-text); }
.post-cta { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center; min-height: 220px; margin-top: 30px; border-radius: var(--card-r-lg, var(--radius));
  background: var(--shop-dark, var(--sidebar-bg)); color: var(--shop-dark-ink, #FFFFFF); }
.post-cta--photo { min-height: 300px; color: #FFFFFF; }
.post-cta__photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.post-cta--photo::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12, 30, 20, .86), rgba(12, 30, 20, .55) 55%, rgba(12, 30, 20, .2)); }
.post-cta__copy { display: grid; gap: 10px; justify-items: start; max-width: 520px; padding: clamp(24px, 4vw, 44px); }
.post-cta__copy p { margin: 0; opacity: .92; }
.post-cta__title { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.2; margin: 0; color: inherit; }
.look--headings-sans .post-card__title, .look--headings-sans .post-cta__title, .look--headings-sans .blog-about__title, .look--headings-sans .post-nav span { font-family: var(--font); font-weight: 700; letter-spacing: -.01em; }
@media (max-width: 1100px) {
  .post-list--cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .blog-layout:not(.blog-layout--side-none) .post-list--cols-3, .blog-layout:not(.blog-layout--side-none) .post-list--cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .blog-layout--side-left { grid-template-columns: minmax(0, 1fr); }
  .blog-layout--side-left > .blog-aside { order: 0; }
  .post-list--cols-3, .post-list--cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-card--featured { grid-template-columns: minmax(0, 1fr); }
  .post-card--featured .post-card__media img, .post-card--featured .post-card__media .product-noimg { min-height: 0; aspect-ratio: 16 / 10; }
}
@media (max-width: 560px) {
  .post-list--cards, .post-list--cols-2, .post-list--cols-3, .post-list--cols-4, .blog-layout:not(.blog-layout--side-none) .post-list--cols-3, .blog-layout:not(.blog-layout--side-none) .post-list--cols-4 { grid-template-columns: minmax(0, 1fr); }
  .post-cta--photo::after { background: rgba(12, 30, 20, .7); }
}

/* Subscriptions & billing (modules/billing) and Clients & licenses (modules/licensing) */
.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tfoot th, .table tfoot td { padding: 8px 14px; border-top: 1px solid var(--line); font-weight: 600; }
.input--narrow { max-width: 120px; }
.line-editor td { vertical-align: top; }
.line-editor select, .line-editor input { width: 100%; }
.pay-page .legal-top { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.pay-business { font-size: 18px; }
.pay-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.pay-head h1 { margin: 2px 0 4px; }
.pay-amount { display: grid; justify-items: end; gap: 6px; }
.pay-amount strong { font-size: 32px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.legal table.pay-lines td, .legal table.pay-lines th { border-width: 0 0 1px; }
.pay-options { margin: 26px 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pay-options h2 { margin-top: 0; }
.pay-bank { margin-top: 16px; }
.pay-bank h3 { font-size: 15px; margin: 0 0 6px; }
.pay-foot { margin-top: 30px; font-size: 13px; }
.pay-logo { display: block; max-height: 44px; max-width: 220px; height: auto; }
.pay-card-fields { margin-bottom: 16px; min-height: 120px; }
.pay-card .alert[hidden] { display: none; }
.pay-payments { list-style: none; padding: 0; margin: 0 0 18px; }
.pay-payments li { padding: 6px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.key-reveal { font: 600 15px/1.4 var(--font-mono, ui-monospace, monospace); letter-spacing: .04em; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); user-select: all; overflow-wrap: anywhere; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }
@media (max-width: 560px) { .pay-amount { justify-items: start; } }
.card--accent { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }

/* The chart set (app/modules/roadside/src/Chart.php): columns a day, a line, a ranking, a sparkline, one stacked bar.
   Server-side SVG and plain markup; widths come from data-w (app.js), colours from the tokens above. Drawn on Website
   home, Online orders, Products and a product's screen. */
.rs-chart { display: block; width: 100%; height: auto; max-height: 190px; font-family: var(--font); }
.rs-chart-bar { fill: var(--ink); }
.rs-chart-bar.is-today { fill: var(--accent); }
.rs-chart-bar:hover { fill: color-mix(in srgb, var(--ink) 70%, var(--accent)); }
.rs-chart-axis { stroke: var(--line-strong); stroke-width: 1; }
.rs-chart-tick, .rs-chart-max { font-size: 10px; fill: var(--muted); }
html[data-theme=dark] .rs-chart-bar { fill: var(--sidebar-muted); }
/* The chart set (Chart.php): columns, line, ranking, sparkline, stacked bar. Colours from the admin's tokens. */
.rs-chart-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.rs-chart-note { font-size: 10.5px; font-weight: 700; fill: var(--accent-text); }
.rs-chart-avg { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rs-chart--line { max-height: 200px; }
.rs-chart-line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rs-chart-area { fill: var(--ink); opacity: .08; }
.rs-chart-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.rs-chart-dot.is-last { fill: var(--accent); stroke: var(--accent); }
.rs-chart-ghost { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 3 4; }
html[data-theme=dark] .rs-chart-line, html[data-theme=dark] .rs-chart-dot { stroke: var(--sidebar-muted); }
html[data-theme=dark] .rs-chart-area { fill: var(--sidebar-muted); opacity: .14; }
html[data-theme=dark] .rs-chart-dot.is-last { fill: var(--accent); stroke: var(--accent); }
/* A ranking: name, bar, number; the first row in accent. Widths come from data-w (app.js). */
.rs-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rs-rank li { display: grid; grid-template-columns: minmax(0, 1fr) 90px 44px; gap: 10px; align-items: center; font-size: 13.5px; }
.rs-rank-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rs-rank-name a { color: inherit; text-decoration: none; }
.rs-rank-name a:hover { text-decoration: underline; }
.rs-rank-track { display: block; height: 8px; border-radius: 4px; background: var(--paper-2); overflow: hidden; }
.rs-rank-fill { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--ink); }
.rs-rank li:first-child .rs-rank-fill { background: var(--accent); }
html[data-theme=dark] .rs-rank-fill { background: var(--sidebar-muted); }
html[data-theme=dark] .rs-rank li:first-child .rs-rank-fill { background: var(--accent); }
.rs-rank-n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
/* A sparkline beside a stat card's number. */
.stat:has(.rs-spark) { grid-template-columns: minmax(0, 1fr); }
.stat-value:has(.rs-spark) { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 2px 12px; min-width: 0; }
/* What the sparkline counts: its own line under the number and sparkline, in the hint's weight. */
.stat-value:has(.rs-spark) > .stat-hint { order: 3; flex-basis: 100%; font-weight: 400; line-height: 1.3; }
.rs-spark { display: block; width: 84px; min-width: 0; max-width: 45%; height: 32px; flex: 0 1 auto; }
.rs-spark .rs-chart-line { stroke-width: 1.75; }
/* One stacked bar with its key. Widths come from data-w (app.js). */
.rs-stack { display: grid; gap: 9px; }
.rs-stack-bar { display: flex; height: 12px; border-radius: 4px; overflow: hidden; gap: 2px; }
.rs-stack-bar > span { display: block; height: 100%; }
.rs-stack-key { display: flex; flex-wrap: wrap; gap: 5px 16px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; }
.rs-stack-key li { display: flex; align-items: center; gap: 7px; }
.rs-stack-key i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
.rs-stack-key b { font-variant-numeric: tabular-nums; }
.rs-stack .t-ink { background: var(--ink); } html[data-theme=dark] .rs-stack .t-ink { background: var(--sidebar-muted); }
.rs-stack .t-accent { background: var(--accent); } .rs-stack .t-ok { background: var(--ok); } .rs-stack .t-warn { background: var(--warn); } .rs-stack .t-danger { background: var(--danger); } .rs-stack .t-line { background: var(--line-strong); }
/* Charts above a list: two cards side by side, one column on narrow screens. */
.chart-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: stretch; margin-bottom: 20px; }
.chart-row--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chart-row:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.chart-row .card-head { align-items: flex-start; margin-bottom: 2px; }
.chart-row .card-title { margin: 0; }
.chart-sum { margin: 0; font-size: 13px; white-space: nowrap; }
.chart-sum strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.chart-note { margin: 0 0 12px; font-size: 13px; }
.chart-more { margin: 12px 0 0; font-size: 13px; }
.chart-line { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 0 8px; font-size: 13px; }
.chart-line .rs-spark { max-width: 50%; }
@media (max-width: 900px) { .chart-row, .chart-row--even { grid-template-columns: minmax(0, 1fr); } }
/* Shipping: the product editor's per-size rows, the Products list's bulk bar and Store settings > Shipping's boxes (online store). */
.inline-fields { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.inline-fields input { width: 5.5em; }
.ship-table td, .ship-table th { vertical-align: middle; }
.box-table input { min-width: 4.5em; }
.dept-box-table .indent { display: inline-block; width: 1.5em; }
/* 12px under it for the list it acts on, often inside that list's form; at the top level the page rhythm takes over. */
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.bulk-bar .muted { margin-right: 4px; }
.col-pick { width: 36px; }

/* Farm records may contain long property names or delivery references. */
.farm-profile { min-width: 0; overflow-wrap: anywhere; }

/* Compact follow-up counts remain readable inside dashboard tiles: the kinds of follow-up down the side (they may wrap between
   words, never inside one), Me and Everyone across the top on one line, the counts right-aligned under them. */
.records-due-summary { display: grid; gap: 12px; }
.records-due-summary > p { margin: 0; }
.records-due-summary .table th, .records-due-summary .table td { padding: 8px 6px; vertical-align: middle; }
.records-due-summary .table thead th { position: static; text-align: right; white-space: nowrap; }
.records-due-summary .table thead td { padding: 0; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.records-due-summary .table tbody th { position: static; background: none; text-align: left; font-weight: 700; font-size: 13px; color: var(--ink-2); white-space: normal; border-bottom: 1px solid var(--line); }
.records-due-summary .table tbody tr:last-child th { border-bottom: 0; }
.records-due-summary .table td { width: 1%; text-align: right; }
.records-due-summary .table td a { display: block; padding: 2px 0; font-size: 22px; font-weight: 700; line-height: 1.2; text-decoration: underline; font-variant-numeric: tabular-nums; }

/* Special orders (F3): the To call list's button, the phone order form's item lines and chosen customer, the order page's
   Special order card. Classes start with so-. */
.so-call { min-height: 44px; white-space: nowrap; }
.so-items__head { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; margin: 0 0 4px; font-size: 12.5px; color: var(--muted); }
.so-items__row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; align-items: start; }
.so-items__row .field { margin: 0; }
.so-items__found { grid-column: 1 / -1; margin-top: -4px; overflow-wrap: anywhere; }
.so-chosen { margin: 0; overflow-wrap: anywhere; }
.so-chosen .small { margin-left: 6px; }
.so-search input { min-width: 0; flex: 1 1 auto; }
.so-matches li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.so-matches li > span { min-width: 0; overflow-wrap: anywhere; }
.so-matches .button { flex: none; min-height: 40px; }
.so-done .list-plain li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.so-order-lines li { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 16px; }
.so-order-lines li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.so-order-lines__state { text-align: right; flex: none; }
.so-blocked { margin: 10px 0 0; }
@media (max-width: 560px) {
  .so-items__head { display: none; }
  .so-items__row { grid-template-columns: minmax(0, 1fr) 90px; }
  .so-order-lines__state { text-align: left; flex: 1 1 100%; }
}

/* Price changes set ahead by date (pricing/changes*.php, F1; the product page's notes). The numbered steps sit in cards; a fieldset
   with no box holds the radio cards; a field's refusal reads in red under it; the ticked size is the row's label on a phone. */
.price-changes .step, .price-changes legend.step { margin: 0 0 12px; padding: 0; }
.fieldset-plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.field-error { color: var(--danger); font-size: 12.5px; font-weight: 700; margin: 0; }
.field [aria-invalid=true] { border-color: var(--danger); }
.pick-block[hidden], [data-rounding][hidden], [data-tick-all][hidden] { display: none; }
.keep-size { gap: 10px; }
.keep-size span { display: grid; gap: 1px; }
.keep-size small { color: var(--muted); font-size: 12px; }
.d-block { display: block; }
.stat-value--pair { font-size: 22px; }
.price-coming { display: grid; gap: 6px; margin-bottom: 16px; }
.price-coming a { font-weight: 700; }
.price-coming--size { margin: 2px 0 0; }
@media (pointer: coarse) { .price-changes .button, .price-changes .check input[type=checkbox] + span { min-height: 44px; } .price-changes .button--small { min-height: 44px; } }
@media (max-width: 560px) {
  /* On a phone the stacked rows read left to right: no right-aligned figures, and a note cell with nothing in it is left out. */
  .price-changes .table--stack td.num { text-align: left; }
  .price-changes .table--stack td.is-empty { display: none; }
}

/* Storehouse, a vendor's price file (F4, supplier catalogs): the groups of rows that aren't the vendor's items yet, and the plan for new items. */
.pf-new { margin-top: 28px; }
.pf-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.pf-actions .field { gap: 4px; }
.pf-actions .button { white-space: normal; text-align: center; }
/* The add buttons stay in reach under a long list of rows, as .form-actions does. */
.pf-new .pf-actions { position: sticky; bottom: var(--app-action-bottom, 0px); z-index: 2; padding: 12px 0; background: var(--paper); border-top: 1px solid var(--line); }
.pf-batch { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 28px; align-items: start; }
.pf-batch fieldset.field { display: grid; gap: 8px; }
.pf-batch .label { font-weight: 700; font-size: 12.5px; color: var(--ink-2); }
.pf-percent { display: grid; gap: 4px; padding-left: 25px; }
.pf-percent label { font-weight: 700; font-size: 12.5px; color: var(--ink-2); }
.pf-sell { margin: 0 0 8px; font-size: 13.5px; }
.pf-batch-actions { margin-top: 16px; }
.pf-rows th, .pf-rows td { padding: 10px 10px; }
.pf-rows input, .pf-rows select { min-height: 34px; padding: 6px 9px; font-size: 13.5px; }
.pf-name { min-width: 200px; }
.pf-size { min-width: 110px; }
.pf-brand { min-width: 130px; }
.pf-price { width: 100px; min-width: 92px; text-align: right; font-variant-numeric: tabular-nums; }
.pf-price-cell { white-space: nowrap; }
.pf-rows td { white-space: normal; }
.pf-rows .pf-upc { white-space: nowrap; }
.pf-pick .pf-tick-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pf-rows .pf-source, .pf-rows .pf-note, .pf-rows .pf-cost, .pf-rows .pf-margin, .pf-problem { display: block; margin-top: 4px; }
.pf-rows .pf-margin { font-weight: 700; }
.pf-notes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pf-problem { color: var(--danger); font-size: 12.5px; }
.pf-row--skip td { background: color-mix(in srgb, var(--danger) 4%, var(--surface)); }
.pf-margin--below { color: var(--danger); }
.pf-problem-list { margin: 6px 0 0; padding-left: 18px; }
.pf-problem-list a { color: inherit; }
@media (max-width: 560px) {
  .pf-pick td.col-check { width: auto; padding: 0 0 6px; }
  .pf-pick .col-check-hit { gap: 8px; min-height: 0; font-weight: 700; }
  .pf-pick .pf-tick-label { position: static; width: auto; height: auto; clip: auto; }
  .pf-pick td[data-label="Row"] { display: none; }
  .pf-rows td[data-label="Row"], .pf-results td[data-label="Row"] { text-align: left; }
  .pf-rows td[data-label="Row"]::before, .pf-results td[data-label="Row"]::before { content: 'Row '; color: var(--muted); font-size: 12px; }
  .pf-rows .pf-name, .pf-rows .pf-size, .pf-rows .pf-brand, .pf-rows .pf-price { flex: 1 1 160px; width: auto; min-width: 0; text-align: left; }
  .pf-rows td[data-label].num { text-align: left; white-space: normal; }
}

/* ---------------------------------------------------------------- the page's vertical rhythm (spacing contract, 2026-11-08)
   Every block at the top level of the page stands 20px under the block before it, whatever it is: a card, a row of buttons or
   filters, tabs, a paragraph, a form, an alert, a pager. "The top level" is main.content, a plain column of a two-column layout,
   a plain <div> or <form> that wraps a page's blocks, or a .page-flow wrapper. Modules rely on this instead of adding margins
   page by page; it sits at the end of this file so it wins over the components above, while a module's stylesheet (loaded
   later) can still give its own block a different top margin.
   - Specificity is one class (:nth-child(n) matches every element), so it also beats bare p and h1 margins.
   - "The block before" is the nearest one that shows: a hidden or toasted flash message, a closed dialog or a script doesn't count.
   - Exceptions: the back link and the page head keep their own spacing (.back is 16px above the title); consecutive filter rows
     stand 8px apart so they read as one group; a heading stands 8px above what it introduces (a section title keeps its 12px);
     paragraphs in a row keep paragraph spacing.
   - Top-level blocks add no bottom margins: the next block's top margin is the gap. .filters, .chips, .tabs and .pager have
     none, so the block after one of them (or after a .button-row or .bulk-bar) always gets its 20px, even when it sets
     margin: 0 itself. Bottom margins up to 20px that remain (.alert, .page-head, .bulk-bar) collapse into the gap. */
:where(.content, .page-flow, .content > :is(div, form):not([class]), :is(.detail-grid, .two-col) > div:not([class])) > :where(:not(script, style, template, dialog, input, [hidden], .sr-only, .is-toasted)) ~ :nth-child(n) { margin-top: 20px; }
:where(.content, .page-flow, .content > :is(div, form):not([class]), :is(.detail-grid, .two-col) > div:not([class])) > :is(.filters, .chips, .tabs, .pager, .bulk-bar, .button-row) + :nth-child(n) { margin-top: 20px; }
:where(.content, .page-flow, .content > :is(div, form):not([class]), :is(.detail-grid, .two-col) > div:not([class])) > .back + .page-head { margin-top: 0; }
:where(.content, .page-flow, .content > :is(div, form):not([class]), :is(.detail-grid, .two-col) > div:not([class])) > :is(.button-row, .filters, .chips, .bulk-bar, nav:has(> .chips:only-child)) + :is(.button-row, .filters, .chips, .bulk-bar, nav:has(> .chips:only-child)) { margin-top: 8px; }
:where(.content, .page-flow, .content > :is(div, form):not([class]), :is(.detail-grid, .two-col) > div:not([class])) > :is(h1, h2, h3, .section-title) + :nth-child(n) { margin-top: 8px; }
:where(.content, .page-flow, .content > :is(div, form):not([class]), :is(.detail-grid, .two-col) > div:not([class])) > p + p:nth-child(n) { margin-top: 0; }
/* In a gap-spaced column (.stack, a filter row) an alert's or a section head's own bottom margin would add to the gap. */
:is(.stack, .stack-lg, .button-row, .filters, .form-layout) > .alert, :is(.stack, .stack-lg) > .page-head { margin: 0; }
/* Forms: a field, a tick box, a hint and the button stand 14px apart (the .stack rhythm) in a form or card that isn't a .stack. */
:where(form:not([class]), .card:not(.stack, .stack-lg, .card--flush)) > :where(.field, .check, .fieldset, fieldset, .grid-2, .check-grid, .copy-row, .hint, p) + :is(.field, .check, .fieldset, fieldset, .grid-2, .check-grid, .copy-row, .button, .button-row, .hint, .alert) { margin-top: 14px; }
/* A command to copy and the hint that explains it belong together, like a field and its hint. */
.copy-field + .hint { margin-top: 8px; }
/* Inside a card, text and buttons under a table, a list or a form stand 12px clear of it. */
.card:not(.stack, .stack-lg, .card--flush) > :is(.table-wrap, .table, .stack, .list-plain, .product-overview, form) + :is(p, .hint, .note-block, .button-row, form) { margin-top: 12px; }
/* A paragraph in a gap-spaced column (.stack, .stack-lg, a grid fieldset) adds no bottom margin to the gap; nor does one that a
   field, hint or button follows in a plain form or card, where the next item already carries the 14px (:is, not :where, so a
   module's own "p { margin-bottom }" in a card, such as .rs-side p, doesn't put the 10px back). */
:is(.stack, .stack-lg, .form-layout, .fieldset, .rs-fieldset) > p { margin-bottom: 0; }
:is(form:not([class]), .card:not(.stack, .stack-lg, .card--flush)) > p:has(+ :is(.field, .check, .fieldset, fieldset, .grid-2, .check-grid, .copy-row, .button, .button-row, .hint, .alert)) { margin-bottom: 0; }

/* One left edge in a flush card: the table's outer cells use the card's 20px inset, like the card's title and the cards beside it. */
.card--flush .table :is(th, td):first-child { padding-left: 20px; }
.card--flush .table :is(th, td):last-child { padding-right: 20px; }
@media (max-width: 560px) {
  .card--flush .table--stack tr { padding-inline: 20px; }
  .card--flush .table--stack :is(th, td):is(:first-child, :last-child) { padding-inline: 0; }
  /* A flush table wider than the phone scrolls: the same edge cue as .tabs, and status pills wrap rather than run off the edge. */
  .card--flush { background: linear-gradient(to left, var(--surface) 40%, transparent) right / 40px 100% no-repeat local, linear-gradient(to left, color-mix(in srgb, var(--ink) 16%, transparent), transparent) right / 16px 100% no-repeat scroll, var(--surface); }
  .card--flush .table td .badge { white-space: normal; }
}

/* RX-03: signed-in Roadside sizes only. Public blog, pay, billing and legal layouts keep the base rules above.
   :where keeps each original selector's specificity, so deliberate small-control overrides still win. */
@media screen {
  body.app-page { font: 16px/1.5 var(--font); }
  :where(body.app-page) code { font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
  :where(body.app-page) small { font-size: 13px; }
  :where(body.app-page) .small { font-size: 13px; }
  :where(body.app-page) .eyebrow { font-size: 13px; }
  :where(body.app-page) .button { min-height: 44px; }
  :where(body.app-page) .button--small { min-height: 38px; font-size: 13px; }
  :where(body.app-page) .button--icon { width: 44px; }
  :where(body.app-page) .field label, :where(body.app-page) .field > .label { font-size: 13px; }
  :where(body.app-page) input[type=file]::file-selector-button { font: 700 13px/1.2 var(--font); }
  :where(body.app-page) .hint { font-size: 13px; }
  :where(body.app-page) .copy-field { font-size: 13px; }
  :where(body.app-page) .workspace-switch label { font-size: 13px; }
  :where(body.app-page) .sidebar nav a { min-height: 44px; }
  :where(body.app-page) .nav-group-button { min-height: 44px; }
  :where(body.app-page) .sidebar-collapse { min-height: 44px; font: 700 13px/1.2 var(--font); }
  :where(body.app-page) .me small { font-size: 13px; }
  :where(body.app-page) .theme-switch button { min-height: 38px; font: 700 13px var(--font); }
  :where(body.app-page) .theme-toggle { --w: 74px; --k: 38px; height: 44px; }
  :where(body.app-page) .theme-toggle svg { inset: 10px; }
  :where(body.app-page) .sidebar-credit { font: 700 13px/1.4 var(--font); }

  :where(body.app-page) .topbar-search > .icon { top: 14px; }
  :where(body.app-page) .topbar-search input { height: 44px; min-height: 44px; }
  :where(body.app-page) .topbar-tools .menu > summary.button { min-height: 44px; }
  :where(body.app-page) .topbar-search kbd { top: 13px; }
  :where(body.app-page) .find-group { font-size: 13px; }
  :where(body.app-page) .find-results a span { font-size: 13px; }
  :where(body.app-page) .app-foot { font-size: 13px; }
  :where(body.app-page) .stat-label { font-size: 13px; }
  :where(body.app-page) .stat-hint { font-size: 13px; }
  :where(body.app-page) .feed time { font-size: 13px; }
  :where(body.app-page) .menu-choice small { font-size: 13px; }
  :where(body.app-page) .table th { font-size: 13px; }
  :where(body.app-page) .timeline-meta { font-size: 13px; }
  @media (max-width: 560px) { :where(body.app-page) .table--stack td[data-label]:not(:first-child)::before { font-size: 13px; } }
  :where(body.app-page) .divider { font-size: 13px; }
  :where(body.app-page) .fieldset legend { font-size: 16px; }
  :where(body.app-page) .ai-size-price { font-size: 13px; }
  :where(body.app-page) .item-img--empty { font-size: 13px; }
  :where(body.app-page) .item-line { font-size: 13px; }
  :where(body.app-page) .item-edit > summary { font-size: 13px; }
  :where(body.app-page) .statline { font-size: 13px; }
  :where(body.app-page) .editor-menu a small { font-size: 13px; }
  :where(body.app-page) .editor-menu-note { font-size: 13px; }
  :where(body.app-page) .savebar-status { font-size: 13px; }
  :where(body.app-page) .savebar-changed { font-size: 13px; }
  :where(body.app-page) .choice-card small { font-size: 13px; }
  :where(body.app-page) fieldset.field legend { font-size: 16px; }
  :where(body.app-page) .form-actions-status { font-size: 13px; }
  :where(body.app-page) .size-pieces > summary { font-size: 13px; }
  :where(body.app-page) .module-more { font-size: 13px; }
  :where(body.app-page) .module-tile > p { font-size: 13px; }
  :where(body.app-page) .module-tile__meta { font-size: 13px; }
  :where(body.app-page) .plan-index { font-size: 13px; }
  :where(body.app-page) .plan-note { font-size: 13px; }
  :where(body.app-page) .plan-chip { font-size: 13px; }
  :where(body.app-page) .rs-stack-key { font-size: 13px; }
  :where(body.app-page) .so-items__head { font-size: 13px; }
  :where(body.app-page) .so-matches .button { min-height: 44px; }
  :where(body.app-page) .field-error { font-size: 13px; }
  :where(body.app-page) .keep-size small { font-size: 13px; }
  :where(body.app-page) .pf-batch .label { font-size: 13px; }
  :where(body.app-page) .pf-percent label { font-size: 13px; }
  :where(body.app-page) .pf-problem { font-size: 13px; }
  @media (max-width: 560px) { :where(body.app-page) .pf-rows td[data-label="Row"]::before, :where(body.app-page) .pf-results td[data-label="Row"]::before { font-size: 13px; } }

  :where(body.app-page) .button--small.button--icon { width: 38px; }
  :where(body.app-page) input, :where(body.app-page) select, :where(body.app-page) textarea { min-height: 44px; }
  :where(body.app-page) .me-link { width: 44px; height: 44px; }
  :where(body.app-page) .top-group > summary, :where(body.app-page) .top-link,
  :where(body.app-page) .top-links a, :where(body.app-page) .top-account > summary { min-height: 44px; }
  :where(body.app-page) .demo-pill, :where(body.app-page) .card-count, :where(body.app-page) .saved-as-you-go { font-size: 13px; }
  :where(body.app-page) .card-title, :where(body.app-page) .module-row h3, :where(body.app-page) .module-tile h3,
  :where(body.app-page) .subhead, :where(body.app-page) .rich-text-area h4 { font-size: 16px; }
  /* Shrink the text column before moving a date or badge to the next line. */
  :where(body.app-page) :is(.dash-grid, .rs-widget) .list-plain li { flex-wrap: wrap; }
  :where(body.app-page) :is(.dash-grid, .rs-widget) .list-plain li > :first-child { flex: 1 1 6ch; min-width: 0; overflow-wrap: anywhere; }
  :where(body.app-page) :is(.dash-grid, .rs-widget) .list-plain li > :last-child:not(:first-child) { flex: 0 1 auto; }
  @media (min-width: 901px) {
    :where(body.app-page) .editor-menu { min-width: 0; }
    :where(body.app-page) .editor-menu a { min-width: 0; flex-wrap: wrap; }
    :where(body.app-page) .editor-menu a small { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  }
  /* Only the tables converted by RX-03 use these extensions. Existing phone cards keep their row-header and numeric styles. */
  @media (max-width: 560px) {
    :where(body.app-page) .table--rx03 tbody th { display: block; position: static; padding: 2px 0; border: 0; white-space: normal; background: none; }
    :where(body.app-page) .table--rx03 td.num { text-align: left; white-space: normal; }
    :where(body.app-page) .table--rx03.stock-table .stock-sell { width: 100%; }
    :where(body.app-page) .table--rx03 .inline-fields { flex-wrap: wrap; }
    :where(body.app-page) .table--rx03 td .icon-button { margin: 4px 0; }
  }

  /* Top-menu links are 44px plus the bar's 6px padding: anchors clear 56px. */
  @media (min-width: 900px) { body.app-page[data-menu-placement=top] { --top-nav-h: 56px; } }

  /* A widget body must be allowed to fit its grid column. */
  :where(body.app-page) .rs-widget > * { min-width: 0; }
  :where(body.app-page) :is(.dash-grid, .rs-widget) .list-plain li > .badge:last-child { flex: 0 1 auto; max-width: 50%; min-width: 0; white-space: normal; }

  @media (min-width: 900px) {
    html[data-nav-rail] body.app-page { --sidebar-w: 76px; }
    html[data-nav-rail] :where(body.app-page) .sidebar-scroll { padding: 0 16px 12px; }
    html[data-nav-rail] :where(body.app-page) .sidebar-collapse { width: 44px; margin: 6px 16px 2px; }
    html[data-nav-rail] :where(body.app-page) .nav-home, html[data-nav-rail] :where(body.app-page) .nav-group-button { width: 44px; height: 44px; }
    html[data-nav-rail] :where(body.app-page) .sidebar nav .nav-home[aria-current=page]::before { left: -10px; }
    html[data-nav-rail] :where(body.app-page) .nav-home:focus-visible::after, html[data-nav-rail] :where(body.app-page) .nav-group-button:focus-visible::after, html[data-nav-rail] :where(body.app-page) .sidebar-collapse:focus-visible::after, html[data-nav-rail] :where(body.app-page) .sidebar-me:focus-visible::after { font: 700 13px/1.2 var(--font); }
    html[data-nav-rail] :where(body.app-page) .sidebar-foot .sidebar-me { width: 44px; height: 44px; align-items: center; justify-content: center; }
  }
  :where(body.app-page) .empty-state strong { font-size: 16px; }
}

/* RX-14: filtering is drawing only. Full and Find retain all live screens. */
html[data-nav-depth=everyday] [data-nav-everyday="0"], html[data-nav-depth=full] .nav-more { display: none; }
.nav-group > summary { list-style: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-view { flex: none; padding: 8px 12px; color: var(--side-ink); }
.nav-view--top { display: none; }
.nav-depth-switch { display: flex; border: 1px solid var(--side-line); border-radius: 24px; padding: 3px; }
.nav-depth-switch button { flex: 1; min-height: 44px; border: 0; border-radius: 20px; background: none; color: inherit; font: inherit; cursor: pointer; }
.nav-depth-switch button[aria-pressed=true] { background: var(--side-current); color: var(--side-current-ink); font-weight: 700; }
.nav-depth-switch .icon { display: none; }
.nav-more button, button.nav-more { min-height: 44px; border: 0; background: none; color: var(--side-accent); font: inherit; text-align: left; cursor: pointer; padding: 8px 12px; }
.nav-view-note { margin: 8px 0; font-size: 13px; }
.nav-view-note button { min-height: 44px; }
.nav-view-status { font-size: 13px; margin: 0; }
@media (min-width: 900px) {
  body[data-menu-placement=top] .nav-view--top { display: block; color: var(--ink); width: 268px; margin-left: auto; }
  html[data-nav-rail] .sidebar .nav-depth-switch { flex-direction: column; }
  html[data-nav-rail] .sidebar .nav-depth-switch .icon { display: inline; }
  html[data-nav-rail] .sidebar .nav-depth-switch span { display: none; }
  html[data-nav-rail] .sidebar .nav-view { padding: 8px; }
  html[data-nav-rail] .sidebar .nav-view-note, html[data-nav-rail] .sidebar .nav-everyday-help { display: none; }
  html:not(.js)[data-nav-rail] details.nav-group[open] > .nav-panel { display: block; position: fixed; left: 82px; top: 8px; width: 268px; max-height: calc(100vh - 16px); overflow-y: auto; padding: 10px; background: var(--side-bg); border: 1px solid var(--side-line); border-radius: var(--radius); }
  html:not(.js)[data-nav-rail] details.nav-group[open] .nav-label { display: block; }
  html.js[data-nav-rail] .nav-group:not(.is-flyout, .is-leaving) > .nav-panel { display: none; }
}

/* Everyday keeps store administration in the person's own menu. */
html[data-nav-depth=everyday] .nav-full-help, html[data-nav-depth=everyday] [data-nav-personal], html[data-nav-depth=everyday] [data-nav-everyday-group="0"],
html[data-nav-depth=full] .account-everyday-stops, html[data-nav-depth=full] .nav-everyday-help { display: none; }
.nav-everyday-help { font-size: 12px; line-height: 1.4; margin: 8px 0 0; }
.sidebar-foot .account-everyday-stops { max-height: min(30vh, 240px); overflow-y: auto; overscroll-behavior: contain; }
.account-stop { margin-bottom: 6px; }
.account-stop summary, .account-stop a { display: flex; align-items: center; gap: 8px; min-height: 44px; color: inherit; padding: 6px 10px; text-decoration: none; cursor: pointer; }
.account-stop a:hover, .account-stop a[aria-current=page] { background: var(--side-hover); }
.account-stop summary { font-weight: 700; }
.account-stop summary::after { content: '⌄'; margin-left: auto; }
.account-stop summary::-webkit-details-marker { display: none; }
.account-stop .icon { flex: none; }
@media (900px <= width < 1100px) {
  body[data-menu-placement=top] .top-nav { padding-inline: 8px; gap: 1px; }
  body[data-menu-placement=top] .top-group > summary, body[data-menu-placement=top] .top-link { padding-inline: 6px; gap: 5px; font-size: 12px; }
}

@media (width < 900px) {
  /* No script: keep the worded navigation reachable instead of an inert drawer button. */
  html:not(.js) .sidebar { position: relative; width: 100%; max-height: 70vh; transform: none; }
  html:not(.js) .menu-toggle, html:not(.js) .sidebar-close { display: none; }
}

/* RX-15: the approved daily places. The measured height includes the phone's safe area;
   the CSS fallback keeps plain links and Save usable when script is off. */
.phone-bar { display: none; }
@media screen and (width < 900px) {
  html { --phone-bar-height: calc(67px + env(safe-area-inset-bottom)); --phone-bar-clear: var(--phone-bar-height); --phone-keyboard-inset: 0px; }
  html[data-phone-keyboard] { --phone-bar-clear: 0px; }
  /* Every pinned main action consumes this same clearance in its own bottom declaration. */
  body.app-page { --app-action-bottom: calc(var(--phone-bar-clear) + var(--phone-keyboard-inset)); padding-bottom: var(--app-action-bottom); }
  .phone-bar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; inset: auto 0 0; z-index: 29;
    background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px calc(6px + env(safe-area-inset-bottom)); }
  .phone-bar :is(a, button) { border: 0; background: none; font-family: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px;
    color: var(--muted); font-size: 13px; line-height: 1.4; text-decoration: none; border-radius: var(--radius-sm); }
  .phone-bar a[aria-current=page] { color: var(--ink); font-weight: 700; }
  .phone-bar :is(a, button):focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
  html[data-phone-keyboard] .phone-bar { display: none; }
  /* A phone default, not a ceiling: module fields such as Walk's 32px count keep their size. */
  :where(body.app-page) input, :where(body.app-page) select, :where(body.app-page) textarea { font-size: max(16px, 1em); }
  :where(body.app-page [contenteditable]) { font-size: max(16px, 1em); }
  /* Only the compact overrides need higher specificity, including later-loaded module styles. */
  body.app-page :is(input[type=file], .copy-field, .workspace-switch select, .pf-rows input, .pf-rows select,
    .stock-matrix .stock-cell input, .combo-table .input-cell, .an-copy input, .editor__block, .editor__surface, .editor__plain) { font-size: max(16px, 1em); }
  body.app-page .toast-region { bottom: calc(var(--app-action-bottom) + 12px); }
  body.app-page .top-account__panel { max-height: calc(100dvh - var(--topbar-h) - 24px - var(--app-action-bottom)); }
  .phone-bar img { width: 34px; height: 34px; border-radius: 50%; }
  html:not(.js) .phone-bar [data-phone-panel] { display: none; }
  html { scroll-padding-bottom: calc(var(--phone-bar-clear) + var(--phone-keyboard-inset) + 84px); }
  body.app-page :is(input, select, textarea, [contenteditable]) { scroll-margin-bottom: calc(var(--phone-bar-clear) + var(--phone-keyboard-inset) + 84px); }
}
