[hidden] { display: none !important; }
: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 listings + tool cards in chat ---------- */
.extras { align-self: stretch; display: flex; flex-direction: column; gap: 8px; max-width: 88%; }
.xcard { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: 12px; padding: 10px 14px; font-size: .93rem; line-height: 1.5; }
.xcard.featured { background: #fffdf2; border-color: #f0c400; }
.xcard.tool { border-left-color: var(--blue); }
.xtag { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 7px; border-radius: 6px; background: #fff3b0; color: #6a5400; margin-bottom: 4px; }
.xtag.blue { background: #e8eefc; color: var(--blue); }
.xmeta { color: var(--muted); font-size: .85rem; }
.xdesc { margin-top: 2px; }
.xrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.btn.small { padding: 7px 12px; font-size: .86rem; }

/* ---------- Business portal, contact, admin ---------- */
.page { padding: 26px 0 40px; }
.page h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 0 0 8px; }
.lead { color: var(--muted); max-width: 680px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 20px 0; }
.steps div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: .93rem; }
.steps b { display: block; color: var(--blue); margin-bottom: 4px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.panel h2 { margin: 0 0 12px; font-size: 1.2rem; }
.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .92rem; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.field small { color: var(--muted); font-size: .82rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-size: 1.6rem; }
.stat span { color: var(--muted); font-size: .85rem; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--muted); font-size: .78rem; text-transform: uppercase; }
.status { font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.status.active { background: #dff5ea; color: #12825b; }
.status.unpaid, .status.expired { background: #fff1d6; color: #b26a00; }
.status.paused { background: #eef1f7; color: var(--muted); }
.status.rejected { background: #fde8ea; color: var(--red); }
@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; }
  .extras { max-width: 100%; }
  table.data { display: block; overflow-x: auto; }
}
