:root {
  --blue: #002b7f;      /* Romanian flag blue */
  --yellow: #fcd116;    /* Romanian flag yellow */
  --red: #ce1126;       /* Romanian flag red */
  --ink: #14161c;
  --muted: #5d6475;
  --line: #e4e7ee;
  --bg: #f6f7fb;
  --card: #ffffff;
  --accent: #1d4ed8;
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
a { color: var(--accent); }
img { max-width: 100%; }

/* ---------- Header ---------- */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.brand .flag { display: inline-flex; width: 26px; height: 18px; border-radius: 3px; overflow: hidden; }
.brand .flag span { flex: 1; }
nav.main { display: flex; gap: 6px; align-items: center; }
nav.main a { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
nav.main a:hover { background: var(--bg); }
nav.main a.cta { background: var(--blue); color: #fff; font-weight: 600; }
nav.main a.cta:hover { background: #001f5c; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 18px; }

/* ---------- Hero + chat ---------- */
.hero { padding: 26px 0 8px; text-align: center; }
.hero h1 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin: 0 0 8px; line-height: 1.2; }
.hero p { margin: 0 auto; color: var(--muted); max-width: 640px; }
.badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.badges li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: .85rem; }

.chat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: 18px 0 10px; display: flex; flex-direction: column; height: min(68vh, 640px); min-height: 420px; box-shadow: 0 6px 24px rgba(16,24,40,.06); }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.msg.bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.bot p { margin: 0 0 .6em; } .msg.bot p:last-child { margin-bottom: 0; }
.msg.bot ul, .msg.bot ol { margin: .3em 0 .6em; padding-left: 1.3em; }
.msg.bot pre { background: #0f172a; color: #e2e8f0; padding: 10px 12px; border-radius: 8px; overflow-x: auto; font-size: .88rem; }
.msg.bot code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.msg.bot pre code { background: none; padding: 0; }
.msg.bot h3, .msg.bot h4 { margin: .5em 0 .3em; font-size: 1rem; }
.msg.error { align-self: center; background: #fff1f2; color: #9f1239; border: 1px solid #fecdd3; font-size: .92rem; }
.typing::after { content: "▍"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.welcome { margin: auto; text-align: center; color: var(--muted); max-width: 520px; }
.welcome h2 { color: var(--ink); font-size: 1.15rem; margin: 0 0 12px; }
.suggestions { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; margin-top: 10px; }
.suggestions button { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; font-size: .9rem; color: var(--ink); }
.suggestions button:hover { border-color: var(--accent); }

.chat-form { border-top: 1px solid var(--line); padding: 12px; display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; max-height: 160px; min-height: 46px; outline: none; }
.chat-form textarea:focus { border-color: var(--accent); }
.btn { background: var(--blue); color: #fff; border: 0; border-radius: 10px; padding: 12px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
a.btn { text-decoration: none; display: inline-block; text-align: center; }
.btn.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.yellow { background: var(--yellow); color: var(--ink); }
.chat-meta { display: flex; justify-content: space-between; gap: 10px; padding: 0 14px 10px; font-size: .82rem; color: var(--muted); }
.chat-meta button { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }

.human-check { padding: 10px 14px 0; display: none; justify-content: center; }

/* Limit / upgrade box */
.upsell { align-self: stretch; background: #fffbea; border: 1px solid #f6e3a1; border-radius: 12px; padding: 14px 16px; }
.upsell h3 { margin: 0 0 6px; font-size: 1rem; }
.upsell p { margin: 0 0 10px; color: #5b4a12; font-size: .93rem; }
.upsell .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Content ---------- */
.content { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px clamp(18px, 4vw, 40px); margin: 22px 0; line-height: 1.7; }
.content h2 { font-size: 1.35rem; margin-top: 1.4em; line-height: 1.3; }
.content h2:first-child { margin-top: 0; }
.content h3 { font-size: 1.08rem; margin-bottom: .2em; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 14px 0; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--bg); }
.card h3 { margin-top: 0; }
table.compare { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .95rem; }
table.compare th, table.compare td { border-bottom: 1px solid var(--line); padding: 9px 8px; text-align: left; }
details { border-bottom: 1px solid var(--line); padding: 10px 0; }
details summary { cursor: pointer; font-weight: 600; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 20px 0; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--blue); }
.plan h2 { margin: 0; font-size: 1.2rem; }
.plan .price { font-size: 2rem; font-weight: 800; margin: 10px 0; }
.plan ul { padding-left: 1.1em; line-height: 1.8; flex: 1; }

/* Forms */
.form-card { max-width: 420px; margin: 30px auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.form-card label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: .92rem; }
.form-card input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.form-card .btn { width: 100%; margin-top: 16px; }
.tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.tabs button { flex: 1; padding: 9px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; cursor: pointer; font: inherit; }
.tabs button.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.notice { padding: 10px 12px; border-radius: 10px; margin: 10px 0; font-size: .93rem; }
.notice.err { background: #fff1f2; color: #9f1239; }
.notice.ok { background: #ecfdf5; color: #065f46; }

.ad-slot { margin: 14px 0; min-height: 0; text-align: center; }

/* ---------- Footer ---------- */
footer.site-footer { color: var(--muted); font-size: .88rem; padding: 26px 0 40px; text-align: center; }
footer.site-footer a { color: var(--muted); margin: 0 8px; }

@media (max-width: 640px) {
  nav.main a:not(.cta):not(.keep) { display: none; }
  .msg { max-width: 94%; }
  .chat { height: 72vh; }
}

/* ---------- Sponsored local businesses ---------- */
.sponsored { align-self: stretch; border: 1px dashed #c9cfdb; border-radius: 12px; padding: 10px 12px 8px; background: #fbfcfe; }
.sponsored-label { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ad-card { border-top: 1px solid var(--line); padding: 9px 0; }
.ad-card:first-of-type { border-top: 0; padding-top: 2px; }
.ad-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.ad-meta { color: var(--muted); font-size: .85rem; }
.ad-card p { margin: 4px 0 6px; font-size: .92rem; }
.ad-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ad-btn { font-size: .86rem; text-decoration: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 5px 10px; border-radius: 999px; }
.ad-btn:hover { border-color: var(--accent); }
.ad-advertise { display: inline-block; font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* ---------- Business pages ---------- */
.biz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.form-card.wide { max-width: 640px; }
.form-card select, .form-card textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.form-card textarea { min-height: 90px; resize: vertical; }
.hint { font-size: .82rem; color: var(--muted); margin: 3px 0 0; }
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.status-pill.live { background: #dcfce7; color: #166534; }
.status-pill.pending { background: #fef9c3; color: #854d0e; }
.status-pill.off { background: #f1f5f9; color: #475569; }
.status-pill.rejected { background: #fee2e2; color: #991b1b; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 1.4rem; }
.stat span { font-size: .82rem; color: var(--muted); }
.preview-box { margin-top: 10px; }
