/* Page layout on top of the ReproStore components. Values come from tokens.css. */
html { scroll-padding-top: var(--space-5); }
body { margin: 0; background: var(--surface); }
h1, h2, h3, p, figure { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.skip-link { position: absolute; left: var(--space-4); top: -100px; z-index: 10; padding: var(--space-2) var(--space-4); background: var(--surface); color: var(--ink); border-radius: var(--radius-sm); font-weight: 600; }
.skip-link:focus { top: var(--space-4); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.muted { color: var(--ink-muted); }
.nowrap { white-space: nowrap; }
.muted-inverse { color: var(--ink-inverse-muted); }
.eyebrow { text-transform: uppercase; }

/* Navigation */
.site-header { position: relative; z-index: 5; }
.site-home { display: flex; align-items: center; flex: none; }
.rs-nav .rs-btn { white-space: nowrap; }
/* The logo file has built-in padding, so the header uses it larger than the 32px default. */
.site-home .rs-logo { height: 48px; }
.site-home:focus-visible { outline-offset: 6px; border-radius: 2px; }
.rs-nav__links li { display: flex; }
.rs-nav__link { white-space: nowrap; }
.site-menu__phone { display: none !important; }
.site-menu-toggle { display: none; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); background: none; color: var(--ink); font: 600 14px/20px var(--font-sans); cursor: pointer; }
.site-menu-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Hero: align text to the page container */
.rs-hero { padding-left: 0; padding-right: 0; }
.rs-hero .rs-container { position: relative; }
.rs-hero .eyebrow { color: var(--ink-inverse-muted); }
.rs-hero--page { padding: var(--space-8) 0; }

/* Sections */
.section-title { margin-bottom: var(--space-7); }
.section-head { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-7); }
.section-head--split { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-5); }
.section-foot { display: flex; justify-content: center; margin-top: var(--space-7); }

.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card-badge, .card-action { align-self: flex-start; }
.service-card { align-items: center; text-align: center; }
.service-card .card-action { align-self: center; margin-top: auto; }
.service-card__tags { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); width: 100%; max-width: 220px; margin: 0 0 var(--space-2); padding: 0; list-style: none; }
.service-card__tags .rs-badge { justify-content: center; }

.statement__row { display: grid; grid-template-columns: 7fr 5fr; gap: var(--space-7); align-items: center; }
.statement__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.statement .rs-callout, .statement__row .rs-callout { justify-self: end; }

.cta { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; }
.cta > div:first-child { display: flex; flex-direction: column; gap: var(--space-2); max-width: 560px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* Location with map */
.location { display: grid; grid-template-columns: 5fr 7fr; gap: var(--space-7); align-items: center; }
.location__map { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-alt); aspect-ratio: 8 / 5; }
.location__map a, .location__map img, .location__map iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: cover; }

/* Send files form */
.order-form { display: flex; flex-direction: column; gap: var(--space-7); }
.form-group { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; margin: 0; padding: 0; border: 0; }
.form-group > legend { padding: 0; margin-bottom: var(--space-4); }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: start; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.form-row--csz { grid-template-columns: 2fr 1fr 1fr; }
.form-note { margin-top: calc(var(--space-7) * -1 + var(--space-4)); }
.optional { color: var(--ink-muted); font-weight: 400; }
.ink { color: var(--ink); font-weight: 600; }
.rs-field .rs-input { width: 100%; box-sizing: border-box; }
.choices { margin: 0; padding: 0; border: 0; }
.choices > legend { padding: 0; margin-bottom: var(--space-2); }
.choices__row { display: flex; gap: var(--space-5); }
.choice { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; font-size: 16px; line-height: 24px; color: var(--ink); cursor: pointer; }
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand-strong); }
.choice input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); padding-top: var(--space-6); border-top: 1px solid var(--border); }
.form-alert { padding: var(--space-4) var(--space-5); border: 2px solid var(--danger); border-radius: var(--radius-md); color: var(--danger); }
.form-alert:focus { outline: 2px solid var(--focus); outline-offset: 3px; }
.form-alert ul { margin: var(--space-2) 0 0; padding-left: var(--space-5); }
.form-alert a { color: var(--danger); }
.forget { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-5); }
.forget__button { padding: 0; border: 0; background: none; cursor: pointer; }
.file-actions { display: flex; justify-content: flex-end; gap: var(--space-4); white-space: nowrap; }
.download { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-5); max-width: 640px; }
.download__files { gap: var(--space-2); }
.download__files > li::before { top: 8px; }
.zip-contents { margin: var(--space-1) 0 0; padding: 0; list-style: none; color: var(--ink-muted); }
.zip-contents li { word-break: break-all; }
.download__form { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); width: 100%; max-width: 360px; }
.sent { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-5); max-width: 720px; }
.sent__summary { width: 100%; }
.sent .rs-link { display: inline; font-size: inherit; }

.file-help { display: flex; flex-direction: column; gap: var(--space-3); color: var(--ink-muted); }
.file-help strong { color: var(--ink); font-weight: 600; }
.file-types { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin: 0; }
.file-types__row { display: flex; align-items: baseline; gap: var(--space-2); }
.file-types dt { color: var(--ink); }
.file-types dd { margin: 0; color: var(--ink-muted); }

/* Planroom */
.site-nav__cart, .site-nav__account { white-space: nowrap; }
.site-nav__divider { align-self: center; width: 1px; height: 28px; background: var(--border); }
.site-signout { display: flex; margin: 0; }
.admin-row-actions { white-space: nowrap; width: 1%; }
/* Small buttons for actions in a table row: the row keeps its height, and gaps are even. */
.row-actions { display: flex; justify-content: flex-end; gap: var(--space-2); }
.row-actions form { display: contents; }
.table-btn { box-sizing: border-box; display: inline-flex; align-items: center; height: 28px; padding: 0 var(--space-3); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: transparent; color: var(--ink); font-family: inherit; font-size: 13px; line-height: 1;
  font-weight: 600; text-decoration: none; cursor: pointer; transition: border-color 150ms, background-color 150ms; }
.table-btn:hover { border-color: var(--ink); background: var(--surface-alt); }
.table-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* On a phone the projects table is wider than the screen: it scrolls on its own, not the whole page.
   position: relative keeps the table's visually-hidden labels (absolutely positioned) inside the scroll box. */
.admin-list { overflow-x: auto; min-width: 0; max-width: 100%; position: relative; }
.site-signout button { padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; text-align: left; }
.cart-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 2px; border-radius: var(--radius-pill); background: var(--brand-strong); color: var(--on-brand); font-size: 12px; font-weight: 600; line-height: 1; }
.pre-line { white-space: pre-line; }
.empty-state { padding: var(--space-6) 0; }
.danger { color: var(--danger) !important; }
.rs-link.inline { display: inline; font-size: inherit; }

.project-filters { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: var(--space-4); align-items: end; margin-bottom: var(--space-7); }
.project-rows { display: flex; flex-direction: column; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.project-row { flex-direction: row; align-items: center; gap: var(--space-5); }
.project-row__main { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); flex: 1; }
.project-row__bid { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.project-row .rs-card__foot { margin: 0; padding: 0; }
.private-link { margin-top: var(--space-7); }

.project-hero__badges { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.project-hero__price { margin: 0; color: var(--ink-inverse-muted); }
.rs-hero__inner.project-hero { max-width: 720px; }
.project-tabs { border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 4; }
.project-tabs ul { display: flex; gap: var(--space-5); margin: 0; padding: 0; list-style: none; overflow-x: auto; }
.project-tabs a { display: flex; align-items: center; gap: 6px; min-height: 56px; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; box-shadow: inset 0 -3px 0 transparent; }
.project-tabs a:hover { color: var(--link); }
.project-tabs a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--brand); }
.project-tabs__count { padding: 0 6px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--ink-muted); font-size: 12px; font-weight: 600; }
.project-body { padding-top: var(--space-7); }
.project-details { display: flex; flex-direction: column; gap: var(--space-6); max-width: 840px; }
.project-details .modes__row { grid-template-columns: 200px 1fr; }
.project-details .contact { display: block; }

.doc-section { margin-bottom: var(--space-6); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-card); }
.doc-section summary { display: flex; align-items: baseline; gap: var(--space-4); padding: var(--space-4) var(--space-5); cursor: pointer; list-style: none; }
.doc-section summary::-webkit-details-marker { display: none; }
.doc-section summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); transition: transform 150ms ease-out; flex: none; align-self: center; }
.doc-section[open] summary::before { transform: rotate(45deg); }
.doc-section summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.doc-section__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); padding: 0 var(--space-5) var(--space-4); }
.doc-section .data-table { border-top: 1px solid var(--border); }
.doc-section__select { font-size: 14px; }
.doc-section__downloads { color: var(--ink-muted); }
.download-bar { position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4);
  margin-top: var(--space-5); padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); box-shadow: 0 -4px 16px rgb(0 0 0 / 0.08); }
.download-bar__count { flex: 1; }
.download-bar__buttons { display: flex; gap: var(--space-2); }
.download-bar__note { flex-basis: 100%; margin: 0; }
.order-toggle { display: inline; margin: 0; }

.data-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
/* Wide tables scroll on their own on a phone instead of widening the page. position: relative keeps
   their visually-hidden labels (absolutely positioned) inside the scroll box too. */
.table-scroll { overflow-x: auto; max-width: 100%; position: relative; }
.data-table th { padding: var(--space-3) var(--space-4); text-align: left; color: var(--ink-muted); font-weight: 600; border-bottom: 1px solid var(--border); }
.data-table td { padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--surface-alt); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .num { text-align: right; white-space: nowrap; }
.data-table tfoot th, .data-table tfoot td { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); border-bottom: 0; color: var(--ink); }
.doc-table__order { width: 1%; white-space: nowrap; text-align: right; }
.doc-name { padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.doc-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.doc-name--plain { color: var(--ink); font-weight: 400; cursor: default; }

.viewer { position: fixed; inset: 0; margin: auto; width: min(1400px, 96vw); height: 94vh; max-height: 94vh; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-raised); overflow: hidden; }
.viewer::backdrop { background: rgba(21, 21, 21, 0.75); }
.viewer[open] { display: flex; flex-direction: column; }
.viewer__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); }
.viewer__title { flex: 1 1 200px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer__controls { display: flex; align-items: center; gap: var(--space-1); }
.viewer__count { min-width: 56px; text-align: center; font-family: var(--font-mono); color: var(--ink-muted); }
.viewer__icon { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink); cursor: pointer; }
.viewer__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.viewer__icon:hover:not(:disabled) { border-color: var(--ink); }
.viewer__icon:disabled { opacity: 0.4; cursor: default; }
.viewer__icon:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.viewer__stage { position: relative; flex: 1; overflow: auto; padding: 16px; background: var(--surface-alt); text-align: center; user-select: none; -webkit-user-select: none; }
.viewer__stage:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.viewer__stage:not(.is-zoomed) { cursor: crosshair; touch-action: pinch-zoom; } /* one finger draws the zoom box */
.viewer__stage.is-zoomed { cursor: grab; }
.viewer__stage.is-drawing { cursor: crosshair; }
.viewer__marquee { position: absolute; box-sizing: border-box; border: 2px solid var(--focus); background: color-mix(in srgb, var(--focus) 15%, transparent); pointer-events: none; }
.viewer__marquee[hidden] { display: none; }
.viewer__hint { margin: 0; }
@media (max-width: 900px) { .viewer__hint { display: none; } }
.viewer__stage.is-dragging { cursor: grabbing; }
.viewer__page { display: block; margin: 0 auto; max-width: none; background: #fff; box-shadow: var(--shadow-card); -webkit-user-drag: none; pointer-events: none; }
.viewer__status { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--ink-muted); pointer-events: none; }
.viewer__status:empty { display: none; }
.viewer__note { margin: 0; padding: var(--space-2) var(--space-4); border-top: 1px solid var(--border); color: var(--ink-muted); }

.narrow-form { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-5); max-width: 480px; }
.narrow-form--wide { max-width: 720px; }
.narrow-form__form { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); width: 100%; }
.narrow-form__form .rs-field, .narrow-form__form .form-row { width: 100%; }
.cart { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-5); }
.cart__summary { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.checkout__title { margin-bottom: var(--space-5); }
.checkout__items { margin: 0 0 var(--space-7); }
.checkout__note { margin-top: 0; }

.admin { display: flex; flex-direction: column; gap: var(--space-5); }
.admin-form { margin-bottom: var(--space-6); }
.admin-subhead { margin-top: var(--space-5); }
.admin-docs-title { margin-top: var(--space-6); }
.doc-totals { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3) var(--space-7); padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-alt); }
.doc-totals__stat { display: flex; flex-direction: column; gap: var(--space-1); }
.doc-totals__stat strong { font-size: 24px; line-height: 32px; font-weight: 600; }
.doc-totals__tabs { flex-basis: 100%; margin: 0; }
.sheet-size { white-space: nowrap; }
.admin-section { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.admin-section__form { display: flex; flex-direction: column; gap: var(--space-4); }
.admin-section__head { display: flex; align-items: flex-end; gap: var(--space-4); }
.admin-section__head > .rs-field { flex: 1; max-width: 560px; }
.admin-section__head--add > .rs-field:first-child { flex: 0 0 160px; }
.admin-section__head--add > .rs-field { flex: 1 1 260px; }
[data-preset-custom][hidden] { display: none; }
.admin-section__move { display: flex; align-items: center; gap: var(--space-2); padding-bottom: 4px; }
.admin-sections { display: flex; flex-direction: column; gap: var(--space-5); }
.drag-handle { display: grid; place-items: center; width: 24px; height: 36px; color: var(--ink-muted); cursor: grab; touch-action: none; }
.drag-handle:hover { color: var(--ink); }
.drag-handle svg { width: 18px; height: 18px; fill: currentColor; }
[data-sort-item].is-dragging { opacity: 0.4; }
.order-col { width: 1%; white-space: nowrap; padding-right: 0 !important; }
.row-move { display: flex; align-items: center; gap: var(--space-1); }
.row-move .drag-handle { height: 28px; }
.viewer__icon--sm { width: 28px; height: 28px; }
.viewer__icon--sm svg { width: 14px; height: 14px; }
.admin-order-status:empty { display: none; }
.admin-order-status.is-error { color: var(--danger); font-weight: 600; }
.admin-price { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4); }
.admin-price__mode { width: 220px; }
.admin-price__check, .admin-price__save { min-height: 44px; }
.admin-price__save { margin-left: auto; }
.input-unit { align-self: flex-start; display: flex; align-items: center; height: 44px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.input-unit:focus-within { outline: 2px solid var(--focus); border-color: var(--focus); }
.input-unit .rs-input { width: 96px; height: 42px; border: 0; text-align: right; padding: 0 var(--space-2); }
.input-unit .rs-input:focus { outline: none; }
.input-unit__affix { padding: 0 var(--space-3); color: var(--ink-muted); font-size: 14px; white-space: nowrap; }
.input-unit__affix:first-child { padding-right: 0; }
[data-price-amount][hidden] { display: none; }
.admin-add-section { background: var(--surface-alt); }
.admin-upload { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.admin-upload .filepond--root { width: 100%; }
/* Above the file list, so the next step stays in view however many files there are. */
.admin-standard-order { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-top: 0; }
.admin-upload__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.admin-upload__status { margin: 0; color: var(--ink-muted); }
.admin-upload__status.is-done { color: var(--ink); font-weight: 600; }
.admin-upload__status.is-error { color: var(--danger); font-weight: 600; }
.admin-search { max-width: 420px; margin-top: var(--space-5); }
.admin-tabs { position: static; margin-top: var(--space-5); background: none; }
.admin-list { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-5); }
.admin-list h2 { margin: 0; }
.form-actions__end { margin-left: auto; }
.check-col { width: 1%; padding-right: 0 !important; }
.row-check { width: 18px; height: 18px; margin: 0; accent-color: var(--brand-strong); vertical-align: middle; }
.row-check:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bulk-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: var(--space-2); }
.bulk-actions__move select { min-width: 220px; }
.bulk-actions__move, .bulk-actions__move .rs-input { min-width: 0; max-width: 100%; }  /* Section names can be long. */
.rs-input--compact { height: 36px; min-width: 260px; }

.admin-plan-set { background: var(--surface-alt); }
.admin-pending { margin: 0 0 var(--space-6); max-width: none; }
.plan-set__progress { display: flex; flex-direction: column; gap: var(--space-2); }
.plan-set__progress p { margin: 0; }
.plan-set__progress progress { width: 100%; height: 12px; appearance: none; border: 0; border-radius: var(--radius-pill); background: var(--surface-alt); overflow: hidden; }
.plan-set__progress progress::-webkit-progress-bar { background: var(--surface-alt); border-radius: var(--radius-pill); }
.plan-set__progress progress::-webkit-progress-value { background: var(--brand); border-radius: var(--radius-pill); transition: width 300ms ease-out; }
.plan-set__progress progress::-moz-progress-bar { background: var(--brand); border-radius: var(--radius-pill); }
.plan-set__page.is-working { border-color: var(--brand); }
.plan-set__page.is-working [data-stage] { color: var(--ink); font-weight: 600; }
.plan-set__pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--space-5); margin: 0 0 var(--space-6); padding: 0; list-style: none; }
.plan-set__page { display: grid; grid-template-columns: 140px 1fr; gap: var(--space-4); padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.plan-set__page.is-unknown { border: 2px solid var(--warning); }
.plan-set__thumb { display: grid; place-items: center; min-height: 100px; background: var(--surface-alt); border-radius: var(--radius-sm); overflow: hidden; }
.plan-set__thumb img { width: 100%; height: auto; display: block; }
.plan-set__thumb-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.plan-set__thumb-btn:hover img { outline: 2px solid var(--border-strong); }
.plan-set__thumb-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.plan-set__fields { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.plan-set__fields p { margin: 0; }
.plan-set__source { overflow-wrap: anywhere; }
.plan-set__saved { min-height: 16px; color: var(--success); }
.plan-set__saved:empty { display: none; }
.plan-set__saved.is-error { color: var(--danger); font-weight: 600; }
.plan-set__source--rules::before { content: "✓ "; color: var(--success); }
.plan-set__source--vision::before { content: "◐ "; color: var(--ink-muted); }
.plan-set__source--unknown::before { content: "! "; color: var(--warning); font-weight: 600; }

/* FilePond, themed with the design tokens */
.filepond--root { margin-bottom: 0; font-family: var(--font-sans); }
.filepond--panel-root { background: var(--surface-alt); border: 1px dashed var(--border-strong); border-radius: var(--radius-md); }
.filepond--root[aria-invalid="true"] .filepond--panel-root, #files:has([aria-invalid="true"]) .filepond--panel-root { border: 2px solid var(--danger); }
.filepond--drop-label { min-height: 120px; color: var(--ink-muted); font-size: 16px; }
.filepond--label-action { color: var(--link); text-decoration-color: var(--link); font-weight: 600; }
.filepond--item-panel { background: var(--ink); border-radius: var(--radius-sm); }
.filepond--file { color: var(--surface); }
[data-filepond-item-state="processing-complete"] .filepond--item-panel { background: var(--success); }
[data-filepond-item-state*="error"] .filepond--item-panel, [data-filepond-item-state*="invalid"] .filepond--item-panel { background: var(--danger); }
.filepond--file-action-button:focus-visible { box-shadow: 0 0 0 2px var(--focus); }

/* Services page */
.service-list { display: flex; flex-direction: column; }
.service { display: grid; grid-template-columns: 48px 1fr; gap: var(--space-5); padding: var(--space-7) 0; border-top: 1px solid var(--border); }
.service:first-child { border-top: 0; padding-top: 0; }
.rs-section--alt .service { border-top-color: var(--border-strong); }
.service:last-child { padding-bottom: 0; }
.service__text { display: flex; flex-direction: column; gap: var(--space-3); max-width: 720px; }
.service__text .checklist { gap: var(--space-2); margin: var(--space-2) 0; }
.service__text .checklist li::before { top: 8px; }
.finish { gap: var(--space-3); }
.mounting-head { align-items: flex-start; max-width: 720px; }
.finish .checklist { gap: var(--space-2); }
.finish .checklist li::before { top: 8px; }
.modes { margin: var(--space-2) 0; border-top: 1px solid var(--border); }
.modes__row { display: grid; grid-template-columns: 120px 1fr; gap: var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.modes dt, .modes dd { margin: 0; }
.sizes { display: flex; flex-direction: column; gap: var(--space-3); margin: var(--space-2) 0; }
.sizes__tables { display: flex; flex-wrap: wrap; gap: var(--space-6); align-items: flex-start; }
.size-table { border-collapse: separate; border-spacing: 0; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.size-table caption { text-align: left; padding-bottom: var(--space-2); }
.size-table th, .size-table td { padding: var(--space-2) var(--space-4); text-align: left; border-bottom: 1px solid var(--border); }
.size-table thead th { color: var(--ink-muted); font-weight: 600; background: var(--surface-alt); }
.size-table tbody tr:last-child th, .size-table tbody tr:last-child td { border-bottom: 0; }
.size-table td { white-space: nowrap; }
.spec-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-1); }

.tip { display: flex; flex-direction: column; gap: var(--space-2); max-width: 720px; margin-top: var(--space-7); padding: var(--space-5); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: var(--radius-md); }

/* About and contact */
.value { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-4); border-top: 1px solid var(--border-strong); }
.checklist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-3); max-width: 720px; }
.checklist li { position: relative; padding-left: var(--space-5); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.not-found { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-5); padding: var(--space-8) var(--space-6); }

/* Footer: the inner container supplies the side gutters */
.site-footer__brand { display: flex; align-items: center; height: 20px; }
.site-footer__brand img { height: 32px; width: auto; margin-left: -4px; }
.site-footer .rs-footer__cols { padding-top: 0; }
.rs-footer { padding-left: 0; padding-right: 0; }

@media (max-width: 1024px) {
  .rs-nav { gap: var(--space-5); }
  .site-nav__phone { display: none; }
}

@media (max-width: 960px) {
  .rs-nav { gap: var(--space-4); padding: 0 var(--space-5); }
  .rs-nav__links { gap: var(--space-4); }
  .rs-nav__end { gap: var(--space-3); }
}

@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .statement__row { grid-template-columns: 1fr; }
  .statement__row .rs-callout { justify-self: start; }
  .location { grid-template-columns: 1fr; }
  .project-filters { grid-template-columns: 1fr 1fr; }
  .project-filters__search { grid-column: 1 / -1; }
  .form-columns { grid-template-columns: 1fr; }
  .rs-footer__cols { grid-template-columns: repeat(2, 1fr); }
}

/* The header collapses into the menu button earlier than the page layout: it needs the room. */
@media (max-width: 860px) {
  .rs-nav { padding: 0 var(--space-4); gap: var(--space-4); }
  .site-home .rs-logo { height: 40px; }
  .site-menu-toggle { display: inline-flex; }
  .rs-nav__end { gap: var(--space-3); }
  .rs-nav__links { display: none; position: absolute; top: 72px; left: 0; right: 0; height: auto; flex-direction: column; gap: 0; padding: var(--space-2) 0; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-raised); }
  .rs-nav__links.is-open { display: flex; }
  .rs-nav__links .rs-nav__link { min-height: 48px; padding: 0 var(--space-4); }
  .rs-nav__links .rs-nav__link[aria-current="page"] { box-shadow: inset 3px 0 0 var(--brand); }
  .site-menu__phone { display: flex !important; }
  .site-nav__account, .site-nav__cart, .site-nav__divider { display: none; }
}

@media (max-width: 767px) {
  .rs-container { padding: 0 var(--space-4); }

  .rs-hero { padding: var(--space-8) 0; }
  .rs-hero__chevron { right: -120px; opacity: 0.6; }
  .display-xl { font-size: 40px; line-height: 46px; }
  .display-lg { font-size: 36px; line-height: 42px; }
  .heading-xl { font-size: 28px; line-height: 36px; }

  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .section-head--split { flex-direction: column; align-items: flex-start; }

  .form-row, .form-row--csz { grid-template-columns: 1fr; }
  .file-types { flex-direction: column; }
  .project-filters { grid-template-columns: 1fr; }
  .project-row { flex-direction: column; align-items: flex-start; }
  .project-row__bid { align-items: flex-start; text-align: left; }
  .project-details .modes__row { grid-template-columns: 1fr; }
  .admin-section__head { flex-wrap: wrap; }
  .admin-price__save { margin-left: 0; }
  .service { grid-template-columns: 1fr; gap: var(--space-4); }
  .modes__row { grid-template-columns: 1fr; gap: var(--space-1); }

  .rs-footer__cols { grid-template-columns: 1fr; }
  .rs-footer__bottom { flex-direction: column; }
  .not-found { padding: var(--space-6) 0; }
}

@media (max-width: 479px) {
  .site-menu-toggle { width: 44px; padding: 0; justify-content: center; }
  .site-menu-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (max-width: 359px) {
  .rs-nav { padding: 0 var(--space-3); gap: var(--space-2); }
  .rs-nav__end { gap: var(--space-2); }
  .site-home .rs-logo { height: 28px; }
  .rs-nav .rs-btn--sm { padding: 0 var(--space-3); }
}

@media (prefers-reduced-motion: reduce) {
  .rs-arrow { transition: none; }
  .rs-btn:hover .rs-arrow, .rs-link:hover .rs-arrow, .rs-card:hover .rs-arrow { transform: none; }
}
