:root {
  --ink: #19231f; --muted: #58645e; --paper: #f6f2e9; --card: #fffdf8;
  --green: #196b50; --green-dark: #0f4f3b; --mint: #dcece4; --line: #d9ddd7;
  --user: #196b50; --shadow: 0 18px 50px rgba(24, 46, 37, .10);
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--paper); font-size: 18px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100dvh; background: radial-gradient(circle at 15% 0, #fff 0, transparent 32rem), var(--paper); }
button, textarea { font: inherit; }
button { min-height: 48px; cursor: pointer; }
.topbar { height: 72px; max-width: 920px; margin: auto; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; font-size: 1.2rem; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: white; background: var(--green); }
.text-button { border: 0; background: transparent; color: var(--green-dark); text-decoration: underline; font-weight: 700; }
main { max-width: 920px; min-height: calc(100dvh - 72px); margin: auto; padding: 44px 22px 32px; }
.welcome { max-width: 720px; margin: 4vh auto 0; text-align: center; }
.eyebrow { color: var(--green); text-transform: uppercase; letter-spacing: .09em; font-size: .78rem; font-weight: 800; }
h1 { margin: 14px 0 18px; font-size: clamp(2.25rem, 7vw, 4.25rem); line-height: 1.04; letter-spacing: -.045em; }
h1 span { color: var(--green); }
.intro { max-width: 650px; margin: 0 auto; color: var(--muted); font-size: 1.15rem; line-height: 1.65; }
.trust-list { margin: 36px auto 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left; }
.trust-list div { display: flex; gap: 11px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.55); }
.trust-list span { flex: 0 0 28px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--mint); color: var(--green); font-weight: 900; }
.trust-list p { margin: 0; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.trust-list strong { color: var(--ink); }
.primary, .send { border: 0; border-radius: 14px; color: #fff; background: var(--green); font-weight: 800; box-shadow: 0 8px 22px rgba(25,107,80,.2); }
.primary { width: min(100%, 390px); padding: 17px 24px; font-size: 1.05rem; }
.primary:hover, .send:hover { background: var(--green-dark); }
.small-print, .privacy-note { color: var(--muted); font-size: .75rem; }
.chat { display: flex; flex-direction: column; height: calc(100dvh - 110px); max-width: 780px; margin: -20px auto 0; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.chat-heading { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.chat-heading > div { display: flex; align-items: center; gap: 12px; }
.chat-heading p { margin: 0; line-height: 1.25; }
.chat-heading p span { color: var(--muted); font-size: .72rem; }
.online { width: 12px; height: 12px; border-radius: 50%; background: #2fa66f; box-shadow: 0 0 0 5px #dff4e9; }
.size-button { border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); font-weight: 800; padding: 0 14px; }
.messages { flex: 1; overflow-y: auto; padding: 24px; scroll-behavior: smooth; }
.message { max-width: 82%; margin: 0 0 16px; padding: 14px 17px; border-radius: 18px 18px 18px 5px; background: #eef1ed; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user { margin-left: auto; border-radius: 18px 18px 5px 18px; color: white; background: var(--user); }
.message.error { color: #7c2525; background: #f9e5e5; }
.thinking { padding: 0 24px 12px; color: var(--muted); font-size: .8rem; }
.thinking span { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: var(--green); animation: pulse 1.2s infinite; }
.thinking span:nth-child(2) { animation-delay: .2s; } .thinking span:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { 50% { opacity: .25; transform: translateY(-3px); } }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 16px 18px 10px; border-top: 1px solid var(--line); background: white; }
.composer label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.composer > textarea, .evidence-tools, .evidence-drop, .evidence-list, .evidence-status { grid-column: 1 / -1; }
textarea { width: 100%; min-height: 58px; max-height: 150px; resize: vertical; padding: 15px; border: 2px solid var(--line); border-radius: 14px; color: var(--ink); background: white; }
textarea:focus { outline: 3px solid rgba(25,107,80,.22); border-color: var(--green); }
.evidence-tools { display: flex; align-items: center; gap: 10px; }
.attach { display: inline-flex; min-height: 38px; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--green-dark); background: #f9fbf7; font-size: .82rem; font-weight: 800; }
.attach:hover { border-color: var(--green); background: var(--mint); }
.attach span { color: var(--green); font-size: 1.1rem; line-height: 1; }
.evidence-hint { color: var(--muted); font-size: .72rem; }
.evidence-drop { display: flex; min-height: 62px; align-items: center; justify-content: center; gap: 10px; padding: 12px; border: 1px dashed #b9c7bc; border-radius: 12px; color: var(--muted); background: #fbfcf9; text-align: left; cursor: pointer; }
.evidence-drop:hover, .evidence-drop:focus-visible, .evidence-drop.dragging { border-color: var(--green); outline: none; color: var(--green-dark); background: #f1f8f3; }
.evidence-drop-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--green); background: var(--mint); font-size: 1.25rem; font-weight: 800; }
.evidence-drop strong { color: var(--ink); font-size: .82rem; }
.evidence-drop small { font-size: .72rem; }
.evidence-list { display: grid; gap: 6px; }
.evidence-item { display: flex; min-width: 0; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcf9; font-size: .78rem; }
.evidence-item-mark { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; color: var(--green-dark); background: var(--mint); font-size: .68rem; font-weight: 900; text-transform: uppercase; }
.evidence-item-copy { min-width: 0; flex: 1; }
.evidence-item-name { display: block; overflow: hidden; color: var(--ink); font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.evidence-item-meta { color: var(--muted); font-size: .7rem; }
.evidence-item-remove { min-height: 30px; padding: 0 8px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: .75rem; }
.evidence-item-remove:hover { color: #8a2929; background: #f9e5e5; }
.evidence-status { min-height: 1.1em; margin: -2px 0 0; color: var(--muted); font-size: .72rem; }
.evidence-status.error { color: #8a2929; }
.send { grid-column: 2; align-self: stretch; padding: 0 20px; }
.privacy-note { margin: 0; padding: 0 18px 14px; text-align: center; background: white; }
dialog { width: min(90%, 480px); padding: 28px; border: 0; border-radius: 20px; color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(12,25,20,.55); }
dialog h2 { margin-top: 0; }
.close-status { min-height: 1.2em; color: var(--muted); font-size: .78rem; }
dialog label { display: block; margin: 18px 0 6px; color: var(--ink); font-size: .8rem; font-weight: 800; }
dialog input[type="email"] { width: 100%; padding: 12px 13px; border: 2px solid var(--line); border-radius: 10px; color: var(--ink); background: white; }
dialog input[type="email"]:focus { outline: 3px solid rgba(25,107,80,.22); border-color: var(--green); }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; }
.secondary, .danger { border-radius: 12px; padding: 0 16px; font-weight: 750; }
.secondary { border: 1px solid var(--line); background: white; }
.danger { border: 0; color: white; background: #9b3131; }
body.large-text { font-size: 21px; }
@media (max-width: 680px) {
  main { padding: 18px 12px 12px; }
  .welcome { margin-top: 1vh; }
  .trust-list { grid-template-columns: 1fr; gap: 9px; margin: 25px auto; }
  .trust-list div { padding: 13px 15px; }
  .chat { height: calc(100dvh - 92px); margin: 0; border-radius: 18px; }
  .messages { padding: 18px 14px; }
  .message { max-width: 90%; }
  .composer { grid-template-columns: 1fr; padding: 12px; }
  .evidence-tools { align-items: flex-start; flex-direction: column; gap: 6px; }
  .send { grid-column: 1; min-height: 52px; }
  .chat-heading { padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; } }
