.wc{--wc-accent:#7a2331;--wc-line:#9ba3ad;box-sizing:border-box;width:100%;max-width:1180px;margin:0 auto;padding:12px 20px 48px;font:15px/1.55 Inter,-apple-system,"Segoe UI",Arial,sans-serif;color:#24272b}
.wc *{box-sizing:border-box}.wc [hidden]{display:none!important}.wc__lead{margin:0 0 24px;color:#565b63;max-width:840px}.wc__section{margin:0 0 16px;padding:12px 16px 16px;border:2px solid var(--wc-line);border-radius:10px;min-width:0}.wc__section legend{padding:0 8px;font-size:20px;font-weight:650}.wc__section legend span{display:inline-grid;place-items:center;width:28px;height:28px;margin-right:7px;border-radius:50%;background:#f5e9ec;color:var(--wc-accent);font-size:15px}.wc__modes,.wc__actions{display:flex;gap:24px;flex-wrap:wrap;align-items:center}.wc input[type=radio],.wc input[type=checkbox]{accent-color:var(--wc-accent);width:18px;height:18px;vertical-align:middle;margin:0 7px 0 0}.wc__upload{display:flex;flex-direction:column;gap:6px;padding:12px;margin-top:8px;border:2px dashed #9ba3ad;border-radius:8px;background:#fafbfc;cursor:pointer}.wc__upload.is-over{border-color:var(--wc-accent);background:#f9eff1}.wc__upload span,.wc__hint{color:#656a72;font-size:13px}.wc__upload input{max-width:100%;margin-top:4px;font:inherit}.wc__hint{margin:10px 0 0}.wc__queue{list-style:none;padding:0;margin:12px 0 0}.wc__queue li{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:10px 0;border-bottom:1px solid #edf0f2;overflow-wrap:anywhere}.wc__queue button{flex-shrink:0;background:none;border:0;text-decoration:underline;cursor:pointer;color:var(--wc-accent);padding:6px}.wc__languages{display:grid;grid-template-columns:1fr 48px 1fr;gap:18px;align-items:end}.wc__field{display:flex;flex-direction:column;gap:6px;font-weight:550}.wc__field select,.wc__field input{width:100%;min-height:46px;padding:10px 12px;border:1px solid #b9c0c8;border-radius:6px;background:white;color:#24272b;font:inherit;font-weight:400}.wc__field input{max-width:280px}.wc__swap{height:46px;border:1px solid var(--wc-line);background:white;border-radius:6px;font-size:24px;cursor:pointer}.wc__options{display:flex;flex-wrap:wrap;gap:18px 44px;margin-top:24px}.wc__options label{font-weight:550}.wc__options small{display:block;margin:5px 0 0 26px;font-weight:400;color:#656a72}.wc__primary,.wc__secondary{min-height:46px;padding:12px 20px;border-radius:6px;font:inherit;font-weight:600;cursor:pointer}.wc__primary{background:var(--wc-accent);color:white;border:1px solid var(--wc-accent)}.wc__secondary{background:white;color:#363c43;border:1px solid #bac1c9}.wc button:disabled{opacity:.55;cursor:wait}.wc :focus-visible{outline:3px solid #4584cc;outline-offset:3px}.wc__error{color:#9f1d2d;padding:12px 16px;background:#fff2f3;border-left:3px solid #b52d3c}.wc__progress{padding:14px 16px;background:#f1f5fa;border-radius:6px}.wc__result{margin-top:36px;border-top:2px solid var(--wc-line);padding-top:20px}.wc__result h2{font-size:23px;margin:0 0 18px}.wc__table-wrap{overflow-x:auto;border:1px solid var(--wc-line);border-radius:8px}.wc__table{width:100%;border-collapse:collapse;min-width:740px;font-size:14px}.wc__table th{background:#f4f5f7;text-align:left;padding:12px 14px;font-weight:600;color:#4d535b}.wc__table td{padding:14px;border-top:1px solid #e4e7eb;vertical-align:top}.wc__table td:first-child{max-width:290px;overflow-wrap:anywhere}.wc__table td:last-child{white-space:nowrap;font-weight:600}.wc__badge{display:inline-block;padding:4px 8px;border-radius:4px;background:#edf4ee;color:#2d6338;font-size:12px;white-space:nowrap}.wc__badge--estimate{background:#fff3d9;color:#7d5106}.wc__badge--unpriced{background:#fbeaec;color:#982437}.wc__table small{display:block;margin-top:6px;color:#676c74;max-width:240px}.wc__total{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:24px 0 10px}.wc__total span{display:block;color:#575e66}.wc__total strong{display:block;font-size:34px;line-height:1.3;margin-top:4px}.wc__notice{max-width:900px;margin:16px 0 24px;color:#585e66}.wc__explanation{padding:18px 24px;margin:16px 0 24px;background:#f5f6f8;border-radius:8px;font-size:14px}.wc__explanation p:first-child{margin-top:0}.wc__explanation li{margin-bottom:8px;overflow-wrap:anywhere}
@media(max-width:600px){.wc{padding:12px 12px 32px}.wc__section{padding:14px 14px 18px}.wc__section legend{font-size:17px}.wc__languages{grid-template-columns:1fr 42px;gap:12px}.wc__languages label:last-child{grid-column:1/-1}.wc__swap{align-self:end}.wc__total{align-items:flex-start;flex-direction:column}.wc__total strong{font-size:29px}.wc__options{gap:18px}.wc__upload{padding:16px}.wc__actions{gap:12px}.wc__primary{width:100%}.wc__explanation{padding:16px}.wc__modes{gap:16px}}
.wc__services-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px;align-items:start}.wc__service{border:1px solid var(--wc-line);border-radius:8px;padding:8px 10px;background:#fff;min-width:0}.wc__service.is-selected{border-color:#aa6370;background:#fdf8f9}.wc__service-label{display:flex;align-items:center;min-height:36px;font-weight:600;cursor:pointer;gap:4px}.wc__service-label input{flex-shrink:0;margin-top:3px!important}.wc__service-price{margin:0 0 0 29px;font-size:13px;color:#656a72}.wc__service-fields{margin-top:8px;display:grid;gap:8px}.wc__service-fields .wc__hint{margin:0}.wc__service--apostille.is-selected{grid-column:auto}.wc__service--apostille .wc__service-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.wc__service--apostille .wc__hint{grid-column:1/-1}.wc__service-fields select{max-width:100%;text-overflow:ellipsis}.wc__service-result{margin-top:24px}.wc__service-result h3{margin:0 0 12px;font-size:18px}.wc__services-table{min-width:660px}.wc__services-table td:first-child{width:40%;max-width:440px}.wc__services-table small{max-width:none}
@media(max-width:600px){.wc__services-grid{grid-template-columns:1fr}.wc__service--apostille.is-selected{grid-column:auto}.wc__service--apostille .wc__service-fields{grid-template-columns:1fr}.wc__service{padding:8px 10px}.wc__service-label{line-height:1.45}}
.wc{font-family:Inter,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;font-size:16px}
.wc .wc__hint,.wc .wc__upload span,.wc .wc__service-price,.wc .wc__table small{font-size:14px}
.wc .wc__disclosure{border:2px solid var(--wc-line);border-radius:8px;margin:12px 0 16px;min-width:0}
.wc .wc__disclosure>summary{padding:12px 14px;min-height:46px;font-weight:600;cursor:pointer;overflow-wrap:anywhere}
.wc .wc__disclosure>summary small{display:block;font-size:14px;font-weight:400;color:#656a72;margin-top:3px}
.wc .wc__disclosure[open]>summary{border-bottom:1px solid var(--wc-line)}
.wc .wc__documents-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:20px;align-items:start}.wc .wc__document-inputs{min-width:0}.wc .wc__document-help{min-width:0}.wc .wc__help{border:0;border-radius:0;margin:0;padding:0}.wc .wc__help>.wc__hint{display:block;margin-top:8px}.wc .wc__ocr-languages{font-size:14px;margin-top:8px}.wc .wc__ocr-languages>summary{cursor:pointer;min-height:36px;padding:6px 0}.wc .wc__service-label{min-height:44px}.wc .wc__help>summary{padding:10px 0;font-size:14px}
.wc .wc__extras .wc__services{border:0;margin:0;padding:8px 14px 16px}
.wc .wc__extras .wc__services>legend{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
.wc .wc__extras .wc__options{margin:8px 0 14px}
.wc .wc__extras .wc__options label,.wc .wc__modes label{display:flex;align-items:center;min-height:44px;flex-wrap:wrap;cursor:pointer}
.wc .wc__options small{font-size:14px;margin-left:0;width:100%}
.wc .wc__queue button{min-height:44px;min-width:64px}
.wc .wc__edit{margin-top:14px}
.wc button{overflow-wrap:anywhere;min-width:0}
.wc .wc__field select,.wc .wc__field input{min-width:0;max-width:100%;font-size:16px}
.wc .wc__field{min-width:0}.wc .wc__field select{text-overflow:ellipsis}
.wc .wc__form,.wc [data-wc-form],.wc .wc__result{scroll-margin-top:88px}
.wc .wc__result h2{font-size:22px}.wc .wc__total{margin-top:12px}
@media(max-width:600px),(max-width:900px) and (max-height:500px){
  .wc{padding:8px 12px 108px;line-height:1.45}
  .wc .wc__lead{font-size:14px;margin:0 0 12px}
  .wc .wc__section{padding:8px 12px 12px;margin-bottom:12px}
  .wc .wc__section legend{font-size:16px;font-weight:650;padding:0 4px}.wc .wc__section legend span{display:none}
  .wc .wc__modes{gap:4px 12px;flex-wrap:nowrap;font-size:14px}
  .wc .wc__modes label{flex-wrap:nowrap;flex:1;white-space:normal;min-width:0;overflow-wrap:anywhere}
  .wc .wc__modes input{flex-shrink:0}
  .wc .wc__upload{margin-top:4px;padding:10px;gap:4px}
  .wc .wc__upload strong{font-size:16px;padding:4px 0}.wc .wc__upload span{display:none}
  .wc .wc__upload{position:relative;min-height:48px;justify-content:center}
  .wc .wc__upload:focus-within{outline:3px solid #4584cc;outline-offset:3px}
  .wc .wc__upload input{position:absolute;clip-path:inset(50%);width:1px;height:1px;min-height:0;font-size:16px;margin:0;overflow:hidden}
  .wc .wc__upload input::file-selector-button{font:inherit;min-height:44px;border:1px solid #bac1c9;border-radius:6px;background:white;padding:6px 8px}
  .wc .wc__help{margin:0}.wc .wc__help>summary{padding:10px 0}
  .wc .wc__languages{grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr);gap:8px}
  .wc .wc__languages label:last-child{grid-column:auto}
  .wc .wc__field{gap:4px;font-size:14px}.wc .wc__field select{padding:8px 5px}
  .wc .wc__swap{height:46px;align-self:end}
  .wc .wc__hint{margin-top:8px}.wc .wc__queue li{padding:6px 0;gap:8px;font-size:14px}
  .wc .wc__queue li>span{min-width:0}.wc .wc__queue button{font-size:14px;padding:4px}
  .wc .wc__extras>summary{padding:10px 12px}.wc .wc__extras{margin:8px 0 12px}
  .wc .wc__actions{display:grid;grid-template-columns:minmax(0,2fr) minmax(88px,1fr);gap:8px}
  .wc .wc__primary,.wc .wc__secondary{font-size:16px;line-height:1.35;padding:10px 12px;min-height:46px;white-space:normal}
  .wc .wc__actions button{height:100%;width:100%}
  .wc.is-result>[data-wc-form],.wc.is-result>.wc__lead{display:none}
  .wc .wc__result{margin-top:0;padding-top:8px;border-top:0}
  .wc .wc__result h2{font-size:20px;margin-bottom:10px}
  .wc .wc__total{gap:10px;margin:8px 0 16px}.wc .wc__total strong{font-size:28px}
  .wc .wc__total .wc__secondary{width:100%}
  .wc .wc__table-wrap{overflow:visible;border:0;border-radius:0}
  .wc .wc__table{display:block;min-width:0;width:100%;font-size:14px}
  .wc .wc__table thead{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
  .wc .wc__table tbody{display:block;width:100%}
  .wc .wc__table tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);border:1px solid var(--wc-line);border-radius:8px;margin-bottom:12px;overflow-wrap:anywhere}
  .wc .wc__table td{display:block;padding:8px 10px;max-width:none;min-width:0;white-space:normal}
  .wc .wc__table td::before{content:attr(data-label);display:block;color:#656a72;font-size:14px;font-weight:400;margin-bottom:4px}
  .wc .wc__table td:first-child{grid-column:1/-1;border-top:0;max-width:none;font-size:16px;font-weight:600}
  .wc .wc__table td:first-child::before{display:none}
  .wc .wc__table td:nth-child(5){grid-column:1/-1}
  .wc .wc__table .wc__badge{white-space:normal;font-size:14px}
  .wc .wc__table small{max-width:none}
  .wc .wc__services-table td:first-child{width:auto}
  .wc .wc__notice{font-size:14px;margin:12px 0 16px}
  .wc .wc__explanation{padding:14px;font-size:14px}.wc .wc__explanation ul{padding-left:20px}
  .wc .wc__edit{width:100%}
}
@media(min-width:601px) and (max-width:900px) and (max-height:500px){
  .wc{padding-top:0;padding-right:72px;padding-bottom:28px}
  .wc>.wc__lead{display:none}
  .wc [data-wc-form]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px 14px;align-items:start;scroll-margin-top:270px}
  .wc [data-wc-form]>.wc__section:first-child{grid-column:1;grid-row:1/4;margin:0}
  .wc [data-wc-form]>.wc__section:nth-child(2){grid-column:2;margin:0}
  .wc .wc__extras{grid-column:2;margin:0}.wc .wc__actions{grid-column:2}
  .wc .wc__extras>summary{padding-top:8px;padding-bottom:8px}
  .wc .wc__result{scroll-margin-top:270px}
  .wc .wc__error,.wc .wc__progress{grid-column:1/-1}
  .wc .wc__total{flex-direction:row;align-items:center}.wc .wc__total .wc__secondary{width:auto}
}

@media(max-width:900px){.wc .wc__documents-grid{grid-template-columns:1fr;gap:0}.wc .wc__help{padding-left:0;border-left:0}.wc .wc__services-grid{grid-template-columns:1fr}.wc .wc__service--apostille .wc__service-fields{grid-template-columns:1fr}}

/* The existing order form is reused; scope layout fixes to this calculator. */
body[data-tools-layout="written-calculator"] .ovl[data-kind="orderform"]{padding:16px}
body[data-tools-layout="written-calculator"] .ovl[data-kind="orderform"] .ovl__box{display:block;width:min(820px,100%);height:auto;max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain;background:#fff;border-radius:12px;box-shadow:0 24px 60px rgba(15,20,26,.35)}
body[data-tools-layout="written-calculator"] .ovl[data-kind="orderform"] .ovl__body{height:auto;min-height:0}
body[data-tools-layout="written-calculator"] .ovl[data-kind="orderform"] .zayavka-blok{padding:0;min-width:0}
body[data-tools-layout="written-calculator"] .ovl[data-kind="orderform"] .zkorobka{width:100%;max-width:none;margin:0;box-sizing:border-box}
body[data-tools-layout="written-calculator"] .ovl .zraschyot{min-width:0;margin-top:12px}
body[data-tools-layout="written-calculator"] .ovl .zraschyot-stroki{grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:7px 16px}
body[data-tools-layout="written-calculator"] .ovl .zraschyot-stroki dt,
body[data-tools-layout="written-calculator"] .ovl .zraschyot-stroki dd{min-width:0;max-width:100%;margin:0;white-space:normal;overflow-wrap:anywhere;text-align:left;line-height:1.45}
body[data-tools-layout="written-calculator"] .ovl .zraschyot-itogo{flex-wrap:wrap;overflow-wrap:anywhere}
body[data-tools-layout="written-calculator"] .ovl .zzakryt{min-width:44px;min-height:44px;top:0;right:2px}
@media(max-width:600px){
 body[data-tools-layout="written-calculator"] .ovl[data-kind="orderform"]{padding:8px}
 body[data-tools-layout="written-calculator"] .ovl[data-kind="orderform"] .ovl__box{max-height:calc(100dvh - 16px)}
 body[data-tools-layout="written-calculator"] .ovl .zraschyot-stroki{grid-template-columns:minmax(0,1fr);gap:3px}
 body[data-tools-layout="written-calculator"] .ovl .zraschyot-stroki dt{font-weight:600}
 body[data-tools-layout="written-calculator"] .ovl .zraschyot-stroki dd{margin-bottom:6px}
}
