:root{
  /* ---- TuLender brand tokens (swap hex for exact brand codes) ---- */
  --navy:   #1B2B5E;   /* primary  */
  --navy-600:#24387a;
  --gold:   #F5B50A;   /* accent / CTA */
  --gold-600:#d89e04;
  --red:    #D92D2D;   /* logo spark only */
  --ink:    #1A1F36;   /* text */
  --muted:  #6B7384;
  --line:   #E6E8EE;
  --bg:     #FBFBFC;   /* app canvas */
  --panel:  #FFFFFF;
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; font-family:var(--font); color:var(--ink);
  background:var(--bg); display:flex; flex-direction:column;
}
/* logo white-box removal on light canvas */
.logo-img{mix-blend-mode:multiply}

/* ---------- top bar ---------- */
.topbar{
  height:62px; flex:0 0 62px; background:var(--panel);
  border-bottom:1px solid var(--line);
  display:flex; align-items:center; gap:28px; padding:0 22px;
}
.brand{display:flex; align-items:center; gap:10px}
.brand img{height:34px; width:auto; display:block}
.nav{display:flex; align-items:center; gap:26px; margin-left:10px}
.nav a{
  display:flex; align-items:center; gap:7px; text-decoration:none;
  color:var(--navy); font-weight:600; font-size:14px; opacity:.85;
}
.nav a:hover{opacity:1}
.nav a.active{opacity:1}
.nav .dot{width:9px;height:9px;border-radius:50%;background:var(--gold)}
.nav svg{width:16px;height:16px}
.spacer{flex:1}
.avatar{
  width:38px;height:38px;border-radius:50%;
  background:var(--navy); color:#fff; font-weight:700; font-size:13px;
  display:flex;align-items:center;justify-content:center;
  border:2px solid var(--gold);
}

/* ---------- shell: rail + main ---------- */
.shell{flex:1; display:flex; min-height:0}
.rail{
  width:56px; flex:0 0 56px; background:var(--panel);
  border-right:1px solid var(--line);
  display:flex; flex-direction:column; align-items:center; gap:6px; padding:14px 0;
}
.rail button{
  width:38px;height:38px;border:0;background:transparent;border-radius:10px;
  color:var(--navy); cursor:pointer; display:flex;align-items:center;justify-content:center;
}
.rail button:hover{background:#eef0f6}
.rail svg{width:19px;height:19px}
.rail .grow{flex:1}

.main{flex:1; display:flex; flex-direction:column; min-width:0; min-height:0}
.stage{
  flex:1; display:flex; flex-direction:column; align-items:center;
  justify-content:center; padding:24px; min-height:0; overflow-y:auto;
}
.main.started .stage{justify-content:flex-start}

/* ---------- hero ---------- */
.hero{display:flex; flex-direction:column; align-items:center; text-align:center}
.main.started .hero{display:none}
.hero .mark{height:92px; width:auto; margin-bottom:10px}
.hero h1{font-size:30px; font-weight:700; margin:6px 0 10px; color:var(--ink)}
.hero p{font-size:15px; color:var(--muted); max-width:560px; margin:0 0 26px}

/* ---------- chat log ---------- */
#log{width:100%; max-width:820px; display:none; flex-direction:column; gap:14px; padding:8px 0 20px}
.main.started #log{display:flex}
.row{display:flex}
.row.user{justify-content:flex-end}
.bubble{
  max-width:78%; padding:11px 15px; border-radius:14px; font-size:15px; line-height:1.5;
  white-space:pre-wrap; word-wrap:break-word;
}
.row.user .bubble{background:var(--navy); color:#fff; border-bottom-right-radius:4px}
.row.bot  .bubble{background:#F1F3F8; color:var(--ink); border-bottom-left-radius:4px}
.row.bot .bubble.pending{color:var(--muted)}

/* ---------- composer ---------- */
.composer-wrap{width:100%; display:flex; justify-content:center; padding:0 24px 10px}
.composer{
  width:100%; max-width:820px; background:var(--panel);
  border:1.5px solid var(--line); border-radius:var(--radius);
  padding:12px 14px 10px; box-shadow:0 1px 2px rgba(20,25,40,.04);
  transition:border-color .15s, box-shadow .15s;
}
.composer:focus-within{border-color:var(--navy); box-shadow:0 0 0 3px rgba(27,43,94,.10)}
.composer textarea{
  width:100%; border:0; outline:0; resize:none; font-family:inherit;
  font-size:15px; color:var(--ink); background:transparent; min-height:26px; max-height:200px;
}
.composer textarea::placeholder{color:#9AA1B1}
.composer .tools{display:flex; align-items:center; margin-top:8px}
.iconbtn{
  width:34px;height:34px;border:0;background:transparent;border-radius:9px;
  color:var(--navy); cursor:pointer; display:flex;align-items:center;justify-content:center;
}
.iconbtn:hover{background:#eef0f6}
.iconbtn svg{width:18px;height:18px}
.tools .right{margin-left:auto; display:flex; align-items:center; gap:4px}
.send{
  width:34px;height:34px;border:0;border-radius:9px; cursor:pointer;
  background:#E6E8EE; color:#fff; display:flex;align-items:center;justify-content:center;
  transition:background .15s;
}
.send.active{background:var(--gold)}
.send.active:hover{background:var(--gold-600)}
.send svg{width:18px;height:18px}
.counter{max-width:820px; width:100%; margin:0 auto; text-align:right;
  font-size:12px; color:var(--muted); padding:0 24px 14px}
