/* KisanNano — mobile-first, big touch targets, high contrast, field-readable */
* { box-sizing: border-box; }
html { font-size: 18px; }
body {
  margin: 0; font-family: system-ui, "Noto Sans Devanagari", sans-serif;
  background: #f4f7f0; color: #1a1a1a;
}
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  background: #1b5e20; color: #fff; padding: 12px 16px;
  position: sticky; top: 0; z-index: 5;
}
.brand { font-size: 1.25rem; font-weight: 700; }
.brand-hi { font-weight: 400; opacity: .9; font-size: 1rem; }
.lang-toggle button {
  font-size: 1rem; padding: 10px 14px; border-radius: 10px;
  border: 2px solid #fff; background: transparent; color: #fff; cursor: pointer;
}
.lang-toggle button.active { background: #fff; color: #1b5e20; font-weight: 700; }

.statusbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 8px 16px; background: #e8f0e2; font-size: .85rem;
}
.pill { padding: 4px 12px; border-radius: 999px; font-weight: 700; }
.pill-on { background: #c8e6c9; color: #1b5e20; }
.pill-off { background: #ffcdd2; color: #b71c1c; }
.status-line { color: #33691e; }

main { max-width: 720px; margin: 0 auto; padding: 16px; }
.flash {
  background: #fff3cd; border: 1px solid #e0a800; border-radius: 10px;
  padding: 10px 14px; font-weight: 600;
}

.ask-card, .answer-card, .test-card {
  background: #fff; border-radius: 16px; padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08); margin-bottom: 16px;
}
.mic-row { display: flex; justify-content: center; margin-bottom: 12px; }
.mic-btn {
  width: 104px; height: 104px; border-radius: 50%; border: none;
  background: #2e7d32; color: #fff; font-size: 2.6rem; cursor: pointer;
  box-shadow: 0 4px 14px rgba(46,125,50,.4);
}
.mic-btn.listening { background: #c62828; animation: pulse 1s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }

textarea {
  width: 100%; font-size: 1.1rem; padding: 12px; border: 2px solid #a5d6a7;
  border-radius: 12px; resize: vertical; font-family: inherit;
}
.ask-btn {
  width: 100%; margin-top: 12px; min-height: 60px; font-size: 1.25rem; font-weight: 700;
  background: #1b5e20; color: #fff; border: none; border-radius: 12px; cursor: pointer;
}
.chips { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.chip {
  text-align: left; font-size: 1rem; padding: 12px 14px; min-height: 52px;
  background: #e8f5e9; border: 1px solid #a5d6a7; border-radius: 12px; cursor: pointer;
  font-family: inherit;
}

/* ---- Brain badge: the scored UX feature — always visible, never subtle ---- */
.badge {
  display: block; text-align: center; font-size: 1.15rem; font-weight: 800;
  padding: 12px; border-radius: 12px; margin-bottom: 12px; border: 3px solid transparent;
}
.badge-device { background: #e8f5e9; color: #1b5e20; border-color: #2e7d32; }
.badge-cloud  { background: #e3f2fd; color: #0d47a1; border-color: #1565c0; }

.answer-q { font-weight: 700; margin-bottom: 8px; color: #33691e; }
.answer-text { white-space: pre-wrap; line-height: 1.55; font-size: 1.05rem; }
.answer-actions { display: flex; gap: 8px; margin-top: 14px; }
.secondary-btn {
  flex: 1; min-height: 54px; font-size: 1.05rem; border-radius: 12px; cursor: pointer;
  background: #fff; border: 2px solid #2e7d32; color: #1b5e20; font-weight: 700; font-family: inherit;
}

.test-card h2 { margin-top: 0; font-size: 1.2rem; }
.test-item { border-top: 1px solid #ddd; padding: 12px 0; }
.test-item .badge { font-size: 1rem; padding: 8px; }
.test-q { font-weight: 700; margin-bottom: 6px; }
.test-a { white-space: pre-wrap; line-height: 1.5; color: #333; }
.test-summary { font-weight: 800; font-size: 1.05rem; }

.foot { color: #555; font-size: .85rem; text-align: center; padding: 8px 0 24px; }
