/* AgriSathi – design system */
:root {
  --green-900: #063d2c; --green-800: #0a5640; --green-700: #0b6e4f; --green-600: #0f8a62; --green-500: #16a974;
  --green-100: #e3f4ec; --green-50: #f1faf5;
  --lime: #a6e35f; --sun: #ffb020; --sun-100: #fff4dc; --red: #e0453a; --red-100: #fdeceb; --blue: #1f6feb; --blue-100: #e8f0fe;
  --ink: #12201a; --ink-2: #3d4b45; --ink-3: #6b7873; --line: #e3e9e6; --bg: #f6f8f7; --card: #ffffff;
  --radius: 18px; --radius-sm: 12px; --shadow: 0 1px 2px rgba(16, 40, 30, .06), 0 8px 24px rgba(16, 40, 30, .07);
  --shadow-lg: 0 24px 60px rgba(8, 50, 35, .18);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Noto Sans Devanagari', sans-serif;
  --font-head: 'Poppins', 'Inter', 'Noto Sans Devanagari', sans-serif;
  --maxw: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; overflow-x: hidden; }
img, canvas { max-width: 100%; display: block; }
a { color: var(--green-700); text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ───────── Header ───────── */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 22px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.28rem; color: var(--ink); }
.brand .logo { width: 36px; height: 36px; }
.brand b { color: var(--green-700); }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { padding: 8px 12px; border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: .95rem; transition: .15s; }
.nav a:hover { background: var(--green-50); color: var(--green-700); }
.nav a.active { background: var(--green-100); color: var(--green-800); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang-select { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: .9rem; color: var(--ink-2); }
.icon-btn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { border-color: var(--green-500); color: var(--green-700); }
.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* bottom nav (mobile app feel) */
.tabbar { display: none; }
@media (max-width: 900px) {
  .nav, .top-actions .btn { display: none; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; color: var(--ink-3); font-weight: 500; padding: 4px 0; }
  .tabbar a.active { color: var(--green-700); }
  .tabbar a .icon { width: 22px; height: 22px; }
  .tabbar a.scan { margin-top: -26px; }
  .tabbar a.scan span.fab { width: 56px; height: 56px; border-radius: 999px; background: var(--green-700); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(11, 110, 79, .35); border: 4px solid #fff; }
  body { padding-bottom: 76px; }
}

/* ───────── Buttons & chips ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; border: 0; font-weight: 600; font-size: .98rem; transition: transform .12s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--green-700); color: #fff; box-shadow: 0 6px 18px rgba(11, 110, 79, .28); }
.btn-primary:hover { background: var(--green-800); }
.btn-ghost { background: #fff; color: var(--green-800); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--green-500); }
.btn-light { background: rgba(255, 255, 255, .14); color: #fff; border: 1.5px solid rgba(255, 255, 255, .35); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--green-50); color: var(--green-800); font-size: .85rem; font-weight: 500; border: 1px solid var(--green-100); }
.chip.warn { background: var(--sun-100); color: #8a5a00; border-color: #ffe2a6; }
.chip.bad { background: var(--red-100); color: #a32a20; border-color: #f8cdc9; }
.chip.blue { background: var(--blue-100); color: #1a4fb0; border-color: #cfe0ff; }
.chip.grey { background: #f1f3f2; color: var(--ink-2); border-color: var(--line); }
.badge-dot { width: 8px; height: 8px; border-radius: 99px; background: currentColor; display: inline-block; }

/* ───────── Cards ───────── */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; border: 1px solid rgba(0, 0, 0, .02); }
.card h3 { margin-bottom: .35em; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }

.page-head { padding: 34px 0 18px; }
.page-head p { color: var(--ink-3); max-width: 640px; }
section.block { padding: 72px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head p { color: var(--ink-3); font-size: 1.05rem; }
.kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--green-700); font-weight: 600; font-size: .9rem; text-transform: none; margin-bottom: 14px; }

/* ───────── Hero ───────── */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, #d6f5e4 0%, rgba(214, 245, 228, 0) 60%), linear-gradient(180deg, #fff 0%, #f3faf6 100%); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 64px; }
.hero h1 { color: var(--green-900); }
.hero h1 em { font-style: normal; color: var(--green-600); }
.hero p.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 560px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 22px; }
.hero .chips { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; padding-top: 28px; } }

.phone { position: relative; width: 290px; height: 590px; margin: 0 auto; border-radius: 44px; background: #0f1714; padding: 12px; box-shadow: var(--shadow-lg); }
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: #0b2a1f; }
.phone .screen img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.08); }
.phone .notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 92px; height: 24px; background: #0f1714; border-radius: 0 0 16px 16px; z-index: 3; }
.phone .frame-box { position: absolute; inset: 22% 14% 34% 14%; border: 3px solid rgba(255, 255, 255, .9); border-radius: 24px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .22); }
.phone .scanline { position: absolute; left: 14%; right: 14%; height: 3px; background: linear-gradient(90deg, transparent, var(--lime), transparent); top: 22%; animation: scan 2.6s ease-in-out infinite; }
@keyframes scan { 0%, 100% { top: 23%; } 50% { top: 64%; } }
.phone .result-pop { position: absolute; left: 12px; right: 12px; bottom: 14px; background: #fff; border-radius: 20px; padding: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.phone .result-pop .t { font-family: var(--font-head); font-weight: 600; font-size: .98rem; }
.phone .bar { height: 7px; border-radius: 9px; background: var(--green-100); overflow: hidden; margin-top: 8px; }
.phone .bar i { display: block; height: 100%; width: 92%; background: var(--green-600); border-radius: 9px; }
.float-step { position: absolute; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow); font-weight: 600; font-size: .92rem; white-space: nowrap; animation: bob 5s ease-in-out infinite; }
.float-step b { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--green-600); color: #fff; font-size: .9rem; }
.float-step.s1 { top: 110px; left: -70px; }
.float-step.s2 { top: 260px; right: -84px; animation-delay: 1.4s; }
.float-step.s3 { bottom: 150px; left: -60px; animation-delay: 2.6s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 1100px) { .float-step.s1, .float-step.s3 { left: -20px; } .float-step.s2 { right: -24px; } }
@media (max-width: 420px) { .phone { width: 250px; height: 510px; } .float-step { font-size: .8rem; } }

/* Stats band */
.stats { background: var(--green-800); color: #fff; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-top: 40px; padding-bottom: 40px; }
.stats .num { font-family: var(--font-head); font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; color: var(--lime); }
.stats .lbl { color: rgba(255, 255, 255, .78); font-size: .92rem; }
@media (max-width: 700px) { .stats .wrap { grid-template-columns: repeat(2, 1fr); } }

/* Feature cards */
.feature { position: relative; transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature .ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--green-50); color: var(--green-700); margin-bottom: 14px; }
.feature .ico .icon { width: 26px; height: 26px; }
.feature p { color: var(--ink-3); font-size: .94rem; margin: 0; }

/* Pipeline */
.pipeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.pipe { position: relative; padding: 22px 22px 22px 70px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.pipe::before { counter-increment: step; content: counter(step); position: absolute; left: 20px; top: 22px; width: 34px; height: 34px; border-radius: 10px; background: var(--green-700); color: #fff; font-family: var(--font-head); font-weight: 700; display: grid; place-items: center; }
.pipe p { margin: 0; color: var(--ink-3); font-size: .93rem; }
@media (max-width: 900px) { .pipeline { grid-template-columns: 1fr; } }

.crop-cloud { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.crop-pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-weight: 500; box-shadow: var(--shadow); }
.crop-pill.ext { border-style: dashed; color: var(--ink-2); }

.cta-band { background: linear-gradient(120deg, var(--green-800), var(--green-600)); color: #fff; border-radius: 28px; padding: 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 6px; font-size: clamp(1.4rem, 3vw, 2rem); }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .85); }
.cta-band .btn-primary { background: #fff; color: var(--green-800); }

footer.site { background: #0b1f18; color: rgba(255, 255, 255, .72); padding: 48px 0 30px; margin-top: 60px; font-size: .92rem; }
footer.site .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
footer.site h4 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
footer.site a { color: rgba(255, 255, 255, .72); display: block; padding: 3px 0; }
footer.site a:hover { color: #fff; }
footer.site .legal { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 30px; padding-top: 20px; font-size: .82rem; }
@media (max-width: 800px) { footer.site .cols { grid-template-columns: 1fr 1fr; } }

/* ───────── Doctor ───────── */
.crop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.crop-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 14px 6px 10px; font-weight: 500; font-size: .86rem; text-align: center; color: var(--ink-2); transition: .15s; position: relative; }
.crop-opt .em { font-size: 1.9rem; line-height: 1; }
.crop-opt:hover { border-color: var(--green-500); }
.crop-opt.sel { border-color: var(--green-600); background: var(--green-50); color: var(--green-900); box-shadow: 0 0 0 4px rgba(22, 169, 116, .12); }
.crop-opt .tag { position: absolute; top: 6px; right: 6px; font-size: .58rem; background: var(--blue-100); color: #1a4fb0; border-radius: 6px; padding: 1px 5px; font-weight: 600; }
.dropzone { border: 2px dashed #b9d7c8; border-radius: 22px; background: linear-gradient(180deg, #fbfefc, #f2faf6); padding: 34px 20px; text-align: center; transition: .2s; }
.dropzone.over { border-color: var(--green-600); background: var(--green-50); }
.dropzone .big { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 22px; display: grid; place-items: center; background: var(--green-700); color: #fff; }
.dropzone .big .icon { width: 34px; height: 34px; }
.samples { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.sample { flex: 0 0 auto; width: 104px; border: 0; background: #fff; border-radius: 14px; padding: 0; overflow: hidden; box-shadow: var(--shadow); text-align: left; }
.sample img { width: 104px; height: 78px; object-fit: cover; }
.sample span { display: block; font-size: .72rem; padding: 6px 8px; color: var(--ink-2); line-height: 1.25; }
.tips li { margin-bottom: 6px; }
.tips { padding-left: 18px; margin: 0; color: var(--ink-2); font-size: .93rem; }

.analysis { display: grid; grid-template-columns: 360px 1fr; gap: 26px; align-items: start; }
@media (max-width: 860px) { .analysis { grid-template-columns: 1fr; } }
.scan-view { position: relative; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lg); background: #000; aspect-ratio: 1; }
.scan-view img { width: 100%; height: 100%; object-fit: cover; }
.scan-view .sweep { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(166, 227, 95, 0) 0%, rgba(166, 227, 95, .35) 48%, rgba(166, 227, 95, 0) 52%); background-size: 100% 220%; animation: sweep 1.8s linear infinite; }
@keyframes sweep { from { background-position: 0 120%; } to { background-position: 0 -120%; } }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.steps li .st { width: 26px; height: 26px; border-radius: 99px; border: 2px solid var(--line); display: grid; place-items: center; flex: 0 0 auto; }
.steps li.run { color: var(--ink); font-weight: 500; }
.steps li.run .st { border-color: var(--green-500); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.steps li.done { color: var(--ink); }
.steps li.done .st { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.steps li.skip .st { background: #eef1f0; }
.steps li .note { margin-left: auto; font-size: .8rem; color: var(--ink-3); }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 8px; background: var(--green-100); border-radius: 9px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--green-600); width: 0; transition: width .2s; }

/* Result */
.result-hero { display: grid; grid-template-columns: 220px 1fr auto; gap: 22px; align-items: center; }
.result-hero .thumb { width: 220px; height: 220px; border-radius: 18px; object-fit: cover; }
@media (max-width: 800px) { .result-hero { grid-template-columns: 1fr; } .result-hero .thumb { width: 100%; height: auto; aspect-ratio: 1; } }
.dx-name { font-size: clamp(1.6rem, 3.4vw, 2.3rem); color: var(--green-900); margin: 4px 0; }
.dx-sub { font-style: italic; color: var(--ink-3); margin-bottom: 12px; }
.meters { display: flex; gap: 18px; flex-wrap: wrap; }
.ring { --p: 0; --c: var(--green-600); width: 108px; height: 108px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), #e8eeeb 0); display: grid; place-items: center; position: relative; }
.ring::before { content: ''; position: absolute; inset: 10px; background: #fff; border-radius: 50%; }
.ring span { position: relative; text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; line-height: 1.1; }
.ring span small { display: block; font-family: var(--font); font-weight: 500; font-size: .68rem; color: var(--ink-3); }
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--sun-100); color: #6b4500; font-size: .94rem; align-items: flex-start; }
.alert.info { background: var(--blue-100); color: #173f8a; }
.alert.ok { background: var(--green-50); color: var(--green-900); }
.alert.bad { background: var(--red-100); color: #8f2219; }
.alert .icon { flex: 0 0 auto; margin-top: 2px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 22px 0 18px; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 12px 14px; font-weight: 600; color: var(--ink-3); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--green-800); border-color: var(--green-600); }
.list { padding-left: 20px; margin: 0; }
.list li { margin-bottom: 6px; }
table.t { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.t th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.t td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl-wrap { overflow-x: auto; }
.prob-row { display: grid; grid-template-columns: 1fr 60px; gap: 10px; align-items: center; margin-bottom: 10px; font-size: .92rem; }
.prob-row .bar { grid-column: 1 / -1; height: 8px; background: #edf2ef; border-radius: 9px; overflow: hidden; margin-top: -4px; }
.prob-row .bar i { display: block; height: 100%; background: var(--green-600); border-radius: 9px; }
.evidence-img { border-radius: 14px; width: 100%; aspect-ratio: 1; object-fit: cover; image-rendering: auto; }
.legend { display: flex; justify-content: space-between; font-size: .75rem; color: var(--ink-3); margin-top: 6px; }
.legend .grad { flex: 1; height: 8px; margin: 4px 8px; border-radius: 9px; background: linear-gradient(90deg, #00f, #0ff, #ff0, #f00); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .93rem; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 500; }
.money { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; }
.money.pos { color: var(--green-700); }
.money.neg { color: var(--red); }
.stat-tile { background: var(--green-50); border-radius: 14px; padding: 14px; }
.stat-tile .l { font-size: .8rem; color: var(--ink-3); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Forms */
label.f { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input, select.input { width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; background: #fff; color: var(--ink); }
.input:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(22, 169, 116, .12); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.seg { display: inline-flex; background: #eef2f0; border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 8px 16px; border-radius: 999px; font-weight: 600; color: var(--ink-3); font-size: .9rem; }
.seg button.on { background: #fff; color: var(--green-800); box-shadow: var(--shadow); }

/* Weather */
.wx-now { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; background: linear-gradient(135deg, #0b6e4f, #13956a); color: #fff; }
.wx-now .temp { font-family: var(--font-head); font-size: 3.4rem; font-weight: 700; line-height: 1; }
.wx-now .muted { color: rgba(255, 255, 255, .8); }
.days { display: grid; grid-template-columns: repeat(7, minmax(84px, 1fr)); gap: 10px; overflow-x: auto; }
.day { background: #fff; border-radius: 14px; padding: 12px 8px; text-align: center; box-shadow: var(--shadow); font-size: .86rem; }
.day .e { font-size: 1.6rem; }
.day .rain { color: var(--blue); font-weight: 600; font-size: .78rem; }
.risk-card { border-left: 5px solid var(--green-500); }
.risk-card.moderate { border-left-color: var(--sun); }
.risk-card.high { border-left-color: var(--red); }
.risk-dots { display: flex; gap: 5px; margin-top: 10px; }
.risk-dots i { flex: 1; height: 8px; border-radius: 5px; background: #e9eeeb; }
.risk-dots i.f1 { background: var(--red); }
.risk-dots i.f05 { background: var(--sun); }
.timeline { display: flex; gap: 2px; height: 40px; align-items: stretch; }
.timeline i { flex: 1; border-radius: 3px; background: #e7ecea; position: relative; }
.timeline i.ok { background: var(--green-500); }
.timeline i.night { background: #d7dde0; }
.timeline i.bad { background: #f3b4ae; }
.tl-labels { display: flex; justify-content: space-between; font-size: .72rem; color: var(--ink-3); margin-top: 6px; }
.window-pill { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--green-50); border-radius: 12px; margin-top: 8px; font-size: .92rem; }

/* Library */
.dz-card { display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: .2s; }
.dz-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.dz-card .top { display: flex; align-items: center; gap: 10px; }
.dz-card .em { font-size: 1.6rem; width: 46px; height: 46px; border-radius: 12px; background: var(--green-50); display: grid; place-items: center; }

/* Farm */
#map { height: 360px; border-radius: var(--radius); z-index: 1; }
.hist { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hist img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.hist .grow { flex: 1; min-width: 0; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(8, 25, 18, .45); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { background: #fff; border-radius: 22px; width: min(520px, 100%); max-height: 90vh; overflow: auto; padding: 26px; box-shadow: var(--shadow-lg); }
@keyframes fade { from { opacity: 0; } }

#toasts { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #102a20; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: .92rem; box-shadow: var(--shadow-lg); transition: .3s; max-width: 90vw; }
.toast.err { background: #8f2219; }
.toast.out { opacity: 0; transform: translateY(10px); }

.fade-in { animation: up .45s ease both; }
@keyframes up { from { opacity: 0; transform: translateY(12px); } }
.skeleton { background: linear-gradient(90deg, #eef2f0 25%, #f7f9f8 50%, #eef2f0 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }
@media print { .topbar, .tabbar, footer.site, .actions, .tabs { display: none !important; } body { background: #fff; } }
.row > * { min-width: 0; }
.row label.f { min-height: 2.3em; display: flex; align-items: flex-end; }

/* ═════════ v2: assistant, step-by-step results, science page, dark mode ═════════ */
:root { --soft: #f4f6f5; --glass: rgba(255, 255, 255, .86); }

/* Step navigation & sections */
.stepnav { position: sticky; top: 66px; z-index: 30; display: flex; gap: 6px; overflow-x: auto; padding: 12px 2px; margin: 18px 0 6px; background: var(--bg); scrollbar-width: none; }
.stepnav a { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); }
.stepnav a b { width: 24px; height: 24px; border-radius: 99px; display: grid; place-items: center; background: var(--green-700); color: #fff; font-size: .78rem; }
.stepnav a:hover { border-color: var(--green-500); color: var(--green-700); }
.step { padding-top: 26px; scroll-margin-top: 130px; }
.step-h { display: flex; align-items: center; gap: 12px; font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin-bottom: 14px; }
.step-h b { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--green-500), var(--green-800)); color: #fff; display: grid; place-items: center; font-size: 1.05rem; box-shadow: 0 6px 16px rgba(11, 110, 79, .3); }
.field-box { padding: 16px 20px; }

.one-rule { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0; padding: 14px 16px; border-radius: 14px; background: var(--sun-100); color: #6b4500; border: 1px dashed #f0c060; }
.best-card { position: relative; border-radius: 22px; padding: 26px 22px 22px; background: linear-gradient(135deg, rgba(22, 169, 116, .10), rgba(166, 227, 95, .12)); border: 2px solid var(--green-500); box-shadow: 0 14px 40px rgba(11, 110, 79, .16); }
.best-badge { position: absolute; top: -14px; left: 20px; background: linear-gradient(90deg, var(--green-700), var(--green-500)); color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .08em; padding: 6px 14px; border-radius: 999px; box-shadow: 0 6px 16px rgba(11, 110, 79, .35); }
.best-grid { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 300px); gap: 20px; align-items: start; }
.best-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.best-nums .stat-tile { background: var(--card); }
@media (max-width: 900px) { .best-grid { grid-template-columns: 80px minmax(0, 1fr); } .best-nums { grid-column: 1 / -1; } }
.prod-name { font-size: 1.35rem; margin: 0 0 2px; }
.pack-wrap { display: grid; place-items: center; background: var(--card); border-radius: 18px; padding: 8px; box-shadow: var(--shadow); }
.pack { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18)); flex: 0 0 auto; }
.why { list-style: none; padding: 0; margin: 6px 0 0; font-size: .92rem; }
.why li { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 5px; }
.why .icon { width: 16px; height: 16px; color: var(--green-600); flex: 0 0 auto; margin-top: 3px; }
.alt-card.picked { outline: 2px solid var(--green-500); }
.rotation { display: grid; gap: 0; }
.rot { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; position: relative; }
.rot:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 40px; bottom: -6px; width: 2px; background: var(--green-100); }
.rot-dot { width: 32px; height: 32px; border-radius: 99px; background: var(--green-700); color: #fff; display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }

.fert-card { display: flex; flex-direction: column; }
.fert-card.top { border: 2px solid var(--green-500); box-shadow: 0 14px 40px rgba(11, 110, 79, .14); }
.fert-top { display: flex; gap: 14px; align-items: center; }
.match { margin-top: 14px; }
.match-head { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 6px; }
.match-head b { font-family: var(--font-head); font-size: 1.15rem; color: var(--green-700); }
.match-bar { position: relative; height: 10px; border-radius: 9px; background: var(--soft); margin-bottom: 6px; }
.match-bar .range { position: absolute; top: 0; bottom: 0; border-radius: 9px; background: linear-gradient(90deg, var(--green-500), var(--lime)); opacity: .55; }
.match-bar .point { position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px; border-radius: 3px; background: var(--green-800); }

.mini-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; margin-top: 8px; }
.mini-days > div { background: var(--soft); border-radius: 10px; padding: 8px 2px; }
svg.proj { width: 100%; height: auto; margin: 6px 0; }
svg.proj text { font-size: 10px; fill: var(--ink-3); }
svg.proj .gl { stroke: var(--line); }
svg.proj .a-bad { fill: rgba(224, 69, 58, .12); }
svg.proj .l-bad { fill: none; stroke: var(--red); stroke-width: 2.5; }
svg.proj .l-good { fill: none; stroke: var(--green-600); stroke-width: 2.5; stroke-dasharray: 6 4; }
svg.proj .d-bad { fill: var(--red); } svg.proj .d-good { fill: var(--green-600); }

/* Chat assistant */
.chat-fab { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 62px; height: 62px; border-radius: 22px; border: 0; color: #fff; background: linear-gradient(135deg, var(--green-500), var(--green-800)); box-shadow: 0 14px 34px rgba(11, 110, 79, .45); display: grid; place-items: center; transition: transform .2s; }
.chat-fab:hover { transform: translateY(-3px) rotate(-4deg); }
.chat-fab .icon { width: 28px; height: 28px; }
.chat-fab .pulse { position: absolute; inset: 0; border-radius: 22px; border: 2px solid var(--green-500); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(1.45); opacity: 0; } }
.chat-panel { position: fixed; right: 22px; bottom: 98px; z-index: 95; width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100vh - 140px)); display: flex; flex-direction: column; background: var(--card); border-radius: 24px; box-shadow: 0 30px 80px rgba(6, 40, 28, .35); border: 1px solid var(--line); overflow: hidden; transform: translateY(20px) scale(.96); opacity: 0; pointer-events: none; transition: .22s ease; }
.chat-panel.open { transform: none; opacity: 1; pointer-events: auto; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px; color: #fff; background: linear-gradient(120deg, var(--green-800), var(--green-600)); }
.chat-head .icon-btn { width: 34px; height: 34px; background: rgba(255, 255, 255, .14); border-color: transparent; color: #fff; }
.chat-head .icon-btn.on { background: var(--lime); color: var(--green-900); }
.chat-avatar { width: 40px; height: 40px; border-radius: 14px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; font-size: 1.3rem; }
.chat-title { font-family: var(--font-head); font-weight: 600; }
.chat-sub { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: .93rem; line-height: 1.5; animation: up .25s ease both; }
.msg.bot { background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.user { background: var(--green-700); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg.typing { display: flex; gap: 4px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 9px; background: var(--ink-3); animation: blink 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; } .msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .2; } }
.chips-row { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; border-top: 1px solid var(--line); scrollbar-width: none; background: var(--card); }
.qchip { flex: 0 0 auto; border: 1px solid var(--green-100); background: var(--green-50); color: var(--green-800); border-radius: 999px; padding: 6px 12px; font-size: .8rem; font-weight: 500; }
.chat-input { display: flex; gap: 8px; padding: 10px 12px 12px; background: var(--card); }
.chat-input input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 14px; font: inherit; background: var(--bg); color: var(--ink); }
.chat-input .send { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.chat-input .icon-btn.on { background: var(--red); color: #fff; border-color: var(--red); animation: ping 1.2s infinite; }
@media (max-width: 900px) { .chat-fab { bottom: 92px; right: 14px; width: 54px; height: 54px; border-radius: 18px; } .chat-panel { right: 8px; left: 8px; width: auto; bottom: 156px; height: min(560px, calc(100vh - 220px)); } }

/* Hero upgrade */
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; z-index: 0; animation: float 14s ease-in-out infinite; }
.hero::before { width: 420px; height: 420px; background: #b9f0d3; top: -120px; right: 8%; }
.hero::after { width: 320px; height: 320px; background: #e6f9c4; bottom: -120px; left: 30%; animation-delay: -6s; }
.hero .wrap { position: relative; z-index: 1; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, 24px); } }
.hero h1 { background: linear-gradient(120deg, var(--green-900), var(--green-600) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.faq details { background: var(--card); border-radius: 16px; padding: 16px 20px; box-shadow: var(--shadow); margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; font-family: var(--font-head); list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::after { content: '+'; font-size: 1.3rem; color: var(--green-600); }
.faq details[open] summary::after { content: '–'; }
.faq p { margin: 10px 0 0; color: var(--ink-2); }

/* Science page */
.sci-hero { background: radial-gradient(900px 400px at 85% 0%, #1d8f63 0%, rgba(0, 0, 0, 0) 60%), linear-gradient(160deg, #062e21, #0a5640); color: #fff; padding: 64px 0 56px; }
.sci-hero h1 { color: #fff; }
.sci-hero .lead { color: rgba(255, 255, 255, .82); max-width: 680px; font-size: 1.1rem; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 28px; }
.kpis > div { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px; padding: 18px; backdrop-filter: blur(6px); }
.kpis b { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--lime); }
.kpis span { font-size: .85rem; color: rgba(255, 255, 255, .78); }
@media (max-width: 800px) { .kpis { grid-template-columns: 1fr 1fr; } }
.model-card .ico { margin-bottom: 10px; }
.f1-chart { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 26px; }
@media (max-width: 800px) { .f1-chart { grid-template-columns: 1fr; } }
.f1-row { display: grid; grid-template-columns: 190px 1fr 48px; gap: 10px; align-items: center; font-size: .82rem; }
.f1-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.f1-bar { height: 9px; background: var(--soft); border-radius: 9px; overflow: hidden; }
.f1-bar i { display: block; height: 100%; border-radius: 9px; }
.flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.flow-step { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); font-weight: 600; font-size: .9rem; text-align: center; line-height: 1.3; }
.flow-step small { font-weight: 400; color: var(--ink-3); }
.flow-arrow { color: var(--green-600); font-weight: 700; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* Theme toggle icons */
#themeBtn .i-sun { display: none; }
[data-theme="dark"] #themeBtn .i-sun { display: block; } [data-theme="dark"] #themeBtn .i-moon { display: none; }

/* ───────── Dark theme ───────── */
:root[data-theme="dark"] {
  --ink: #e7efeb; --ink-2: #c3cfc9; --ink-3: #8e9c96; --line: #26332e; --bg: #0c1311; --card: #141d1a; --soft: #1b2622; --glass: rgba(14, 21, 19, .85);
  --green-50: #12261e; --green-100: #1d3a2e; --green-900: #c9f5de; --green-800: #9fe8c2; --green-700: #3fcf93; --sun-100: #2e2410; --red-100: #2e1614; --blue-100: #14223a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
}
:root[data-theme="dark"] body { background: var(--bg); }
:root[data-theme="dark"] .topbar { background: var(--glass); }
:root[data-theme="dark"] :is(.btn-ghost, .lang-select, .icon-btn, .input, .crop-opt, .sample, .day, .pipe, .crop-pill, .tabbar, .modal, .float-step, .seg button.on, .phone .result-pop) { background: var(--card); color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .ring::before { background: var(--card); }
:root[data-theme="dark"] :is(.prob-row .bar, .progress, .risk-dots i, .timeline i, .seg) { background: var(--soft); }
:root[data-theme="dark"] .btn-primary { background: #12a06a; color: #fff; }
:root[data-theme="dark"] .hero { background: radial-gradient(1100px 500px at 85% -10%, #12402f 0%, rgba(0, 0, 0, 0) 60%), linear-gradient(180deg, #0c1311, #0f1a16); }
:root[data-theme="dark"] .hero::before { background: #0f5a3c; } :root[data-theme="dark"] .hero::after { background: #34501a; }
:root[data-theme="dark"] .hero h1 { background: linear-gradient(120deg, #e8fff3, #6fe0a9 70%); -webkit-background-clip: text; background-clip: text; }
:root[data-theme="dark"] .dropzone { background: linear-gradient(180deg, #121c18, #0f1714); border-color: #2a4a3b; }
:root[data-theme="dark"] :is(.alert, .one-rule) { color: #ffd98a; }
:root[data-theme="dark"] .alert.info { color: #a9c8ff; } :root[data-theme="dark"] .alert.ok { color: #b5f0d1; } :root[data-theme="dark"] .alert.bad { color: #ffb4ad; }
:root[data-theme="dark"] .chip.warn { color: #ffd98a; border-color: #4a3a12; } :root[data-theme="dark"] .chip.bad { color: #ffb4ad; border-color: #4a201c; } :root[data-theme="dark"] .chip.blue { color: #a9c8ff; border-color: #22385c; } :root[data-theme="dark"] .chip.grey { background: var(--soft); }
:root[data-theme="dark"] .window-pill { background: var(--green-50); }
:root[data-theme="dark"] .wx-now { background: linear-gradient(135deg, #0b4d38, #0e6b4b); }
:root[data-theme="dark"] .stats { background: #0a2b20; }
:root[data-theme="dark"] .cta-band { background: linear-gradient(120deg, #0a4a35, #0f7a52); }
:root[data-theme="dark"] .cta-band .btn-primary { background: #fff; color: #0a4a35; }
:root[data-theme="dark"] .best-card { background: linear-gradient(135deg, rgba(22, 169, 116, .14), rgba(166, 227, 95, .06)); }
:root[data-theme="dark"] .msg.user { background: #12a06a; }
:root[data-theme="dark"] .stepnav a b, :root[data-theme="dark"] .rot-dot { background: #12a06a; }
:root[data-theme="dark"] #map { filter: brightness(.85) contrast(1.1); }
@media print { .chat-fab, .chat-panel, .stepnav { display: none !important; } }
:root[data-theme="dark"] :is(.step-h b, .tabbar a.scan span.fab, .dropzone .big, .pipe::before, .float-step b, .best-badge, .chat-fab, .chat-input .send) { background: linear-gradient(135deg, #16a974, #0b6e4f); border-color: transparent; color: #fff; }
:root[data-theme="dark"] .tabbar a.scan span.fab { border-color: var(--card); }
:root[data-theme="dark"] .chat-head { background: linear-gradient(120deg, #0a4a35, #0f7a52); }
:root[data-theme="dark"] .stats .num, :root[data-theme="dark"] .kpis b { color: #a6e35f; }
:root[data-theme="dark"] .crop-opt.sel { background: var(--green-50); border-color: #16a974; color: var(--ink); }
:root[data-theme="dark"] .nav a.active { background: var(--green-50); color: #6fe0a9; }
:root[data-theme="dark"] footer.site { background: #070c0a; }
.nav a { white-space: nowrap; padding: 8px 11px; }
@media (max-width: 1340px) { #ctaTop { display: none; } }
.topbar .wrap { min-width: 0; }
.nav { min-width: 0; }
@media (max-width: 1060px) { .nav a { padding: 8px 8px; font-size: .9rem; } }
.best-nums .stat-tile:nth-child(3) { grid-column: 1 / -1; }
.brand { flex: 0 0 auto; } .topbar .wrap { gap: 16px; }
.spin { width: 20px; height: 20px; flex: 0 0 auto; border-radius: 99px; border: 3px solid currentColor; border-top-color: transparent; animation: spin .8s linear infinite; margin-top: 2px; }
.lab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.lab-item { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.lab-item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.lab-item > div { flex: 1; min-width: 0; line-height: 1.35; }
.lab-item .icon-btn { width: 30px; height: 30px; flex: 0 0 auto; }
.lab-item.ok { border-left: 4px solid var(--green-500); } .lab-item.bad { border-left: 4px solid var(--red); }
table.cm th, table.cm td { padding: 8px 6px; font-size: .8rem; }

/* ── Chat launcher v2: pill on desktop, round on mobile, draggable, clear of corner badges ── */
.chat-fab { right: 24px; bottom: 96px; width: auto; height: 56px; padding: 0 20px 0 16px; border-radius: 999px; display: flex; align-items: center; gap: 10px; font: 600 .95rem var(--font); touch-action: none; user-select: none; cursor: grab; transition: transform .2s, box-shadow .2s, left .25s, right .25s, top .25s; }
.chat-fab:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(11, 110, 79, .5); }
.chat-fab .pulse { border-radius: 999px; }
.chat-fab.dragging { transition: none; cursor: grabbing; transform: scale(1.06); }
.chat-fab .icon { width: 24px; height: 24px; flex: 0 0 auto; }
.chat-panel { bottom: 166px; height: min(580px, calc(100vh - 200px)); }
.chat-panel.on-left { right: auto; left: 22px; }
@media (max-width: 900px) {
  .chat-fab { right: 14px; bottom: 150px; width: 54px; height: 54px; padding: 0; justify-content: center; border-radius: 18px; }
  .chat-fab .fab-label { display: none; }
  .chat-fab .pulse { border-radius: 18px; }
  .chat-panel, .chat-panel.on-left { left: 8px; right: 8px; top: 74px; bottom: 84px; width: auto; height: auto; }
}

/* ── Rejection screen (no leaf / unfamiliar photo) ── */
.reject { max-width: 640px; margin: 30px auto; text-align: center; }
.reject .rj-img { position: relative; width: 200px; height: 200px; margin: 0 auto 18px; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); }
.reject .rj-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.6) brightness(.85); }
.reject .rj-img .rj-x { position: absolute; inset: 0; display: grid; place-items: center; font-size: 4rem; background: rgba(224, 69, 58, .18); }
.reject h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
.reject .tips { text-align: left; display: inline-block; margin: 6px auto 18px; }
.reject .actions { justify-content: center; }
.reject .why-small { font-size: .82rem; color: var(--ink-3); margin-top: 14px; }
.meter-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ci { font-size: .78rem; font-weight: 600; color: var(--ink-3); background: var(--soft); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }

/* Assistant opens from the header button — no floating launcher */
.chat-fab { display: none !important; }
.chat-panel, .chat-panel.on-left { top: 76px; bottom: auto; right: 22px; left: auto; height: min(600px, calc(100vh - 110px)); }
@media (max-width: 900px) { .chat-panel, .chat-panel.on-left { left: 8px; right: 8px; top: 70px; bottom: 84px; width: auto; height: auto; } }
@media (max-width: 520px) {
  .topbar .wrap { gap: 8px; }
  .brand { font-size: 1.1rem; gap: 6px; } .brand .logo { width: 30px; height: 30px; }
  .top-actions { gap: 6px; }
  .top-actions .icon-btn { width: 34px; height: 34px; } .top-actions .icon-btn .icon { width: 18px; height: 18px; }
  .lang-select { padding: 6px 6px; font-size: .82rem; max-width: 82px; }
}
@media (max-width: 380px) { #themeBtn { display: none; } }
html, body { overflow-x: hidden; }
