/* Agreement templates: form on the left, the finished agreement as a paper sheet on the right. */
.guide:has([data-tool="avtal"]) { max-width: calc(1120px + 2 * var(--gutter)); }
.guide:has([data-tool="avtal"]) .guide__body > :not(.tool) { max-width: 720px; }
.av-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s-5); align-items: start; }
.av-form { display: grid; gap: var(--s-2); }
.av-sec { border: 1px solid var(--rule); border-radius: var(--r-2); background: var(--ground); }
.av-sec summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 14px; cursor: pointer; font-weight: 600; }
.av-sec summary::-webkit-details-marker { display: none; }
.av-sec summary .ico { margin-left: auto; width: 20px; height: 20px; color: var(--ink2); transition: transform var(--d-ui); }
.av-sec[open] summary .ico { transform: rotate(45deg); }
.av-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 0 14px 16px; }
.av-field { display: grid; gap: 4px; font-size: 14px; color: var(--ink); min-width: 0; }
.av-field > span { font-weight: 600; font-size: 13px; }
.av-wide, .av-check, .av-note { grid-column: 1 / -1; }
.av-field input, .av-field select, .av-field textarea { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 10px; background: var(--sheet); color: var(--ink); font-size: 15px; }
.av-field textarea { min-height: 76px; resize: vertical; }
.av-field input:focus, .av-field select:focus, .av-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.av-help { display: block; color: var(--ink2); font-size: 12.5px; font-weight: 400; line-height: 1.4; }
.av-check { border-bottom: 0; align-items: flex-start; padding-top: 6px; }
.av-check .tool__box { margin-top: 2px; }
.av-note { margin: 0 !important; font-size: 13.5px; color: var(--ink2); background: var(--sheet); border-left: 3px solid var(--accent); padding: 8px 10px; border-radius: 6px; }
.av-out { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; border-radius: var(--r-2); box-shadow: var(--shadow-1); }
.av-doc { background: #FFFDF8; color: #2A211C; padding: clamp(18px, 3vw, 36px); font-family: Georgia, "Iowan Old Style", serif; font-size: 14.5px; line-height: 1.55; }
.av-doc h2 { font-family: var(--serif); font-size: 22px; margin: 0 0 12px; color: #2A211C; }
.av-doc h3 { font-size: 15px; margin: 18px 0 4px; font-family: var(--sans); font-weight: 700; color: #2A211C; }
.av-doc p, .av-doc li { color: #2A211C !important; margin: 0 0 6px; }
.av-doc ul { padding-left: 20px; margin: 0 0 6px; }
.av-signs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; margin-top: 24px; }
.av-sign span { display: block; font-size: 12.5px; color: #6B5D53; margin-bottom: 10px; }
.av-line { border-bottom: 1px solid #2A211C; height: 30px; }
.av-foot { font-size: 12px !important; color: #6B5D53 !important; margin-top: 20px !important; border-top: 1px solid #E2D6C6; padding-top: 10px; }
@media (max-width: 900px) { .av-grid { grid-template-columns: 1fr; } .av-out { position: static; max-height: none; } }
@media (max-width: 520px) { .av-fields { grid-template-columns: 1fr; } .av-signs { grid-template-columns: 1fr; } }
@media print {
  body.av-printing * { visibility: hidden !important; }
  body.av-printing .av-doc, body.av-printing .av-doc * { visibility: visible !important; }
  body.av-printing .av-out { position: absolute; left: 0; top: 0; max-height: none; overflow: visible; box-shadow: none; }
  body.av-printing .av-doc { padding: 0; font-size: 12pt; }
}
