/* Daiva – sutarčių puslapiai (2026-11-24). Prefiksas dsut-. Temos spalvos paveldimos (currentColor, var() su atsarginėmis reikšmėmis). */
.dsut-page { --dsut-acc: var(--daiva-accent, #1f6f5f); --dsut-acc-2: var(--daiva-accent-2, #e8f3f0); --dsut-ink: var(--daiva-ink, #1b1f23); --dsut-mute: #6b7280;
  --dsut-line: #e5e7eb; --dsut-bg: #fff; --dsut-soft: #f6f8f7; --dsut-r: 14px; --dsut-err: #b42318; --dsut-warn: #b54708; --dsut-ok: #067647;
  max-width: 1180px; margin: 0 auto; padding: 16px 16px 48px; color: var(--dsut-ink); line-height: 1.55; -webkit-font-smoothing: antialiased; }
.dsut-page h1, .dsut-page h2, .dsut-page h3 { line-height: 1.2; margin: 0 0 .5em; }
.dsut-page a { color: var(--dsut-acc); }
.dsut-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; color: var(--dsut-mute); margin: 4px 0 14px; }
.dsut-crumbs a { color: inherit; text-decoration: none; }
.dsut-crumbs a:hover { text-decoration: underline; }
.dsut-hero { margin-bottom: 18px; }
.dsut-h1 { font-size: clamp(1.6rem, 2.2vw + 1rem, 2.4rem); letter-spacing: -.01em; }
.dsut-lead { font-size: 1.05rem; color: #374151; max-width: 68ch; margin: 0; }

/* ───────── programa ───────── */
.dsut-app { position: relative; display: grid; grid-template-columns: minmax(340px, 46%) 1fr; gap: 0; border: 1px solid var(--dsut-line); border-radius: var(--dsut-r); background: var(--dsut-bg);
  box-shadow: 0 10px 30px rgba(16, 24, 40, .06); overflow: hidden; height: min(78vh, 860px); min-height: 560px; }
.dsut-app.is-busy .dsut-send { opacity: .5; }
.dsut-tabs { display: none; }
.dsut-chat, .dsut-doc { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.dsut-chat { border-right: 1px solid var(--dsut-line); }
.dsut-chat-head, .dsut-doc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--dsut-line); background: var(--dsut-soft); }
.dsut-ava { width: 36px; height: 36px; border-radius: 50%; background: var(--dsut-acc); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.dsut-chat-ttl { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dsut-chat-ttl strong { font-size: 1rem; }
.dsut-chat-ttl small { color: var(--dsut-mute); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsut-chat-tools { display: flex; gap: 4px; }
.dsut-ico { width: 38px; height: 38px; border: 0; background: transparent; border-radius: 10px; color: #4b5563; display: grid; place-items: center; cursor: pointer; padding: 0; flex: none; }
.dsut-ico svg { width: 20px; height: 20px; fill: currentColor; }
.dsut-ico:hover { background: #e9eef0; color: var(--dsut-ink); }
.dsut-ico.is-on { color: var(--dsut-acc); background: var(--dsut-acc-2); }
.dsut-ico.is-rec { color: #fff; background: var(--dsut-err); animation: dsut-pulse 1.2s infinite; }
@keyframes dsut-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 24, .4); } 50% { box-shadow: 0 0 0 8px rgba(180, 35, 24, 0); } }
.dsut-msgs { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; overscroll-behavior: contain; }
.dsut-msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: .97rem; word-wrap: break-word; overflow-wrap: anywhere; }
.dsut-msg p { margin: 0 0 .45em; } .dsut-msg p:last-child { margin-bottom: 0; }
.dsut-msg ul { margin: .3em 0 .3em 1.1em; padding: 0; }
.dsut-msg code { background: rgba(0,0,0,.06); padding: 0 .3em; border-radius: 4px; }
.dsut-msg-assistant { align-self: flex-start; background: var(--dsut-soft); border-bottom-left-radius: 6px; }
.dsut-msg-user { align-self: flex-end; background: var(--dsut-acc); color: #fff; border-bottom-right-radius: 6px; }
.dsut-msg-notice { align-self: center; background: #fff7ed; color: #7c2d12; font-size: .88rem; border: 1px solid #fed7aa; max-width: 96%; text-align: center; }
.dsut-msg-notice.dsut-err { background: #fef3f2; color: var(--dsut-err); border-color: #fecdca; }
.dsut-msg-notice.dsut-switch { background: var(--dsut-acc-2); color: var(--dsut-acc); border-color: #bfe3d9; }
.dsut-typing { display: flex; gap: 4px; padding: 14px 16px; }
.dsut-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9ca3af; animation: dsut-dot 1.2s infinite; }
.dsut-typing i:nth-child(2) { animation-delay: .2s; } .dsut-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes dsut-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.dsut-rec { padding: 6px 14px; font-size: .85rem; color: var(--dsut-err); background: #fef3f2; border-top: 1px solid #fecdca; }
.dsut-input { display: flex; align-items: flex-end; gap: 6px; padding: 10px; border-top: 1px solid var(--dsut-line); background: var(--dsut-bg); }
.dsut-input textarea { flex: 1; resize: none; border: 1px solid var(--dsut-line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 1rem; line-height: 1.4; min-height: 42px; max-height: 160px; background: #fff; color: var(--dsut-ink); }
.dsut-input textarea:focus { outline: 2px solid var(--dsut-acc); outline-offset: 1px; border-color: transparent; }
.dsut-send { width: 42px; height: 42px; border: 0; border-radius: 12px; background: var(--dsut-acc); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; padding: 0; }
.dsut-send svg { width: 20px; height: 20px; fill: currentColor; }
.dsut-send:disabled { cursor: default; }

/* dokumentas */
.dsut-doc-head strong { flex: 1; }
.dsut-progress { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.dsut-progress small { color: var(--dsut-mute); white-space: nowrap; font-size: .8rem; }
.dsut-bar { flex: 1; height: 6px; border-radius: 3px; background: #e5e7eb; overflow: hidden; min-width: 70px; }
.dsut-bar i { display: block; height: 100%; width: 0; background: var(--dsut-acc); transition: width .4s; }
.dsut-doc-body { flex: 1; overflow-y: auto; padding: 18px; background: #eef0f2; }
.dsut-doc-empty { color: var(--dsut-mute); text-align: center; margin: 40px 16px; }
.dsut-paper { background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 8px 24px rgba(0,0,0,.06); padding: clamp(18px, 4vw, 40px); font-family: Georgia, 'Times New Roman', serif; font-size: .95rem; color: #111; max-width: 760px; margin: 0 auto; }
.dsut-paper-banner { font-family: inherit; font-size: .78rem; color: #6b7280; margin: 0 0 14px; }
.dsut-paper-title { text-align: center; font-size: 1.25rem; margin: 0 0 18px; text-transform: uppercase; letter-spacing: .02em; }
.dsut-paper section h4 { font-size: .95rem; margin: 16px 0 6px; text-transform: uppercase; }
.dsut-clause { display: grid; grid-template-columns: 3.2em 1fr; gap: 6px; margin: 0 0 6px; text-align: justify; hyphens: auto; }
.dsut-cl-nr { color: #374151; }
.dsut-miss { background: #fff2cc; color: #7a5a00; border-radius: 3px; padding: 0 3px; font-style: italic; }
.dsut-paper-src { margin-top: 18px; padding-top: 10px; border-top: 1px solid #e5e7eb; font-size: .78rem; color: #4b5563; font-family: inherit; }
.dsut-paper-src ul { margin: 4px 0 0 1.1em; padding: 0; }
.dsut-doc-foot { border-top: 1px solid var(--dsut-line); padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--dsut-bg); }
.dsut-notes { display: flex; flex-direction: column; gap: 6px; max-height: 32vh; overflow: auto; }
.dsut-notes:empty { display: none; }
.dsut-note { font-size: .86rem; padding: 8px 10px; border-radius: 10px; }
.dsut-note ul { margin: 4px 0 0 1.1em; padding: 0; }
.dsut-note-err { background: #fef3f2; color: var(--dsut-err); }
.dsut-note-warn { background: #fffaeb; color: var(--dsut-warn); }
.dsut-note-miss { background: var(--dsut-soft); color: #374151; display: flex; flex-direction: column; gap: 6px; }
.dsut-chips { display: flex; flex-wrap: wrap; gap: 4px; max-height: 3.6em; overflow: auto; }
.dsut-chips i { font-style: normal; font-size: .78rem; background: #fff; border: 1px solid var(--dsut-line); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.dsut-limit { font-size: .88rem; padding: 8px 10px; border-radius: 10px; background: #fff7ed; color: #7c2d12; }
.dsut-limit a { font-weight: 600; }
.dsut-dl, .dsut-dl-signed { border: 0; border-radius: 12px; padding: 12px 16px; font: inherit; font-weight: 600; cursor: pointer; background: var(--dsut-acc); color: #fff; transition: transform .1s; }
.dsut-dl:disabled { background: #cfd4d9; color: #fff; cursor: not-allowed; }
.dsut-dl.is-ready { box-shadow: 0 6px 18px rgba(31, 111, 95, .35); }
.dsut-dl.is-loading, .dsut-dl-signed.is-loading { opacity: .6; }
.dsut-dl-signed { background: #fff; color: var(--dsut-acc); border: 1px solid var(--dsut-acc); }
.dsut-disc { font-size: .76rem; color: var(--dsut-mute); margin: 0; }
.dsut-nojs { padding: 14px; }

/* Sutarties puslapyje Daiva jau yra pačiame puslapyje — temos plaukiojantis pokalbio burbulas čia nerodomas (dubliuotųsi ir dengtų dokumentą telefone). */
body.dsut-body #daivaBubble { display: none !important; }

/* visas ekranas */
.dsut-app.dsut-fullscreen { position: fixed; inset: 0; z-index: 9999; height: 100dvh; min-height: 0; border-radius: 0; border: 0; }
html.dsut-lock, html.dsut-lock body { overflow: hidden; }
html.dsut-lock #betaBanner, html.dsut-lock #daivaBubble { display: none !important; }   /* per visą ekraną temos juosta ir burbulas nedengia įvesties */
.dsut-app.dsut-fullscreen .dsut-full { color: var(--dsut-acc); background: var(--dsut-acc-2); }

/* ───────── turinys po programa ───────── */
.dsut-how, .dsut-faq, .dsut-src, .dsut-others { margin-top: 36px; }
.dsut-how ol { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.dsut-how li { counter-increment: s; background: var(--dsut-soft); border-radius: 12px; padding: 14px 14px 14px 52px; position: relative; }
.dsut-how li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--dsut-acc); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.dsut-faq-item { border-bottom: 1px solid var(--dsut-line); padding: 4px 0; }
.dsut-faq-item summary { cursor: pointer; padding: 12px 28px 12px 0; font-weight: 600; list-style: none; position: relative; }
.dsut-faq-item summary::-webkit-details-marker { display: none; }
.dsut-faq-item summary::after { content: '+'; position: absolute; right: 4px; top: 10px; font-size: 1.3rem; color: var(--dsut-acc); }
.dsut-faq-item[open] summary::after { content: '–'; }
.dsut-faq-item p { margin: 0 0 14px; color: #374151; }
.dsut-cite { font-size: .85rem; white-space: nowrap; }
.dsut-src ul { padding-left: 1.2em; margin: 0; }
.dsut-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.dsut-cards a { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--dsut-line); border-radius: 12px; text-decoration: none; color: inherit; background: var(--dsut-bg); transition: border-color .15s, transform .15s; }
.dsut-cards a:hover { border-color: var(--dsut-acc); transform: translateY(-2px); }
.dsut-cards strong { display: block; color: var(--dsut-acc); margin-bottom: 4px; }
.dsut-cards span { font-size: .88rem; color: var(--dsut-mute); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dsut-foot-note { margin-top: 28px; font-size: .82rem; color: var(--dsut-mute); }
.dsut-privacy { margin: 32px 0; }

/* ───────── mobilus ───────── */
@media (max-width: 860px) {
  .dsut-page { padding: 10px 12px 40px; }
  .dsut-app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: min(86vh, 820px); min-height: 520px; }
  .dsut-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--dsut-line); background: var(--dsut-soft); }
  .dsut-tab { border: 0; background: transparent; padding: 12px 8px; font: inherit; font-weight: 600; color: var(--dsut-mute); position: relative; cursor: pointer; }
  .dsut-tab.is-on { color: var(--dsut-acc); }
  .dsut-tab.is-on::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 3px; background: var(--dsut-acc); border-radius: 3px 3px 0 0; }
  .dsut-tab-badge { display: inline-block; color: var(--dsut-err); margin-left: 2px; }
  .dsut-chat { border-right: 0; }
  .dsut-doc { display: none; }
  .dsut-app.dsut-show-doc .dsut-chat { display: none; }
  .dsut-app.dsut-show-doc .dsut-doc { display: flex; }
  .dsut-chat-ttl small { display: none; }
  .dsut-msg { max-width: 92%; }
  .dsut-doc-body { padding: 10px; }
  .dsut-paper { font-size: .9rem; }
  .dsut-progress { min-width: 0; }
  .dsut-progress .dsut-bar { min-width: 50px; }
  .dsut-input textarea { font-size: 16px; }   /* iOS: be automatinio priartinimo */
  .dsut-dl, .dsut-dl-signed { width: 100%; }
}
@media (max-width: 480px) {
  .dsut-chat-head, .dsut-doc-head { padding: 8px 10px; }
  .dsut-ico { width: 36px; height: 36px; }
  .dsut-how ol { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .dsut-msgs { scroll-behavior: auto; } .dsut-typing i, .dsut-ico.is-rec { animation: none; } }
