:root {
  color-scheme: light;
  --ink: #24271f;
  --muted: #5c6055;
  --line: #d9dacf;
  --cream: #f6f6ef;
  --gold: #c78a1f;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Segoe UI", Arial, sans-serif;
  font: 100%/1.45 var(--sans);
  color: var(--ink);
  background: var(--cream);
}
* {box-sizing: border-box}
body {margin: 0}
button,input,select,textarea {font: inherit;color: inherit}
button,a,select {touch-action: manipulation}
button,a {cursor: pointer}
a {color: inherit;text-underline-offset: .18em}
button {background: white}
:focus-visible {outline: 3px solid #986209;outline-offset: 3px}
button:disabled {cursor: default}
img {display: block;max-width: 100%}
svg {width: 1.2em;height: 1.2em;display: inline-block;vertical-align: -.18em;flex-shrink: 0}
.skip {position: fixed;top: -5rem;left: 1rem;z-index: 5;padding: .6rem 1rem;background: white}
.skip:focus {top: .5rem}
.masthead {background: var(--ink);color: #fff}
.mast-inner,.nav-inner,main,footer {width: min(87rem,100%);padding-inline: clamp(1rem,4.5vw,4.2rem);margin-inline: auto}
.mast-inner {display: flex;align-items: center;gap: 1.5rem;min-height: 4.8rem}
.brand {display: flex;align-items: center;gap: .64rem;text-decoration: none}
.brand strong {font-size: 2.4rem;font-family: Arial, sans-serif;font-weight: 750;line-height: 1;letter-spacing: -.09em}
.brand strong span {color: var(--gold)}
.brand-name {font-size: .75rem;line-height: 1.06;letter-spacing: .01em;font-weight: 550}
.mast-divider {width: 1px;height: 1.5rem;background: #596052}
.workspace-name {color: #e1e2d7;font-size: .91rem}
.preview-link {display: flex;align-items: center;gap: .55rem;margin-left: auto;font-size: .875rem;font-weight: 600;text-decoration: none;padding: .5rem 0}
.preview-link:hover {color: #eaba6a}
.nav {background: #fff;border-bottom: 1px solid var(--line)}
.nav-inner {display: flex;gap: clamp(.6rem,2.3vw,2.25rem)}
.nav button {display: flex;align-items: center;justify-content: center;gap: .55rem;position: relative;border: 0;color: var(--muted);min-height: 3.5rem;padding: .25rem .18rem;font-weight: 600;font-size: .93rem}
.nav button:hover,.nav button[aria-current] {color: var(--ink)}
.nav button[aria-current]::after {background: var(--gold);content: "";position: absolute;bottom: -1px;height: 3px;left: 0;right: 0}
main {min-height: 70vh;padding-bottom: 2.5rem}
main:focus {outline: 0}
.intro {display: flex;align-items: center;justify-content: space-between;gap: 1rem;padding: clamp(2rem,3.5vw,3.2rem) 0 1.85rem}
h1,h2,h3,h4,p {margin: 0}
h1,h2,h3 {font-family: var(--serif);font-weight: 500;letter-spacing: -.05em;line-height: 1.1}
h1 {font-size: clamp(2.7rem,4.8vw,4.45rem)}
h2 {font-size: clamp(1.7rem,2.9vw,2.6rem)}
h3 {font-size: 1.65rem}
.intro p {color: var(--muted);margin-top: .55rem}
.btn,.icon-btn {display: inline-flex;align-items: center;justify-content: center;gap: .5rem;border: 1px solid #bdc0b5;min-height: 2.75rem;padding: .55rem .92rem;border-radius: .3rem;font-weight: 600;font-size: .875rem;text-decoration: none;line-height: 1.3}
.btn:hover,.icon-btn:hover {border-color: var(--ink);background: #f3f3eb}
.btn.primary {background: var(--ink);border-color: var(--ink);color: #fff}
.btn.primary:hover {background: #414838}
.icon-btn {width: 2.65rem;padding: 0}
.desk {display: grid;grid-template-columns: minmax(16rem,.75fr) minmax(0,1.32fr);border: 1px solid var(--line);border-radius: .5rem;overflow: hidden;background: #fff}
.queue {background: #fdfdf8;border-right: 1px solid var(--line);min-width: 0}
.queue-tools {padding: 1.4rem 1.25rem 1.1rem;border-bottom: 1px solid var(--line)}
.queue-heading,.panel-line,.card-line,.row-top,.row-bottom,.detail-top,.actions,.dialog-top {display: flex;align-items: center;justify-content: space-between;gap: .7rem}
.queue-heading {margin-bottom: 1rem}
.queue-heading h2 {font: 650 1.03rem var(--sans);letter-spacing: -.015em}
.count {color: var(--muted);font-size: .82rem}
.search {display: flex;align-items: center;gap: .5rem;min-height: 2.7rem;border: 1px solid #c8cbbf;border-radius: .3rem;padding: 0 .75rem;background: #fff;color: var(--muted)}
.search:focus-within {outline: 2px solid #99620c;outline-offset: 2px}
.search input {width: 100%;border: 0;outline: 0;padding: .52rem 0;background: transparent;font-size: .9rem}
.queue-filters {display: flex;flex-wrap: wrap;gap: .35rem;margin-top: .85rem}
.filter {border: 1px solid transparent;border-radius: .2rem;min-height: 2.2rem;padding: .22rem .6rem;font-size: .85rem;font-weight: 600;background: transparent;color: var(--muted)}
.filter:hover {background: #eeeFE6;color: var(--ink)}
.filter[aria-pressed="true"] {color: var(--ink);background: #e9eadf;border-color: #d9dccc}
.request {display: block;width: 100%;text-align: left;border: 0;border-bottom: 1px solid var(--line);background: transparent;padding: 1.1rem 1.25rem;position: relative}
.request:is(:hover,:focus-visible) {background: #f0f1e8}
.request[aria-current="true"] {background: #f6efdE}
.request[aria-current="true"]::before {content:"";position:absolute;inset: 0 auto 0 0;width: 4px;background: var(--gold)}
.request strong {display: block;font-size: 1.02rem;line-height: 1.3;margin: .35rem 0 .25rem;overflow-wrap: anywhere}
.type,.when,.ref,.kicker,.quiet,.small {font-size: .84rem;color: var(--muted)}
.type {display: inline-flex;gap: .4rem;align-items: center;font-weight: 600}
.when,.ref {font-variant-numeric: tabular-nums}
.status {display: inline-flex;align-items: center;gap: .3rem;font-size: .75rem;padding: .19rem .48rem;border-radius: .22rem;background: #e7e9e0;color: #47513f;white-space: nowrap;font-weight: 650;line-height: 1.35}
.status.new,.status.draft {background: #f4e5bf;color: #66470e}
.status.quoted {color: #374952;background: #e3ebee}
.status.won,.status.published {color: #33513a;background: #e3eddf}
.detail {padding: clamp(1.2rem,2.65vw,2.45rem);min-width: 0}
.detail-top .type {color: #525744}
.detail-title {margin: .8rem 0 .35rem;font-size: clamp(2rem,3.4vw,3.18rem);overflow-wrap: anywhere}
.contact {display: flex;flex-wrap: wrap;gap: .25rem .65rem;color: var(--muted);align-items: center;margin-top: .2rem;overflow-wrap: anywhere}
.contact a {color: inherit}
.contact-email {overflow-wrap: anywhere}
.request-body {padding: 1.15rem 0 .55rem;white-space: pre-line;overflow-wrap: anywhere}
.items {border: 1px solid var(--line);border-radius: .25rem;overflow: hidden;margin: .75rem 0 .2rem}
.item {display: flex;align-items: center;gap: .7rem;padding: .53rem .8rem;border-top: 1px solid var(--line)}
.item img {width: 2.6rem;height: 2.6rem;object-fit: cover;border-radius: .16rem}
.item .quantity {margin-left: auto;white-space: nowrap}
.item:first-child {border: 0}
.item small,.stock-card small {color: var(--muted)}
.item strong {font-size: .93rem;font-weight: 600}
.item .variant {display: inline-block;color: var(--muted);font-size: .85rem}
.item span:last-child {font-variant-numeric: tabular-nums}
.workflow {margin-top: 1.25rem;padding-top: 1.15rem;border-top: 1px solid var(--line)}
.workflow h3 {font: 650 1rem var(--sans);letter-spacing: 0;margin-bottom: .85rem}
.form-grid {display: grid;grid-template-columns: repeat(2,minmax(0,1fr));gap: .85rem 1rem}
label.field {display: grid;align-content: start;gap: .32rem;min-width: 0}
.field > span:first-child,.field-set legend {font-size: .865rem;font-weight: 600}
.full {grid-column: 1 / -1}
.field input,.field select,.field textarea {max-width: 100%;width: 100%;min-height: 2.64rem;border: 1px solid #bdc1b4;border-radius: .25rem;background: #fff;padding: .5rem .68rem;font-size: .94rem}
.field select {appearance: none;background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='12' viewBox='0 0 16 12'%3E%3Cpath d='m3 4 5 5 5-5' fill='none' stroke='%234b5046' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right .7rem center;padding-right: 2.25rem}
.field textarea {resize: vertical;line-height: 1.45}
.field input[type=file] {padding: .4rem;font-size: .85rem}
.actions {justify-content: flex-start;flex-wrap: wrap;margin-top: 1.15rem}
.empty {padding: 2rem;color: var(--muted)}
.stock-grid,.project-grid,.service-grid {display: grid;gap: 1.2rem;grid-template-columns: repeat(auto-fit,minmax(min(100%,15.4rem),1fr))}
.project-grid,.service-grid {grid-template-columns: repeat(auto-fill,minmax(min(100%,19rem),1fr))}
.stock-card,.project-card,.service-card {display: flex;flex-direction: column;min-width: 0;overflow: hidden;background: white;border: 1px solid var(--line);border-radius: .4rem}
.cover {width: 100%;aspect-ratio: 1.7;object-fit: cover;background: #ecece4}
.stock-card .cover {aspect-ratio: 1.12}
.photo-empty {display: grid;place-items: center;color: var(--muted)}
.card-info {padding: 1.1rem;display: flex;flex-direction: column;align-items: flex-start;gap: .55rem;flex: 1}
.card-info h2,.service-card h2 {font-size: 1.63rem}
.card-info p,.service-card p {color: var(--muted);overflow-wrap: anywhere}
.card-info .btn {margin-top: auto}
.card-line {width: 100%;font-size: .86rem;color: var(--muted)}
.service-card {align-items: flex-start;gap: .8rem;padding: 1.35rem;border-top: 3px solid #bfc4b2}
.service-card:first-child {border-top-color: var(--gold)}
.service-card .btn {margin-top: auto}
footer {margin-bottom: 1.5rem;display: flex;gap: .7rem;align-items: baseline;flex-wrap: wrap;color: var(--muted);font-size: .85rem}
footer span:first-child {color: var(--ink);font-weight: 650}
footer i {display: inline-block;background: var(--gold);width: .5rem;height: .5rem;margin-right: .3rem}
dialog {color: var(--ink);border: 1px solid #bfc2b6;border-radius: .5rem;background: var(--cream);padding: 0;width: min(42rem,calc(100% - 1.5rem));max-height: 90vh;max-height: 90dvh;overflow-y: auto}
dialog::backdrop {background: #11181199}
#editor-content {padding: clamp(1.1rem,3vw,2rem)}
.dialog-top {align-items: flex-start;margin-bottom: 1.2rem}
.dialog-top h2 {margin-top: .15rem}
.dialog-top .icon-btn {flex-shrink: 0}
.dialog-sub,.hint {color: var(--muted);font-size: .88rem}
.dialog-sub {margin-bottom: 1rem}
.snippet {margin-top: 1rem;background: white;border: 1px solid var(--line);padding: 1rem;border-radius: .25rem;overflow-wrap: anywhere}
.snippet h3 {margin-bottom: .6rem;font: 650 .85rem var(--sans);letter-spacing: 0}
.snippet strong {font-weight: 550;color: #293c72}
.invoice-row {display: grid;grid-template-columns: minmax(0,2.5fr) minmax(4rem,.65fr) minmax(5rem,.85fr);gap: .65rem;align-items: end;margin-bottom: .7rem}
.invoice-total {display: grid;gap: .4rem;margin-top: 1rem}
.invoice-total p {display: flex;justify-content: space-between}
#announcement:not(:empty) {position: fixed;z-index: 3;right: 1rem;bottom: 1rem;max-width: calc(100vw - 2rem);border-radius: .3rem;padding: .85rem 1.2rem;color: white;background: #272d24;box-shadow: 0 3px 18px #191d1a26}
#print-sheet {display: none}
@media(max-width: 52rem){
  .mast-inner,.nav-inner,main,footer {padding-inline: 1.2rem}
  .desk {grid-template-columns: minmax(14rem,.7fr) minmax(0,1fr)}
  .queue-tools,.request,.detail {padding: 1rem}
  .mast-inner {gap: 1rem}
}
@media(max-width: 42rem){
  .mast-inner,.nav-inner,main,footer {padding-inline: 1rem}
  .mast-inner {min-height: 4rem}
  .brand strong {font-size: 2.1rem}
  .workspace-name,.mast-divider {display: none}
  .preview-link {font-size: .84rem}
  .nav-inner {display: grid;grid-template-columns: 1fr 1fr 1fr 1fr;gap: .3rem}
  .nav button {min-height: 3.6rem;flex-direction: column;gap: .13rem;font-size: .78rem}
  .intro {align-items: flex-start;flex-wrap: wrap;padding: 1.7rem 0 1.25rem}
  .intro p {margin-top: .3rem}
  .desk {display: block}
  .queue {border-right: 0;border-bottom: 1px solid var(--line)}
  .request {padding: .72rem 1rem}
  .detail {padding: 1.25rem 1rem;scroll-margin-top: 1rem}
  .queue-tools {padding: .9rem 1rem}
  .queue-heading {margin-bottom: .65rem}
  .request-list {max-height: 17rem;overflow-y: auto}
  .intro .btn {min-height: 2.5rem}
  .form-grid {gap: .75rem}
  .invoice-row {column-gap: .35rem;grid-template-columns: minmax(0,1.4fr) minmax(3.4rem,.55fr) minmax(4.4rem,.65fr)}
  footer {align-items: flex-start;flex-direction: column;gap: .25rem}
}
@media print {
  body > *,body > dialog[open],#announcement:not(:empty) {display: none !important}
  body {background: white}
  body > #print-sheet {display: block !important;max-width: 50rem;margin: 1.7cm auto;color: #222;font: 11pt/1.5 Arial,sans-serif}
  #print-sheet h1 {font-size: 26pt}
  #print-sheet h2 {margin: 1cm 0 .3cm}
  #print-sheet table {border-collapse: collapse;width: 100%;margin: .8cm 0}
  #print-sheet th,#print-sheet td {text-align: left;padding: .25cm;border-bottom: 1px solid #aaa}
}
