:root {
  color-scheme: light;
  --paper: #fcf8f0;
  --ink: #3e2335;
  --accent: #75294e;
  --muted: #695261;
  --line: #d9c8c6;
  --wash: #f5e9dd;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.48 Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure, dl, dd { margin: 0; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button, a, summary { touch-action: manipulation; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: 1rem; top: -100px; z-index: 1; background: white; padding: .6rem; }
.skip:focus { top: .5rem; }
.page { max-width: 1510px; margin-inline: auto; padding: 0 clamp(16px, 4vw, 54px) 32px; }
.masthead, .masthead nav, figcaption, .sheet-title, .actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px;
}
.masthead, figcaption, .sheet-title { justify-content: space-between; }
.masthead { min-height: 68px; padding-block: 6px; border-bottom: 1px solid var(--ink); }
.masthead a, .button, .text-action {
  display: inline-flex; align-items: center; justify-content: center; gap: .35em; min-height: 44px;
}
.masthead a { text-decoration: none; font-weight: 600; }
.masthead .wordmark img { display: block; width: clamp(177px, 23vw, 215px); height: auto; }
.button {
  padding: 11px 18px; text-decoration: none; border: 1px solid var(--accent);
  border-radius: 3px; font-weight: 700; text-align: center;
}
.primary { background: var(--accent); color: white; }
.outline { background: var(--paper); color: var(--accent); }
.text-action { padding: 4px 0; border: 0; background: transparent; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 5px; }
.spread { display: grid; grid-template-columns: minmax(0,.87fr) minmax(0,1.13fr); gap: clamp(18px,3.8vw,64px); align-items: center; padding-block: clamp(24px,4.5vw,56px); }
.cover-copy { display: grid; justify-items: start; gap: 19px; }
.cover-copy h1 { font: 500 clamp(42px,6.1vw,82px)/.99 Georgia, serif; letter-spacing: -.068em; }
.cover-copy h1 em { font-weight: 400; color: var(--accent); }
.cover-copy p { max-width: 35ch; font-size: clamp(16px,1.65vw,20px); }
p, dd { color: var(--muted); }
.plate-image {
  aspect-ratio: 1.5; background: var(--wash) url("backoptovik-business-scenarios.webp") left top / 200% 200% no-repeat;
}
.plate-image[data-photo="1"] { background: var(--wash) url("backoptovik-pallet-line.webp") center / cover no-repeat; }
.plate-image[data-photo="2"] { background-position: left bottom; }
.plate-image[data-photo="3"] { background-position: right bottom; }
figcaption { padding-block: 5px; border-bottom: 1px solid var(--line); gap: 0 8px; }
#caption { font: 500 clamp(20px,2.7vw,30px)/1.2 Georgia, serif; letter-spacing: -.04em; }
.category-index { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding-block: 11px; border-block: 1px solid var(--ink); }
.category-index button { min-height: 44px; border: 0; border-right: 1px solid var(--line); background: transparent; padding: 9px 7px; font-size: clamp(14px,1.75vw,20px); }
.category-index button:last-child { border-right: 0; }
.category-index [aria-pressed="true"] { color: white; background: var(--ink); }
.cover-story { max-width: 70ch; margin: 14px 0 4px; padding-left: 14px; border-left: 3px solid var(--accent); }
.entry-paths { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-block: 18px 6px; }
.entry-path { display: grid; gap: 4px; min-height: 74px; padding: 15px 17px; border: 1px solid var(--line); background: white; text-decoration: none; }
.entry-path strong { font-size: 18px; }
.entry-path span { color: var(--muted); font-size: 14px; }
.source-note { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px 20px; padding-block: clamp(19px,3.2vw,38px); }
.source-note h2 { font: 500 clamp(25px,3.3vw,42px)/1.12 Georgia, serif; letter-spacing: -.043em; }
.source-note p { margin-top: 5px; }
.panel, details { scroll-margin-block: 16px; }
.panel { border: 1px solid var(--line); border-top: 4px solid var(--accent); background: white; padding: clamp(14px,2.55vw,30px); }
.panel h2 { font-size: clamp(24px,2.9vw,32px); line-height: 1.1; letter-spacing: -.04em; }
.sheet-title { gap: 6px 13px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.sheet-title output, .hint { color: var(--muted); font-size: 14px; }
.line-item, .request-meta, #stock-form { display: grid; gap: 10px; align-items: end; }
.line-item { grid-template-columns: minmax(0,1fr) minmax(120px,.37fr) 44px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.line-item[data-mode="sourcing"] { grid-template-columns: minmax(0,1fr) minmax(118px,.45fr) minmax(92px,.25fr) 44px; }
.line-item .equipment-spec { grid-column: 1/-1; }
.line-item .sourcing-volume { grid-column: 1/-1; }
.equipment-spec textarea { font: inherit; font-size: 16px; font-weight: 400; padding: 10px; border: 1px solid #987b89; border-radius: 3px; resize: vertical; }
.request-meta { grid-template-columns: 1fr 1fr; margin: 12px 0 18px; }
label { display: grid; gap: 4px; min-width: 0; font-size: 14px; font-weight: 600; }
input, select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #987b89; border-radius: 3px; padding: 8px 10px; background: white; font-size: 16px; font-weight: 400; }
::placeholder { color: var(--muted); }
.remove { min-height: 44px; border: 0; background: transparent; font-size: 24px; }
.remove:disabled { opacity: .3; cursor: default; }
.review { margin-top: 18px; padding: 14px 16px; border-inline-start: 3px solid var(--accent); background: var(--wash); overflow-wrap: anywhere; }
.review ol { margin: 8px 0; padding-left: 23px; }
.review .actions { margin: 12px 0 5px; }
.copy-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.review [role="status"]:empty, #stock-review-status:empty { display: none; }
.sample-section { margin: 16px 0; padding: 14px 16px; border: 1px solid var(--line); background: #fff; }
.sample-section h3 { margin: 0 0 4px; font-size: 16px; }
.sample-section p { margin: 5px 0 10px; color: var(--muted); font-size: 14px; }
.sample-preview { margin-top: 10px; }
.sample-preview img { display: block; max-width: 180px; max-height: 140px; border: 1px solid var(--line); object-fit: contain; }
.sample-section [role="status"]:empty { display: none; }
.receipt { margin-top: 16px; padding: 14px; border: 1px solid var(--line); background: #f7faf7; }
.receipt h3, .receipt p { margin-top: 0; }
.stock { margin-top: 18px; }
.stock p { margin: 8px 0 14px; }
#stock-form { grid-template-columns: minmax(100px,32rem) auto; justify-content: start; }
.photo-search-form { display: grid; grid-template-columns: minmax(100px,32rem) auto; gap: 10px; align-items: end; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.photo-search-form small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; font-weight: 400; }
.photo-search-form [role="status"] { grid-column: 1/-1; min-height: 1.4em; margin: 0; color: var(--muted); font-size: 14px; }
.catalog-results { display: grid; gap: 8px; margin-top: 16px; }
.catalog-result { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.catalog-result span { color: var(--muted); font-size: 14px; }
.catalog-result .button { min-height: 38px; padding: 7px 11px; font-size: 14px; }
details { margin: 18px 0; border-top: 1px solid var(--line); }
summary { padding: 11px 0; min-height: 44px; font-weight: 600; }
dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 28px; padding-block: 6px 14px; }
dt { font-weight: 700; }
dd { max-width: 54ch; }
@media (hover: hover) {
  .masthead nav a:hover, .text-action:hover { color: var(--accent); text-decoration: underline; }
  .button:hover { box-shadow: inset 0 0 0 1px currentColor; }
  .category-index button[aria-pressed="false"]:hover { background: var(--wash); }
}
@media (max-width: 650px) {
  .spread { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .cover-copy { gap: 12px; }
  .category-index { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3px; }
  .category-index button { border: 0; }
}
@media (max-width: 500px) {
  .masthead { gap: 0; }
  .masthead nav { width: 100%; gap: 4px 14px; }
  .source-note, dl, .request-meta, #stock-form, .photo-search-form, .entry-paths { grid-template-columns: minmax(0,1fr); }
  .source-note .button, #stock-form .button, .photo-search-form .button { justify-self: start; }
  .line-item { grid-template-columns: minmax(0,1fr) 44px; gap: 7px; }
  .line-item[data-mode="sourcing"] { grid-template-columns: minmax(0,1fr) minmax(74px,.65fr) 44px; }
  .line-item label:first-child { grid-column: 1/-1; }
  .catalog-result { grid-template-columns: minmax(0,1fr) auto; }
  .catalog-result span { grid-column: 1/-1; grid-row: 2; }
}

.page:has(#order-form),.page:has([data-service]){max-width:1256px}
#stock-total{display:block;margin:12px 0;padding:9px 12px;border-left:3px solid var(--accent);background:var(--wash);font-weight:650}
#empty-stock-order p{margin:16px 0}
#purchase-help{display:flex;align-items:center;flex-wrap:wrap;gap:4px 20px;padding:12px 0}
#purchase-help a{display:inline-flex;align-items:center;min-height:44px}
.catalog-results>.text-action{justify-self:start}
.equipment-spec textarea{width:100%;min-width:0;min-height:78px}
.catalog-result{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title action" "terms action";row-gap:4px}
.catalog-result:has(>img){grid-template-columns:72px minmax(0,1fr) auto;grid-template-areas:"photo title action" "photo terms action"}
.catalog-result>img{grid-area:photo;width:72px;height:72px;object-fit:contain;background:white;border:1px solid var(--line);border-radius:3px}
.catalog-result>strong{grid-area:title;align-self:end;overflow-wrap:anywhere}
.catalog-result>span{grid-area:terms;align-self:start;overflow-wrap:anywhere}
.catalog-result>.button{grid-area:action;min-height:44px}
.catalog-result>details{grid-column:1/-1;margin:3px 0 0}
@media(max-width:760px){
 .line-item[data-mode="sourcing"]{grid-template-columns:minmax(0,1fr) minmax(82px,.45fr) 44px}
 .line-item[data-mode="sourcing"] label:first-child{grid-column:1/-1}
}
@media(max-width:500px){
 .masthead .wordmark img{width:154px}
 .masthead nav{justify-content:space-between}
 .line-item[data-mode="sourcing"]{grid-template-columns:minmax(0,1fr) 44px}
 .line-item[data-mode="sourcing"] .unit-choice{grid-column:1/-1}
 .line-item .remove{align-self:end}
 .request-meta select,.line-item select{max-width:100%}
 .catalog-result,.catalog-result:has(>img){grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title action" "terms terms"}
 .catalog-result:has(>img){grid-template-columns:64px minmax(0,1fr);grid-template-areas:"photo title" "photo terms" ". action"}
 .catalog-result>img{width:64px;height:64px;align-self:start}
 .catalog-result:has(>img)>.button{justify-self:start}
}
.picked-product{display:flex;align-items:center;gap:12px;min-width:0;grid-column:1/-1}
:root:has(.shop-head){--paper:#f7f6ef;--ink:#263d31;--accent:#813f34;--muted:#536657;--line:#cbd4c5;--wash:#eaf0e6}
.review #review-total{font-weight:700;color:var(--ink);border-top:1px solid var(--line);padding-top:.75rem}
#review-title,#receipt-title{scroll-margin-top:8rem}
.picked-product img{width:62px;height:62px;object-fit:contain;flex:none;background:white;border:1px solid #d7dfd4;border-radius:6px}
.picked-product strong,.picked-product small{display:block;overflow-wrap:anywhere}
.picked-product small{margin-top:.3rem;color:#516357}
.line-item[data-mode=stock]:has(.picked-product){background:#fcfcf7;padding:12px;border:1px solid #cbd3c6;border-radius:8px;grid-template-columns:minmax(0,1fr) 44px}
