/* ═══════════════════════════════════════════════════
   KRISHIMITRA | style.css
   Kisan ka Sachcha Mitra | Calm, simple farm UI
═══════════════════════════════════════════════════ */

/* Heading fonts (Fraunces, Tiro Devanagari Hindi) load in index.html.
   Body text uses the phone's own font, so nothing extra to download. */

/* ══════════════════════════════
   CSS VARIABLES
══════════════════════════════ */
:root {
  --paper:        #f6f3ea;
  --paper-deep:   #efeadd;
  --surface:      #fffdf8;
  --inset:        #f3efe4;

  --ink:          #1c2a21;
  --ink-soft:     #43514a;
  --ink-muted:    #5f6b62;
  --line:         #e3ddcd;
  --line-strong:  #cdc5b0;

  --forest:       #183a25;
  --forest-deep:  #122c1c;
  --green:        #2a6a3f;
  --green-dark:   #1f5431;
  --green-soft:   #e3eee2;

  --gold:         #e3bd6a;
  --gold-ink:     #7d5a14;
  --gold-soft:    #f6ecd2;

  --clay:         #a84a22;
  --clay-soft:    #f7e3d8;
  --sky:          #27617f;
  --sky-soft:     #e0edf4;

  --cream:        #f4efe1;
  --cream-soft:   rgba(244, 239, 225, 0.8);

  --rate-good:    #3f8f57;
  --rate-fair:    #e0b34a;
  --rate-avoid:   #c8623c;
  --rate-night:   #d9d3c2;

  --radius:       18px;
  --radius-sm:    12px;
  --shadow:       0 1px 2px rgba(24, 42, 30, 0.05), 0 14px 34px -20px rgba(24, 42, 30, 0.28);
  --shadow-hover: 0 2px 4px rgba(24, 42, 30, 0.06), 0 26px 48px -22px rgba(24, 42, 30, 0.42);
  --shadow-lift:  0 30px 70px -25px rgba(18, 44, 28, 0.55), 0 2px 6px rgba(18, 44, 28, 0.08);

  --font-display: "Fraunces", "Tiro Devanagari Hindi", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body:    system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;

  --ease:         cubic-bezier(0.2, 0.7, 0.2, 1);
  --spring:       cubic-bezier(0.34, 1.56, 0.64, 1);
  --edge:         clamp(1rem, 3vw, 1.75rem);

  /* Space taken by the notch and home bar on iPhones */
  --safe-top:     env(safe-area-inset-top, 0px);
  --safe-bottom:  env(safe-area-inset-bottom, 0px);
  --safe-left:    env(safe-area-inset-left, 0px);
  --safe-right:   env(safe-area-inset-right, 0px);
}

/* ══════════════════════════════
   RESET & BASE
══════════════════════════════ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 106.25%;            /* 17px: easier to read in the field */
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); font-weight: 450; line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.3rem); }

a { color: var(--green); }
button, input, select, textarea { font: inherit; color: inherit; }
a, button, input, select, textarea, label {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
[hidden] { display: none !important; }
::selection { background: var(--gold); color: var(--forest-deep); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.hero :focus-visible,
.ask :focus-visible,
.site-footer :focus-visible,
.chat-head :focus-visible {
  outline-color: var(--gold);
}

/* Hindi needs more room above and below each line */
html[lang="hi"] body { line-height: 1.75; }
html[lang="hi"] h1,
html[lang="hi"] h2,
html[lang="hi"] h3,
html[lang="hi"] .answer,
html[lang="hi"] .footer-name {
  line-height: 1.4;
  letter-spacing: 0;
}
html[lang="hi"] .eyebrow,
html[lang="hi"] .footer-title,
html[lang="hi"] .tile-name,
html[lang="hi"] .profit-main-label {
  letter-spacing: 0;
  font-size: 0.88rem;
}

.container {
  width: min(1180px, 100% - 2 * var(--edge) - var(--safe-left) - var(--safe-right));
  margin-inline: auto;
}

.sprite { position: absolute; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--forest);
  color: var(--cream);
  transition: top 0.2s;
}
.skip-link:focus { top: calc(0.75rem + var(--safe-top)); }

.icon {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--spring);
}

.nowrap { white-space: nowrap; }

/* ══════════════════════════════
   BUTTONS, PILLS, TAGS
══════════════════════════════ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.3rem;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--green); color: #fff; }
.btn-gold    { background: var(--gold); color: var(--forest-deep); box-shadow: 0 10px 24px -12px rgba(227, 189, 106, 0.8); }
.btn-ghost   { border-color: rgba(244, 239, 225, 0.35); color: var(--cream); background: transparent; }
.btn-outline { width: 100%; border-color: var(--line-strong); color: var(--ink); background: transparent; }

/* Soft light that sweeps across the gold button */
.btn-gold::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn.is-busy .icon { animation: spin 0.9s linear infinite; }
.icon-btn-light { border-color: rgba(244, 239, 225, 0.22); color: var(--cream-soft); }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: var(--inset);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.pill:empty { display: none; }
.pill-gold { background: rgba(227, 189, 106, 0.16); border: 1px solid rgba(227, 189, 106, 0.35); color: var(--gold); }

.tag {
  display: inline-block;
  padding: 0.14rem 0.6rem;
  border-radius: 999px;
  background: var(--inset);
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}
.tag-now  { background: var(--green-soft); color: var(--green-dark); }
.tag-soon { background: var(--gold-soft); color: var(--gold-ink); }

.eyebrow {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.eyebrow-light { color: var(--gold); }

/* ══════════════════════════════
   HEADER
══════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: var(--safe-top);
  background: rgba(246, 243, 234, 0.86);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -22px rgba(24, 42, 30, 0.55);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  transition: transform 0.4s var(--spring);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
.brand-tag  { font-size: 0.72rem; color: var(--ink-muted); }

.site-nav {
  display: flex;
  gap: 0.2rem;
  margin-inline: auto;
}
.site-nav a {
  position: relative;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s;
}
.site-nav a.is-active {
  background: var(--green-soft);
  color: var(--green-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-btn,
.location-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.lang-btn:active,
.location-btn:active { transform: scale(0.96); }
.lang-btn { color: var(--green-dark); background: var(--green-soft); border-color: transparent; }

.location-btn { max-width: 14rem; font-weight: 500; }
.location-btn .icon { color: var(--green); }
.location-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ══════════════════════════════
   HERO
══════════════════════════════ */
.hero {
  --sky-top: #1f4b30;
  --sky-low: #153322;
  position: relative;
  overflow: hidden;
  color: var(--cream);
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-low) 100%);
}
/* The sky changes with the real time of day at the farmer's place */
.hero[data-sky="dawn"]  { --sky-top: #1d3f2d; --sky-low: #4f4a2b; }
.hero[data-sky="dusk"]  { --sky-top: #1b3529; --sky-low: #5c3e25; }
.hero[data-sky="night"] { --sky-top: #0b1c15; --sky-low: #12281c; }

/* Slow, soft light that drifts behind the headline: the sun by day, the moon by night */
.hero-glow {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(38% 42% at 82% 12%, rgba(227, 189, 106, 0.3), transparent 70%),
    radial-gradient(34% 40% at 6% 96%, rgba(96, 168, 118, 0.26), transparent 70%);
  animation: drift 22s ease-in-out infinite alternate;
  pointer-events: none;
}
.hero[data-sky="dawn"] .hero-glow {
  background:
    radial-gradient(55% 50% at 78% 88%, rgba(243, 180, 96, 0.44), transparent 70%),
    radial-gradient(34% 40% at 6% 96%, rgba(96, 168, 118, 0.2), transparent 70%);
}
.hero[data-sky="dusk"] .hero-glow {
  background:
    radial-gradient(55% 50% at 22% 88%, rgba(232, 140, 80, 0.42), transparent 70%),
    radial-gradient(40% 40% at 85% 20%, rgba(227, 189, 106, 0.12), transparent 70%);
}
.hero[data-sky="night"] .hero-glow {
  background: radial-gradient(26% 30% at 84% 14%, rgba(200, 216, 255, 0.17), transparent 70%);
}

/* ── Sky: stars, clouds, rain and birds ── */
.sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sky-stars {
  position: absolute;
  inset: 0 0 38% 0;
  background-image:
    radial-gradient(1.6px 1.6px at 6% 24%, #fff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 14% 62%, #fff 60%, transparent 62%),
    radial-gradient(1.8px 1.8px at 23% 12%, #fff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 31% 44%, #fff 60%, transparent 62%),
    radial-gradient(1.6px 1.6px at 42% 18%, #fff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 49% 70%, #fff 60%, transparent 62%),
    radial-gradient(1.8px 1.8px at 58% 30%, #fff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 66% 9%, #fff 60%, transparent 62%),
    radial-gradient(1.6px 1.6px at 73% 52%, #fff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 81% 26%, #fff 60%, transparent 62%),
    radial-gradient(1.8px 1.8px at 90% 46%, #fff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 96% 14%, #fff 60%, transparent 62%);
  opacity: 0;
  animation: twinkle 4.5s ease-in-out infinite alternate;
  transition: opacity 1.2s;
}
.hero[data-sky="night"] .sky-stars { opacity: 0.9; }
.hero[data-sky="dawn"] .sky-stars,
.hero[data-sky="dusk"] .sky-stars { opacity: 0.22; }

.sky-cloud {
  position: absolute;
  left: -30%;
  width: 18rem;
  height: 4.5rem;
  border-radius: 999px;
  background: rgba(244, 239, 225, 0.12);
  filter: blur(14px);
  opacity: 0.3;
  animation: sail 70s linear infinite;
  transition: opacity 1.2s;
}
.sky-cloud-1 { top: 14%; }
.sky-cloud-2 { top: 32%; width: 26rem; height: 5.5rem; animation-duration: 95s; animation-delay: -40s; }
.sky-cloud-3 { top: 6%; width: 14rem; animation-duration: 80s; animation-delay: -62s; }
.hero:not([data-weather="clear"]) .sky-cloud { opacity: 1; }

.sky-rain {
  position: absolute;
  inset: -10% -10% 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cpath d='M12 4v14M56 32v14M34 60v14M78 70v14' stroke='%23d2e6f5' stroke-opacity='.5' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  opacity: 0;
  transform: skewX(-12deg);
  animation: rain 0.7s linear infinite;
  transition: opacity 1.2s;
}
.hero[data-weather="rain"] .sky-rain,
.hero[data-weather="storm"] .sky-rain { opacity: 1; }

.sky-birds {
  position: absolute;
  top: 15%;
  left: -12%;
  width: 6.5rem;
  fill: none;
  stroke: rgba(244, 239, 225, 0.5);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: sail 46s linear infinite;
  animation-delay: -12s;
}
.hero[data-sky="night"] .sky-birds,
.hero[data-weather="rain"] .sky-birds,
.hero[data-weather="storm"] .sky-birds { opacity: 0; }

/* ── Rolling fields along the bottom ── */
.land {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: clamp(120px, 17vw, 240px);
  pointer-events: none;
}
.land-far   { fill: rgba(120, 182, 138, 0.17); }
.land-trees { fill: #10301e; }
.land-mid   { fill: #1c4a30; }
.land-near  { fill: #0f2a1b; }
.land-rows path {
  fill: none;
  stroke: rgba(227, 189, 106, 0.28);
  stroke-width: 1.5;
}
.hero[data-sky="night"] .land-mid { fill: #143524; }
.hero[data-sky="night"] .land-far { fill: rgba(120, 182, 138, 0.09); }
.hero[data-sky="dawn"] .land-far,
.hero[data-sky="dusk"] .land-far  { fill: rgba(236, 190, 120, 0.2); }

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(8.5rem, 17vw, 13rem);
}

.hero h1 { margin-top: 0.8rem; }
.hero h1 em,
.ask h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}
/* A slow shine passes over the gold words */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 em {
    background: linear-gradient(100deg, #e3bd6a 30%, #fff4d2 48%, #e3bd6a 66%) 0 0 / 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 7s ease-in-out infinite;
  }
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.3rem;
  margin-top: 1.5rem;
  padding-left: 4px;               /* room for the ring around each dot */
  list-style: none;
  font-size: 0.9rem;
  color: var(--cream-soft);
}
.hero-points li { display: flex; align-items: center; gap: 0.5rem; }
.hero-points li::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(227, 189, 106, 0.18);
}

.lead {
  max-width: 36rem;
  margin-top: 1.1rem;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  color: var(--cream-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.hero-card {
  padding: 1.5rem;
  border: 1px solid rgba(244, 239, 225, 0.16);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.07);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform 0.5s var(--ease), border-color 0.4s, background 0.4s;
}

.hero-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--cream-soft);
}

.hero-now {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-block: 1.1rem 0.9rem;
}
.hero-temp {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7vw, 4.6rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
}
.hero-now-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.hero-cond  { font-size: 1.08rem; font-weight: 600; }
.hero-place { font-size: 0.9rem; color: var(--cream-soft); }

.hero-advice {
  padding-top: 0.9rem;
  border-top: 1px solid rgba(244, 239, 225, 0.14);
  font-size: 0.96rem;
  color: rgba(244, 239, 225, 0.92);
}

/* ── Sun path: where the sun (or moon) is right now ── */
.sunpath { margin-bottom: 0.9rem; }
.sunpath svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.sunpath-track {
  fill: none;
  stroke: rgba(244, 239, 225, 0.24);
  stroke-width: 1.6;
  stroke-dasharray: 3 4;
}
.sunpath-done {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: var(--sun-p, 0) 1;
  transition: stroke-dasharray 1.6s var(--ease);
}
.sunpath-ground { stroke: rgba(244, 239, 225, 0.22); stroke-width: 1; }
.sunpath-mark {
  transform: translate(12px, 62px);
  transition: transform 1.6s var(--ease);
}
.sunpath-dot  { fill: var(--gold); }
.sunpath-glow {
  fill: rgba(227, 189, 106, 0.28);
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 3.2s ease-in-out infinite;
}
.sunpath.is-night .sunpath-done { stroke: rgba(226, 232, 246, 0.6); }
.sunpath.is-night .sunpath-dot  { fill: #e6ebf6; }
.sunpath.is-night .sunpath-glow { fill: rgba(226, 232, 246, 0.2); }

.sunpath-times {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--cream-soft);
}
.sunpath-note { font-weight: 600; color: var(--cream); text-align: center; }

/* ── Listen and share ── */
.hero-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.mini-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.45rem 0.95rem;
  overflow: hidden;
  border: 1px solid rgba(244, 239, 225, 0.24);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.08);
  color: var(--cream);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s var(--ease);
}
.mini-btn:active { transform: scale(0.96); }
.mini-btn.is-on {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--forest-deep);
}
.mini-btn.is-on .icon { animation: pulse 1s ease-in-out infinite; }
.hero-status { margin-top: 0.55rem; font-size: 0.82rem; color: var(--gold); }
.hero-status:empty { display: none; }

/* ══════════════════════════════
   TODAY IN FOUR ANSWERS
   A card that sits across the bottom edge of the hero
══════════════════════════════ */
.quick-wrap {
  position: relative;
  z-index: 3;
  margin-top: -3.5rem;
}
.quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-hover);
  animation: rise 0.8s var(--ease) 0.45s backwards;
}
.quick-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  padding: 1.05rem 1.1rem;
  overflow: hidden;
  border-left: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.25s;
}
.quick-item:first-child { border-left: 0; }
.quick-text   { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.quick-label  { font-size: 0.78rem; color: var(--ink-muted); }
.quick-answer { font-size: 0.98rem; font-weight: 650; }

/* A card reached from a quick answer should not hide under the header */
.card-title { scroll-margin-top: calc(110px + var(--safe-top)); }

/* Hero pieces arrive one after another when the page opens */
.js .hero-copy > *,
.js .hero-card {
  animation: rise 0.8s var(--ease) backwards;
}
.js .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.js .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.js .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.js .hero-copy > :nth-child(5) { animation-delay: 0.32s; }
.js .hero-card { animation-delay: 0.3s; }

/* ══════════════════════════════
   SECTIONS & GRID
══════════════════════════════ */
.section {
  padding-block: clamp(2.75rem, 7vw, 4.75rem);
  scroll-margin-top: calc(64px + var(--safe-top));
}
.section-tint {
  background: var(--paper-deep);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 44rem;
  margin-bottom: 1.75rem;
}
.section-head h2 { margin-top: 0.35rem; }
.section-desc { margin-top: 0.5rem; color: var(--ink-soft); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem;
}
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-12 { grid-column: span 12; }

/* ══════════════════════════════
   CARDS
══════════════════════════════ */
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(1.1rem, 2.2vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.8rem;
  margin-bottom: 1.1rem;
}

.card-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 14px;
  background: var(--inset);
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 0.45s var(--spring), background 0.3s;
}
.card-icon-text {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--green);
}

.card-title {
  flex: 1;
  min-width: 8rem;
  font-size: 1.32rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* The one-line answer at the top of a card */
.answer {
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.22rem, 2.3vw, 1.48rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--forest);
}
.answer.is-good { color: var(--green); }
.answer.is-wait { color: var(--sky); }
.answer.is-warn { color: var(--gold-ink); }
.answer.is-bad  { color: var(--clay); }

.answer-why {
  margin-bottom: 1rem;
  font-size: 0.96rem;
  color: var(--ink-soft);
}
.answer-why:empty { display: none; }

.meta {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-muted);
}
.meta:empty { display: none; }
.card > .meta:last-child {
  margin-top: auto;
  padding-top: 0.9rem;
}

.advice {
  margin-top: 1rem;
  padding: 0.75rem 0.95rem;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: var(--gold-soft);
  font-size: 0.95rem;
}
.advice + .meta { padding-top: 0.7rem; }

.placeholder {
  padding: 1rem 0;
  list-style: none;
  color: var(--ink-muted);
}

/* ══════════════════════════════
   WEATHER NOW
══════════════════════════════ */
.wx-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.wx-temp {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 7vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--forest);
}
.wx-desc  { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.wx-cond  { font-size: 1.12rem; font-weight: 600; }
.wx-place { font-size: 0.92rem; color: var(--ink-muted); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.stat {
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--inset);
  transition: transform 0.3s var(--ease), background 0.3s;
}
.stat dt {
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--ink-muted);
}
.stat dd {
  margin-top: 0.25rem;
  font-size: 1.06rem;
  font-weight: 650;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
/* A short line under the number that says what it means */
.stat dd.stat-note {
  margin-top: 0.2rem;
  font-size: 0.76rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink-muted);
}
.stat-note:empty { display: none; }

.wx-feels {
  margin: -0.5rem 0 1rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.mini-title {
  margin: 1.2rem 0 0.4rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
html[lang="hi"] .mini-title { letter-spacing: 0; font-size: 0.9rem; }

/* ══════════════════════════════
   NEXT 24 HOURS
   A temperature curve, with a column under it for every three hours
══════════════════════════════ */
.hourly-curve {
  display: block;
  width: 100%;
  height: 64px;
}
.hourly-line {
  fill: none;
  stroke: #c9962f;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.5s var(--ease) 0.2s forwards;
}
.hourly-area {
  opacity: 0;
  animation: fade-in 1s ease 0.7s forwards;
}

.hourly-slots {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  list-style: none;
}
.hourly-slot {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  padding: 0.45rem 0 0.2rem 0.4rem;
  border-left: 1px dashed var(--line-strong);
  animation: rise 0.45s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 55ms);
}
.hourly-slot:first-child { padding-left: 0; border-left-color: transparent; }
.hourly-time { font-size: 0.72rem; line-height: 1.25; color: var(--ink-muted); }
.hourly-icon { font-size: 1.15rem; line-height: 1.25; }
.hourly-temp { font-weight: 650; font-variant-numeric: tabular-nums; }
.hourly-rain { min-height: 1rem; font-size: 0.7rem; font-weight: 600; color: var(--sky); white-space: nowrap; }
.hourly .meta { margin-top: 0.45rem; }

/* ══════════════════════════════
   NEXT 7 DAYS
══════════════════════════════ */
.forecast {
  display: flex;
  flex-direction: column;
  list-style: none;
}

.fc-row {
  display: grid;
  grid-template-columns: 4.4rem 2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  margin-inline: -0.6rem;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
  transition: background 0.25s;
}
.fc-row:last-child { border-bottom-color: transparent; }

.fc-day  { font-weight: 600; }
.fc-row.is-today .fc-day { color: var(--green); }
.fc-icon { font-size: 1.3rem; text-align: center; }
.fc-text   { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.fc-label  { font-size: 0.95rem; font-weight: 600; }
.fc-detail { font-size: 0.82rem; color: var(--ink-muted); }
.fc-rain.is-wet { color: var(--sky); font-weight: 600; }
.fc-temps { white-space: nowrap; }
.fc-max { font-weight: 650; }
.fc-min { margin-left: 0.5rem; color: var(--ink-muted); }

/* ══════════════════════════════
   WHEN TO SPRAY
══════════════════════════════ */
.spray {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.spray-day {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.7rem;
}
.spray-label {
  padding-top: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.hours {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 2px;
}
.hour {
  height: 30px;
  border: 0;
  border-radius: 4px;
  background: var(--inset);
  cursor: pointer;
  transform-origin: bottom;
  animation: grow 0.5s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 14ms);
  transition: transform 0.2s var(--spring), filter 0.2s;
}
.hour.good  { background: var(--rate-good); }
.hour.fair  { background: var(--rate-fair); }
.hour.avoid { background: var(--rate-avoid); }
.hour.night { background: var(--rate-night); }
.hour.is-past { opacity: 0.35; }
.hour.is-now  { outline: 2px solid var(--ink); outline-offset: 1px; }
.hour.is-picked { transform: scaleY(1.3); filter: brightness(1.05); outline: 2px solid var(--forest); outline-offset: 1px; }

.hour-ticks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin: 1rem 0 0;
  list-style: none;
  font-size: 0.84rem;
  color: var(--ink-soft);
}
.legend li { display: flex; align-items: center; gap: 0.4rem; }

.swatch { width: 13px; height: 13px; border-radius: 4px; }
.swatch.good  { background: var(--rate-good); }
.swatch.fair  { background: var(--rate-fair); }
.swatch.avoid { background: var(--rate-avoid); }
.swatch.night { background: var(--rate-night); }

/* ══════════════════════════════
   TABS
══════════════════════════════ */
.tabs {
  position: relative;
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--inset);
}
/* The white pill that slides under the chosen tab (placed by script.js) */
.tabs::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: var(--pill-w, 0);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(24, 42, 30, 0.16);
  transform: translateX(var(--pill-x, 0));
  transition: transform 0.4s var(--ease), width 0.4s var(--ease);
}
.tab {
  position: relative;
  min-height: 36px;
  padding: 0.35rem 0.95rem;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.3s;
}
.tab[aria-selected="true"] { color: var(--ink); }

/* ══════════════════════════════
   ROW LISTS (crops, pests, schemes)
══════════════════════════════ */
.rows { list-style: none; }

.row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-inline: -0.6rem;
  padding: 0.8rem 0.6rem;
  border-bottom: 1px solid var(--line);
  border-radius: 10px;
  transition: background 0.25s;
}
.row:last-child { border-bottom-color: transparent; }

/* Rows slide in one by one whenever a list is drawn */
.rows > .row,
.fc-row,
.msp-item {
  animation: rise 0.45s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}

.row-icon {
  flex: none;
  width: 1.9rem;
  font-size: 1.4rem;
  line-height: 1.3;
  text-align: center;
  transition: transform 0.4s var(--spring);
}
.row-main  { display: flex; flex: 1; flex-direction: column; gap: 0.15rem; min-width: 0; }
.row-title { font-weight: 600; }
.row-sub   { font-size: 0.92rem; color: var(--ink-soft); }
.row-side {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  font-size: 0.84rem;
  color: var(--ink-muted);
  text-align: right;
  white-space: nowrap;
}

.link {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.25rem;
  padding-top: 0.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* ══════════════════════════════
   GOVERNMENT PRICE (MSP)
══════════════════════════════ */
.msp {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.6rem;
}
.msp-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--inset);
  transition: transform 0.3s var(--ease), background 0.3s;
}
.msp-item dt { font-size: 0.94rem; color: var(--ink-soft); }
.msp-item dd { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ══════════════════════════════
   FORMS (calculators)
══════════════════════════════ */
.form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.field {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.3rem;
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink-soft);
}
.field-row { display: flex; gap: 0.7rem; }

input[type="number"],
input[type="search"],
input[type="date"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  font-size: max(16px, 1rem);     /* 16px or more stops iPhones zooming in on focus */
  font-weight: 400;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}
input[type="number"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(42, 106, 63, 0.16);
}

/* Fertilizer result */
.result-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}
.tile {
  padding: 0.8rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--green-soft);
  text-align: center;
  transition: transform 0.3s var(--ease);
}
.tile-name {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--green-dark);
}
.tile-value {
  margin-top: 0.15rem;
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1.15;
  color: var(--forest);
}
.tile-unit { font-size: 0.84rem; font-weight: 600; color: var(--green-dark); }
.tile-sub  { margin-top: 0.15rem; font-size: 0.8rem; color: var(--ink-soft); }

/* Profit result */
.profit-main {
  margin-bottom: 0.5rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--green-soft);
  transition: background 0.4s;
}
.profit-main-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--green-dark);
}
.profit-main-value {
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1.15;
  color: var(--forest);
}
.profit-main.is-loss { background: var(--clay-soft); }
.profit-main.is-loss .profit-main-label,
.profit-main.is-loss .profit-main-value { color: #7a3216; }

/* Label and value list (profit, land units) */
.kv { display: flex; flex-direction: column; }
.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--ink-soft); }
.kv dd { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }

/* ══════════════════════════════
   HELPLINES
══════════════════════════════ */
.helplines {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  list-style: none;
}
.helpline {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 64px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}
.helpline:active { transform: scale(0.98); background: var(--green-soft); }
.helpline .icon { width: 1.3rem; height: 1.3rem; color: var(--green); }
.helpline-num  { display: block; font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.helpline-name { display: block; font-size: 0.86rem; line-height: 1.4; color: var(--ink-muted); }

/* ══════════════════════════════
   ASK MITRA BAND
══════════════════════════════ */
.ask {
  padding-block: clamp(2.75rem, 7vw, 4.5rem);
  color: var(--cream);
  background:
    radial-gradient(700px 320px at 95% 120%, rgba(227, 189, 106, 0.16), transparent 60%),
    linear-gradient(180deg, #1b4029 0%, #153322 100%);
}
.ask-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.ask h2 { margin-top: 0.35rem; }

.ask-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  min-height: 46px;
  padding: 0.6rem 1.05rem;
  border: 1px solid rgba(244, 239, 225, 0.28);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.06);
  color: var(--cream);
  font-size: 0.96rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s var(--ease);
}
.chip:active { transform: scale(0.97); }

.chip-sm {
  min-height: 38px;
  padding: 0.38rem 0.8rem;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.86rem;
}

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
.site-footer {
  padding-block: 2.75rem calc(5rem + var(--safe-bottom));
  background: var(--forest-deep);
  color: var(--cream-soft);
  font-size: 0.92rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1.5fr;
  gap: 2rem;
}
.footer-brand { display: flex; align-items: flex-start; gap: 0.9rem; }
.footer-name  { font-family: var(--font-display); font-size: 1.25rem; color: var(--cream); }
.footer-title {
  margin-bottom: 0.6rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; }
.footer-note p + p { margin-top: 0.6rem; }
.site-footer a {
  color: var(--cream);
  text-decoration-color: rgba(244, 239, 225, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.25s;
}

/* ══════════════════════════════
   CHATBOT
══════════════════════════════ */
.chat-fab {
  position: fixed;
  right: calc(var(--edge) + var(--safe-right));
  bottom: calc(var(--edge) + var(--safe-bottom));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 54px;
  padding: 0.85rem 1.3rem;
  border: 0;
  border-radius: 999px;
  background: var(--forest);
  color: var(--cream);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 30px -10px rgba(18, 44, 28, 0.65);
  animation: breathe 4s ease-in-out infinite;
  transition: background 0.25s, transform 0.3s var(--ease), opacity 0.25s;
}
.chat-fab:active { transform: scale(0.96); }
.chat-fab .icon { width: 1.3rem; height: 1.3rem; color: var(--gold); }
.chat-open .chat-fab { animation: none; }
/* While the hero is on screen it has its own "Ask Mitra" button */
.at-hero:not(.chat-open) .chat-fab {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}

.chat {
  position: fixed;
  right: calc(var(--edge) + var(--safe-right));
  bottom: calc(var(--edge) + var(--safe-bottom) + 4.2rem);
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: min(420px, calc(100vw - 2 * var(--edge)));
  height: min(640px, calc(100vh - 7.5rem));
  height: min(640px, calc(100dvh - 7.5rem));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s;
}
.chat.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  background: var(--forest);
  color: var(--cream);
}
.chat-head .brand-mark { width: 38px; height: 38px; }
.chat-head-text { flex: 1; min-width: 0; }
.chat-head h2 { font-size: 1.15rem; letter-spacing: 0; }
.chat-head p  { font-size: 0.78rem; line-height: 1.4; color: var(--cream-soft); }

.chat-log {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
}

.msg {
  max-width: 88%;
  padding: 0.7rem 0.95rem;
  border-radius: 18px;
  font-size: 0.96rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  animation: msg-in 0.35s var(--ease) backwards;
}
.msg.user {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: var(--green);
  color: #fff;
  white-space: pre-wrap;
}
.msg.bot {
  align-self: flex-start;
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
  background: var(--surface);
}
.msg.error {
  align-self: flex-start;
  border: 1px solid #e9c4b2;
  background: var(--clay-soft);
  color: #6d2d13;
}
.msg > * + * { margin-top: 0.5rem; }
.msg ul, .msg ol { padding-left: 1.3rem; }
.msg li + li { margin-top: 0.25rem; }
.msg .md-h { font-weight: 700; }
.msg code { padding: 0.05rem 0.3rem; border-radius: 4px; background: var(--inset); font-size: 0.88em; }

.msg-retry {
  display: block;
  min-height: 36px;
  padding: 0.3rem 0.9rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.typing { display: inline-flex; gap: 5px; padding: 0.35rem 0; }
.typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: typing 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.7rem 1rem 0;
}

.chat-form {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.7rem 1rem 0.4rem;
}
.chat-form textarea {
  flex: 1;
  max-height: 120px;
  border-radius: 16px;
  line-height: 1.4;
  resize: none;
}
.chat-send {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s, transform 0.25s var(--spring);
}
.chat-send:active { transform: scale(0.9); }
.chat-send:disabled { opacity: 0.5; cursor: default; }

.chat-foot {
  padding: 0 1rem 0.65rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--ink-muted);
  text-align: center;
}

/* ══════════════════════════════
   LOCATION PICKER
══════════════════════════════ */
.dialog {
  width: min(460px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 1.25rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lift);
}
.dialog[open] { animation: pop 0.3s var(--ease); }
.dialog::backdrop {
  background: rgba(18, 44, 28, 0.45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.dialog-head h2 { font-size: 1.4rem; }
.dialog-search { display: flex; gap: 0.5rem; margin-bottom: 0.6rem; }
.dialog-results {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 40vh;
  margin-block: 0.6rem 1rem;
  overflow: auto;
  list-style: none;
}
.result-btn {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 52px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  animation: rise 0.35s var(--ease) backwards;
  transition: border-color 0.2s, background 0.2s;
}
.result-btn span { font-size: 0.84rem; color: var(--ink-muted); }

/* ══════════════════════════════
   SCROLL PROGRESS BAR
══════════════════════════════ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--rate-good));
  transform: scaleX(var(--scroll, 0));
  transform-origin: left;
  pointer-events: none;
}

/* A short gold line draws itself under each section heading */
.section-head h2 {
  position: relative;
  padding-bottom: 0.6rem;
}
.section-head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3.2rem;
  height: 3px;
  border-radius: 3px;
  background: var(--gold);
  transform-origin: left;
  transition: transform 0.9s var(--ease) 0.25s;
}
.js .section-head:not(.is-seen) h2::after { transform: scaleX(0); }

/* The weather symbol floats gently */
.wx-icon {
  display: inline-block;
  animation: float 4.5s ease-in-out infinite;
}

/* ══════════════════════════════
   ANY DANGER THIS WEEK
══════════════════════════════ */
.alerts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
}
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
  font-size: 0.94rem;
  animation: rise 0.45s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
.alert-bad { background: var(--clay-soft); }
.alert-icon { flex: none; font-size: 1.2rem; line-height: 1.3; }

/* ══════════════════════════════
   DAYS TO HARVEST AND DRY
══════════════════════════════ */
.daychips {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
  list-style: none;
}
.daychip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.6rem 0.2rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--inset);
  text-align: center;
  animation: pop 0.45s var(--spring) backwards;
  animation-delay: calc(var(--i, 0) * 55ms);
  transition: transform 0.3s var(--ease);
}
.daychip.is-dry { background: var(--green-soft); border-color: rgba(42, 106, 63, 0.18); }
.daychip.is-wet { opacity: 0.8; }
.daychip-day  { font-size: 0.86rem; font-weight: 700; }
.daychip-icon { font-size: 1.35rem; line-height: 1.2; }
.daychip-note { font-size: 0.74rem; line-height: 1.3; color: var(--ink-soft); }
.daychip.is-dry .daychip-note { color: var(--green-dark); font-weight: 600; }

/* ══════════════════════════════
   MY CROP CALENDAR
══════════════════════════════ */
.form-inline {
  flex-direction: row;
  flex-wrap: wrap;
  max-width: 34rem;
}
.form-inline .field { flex: 1 1 12rem; }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
  gap: 0.6rem;
  list-style: none;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  animation: rise 0.45s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 50ms);
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.step.is-past { opacity: 0.55; }
.step.is-next { border-left-color: var(--green); background: var(--green-soft); }
.step-date {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.step-text { font-size: 0.92rem; color: var(--ink-soft); }

/* ══════════════════════════════
   GOVERNMENT SCHEMES
══════════════════════════════ */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.45rem 1rem;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s, color 0.3s, transform 0.25s var(--ease);
}
.filter:active { transform: scale(0.96); }
.filter[aria-pressed="true"] {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--cream);
}
.filter-count {
  min-width: 1.5rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--inset);
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.5rem;
  text-align: center;
  transition: background 0.3s, color 0.3s;
}
.filter[aria-pressed="true"] .filter-count { background: rgba(244, 239, 225, 0.18); color: var(--cream); }

.scheme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 1rem;
  align-items: start;
}
.scheme {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.15rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: rise 0.5s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}
.scheme-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}
.scheme-name {
  margin-bottom: 0.2rem;
  font-size: 1.14rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.scheme-get { font-size: 0.98rem; }
.scheme-extra {
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: var(--green-soft);
  font-size: 0.9rem;
  color: var(--green-dark);
}

.scheme-more {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 44px;
  margin-top: 0.8rem;
  padding: 0.5rem 0.8rem;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: var(--inset);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.25s;
}
.chevron { transition: transform 0.35s var(--ease); }
.scheme.is-open .chevron { transform: rotate(180deg); }

/* Opens smoothly: the row grows from zero to the height of its content */
.scheme-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}
.scheme.is-open .scheme-details { grid-template-rows: 1fr; }
.scheme-details > div {
  min-height: 0;
  overflow: hidden;
  font-size: 0.93rem;
  color: var(--ink-soft);
}
.scheme-details p { padding-top: 0.7rem; }
.scheme-details strong { color: var(--ink); }

.scheme-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
.scheme-all { width: auto; margin: 1.1rem auto 0; display: flex; background: var(--surface); }
.scheme-note { margin-top: 1rem; }
.help-grid { margin-top: 1.75rem; }

/* Papers checklist */
.papers {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  list-style: none;
}
.papers label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 46px;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.papers input {
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  accent-color: var(--green);
  cursor: pointer;
}
.papers label:has(input:checked) { background: var(--green-soft); color: var(--green-dark); }

.profit-main-value small { font-family: var(--font-body); font-size: 1rem; font-weight: 600; }

/* ══════════════════════════════
   TAP RIPPLE
══════════════════════════════ */
.filter, .chip, .helpline, .lang-btn, .location-btn, .chat-fab { position: relative; overflow: hidden; }
.chat-fab { position: fixed; }

.ripple {
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.18;
  transform: scale(0);
  animation: ripple 0.6s var(--ease) forwards;
  pointer-events: none;
}

/* ══════════════════════════════
   HOVER EFFECTS
   Only on devices with a mouse, so nothing "sticks" after a tap on a phone
══════════════════════════════ */
@media (hover: hover) and (pointer: fine) {
  /* A faint light follows the mouse across a card (position set by script.js) */
  .card, .scheme { position: relative; }
  .card::before, .scheme::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), rgba(227, 189, 106, 0.16), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
  }
  .card:hover::before, .scheme:hover::before { opacity: 1; }

  .mini-btn:hover { background: rgba(255, 253, 248, 0.16); border-color: rgba(244, 239, 225, 0.5); transform: translateY(-2px); }
  .mini-btn.is-on:hover { background: #ecc97c; }
  .quick-item:hover { background: var(--green-soft); }
  .quick-item:hover .card-icon { transform: rotate(-8deg) scale(1.1); background: var(--gold-soft); }

  .scheme:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--line-strong); }
  .scheme:hover .card-icon { transform: rotate(-8deg) scale(1.1); background: var(--gold-soft); }
  .scheme-more:hover { background: var(--green-soft); }
  .filter:hover { border-color: var(--green); color: var(--ink); transform: translateY(-2px); }
  .filter[aria-pressed="true"]:hover { color: var(--cream); }
  .daychip:hover, .step:hover { transform: translateY(-3px); }
  .step:hover { border-color: var(--line-strong); }
  .papers label:hover { background: var(--inset); }

  .btn:hover { transform: translateY(-2px); }
  .btn-primary:hover { background: var(--green-dark); box-shadow: 0 12px 24px -14px rgba(31, 84, 49, 0.9); }
  .btn-gold:hover { background: #ecc97c; box-shadow: 0 16px 30px -12px rgba(227, 189, 106, 0.9); }
  .btn-gold:hover::after { transform: translateX(120%); }
  .btn-ghost:hover { background: rgba(244, 239, 225, 0.1); border-color: rgba(244, 239, 225, 0.6); }
  .btn-outline:hover { border-color: var(--green); color: var(--green); }
  .btn:hover .icon { transform: scale(1.12) rotate(-6deg); }

  .icon-btn:hover { background: var(--inset); color: var(--ink); }
  .icon-btn:hover .icon { transform: rotate(40deg); }
  .icon-btn-light:hover { background: rgba(244, 239, 225, 0.12); color: var(--cream); }

  .brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
  .site-nav a:hover { background: var(--inset); color: var(--ink); }
  .lang-btn:hover { background: var(--green); color: #fff; }
  .location-btn:hover { border-color: var(--green); color: var(--ink); }
  .location-btn:hover .icon { transform: translateY(-2px); }

  .hero-card:hover { transform: translateY(-4px); border-color: rgba(244, 239, 225, 0.3); background: rgba(255, 253, 248, 0.1); }

  .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--line-strong); }
  .card:hover .card-icon { transform: rotate(-8deg) scale(1.1); background: var(--gold-soft); }

  .stat:hover, .tile:hover, .msp-item:hover { transform: translateY(-2px); }
  .stat:hover, .msp-item:hover { background: var(--green-soft); }

  .row:hover, .fc-row:hover { background: rgba(42, 106, 63, 0.06); }
  .row:hover .row-icon { transform: scale(1.2) rotate(-6deg); }
  .hour:hover { transform: scaleY(1.3); filter: brightness(1.06); }
  .tab:hover { color: var(--ink); }

  .link:hover { text-decoration: underline; }
  .link:hover .icon { transform: translate(2px, -2px); }

  .helpline:hover { border-color: var(--green); background: var(--green-soft); transform: translateX(4px); }
  .helpline:hover .icon { animation: ring 0.6s var(--ease); }

  .chip:hover { background: rgba(255, 253, 248, 0.14); border-color: rgba(244, 239, 225, 0.5); transform: translateY(-2px); }
  .chip-sm:hover { background: var(--green-soft); border-color: var(--green); color: var(--green-dark); }

  .site-footer a:hover { text-decoration-color: var(--gold); }

  .chat-fab:hover { background: var(--green-dark); transform: translateY(-3px); }
  .chat-fab:hover .icon { transform: scale(1.15) rotate(-8deg); }
  .chat-send:hover { background: var(--green-dark); transform: scale(1.06); }
  .chat-send:hover .icon { transform: translate(2px, -2px); }
  .result-btn:hover { border-color: var(--green); background: var(--green-soft); }
}

/* ══════════════════════════════
   MOTION
══════════════════════════════ */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Cards in a row arrive one after another */
.js .grid > .reveal:nth-child(2) { transition-delay: 0.08s; }
.js .grid > .reveal:nth-child(3) { transition-delay: 0.16s; }
.js .grid > .reveal:nth-child(4) { transition-delay: 0.24s; }

/* A number that has just changed gets a soft highlight */
.flash { animation: flash 0.9s var(--ease); }

/* Entrance animations only say where things start. They end at the element's own style. */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
}
@keyframes grow {
  from { opacity: 0; transform: scaleY(0.15); }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
}
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1; transform: translateY(-4px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.12); }
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 12px 30px -10px rgba(18, 44, 28, 0.65), 0 0 0 0 rgba(227, 189, 106, 0.45); }
  50%      { box-shadow: 0 12px 30px -10px rgba(18, 44, 28, 0.65), 0 0 0 10px rgba(227, 189, 106, 0); }
}
@keyframes ring {
  0%, 100% { transform: rotate(0); }
  25%      { transform: rotate(-14deg); }
  50%      { transform: rotate(12deg); }
  75%      { transform: rotate(-8deg); }
}
@keyframes flash {
  from { background-color: var(--gold-soft); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@keyframes draw {
  to { stroke-dashoffset: 0; }
}
@keyframes twinkle {
  from { filter: brightness(0.65); }
  to   { filter: brightness(1.25); }
}
@keyframes sail {
  to { transform: translateX(170vw); }
}
@keyframes rain {
  to { background-position: 0 90px; }
}
@keyframes shine {
  0%, 100% { background-position: 100% 0; }
  50%      { background-position: 0 0; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.25); opacity: 0.6; }
}
@keyframes fade-in {
  to { opacity: 1; }
}
@keyframes ripple {
  to { opacity: 0; transform: scale(1); }
}

/* Language switch and scheme filter cross-fade instead of snapping */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.35s;
  animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 1000px) {
  .col-4, .col-5, .col-7 { grid-column: span 6; }
  .col-8, .md-12 { grid-column: span 12; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-note { grid-column: span 2; }
}

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; gap: 0 0.6rem; }
  .brand { min-height: 58px; }
  .brand-tag { display: none; }
  .header-actions { margin-left: auto; }
  .lang-btn, .location-btn { min-height: 44px; }
  .location-btn { max-width: 9.5rem; }
  .site-nav {
    order: 3;
    gap: 0.4rem;
    width: calc(100% + 2 * var(--edge));
    margin: 0 calc(-1 * var(--edge));
    padding: 0 var(--edge) 0.55rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { min-height: 40px; display: inline-flex; align-items: center; padding: 0.3rem 0.9rem; background: var(--inset); }
  .section { scroll-margin-top: calc(112px + var(--safe-top)); }

  .hero-inner, .ask-inner { grid-template-columns: minmax(0, 1fr); }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-item { padding: 0.85rem 0.8rem; gap: 0.6rem; }
  .quick-item:nth-child(odd) { border-left: 0; }
  .quick-item:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .quick-item .card-icon { width: 2.3rem; height: 2.3rem; font-size: 1.15rem; }
  .quick-answer { font-size: 0.92rem; }
  .col-4, .col-5, .col-7, .col-8, .col-12 { grid-column: span 12; }
  .grid { gap: 1rem; }
  .hero-actions .btn { flex: 1 1 auto; }

  .schemes .row { flex-wrap: wrap; gap: 0.4rem 0.85rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-note { grid-column: auto; }
}

@media (max-width: 560px) {
  /* Keep logo, language and place on one line on a phone */
  .header-inner { gap: 0 0.4rem; }
  .brand { gap: 0.5rem; }
  .brand-name { font-size: 1.1rem; }
  .header-actions { gap: 0.4rem; }
  .lang-btn { padding-inline: 0.65rem; }
  .location-btn { max-width: 6.4rem; padding-inline: 0.6rem; }

  .stats { gap: 0.45rem; }
  .stat { padding: 0.6rem 0.6rem; }
  .stat dd { font-size: 1rem; }
  .fc-row { grid-template-columns: 3.7rem 1.8rem minmax(0, 1fr) auto; gap: 0.5rem; }
  .stats-detail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hourly-slot { padding-left: 0.25rem; }
  .hourly-time { font-size: 0.66rem; }
  html[lang="hi"] .hourly-time { min-height: 2.5em; }    /* Hindi times can take two lines */
  .hourly-icon { font-size: 1.05rem; }
  .hourly-temp { font-size: 0.92rem; }
  .hourly-rain { font-size: 0.62rem; }
  .spray-day { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .spray-label { padding-top: 0; }
  .hour { height: 34px; }
  .row-side { max-width: 44%; white-space: normal; }
  .msp { grid-template-columns: minmax(0, 1fr); }
  .daychips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .scheme-grid { grid-template-columns: minmax(0, 1fr); }
  .filters { gap: 0.4rem; }
  .filter { padding-inline: 0.8rem; }
  .dialog-search { flex-direction: column; }

  /* Chat fills the phone screen and follows the keyboard (see script.js) */
  .chat {
    inset: 0;
    top: var(--vv-top, 0px);
    bottom: auto;
    width: 100%;
    height: 100vh;
    height: var(--vv-height, 100dvh);
    border: 0;
    border-radius: 0;
    transform: translateY(24px);
    transform-origin: bottom center;
  }
  .chat-head { padding-top: calc(0.85rem + var(--safe-top)); }
  .chat-foot { padding-bottom: calc(0.65rem + var(--safe-bottom)); }
  .chat-open { overflow: hidden; }
  .chat-open .chat-fab { opacity: 0; pointer-events: none; }
}
