:root {
  color-scheme: light;
  --paper: #f4f0e8;
  --card: #fffdf8;
  --ink: #2b2520;
  --muted: #665c50;
  --line: #e1d8cb;
  --control: #9c8b75;
  --soft: #f3e9d8;
  --soft-hover: #f9f4eb;
  --charcoal: #211e1b;
  --deep: #181614;
  --on-dark: #fff6e8;
  --muted-dark: #d3c6b4;
  --dark-line: #e4c48445;
  --gold: #e4c484;
  --gold-hover: #d8af64;
  --bronze: #805622;
  --red: #b7372d;
  --error: #9c352c;
  --sans: 'Trebuchet MS', 'Segoe UI', sans-serif;
  --serif: Georgia, serif;
  --code: 'Courier New', monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.5 var(--sans); }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
h1, h2, h3, p, dl, dd { margin: 0; }
.wrap { width: min(1170px, calc(100% - 64px)); margin-inline: auto; }
.eyebrow { display: inline-flex; gap: .6rem; align-items: center; font: 700 .74rem/1.35 var(--code); letter-spacing: .13em; }
.signal { width: .48rem; height: .48rem; flex: none; border-radius: 50%; background: var(--gold); }

.masthead { overflow: hidden; border-top: 3px solid var(--red); background: radial-gradient(ellipse at 80% 55%, #332a21, transparent 65%), var(--charcoal); color: var(--on-dark); }
.masthead :focus-visible { outline-color: var(--gold); }
.topbar { min-height: 79px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--dark-line); }
.brand { display: inline-flex; gap: .65rem; align-items: center; text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -.05em; }
.brand-mark { width: 2.75rem; height: 2.75rem; }
.brand-spa { color: var(--gold); }
.brand small { margin-left: .7rem; font: 700 .65rem var(--code); letter-spacing: .15em; color: var(--muted-dark); }
.top-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.top-link { display: flex; gap: .75rem; align-items: center; text-decoration: none; font-size: .85rem; padding: .55rem .8rem; border: 1px solid var(--dark-line); border-radius: 8px; }
.top-link:hover { border-color: var(--gold); }
.top-link span { color: var(--gold); }
.studio-trigger { display: inline-flex; align-items: center; justify-content: center; gap: .38rem; min-width: 36px; min-height: 36px; padding: .35rem .55rem; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted-dark); font-size: .8rem; }
.studio-trigger:hover { border-color: var(--dark-line); color: var(--gold); }
.studio-trigger svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.detailer-trigger svg { stroke-linejoin: round; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .64fr); align-items: center; gap: clamp(16px, 5vw, 72px); padding: 30px 0 36px; }
.hero-copy .eyebrow { color: var(--muted-dark); }
h1 { font: 400 clamp(2.8rem, 5.7vw, 4.85rem)/.99 var(--serif); letter-spacing: -.068em; margin: .45rem 0 1.1rem; }
h1 em { font-weight: 400; color: var(--gold); }
.hero p { max-width: 31rem; color: var(--muted-dark); font-size: clamp(.92rem, 1.6vw, 1.05rem); }
.hero-logo { display: block; justify-self: end; width: min(100%, 310px); height: auto; border: 1px solid var(--dark-line); border-radius: 10px; box-shadow: 0 12px 28px #18161470; }

.workspace { padding-block: 26px 52px; }
.workspace-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 14px; color: var(--muted); }
.mobile-quote { display: none; }
.text-button { color: var(--ink); padding: .35rem 0; font-size: .82rem; background: none; border: 0; text-decoration: underline; text-underline-offset: .22em; }
.text-button:hover { color: var(--error); }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.78fr) minmax(0, 1fr); align-items: start; gap: 22px; }
.quote-form { display: grid; gap: 16px; min-width: 0; }
.panel { min-width: 0; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 15px; }
.section-heading { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 19px; }
.step { display: grid; place-items: center; flex: none; width: 2.45rem; height: 2.45rem; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); color: var(--bronze); font: 700 .83rem var(--code); }
.section-heading h2 { margin-top: -.12rem; font: 400 clamp(1.45rem, 2.7vw, 1.79rem)/1.1 var(--serif); letter-spacing: -.03em; }
.section-heading p { margin-top: .25rem; font-size: .89rem; color: var(--muted); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset + fieldset, fieldset + .fields { margin-top: 17px; }
legend { padding: 0; margin-bottom: .48rem; font-size: .88rem; font-weight: 700; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fields .full { grid-column: 1 / -1; }
.fields label, .price-fields label { min-width: 0; color: var(--ink); font-size: .88rem; font-weight: 700; }
label small, .field-note { color: var(--muted); font-size: .76rem; font-weight: 400; }
.field-note { display: block; margin-top: .35rem; }
input:not([type=radio],[type=checkbox]), select, textarea { display: block; width: 100%; min-width: 0; margin-top: .3rem; border: 1px solid var(--control); border-radius: 8px; background-color: var(--card); color: var(--ink); padding: .65rem .72rem; font-size: .92rem; font-weight: 400; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[aria-invalid=true] { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
select:disabled { color: var(--muted); background: var(--soft); }
textarea { resize: vertical; }
input[type=radio], input[type=checkbox] { accent-color: var(--bronze); }

.vehicle-model { position: relative; min-width: 0; }
.vehicle-suggestions { position: absolute; z-index: 1; inset-inline: 0; top: calc(100% + .36rem); max-height: min(17rem, 40vh); overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: .2rem; list-style: none; background: var(--card); border: 1px solid var(--control); border-radius: 8px; box-shadow: 0 8px 20px #211e1b20; }
.vehicle-suggestions li { display: flex; align-items: center; min-height: 42px; padding: .45rem .6rem; border-radius: 5px; font-size: .9rem; overflow-wrap: anywhere; cursor: pointer; }
.vehicle-suggestions li:hover, .vehicle-suggestions li[aria-selected=true] { background: var(--soft); }
.vehicle-size { margin: 0; padding: .55rem .72rem; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: .84rem; }
.vehicle-size[data-resolved] { background: var(--soft); border-color: var(--bronze); color: var(--ink); font-weight: 700; }
.package-option { gap: .55rem; align-items: center; padding: .65rem .72rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; }
.package-option:hover { border-color: var(--control); }
.package-option:has(:checked) { background: var(--soft); border-color: var(--bronze); }
.package-option input, .service-choice input { flex: none; margin: 0; width: 1rem; height: 1rem; }
.package-label { font-size: .9rem; line-height: 1.26; font-weight: 700; overflow-wrap: anywhere; }
.package-label small { display: block; margin-top: .2rem; }
.package-options { display: grid; gap: .4rem; }
.package-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
.paint-panel { scroll-margin-top: 55px; border-top: 2px solid var(--gold); }
.paint-note { margin-top: .85rem; }
.amount { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .86rem; }

details > summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font: 700 1.25rem/1 var(--code); margin-left: auto; }
details[open] > summary::after { content: '−'; }
.service-group { border: 1px solid var(--line); border-radius: 9px; overflow: clip; }
.service-group + .service-group { margin-top: 7px; }
.service-group > summary, .time-panel > summary, .catalog > summary { display: flex; gap: .7rem; align-items: center; font-weight: 700; }
.service-group > summary { padding: .65rem .75rem; background: var(--soft-hover); }
.service-group > summary:focus-visible { outline-offset: -3px; }
.group-count { color: var(--muted); font-size: .75rem; font-weight: 400; text-align: right; }
.service-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem .6rem; align-items: center; padding: .53rem .75rem; border-top: 1px solid var(--line); }
.service-item:hover { background: var(--soft-hover); }
.service-choice { display: flex; align-items: center; gap: .6rem; min-width: 0; min-height: 1.8rem; cursor: pointer; font-size: .87rem; }
.service-choice small { display: block; }
.service-item.included .service-choice { cursor: default; }
.service-item.included { background: var(--soft); }
.service-item .amount { text-align: right; }
.service-unit { display: block; color: var(--muted); font-size: .68rem; font-weight: 400; }
.included-tag { color: var(--bronze); font-size: .72rem; }
.quantity { grid-column: 1 / -1; display: flex; gap: .5rem; align-items: center; margin-left: 1.6rem; font-size: .76rem; color: var(--muted); }
.quantity select { width: auto; display: inline; padding: .15rem .35rem; margin: 0; }
.time-panel[open] summary { margin-bottom: .25rem; }
.time-panel .fields { margin-top: .8rem; }
.labor-data { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .85rem; }
.labor-data div { border-left: 2px solid var(--gold-hover); padding-left: .55rem; }
.labor-data dt { color: var(--muted); font-size: .76rem; }
.labor-data dd { font-weight: 700; }
#adjustments, .time-panel { scroll-margin-top: 55px; }

.quote-panel { position: sticky; top: 18px; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--card); box-shadow: 0 10px 37px #211e1b16; }
.quote-top { padding: 21px 21px 18px; background: var(--charcoal); color: var(--on-dark); }
.quote-topline { display: flex; justify-content: space-between; align-items: center; gap: .4rem; margin-bottom: .6rem; }
.quote-topline .eyebrow { color: var(--muted-dark); }
.quote-badge { color: var(--gold); background: #e4c48413; border: 1px solid var(--dark-line); border-radius: 30px; padding: .14rem .48rem; font-size: .7rem; white-space: nowrap; }
.quote-top h2 { font-size: .96rem; font-weight: 400; color: var(--on-dark); }
#total { display: block; font: 400 clamp(2.2rem, 4.6vw, 3.65rem)/1.1 var(--serif); letter-spacing: -.055em; margin: .2rem 0 .35rem; color: var(--gold); overflow-wrap: anywhere; }
#price-note { color: var(--muted-dark); font-size: .82rem; }
.quote-body { padding: 1.05rem 1.25rem 1.25rem; }
.quote-vehicle { color: var(--muted); font-size: .79rem; margin-bottom: .45rem; overflow-wrap: anywhere; }
.quote-lines { max-height: 35vh; max-height: 35dvh; overflow: auto; }
.quote-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: start; padding: .56rem 0; border-bottom: 1px solid var(--line); font-size: .87rem; overflow-wrap: anywhere; }
.quote-line strong { font-size: .84rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.quote-line small { display: block; margin-top: .15rem; color: var(--muted); line-height: 1.3; }
.quote-empty, .quote-notes { padding: .68rem .7rem; border-radius: 8px; background: var(--soft); color: var(--muted); font-size: .82rem; }
.quote-notes { margin-top: .65rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.quote-error { margin-top: .55rem; color: var(--error); font-size: .82rem; }
.quote-actions { display: grid; gap: .5rem; margin-top: .85rem; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .55rem; min-height: 42px; border: 1px solid transparent; border-radius: 8px; padding: .53rem .7rem; font-size: .86rem; font-weight: 700; text-align: center; transition: background-color .18s ease; }
.button svg { height: 18px; width: 18px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.button-primary { background: var(--gold); color: var(--deep); }
.button-primary:not(:disabled):hover { background: var(--gold-hover); }
.button-secondary { background: var(--card); color: var(--ink); border-color: var(--control); }
.button-secondary:not(:disabled):hover { background: var(--soft); }
.button:disabled { opacity: .58; }
.status { margin-top: .55rem; color: var(--bronze); font-size: .81rem; }

.catalog { margin-top: 17px; scroll-margin-top: 14px; }
.catalog > summary { font: 400 1.45rem/1.2 var(--serif); }
.catalog summary small, .time-panel summary small { color: var(--muted); font: 400 .76rem var(--sans); }
.catalog-body { margin-top: .85rem; }
.catalog-body > p, .sources p { color: var(--muted); font-size: .89rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; margin-top: .9rem; }
caption { text-align: left; padding: .2rem 0; font-size: 1rem; font-weight: 700; }
th, td { padding: .42rem .55rem; text-align: left; border-bottom: 1px solid var(--line); }
thead th { background: var(--soft); }
tbody th { font-weight: 400; }
td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.service-catalogs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: .85rem; }
.pin-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .65rem; }
.pin-form label { width: 10rem; font-size: .88rem; font-weight: 700; }
.editor-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; margin: .85rem 0; }
.editor-heading h3 { font-size: 1rem; }
#open-adjustments, #open-team-time { text-decoration: none; }
.editor-section { margin-top: .65rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 8px; }
.editor-section > summary { display: flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 700; }
.price-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin-top: .7rem; }
.price-fields fieldset, .editor-actions { margin-top: .55rem; }
.price-fields legend { overflow-wrap: anywhere; }
.price-fields label { display: block; margin-bottom: .35rem; }
.editor-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.sources { margin-top: 1.4rem; padding: .9rem; border-radius: 8px; background: var(--soft); }
.sources h3 { font-size: 1rem; margin-bottom: .24rem; }
.sources ul { margin: .5rem 0 0; padding-left: 1.05rem; font-size: .84rem; }
.sources a:hover { color: var(--bronze); }
footer { padding: 15px 0 22px; color: var(--muted); font-size: .79rem; }
footer .wrap { display: flex; justify-content: space-between; gap: .7rem; border-top: 1px solid var(--line); padding-top: 15px; }
footer strong { color: var(--ink); }
.no-script { padding-top: .5rem; color: var(--error); }
dialog { width: min(36rem, calc(100% - 28px)); padding: 1.1rem; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
dialog::backdrop { background: #181614b0; }
dialog p { font-size: .88rem; margin: .4rem 0; }
dialog form { margin-top: .65rem; text-align: right; }
#price-editor { max-width: 27rem; max-height: calc(100% - 28px); padding: clamp(1rem, 4vw, 1.65rem); scroll-padding-top: 3.5rem; }
#price-editor.studio-unlocked { width: min(58rem, calc(100% - 28px)); max-width: none; }
.studio-heading { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding-bottom: .65rem; border-bottom: 1px solid var(--line); background: var(--card); }
.studio-heading h2 { font: 400 1.75rem/1.2 var(--serif); }
.studio-heading form { margin: 0; }
#pin-form, #price-form { text-align: left; }
#send-dialog { max-width: 27rem; padding: clamp(1.15rem, 4vw, 1.65rem); }
#send-dialog h2 { margin-top: .25rem; font-size: 1.75rem; }
#send-description { color: var(--muted); }
#send-form { margin-top: 1rem; text-align: left; }
#send-form label { font-size: .88rem; font-weight: 700; }
#send-status:empty, #send-form-status:empty { margin: 0; }
.send-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }

.detailer-trigger { position: relative; }
.booking-badge { position: absolute; z-index: 1; top: -.1rem; right: -.12rem; display: grid; width: 1rem; height: 1rem; place-items: center; border-radius: 50%; background: var(--red); color: white; font: 700 .72rem/1 var(--sans); }
#booking-dialog { width: min(30rem, calc(100% - 24px)); max-height: calc(100% - 24px); padding: clamp(.85rem, 4vw, 1.45rem); scroll-padding-top: 4.5rem; }
#booking-dialog .eyebrow { color: var(--bronze); }
#booking-description { color: var(--muted); margin: .8rem 0; }
.booking-vehicle { overflow-wrap: anywhere; font-weight: 700; }
#booking-form { margin-top: .65rem; text-align: left; }
#booking-form label { font-size: .88rem; font-weight: 700; }
dialog p.booking-laundry { margin: .75rem 0; padding: .55rem .7rem; border-left: 3px solid var(--gold-hover); background: var(--soft); color: var(--ink); }
.booking-calendar { padding: .65rem; border: 1px solid var(--line); border-radius: 10px; }
.booking-section-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.booking-section-heading h3 { margin: 0; font: 400 1.17rem/1.2 var(--serif); }
.booking-calendar h3 { text-transform: capitalize; text-align: center; }
.booking-calendar .button, .booking-section-heading .button { min-height: 34px; padding: .28rem .55rem; }
.booking-weekdays, .booking-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .28rem; text-align: center; }
.booking-weekdays { margin: .7rem 0 .25rem; color: var(--muted); font-size: .72rem; font-weight: 700; }
.booking-day { display: grid; min-height: 36px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--muted); font: 700 .85rem var(--sans); }
.booking-day[data-state="available"] { border-color: #86a990; background: #e7f1e8; color: #244a35; }
.booking-day[data-state="available"]:hover { background: #d3e6d7; }
.booking-day[data-state="full"] { border-color: #dbb1a7; background: #f7e6e1; color: var(--error); }
.booking-day[aria-pressed="true"] { border-color: #244a35; background: #2e5d42; color: white; box-shadow: inset 0 0 0 1px white; }
.booking-day[aria-pressed="true"]:hover { background: #244a35; }
.booking-legend { display: flex; flex-wrap: wrap; gap: .25rem .7rem; margin-top: .65rem; color: var(--muted); font-size: .7rem; }
.booking-legend span { display: inline-flex; align-items: center; gap: .25rem; }
.booking-legend span::before { width: .55rem; height: .55rem; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); content: ''; }
.booking-legend [data-state="available"]::before { border-color: #86a990; background: #e7f1e8; }
.booking-legend [data-state="full"]::before { border-color: #dbb1a7; background: #f7e6e1; }
dialog p.booking-selected { margin: .75rem 0; color: var(--ink); font-weight: 700; }
#booking-calendar-status:empty, #booking-form-status:empty, #booking-inbox-status:empty { margin: 0; }
.booking-success { margin-top: .75rem; padding: .85rem; border: 1px solid #86a990; border-radius: 8px; background: #e7f1e8; color: #244a35; }
.booking-success h3 { font: 400 1.3rem/1.2 var(--serif); }
.booking-inbox { grid-column: 1 / -1; }
.booking-inbox .booking-section-heading h3 { margin: 0; }
.booking-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: .65rem; max-height: 24rem; margin: .65rem 0 0; padding: 0; overflow: auto; list-style: none; }
.booking-list:empty { margin: 0; }
.booking-item { display: flex; flex-direction: column; gap: .5rem; min-width: 0; padding: .67rem; border: 1px solid var(--line); border-radius: 8px; background: var(--soft-hover); overflow-wrap: anywhere; }
.booking-item-main strong { display: block; margin-top: .3rem; }
.booking-item-main a { color: var(--bronze); font-weight: 700; }
.booking-item-main .booking-item-date { margin: .15rem 0; }
.booking-item-state { display: inline-block; padding: .18rem .4rem; border-radius: 4px; background: var(--soft); color: var(--bronze); font-size: .72rem; font-weight: 700; }
.booking-item-state[data-status="accepted"] { background: #e7f1e8; color: #244a35; }
.booking-item-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.booking-item-actions .button { min-height: 34px; padding: .28rem .55rem; }
.studio-usage { margin: .85rem 0; padding: .85rem; border: 1px solid var(--line); border-radius: 10px; }
.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: .4rem; margin: .65rem 0 0; }
.usage-grid div { display: flex; flex-direction: column-reverse; justify-content: start; gap: .15rem; padding: .6rem; border-radius: 7px; background: var(--soft-hover); }
.usage-grid dt { color: var(--muted); font-size: .76rem; }
.usage-grid dd { margin: 0; color: var(--ink); font: 400 1.45rem/1.2 var(--serif); }

#detailer-dialog { width: min(28rem, calc(100% - 24px)); max-height: calc(100% - 24px); padding: clamp(.85rem, 3vw, 1.4rem); scroll-padding-top: 5rem; }
#detailer-dialog.detailer-unlocked { width: min(59rem, calc(100% - 24px)); max-width: none; }
.detailer-heading .eyebrow { color: var(--bronze); }
.detailer-heading h2 { margin-top: .16rem; }
#detailer-pin-form, #detailer-form { text-align: left; }
#detailer-pin-form label, .detailer-add-label, .detailer-notes { display: block; margin-top: .75rem; font-size: .88rem; font-weight: 700; }
.detailer-pin-controls, .detailer-add-service { display: flex; align-items: stretch; gap: .5rem; }
.detailer-pin-controls input { max-width: 9rem; }
.detailer-add-service select { min-width: 0; }
.detailer-workspace { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; gap: 1rem; padding-top: 1rem; }
#detailer-form { display: grid; gap: .8rem; margin: 0; min-width: 0; }
.detailer-section { min-width: 0; padding: .85rem; border: 1px solid var(--line); border-radius: 10px; }
.detailer-section h3 { display: flex; align-items: center; gap: .5rem; margin-bottom: .65rem; font: 400 1.23rem/1.15 var(--serif); }
.detailer-section h3 span { padding: .22rem .4rem; border-radius: 5px; background: var(--soft); color: var(--bronze); font: 700 .75rem var(--code); }
.detailer-section select { max-width: 100%; }
.detailer-selection, .detailer-lines { list-style: none; margin: .65rem 0 0; padding: 0; }
.detailer-selection-row, .detailer-lines li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
.detailer-selection-controls { display: flex; align-items: center; gap: .5rem; }
.detailer-selection-controls select { width: auto; }
.detailer-summary { position: sticky; top: 5rem; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.detailer-summary-heading { padding: .95rem; background: var(--charcoal); color: var(--on-dark); }
.detailer-summary-heading .eyebrow { color: var(--muted-dark); }
.detailer-summary-heading h3 { font: 400 1.32rem/1.25 var(--serif); }
#detailer-total { display: block; color: var(--gold); font: 400 clamp(1.85rem, 5vw, 2.7rem)/1.2 var(--serif); }
.detailer-summary-body { padding: .75rem .95rem; }
.detailer-lines { margin-top: 0; }
.detailer-lines strong { white-space: nowrap; }
.detailer-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; }
#detailer-print, #detailer-retry { width: 100%; margin: .6rem 0 .1rem; }
#detailer-status:empty, #detailer-pin-status:empty { margin: 0; }
#detailer-document { display: none; }

@media (max-width: 610px) {
  .detailer-workspace { grid-template-columns: 1fr; }
  .detailer-summary { position: static; }
}

@media (max-width: 930px) {
  .wrap { width: calc(100% - 40px); }
  .workspace-grid { gap: 14px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .panel, .quote-top, .quote-body { padding: 16px; }
  .service-catalogs { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .wrap { width: calc(100% - 28px); }
  .topbar { min-height: 61px; }
  .hero { padding: 24px 0 28px; }
  .workspace { padding-block: 15px 28px; }
  .workspace-bar { position: sticky; top: 0; z-index: 2; padding: 7px 0; background: var(--paper); }
  .workspace-bar > .eyebrow { display: none; }
  .mobile-quote { display: inline-flex; align-items: center; gap: .35rem; color: var(--ink); font-size: .8rem; text-decoration: none; }
  .mobile-quote strong { border-radius: 5px; padding: .15rem .35rem; background: var(--soft); }
  .workspace-grid { grid-template-columns: 1fr; }
  .quote-panel { position: static; scroll-margin-top: 50px; }
  .quote-lines { max-height: none; }
  .price-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .studio-trigger span { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-logo { justify-self: start; width: min(100%, 220px); }
}

@media (max-width: 430px) {
  .hero p { max-width: 18rem; }
  .fields, .service-catalogs { grid-template-columns: 1fr; }
  .brand { gap: .4rem; }
  .brand-mark { width: 2.25rem; height: 2.25rem; }
  .brand small { margin-left: .4rem; }
  .top-link { gap: .3rem; padding-inline: .5rem; }
  footer .wrap { flex-direction: column; }
}

@media (max-width: 360px) {
  .top-link { font-size: .76rem; padding-inline: .32rem; }
  .top-link span { display: none; }
  .topbar { gap: .45rem; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

.printing-detailer #detailer-document {
  display: flow-root;
  width: 180mm;
  color: #211e1b;
  font-size: 10pt;
  line-height: 1.4;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}
.order-header, .order-brand, .order-total { display: flex; align-items: center; justify-content: space-between; gap: 4mm; }
.order-header { border-bottom: 1.5pt solid var(--bronze); padding-bottom: 4mm; margin-bottom: 7mm; }
.order-header > p, .order-brand p, .order-subtitle { color: var(--muted); }
.order-brand strong { font-size: 12pt; }
#detailer-document h1 { margin: 0 0 1.5mm; font-size: 28pt; letter-spacing: -.035em; }
.order-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5mm 6mm; margin: 6mm 0; padding: 4mm; border: .7pt solid var(--line); break-inside: avoid; }
.order-meta dt, .order-table th { color: var(--bronze); font-weight: 700; }
.order-meta dd, .order-notes p { overflow-wrap: anywhere; }
.order-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: var(--order-table-font, 10pt); }
.order-table th, .order-table td { padding: 2.6mm 2mm; border-bottom: .6pt solid var(--line); text-align: left; vertical-align: top; }
.order-table th:first-child { width: 10mm; }
.order-table th:last-child, .order-table td:last-child { width: 32mm; text-align: right; white-space: nowrap; }
.order-table td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; }
.order-table tr { break-inside: avoid; }
.order-table td small { display: block; color: var(--muted); font-size: .9em; }
.order-total { margin-top: 3mm; padding: 2.5mm 2mm; border-block: 1pt solid var(--bronze); font-weight: 700; break-inside: avoid; }
.order-total strong { font-size: 17pt; white-space: nowrap; }
.order-notes { margin-top: 5mm; }
.order-notes h2 { font-size: 11pt; break-after: avoid; }
.order-notes p { white-space: pre-wrap; }
.order-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 12mm; margin-top: 18mm; break-inside: avoid; }
.order-signatures p { border-top: .6pt solid var(--control); padding-top: 2mm; text-align: center; font-size: 9pt; }
.order-compact .order-table { line-height: 1.2; }
.order-compact .order-table :is(th, td) { padding-block: .12em; }
.order-compact .order-table td small { display: inline; }
.order-dense .order-header { margin-bottom: 4mm; }
.order-dense .order-meta { gap: 1.5mm 4mm; margin: 3mm 0; padding: 2mm; font-size: 9pt; line-height: 1.2; }
.order-dense .order-meta :is(dt, dd) { display: inline; }
.order-dense .order-meta dt::after { content: ': '; }
.order-dense .order-notes { margin-top: 3mm; }
.order-dense .order-notes p { white-space: normal; font-size: min(10pt, var(--order-table-font)); line-height: 1.2; }
.order-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 4mm; }
.order-split .order-table th:first-child { width: 7mm; }
.order-split .order-table :is(th, td):last-child { width: 25mm; }

@media screen {
  .printing-detailer #detailer-document { position: fixed; inset: 0 100% auto auto; visibility: hidden; min-height: 266mm; }
}

@media print {
  @page { margin: 15mm; }
  @page detailer-order { size: A4 portrait; margin: 15mm; }
  body, .quote-panel, .quote-top { background: white; color: var(--ink); }
  .screen-only, dialog { display: none !important; }
  .wrap { width: 100%; }
  .workspace { padding: 0; }
  .workspace-grid { display: block; }
  .quote-panel { position: static; overflow: visible; border: none; box-shadow: none; }
  .quote-top, .quote-body { padding: 0; }
  .quote-top { padding-bottom: 8mm; }
  .quote-topline .eyebrow { font-size: 0; }
  .quote-topline .eyebrow::after { content: 'AUTOSPA · RYPIN'; font-size: .85rem; color: var(--ink); }
  .quote-topline .signal { display: none; }
  .quote-top h2, #total, #price-note, .quote-badge { color: var(--ink); }
  .quote-lines { max-height: none; overflow: visible; }
  .quote-line { break-inside: avoid; }
  body.printing-detailer > :not(#detailer-document), body.printing-detailer dialog::backdrop { display: none !important; }
  .printing-detailer #detailer-document { page: detailer-order; }
}
