/* Base CRM theme: a calm, data-dense workspace in light and dark, in the same family as the
   Dirt Road Software website: DM Sans text, Libre Baskerville headings, deep field green and harvest orange.
   Tenants override --accent and --sidebar-bg via /theme.css (which also picks --accent-ink, the readable
   text colour on the accent); everything else reads from the tokens below.
   Local assets only (CSP style-src 'self'). Breakpoints: 560, 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. (--paper is the page, --tan the subtle fill.) */
  --paper: #F2F5F1;
  --paper-2: #E7EEE4;
  --tan: #E2E9DC;
  --tan-2: #BAC7B8;
  --surface: #FFFFFF;
  --surface-2: #F7F9F6;
  --ink: #19392D;
  --ink-2: #3B4D43;
  --muted: #5F6A5B;
  --line: #D8DFD6;
  --line-strong: #C6D2C3;
  --placeholder: #7D8A80;
  /* Brand. Primary buttons are the accent with --accent-ink text, like the website's orange calls to action. */
  --accent: #F18A43;
  --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: color-mix(in srgb, var(--accent) 62%, #000);
  --focus: color-mix(in srgb, var(--accent) 75%, #000);
  --sidebar-bg: #19392D;
  --sidebar-ink: #D5DFD2;
  --sidebar-muted: #A3B6A6;
  --sidebar-hover: color-mix(in srgb, #FFFFFF 7%, var(--sidebar-bg));
  --sidebar-line: color-mix(in srgb, #FFFFFF 10%, var(--sidebar-bg));
  /* The brand mark keeps its own colours in both themes. */
  --bm-ink: #19392D; --bm-road: #E3D5BF; --bm-horizon: #C8D7A7;
  /* Semantic tones: text on its soft background passes WCAG AA. */
  --ok: #15803D; --ok-soft: #E6F4EA;
  --warn: #B45309; --warn-soft: #FDF1DC;
  --danger: #B42318; --danger-soft: #FDE8E7;
  --info: #1D5FBF; --info-soft: #E5EEFB;
  --violet: #6941C6; --violet-soft: #EFEBFA;
  --radius: 6px; --radius-sm: 4px;
  --shadow: 0 1px 2px rgba(25, 57, 45, .05);
  --shadow-pop: 0 16px 40px rgba(19, 44, 37, .18), 0 2px 6px rgba(19, 44, 37, .07);
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --sidebar-w: 248px;
  --topbar-h: 56px;
  color-scheme: light;
}
html[data-theme=dark] {
  --paper: #0C1612;
  --paper-2: #12201A;
  --tan: #1D2E26;
  --tan-2: #34493E;
  --surface: #111D18;
  --surface-2: #15241D;
  --ink: #E7EEE8;
  --ink-2: #C6D3CA;
  --muted: #95A89B;
  --line: #20332A;
  --line-strong: #2E4539;
  --placeholder: #6F8276;
  --accent-soft: color-mix(in srgb, var(--accent) 18%, var(--surface));
  --accent-text: color-mix(in srgb, var(--accent) 70%, #FFFFFF);
  --focus: color-mix(in srgb, var(--accent) 80%, #FFFFFF);
  --sidebar-ink: #CBD8CE;
  --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: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-pop: 0 18px 50px rgba(0, 0, 0, .55);
  color-scheme: dark;
}
html[data-theme=dark] .app-page { --sidebar-bg-dark: color-mix(in srgb, var(--sidebar-bg) 70%, #000); }

* { 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; }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent-text); }
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; }
.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: .02em; font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 8px; }
/* The website's short accent rule before a page's eyebrow. */
.page-head .eyebrow::before, .plan-band-head .eyebrow::before { content: ''; display: inline-block; width: 22px; 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. */
.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: filter .15s, background .15s, border-color .15s; }
.button .icon { width: 16px; height: 16px; }
.button:hover { filter: brightness(1.07); color: var(--accent-ink); }
.button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.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); filter: none; }
/* 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); filter: none; background: color-mix(in srgb, var(--ink) 86%, #FFFFFF); }
.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); filter: none; }
.button--small { min-height: 32px; padding: 5px 12px; font-size: 12.5px; }
.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-underline-offset: 3px; }
.text-button:hover { color: var(--accent-text); }
.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; }

/* Forms */
.stack { display: grid; gap: 14px; }
.stack-lg { display: grid; gap: 20px; align-content: start; }
.field { display: grid; gap: 6px; min-width: 0; }
.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(--line-strong); border-radius: var(--radius-sm); padding: 8px 11px; min-height: 38px; box-shadow: var(--shadow); 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(--tan-2); }
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; }
input[type=color] { padding: 3px; height: 38px; }
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--error::before, .alert--notice::before { content: ''; flex: 0 0 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--ok); }
.alert--error::before { background: var(--danger); }
.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: 999px; 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: 999px; 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; } }

/* Auth pages */
.auth-page { min-height: 100vh; background: radial-gradient(1100px 480px at 50% -12%, var(--surface) 0%, var(--paper) 60%); }
.auth-shell { max-width: 440px; margin: 0 auto; padding: 56px 16px 32px; }
.auth-brand { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 22px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 30px 28px; }
.auth-card h1 { font-size: 23px; margin-bottom: 6px; }
.auth-card form { margin-top: 18px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; }
.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: 999px; 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: 10px; 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: 6px; 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: 10px; 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 */
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; min-width: 0; }
.brand-mark svg { width: 36px; height: 36px; display: block; }
/* An app can swap in an image mark (override templates/layout/brand-mark.php); on the dark sidebar it sits on a light tile. */
.brand-mark img { width: 36px; height: 36px; display: block; object-fit: contain; }
.sidebar .brand-mark--image, .auth-brand .brand-mark--image { display: block; padding: 3px; border-radius: var(--radius); background: #FFFFFF; }
.bm-bg { fill: var(--bm-ink); }
.bm-sun { fill: var(--accent); }
.bm-road { fill: var(--bm-road); }
.bm-line { stroke: var(--bm-ink); stroke-width: 1.6; stroke-linecap: round; }
.bm-horizon { stroke: var(--bm-horizon); stroke-width: 1.2; }
.brand-text { display: grid; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.brand-text small { font-size: 12px; letter-spacing: .02em; color: var(--muted); font-weight: 500; }
.sidebar .brand-text small { color: var(--sidebar-muted); }
.sidebar .bm-bg { fill: color-mix(in srgb, #FFFFFF 9%, var(--sidebar-bg)); }
.sidebar .bm-line { stroke: color-mix(in srgb, #FFFFFF 9%, var(--sidebar-bg)); }
/* A workspace's own logo leads: full width on a white plate (logos are drawn for light backgrounds), the product name under it. */
.brand:has(.brand-logo) { flex-direction: column; align-items: stretch; gap: 6px; flex: 1; }
.brand-logo { display: grid; place-items: center; padding: 8px 10px; border-radius: var(--radius); background: #FFFFFF; }
.brand-logo img { display: block; max-width: 100%; max-height: 52px; width: auto; height: auto; object-fit: contain; }
.brand-text--under { text-align: center; }

/* App shell */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--sidebar-bg-dark, var(--sidebar-bg)); color: var(--sidebar-ink); display: flex; flex-direction: column; padding: 16px 12px 12px; overflow-y: auto; z-index: 40; border-right: 1px solid var(--sidebar-line); }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px 16px; }
.sidebar .brand strong { color: #FFFFFF; }
.sidebar-close { display: none; color: var(--sidebar-ink); }
.sidebar-close:hover { background: var(--sidebar-hover); }
.workspace-switch { margin: 0 2px 6px; padding: 8px 10px 10px; background: var(--sidebar-hover); border: 1px solid var(--sidebar-line); border-radius: var(--radius-sm); }
.workspace-switch label { display: block; font-size: 12px; color: var(--sidebar-muted); margin-bottom: 4px; font-weight: 500; }
.workspace-switch select { background: color-mix(in srgb, #000 22%, var(--sidebar-bg)); color: #F5F7FA; border-color: var(--sidebar-line); min-height: 34px; padding: 5px 8px; font-size: 13px; box-shadow: none; }
.workspace-name { margin: 0; color: #F5F7FA; font-weight: 700; font-size: 13.5px; }
.nav-group { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--sidebar-muted); margin: 18px 10px 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(--sidebar-ink); font-size: 13.5px; font-weight: 500; }
.sidebar nav a .icon { color: var(--sidebar-muted); }
.sidebar nav a:hover { background: var(--sidebar-hover); color: #FFFFFF; }
.sidebar nav a:hover .icon { color: #FFFFFF; }
.sidebar nav a[aria-current=page] { background: color-mix(in srgb, #FFFFFF 11%, var(--sidebar-bg)); color: #FFFFFF; }
.sidebar nav a[aria-current=page]::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.sidebar nav a[aria-current=page] .icon { color: var(--accent); }
.sidebar :focus-visible { outline-color: #FFFFFF; }
.sidebar-bottom { margin-top: auto; padding: 14px 2px 0; border-top: 1px solid var(--sidebar-line); }
.me { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--sidebar-ink); padding: 6px; border-radius: var(--radius-sm); }
.me:hover, .me[aria-current=page] { background: var(--sidebar-hover); color: #fff; }
.me strong { display: block; font-size: 13px; color: #fff; overflow-wrap: anywhere; }
.me small { color: var(--sidebar-muted); font-size: 12px; }
.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(--sidebar-muted); font: 500 13px var(--font); cursor: pointer; }
.signout:hover { color: #fff; background: var(--sidebar-hover); }
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--sidebar-line); border-radius: 9px; background: color-mix(in srgb, #000 20%, var(--sidebar-bg)); }
.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: 6px; background: transparent; color: var(--sidebar-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: #fff; }
.theme-switch button[aria-pressed=true] { background: var(--sidebar-hover); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.app-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: var(--topbar-h); padding: 0 28px; 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; }
.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; min-height: 36px; background: var(--surface-2); box-shadow: none; }
.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); }
.find-results a span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; 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: 999px; 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; }
.banner { display: flex; gap: 10px; align-items: center; padding: 8px 28px; font-size: 13px; border-bottom: 1px solid; }
.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); }
/* Full width: list, table and dashboard pages use the whole screen. Forms and long text keep their own reading widths. */
.content { --content-pad: clamp(16px, 3vw, 40px); padding: 28px var(--content-pad) 48px; width: 100%; }
.app-foot { margin-top: auto; padding: 14px 40px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

/* Page building blocks */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 20px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head > div:first-child { min-width: 0; }
.back { margin: 0 0 10px; 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); 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; }
.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); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card-head .card-title { margin: 0; }
.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); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.form-layout { display: grid; gap: 18px; max-width: 900px; }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--paper) 30%); padding: 14px 0 6px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { position: relative; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); 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(--line-strong); color: inherit; box-shadow: 0 4px 14px rgba(16, 24, 40, .07); }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat-hint { font-size: 12px; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 20px; align-items: start; }
.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; }
.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); 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(--line-strong); color: inherit; box-shadow: 0 4px 14px rgba(16, 24, 40, .07); }
.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); }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.module { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 8px; align-content: start; box-shadow: var(--shadow); }
.module header { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.module h3 { font-size: 15px; }
.module p { color: var(--muted); margin: 0; font-size: 13px; }
.module--planned { background: transparent; border-style: dashed; box-shadow: none; }
.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; }
.unlock { margin: 0 0 16px; padding: 10px 14px; border: 1px dashed var(--line-strong); border-radius: 10px; 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: .02em; 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; }
.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; margin-bottom: 14px; }
.filters .field--grow { flex: 1 1 280px; }
.filters select { min-width: 150px; width: auto; }
.js .filters[data-live] .filters-apply { display: none; }
.inline-search { display: flex; gap: 8px; }
.inline-search input { min-width: 240px; }
.pager { display: flex; gap: 18px; align-items: center; justify-content: center; margin: 18px 0; font-size: 13px; color: var(--muted); }
.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 0 14px; 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: 999px; 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: 999px; 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. */
section[id], li[id], details[id], h2[id] { scroll-margin-top: calc(var(--topbar-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 (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  body.nav-open .sidebar { transform: none; }
  .nav-scrim { display: none; position: fixed; inset: 0; background: rgba(16, 24, 40, .45); z-index: 30; }
  body.nav-open .nav-scrim { display: block; }
  .sidebar-close, .menu-toggle { display: inline-flex; }
  .app-main { margin-left: 0; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-tools { flex: 1; }
  .banner { padding: 8px 16px; }
  .two-col, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .topbar-search { width: auto; flex: 1; }
  .topbar-search kbd { display: none; }
  .crumbs { display: none; }
}
@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; }
}
@media print { .sidebar, .topbar, .banner, .app-foot, .toast-region { display: none; } .app-main { margin: 0; } }
@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: 10px; 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; }
.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: 10px; 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; }
.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: .06em; color: var(--muted); }
.error-page h1 { margin-bottom: 8px; }
.error-page p { color: var(--muted); }
.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 */
.pairing-code { font-size: 30px; font-weight: 700; letter-spacing: .12em; font-variant-numeric: tabular-nums; margin: 6px 0 10px; color: var(--ink); }
details.card > summary { cursor: pointer; list-style: revert; }
details.card[open] > summary { margin-bottom: 10px; }

/* Password prompt for sensitive changes (partials/step-up.php). */
.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-pop); }
.step-up-dialog::backdrop { background: rgba(16, 24, 40, .5); }
.step-up-dialog h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; }
.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; }
.big-number { font-size: 36px; font-weight: 700; letter-spacing: -.02em; 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 0 16px; }
.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); }
.tabs .count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font-size: 12px; text-align: center; }
.check-row { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.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: 999px; 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: 80px; }
.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; }
.form-actions { position: sticky; bottom: 0; z-index: 2; padding: 12px 0; background: var(--paper); border-top: 1px solid var(--line); }
@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; }

/* 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; } }
.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: 28px; }
.module-family-summary { margin: -6px 0 14px; }
.product-brand { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; 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)) 32px; padding: 30px var(--content-pad) 34px; background: var(--surface); border-block: 1px solid var(--line); }
.plan-band-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 40px; margin-bottom: 24px; }
.plan-band-title { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.4vw, 32px); 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(290px, 1fr)); gap: 20px; align-items: stretch; }
.plan-card { display: flex; flex-direction: column; gap: 10px; padding: 24px 26px 26px; background: var(--surface); border: 1px solid var(--tan-2); border-radius: var(--radius); }
.plan-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.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: 25px; line-height: 1.25; }
.plan-summary { color: var(--ink-2); font-size: 13.5px; margin: 0; }
.plan-state { display: flex; align-items: center; gap: 7px; margin: 6px 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-features { list-style: none; margin: 10px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 11px; font-size: 13.5px; }
.plan-features li { display: flex; gap: 9px; align-items: flex-start; line-height: 1.45; }
.plan-features li > .icon { width: 15px; height: 15px; margin-top: 3px; color: var(--ok); }
.plan-features small { display: block; color: var(--muted); }
.plan-features .badge { margin-left: 4px; vertical-align: 1px; }
.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, .plan-card--offer .plan-features li > .icon { color: #C8D7A7; }
.plan-card--offer .plan-features { border-color: color-mix(in srgb, #FFFFFF 22%, var(--sidebar-bg)); }
.plan-card--offer :focus-visible { outline-color: #FFFFFF; }
.plan-cta { justify-content: space-between; margin-top: 8px; min-height: 44px; }
.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 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);
  --focus: color-mix(in srgb, var(--accent) 75%, #000);
  background: var(--shop-bg, var(--paper)); overflow-x: clip;
}
.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); color: var(--surface); filter: none; }
.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); color: #FFFFFF; filter: none; }
.button--light { background: var(--shop-bg, var(--paper)); border-color: var(--shop-bg, var(--paper)); color: var(--ink); }
.button--light:hover { 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: the post editor (formatting toolbar, Write/Preview, the publish box) and earlier versions.
   Public: /blog/<workspace> uses the store's header and footer, with post cards, a sidebar and
   readable post pages (about 70 characters a line). */
.post-editor__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 20px; align-items: start; border: 0; margin: 0; padding: 0; min-width: 0; }
.post-editor__side { position: sticky; top: calc(var(--topbar-h) + 16px); }
.post-title-input { font-family: var(--serif); font-size: 21px; min-height: 48px; }
.md-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 6px; }
.md-head label { margin: 0; }
.md-tabs { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.md-tabs button { min-height: 32px; padding: 4px 14px; border: 0; background: var(--surface); color: var(--muted); font: 700 13px var(--font); cursor: pointer; }
.md-tabs button[aria-selected=true] { background: var(--ink); color: var(--surface); }
.md-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--surface-2); }
.md-toolbar button { display: inline-flex; align-items: center; gap: 4px; min-width: 36px; min-height: 36px; padding: 4px 10px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--ink-2); font: 700 13px var(--font); cursor: pointer; }
.md-toolbar button:hover { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.md-toolbar .icon { width: 14px; height: 14px; }
.md-sep { width: 1px; height: 22px; margin: 0 4px; background: var(--line-strong); }
.md-toolbar:not([hidden]) + .md-input { border-top-left-radius: 0; border-top-right-radius: 0; }
.md-input { min-height: 420px; font: 15px/1.6 var(--font); resize: vertical; }
.md-preview { min-height: 420px; max-width: none; padding: 14px 18px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.md-status:empty { display: none; }
.md-help { margin: 8px 0 16px; font-size: 13px; }
.md-help summary { cursor: pointer; color: var(--accent-text); font-weight: 700; }
.md-help .table { margin-top: 8px; }
.input-prefix { display: flex; align-items: stretch; min-width: 0; }
.input-prefix span { display: flex; flex-shrink: 0; align-items: center; padding: 0 10px; border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--surface-2); color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.input-prefix input { border-top-left-radius: 0; border-bottom-left-radius: 0; min-width: 0; }
.post-featured-preview { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); background: var(--paper-2); }
.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; }
@media (max-width: 1100px) { .post-editor__grid { grid-template-columns: minmax(0, 1fr); } .post-editor__side { position: static; } }

.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) 260px; gap: 20px 44px; align-items: start; }
.blog-layout--post { 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 { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 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; }
.blog-layout--post .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(--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; }
