@font-face{font-family:"TechDoc Serif Figures";src:local("Times New Roman");unicode-range:U+0030-0039}
:root {
  --paper: #f3efe7;
  --panel: #fffdf9;
  --ink: #171918;
  --muted: #686b66;
  --accent: #293f49;
  --warm: #293f49;
  --line: #d8d2c7;
  --soft: #e9e3d8;
  --error: #9d332f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; overscroll-behavior-x: none; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button, a { outline-offset: 4px; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--warm); }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
[hidden] { display: none !important; }
.skip { position: absolute; left: 16px; top: -100px; background: white; padding: 12px; z-index: 50; }
.skip:focus { top: 12px; }

.page-shell {
  width: min(1240px, calc(100% - 56px));
  min-height: 100svh;
  margin: auto;
  padding: clamp(24px, 4vh, 48px) 0;
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
  column-gap: clamp(42px, 7vw, 110px);
  row-gap: 0;
  align-items: start;
}
.page-shell > footer { grid-column: 1 / -1; }
.studio-intro { position: sticky; top: 54px; min-height: calc(100svh - 108px); display: flex; flex-direction: column; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: 11px; width: max-content; color: var(--accent); text-decoration: none; font: 700 29px/1 "TechDoc Serif Figures",Georgia, "Times New Roman", serif; letter-spacing: -1.2px; }
.brand-mark { flex: none; overflow: visible; }
.intro-copy { margin: auto 0; }
h1 { max-width: 9.6em; margin-bottom: 30px; font: 500 clamp(40px, 4.4vw, 62px)/1.02 "TechDoc Serif Figures",Georgia, "Times New Roman", serif; letter-spacing: -.04em; }
.title-flow { position: relative; display: grid; overflow: hidden; overflow-wrap: anywhere; }
#title-flow-text { position: absolute; inset: 0; }
.title-flow > span { grid-area: 1 / 1; }
.title-flow-measure { visibility: hidden; }
.service-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 28px; max-width: 560px; }
.service-steps li { position: relative; flex: 1; min-width: 0; color: var(--accent); }
.service-steps li:not(:last-child)::after { content: "→"; position: absolute; top: 2px; left: calc(100% + 14px); transform: translateX(-50%); color: var(--muted); font-size: 14px; }
.service-steps strong, .service-steps span { display: block; }
.service-steps strong { font-size: 13px; line-height: 1.25; }
.service-steps span { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.35; }

.order-panel { position: relative; min-width: 0; padding: clamp(24px, 3.5vw, 44px); background: var(--panel); border: 1px solid #d2cabe; border-radius: 3px; box-shadow: 0 28px 80px rgba(48, 42, 32, .10); }
.stage h2 { margin-bottom: 9px; font: 500 30px/1.15 "TechDoc Serif Figures",Georgia, "Times New Roman", serif; letter-spacing: -.02em; }
.sub { margin-bottom: 25px; color: var(--muted); font-size: 13px; }
.drop { margin-bottom: 12px; padding: 34px 22px; background: #faf7f1; border: 1px dashed #a9a093; text-align: center; transition: border-color .18s, background .18s; }
.drop.drag { background: #f1e6dc; border-color: var(--warm); }
.drop svg { display: block; margin: 0 auto 15px; color: var(--accent); }
.upload { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; padding: 11px 21px; background: var(--ink); color: white; cursor: pointer; font-size: 13px; font-weight: 700; }
.drop p { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.fileinput { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; clip-path: inset(50%); overflow: hidden; }
.fileinput:focus-visible + .upload { outline: 3px solid var(--warm); outline-offset: 4px; }
.accepted-files { margin: 18px 0 6px; }
.accepted-files h3 { margin-bottom: 4px; color: var(--accent); font-size: 13px; letter-spacing: .02em; }
.filelist { list-style: none; padding: 0; margin: 0; }
.file-row { display: flex; justify-content: flex-start; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: 0; }
.file-info { min-width: 0; flex: 0 1 auto; }
.filename { overflow-wrap: anywhere; font-size: 12px; font-weight: 700; }
.file-status, .file-error { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.file-status-error, .file-error { color: var(--error); }
.file-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.file-action, .textbtn, .back { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; border: 0; background: none; color: var(--accent); font-size: 11px; }
.file-action, .textbtn { padding: 7px 6px; text-decoration: underline; text-underline-offset: 3px; }
.back { margin: 0 0 22px; padding: 0; font-size: 12px; }
.order-details { margin-top: 20px; padding-top: 0; animation: reveal .28s ease-out; }
.source-note { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 19px; min-width: 0; }
.field > label, legend { font-size: 12px; font-weight: 700; }
.optional { color: var(--muted); font-weight: 400; }
input, textarea, select { width: 100%; min-height: 48px; padding: 11px 13px; background: white; border: 1px solid #bdb5a9; border-radius: 0; color: var(--ink); font-size: 16px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 0; border-color: var(--warm); box-shadow: inset 0 0 0 1px var(--warm); }
textarea { min-height: 70px; overflow-y: hidden; resize: none; }
.language-field { position: relative; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 5px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 8px; }
.choice-cards { display: grid; gap: 7px; }
.choice-card { position: relative; display: block; }
.choice-card input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.choice-card span { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 10px 13px; background: white; border: 1px solid #bdb5a9; cursor: pointer; font-size: 13px; pointer-events: none; }
.choice-card span::after { content: ""; width: 18px; height: 18px; border: 1px solid #aaa195; border-radius: 50%; }
.choice-card input:checked + span { background: #f0f3f3; border-color: var(--accent); }
.choice-card input:checked + span::after { content: "✓"; display: grid; place-items: center; background: var(--accent); border-color: var(--accent); color: white; font-size: 11px; }
.choice-card input:focus-visible + span { outline: 0; border-color: var(--warm); box-shadow: inset 0 0 0 1px var(--warm); }
.hint { margin: 4px 0 15px; color: var(--muted); font-size: 11px; }
.primary { display: block; width: 100%; min-height: 51px; padding: 15px 19px; background: var(--ink); border: 0; border-radius: 0; color: white; font-size: 14px; font-weight: 700; }
.primary:hover { background: var(--accent); }
.primary:disabled { background: #aaa8a2; cursor: not-allowed; }
.notice { margin: 18px 0; padding: 14px; background: #ede8df; color: #4e514d; font-size: 12px; }
.error { margin: 0; padding: 8px 0; color: var(--error); font-size: 12px; }
.error:empty { display: none; }
.quiet { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; text-align: center; }
.summary { margin: 22px 0; }
.summary div { display: flex; justify-content: space-between; gap: 22px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.summary dt { color: var(--muted); }
.summary dd { max-width: 66%; margin: 0; overflow-wrap: anywhere; font-weight: 700; text-align: right; }
.amount { font: 500 38px/1 "TechDoc Serif Figures",Georgia, "Times New Roman", serif; }
.costbox { margin: 20px 0; padding: 20px; border: 1px solid var(--line); }
.costbox p { margin: 0 0 7px; color: var(--muted); font-size: 12px; }
.success-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 12px 0 22px; background: var(--accent); border-radius: 50%; color: white; font-size: 26px; }
.success-email { overflow-wrap: anywhere; font-weight: 700; }
.loading-dot { display: inline-block; width: 14px; height: 14px; margin-right: 9px; border: 2px solid #ffffff70; border-top-color: white; border-radius: 50%; vertical-align: middle; animation: spin .7s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes reveal { from { transform: translateY(8px); } to { transform: none; } }

@media (max-width: 980px) {
  .page-shell { width: min(700px, calc(100% - 40px)); padding: 34px 0 56px; grid-template-columns: 1fr; gap: 38px; }
  .studio-intro { position: static; min-height: 0; }
  .intro-copy { margin: 42px 0 0; }
  h1 { max-width: 11em; }
  .order-panel { padding: 32px; }
}

@media (max-width: 520px) {
  .page-shell { width: 100%; padding: 22px 0 0; gap: 30px; }
  .studio-intro { padding: 0 18px; }
  .brand { gap: 9px; font-size: 26px; }
  .brand-mark { width: 46px; height: 41px; }
  .intro-copy { margin-top: 28px; }
  h1 { margin-bottom: 23px; font-size: clamp(34px, 11.5vw, 40px); }
  .service-steps { grid-template-columns: 1fr; gap: 24px; }
  .service-steps li:not(:last-child)::after { content: "↓"; top: auto; right: auto; bottom: -14px; left: 3px; transform: translateY(50%); font-size: 11px; }
  .service-steps span { margin-top: 2px; }
  .order-panel { padding: 26px 18px; border-right: 0; border-bottom: 0; border-left: 0; box-shadow: 0 -12px 40px rgba(48, 42, 32, .07); }
  .choice-grid { grid-template-columns: 1fr; }
  .drop { padding: 34px 14px; }
  .stage h2 { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .order-details, .loading-dot { animation: none; }
}

/* Единый вертикальный ритм параметров: ошибки не добавляют пустые отступы. */
.order-details { display: grid; gap: 20px; }
.order-details > .source-note, .order-details > .field, .order-details > .choice-grid { margin-bottom: 0; }
.order-details > .hint { margin: -13px 0 0; }
.order-details > .quiet { margin-top: -8px; }
.choice-card span { gap: 12px; }
.choice-card span::after { flex: none; }
.file-actions { flex: 0 0 auto; }
@media (max-width: 520px) { .file-actions { flex-direction: column; gap: 0; } .service-steps { gap: 24px; } .service-steps li:not(:last-child)::after { bottom: -12px; } }

.file-saved { margin: 3px 0 0; color: #26734a; font-size: 11px; }
.choice-grid { grid-template-columns: 1fr; }

body,button,input,textarea,select,h1,h2,h3,.stage h2,.brand,.amount,.button{font-variant-numeric:lining-nums tabular-nums}

.file-status,.file-error,.file-saved,.file-action,.filename,.accepted-files h3,#file-limits,.hint{font-size:14px}
.field > label,legend,#status,#preliminary-price,.drop p{font-size:14px}

select{appearance:none;-webkit-appearance:none;height:48px;padding-right:38px;background-image:linear-gradient(45deg,transparent 50%,var(--ink) 50%),linear-gradient(135deg,var(--ink) 50%,transparent 50%);background-position:calc(100% - 18px) center,calc(100% - 13px) center;background-size:5px 5px;background-repeat:no-repeat}

/* Duplicate live announcements stay available to assistive technology without widening the page. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.stage, form, .file-actions { min-width: 0; }
.error, .quiet, .sub, .file-status, .file-error, .file-saved { overflow-wrap: anywhere; }
.file-actions { max-width: 45%; }
.file-action { overflow-wrap: anywhere; text-align: left; }
.file-limits { margin: 0 0 10px; color: var(--muted); text-align: center; font-size: 14px; overflow-wrap: anywhere; }
.composition-option { min-width: 0; display: grid; }
.sample-toggle { justify-self: start; min-height: 44px; border: 0; padding: 8px 14px 8px 0; background: none; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.sample-popup { position: fixed; z-index: 20; display: flex; flex-direction: column; padding: 12px; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 12px 35px #302a2026; border-radius: 3px; }
.sample-viewport { min-height: 0; overflow: hidden; max-height: 520px; }
.sample-viewport:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sample-viewport img { display: block; width: auto; height: auto; max-width: 100%; max-height: var(--sample-image-height, 520px); margin: auto; cursor: pointer; }
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; padding: 13px 0; font-size: 14px; }
.price-row strong { font-size: 14px; }
.price-row span { min-width: 0; overflow-wrap: anywhere; color: var(--muted); }
.price-row[data-state=ready] span { color: var(--ink); }
.estimate-retry { margin-bottom: 0; }
