:root {
  color-scheme: light;
  --ink: #18243a;
  --muted: #69758a;
  --navy: #101d33;
  --navy-2: #1b2b46;
  --accent: #d8f36a;
  --accent-strong: #c4e548;
  --paper: #f4f6f9;
  --line: #e2e7ee;
  --white: #fff;
  --shadow: 0 10px 30px rgba(23, 40, 67, .055);
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 15px; }
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px max(24px, calc((100vw - 1120px) / 2)); background: var(--navy); color: #fff; }
.brand { min-width: 0; display: inline-flex; align-items: center; gap: 15px; text-decoration: none; }
.brand img { display: block; width: 142px; height: 54px; object-fit: contain; border-radius: 5px; background: white; }
.brand-divider { width: 1px; height: 34px; background: rgba(255,255,255,.25); }
.brand-label { color: #eaf0f8; font-family: 'Manrope', sans-serif; font-size: 14px; letter-spacing: .17em; white-space: nowrap; }
.brand-label strong { color: var(--accent); font-weight: 800; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.privacy-pill { display: inline-flex; align-items: center; gap: 8px; color: #d3dce9; font-size: 12px; white-space: nowrap; }
.privacy-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(216,243,106,.12); }
.page-wrap { width: min(100% - 40px, 920px); margin: 0 auto; padding: 42px 0 48px; }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 8px; color: #68788e; font-size: 10px; font-weight: 700; letter-spacing: .15em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; color: var(--navy); font-family: 'Manrope', sans-serif; font-size: clamp(27px, 4vw, 35px); line-height: 1.15; letter-spacing: -.04em; }
.intro-copy { margin: 0; color: var(--muted); font-size: 14px; }
.draft-tag { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid #dce3ec; border-radius: 99px; background: #fff; color: #607087; font-size: 12px; font-weight: 600; }
.draft-icon { color: #7a8a9c; }
.section-card { min-width: 0; padding: 23px 24px; border: 1px solid #e8ecf1; border-radius: 15px; background: var(--white); box-shadow: var(--shadow); }
.order-card { margin-bottom: 16px; }
.workshop-settings { margin-top: 17px; padding-top: 13px; border-top: 1px dashed #e2e7ee; }
.workshop-settings summary { width: fit-content; color: #596a34; cursor: pointer; font-size: 12px; font-weight: 700; }
.workshop-settings summary span { color: #8791a0; font-size: 11px; font-weight: 500; }
.workshop-fields { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: 11px; margin-top: 14px; }
.section-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 21px; }
.section-heading h2 { margin: 0 0 3px; color: var(--navy); font-family: 'Manrope', sans-serif; font-size: 16px; font-weight: 750; letter-spacing: -.02em; }
.section-heading p { margin: 0; color: #8490a1; font-size: 12px; }
.step-number { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; background: #eef3dc; color: #5a6f20; font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.field-grid { display: grid; gap: 16px; }
.field-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.field-stack { display: grid; gap: 15px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 7px; color: #49576d; font-size: 12px; font-weight: 600; }
.field > span { display: block; }
.field b { color: #bd4c43; }
.field small { color: #929dad; font-size: 11px; font-weight: 500; }
input, textarea { width: 100%; min-width: 0; border: 1px solid #dce2e9; border-radius: 9px; outline: none; background: #fff; color: var(--ink); transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.field input, .field textarea { min-height: 46px; padding: 11px 12px; }
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #a3adba; font-weight: 400; }
input:focus, textarea:focus { border-color: #9db34b; box-shadow: 0 0 0 3px rgba(196,229,72,.22); }
input:invalid:not(:placeholder-shown) { border-color: #d47d73; }
.field-hint { margin-top: -2px; color: #8c98a8; font-size: 10px; font-weight: 400; }
.field-wide { grid-column: 1 / -1; }
.services-card { padding-bottom: 0; margin-bottom: 16px; overflow: hidden; }
.section-heading-between { justify-content: space-between; }
.section-heading-main { display: flex; align-items: center; gap: 13px; }
.item-count { align-self: flex-start; padding: 6px 9px; border-radius: 99px; background: #f3f5f7; color: #7a8799; font-size: 10px; font-weight: 600; white-space: nowrap; }
.item-labels { display: grid; grid-template-columns: minmax(210px, 1fr) 74px 142px 134px 32px; gap: 10px; padding: 0 0 9px; border-bottom: 1px solid var(--line); color: #8a95a5; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.item-labels span:not(:first-child) { text-align: right; }
.item-list { display: grid; }
.item-card { display: grid; grid-template-columns: minmax(160px, 1fr) 74px 142px 134px 32px; gap: 10px; align-items: center; min-height: 70px; border-bottom: 1px solid #edf0f4; }
.item-name-wrap, .item-quantity-wrap, .item-price-wrap, .item-total-wrap { min-width: 0; }
.item-card input { height: 40px; padding: 8px 9px; font-size: 13px; }
.item-quantity { text-align: center; }
.item-price-wrap { display: flex; flex-direction: column; gap: 5px; }
.money-input { display: flex; align-items: center; height: 40px; border: 1px solid #dce2e9; border-radius: 9px; padding-left: 9px; color: #8995a4; font-size: 11px; }
.money-input:focus-within { border-color: #9db34b; box-shadow: 0 0 0 3px rgba(196,229,72,.22); }
.money-input input { height: 38px; border: 0; box-shadow: none; padding-left: 5px; text-align: right; }
.item-total-wrap { text-align: right; color: var(--navy); font-size: 13px; font-weight: 700; }
.item-mobile-label { display: none; }
.remove-item { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #99a3b0; cursor: pointer; font-size: 24px; line-height: 1; }
.remove-item:hover { background: #fff1ef; color: #b74e43; }
.add-item { display: inline-flex; align-items: center; gap: 8px; margin: 15px 0 18px; padding: 8px 0; border: 0; background: transparent; color: #516622; cursor: pointer; font-size: 13px; font-weight: 700; }
.add-item span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: #eef4d7; font-size: 17px; }
.add-item:hover { color: #29390e; }
.total-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 -24px; padding: 17px 24px; background: var(--navy); color: #fff; }
.total-caption { display: block; margin-bottom: 2px; font-family: 'Manrope', sans-serif; font-size: 14px; font-weight: 750; }
.total-bar small { color: #c0cada; font-size: 11px; }
.grand-total { color: var(--accent); font-family: 'Manrope', sans-serif; font-size: 25px; font-weight: 800; white-space: nowrap; }
.bottom-grid { align-items: stretch; }
.payment-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 19px; padding: 0; border: 0; }
.payment-options legend { width: 100%; margin-bottom: 9px; color: #49576d; font-size: 12px; font-weight: 600; }
.payment-choice { position: relative; cursor: pointer; }
.payment-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.payment-choice span { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; padding: 0 13px; border: 1px solid #dce2e9; border-radius: 9px; background: #fff; color: #5d6a7c; font-size: 12px; font-weight: 600; }
.payment-choice input:checked + span { border-color: #a9c64b; background: #f5f9e6; color: #45561d; box-shadow: inset 0 0 0 1px #a9c64b; }
.payment-choice input:focus-visible + span { outline: 3px solid rgba(196,229,72,.35); outline-offset: 2px; }
.workshop-note { display: flex; gap: 11px; margin-top: 22px; padding: 13px; border-radius: 10px; background: #f4f6f8; }
.note-mark { flex: 0 0 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; background: var(--navy); color: var(--accent); font-family: 'Manrope', sans-serif; font-size: 9px; font-weight: 800; }
.workshop-note p { margin: 0; color: #717e90; font-size: 10px; line-height: 1.55; }
.workshop-note strong { color: #3f4d61; font-size: 11px; }
.workshop-note a { text-decoration: none; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 21px 0 13px; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700; transition: background .16s ease, transform .16s ease, box-shadow .16s ease; }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--accent); color: var(--navy); box-shadow: 0 5px 14px rgba(125,152,37,.15); }
.button-primary:hover { background: var(--accent-strong); box-shadow: 0 7px 18px rgba(125,152,37,.22); }
.button-primary span { font-size: 17px; }
.button-quiet { border-color: #dce2e9; background: #fff; color: #657287; }
.button-quiet:hover { background: #f5f7f9; }
.privacy-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: #8792a1; font-size: 11px; line-height: 1.55; }
.privacy-note span { color: #6f842f; }
.doc-nav { display: flex; gap: 6px; padding: 8px max(24px, calc((100vw - 1120px) / 2)); background: var(--navy-2); overflow-x: auto; scrollbar-width: none; }
.doc-nav::-webkit-scrollbar { display: none; }
.doc-nav a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 9px; color: #c3cddb; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.doc-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.doc-nav a[aria-current="page"] { background: var(--accent); color: var(--navy); }
.workshop-note-flush { margin-top: 0; }
.field-spaced { margin-top: 15px; }
.total-words { display: block; max-width: 420px; line-height: 1.4; }
.quick-items { margin: -4px 0 16px; padding: 14px; border: 1px solid #edf0f4; border-radius: 12px; background: #fafbfc; }
.quick-items-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: #6b7889; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.quick-edit { padding: 4px 2px; border: 0; background: transparent; color: #516622; cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.quick-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.quick-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px 0 9px; border: 1px solid #dce2e9; border-radius: 99px; background: #fff; color: #3f4d61; cursor: pointer; font-size: 12px; font-weight: 600; text-align: left; }
.quick-chip span { color: #6f842f; font-size: 15px; line-height: 1; }
.quick-chip em { color: #7a8799; font-style: normal; font-weight: 500; }
.quick-chip:hover { border-color: #a9c64b; background: #f8fbee; }
.quick-chip:active { transform: translateY(1px); }
.quick-empty { margin: 0; color: #8792a1; font-size: 12px; }
.catalog-editor { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #dfe4ea; }
.catalog-rows { display: grid; gap: 8px; }
.catalog-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 32px; gap: 8px; align-items: center; }
.catalog-row > input { height: 40px; padding: 8px 10px; font-size: 13px; }
.catalog-add { margin: 10px 0 4px; }
.catalog-help { margin: 0; color: #8792a1; font-size: 11px; }
.convert-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px; padding: 16px 18px; border: 1px solid #dfe8c0; border-radius: 13px; background: #f8fbee; }
.convert-copy strong { display: block; margin-bottom: 2px; color: var(--navy); font-family: 'Manrope', sans-serif; font-size: 14px; }
.convert-copy span { color: #66734f; font-size: 12px; }
.convert-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.button-dark { background: var(--navy); color: #fff; }
.button-dark:hover { background: var(--navy-2); }
.mobile-actions { display: none; }
.print-sheet { display: none; }

@media (max-width: 700px) {
  body { padding-bottom: calc(83px + env(safe-area-inset-bottom)); }
  .topbar { min-height: 64px; padding: 7px 15px; }
  .doc-nav { padding: 7px 12px; gap: 4px; }
  .doc-nav a { min-height: 34px; padding: 0 12px; font-size: 12px; }
  .brand { gap: 10px; }
  .brand img { width: 105px; height: 42px; }
  .brand-divider { height: 27px; }
  .brand-label { font-size: 11px; }
  .topbar-right { gap: 8px; }
  .privacy-pill { gap: 6px; font-size: 10px; }
  .desktop-print { display: none; }
  .page-wrap { width: min(100% - 24px, 520px); padding: 26px 0 22px; }
  .intro { align-items: flex-start; margin-bottom: 19px; }
  .eyebrow { margin-bottom: 6px; font-size: 9px; }
  h1 { font-size: 27px; }
  .intro-copy { max-width: 270px; font-size: 12px; line-height: 1.45; }
  .draft-tag { margin-top: 17px; padding: 7px 9px; font-size: 10px; }
  .section-card { padding: 19px 16px; border-radius: 13px; }
  .section-heading { gap: 10px; margin-bottom: 17px; }
  .section-heading h2 { font-size: 14px; }
  .section-heading p { max-width: 265px; font-size: 11px; line-height: 1.4; }
  .step-number { width: 31px; height: 31px; flex-basis: 31px; border-radius: 9px; font-size: 10px; }
  .field-grid { gap: 12px; }
  .field-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workshop-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workshop-fields .field:first-child { grid-column: 1 / -1; }
  .details-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
  .field { gap: 6px; font-size: 11px; }
  .field input, .field textarea { min-height: 46px; padding: 10px 11px; font-size: 14px; }
  .order-card { margin-bottom: 12px; }
  .services-card { padding: 19px 14px 0; margin-bottom: 12px; }
  .section-heading-between { align-items: flex-start; }
  .section-heading-main { gap: 10px; }
  .item-count { padding: 5px 7px; font-size: 9px; }
  .item-labels { display: none; }
  .item-list { gap: 10px; }
  .item-card { position: relative; grid-template-columns: 96px minmax(0, 1fr); gap: 10px 11px; min-height: 0; padding: 12px 37px 13px 0; border: 1px solid #e7ebf0; border-radius: 11px; }
  .item-name-wrap { grid-column: 1 / -1; }
  .item-card input { height: 43px; font-size: 14px; }
  .item-quantity-wrap, .item-price-wrap { display: flex; flex-direction: column; gap: 5px; }
  .item-mobile-label { display: block; margin-bottom: 1px; color: #8490a1; font-size: 10px; font-weight: 600; }
  .item-quantity { max-width: 95px; }
  .money-input { height: 43px; }
  .money-input input { height: 41px; font-size: 14px; }
  .item-total-wrap { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding-top: 8px; border-top: 1px dashed #e8ecf1; text-align: left; }
  .item-total-wrap output { color: var(--navy); font-size: 14px; }
  .remove-item { position: absolute; top: 10px; right: 7px; width: 31px; height: 31px; background: #f7f8fa; }
  .add-item { margin: 13px 0 15px; font-size: 12px; }
  .total-bar { margin: 0 -14px; padding: 14px 16px; }
  .total-caption { font-size: 13px; }
  .total-bar small { font-size: 10px; }
  .grand-total { font-size: 23px; }
  .payment-options { gap: 7px; margin-bottom: 16px; }
  .payment-choice { flex: 1 1 auto; }
  .payment-choice span { width: 100%; min-height: 42px; padding: 0 10px; font-size: 11px; }
  .workshop-note { margin-top: 17px; }
  .form-actions { display: none; }
  .quick-items { margin: -2px 0 12px; padding: 12px; }
  .quick-chip { min-height: 40px; font-size: 12px; }
  .catalog-row { grid-template-columns: minmax(0, 1fr) 110px 32px; gap: 6px; }
  .catalog-row > input { height: 43px; font-size: 14px; }
  .catalog-row .remove-item { position: static; }
  .convert-card { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
  .convert-actions .button { flex: 1 1 auto; }
  .privacy-note { margin-top: 5px; font-size: 10px; }
  .mobile-actions { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; display: flex; align-items: center; gap: 9px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(215,222,232,.9); background: rgba(255,255,255,.96); box-shadow: 0 -8px 24px rgba(24,36,58,.07); backdrop-filter: blur(12px); }
  .mobile-actions .button { min-height: 48px; padding: 0 13px; font-size: 12px; }
  .mobile-actions .button-quiet { flex: 0 0 auto; }
  .mobile-actions .button-primary { flex: 1 1 auto; }
}

@media (max-width: 370px) {
  .privacy-pill { max-width: 100px; white-space: normal; line-height: 1.25; }
  .privacy-dot { flex: 0 0 7px; }
  .field-grid-two { gap: 10px; }
  .mobile-actions .button { padding: 0 10px; font-size: 11px; }
}

@media print {
  @page { size: A4 portrait; margin: 12mm; }
  html, body { min-width: 0; padding: 0 !important; background: #fff !important; color: #111; }
  body { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .topbar, .doc-nav, .page-wrap, .mobile-actions { display: none !important; }
  .print-sheet { display: block !important; width: 100%; color: #111; }
  .print-header { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 18px; padding: 0 0 12px; border-bottom: 2px solid #17243b; }
  .print-logo { width: 145px; height: auto; }
  .print-shop { color: #313945; font-size: 8pt; line-height: 1.5; }
  .print-date { align-self: start; text-align: right; font-size: 8pt; }
  .print-date b { display: block; margin-bottom: 4px; font-size: 7pt; text-transform: uppercase; }
  .print-title { margin: 12px 0 11px; padding: 7px; background: #17243b !important; color: #fff !important; text-align: center; font-size: 11pt; font-weight: bold; letter-spacing: .04em; }
  .print-section-title { margin: 11px 0 0; padding: 5px 7px; background: #e5e8ec !important; color: #17243b; font-size: 8pt; font-weight: bold; text-transform: uppercase; }
  .print-details { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #aeb5bd; border-top: 0; }
  .print-detail { min-height: 30px; display: flex; align-items: baseline; gap: 5px; padding: 6px 8px; border-right: 1px solid #d4d8dd; border-bottom: 1px solid #d4d8dd; font-size: 8.5pt; }
  .print-detail:nth-child(2n) { border-right: 0; }
  .print-detail b { color: #535d68; font-size: 7pt; text-transform: uppercase; }
  .print-table { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
  .print-table th, .print-table td { border: 1px solid #aeb5bd; padding: 6px 8px; }
  .print-table th { background: #edf0f3 !important; font-size: 7pt; text-align: left; text-transform: uppercase; }
  .print-table th:nth-child(n+2), .print-table td:nth-child(n+2) { text-align: right; }
  .print-total-row td { background: #f0f1f3 !important; font-weight: bold; }
  .print-total-row td:last-child { color: #17243b; font-size: 10pt; }
  .print-bottom { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #aeb5bd; border-top: 0; }
  .print-bottom-cell { min-height: 33px; padding: 7px 8px; border-right: 1px solid #d4d8dd; font-size: 8pt; }
  .print-bottom-cell:nth-child(2n) { border-right: 0; }
  .print-bottom-cell b { color: #535d68; font-size: 7pt; text-transform: uppercase; }
  .print-workshop { margin-top: 12px; color: #626b75; text-align: center; font-size: 7pt; line-height: 1.5; }
  .print-empty { color: #858d97; font-style: italic; }
  .print-bottom-wide { grid-column: 1 / -1; border-top: 1px solid #d4d8dd; border-right: 0; }
  .print-statement { margin: 4px 0 6px; padding: 10px 12px; border: 1px solid #aeb5bd; font-size: 10pt; line-height: 1.6; }
  .print-place-date { margin: 18px 0 0; text-align: right; font-size: 9pt; }
  .print-signatures { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; margin-top: 42px; }
  .print-signatures-single { grid-template-columns: minmax(0, 320px); justify-content: center; margin-top: 46px; }
  .print-sign { text-align: center; color: #3c4550; font-size: 8pt; }
  .print-sign span { display: block; margin-bottom: 5px; border-top: 1px solid #333; }
  tr, .print-details, .print-bottom, .print-signatures { break-inside: avoid; }
}
