/* AI Bhoomi Africa: what the Africa portal adds on top of the AI Bhoomi portal's own tokens.css / base.css /
   components.css (copied unchanged). Only pieces that system has no component for. */
#root { min-height: 100%; }
.brand em { font-style: normal; color: var(--mint); }
.mint { color: var(--mint); }
.amber { color: var(--amber); }
.blue { color: var(--blue); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

/* top bar pieces */
.topbar .in { min-width: 0; }
.switcher select { border: 0; background: transparent; padding: 2px 22px 2px 0; font-weight: 800; font-size: 13px; color: var(--ink); max-width: 100%; text-overflow: ellipsis; outline: none; appearance: none; cursor: pointer; }
.switcher select option { background: var(--surface); color: var(--ink); }
.search { position: relative; flex: 1 1 220px; max-width: 420px; min-width: 150px; }
.search .material-symbols-outlined { position: absolute; left: 12px; top: 10px; color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 40px; height: 40px; }
.langchip { min-width: 0; padding: 8px 12px; gap: 8px; }
.langchip .v { font-size: 13px; }
.mobnav { display: none; }
@media (max-width: 1280px) { .who > div:first-child { display: none; } .topbar .langchip .v { display: none; } }
@media (max-width: 1100px) { .topbar .search { display: none; } }
@media (max-width: 900px) {
  .topbar .in { height: 56px; padding: 0 14px; gap: 10px; }
  .topbar .seg { display: none; }
  .mobbrand { display: flex !important; }
  .mobnav { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg-2); scrollbar-width: none; position: sticky; top: 56px; z-index: 29; }
  .mobnav a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-weight: 800; font-size: 12.5px; text-decoration: none; }
  .mobnav a.on { background: var(--mint); color: #06140d; }
  .page { padding: 18px 14px 48px; }
}
.mobbrand { display: none; }

/* page header actions, KPI cards as on the command screen */
.kpi-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.kpi-card { padding: 18px 20px; }
.kpi-card .k { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.kpi-card .v { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-top: 8px; }
.kpi-card .v small { font-size: 15px; font-weight: 800; color: var(--mint); margin-left: 6px; letter-spacing: 0; }
.kpi-card .s { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.count { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: var(--surface-3); font-size: 12px; font-weight: 800; color: var(--ink-2); }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rowlist { display: flex; flex-direction: column; gap: 8px; }
.rowlink { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-2); color: var(--ink); text-align: left; font-size: 13.5px; transition: border-color .15s; }
.rowlink:hover { border-color: var(--mint-line); }
.rowlink b { font-weight: 800; white-space: nowrap; }
.rowlink .d { color: var(--ink-3); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowlink .n { font-weight: 800; white-space: nowrap; }

/* maps */
.map-frame .map { position: absolute; inset: 0; min-height: 0; }
.map-frame.short { height: 380px; }
.map .maplibregl-canvas { cursor: crosshair; }
.map.calm .maplibregl-canvas { cursor: grab; }
.map-hud .chip.busy { display: inline-flex; align-items: center; gap: 8px; }
.map-hud .chip.err { color: var(--red); border-color: rgba(248, 113, 113, .5); }
.map-legend { flex-wrap: wrap; max-width: calc(100% - 24px); row-gap: 4px; }
.map-legend.col { flex-direction: column; gap: 5px; max-width: 290px; font-weight: 600; }
.map-legend.col b { font-weight: 800; }
.map-legend label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.map-legend input[type=range] { accent-color: var(--mint); width: 110px; }
.map-legend input[type=checkbox] { accent-color: var(--mint); }
.map-frame .seg { background: rgba(10, 18, 16, .82); backdrop-filter: blur(10px); flex-wrap: wrap; }
.spot-mk { display: flex; align-items: center; gap: 6px; cursor: pointer; transform: translate(-6px, -6px); }
.spot-mk i { width: 12px; height: 12px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(0, 0, 0, .5), 0 0 12px 2px rgba(78, 222, 163, .6); flex: none; }
.spot-mk span { padding: 2px 7px; border-radius: 6px; background: rgba(10, 18, 16, .85); color: #f1f5f9; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.zfar .spot-mk span { display: none; }
.zfar .spot-mk:hover span { display: inline; }
.pin-mk { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; background: var(--amber); box-shadow: 0 0 0 2px rgba(0, 0, 0, .55); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--mint); animation: spin .8s linear infinite; flex: none; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* farm rows, metrics with words in them */
.farm { grid-template-columns: auto 1fr auto; }
.farm .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.farm .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.farm > .grow { min-width: 0; }
.metric .v.word { font-size: 17px; line-height: 1.15; }
.metric .v.wait { color: var(--ink-3); }
.kpi .v.word { font-size: 16px; }
.field .select, .field .input { height: 40px; padding-top: 0; padding-bottom: 0; }

/* states: loading / nothing / failed - a source that has not answered says so */
.state { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: var(--r-md); color: var(--ink-3); font-size: 13px; }
.state.err { border-color: rgba(248, 113, 113, .45); color: var(--ink-2); }
.state.none { border-style: solid; }

/* splits, checks, charts, tables inside cards */
.split { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-3); margin: 8px 0 6px; }
.split i { display: block; height: 100%; }
.split-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-3); font-weight: 700; }
.split-legend span { display: inline-flex; align-items: center; gap: 6px; }
.split-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart { display: block; width: 100%; height: auto; }
.tbl { overflow-x: auto; }
table.spec td.num, table.spec th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.spec td small { display: block; color: var(--ink-3); font-size: 11px; }
table.spec tr:last-child td { border-bottom: 0; }
.healthpic { width: 100%; height: auto; border-radius: var(--r-md); border: 1px solid var(--line); display: block; background: #000; }
.langs { display: flex; flex-wrap: wrap; gap: 4px; }
.note { font-size: 12px; color: var(--ink-3); }
.swatch-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; border: 1px solid rgba(255, 255, 255, .18); vertical-align: -1px; }
.kv dd { text-align: right; overflow-wrap: anywhere; }
.day .e .material-symbols-outlined { font-size: 22px; }
.day .e.rain { color: var(--blue); }
.hero h1 { overflow-wrap: anywhere; }
.banner-line { padding: 12px 24px 0; }
@media (max-width: 900px) { .banner-line { padding: 10px 14px 0; } }
.trial-banner { flex-wrap: wrap; font-weight: 600; }
.trial-banner b { font-weight: 800; }

/* sign-in screen: the art is a satellite mosaic of a real farm area */
.signin .art .mosaic img { filter: saturate(.92); }
.signin .art .credit { position: absolute; left: 44px; bottom: 14px; font-size: 11px; color: rgba(255, 255, 255, .55); }
.signin .art .copy { bottom: 54px; }
.signin .box .who-line { font-size: 13px; color: var(--ink-3); }
@media (max-width: 900px) { .signin .art { min-height: 420px; } .signin .art .copy { left: 20px; right: 20px; } .signin .art .credit { left: 20px; } }
@media (max-width: 640px) { .days { grid-template-columns: repeat(4, 1fr); } .page-h .row { flex-wrap: wrap; } .map-frame, .map-frame.tall { height: 440px; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0s !important; transition: none !important; } }

/* layouts that the base system writes inline (they must still fold to one column on a phone) */
.grid-map { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.sticky-side { position: sticky; top: 80px; }
.wx-now { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 12px; align-items: start; }
.fieldpick { min-width: min(360px, 100%); }
@media (max-width: 1080px) { .grid-map { grid-template-columns: 1fr; } .sticky-side { position: static; } }
@media (max-width: 640px) { .wx-now { grid-template-columns: 1fr; } }

/* top bar: nothing wraps or squeezes; the search gives way first */
.topbar .seg, .topbar .badge, .topbar .who, .topbar .langchip { flex: none; }
.topbar .seg button, .who .n, .who .r { white-space: nowrap; }
.topbar .search { flex: 1 1 140px; min-width: 0; }
.topbar .switcher { min-width: 220px; }
.topbar .langchip { min-width: 0; max-width: none; }
.langchip .v { overflow: visible; }
button.who { cursor: pointer; font: inherit; }
/* sign-in art: the farm picture at full strength, darkened only by the shade above it */
.signin .art .mosaic { opacity: 1; }
.signin .art .mosaic img { filter: saturate(1.25) brightness(1.2) contrast(1.05); }
/* the map's own credit line stays out of the legend's way */
.map .maplibregl-ctrl-attrib { font-size: 10px; background: rgba(10, 18, 16, .7); color: #cbd5d1; }
.map .maplibregl-ctrl-attrib a { color: #cbd5d1; }

/* soil table fits its card; the greenness picture does not run the page long; the mineral legend stays compact */
table.spec th small { display: block; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
#fv-soil table.spec th, #fv-soil table.spec td { padding-left: 8px; padding-right: 8px; }
#fv-soil table.spec td:first-child { white-space: normal; }
.healthpic { max-height: 460px; object-fit: contain; }
.map-legend.col { font-size: 11px; gap: 3px; max-width: 250px; }
.sticky-side .card-h .sub { margin-top: 4px; }
@media (max-width: 640px) { .map-legend { bottom: 60px; } .map-legend.col { max-width: 210px; } }

/* phone: nothing may push the page wider than the screen */
.grid-2 > *, .grid-map > *, .grid-3 > *, .kpi-cards > * { min-width: 0; }
.card-h > div { min-width: 0; }
#fv-meta { flex-wrap: nowrap; align-items: flex-start; }
#fv-meta .material-symbols-outlined { flex: none; }
.signin .langchip, .fieldpick { display: flex !important; }
@media (max-width: 900px) {
  .signin .art .field-tag { display: none; }
  .fieldpick { min-width: 0; width: 100%; max-width: none; }
}
@media (max-width: 640px) {
  .card-h { flex-wrap: wrap; row-gap: 10px; }
  .rowlink { flex-wrap: wrap; row-gap: 2px; }
  .rowlink b { white-space: normal; flex: 1 1 auto; }
  .rowlink .d { order: 3; flex: 1 0 100%; }
  .map-frame .seg button { padding: 6px 9px; font-size: 11.5px; }
  .map-frame .seg button .material-symbols-outlined { display: none; }
  .map-hud { max-width: calc(100% - 64px); }
  .kpi-card .v { font-size: 30px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .signin .art .copy h1 { font-size: 30px; }
}

/* risk: levels, the irrigation and shocks cards, the guide */
.badge.red.sev { background: var(--red); color: #1a0606; border-color: transparent; }
.grid-irr { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 760px) { .grid-irr { grid-template-columns: 1fr; } }
table.spec td.prot, .prot { color: var(--amber); }
table.spec.need tr.strong td { font-weight: 800; background: var(--bg-2); }
table.spec.need th[colspan] { text-align: center; }
.hazards { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.hazard { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; background: var(--bg-2); }
.hazard b { font-size: 13.5px; }
.hazard .d { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
details.more { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; font-size: 12.5px; font-weight: 800; color: var(--mint); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.more summary::before { content: '+'; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; background: var(--mint-soft); }
details.more[open] summary::before { content: '\2212'; }
details.more summary::-webkit-details-marker { display: none; }
ol.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.kpi .v .badge { vertical-align: 2px; }
.toastx { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; max-width: min(560px, calc(100vw - 32px)); padding: 12px 16px; border-radius: var(--r-md);
  background: var(--surface-3); border: 1px solid var(--line-2); color: var(--ink); font-size: 13.5px; font-weight: 600; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.tour { position: fixed; right: 20px; bottom: 20px; z-index: 80; width: min(430px, calc(100vw - 32px)); padding: 16px 18px 14px; border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--mint-line); box-shadow: 0 24px 60px rgba(0, 0, 0, .6), var(--glow); }
.tour-bar { height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin: -4px 0 10px; }
.tour-bar i { display: block; height: 100%; width: 0; background: var(--mint); }
.tour-bar i.run { animation-name: tourbar; animation-timing-function: linear; animation-fill-mode: forwards; }
@keyframes tourbar { from { width: 0; } to { width: 100%; } }
.tour-dots { display: flex; gap: 4px; flex-wrap: wrap; max-width: 150px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); }
.tour-dots i.done { background: var(--mint-line); }
.tour-dots i.on { background: var(--mint); }
.tour-spot { outline: 2px solid var(--mint) !important; outline-offset: 4px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .28), 0 0 26px 4px rgba(78, 222, 163, .35) !important; position: relative; z-index: 40; transition: outline-color .2s; }
@media (max-width: 1280px) { #guide-btn span:last-child { display: none; } }
@media (max-width: 640px) { .tour { right: 8px; left: 8px; bottom: 8px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .tour-bar i.run { animation: none; width: 100%; } }

/* the per-pixel NDVI legend stays small so the field shows */
.map-frame.short .map-legend.col { font-size: 10.5px; gap: 2px; padding: 7px 9px; max-width: 215px; }
.card-h .seg { flex: none; }
.card-h .seg button { white-space: nowrap; }

/* corners of a boundary being drawn by hand */
.hand-mk { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--amber); box-shadow: 0 0 0 2px rgba(0, 0, 0, .5); }

/* ---- Field view as a workspace: the map is the stage, the rest sits in tabs; plain mode folds the fine print away ---- */
.ws { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1180px) { .ws { grid-template-columns: 1fr; } }
.ws-map { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@media (max-width: 1180px) { .ws-map { position: static; } }
.ws-side { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.map-frame.stage { height: min(54vh, 560px); min-height: 340px; }
.fv .kpis { display: none; }
.fv .hero { padding: 16px 20px; }
.tabbar { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--bg-2); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabbar button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-3); font-weight: 800; font-size: 12.5px; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.tabbar button:hover { color: var(--ink); }
.tabbar button.on { background: var(--mint); color: #06140d; }
.pane { display: none; flex-direction: column; gap: 14px; animation: panein .22s ease; }
.pane.on { display: flex; }
@keyframes panein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } }
.tile { position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 16px 16px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); color: var(--ink); cursor: pointer; overflow: hidden;
  background: linear-gradient(150deg, var(--surface) 0%, var(--surface-2) 100%); transition: transform .15s, border-color .15s, box-shadow .15s; }
.tile::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--tc, var(--line-2)); }
.tile:hover { transform: translateY(-2px); border-color: var(--tc, var(--mint-line)); box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.tile.lv-low { --tc: #34d399; } .tile.lv-moderate { --tc: #fbbf24; } .tile.lv-high { --tc: #fb923c; } .tile.lv-severe { --tc: #f87171; }
.tile-top { display: flex; align-items: center; justify-content: space-between; }
.tile-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--tc, var(--ink-3)) 18%, transparent); color: var(--tc, var(--ink-2)); }
.tile-w { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--tc, var(--ink-3)) 16%, transparent); color: var(--tc, var(--ink-3)); }
.tile-v { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-top: 8px; min-height: 32px; }
.tile-t { font-size: 13px; font-weight: 800; }
.tile-c { font-size: 12px; color: var(--ink-3); min-height: 16px; }
.timeline { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg-2); min-height: 48px; }
.days-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; flex: 1; }
.dchip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 11.5px; font-weight: 800; cursor: pointer; }
.dchip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dchip.on { background: var(--mint); color: #06140d; border-color: transparent; }
.dchip:hover { border-color: var(--mint-line); }
/* plain mode: sources, methods and fine print are one click away, not on screen */
.fv.plain .note, .fv.plain details.more, .fv.plain .card-h .sub, .fv.plain .schemes .d, .fv.plain .hazard .d + .d { display: none; }
.fv.plain .map-legend.col span.muted { display: none; }

.fv #card-monitor .timeline { margin-top: 10px; }
.fv #card-monitor .card-title { flex-wrap: wrap; row-gap: 8px; }
.ws-side > .between { flex-wrap: wrap; }
.ws-side .tabbar { min-width: 0; flex: 1 1 auto; }
.ws, .ws-map, .ws-side, .pane, .tiles { max-width: 100%; }
.timeline { min-width: 0; } .days-strip { min-width: 0; }
@media (max-width: 640px) { .map-frame.stage { height: 360px; min-height: 0; } .tile-v { font-size: 24px; } }

/* crop type and yield */
.ctbar { display: grid; grid-template-columns: minmax(120px, 1.1fr) 2fr 48px; gap: 10px; align-items: center; }
.ctbar-t { height: 10px; border-radius: 6px; background: var(--bg-2); overflow: hidden; display: block; }
.ctbar-t i { display: block; height: 100%; border-radius: 6px; }
.big-line { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.kv3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.kv3 .tile-v { font-size: 22px; margin-top: 0; }
@media (max-width: 520px) { .kv3 { grid-template-columns: 1fr; } }
.fv #card-monitor .card-title > * { min-width: 0; max-width: 100%; }
.fv #card-monitor .seg { flex-wrap: wrap; max-width: 100%; }
.fv #card-monitor { overflow: hidden; }
.tabbar button:not(.on) .material-symbols-outlined { display: none; }
.tabbar button { padding: 8px 11px; }

/* ---- Field View, second pass: the map is a full stage, its controls float on it as glass ---- */
.fv .ws { grid-template-columns: minmax(0, 1.55fr) minmax(370px, 1fr); gap: 18px; }
@media (max-width: 1180px) { .fv .ws { grid-template-columns: 1fr; } }
.fv .hero { padding: 14px 20px; background: linear-gradient(100deg, rgba(47, 210, 127, .14), transparent 55%), var(--surface); }
.fv .hero h1 { font-size: 26px; letter-spacing: -.02em; }
.fv #card-monitor { position: relative; padding: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); background: #07110e; }
.fv #card-monitor .map-frame.stage { height: calc(100vh - 330px); min-height: 440px; max-height: 860px; border-radius: 0; }
.fv #card-monitor .map-frame .map { border-radius: 0; }
.fv #card-monitor .card-title { position: absolute; z-index: 6; top: 12px; left: 12px; right: 58px; margin: 0; pointer-events: none; }
.fv #card-monitor .card-title h3, .fv #card-monitor .card-title .count { display: none; }
.fv #card-monitor .card-title > * { pointer-events: auto; }
.fv #card-monitor .seg { background: rgba(8, 16, 14, .72); backdrop-filter: blur(14px) saturate(1.3); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); padding: 4px; border-radius: 999px; }
.fv #card-monitor .seg button { padding: 7px 13px; font-size: 12.5px; border-radius: 999px; }
.fv #card-monitor .seg button.on { background: var(--mint); color: #06140d; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15), 0 6px 18px rgba(47, 210, 127, .35); }
.fv #card-monitor .map-hud { top: 60px; }
.wb-pick { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border-radius: 999px; background: rgba(8, 16, 14, .72); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .12); color: var(--ink-2); }
.wb-sel { appearance: none; background: transparent; border: 0; color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 800; padding: 3px 8px 3px 0; cursor: pointer; outline: none; }
.wb-sel option { background: #0d1512; color: #e7f0ec; }
.fv #card-monitor .timeline { position: relative; z-index: 6; margin: -62px 12px 12px; background: rgba(8, 16, 14, .74); backdrop-filter: blur(14px) saturate(1.3); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; box-shadow: 0 10px 28px rgba(0, 0, 0, .4); }
.fv #card-monitor .map-legend { bottom: 74px; background: rgba(8, 16, 14, .74); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; }
.fv #card-monitor .maplibregl-ctrl-bottom-right { bottom: 66px; }
.fv.plain #fv-monitor { display: none; }
.fv #fv-monitor { padding: 0 14px 14px; }
.fv .ws-map { top: 70px; }
/* status tiles with a glow of their own colour */
.fv .tile { border-radius: 20px; padding: 18px 18px 16px; background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--tc, #2fd27f) 22%, transparent), transparent 62%), linear-gradient(160deg, var(--surface), var(--surface-2)); animation: tilein .45s cubic-bezier(.2, .8, .2, 1) backwards; }
.fv .tile::before { width: 0; }
.fv .tile:nth-child(2) { animation-delay: .05s; } .fv .tile:nth-child(3) { animation-delay: .1s; } .fv .tile:nth-child(4) { animation-delay: .15s; } .fv .tile:nth-child(5) { animation-delay: .2s; } .fv .tile:nth-child(6) { animation-delay: .25s; }
@keyframes tilein { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.fv .tile:hover { box-shadow: 0 16px 40px color-mix(in srgb, var(--tc, #2fd27f) 22%, transparent), 0 10px 28px rgba(0, 0, 0, .4); }
.fv .tile-v { font-size: 32px; background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--tc, #fff) 55%, #fff)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fv .tile-ic { width: 38px; height: 38px; border-radius: 13px; }
.fv .tabbar { background: rgba(255, 255, 255, .04); }
@media (max-width: 640px) { .fv #card-monitor .map-frame.stage { height: 460px; min-height: 0; } .fv .tile-v { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .fv .tile, .pane { animation: none; } }
/* the monitor card's header floats on the map: only the layer switch shows */
.fv #card-monitor > .card-h { position: absolute; z-index: 6; top: 12px; left: 12px; right: 58px; margin: 0; padding: 0; pointer-events: none; display: block; }
.fv #card-monitor > .card-h > div:first-child { display: none; }
.fv #card-monitor > .card-h > * { pointer-events: auto; max-width: 100%; }
.fv #card-monitor > .card-h .seg { display: inline-flex; flex-wrap: wrap; }
.fv #card-monitor .map-hud { top: 62px; }
@media (max-width: 640px) { .fv #card-monitor .map-hud { top: 100px; } }

/* ---- Advisor: spoken advice, the what-if sliders, practice change, market ---- */
ol.advice { list-style: none; margin: 0; padding: 0; counter-reset: adv; display: flex; flex-direction: column; gap: 8px; }
ol.advice li { counter-increment: adv; position: relative; padding: 11px 14px 11px 46px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); font-size: 14.5px; line-height: 1.45; display: flex; flex-direction: column; gap: 4px; }
ol.advice li::before { content: counter(adv); position: absolute; left: 12px; top: 10px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--mint); color: #06140d; }
ol.advice li em { font-style: normal; color: var(--mint); font-weight: 600; }
.slrow { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr minmax(96px, auto); gap: 12px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.slrow b { text-align: right; font-size: 12.5px; white-space: nowrap; }
input.sl { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--mint), #1f7a54); outline: none; }
input.sl::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--mint); box-shadow: 0 2px 10px rgba(0, 0, 0, .5); cursor: pointer; }
input.sl::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--mint); cursor: pointer; }
.simchart { width: 100%; height: auto; margin-top: 4px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.fv .kv3 .tile-v { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--ink); font-size: 24px; }
.fv .kv3 .tile-v.lvc-low { color: #34d399; } .fv .kv3 .tile-v.lvc-moderate { color: #fbbf24; } .fv .kv3 .tile-v.lvc-high { color: #fb923c; } .fv .kv3 .tile-v.lvc-severe { color: #f87171; }
.rg-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-bottom: 14px; }
.rg-grid .select { width: 100%; font-size: 12.5px; }
@media (max-width: 560px) { .rg-grid { grid-template-columns: 1fr; } .rg-arrow { transform: rotate(90deg); justify-self: center; } .slrow { grid-template-columns: 1fr; gap: 4px; } .slrow b { text-align: left; } }
.mk { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); margin-bottom: 10px; }
.mk-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.mk-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; font-size: 13px; align-items: baseline; }
.mk-row .up { color: #fb923c; font-size: 12px; } .mk-row .down { color: #34d399; font-size: 12px; } .mk-row b { white-space: nowrap; }
.rg-grid .select { height: auto !important; min-height: 38px; padding-top: 8px; padding-bottom: 8px; line-height: 1.3; white-space: normal; }

/* the Africa screen */
button.ctbar.imp { width: 100%; background: transparent; border: 0; color: inherit; padding: 5px 6px; border-radius: 8px; cursor: pointer; text-align: left; grid-template-columns: minmax(110px, 1fr) 2fr minmax(120px, auto); }
button.ctbar.imp:hover, button.ctbar.imp.on { background: rgba(78, 222, 163, .10); }
button.ctbar.imp b { text-align: right; white-space: nowrap; }
.ctbar b { white-space: nowrap; }

/* the agent-built planning report */
.agents { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.agent { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); font-size: 12.5px; font-weight: 700; }
.agent.run { border-color: var(--mint-line); color: var(--mint); } .agent.ed { border-style: dashed; }
.plan-sum p { margin: 0 0 8px; font-size: 15px; line-height: 1.5; }
.plan-sum p:first-child { font-size: 17px; font-weight: 700; }
.plan-steps { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.plan-step { display: grid; grid-template-columns: 132px 1fr; gap: 12px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); border-left: 4px solid var(--tc, var(--line-2)); background: rgba(255, 255, 255, .03); font-size: 14px; }
.plan-step.lv-low { --tc: #34d399; } .plan-step.lv-moderate { --tc: #fbbf24; } .plan-step.lv-high { --tc: #fb923c; } .plan-step.lv-severe { --tc: #f87171; }
.plan-when { font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--tc, var(--ink-3)); padding-top: 2px; }
.plan-sec { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-top: 8px; background: rgba(255, 255, 255, .02); }
.plan-sec summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.plan-sec summary::-webkit-details-marker { display: none; }
.plan-sec summary .small { margin-left: auto; }
.plan-sec ul { margin: 10px 0 2px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.45; }
.fv.plain details.plan-sec { display: block; }
@media (max-width: 560px) { .plan-step { grid-template-columns: 1fr; gap: 4px; } }

.fao-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: 8px; font-size: 12.5px; padding: 5px 0; border-top: 1px solid var(--line); }
.fao-row.fao-h { border-top: 0; color: var(--ink-3); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }

/* ask about a photo */
.photo-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.photo-drop { width: 150px; height: 112px; border-radius: 16px; border: 1.5px dashed var(--mint-line); background: rgba(78, 222, 163, .06); color: var(--mint); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.photo-drop:hover { background: rgba(78, 222, 163, .12); }
.photo-thumb { width: 150px; height: 112px; object-fit: cover; border-radius: 16px; border: 1px solid var(--line-2); }

.gcheck { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 14px; margin-top: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); }
.gcheck.gc-agrees { border-color: rgba(52, 211, 153, .5); color: #a7f3d0; } .gcheck.gc-disagrees { border-color: rgba(248, 113, 113, .55); color: #fecaca; } .gcheck.gc-cannot-compare { color: var(--ink-2); }
.gcheck b { text-transform: capitalize; }

.photo-marked { width: 200px; height: 200px; object-fit: cover; border-radius: 16px; border: 1px solid var(--line-2); }

.advice-pic { margin: 4px 0 12px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2); background: #0b1512; }
.advice-pic img { display: block; width: 100%; height: auto; }
.advice-pic figcaption { padding: 9px 12px; font-size: 12px; color: var(--ink-3); line-height: 1.4; }

/* produce video frames, and charts under answers */
.frames { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.frames img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-2); }
@media (max-width: 560px) { .frames { grid-template-columns: repeat(3, 1fr); } }
.ans-chart { margin: 10px 0; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.ans-chart figcaption { font-size: 12px; color: var(--ink-3); margin-top: 8px; line-height: 1.4; }

#fv-photo .select, #fv-plan .select, #fv-advice .select { height: auto !important; min-height: 36px; padding-top: 7px; padding-bottom: 7px; line-height: 1.3; }

.btn.alerts-on { border-color: var(--mint-line); color: var(--mint); }

/* farm carbon account */
.cb-grid { display: grid; grid-template-columns: minmax(130px, 1.3fr) 1fr 1fr; gap: 6px 10px; align-items: center; }
.cb-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12.5px; }
.cb-table th, .cb-table td { text-align: right; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.cb-table th:first-child, .cb-table td:first-child { text-align: left; }
.cb-table .up-good { color: #34d399; font-weight: 700; } .cb-table .down-bad { color: #f87171; font-weight: 700; }

/* ---- the floating AI Bhoomi orb on Field View (23 Nov 2026) */
.orb { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none; }
.orb > * { pointer-events: auto; }
.orb-ball { position: relative; width: 66px; height: 66px; border-radius: 50%; border: 0; cursor: pointer; color: var(--on-mint, #04140d);
  background: radial-gradient(circle at 32% 28%, #d9fff0 0%, var(--mint, #4edea3) 38%, #0f8a62 78%, #06402e 100%);
  box-shadow: 0 0 0 6px rgba(78, 222, 163, .14), 0 0 34px rgba(78, 222, 163, .55), 0 10px 26px rgba(0, 0, 0, .45);
  animation: orb-float 4.5s ease-in-out infinite; }
.orb-ball:focus-visible { outline: 3px solid var(--white, #fff); outline-offset: 4px; }
.orb-ball .orb-core { display: grid; place-items: center; width: 100%; height: 100%; }
.orb-ball .orb-count { position: absolute; right: -6px; top: -6px; min-width: 30px; padding: 2px 6px; border-radius: var(--r-pill, 999px); font-size: 11px; font-weight: 800;
  background: var(--surface, #0f1916); color: var(--mint, #4edea3); border: 1px solid var(--mint-line, rgba(78,222,163,.4)); }
.orb-ball::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid rgba(78, 222, 163, .35); opacity: 0; }
.orb-ball.busy::after { animation: orb-ring 1.6s ease-out infinite; }
@keyframes orb-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes orb-ring { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .orb-ball, .orb-ball.busy::after { animation: none; } }
.orb-panel { width: min(560px, calc(100vw - 32px)); max-height: min(720px, calc(100vh - 130px)); display: flex; flex-direction: column; gap: 10px; padding: 14px;
  background: var(--surface, #0f1916); border: 1px solid var(--mint-line, rgba(78,222,163,.35)); border-radius: var(--r-xl, 20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 40px rgba(78, 222, 163, .12); }
.orb-head { align-items: flex-start; gap: 10px; }
.orb-wf { border: 1px solid var(--line, rgba(255,255,255,.08)); border-radius: var(--r-md, 12px); background: var(--bg-2, #0b1411); min-height: 0; overflow: auto; flex: 0 1 auto; max-height: 38vh; }
.orb-wf summary { cursor: pointer; padding: 9px 12px; font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.orb-flow { list-style: none; margin: 0; padding: 0 8px 8px; display: grid; gap: 4px; }
.orb-step { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 7px 6px; border-radius: var(--r-sm, 8px); }
.orb-step + .orb-step { border-top: 1px solid var(--line, rgba(255,255,255,.06)); }
.orb-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--surface-2, #15211d); color: var(--muted, #9fb5ac); }
.orb-step.s-ok .orb-n { background: var(--mint-soft, rgba(78,222,163,.16)); color: var(--mint, #4edea3); }
.orb-step.s-off .orb-n { background: var(--amber-soft, rgba(251,191,36,.14)); color: var(--amber, #fbbf24); }
.orb-step.s-tool .orb-n { background: var(--blue-soft, rgba(96,165,250,.14)); color: var(--blue, #60a5fa); }
.orb-t { display: grid; gap: 1px; min-width: 0; }
.orb-t b { font-size: 13px; }
.orb-thread { flex: 1 1 auto; min-height: 90px; overflow: auto; display: grid; gap: 8px; align-content: start; padding-right: 2px; }
.orb-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.orb-msg p { margin: 0; } .orb-msg p + p { margin-top: 6px; }
.orb-msg.ai { background: var(--surface-2, #15211d); border-bottom-left-radius: 4px; justify-self: start; }
.orb-msg.ai.off { color: var(--amber, #fbbf24); }
.orb-msg.you { background: var(--mint-soft, rgba(78,222,163,.16)); border-bottom-right-radius: 4px; justify-self: end; }
.orb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.orb-chips .chip { border: 1px solid var(--line-2, rgba(255,255,255,.12)); background: transparent; color: inherit; border-radius: var(--r-pill, 999px); padding: 6px 11px; font-size: 12px; cursor: pointer; }
.orb-chips .chip:hover { border-color: var(--mint, #4edea3); }
.orb-panel .input { flex: 1; min-width: 0; }
@media (max-width: 640px) { .orb { bottom: 12px; } .orb-panel { max-height: calc(100vh - 110px); } }
