/* Trucle Chatbot — public site. One palette shared with the demo page and the widget. */
:root {
  --fg: #16181d; --muted: #5b6270; --line: #e3e7ee; --accent: #1f3a8a; --accent-ink: #ffffff;
  --bg: #fbfcfe; --panel: #ffffff; --tint: #eef2fb; --ok: #2f9e5f; --warn: #b7791f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fg: #e9ecf2; --muted: #a5adbb; --line: #2b3240; --accent: #9db4ff; --accent-ink: #0f1218;
    --bg: #0f1218; --panel: #151a23; --tint: #1a2133; --ok: #5fc48a; --warn: #e0a84a;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg);
       font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; }
code { background: rgba(127,127,127,.12); padding: 1px 5px; border-radius: 5px; }
pre { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
      overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }

.nav { display: flex; align-items: center; gap: 22px; max-width: 920px; margin: 0 auto; padding: 18px 24px; }
.nav .brand { font-weight: 700; letter-spacing: -0.01em; color: var(--fg); text-decoration: none; margin-right: auto; }
.nav a:not(.brand) { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a[aria-current="page"] { color: var(--fg); font-weight: 600; }
.nav .cta { color: var(--accent-ink) !important; background: var(--accent); padding: 7px 14px; border-radius: 999px; font-weight: 600; }
@media (max-width: 640px) { .nav { flex-wrap: wrap; gap: 12px 16px; } }

main { max-width: 920px; margin: 0 auto; padding: 32px 24px 120px; }
h1 { font-size: clamp(30px, 4.6vw, 44px); line-height: 1.15; margin: 0 0 10px; letter-spacing: -0.02em; text-wrap: balance; }
p.lede { font-size: 19px; color: var(--muted); margin: 0 0 36px; max-width: 62ch; }
h2 { font-size: 22px; margin: 44px 0 12px; letter-spacing: -0.01em; }
h2.eyebrow, .eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
                        font-weight: 650; margin: 0 0 10px; }
h3 { font-size: 17px; margin: 0 0 6px; }
p, li { max-width: 68ch; }
ul { padding-left: 20px; } li { margin: 0 0 6px; }
.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin: 0 0 8px; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: var(--panel); }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.panel { border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin: 0 0 16px; background: var(--panel); }
.tint { background: var(--tint); border-color: transparent; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 0; }
.button { display: inline-block; text-decoration: none; font-weight: 600; padding: 10px 18px; border-radius: 10px;
          border: 1px solid var(--accent); color: var(--accent); background: transparent; cursor: pointer; font: inherit; }
.button.primary { background: var(--accent); color: var(--accent-ink); }
.button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
.yes { color: var(--ok); font-weight: 600; } .no { color: var(--muted); }

form { display: grid; gap: 14px; max-width: 560px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
label span.hint { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--fg); background: var(--panel); border: 1px solid var(--line);
                          border-radius: 9px; padding: 10px 12px; width: 100%; }
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; }
.check input { width: auto; margin-top: 5px; }
.notice { border-left: 3px solid var(--accent); padding: 10px 14px; background: var(--tint); border-radius: 0 10px 10px 0; margin: 0 0 18px; font-size: 15px; }
.notice.warn { border-color: var(--warn); }
.result { margin-top: 18px; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.result[hidden] { display: none; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #b9c0cc; }
.dot.up { background: var(--ok); } .dot.down { background: #c9553d; }
.draft { display: inline-block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--warn);
         border: 1px solid currentColor; border-radius: 6px; padding: 2px 7px; margin-left: 8px; vertical-align: middle; }
footer { max-width: 920px; margin: 0 auto; padding: 24px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer a { color: var(--muted); margin-right: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---- marketing surfaces ---- */
h1, h2, .brand { font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding: 24px 0 8px; }
.hero .eyebrow { margin-bottom: 14px; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 14px; }
.hero p.lede { margin-bottom: 24px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.trust li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; } }

.mock { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 18px 50px -30px rgba(31,58,138,.45); overflow: hidden; }
.mock header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.mock header .dotgreen { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.mock .thread { padding: 16px; display: grid; gap: 10px; font-size: 14.5px; }
.mock .you, .mock .bot { max-width: 88%; padding: 9px 12px; border-radius: 14px; line-height: 1.5; }
.mock .you { justify-self: end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 3px; }
.mock .bot { background: var(--tint); border-bottom-left-radius: 3px; }
.mock .chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); }
.mock .chip::before { content: "§"; color: var(--accent); font-weight: 700; }
.mock .pcard { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.mock .pcard .thumb { width: 44px; height: 44px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #7c9cf5); }
.mock .pcard b { font-size: 13.5px; } .mock .pcard small { color: var(--muted); display: block; }
.mock .pcard .price { font-weight: 700; font-variant-numeric: tabular-nums; }
.mock .pcard .price small { color: var(--ok); }
.mock .caption { padding: 8px 16px 14px; color: var(--muted); font-size: 12.5px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.steps .step { position: relative; padding: 20px 20px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.steps .step::before { counter-increment: step; content: counter(step); position: absolute; top: -12px; left: 16px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.steps .step h3 { margin: 6px 0 6px; } .steps .step p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }

.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.why div { padding: 16px 18px; border-left: 3px solid var(--accent); background: var(--tint); border-radius: 0 12px 12px 0; }
.why b { display: block; margin-bottom: 4px; } .why p { margin: 0; font-size: 15px; color: var(--muted); }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plans .plan { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: var(--panel); display: grid; gap: 6px; align-content: start; }
.plans .plan.featured { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.plans .plan .price { font-size: 26px; font-weight: 800; font-family: "Manrope", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.plans .plan .price small { font-size: 13px; color: var(--muted); font-weight: 500; }
.plans .plan ul { margin: 6px 0 10px; padding-left: 18px; font-size: 14.5px; color: var(--muted); }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }

.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; color: var(--muted); } .faq details[open] summary::after { content: "–"; }
.faq p { margin: 8px 0 0; color: var(--muted); }

.band { margin-top: 48px; padding: 28px; border-radius: 18px; background: var(--accent); color: var(--accent-ink); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.band h2 { margin: 0; color: inherit; } .band p { margin: 4px 0 0; opacity: .85; }
.band .button { background: var(--accent-ink); color: var(--accent); border-color: transparent; }

/* demo page */
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 18px; border: 1px dashed var(--warn); border-radius: 12px; background: color-mix(in srgb, var(--warn) 8%, var(--panel)); font-size: 14px; }
.demo { display: grid; grid-template-columns: 380px 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .demo { grid-template-columns: 1fr; } }
.tour { display: grid; gap: 10px; }
.tour .item { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 12px 14px; }
.tour .item.active { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.tour .item button { width: 100%; text-align: left; font: inherit; font-weight: 600; background: none; border: 0; color: var(--fg); cursor: pointer; padding: 0; display: flex; justify-content: space-between; gap: 10px; }
.tour .item button span.q { color: var(--accent); font-weight: 500; }
.tour .item p { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.product { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; display: grid; }
.product .thumb { aspect-ratio: 4/3; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 70%, #fff), #7c9cf5); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 28px; font-family: "Manrope", system-ui, sans-serif; }
.product .body { padding: 10px 12px; display: grid; gap: 4px; }
.product b { font-size: 14px; line-height: 1.3; } .product small { color: var(--muted); }
.product button { margin-top: 6px; font: inherit; font-size: 13px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--accent); color: var(--accent); background: none; cursor: pointer; }
.creds { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14.5px; align-items: baseline; }
.creds dt { color: var(--muted); } .creds dd { margin: 0; }
