/* Chat to Word Converter — style.css (v20261128a) */
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1c2130; background: #f4f6fb; line-height: 1.55;
}
.hero { background: #1f3864; color: #fff; padding: 28px 20px 24px; text-align: center; position: relative; }
.hero h1 { margin: 0 0 8px; font-size: 30px; line-height: 1.2; }
.hero .tagline { font-size: 17px; margin: 0 0 12px; opacity: .95; }
.hero .honest, .hero .privacy { max-width: 760px; margin: 10px auto 0; font-size: 14px; line-height: 1.55; text-align: left; background: rgba(255,255,255,.1); border-radius: 10px; padding: 10px 14px; }
.lang-switch { position: absolute; top: 12px; right: 14px; display: flex; gap: 6px; }
.lang-switch button { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 5px 11px; font-size: 13px; cursor: pointer; }
.lang-switch button.active { background: #fff; color: #1f3864; font-weight: 700; }
main { max-width: 1020px; margin: 0 auto; padding: 20px 16px 40px; }
section { background: #fff; border-radius: 14px; padding: 20px 22px; margin: 0 0 18px; box-shadow: 0 1px 4px rgba(20,30,60,.08); }
h2 { margin: 0 0 12px; font-size: 21px; }
h3 { margin: 0 0 8px; font-size: 16px; }
.steps ol { margin: 0; padding-left: 22px; }
.steps li { margin: 6px 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.btn { display: inline-block; padding: 9px 15px; border-radius: 9px; border: 1.5px solid #c6cad6; background: #fff; color: #1c2130; font-size: 14px; cursor: pointer; text-decoration: none; font-family: inherit; }
.btn:hover { border-color: #2f6df6; }
.btn.primary { background: #2f6df6; border-color: #2f6df6; color: #fff; font-weight: 600; }
.btn.primary:hover { background: #2458cc; }
.btn.big { padding: 12px 22px; font-size: 16px; }
.btn.small { padding: 7px 11px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.count { margin-left: auto; font-size: 13px; color: #5a6070; }
.editor-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.editor-wrap.dragging { outline: 3px dashed #2f6df6; outline-offset: 4px; border-radius: 10px; }
.pane-label { font-weight: 700; font-size: 13px; color: #5a6070; text-transform: uppercase; letter-spacing: .04em; }
#chatInput {
  grid-row: 2; min-height: 420px; width: 100%; resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.55;
  padding: 12px; border: 1.5px solid #c6cad6; border-radius: 10px; background: #fbfcfe; color: #1c2130;
}
#chatInput:focus { outline: none; border-color: #2f6df6; }
.drop-hint { grid-column: 1; margin: -4px 0 0; font-size: 13px; color: #5a6070; }
.preview { grid-row: 2; grid-column: 2; min-height: 420px; border: 1.5px solid #e3e6ee; border-radius: 10px; padding: 14px 16px; background: #fff; overflow-y: auto; font-family: Calibri, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5; color: #262626; }
/* Live-preview type, mirroring the exported .docx (Clean template).
   11pt body = 15px, 1pt = 1.333px: 20pt H1 = 27px, 16pt H2 = 21px,
   13pt H3 = 17px, 8pt para-after = 11px, 6pt = 8px, 4pt = 5px. */
.preview p { margin: 0 0 11px; }
.preview a { color: #0563c1; }
.preview h1, .preview h2, .preview h3, .preview h4, .preview h5, .preview h6 { line-height: 1.15; font-weight: 700; }
.preview h1 { font-size: 27px; color: #1f3864; margin: 24px 0 11px; border-bottom: 2px solid #1f3864; padding-bottom: 5px; }
.preview h2 { font-size: 21px; color: #1f3864; margin: 19px 0 8px; }
.preview h3 { font-size: 17px; color: #404040; margin: 16px 0 8px; }
.preview h4 { font-size: 16px; color: #404040; margin: 13px 0 5px; }
.preview h5 { font-size: 15px; color: #404040; margin: 11px 0 5px; }
.preview h6 { font-size: 15px; color: #404040; font-style: italic; margin: 11px 0 5px; }
.preview ul, .preview ol { margin: 0 0 11px; padding-left: 28px; }
.preview li { margin: 5px 0; }
.preview ul ul, .preview ul ol, .preview ol ul, .preview ol ol { margin: 5px 0; }
.preview code { background: #f2f2f2; padding: 1px 5px; border-radius: 4px; font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.preview pre { background: #f2f2f2; padding: 11px 16px; border-radius: 6px; overflow-x: auto; margin: 0 0 11px; font-size: 13px; line-height: 1.4; }
.preview pre code { background: none; padding: 0; font-size: inherit; }
.preview blockquote { border-left: 3px solid #1f3864; margin: 0 0 11px 24px; padding: 5px 0 5px 21px; color: #595959; font-style: italic; }
.preview table { border-collapse: collapse; width: 100%; margin: 0 0 11px; font-size: 15px; }
.preview th, .preview td { border: 1px solid #bfbfbf; padding: 5px 9px; text-align: left; line-height: 1.15; }
.preview th { background: #1f3864; color: #fff; }
.preview hr { border: 0; border-top: 1px solid #bfbfbf; margin: 16px 0; }
.img-skip-note { display: block; background: #fff7e0; border: 1px dashed #d9a400; border-radius: 8px; padding: 8px 10px; font-size: 13px; color: #6b5200; margin: 8px 0; }
.img-note { grid-column: 1 / -1; margin: 0; background: #fff7e0; border: 1px solid #f0d48a; color: #6b5200; border-radius: 8px; padding: 9px 12px; font-size: 13.5px; }
.download-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 16px; }
.status { font-size: 14px; color: #1f6b2e; min-height: 20px; }
.fine { font-size: 13.5px; color: #5a6070; margin: 8px 0 0; }
.pro-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pro-box { border: 1.5px solid #e3e6ee; border-radius: 12px; padding: 14px 16px; }
.pro-box p { font-size: 14px; color: #444a58; margin: 0 0 12px; }
.tpl-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tpl-row select { padding: 8px 10px; font-size: 14px; border-radius: 8px; border: 1.5px solid #c6cad6; background: #fff; }
.pro-badge { background: #e6f4ea; border: 1px solid #a8d5b0; color: #1f6b2e; border-radius: 8px; padding: 9px 12px; font-size: 14px; }
.pro ul { margin: 0 0 14px; padding-left: 22px; }
.pro li { margin: 5px 0; }
.pay-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.interface figure { margin: 16px 0; }
.interface img { width: 100%; height: auto; border: 1px solid #e3e6ee; border-radius: 10px; display: block; }
.interface figcaption { font-size: 13.5px; color: #5a6070; margin-top: 8px; }
.faq h3 { margin-top: 16px; }
.faq p { margin: 4px 0 0; color: #333947; }
footer { text-align: center; font-size: 13.5px; color: #5a6070; padding: 10px 16px 30px; }
footer a { color: #2f6df6; }
@media (max-width: 760px) {
  .editor-wrap { grid-template-columns: 1fr; }
  .preview { grid-row: auto; grid-column: 1; min-height: 300px; }
  #chatInput { min-height: 300px; }
  .drop-hint { grid-column: 1; }
  .pro-features { grid-template-columns: 1fr; }
  .hero h1 { font-size: 24px; }
  .lang-switch { position: static; justify-content: center; margin-bottom: 10px; }
}

/* ---- Chat to Word additions ---- */
.title-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.title-row label { font-weight: 700; font-size: 13px; color: #5a6070; text-transform: uppercase; letter-spacing: .04em; }
.title-row input { flex: 1; min-width: 200px; padding: 9px 12px; font-size: 14px; border: 1.5px solid #c6cad6; border-radius: 9px; background: #fbfcfe; color: #1c2130; font-family: inherit; }
.title-row input:focus { outline: none; border-color: #2f6df6; }
.format-badge { display: inline-block; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 5px 12px; }
.format-badge.known { background: #e6f4ea; color: #1f6b2e; border: 1px solid #a8d5b0; }
.format-badge.unknown { background: #f1f3f8; color: #5a6070; border: 1px solid #d8dce6; }
.opts { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 12px; font-size: 14px; color: #333947; }
.opts label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.opts input[type="checkbox"] { width: 16px; height: 16px; accent-color: #2f6df6; cursor: pointer; }
/* Chat preview: one bubble per message, role chip on top. */
.msg { border: 1px solid #e3e6ee; border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; background: #fff; }
.msg-user { background: #f4f7ff; border-color: #d3e0fb; }
.msg-assistant { background: #fff; }
.msg-system { background: #fbf7ee; border-color: #eadfc3; }
.msg-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.msg-role { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.msg-user .msg-role { color: #1f3864; }
.msg-assistant .msg-role { color: #404040; }
.msg-system .msg-role { color: #6b5200; }
.msg-ts { font-size: 12.5px; color: #8a90a0; }
.msg-body p { margin: 0 0 11px; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-body ul, .msg-body ol { margin: 0 0 11px; padding-left: 28px; }
.msg-body li { margin: 5px 0; }
.msg-body code { background: #f2f2f2; padding: 1px 5px; border-radius: 4px; font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.msg-body pre { background: #f2f2f2; padding: 11px 16px; border-radius: 6px; overflow-x: auto; margin: 0 0 11px; font-size: 13px; line-height: 1.4; }
.msg-body pre code { background: none; padding: 0; font-size: inherit; }
.msg-body blockquote { border-left: 3px solid #1f3864; margin: 0 0 11px 24px; padding: 5px 0 5px 21px; color: #595959; font-style: italic; }
.msg-body h1 { font-size: 21px; color: #1f3864; margin: 16px 0 8px; }
.msg-body h2 { font-size: 18px; color: #1f3864; margin: 14px 0 8px; }
.msg-body h3 { font-size: 16px; color: #404040; margin: 12px 0 8px; }
.msg-body a { color: #0563c1; }
.preview-empty { color: #8a90a0; font-size: 14px; margin: 0; }
