/* ============================================================
   The store front (store.js): the Supply design. Everything here applies only under html.sf, the
   class the router puts on the page for visitors at the public address; the app is untouched.
   Light by default; dark follows the device (or the app's own Light/Dark setting, if this browser
   has one) and uses the Kalodos visual law's palette: Night, raised, Bone, Dust, Hairline, Spice,
   Verdant. Web adaptations of the law: product photos sit on Bone "lit plates"; form-control
   borders use Dust for 3:1 contrast; error text is lightened from Blood for contrast.
   ============================================================ */

@font-face { font-family: "Archivo"; font-weight: 400 700; font-display: swap; src: url("/static/fonts/archivo-latin.woff2") format("woff2"); }

html.sf:root {
  --sf-bg: #FFFFFF; --sf-ink: #111418; --sf-muted: #5B6470; --sf-body2: #3D4550; --sf-body3: #262C33;
  --sf-line: #E3E6EA; --sf-line-s: #AEB6C1; --sf-panel-line: #DDE1E6;
  --sf-accent: #1F5BD8; --sf-on-accent: #FFFFFF; --sf-sel: #EEF3FF;
  --sf-plate: #F3F4F6; --sf-plate-text: #5B6470; --sf-panel: #F5F7FA;
  --sf-err: #B42318; --sf-err-bg: #FCE4E2; --sf-ok: #1E7A4F; --sf-sw-ring: rgba(0, 0, 0, .18); --sf-focus: #1F5BD8;
  /* the app's own pieces (fields, toasts, the sending screen) take the store's colors here */
  --bg: var(--sf-bg); --surface: var(--sf-bg); --subtle: var(--sf-panel); --sunken: var(--sf-panel); --stage-hi: var(--sf-bg);
  --line: var(--sf-line); --border: var(--sf-line); --control: var(--sf-line-s);
  --ink: var(--sf-ink); --ink2: var(--sf-body2); --muted: var(--sf-muted); --dim: var(--sf-muted);
  --accent: var(--sf-accent); --on-accent: var(--sf-on-accent); --accent-bg: var(--sf-sel); --accent-fg: var(--sf-accent); --accent-line: var(--sf-line-s);
  --danger: var(--sf-err); --danger-bg: var(--sf-err-bg); --ok: var(--sf-ok);
  --ring-mid: var(--sf-line-s); --ring-deep: var(--sf-line);
  --radius: 6px; --r-ctl: 6px;
  --sf-pad: 40px; --sf-max: 1360px;
  color-scheme: light;
  background: var(--sf-bg);
}
@media (prefers-color-scheme: dark) { html.sf:root:not([data-theme="light"]) {
  --sf-bg: #16181D; --sf-ink: #EAE4D6; --sf-muted: #9B948A; --sf-body2: #B7B3AA; --sf-body3: #EAE4D6;
  --sf-line: #33363E; --sf-line-s: #9B948A; --sf-panel-line: #33363E;
  --sf-accent: #E8823A; --sf-on-accent: #16181D; --sf-sel: #1F222A;
  --sf-plate: #EAE4D6; --sf-plate-text: #5E584E; --sf-panel: #1F222A;
  --sf-err: #E08A7E; --sf-err-bg: #1F222A; --sf-ok: #6FAF7E; --sf-sw-ring: rgba(234, 228, 214, .32); --sf-focus: #EAE4D6;
  color-scheme: dark;
} }
html.sf:root[data-theme="dark"] {
  --sf-bg: #16181D; --sf-ink: #EAE4D6; --sf-muted: #9B948A; --sf-body2: #B7B3AA; --sf-body3: #EAE4D6;
  --sf-line: #33363E; --sf-line-s: #9B948A; --sf-panel-line: #33363E;
  --sf-accent: #E8823A; --sf-on-accent: #16181D; --sf-sel: #1F222A;
  --sf-plate: #EAE4D6; --sf-plate-text: #5E584E; --sf-panel: #1F222A;
  --sf-err: #E08A7E; --sf-err-bg: #1F222A; --sf-ok: #6FAF7E; --sf-sw-ring: rgba(234, 228, 214, .32); --sf-focus: #EAE4D6;
  color-scheme: dark;
}
@media (max-width: 1099px) { html.sf:root { --sf-pad: 28px; } }
@media (max-width: 759px) { html.sf:root { --sf-pad: 16px; } }

html.sf body { background: var(--sf-bg); color: var(--sf-ink); font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif; font-variant-numeric: normal; }
html.sf main.wrap { max-width: none; padding: 0; margin: 0; width: 100%; }
/* The page is focused after each route (for screen readers); it isn't a control, so no focus ring */
html.sf main#view:focus, html.sf main#view:focus-visible { outline: none; }
/* The footer sits at the bottom of the window even when the page is short */
html.sf body { display: flex; flex-direction: column; min-height: 100vh; }
html.sf #topbar { flex: none; }
html.sf main#view { flex: 1 0 auto; display: flex; flex-direction: column; }
html.sf main#view > * { width: 100%; }
html.sf .sf-foot { margin-top: auto; }
html.sf :focus-visible { outline: 2px solid var(--sf-focus); outline-offset: 2px; }
html.sf :is(input, textarea, select):focus-visible { outline: none; }  /* fields show focus by their border */
html.sf h1, html.sf h2, html.sf h3 { font-weight: 600; letter-spacing: -0.01em; }
html.sf h1 { font-weight: 700; letter-spacing: -0.02em; }
html.sf :is(h1, h2) { text-wrap: balance; }
html.sf p { text-wrap: pretty; }
:where(html.sf) :where(h1, h2, h3) { margin: 0; }  /* no weight: the app's own heading margins (cards, settings) still apply */
html.sf h2.eyebrow { font-weight: 600; margin: 0 0 10px; }
.sf-wrap { max-width: var(--sf-max); margin: 0 auto; padding: 0 var(--sf-pad); }
.sf-eyebrow, .sf-label { display: block; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--sf-ink); }
.sf-lede { margin: 8px 0 0; font-size: 16px; color: var(--sf-body2); max-width: 36rem; }
.sf-fine { margin: 0; font-size: 13px; color: var(--sf-muted); }
.sf-h2 { font-size: 24px; margin: 0 0 20px; }
.sf-h3 { font-size: 16px; margin: 28px 0 8px; letter-spacing: 0; }
/* Links in text are ink, underlined; the accent is kept for actions (buttons, the progress bar) */
.sf-more, .sf-backlink, .sf-fine a { color: var(--sf-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--sf-line-s); }
.sf-more { font-size: 16px; font-weight: 500; }
.sf-backlink { font-size: 14px; }
:is(.sf-more, .sf-backlink, .sf-fine a):hover { text-decoration-color: currentColor; }
.sf-dot { flex: none; vertical-align: -1px; }
.sf-dot circle { stroke: var(--sf-sw-ring); stroke-width: 1; }
.sf-dot-none circle { stroke: var(--sf-muted); stroke-dasharray: 2 2; }

/* ---------- buttons ---------- */
.sf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 1px solid var(--sf-accent); border-radius: 6px;
  background: var(--sf-accent); color: var(--sf-on-accent); font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer; white-space: nowrap; }
.sf-btn:hover { filter: brightness(1.06); }
.sf-btn:disabled { opacity: .6; cursor: default; }
.sf-btn-2 { background: transparent; color: var(--sf-ink); border-color: var(--sf-line-s); }
.sf-btn-2:hover { filter: none; border-color: var(--sf-ink); }
.sf-btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.sf-btn-lg { min-height: 52px; font-size: 16px; }
.sf-btn-block { display: flex; width: 100%; }
.sf-btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.sf-linkbtn { border: 0; background: none; padding: 4px 0; font: inherit; font-size: 13px; color: var(--sf-muted); text-decoration: underline; cursor: pointer; }

/* ---------- header ---------- */
html.sf .topbar { position: static; background: var(--sf-bg); border-bottom: 1px solid var(--sf-line); }
.sf-head-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.sf-logo-img { display: block; height: 32px; width: auto; max-width: 220px; }
.sf-logo { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; text-decoration: none; color: var(--sf-ink); }
.sf-search { box-sizing: border-box; width: 100%; height: 40px; padding: 0 14px; border: 1px solid var(--sf-line-s); border-radius: 6px; background: var(--sf-bg);
  font: inherit; font-size: 16px; color: var(--sf-ink); -webkit-appearance: none; appearance: none; }
.sf-search::placeholder { color: var(--sf-muted); opacity: 1; }
.sf-search:focus { outline: none; border-color: var(--sf-ink); box-shadow: 0 0 0 1px var(--sf-ink); }
.sf-head-in .sf-search { flex: 0 1 320px; margin-left: auto; }
.sf-nav { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.sf-head-in .sf-search + .sf-nav { margin-left: 0; }
.sf-nav a { font-size: 14px; font-weight: 500; color: var(--sf-body2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.sf-nav a:hover, .sf-nav a[aria-current="page"], .sf-navbtn { color: var(--sf-ink); }
.sf-nav a, .sf-navbtn { white-space: nowrap; }
.sf-navbtn { border: 0; background: none; padding: 0; min-height: 44px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.sf-navbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.sf-as { margin: 0 0 18px; }
.sf-narrow { display: none; padding-bottom: 12px; }
.sf-cats-bar { border-top: 1px solid var(--sf-line); }
.sf-cats { display: flex; overflow-x: auto; scrollbar-width: none; padding-left: calc(var(--sf-pad) - 12px); padding-right: calc(var(--sf-pad) - 12px); }
.sf-cats a { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 12px; font-size: 14px; font-weight: 500; color: var(--sf-body2);
  text-decoration: none; border-bottom: 2px solid transparent; }
.sf-cats a:hover { color: var(--sf-ink); }
.sf-cats a[aria-current="page"] { color: var(--sf-ink); border-bottom-color: var(--sf-ink); }

/* ---------- footer ---------- */
.sf-foot { margin-top: 0; background: var(--sf-panel); border-top: 1px solid var(--sf-line); font-size: 14px; }
.sf-foot-in { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding-top: 56px; padding-bottom: 40px; }
.sf-foot-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
.sf-foot h2 { font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--sf-ink); margin: 0 0 12px; }
.sf-foot p { margin: 0 0 6px; color: var(--sf-body2); }
.sf-foot-brand .sf-logo { display: block; font-size: 20px; margin-bottom: 8px; }
.sf-foot a { display: block; color: var(--sf-body2); text-decoration: none; padding: 3px 0; }
.sf-foot a:hover { color: var(--sf-ink); text-decoration: underline; text-underline-offset: 3px; }
.sf-foot-brand a { display: inline; }
.sf-foot-end { padding: 16px 0 32px; border-top: 1px solid var(--sf-line); font-size: 13px; color: var(--sf-muted); }

/* ---------- product cards and grids ---------- */
.sf-sec { padding-bottom: 72px; }
.sf-grid { display: grid; gap: 40px 24px; }
.sf-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sf-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sf-plate { display: block; background: var(--sf-plate); color: var(--sf-plate-text); border-radius: 4px; overflow: hidden; }
.sf-plate img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sf-plate .maw { margin: auto; }
/* The photo is the card: no box around it, the name and price under it */
.sf-card { display: flex; flex-direction: column; gap: 4px; color: var(--sf-ink); text-decoration: none; }
.sf-card:focus-visible { outline-offset: 4px; }
.sf-card-img { aspect-ratio: 1; display: flex; margin-bottom: 8px; }
.sf-card-title { font-size: 16px; font-weight: 500; line-height: 1.35; }
.sf-card:hover .sf-card-title { text-decoration: underline; text-underline-offset: 3px; }
.sf-card-desc { font-size: 14px; color: var(--sf-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sf-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 2px; }
.sf-card-foot strong { font-size: 16px; font-weight: 500; }
.sf-from { font-weight: 400; color: var(--sf-muted); }
.sf-swatches { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--sf-muted); }
.sf-swatches span { margin-left: 2px; }
.sf-count { display: none; font-size: 12px; color: var(--sf-muted); }
.sf-ask { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-top: 48px; padding: 28px 32px; border-radius: 6px; background: var(--sf-panel); }
.sf-ask h2 { font-size: 20px; }
.sf-ask p { margin: 6px 0 0; font-size: 16px; color: var(--sf-body2); max-width: 56ch; }
.sf-ask .sf-btn { flex: none; }
.sf-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 40px; border-radius: 6px; background: var(--sf-panel); }
.sf-empty h2 { font-size: 24px; }
.sf-empty p { margin: 0; color: var(--sf-body2); }

/* ---------- home ---------- */
.sf-intro { padding-top: 32px; padding-bottom: 32px; }
.sf-intro h1 { font-size: 32px; line-height: 1.1; }
.sf-how { background: var(--sf-bg); border-top: 1px solid var(--sf-line); }
.sf-how-in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; padding-top: 40px; padding-bottom: 72px; }
.sf-how-step h3 { font-size: 16px; margin: 0 0 6px; letter-spacing: 0; }
.sf-how-step p { margin: 0; font-size: 14px; color: var(--sf-body2); }

/* Nothing listed yet: the headline, then three plain steps under a rule */
.sf-open { flex: 1 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 56px; padding-top: 96px; padding-bottom: 96px; }
.sf-open-text { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.sf-open h1 { font-size: 48px; line-height: 1.05; letter-spacing: -0.03em; max-width: 12em; }
.sf-open .sf-lede { margin: 0; font-size: 18px; max-width: 34rem; }
.sf-open .sf-btn { margin-top: 8px; }
.sf-open-steps { list-style: none; margin: 0; padding: 24px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; border-top: 1px solid var(--sf-line); }
.sf-open-steps li { display: block; padding: 0; }
.sf-open-steps li > span { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--sf-muted); font-variant-numeric: tabular-nums; }
.sf-open-steps h3 { font-size: 16px; margin: 0 0 4px; letter-spacing: 0; }
.sf-open-steps p { margin: 0; font-size: 14px; color: var(--sf-body2); }

/* ---------- shop ---------- */
.sf-shop { padding-top: 32px; padding-bottom: 72px; }
.sf-shop-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.sf-shop-head h1 { font-size: 32px; }
#sf-count { margin-right: auto; font-size: 14px; color: var(--sf-muted); }
.sf-sort { display: block; width: 220px; }
html.sf .sf-sort select { min-height: 40px; padding-top: 6px; padding-bottom: 6px; font-size: 16px; }

/* ---------- product ---------- */
.sf-product { padding-top: 32px; padding-bottom: 56px; }
.sf-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; font-size: 14px; color: var(--sf-muted); }
.sf-crumbs a { color: var(--sf-muted); text-decoration: none; }
.sf-crumbs a:hover { color: var(--sf-ink); text-decoration: underline; text-underline-offset: 3px; }
.sf-prod { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: start; }
.sf-gallery { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 760px) { .sf-gallery { position: sticky; top: 24px; } }
.sf-stage { position: relative; aspect-ratio: 1; display: flex; border-radius: 6px; }
.sf-stage > img { min-width: 0; }
.sf-3d { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.sf-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.sf-thumb { width: 88px; aspect-ratio: 1; padding: 0; border: 1px solid transparent; border-radius: 6px; cursor: pointer; }
.sf-thumb[aria-pressed="true"] { border-color: var(--sf-ink); box-shadow: 0 0 0 1px var(--sf-ink); }
.sf-thumb-3d { background: var(--sf-panel); color: var(--sf-ink); font: inherit; font-weight: 600; border-color: var(--sf-line); }
.sf-buy { display: flex; flex-direction: column; gap: 18px; }
.sf-buy h1 { font-size: 32px; line-height: 1.1; }
.sf-unit { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.sf-unit strong { font-size: 24px; font-weight: 500; }
.sf-unit span { font-size: 14px; color: var(--sf-muted); }
.sf-desc { margin: 0; color: var(--sf-body3); }
.sf-legend { margin: 0 0 8px; font-size: 14px; }
.sf-legend strong { font-weight: 600; }
.sf-legend span { margin-left: 6px; color: var(--sf-body2); }
/* Colors: round swatches, a row per material; the chosen one is named in the legend */
.sf-opt-row { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 12px; padding: 4px 0; }
.sf-opt-mat { font-size: 13px; color: var(--sf-muted); }
.sf-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-opt { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 2px solid transparent; border-radius: 50%;
  background: none; color: var(--sf-ink); cursor: pointer; }
.sf-opt:hover { border-color: var(--sf-line-s); }
.sf-opt[aria-checked="true"] { border-color: var(--sf-ink); }
.sf-opt .sf-dot circle { stroke-width: .5; }
.sf-qty-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.sf-label-strong { font-size: 14px; font-weight: 600; }
.sf-stepper { display: inline-flex; align-items: center; border: 1px solid var(--sf-line-s); border-radius: 6px; }
.sf-stepper button { width: 44px; height: 44px; border: 0; background: none; color: var(--sf-ink); font: inherit; font-size: 18px; cursor: pointer; }
.sf-stepper button:disabled { color: var(--sf-muted); cursor: default; opacity: .5; }
.sf-stepper output { min-width: 36px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
/* The rule above Total sits on both cells with no gap between them, so it reads as one line */
.sf-sum { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 0; padding: 16px; font-size: 15px; font-variant-numeric: tabular-nums;
  background: var(--sf-panel); border-radius: 6px; }
.sf-sum dd { margin: 0; padding-left: 16px; text-align: right; }
.sf-sum .sf-sub { color: var(--sf-body2); }
.sf-sum .sf-total { font-weight: 600; padding-top: 8px; border-top: 1px solid var(--sf-panel-line); }
.sf-sum-plain { padding: 0; background: none; }
.sf-buy > .sf-fine { margin-top: -6px; }
.sf-specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.sf-specs caption { text-align: left; padding: 8px 0; }
.sf-specs tr { border-top: 1px solid var(--sf-line); }
.sf-specs tr:last-child { border-bottom: 1px solid var(--sf-line); }
.sf-specs th { width: 38%; padding: 10px 16px 10px 0; text-align: left; font-weight: 500; color: var(--sf-muted); }
.sf-specs td { padding: 10px 0; }

/* ---------- forms (checkout, custom request, account) ---------- */
html.sf .field { margin: 0 0 18px; }
html.sf .label { font-size: 14px; margin-bottom: 6px; }
html.sf .hint { font-size: 13px; margin-top: 6px; }
html.sf input:not([type]), html.sf input[type="text"], html.sf input[type="email"], html.sf input[type="tel"], html.sf input[type="password"],
html.sf input[type="date"], html.sf textarea, html.sf select { min-height: 48px; padding: 11px 14px; background-color: var(--sf-bg); font-size: 16px; }
html.sf input[type="date"] { height: 48px; }  /* the same height as the fields beside it (Safari adds to a date field's own height) */
html.sf input[type="date"]::-webkit-datetime-edit { padding: 0; }
html.sf select { padding-right: 44px; }  /* room for the arrow (app.css draws it) */
html.sf .pw input { padding-right: 76px; }  /* room for Show / Hide */
html.sf textarea { min-height: 96px; }
html.sf input:focus, html.sf textarea:focus, html.sf select:focus { border-color: var(--sf-ink); box-shadow: 0 0 0 1px var(--sf-ink); }
html.sf .form-error { margin: 0 0 14px; border: 1px solid var(--sf-err); }
.sf-form { min-width: 0; }
.sf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.sf-check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 18px; font-size: 15px; cursor: pointer; }
.sf-check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--sf-accent); }
.sf-fieldset { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.sf-fieldset legend { padding: 0; }
.sf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sf-chip { position: relative; cursor: pointer; }
.sf-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sf-chip > span { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--sf-line); border-radius: 6px; font-size: 14px; color: var(--sf-ink); }
.sf-chip small { color: var(--sf-muted); }
.sf-chip input:checked + span { border-color: var(--sf-ink); box-shadow: inset 0 0 0 1px var(--sf-ink); }
.sf-chip input:focus-visible + span { outline: 2px solid var(--sf-focus); outline-offset: 2px; }
.sf-drop { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 10px; }
.sf-drop .hint { margin: 0; flex: 1 1 220px; }
.sf-files { list-style: none; margin: 10px 0 0; padding: 0; }
.sf-files li { display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--sf-line); font-size: 14px; }
.sf-files img, .sf-file-x { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; background: var(--sf-plate); }
.sf-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-file-name small { color: var(--sf-muted); }
.sf-file-state { font-size: 13px; color: var(--sf-ok); }
.sf-file-bad .sf-file-state { color: var(--sf-err); }
.sf-file-err { grid-column: 2 / -1; font-size: 13px; color: var(--sf-err); }
.sf-progress { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--sf-body2); }
.sf-bar { display: block; height: 4px; background: var(--sf-line); border-radius: 2px; overflow: hidden; }
.sf-bar span { display: block; height: 100%; width: 0; background: var(--sf-accent); }
.sf-form > .sf-fine { margin-top: 10px; }

.sf-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 80px; align-items: start; padding-top: 32px; padding-bottom: 72px; }
.sf-checkout h1 { font-size: 32px; margin-top: 8px; }
.sf-co-main { max-width: 600px; }
.sf-co-main .sf-form { margin-top: 24px; }
.sf-panel { background: var(--sf-panel); border-radius: 6px; }
.sf-co-sum { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.sf-line-item { display: flex; gap: 14px; align-items: flex-start; }
.sf-line-item strong { display: block; font-weight: 600; }
.sf-mini { width: 64px; height: 64px; flex: none; display: flex; }
.sf-meta { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--sf-body2); }

.sf-custom { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; padding-top: 32px; padding-bottom: 72px; }
.sf-custom h1 { font-size: 32px; line-height: 1.15; }
.sf-custom .sf-form { max-width: 640px; }
.sf-bullets { margin: 0; padding-left: 20px; color: var(--sf-body2); font-size: 16px; }
.sf-bullets li { margin: 4px 0; }

/* ---------- the order page ---------- */
.sf-track { padding-top: 32px; padding-bottom: 72px; }
.sf-track > h1 { font-size: 32px; }
.sf-order { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 48px; align-items: start; margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--sf-line); }
.sf-order-main h2 { font-size: 24px; margin-top: 0; }
.sf-when { margin: 4px 0 0; font-size: 14px; color: var(--sf-muted); }
.sf-order .sf-co-sum { position: static; }
/* Progress: a segmented bar; done segments in the accent, the current one named in bold */
.sf-track-steps { list-style: none; margin: 24px 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.sf-track-steps li { display: flex; align-items: center; gap: 6px; padding: 10px 0 0; border-top: 3px solid var(--sf-line); font-size: 14px; color: var(--sf-muted); }
.sf-track-steps .sf-step-done { color: var(--sf-ink); border-top-color: var(--sf-accent); }
.sf-track-steps .sf-step-current { color: var(--sf-ink); font-weight: 600; border-top-color: var(--sf-line-s); }
.sf-step-check { flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sf-paybox { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.sf-paybox h3 { font-size: 20px; }
.sf-paynote { margin: 0; color: var(--sf-body3); white-space: pre-line; }
.sf-track-more { margin-top: 40px; }
.sf-account { margin-top: 56px; padding: 40px 0 0; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 48px; align-items: start;
  background: none; border-radius: 0; border-top: 1px solid var(--sf-line); }
.sf-account h2 { font-size: 20px; }
.sf-account p { margin: 6px 0 0; color: var(--sf-body2); }
.sf-account > .sf-btn { justify-self: start; }
.sf-narrow-page { padding-top: 48px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- tablets ---------- */
@media (max-width: 1099px) {
  .sf-grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sf-prod, .sf-checkout, .sf-custom, .sf-order { gap: 32px; }
  .sf-checkout { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* ---------- phones ---------- */
@media (max-width: 759px) {
  .sf-head-in { gap: 12px; }
  .sf-head-in .sf-search { display: none; }
  .sf-narrow { display: block; }
  .sf-nav { gap: 16px; }
  .sf-nav .sf-not-phone { display: none; }  /* signed in: New request is on Your orders */
  .sf-grid-4, .sf-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 12px; }
  .sf-card-title { font-size: 15px; }
  .sf-card-desc { display: none; }
  .sf-card-foot strong { font-size: 15px; }
  .sf-swatches { display: none; }
  .sf-count { display: inline; }
  .sf-ask { flex-direction: column; align-items: stretch; gap: 16px; padding: 20px; }
  .sf-intro { padding-top: 20px; padding-bottom: 20px; }
  .sf-intro h1 { font-size: 26px; }
  .sf-open { padding-top: 40px; padding-bottom: 48px; gap: 40px; }
  .sf-open-steps { grid-template-columns: 1fr; gap: 20px; }
  .sf-open h1 { font-size: 34px; }
  .sf-open .sf-lede { font-size: 16px; }
  .sf-open .sf-btn { align-self: stretch; }
  .sf-sec { padding-bottom: 56px; }
  .sf-how-in { grid-template-columns: 1fr; gap: 24px; padding-bottom: 48px; }
  .sf-foot-in { grid-template-columns: 1fr 1fr; }
  .sf-foot-brand { grid-column: 1 / -1; }
  .sf-shop { padding-top: 20px; }
  .sf-shop-head { flex-wrap: wrap; }
  .sf-shop-head h1 { font-size: 26px; }
  .sf-sort { flex: 1 0 100%; }
  .sf-product { padding-top: 20px; }
  .sf-prod, .sf-checkout, .sf-custom, .sf-order { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .sf-buy h1 { font-size: 26px; }
  .sf-unit strong { font-size: 20px; }
  .sf-two { grid-template-columns: 1fr; }
  .sf-co-sum { position: static; }
  .sf-paybox, .sf-order .sf-co-sum { padding: 20px; }
  .sf-checkout h1, .sf-custom h1, .sf-track > h1 { font-size: 26px; }
  .sf-h2, .sf-empty h2, .sf-order-main h2 { font-size: 20px; }
  .sf-track-steps { gap: 4px; }
  .sf-track-steps li { font-size: 13px; align-items: flex-start; }
  .sf-account { grid-template-columns: 1fr; }
  .sf-empty { padding: 24px; }
}

@media (prefers-reduced-motion: no-preference) {
  .sf-opt, .sf-btn, .sf-chip > span { transition: border-color .15s ease, background-color .15s ease, filter .15s ease; }
  .sf-bar span { transition: width .2s linear; }
}

/* ---------- a customer's own pages at the store's address ----------
   Their orders, a request, quotes, invoices, statement and account are the app's pages, shown inside the
   store's header and footer (html.sf-acct). The colour tokens above already give them the store's
   palette; these rules give them its width, type and shapes. Nothing here reaches the back end. */
html.sf-acct:root {
  --printing: #1F5BD8; --printing-bg: #EEF3FF; --printing-fg: #1A4FBF;
  --processing: #8A5A00; --processing-bg: #FFF4DD;
  --ok-bg: #E6F4EC; --late: #B45309; --neutral-bg: #F1F3F5;
}
@media (prefers-color-scheme: dark) { html.sf-acct:root:not([data-theme="light"]) {
  --printing: #E8823A; --printing-bg: rgba(232, 130, 58, .14); --printing-fg: #E8823A;
  --processing: #EAE4D6; --processing-bg: #2A2D35;
  --ok-bg: rgba(111, 175, 126, .14); --late: #E8823A; --neutral-bg: #23262C;
} }
html.sf-acct:root[data-theme="dark"] {
  --printing: #E8823A; --printing-bg: rgba(232, 130, 58, .14); --printing-fg: #E8823A;
  --processing: #EAE4D6; --processing-bg: #2A2D35;
  --ok-bg: rgba(111, 175, 126, .14); --late: #E8823A; --neutral-bg: #23262C;
}
/* The column starts on the logo's line, like the store's own pages; the content keeps its reading width */
html.sf-acct main#view { display: block; width: 100%; max-width: var(--sf-max); margin: 0 auto; padding: 8px var(--sf-pad) 72px; }
html.sf-acct #sf-page-foot { flex: none; }
html.sf-acct .picture { max-width: 560px; }
html.sf-acct main#view > * { width: auto; max-width: 1040px; }  /* links like Back stay their own size */
html.sf-read main#view > * { max-width: 760px; }
html.sf-acct:root { --ring-deep: var(--sf-line-s); }  /* row arrows and inactive progress, visible on the page */
html.sf .dlg-body .field { margin: 0; }
html.sf .dlg .form-error { margin: 0 20px; }
html.sf-acct :is(.dtable, .row-meta, .stock-qty) { font-variant-numeric: tabular-nums; }  /* money columns line up */
html.sf-acct h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
html.sf-acct h2 { font-weight: 600; letter-spacing: -0.01em; }
html.sf-acct .doc-head h1 { font-size: 24px; font-weight: 600; letter-spacing: 0; }
html.sf-acct .page-head { margin: 32px 0 20px; }
html.sf-acct .back { font-size: 14px; min-height: 36px; margin-top: 20px; color: var(--sf-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--sf-line-s); }
html.sf-acct .back:hover { text-decoration-color: currentColor; }
html.sf-acct .crumb a { text-decoration: none; }
html.sf-acct .btn { font-weight: 600; }
html.sf-acct .row-title { font-weight: 600; }
html.sf-acct .row-meta { font-size: 14px; }
html.sf-acct :is(.st, .pill, .tag-unpaid, .tag-paid, .tag-late) { border-radius: 4px; font-size: 12px; font-weight: 500; }
html.sf-acct .card { border-radius: 6px; }
html.sf-acct .eyebrow { font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--sf-ink); }
html.sf-acct .mine-docs a { font-size: 14px; color: var(--sf-body2); }
html.sf-acct .mine-docs a:hover { color: var(--sf-ink); }
/* The app's progress dots and document flow are the back end's; the status word says it here */
html.sf-acct .row .progress, html.sf-acct .flow { display: none; }
/* The app shows desktop-only and phone-only controls by its sidebar layout, which customers never get */
@media (min-width: 760px) {
  html.sf-acct .desk-only { display: inline-flex; }
  html.sf-acct .phone-only { display: none; }
}
@media (max-width: 759px) {
  html.sf-acct main#view { padding-bottom: 48px; }
  html.sf-acct h1 { font-size: 26px; }
}
