/* lovko.chat — one stylesheet, no framework. */

:root {
  --ink: #0e1726;
  --text: #2a3342;
  --muted: #667085;
  --line: #e4e8ee;
  --bg: #ffffff;
  --tint: #f3f7f6;
  --brand: #0f766e;
  --brand-dark: #0b5d57;
  --brand-soft: #d9f2ee;
  --accent: #ffb020;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(14, 23, 38, 0.12);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.lead { font-size: 1.15rem; color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.spaced { margin-top: 1.6em; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--brand);
  transition: background 0.15s, transform 0.15s;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-dark); }
.btn-small { padding: 8px 18px; font-size: 0.95rem; }
.btn-large { padding: 16px 32px; font-size: 1.1rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 10px; }
.center-row { justify-content: center; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--brand); }
.nav-lang { color: var(--muted) !important; }

/* Hero */
.hero { padding: 72px 0 64px; background: linear-gradient(180deg, var(--tint), var(--bg)); }
.hero--page { padding-top: 32px; }
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }

/* Mock chat */
.chat { margin: 0; background: #fff; border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--brand); color: #fff; font-weight: 600; }
.chat-avatar { width: 28px; height: 28px; border-radius: 50%; background: #fff url('/logo.svg') center / 18px no-repeat; }
.chat-dot { width: 8px; height: 8px; border-radius: 50%; background: #5ff0c4; margin-left: auto; }
.chat-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; background: #fafbfc; }
.chat-msg { max-width: 85%; }
.chat-msg p { margin: 0; padding: 10px 14px; border-radius: 16px; font-size: 0.95rem; line-height: 1.45; }
.chat-msg--bot p { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg--user { align-self: flex-end; }
.chat-msg--user p { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.chat-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chat-button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--brand); color: var(--brand); font-size: 0.85rem; background: #fff; }
.chat-input { margin: 0 14px 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.9rem; background: #fff; }
.chat figcaption { padding: 0 18px 12px; font-size: 0.75rem; color: var(--muted); text-align: center; }

/* Sections */
.section { padding: 72px 0; }
.section--tint { background: var(--tint); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-top: 32px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card p { margin: 0; color: var(--text); }
.card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 6px; transition: border-color 0.15s, transform 0.15s; }
.card-link:hover { border-color: var(--brand); transform: translateY(-2px); }
.card-more { margin-top: auto; padding-top: 10px; color: var(--brand); font-weight: 600; font-size: 0.95rem; }

.steps { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; margin-bottom: 12px; }

.ticks, .notes { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li, .notes li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.ticks li::before { content: ''; position: absolute; left: 4px; top: 7px; width: 12px; height: 7px; border-left: 3px solid var(--brand); border-bottom: 3px solid var(--brand); transform: rotate(-45deg); }
.notes li::before { content: 'i'; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--ink); font-size: 0.75rem; font-weight: 700; text-align: center; line-height: 20px; }
.numbered { padding-left: 22px; margin: 0; }
.numbered li { margin-bottom: 10px; padding-left: 6px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; gap: 24px; margin: 36px auto 20px; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; }
.plan--featured { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.plan-price { font-size: 2.2rem; font-weight: 800; color: var(--ink); margin: 0 0 18px; }
.plan-price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.plan .btn { margin-top: auto; text-align: center; }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--ink); list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 12px; font-size: 1.4rem; color: var(--brand); }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 16px; }

.crumbs { padding-top: 20px; font-size: 0.9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }

.final-cta { background: var(--ink); }
.final-cta h2 { color: #fff; }
.final-cta .lead { color: #c9d2de; }
.final-cta .btn { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.final-cta .btn:hover { background: #ffc24d; border-color: #ffc24d; }

/* Footer */
.site-footer { padding: 48px 0; border-top: 1px solid var(--line); font-size: 0.95rem; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 0.8fr; gap: 32px; }
.footer-inner ul { list-style: none; padding: 0; margin: 0; }
.footer-inner li { margin-bottom: 6px; }
.footer-inner a { color: var(--text); text-decoration: none; }
.footer-inner a:hover { color: var(--brand); }
.footer-inner .logo { margin-bottom: 10px; }
.footer-title { font-weight: 700; color: var(--ink); margin-bottom: 8px; }

@media (max-width: 900px) {
  .hero { padding: 40px 0; }
  .hero-inner, .two-col { grid-template-columns: 1fr; gap: 36px; }
  .cards--3, .steps { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
}
@media (max-width: 680px) {
  .nav a:not(.nav-lang) { display: none; }
  .header-inner { gap: 12px; }
}

/* Telegram bot site additions */
.logo em { font-style: normal; color: var(--brand); margin-left: 1px; }
.btn-tg { background: #229ed9; border-color: #229ed9; }
.btn-tg::before { content: ''; display: inline-block; width: 18px; height: 18px; margin: -3px 8px 0 0; vertical-align: middle; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9.78 18.65l.28-4.23 7.68-6.92c.34-.31-.07-.46-.52-.19L7.74 13.3 3.64 12c-.88-.25-.89-.86.2-1.3l15.97-6.16c.73-.33 1.43.18 1.15 1.3l-2.72 12.81c-.19.91-.74 1.13-1.5.71L12.6 16.3l-1.99 1.93c-.23.23-.42.42-.83.42z'/%3E%3C/svg%3E") center / contain no-repeat; }
.btn-tg:hover { background: #1c8bc0; border-color: #1c8bc0; }
.card-icon { font-size: 1.8rem; line-height: 1; margin-bottom: 6px; }
.chat-head { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.chat-title { display: flex; flex-direction: column; line-height: 1.2; }
.chat-title small { font-weight: 400; color: var(--muted); font-size: 0.78rem; }
.chat-avatar { background: var(--brand-soft) url('/logo.svg') center / 18px no-repeat; }
.chat-body { background: #dfe9e4 linear-gradient(160deg, #e6efe9, #d6e6dd); }
.chat-msg--bot p { border: none; box-shadow: 0 1px 1px rgba(14, 23, 38, 0.08); }
.chat-msg--user p { background: #e3f8d0; color: var(--ink); }
.chat-button { border: none; background: rgba(14, 23, 38, 0.32); color: #fff; border-radius: 8px; flex: 1 1 auto; text-align: center; }
.models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 32px; }
.model-row { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.model-row p { margin: 0; }
.costs { width: 100%; border-collapse: collapse; margin: 12px 0 8px; background: #fff; border-radius: 12px; overflow: hidden; }
.costs td { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.costs td:last-child { text-align: right; font-weight: 600; color: var(--ink); white-space: nowrap; }
.costs tr:last-child td { border-bottom: none; }
@media (max-width: 900px) { .models { grid-template-columns: 1fr; } }
.header-inner .btn-small { white-space: nowrap; margin-left: auto; }
@media (max-width: 680px) {
  .nav { display: none; }
}

/* Ask box + example prompts (open the web chat) */
.ask { display: flex; gap: 10px; align-items: flex-end; margin: 26px 0 12px; padding: 10px; background: #fff; border: 2px solid var(--brand); border-radius: 18px; box-shadow: var(--shadow); }
.ask textarea { flex: 1; min-width: 0; border: none; resize: none; font: inherit; font-size: 1.05rem; color: var(--ink); padding: 8px 10px; outline: none; background: transparent; min-height: 52px; }
.ask .btn { flex: none; padding: 11px 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip { font: inherit; font-size: 0.9rem; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.cta-row .btn-tg { margin-left: 0; }
.hero-inner > * { min-width: 0; }

/* Landing hero: heading, input and prompts; they open the chat page. */
.ask-hero { padding: 72px 0 64px; }
.ask-hero-inner { max-width: 760px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.ask-hero-inner > * { width: 100%; }
.ask-hero-avatar { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 18px; background: var(--brand-soft) url('/logo.svg') center / 32px no-repeat; }
.ask-hero h1 { margin-bottom: 0.35em; }
.ask-hero .lead { margin: 0 auto 24px; max-width: 640px; }
.ask-hero .ask { margin: 0 0 14px; text-align: left; }
.ask-hero .chips { justify-content: center; margin: 0 0 18px; }
.ask-hero .crumbs { padding: 0; margin-bottom: 18px; }
.ask-hero-note { margin: 0; font-size: 0.9rem; color: var(--muted); }
.ask-hero-note a { margin-left: 6px; font-weight: 600; text-decoration: none; }
@media (max-width: 680px) {
  .ask-hero { padding: 40px 0 36px; }
  .ask-hero-avatar { display: none; }
}

/* Chat page: the whole screen is the chat; only the conversation scrolls. */
body.app { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; background: var(--tint); }
.app-header { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 52px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--line); }
.app-header .logo span { font-size: 1.1rem; }
.app-header-tg { font-size: 0.9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.app-main { flex: 1; min-height: 0; display: flex; }
.app-chat { flex: 1; min-width: 0; max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; background: #fff; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.app-chat-root { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.app-chat-status { margin: auto; padding: 24px; text-align: center; color: var(--muted); }
/* Keep site-wide element styles out of the mounted chat. */
.app-chat-root p { margin: 0; }
.app-chat-root img { display: inline-block; }
.app-chat-root * { scrollbar-width: thin; scrollbar-color: rgba(14, 23, 38, 0.25) transparent; }
@media (max-width: 680px) {
  .app-header { padding: 0 14px; }
  .app-chat { border: none; }
}

/* Articles */
.article { padding: 32px 0 64px; }
.article .crumbs { padding: 0; margin-bottom: 18px; }
.article h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.article-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.article-body h2, .article > .container > h2 { margin-top: 1.8em; }
.article-body h3 { margin-top: 1.4em; }
.article-body ul, .article-body ol { padding-left: 22px; margin: 0 0 1em; }
.article-body li { margin-bottom: 6px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 0.95rem; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.article-body th { background: var(--tint); color: var(--ink); }
.doc-sample { background: #fbfaf6; border: 1px solid #e8e2cf; border-radius: 12px; padding: 22px 24px; margin: 0 0 1.4em; font-family: Georgia, 'Times New Roman', serif; font-size: 0.98rem; line-height: 1.6; }
.doc-sample p { margin: 0 0 0.7em; }
.doc-sample .doc-right { text-align: right; }
.doc-sample .doc-center { text-align: center; font-weight: 700; letter-spacing: 0.02em; }
.article-ask { background: var(--tint); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin: 28px 0; }
.article-ask-title { font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.article-ask .ask { margin: 0 0 12px; }
.article-ask .chips { margin-bottom: 10px; }
.article-ask-note { margin: 0; font-size: 0.88rem; color: var(--muted); }
.article-ask-note a { font-weight: 600; text-decoration: none; margin-left: 4px; }
.article-disclaimer { font-size: 0.88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 28px; }
.article-related { padding-left: 20px; }
.article-related li { margin-bottom: 8px; }
.article-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.article-list a { display: block; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; }
.article-list a:hover { border-color: var(--brand); color: var(--brand); }
