:root {
  --ot-green: #008b3c;
  --ot-ink: #1b1b1b;
  --ot-body: #3b3b3b;
  --ot-muted: #5c5c5c;
  --ot-line: #d8d8d8;
  --ot-fill: #f7f7f7;
  --ot-white: #ffffff;
  --ot-w: 210mm;
  --ot-h: 297mm;
  --ot-pad: 9mm;
}

* { box-sizing: border-box; }

body.ot {
  margin: 0;
  padding: 0 0 24px;
  background: #ececec;
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 9.5pt;
  line-height: 1.35;
  color: var(--ot-body);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.ot-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: var(--ot-ink);
  color: var(--ot-white);
}

.ot-bar-start {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ot-bar-brand {
  display: flex;
  align-items: center;
  flex: none;
  line-height: 0;
}
.ot-bar-brand img {
  display: block;
  height: 32px;
  width: auto;
}

.ot-bar-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ot-white);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.ot-bar-back:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #fff;
  color: var(--ot-white);
}
.ot-bar-back-ico {
  width: 16px;
  height: 16px;
  flex: none;
}

.ot-bar-actions { display: flex; gap: 8px; }

.ot-btn {
  padding: 9px 18px;
  border: 1px solid var(--ot-green);
  border-radius: 999px;
  background: var(--ot-green);
  color: var(--ot-white);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.ot-btn:hover { background: #00702f; border-color: #00702f; }

.ot-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--ot-white);
}
.ot-btn--ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

.ot-btn:focus-visible,
.ot-bar-back:focus-visible,
.ot-bar-brand:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (max-width: 640px) {
  .ot-bar { padding: 8px 12px; gap: 10px; }
  .ot-bar-start { gap: 10px; }
  .ot-bar-brand img { height: 26px; }
  .ot-bar-back-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .ot-bar-back { padding: 7px; }
}

.ot-hint {
  max-width: var(--ot-w);
  margin: 12px auto 0;
  padding: 0 4px;
  font-size: 13px;
  color: #555;
  text-align: center;
}

.ot-page {
  position: relative;
  width: var(--ot-w);
  min-height: var(--ot-h);
  height: auto;
  margin: 14px auto;
  padding: var(--ot-pad);
  background: var(--ot-white);
  color: var(--ot-body);
  overflow: visible;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 3.2mm;
}

.ot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 2.5mm;
  border-bottom: 1px solid var(--ot-line);
  flex: none;
}

.ot-logo { height: 11mm; width: auto; }

.ot-contact {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: right;
  font-size: 8.5pt;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ot-ink);
}

.ot-contact li { white-space: nowrap; }

.ot-ico {
  width: 1em;
  height: 1em;
  margin-right: 5px;
  vertical-align: -0.15em;
  color: var(--ot-green);
  fill: currentColor;
}

.ot-body {
  display: flex;
  flex-direction: column;
  gap: 2.4mm;
  flex: 1 1 auto;
  min-height: 0;
}

.ot-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2mm;
  text-align: center;
  flex: none;
}

.ot-title {
  margin: 0;
  font-size: 15pt;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ot-ink);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.ot-kicker {
  margin: 0;
  font-size: 8pt;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ot-green);
}

.ot-lead {
  margin: 0;
  max-width: 176mm;
  font-size: 9pt;
  line-height: 1.35;
  color: var(--ot-body);
}

.ot-section {
  margin: 0;
  font-size: 8pt;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ot-green);
}

.ot-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4mm;
  flex: none;
}

.ot-field {
  display: flex;
  flex-direction: column;
  gap: 1.2mm;
  min-width: 0;
}

.ot-label {
  font-size: 9.5pt;
  font-weight: 600;
  color: var(--ot-ink);
}

.ot-field--notes {
  /* flex: 1 1 auto; */
}

.ot-textarea,
.ot-row-input textarea,
.ot-row-input .ot-input {
  display: block;
  width: 100%;
  height: 24px;
  min-height: 24px;
  margin: 0;
  padding: 2px 7px;
  border: 1px solid var(--ot-line);
  border-radius: 2px;
  background: var(--ot-fill);
  font: inherit;
  font-size: 9.5pt;
  line-height: 18px;
  color: var(--ot-ink);
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ot-textarea,
.ot-row-input textarea {
  field-sizing: content;
}

.ot-textarea:focus,
.ot-row-input textarea:focus,
.ot-row-input .ot-input:focus {
  outline: 2px solid var(--ot-green);
  outline-offset: -2px;
  background: var(--ot-white);
  border-color: var(--ot-green);
}

.ot-textarea::placeholder,
.ot-row-input textarea::placeholder,
.ot-row-input .ot-input::placeholder {
  color: #9a9a9a;
}

.ot-row-input .ot-input {
  background: var(--ot-white);
  white-space: nowrap;
  overflow: hidden;
  field-sizing: fixed;
  color-scheme: light;
  cursor: pointer;
}

.ot-row-input .ot-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.75;
}

.ot-textarea--notes {
  flex: 1 1 auto;
  height: auto;
  min-height: 120px;
  field-sizing: fixed;
}

.ot-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ot-line);
  border-radius: 3px;
  overflow: visible;
  background: var(--ot-white);
  flex: none;
}

.ot-table-head,
.ot-row {
  display: grid;
  grid-template-columns: 34% 1fr;
  gap: 8px;
  margin: 0;
  padding: 4px 8px;
  align-items: center;
}

.ot-table-head {
  background: var(--ot-ink);
  color: var(--ot-white);
  font-size: 7.5pt;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  align-items: center;
  flex: none;
}

.ot-row {
  border-top: 1px solid var(--ot-line);
  cursor: text;
  flex: none;
}

.ot-row:nth-child(odd) { background: var(--ot-fill); }

.ot-row-copy {
  display: flex;
  align-items: center;
  min-width: 0;
  font-size: 9.5pt;
  font-weight: 600;
  color: var(--ot-ink);
}

.ot-row-input {
  display: flex;
  min-width: 0;
  min-height: 0;
}

.ot-row-input textarea {
  background: var(--ot-white);
}

.ot-legal {
  margin-top: auto;
  padding: 2.8mm 4mm;
  border: 1px solid var(--ot-line);
  background: var(--ot-fill);
  font-size: 8pt;
  line-height: 1.32;
  flex: none;
}

.ot-legal p { margin: 0 0 1.4mm; }
.ot-legal p:last-child { margin-bottom: 0; }

.ot-legal ul {
  margin: 0 0 1.4mm;
  padding-left: 16px;
}

.ot-legal li { margin-bottom: 0.6mm; }

.ot-return {
  font-weight: 600;
  color: var(--ot-ink);
}

.ot-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8mm;
  padding-top: 2mm;
  border-top: 1px solid var(--ot-line);
  font-size: 8pt;
  color: var(--ot-muted);
  flex: none;
}

.ot-foot-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ot-foot-brand { white-space: nowrap; letter-spacing: 0.08em; }

@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  html, body.ot {
    width: 210mm;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: #fff;
  }

  [data-ot-bar] { display: none !important; }

  .ot-page {
    width: 210mm;
    min-height: 297mm;
    height: auto;
    max-height: none;
    margin: 0;
    box-shadow: none;
    overflow: visible;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .ot-textarea,
  .ot-row-input textarea,
  .ot-row-input .ot-input {
    background: transparent !important;
    overflow: hidden !important;
  }
}

@media screen and (max-width: 230mm) {
  .ot-page {
    transform-origin: top center;
    transform: scale(var(--ot-scale, 1));
  }
}
