:root {
  --bg: #F3F6F4; --surface: #FFFFFF; --soft: #EEF3F1; --soft2: #E3EAE7; --line: #D5DFDB;
  --ink: #10231F; --ink2: #33443F; --ink3: #5A6B66;
  --accent: #0E5E57; --accent-ink: #0B5A52; --mint: #5FD3A8; --top: #0B1F1B;
  --red: #B83A26; --amber: #E3A31A; --green: #2F7D4F; --grey: #8F9C98; --blue: #1F5FA8; --purple: #6B3FA0; --brown: #9A4A1E;
  --red-ink: #A3321F; --amber-ink: #7A5300; --blue-ink: #1F4E86; --purple-ink: #5A3592;
  --teal-bg: #DDF1EA; --warn-bg: #FFF1CC; --warn-ink: #6B4A00; --blue-bg: #E6EEF8; --purple-bg: #EFE8F7;
  --spark: #A9C7BF; --spark-now: #0E5E57;
  --radius: 14px; --shadow: 0 1px 2px rgba(16, 35, 31, .06), 0 4px 14px rgba(16, 35, 31, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1715; --surface: #13221F; --soft: #182B27; --soft2: #1E3530; --line: #2A433D;
    --ink: #E7F1EE; --ink2: #C3D4CF; --ink3: #93A8A2; --accent-ink: #7FE0BE;
    --red-ink: #FF9C88; --amber-ink: #F2C25B; --blue-ink: #9CC2F0; --purple-ink: #CDB3F0;
    --teal-bg: #133A33; --warn-bg: #3A2F10; --warn-ink: #F2D27A; --blue-bg: #16283F; --purple-bg: #2A2040;
    --spark: #2F5A52; --spark-now: #5FD3A8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1715; --surface: #13221F; --soft: #182B27; --soft2: #1E3530; --line: #2A433D;
  --ink: #E7F1EE; --ink2: #C3D4CF; --ink3: #93A8A2; --accent-ink: #7FE0BE;
  --red-ink: #FF9C88; --amber-ink: #F2C25B; --blue-ink: #9CC2F0; --purple-ink: #CDB3F0;
  --teal-bg: #133A33; --warn-bg: #3A2F10; --warn-ink: #F2D27A; --blue-bg: #16283F; --purple-bg: #2A2040;
  --spark: #2F5A52; --spark-now: #5FD3A8;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif; font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* first paint and loading placeholders */
.boot { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--ink3); font-weight: 600; }
.boot img { animation: boot 1.4s ease-in-out infinite; }
@keyframes boot { 50% { opacity: .45; transform: scale(.96); } }
.skel-wrap { padding-top: 20px; display: grid; gap: 16px; }
.skel-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .skel-row { grid-template-columns: 1fr; } }
.skel-card { height: 160px; border-radius: var(--radius); background: linear-gradient(90deg, var(--soft) 25%, var(--soft2) 50%, var(--soft) 75%); background-size: 200% 100%; animation: skel 1.2s linear infinite; }
@keyframes skel { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .boot img, .skel-card { animation: none; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar */
.top { background: var(--top); color: #F1F7F5; }
.topnav { display: contents; }
.menu-btn { display: none; }
@media (max-width: 640px) {
  .menu-btn { display: inline-flex; }
  .top .topnav { display: none; }
  .top.open .topnav { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; padding: 6px 0 4px; }
  .top .rolepill { display: none; }
}
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: inherit; padding: 0; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand b { font-size: 20px; }
.brand span { font-size: 15px; font-weight: 600; color: #A9D9C9; padding-inline-start: 10px; border-inline-start: 1px solid rgba(169, 217, 201, .35); line-height: 1.1; }
.rolepill { padding: 4px 10px; border-radius: 999px; background: #1C3A34; font-size: 13px; color: #CFE6E1; }
.spacer { flex: 1; }
.seg { display: inline-flex; background: #1C3A34; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: #CFE6E1; border-radius: 8px; padding: 6px 10px; min-height: 36px; font-size: 13px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: #F1F7F5; color: #0B1F1B; }
.ghost { border: 1px solid #3F5A53; background: transparent; color: #CFE6E1; border-radius: 10px; padding: 6px 12px; min-height: 36px; font-size: 13px; }

.banner { font-size: 13px; padding: 8px 16px; text-align: center; }
.banner.sample { background: var(--warn-bg); color: var(--warn-ink); }
.banner.live { background: var(--teal-bg); color: var(--accent-ink); }
.banner.offline { background: var(--warn-bg); color: var(--warn-ink); font-weight: 600; }
.install-card { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; }
.install-card img { border-radius: 12px; flex: none; }
.install-card .btn { margin-top: 8px; }

/* tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 14px 0 6px; }
.tabs button { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 14px; min-height: 42px; font-weight: 600; color: var(--ink2); }
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

main { padding-bottom: 40px; }
.grid { display: grid; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.col { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card h2 { margin: 0; font-size: 19px; }
.card h3 { margin: 0; font-size: 15px; }
.muted { color: var(--ink3); font-size: 13px; }
.small { font-size: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.btn { border: 0; background: var(--accent); color: #fff; border-radius: 10px; padding: 8px 16px; min-height: 42px; font-weight: 700; }
.btn.out { background: var(--surface); color: var(--accent-ink); border: 1px solid var(--accent); }
.btn:disabled { opacity: .6; cursor: default; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpi .v { font-size: 26px; font-weight: 700; }
.kpi .u { font-size: 13px; color: var(--ink3); font-weight: 500; }

/* home */
.home { display: flex; flex-direction: column; gap: 40px; padding-bottom: 24px; }
.hero { background: var(--top); color: #F1F7F5; position: relative; overflow: hidden; padding: 56px 16px 112px; }
.hero::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 80% at 80% 30%, rgba(95, 211, 168, .18), transparent 70%), radial-gradient(50% 60% at 10% 100%, rgba(42, 111, 176, .22), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 48px), repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 48px); }
[dir="rtl"] .hero::before { transform: scaleX(-1); }
.hero-in { position: relative; max-width: 1208px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #9FD8CF; background: rgba(95, 211, 168, .1); border: 1px solid rgba(95, 211, 168, .28); border-radius: 999px; padding: 5px 12px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(95, 211, 168, .6); animation: pulse 2.4s infinite; flex: none; }
.pulse.warn { background: var(--amber); animation-name: pulsew; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(95, 211, 168, 0); } 100% { box-shadow: 0 0 0 0 rgba(95, 211, 168, 0); } }
@keyframes pulsew { 0% { box-shadow: 0 0 0 0 rgba(227, 163, 26, .6); } 70% { box-shadow: 0 0 0 8px rgba(227, 163, 26, 0); } 100% { box-shadow: 0 0 0 0 rgba(227, 163, 26, 0); } }
.hero h1 { margin: 0; font-size: clamp(32px, 4.6vw, 54px); line-height: 1.15; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
[dir="rtl"] .hero h1 { letter-spacing: 0; line-height: 1.35; }
.hero p { margin: 0; font-size: 18px; color: #C3D9D3; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero-btn { background: var(--mint); color: #0B1F1B; min-height: 48px; padding: 10px 22px; border-radius: 12px; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; transition: transform .12s, box-shadow .12s; }
.hero-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(95, 211, 168, .3); }
.hero-btn2 { background: transparent; color: #F1F7F5; border: 1px solid rgba(241, 247, 245, .3); min-height: 48px; padding: 10px 22px; border-radius: 12px; font-size: 15px; }
.hero-btn2:hover { border-color: var(--mint); color: var(--mint); }
.hero-art { position: relative; aspect-ratio: 1; max-width: 400px; width: 100%; justify-self: center; display: grid; place-items: center; }
.hero-art img { width: 46%; height: auto; border-radius: 22%; position: relative; filter: drop-shadow(0 10px 30px rgba(95, 211, 168, .25)); }
.orbit { position: absolute; border-radius: 50%; border: 1px dashed rgba(159, 216, 207, .3); }
.orbit.o1 { inset: 4%; animation: spin 80s linear infinite; }
.orbit.o2 { inset: 18%; border-style: solid; border-color: rgba(159, 216, 207, .14); }
.orbit.o3 { inset: 32%; background: radial-gradient(circle, rgba(95, 211, 168, .16), transparent 70%); border: 0; }
.orbit.o1::after { content: ''; position: absolute; top: 12%; left: 12%; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); }
@keyframes spin { to { transform: rotate(360deg); } }

.hstats { max-width: 1208px; width: calc(100% - 32px); margin: -84px auto 0; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 40px rgba(16, 35, 31, .14); padding: 18px 20px 20px; }
.hstats-h { font-size: 13px; font-weight: 600; color: var(--ink3); margin-bottom: 12px; }
.hstats-g { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.hstat { display: flex; flex-direction: column; gap: 6px; padding: 4px 18px; border-inline-start: 1px solid var(--line); min-width: 0; }
.hstat:first-child { border-inline-start: 0; padding-inline-start: 0; }
.hstat .hl { font-size: 13px; color: var(--ink2); display: flex; align-items: center; gap: 8px; }
.hstat .hl::before { content: ''; width: 8px; height: 8px; border-radius: 2px; flex: none; background: currentColor; }
.hstat.blue .hl::before { color: var(--blue); } .hstat.red .hl::before { color: var(--red); } .hstat.purple .hl::before { color: var(--purple); } .hstat.green .hl::before { color: var(--green); }
.hstat .hv { font-size: 30px; font-weight: 700; line-height: 1.15; }
.hstat .hu { font-size: 13px; font-weight: 500; color: var(--ink3); }

.hsec { max-width: 1240px; width: 100%; margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }
.hsec h2 { margin: 0; font-size: 24px; }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; width: 100%; }
.role { --c: var(--accent); --cb: var(--teal-bg); text-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); transition: transform .15s, border-color .15s, box-shadow .15s; position: relative; overflow: hidden; }
.role::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); }
.role.r-expert { --c: var(--blue); --cb: var(--blue-bg); }
.role.r-farmer { --c: var(--green); --cb: #E2F1E6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .role.r-farmer { --cb: #173322; } }
:root[data-theme="dark"] .role.r-farmer { --cb: #173322; }
.role:hover { transform: translateY(-3px); border-color: var(--c); box-shadow: 0 10px 30px rgba(16, 35, 31, .12); }
.role-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--cb); color: var(--c); display: grid; place-items: center; }
:root[data-theme="dark"] .role-ic { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .role-ic { color: var(--ink); } }
.ic { width: 26px; height: 26px; }
.role b { font-size: 20px; }
.role-d { color: var(--ink3); font-size: 14px; }
.role ul { list-style: none; margin: 4px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ink2); flex: 1; }
.role li { display: flex; align-items: flex-start; gap: 8px; }
.tk { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--c); }
.role-go { font-weight: 700; color: var(--accent-ink); display: inline-flex; gap: 6px; align-items: center; margin-top: 4px; }
.role:hover .role-go span { transform: translateX(3px); }
[dir="rtl"] .role:hover .role-go span { transform: translateX(-3px); }
.role-go span { transition: transform .15s; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.steps li { position: relative; background: var(--soft); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.steps li span:last-child { color: var(--ink2); font-size: 14px; }
.step-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--surface); color: var(--accent-ink); display: grid; place-items: center; border: 1px solid var(--line); }
.step-n { position: absolute; top: 14px; right: 18px; font-size: 40px; font-weight: 700; line-height: 1; color: var(--soft2); }
[dir="rtl"] .step-n { right: auto; left: 18px; }
.steps b { font-size: 17px; }
.sources { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.sources > span { font-size: 13px; }
.sources div { display: flex; flex-wrap: wrap; gap: 8px; }
.sources div span { font-size: 12px; font-weight: 600; color: var(--ink2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; background: var(--surface); direction: ltr; }
@media (prefers-reduced-motion: reduce) { .orbit.o1, .pulse { animation: none; } .role, .hero-btn, .role-go span { transition: none; } }
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-art { max-width: 260px; order: -1; }
  .hstats-g { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .hstat:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .steps { grid-template-columns: 1fr; }
}

/* dashboard */
.help { background: var(--teal-bg); color: var(--accent-ink); border-radius: var(--radius); padding: 14px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.help b { flex-basis: 100%; font-size: 15px; }
.help ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 18px; flex: 1 1 600px; }
.help li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink); }
.help li .num { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.helpbar { display: flex; justify-content: flex-end; margin-bottom: -8px; }
.linkbtn { border: 0; background: none; color: var(--accent-ink); font-weight: 600; font-size: 13px; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.lead { background: var(--top); color: #F1F7F5; border-radius: var(--radius); padding: 18px 22px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between;
  background-image: radial-gradient(60% 120% at 100% 0%, rgba(95, 211, 168, .16), transparent 70%); }
[dir="rtl"] .lead { background-image: radial-gradient(60% 120% at 0% 0%, rgba(95, 211, 168, .16), transparent 70%); }
.lead-t { flex: 1 1 480px; min-width: 0; }
.lead p { margin: 0; color: #C3D9D3; font-size: 15px; }
.lead p b { color: #F1F7F5; }
.lead .lead-h { font-size: 21px; font-weight: 700; color: #F1F7F5; margin-bottom: 4px; text-wrap: balance; }
.lead-a { display: flex; flex-wrap: wrap; gap: 8px; }
.lead .btn { background: var(--mint); color: #0B1F1B; }
.lead .btn.out { background: transparent; color: #F1F7F5; border-color: rgba(241, 247, 245, .35); }
.lead .btn.out:hover { border-color: var(--mint); color: var(--mint); }

.kpis2 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi2 { --c: var(--accent); position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s, transform .15s; }
.kpi2.blue { --c: var(--blue); } .kpi2.red { --c: var(--red); } .kpi2.purple { --c: var(--purple); } .kpi2.green { --c: var(--green); }
.kpi2::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: 12px 0 0 12px; background: var(--c); }
[dir="rtl"] .kpi2::before { inset: 0 0 0 auto; border-radius: 0 12px 12px 0; }
.kpi2:hover { border-color: var(--c); transform: translateY(-1px); }
.kpi2.on { border-color: var(--c); box-shadow: 0 0 0 2px var(--c); }
.kpi2-b { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 14px 40px 14px 18px; border-radius: 12px; }
[dir="rtl"] .kpi2-b { padding: 14px 18px 14px 40px; }
.kpi2-b:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
.kpi2 .kl { font-size: 13px; color: var(--ink2); }
.kpi2 .kv { font-size: 28px; font-weight: 700; line-height: 1.15; }
.kpi2 .ku { font-size: 13px; color: var(--ink3); font-weight: 500; }
.kpi2 .tip { position: absolute; top: 12px; inset-inline-end: 12px; }

.tip { position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink3); font: italic 700 12px/1 Georgia, serif; cursor: help; background: var(--surface); flex: none; }
.tip:hover, .tip:focus { color: var(--accent-ink); border-color: var(--accent); outline: none; }
.tip::after { content: attr(data-tip); position: absolute; z-index: 20; top: calc(100% + 8px); inset-inline-end: -8px; width: max-content; max-width: 260px; background: var(--top); color: #F1F7F5; font: 400 13px/1.45 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif;
  padding: 9px 12px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); opacity: 0; visibility: hidden; transition: opacity .12s; pointer-events: none; text-align: start; }
.tip:hover::after, .tip:focus::after { opacity: 1; visibility: visible; }

.dash { gap: 14px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar .cnt { font-size: 11px; background: var(--soft2); color: var(--ink2); border-radius: 999px; padding: 1px 7px; }
.toolbar .chips button[aria-pressed="true"] .cnt { background: var(--surface); }
.search { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; min-height: 40px; background: var(--surface); width: 220px; max-width: 100%; }
.sel select { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; min-height: 40px; background: var(--surface); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.compare { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.compare > .muted { font-weight: 700; color: var(--ink2); }
.layerwhat { font-size: 13px; color: var(--ink2); background: var(--soft); border-radius: 10px; padding: 8px 12px; margin-top: -4px; }
.dgrid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.dmap { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dmap .mapbox { height: 500px; }
.mapctl { position: absolute; z-index: 5; top: 10px; right: 10px; }
.mapctl button { box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.rank { box-shadow: none; padding: 14px; max-height: 590px; }
.rank h3 { font-size: 14px; }
.rlist { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-inline: -4px; padding-inline: 4px; }
.rrow { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "d n v" "b b b"; gap: 4px 10px; align-items: center; text-align: start; border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 8px 10px; }
.rrow .dot { grid-area: d; }
.rrow .rn { grid-area: n; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rrow .rn small { font-weight: 500; color: var(--ink3); margin-inline-start: 6px; font-size: 11px; }
.rrow .rv { grid-area: v; font-size: 12px; font-weight: 600; color: var(--ink2); white-space: nowrap; }
.rrow .rbar { grid-area: b; height: 6px; border-radius: 3px; background: var(--soft2); overflow: hidden; }
.rrow .rbar i { display: block; height: 100%; border-radius: 3px; }
.rrow:hover, .rrow.hov { background: var(--soft); }
.rrow.sel { border-color: var(--accent); background: var(--teal-bg); }
.empty { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 10px 0; }
.mlabel.hov { border-color: #10231F; transform: scale(1.06); }
.mlabel.dim { opacity: .4; }
.svgmap .reg.hov { stroke: #10231F; stroke-width: 2.5; }
.svgmap .reg.dim { opacity: .2; }

.spot { border-top: 4px solid var(--sc); }
.spot-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px; }
.spot-h h2 { font-size: 22px; }
.spot-b { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; }
.why ul { margin: 6px 0 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--ink2); }
.why li::marker { color: var(--sc); }
.sms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sm { border-radius: 10px; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sm b { font-size: 18px; }
.sm.blue { background: var(--blue-bg); color: var(--blue-ink); } .sm.purple { background: var(--purple-bg); color: var(--purple-ink); }
.sm.green { background: var(--teal-bg); color: var(--accent-ink); } .sm.soft { background: var(--soft); }
@media (prefers-reduced-motion: reduce) { .kpi2, .tip::after { transition: none; } }
@media (max-width: 960px) {
  .kpis2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dgrid { grid-template-columns: 1fr; }
  .rank { max-height: none; }
  .spot-b { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .dmap .mapbox { height: 380px; }
  .kpi2 .kv { font-size: 22px; }
  .kpi2-b { padding: 12px 34px 12px 14px; }
  [dir="rtl"] .kpi2-b { padding: 12px 14px 12px 34px; }
  .search { width: 100%; }
  .toolbar .spacer { display: none; }
  .lead .lead-h { font-size: 18px; }
  .tip::after { max-width: 220px; }
}

/* gauge */
.gauge { position: relative; padding: 46px 0 30px; direction: ltr; }
.gauge .bar { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #B83A26 0%, #E3A31A 40%, #6DAA55 72%, #2F7D4F 100%); }
.gauge .pin { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gauge .pin > span { font-size: 12px; font-weight: 700; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
.gauge .pin i { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); }
.gauge .pin.with > span { background: var(--accent); color: #fff; border-color: var(--accent); }
.gauge .pin.with i { background: var(--accent); border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.gauge .target { position: absolute; top: 36px; height: 34px; border-left: 3px dashed var(--ink); }
.gauge .tl { position: absolute; bottom: 2px; transform: translateX(-50%); font-size: 12px; font-weight: 700; white-space: nowrap; }
.gauge .ends { position: absolute; bottom: 2px; font-size: 12px; color: var(--ink3); }

/* lists */
.alert { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-inline-start-width: 5px; border-radius: 10px; }
.alert .t { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.check { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.check .chip { min-width: 112px; justify-content: center; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.fact { background: var(--soft); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.fact b { font-size: 26px; }
.listbtn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-align: start; }

/* map */
.mapbox { position: relative; height: 520px; border-radius: 12px; overflow: hidden; background: var(--soft); border: 1px solid var(--line); }
#mapEl { position: absolute; inset: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; min-height: 38px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chips button[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--teal-bg); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--ink2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.mlabel { background: rgba(255, 255, 255, .94); color: #10231F; border-radius: 8px; padding: 3px 8px; font-size: 12px; font-weight: 700; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); white-space: nowrap; cursor: pointer; border: 2px solid transparent; font-family: inherit; }
.mlabel small { display: block; font-weight: 600; font-size: 11px; }
.mlabel.sel { border-color: #10231F; }
.svgmap { width: 100%; height: 100%; display: block; }
.svgmap .reg { cursor: pointer; stroke: #fff; stroke-width: 1.5; }
.svgmap .reg.sel { stroke: #10231F; stroke-width: 3; }

/* panel */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.metric { border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.metric .v { font-size: 19px; font-weight: 700; }
.hbar { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.hbar .lbl { width: 130px; flex: none; color: var(--ink2); }
.hbar .track { flex: 1; height: 10px; background: var(--soft2); border-radius: 5px; overflow: hidden; }
.hbar .fill { height: 10px; border-radius: 5px; }
.hbar .val { min-width: 92px; text-align: end; font-weight: 700; }
.box { background: var(--soft); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: start; width: 100%; }
.opt[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--teal-bg); }
.opt .box2 { width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--accent); flex: none; margin-top: 2px; display: grid; place-items: center; color: #fff; font-size: 13px; }
.opt[aria-pressed="true"] .box2 { background: var(--accent); }

/* forms + tables */
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.field input { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); min-height: 40px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: start; white-space: nowrap; }
th { background: var(--soft); font-weight: 700; }
textarea { width: 100%; min-height: 120px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--surface); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; }
pre { background: #0B1F1B; color: #D7EEE8; padding: 14px; border-radius: 10px; overflow-x: auto; font-size: 12px; direction: ltr; text-align: left; margin: 0; }

/* farmer */
.blocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.block { color: #fff; border-radius: 10px; padding: 10px; min-height: 76px; display: flex; flex-direction: column; justify-content: space-between; }
.planrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.planrow .n { flex: 1; min-width: 0; }

.answer { white-space: pre-wrap; background: var(--soft); border-radius: 10px; padding: 12px 14px; }
.hidden { display: none !important; }
@media (max-width: 640px) {
  .hero { padding: 32px 16px 104px; }
  .hero-art { max-width: 200px; }
  .hero p { font-size: 16px; }
  .hstat .hv { font-size: 24px; }
  .hstat { padding: 2px 12px; }
  .mapbox { height: 420px; }
  .hbar .lbl { width: 96px; }
  .blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* UAE water news */
.news .cnt { font-size: 11px; background: var(--soft2); color: var(--ink2); border-radius: 999px; padding: 1px 7px; }
.news .chips button[aria-pressed="true"] .cnt { background: var(--surface); }
.nlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.nlist.compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.nitem a { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; background: var(--soft); border: 1px solid transparent; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.nitem a:hover, .nitem a:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.nitem b { font-size: 15px; line-height: 1.45; }
.nsum { font-size: 13px; color: var(--ink2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ntags { display: flex; flex-wrap: wrap; gap: 6px; }
.ntag { font-size: 11px; padding: 2px 8px; }
.nmeta { margin-top: auto; }
@media (max-width: 560px) { .nlist, .nlist.compact { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .nitem a { transition: none; } .nitem a:hover { transform: none; } }
.news .btn { white-space: nowrap; display: inline-flex; flex-direction: row; align-items: center; gap: 6px; }
.nmonths-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.nmonths { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; align-items: end; }
.nmonth { border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; color: var(--ink2); }
.nmonth:not(:disabled):hover { background: var(--soft); }
.nmonth[aria-pressed="true"] { border-color: var(--accent); background: var(--teal-bg); }
.nmonth:disabled { cursor: default; opacity: .55; }
.nbar { width: 100%; max-width: 28px; height: 56px; display: flex; align-items: flex-end; background: var(--soft); border-radius: 6px; overflow: hidden; }
.nbar i { display: block; width: 100%; background: var(--accent); border-radius: 6px 6px 0 0; min-height: 0; }
.nmonth[aria-pressed="true"] .nbar i { background: var(--accent-ink); }
.nbar-n { font-size: 11px; font-weight: 700; min-height: 14px; }
.nbar-m { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nbar-y { font-size: 10px; color: var(--ink3); min-height: 12px; }
.nmonth-h { margin: 6px 0 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.nmore { align-self: center; }
@media (max-width: 560px) { .nmonths { grid-template-columns: repeat(12, minmax(52px, 1fr)); overflow-x: auto; padding-bottom: 4px; } .nbar { height: 44px; } }

/* about page */
.about { padding-top: 28px; padding-bottom: 48px; }
.about h1 { font-size: 34px; margin: 0 0 8px; }
.about h2 { font-size: 21px; margin: 32px 0 12px; }
.about .alead { font-size: 17px; color: var(--ink2); max-width: 780px; margin: 0; }
.about p { margin: 0; color: var(--ink2); }
.agrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.agrid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.person .phead { display: flex; align-items: center; gap: 16px; }
.person .phead h3 { margin: 0 0 6px; }
.person .pphoto { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--line, #e3e8e6); }
.person dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; }
.person dt { color: var(--ink3); font-size: 13px; font-weight: 600; padding-top: 2px; }
.person dd { margin: 0; color: var(--ink2); }
.plinks { font-weight: 600; }
.abig { font-size: 26px; color: var(--accent-ink); unicode-bidi: plaintext; }
.asteps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: s; }
.asteps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.asteps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.asteps li span { color: var(--ink2); font-size: 14px; }
.wss { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.wss .card { display: flex; flex-direction: column; gap: 8px; }
.wss .card p { margin: 0; color: var(--ink2); font-size: 14px; }
.wss .wgoal { font-weight: 600; color: var(--ink) !important; }
.wss .chip { align-self: flex-start; }
.wss .chip.wd { background: var(--teal-bg); color: var(--accent-ink); }
.wss .chip.wh { background: var(--soft); color: var(--ink2); border: 1px solid var(--line); }
.asteps.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .wss { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .asteps.three { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .wss { grid-template-columns: 1fr; } }
.alist { margin: 0; padding-inline-start: 20px; color: var(--ink2); display: grid; gap: 6px; max-width: 860px; }
@media (max-width: 900px) { .agrid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } .asteps { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .agrid, .agrid.four { grid-template-columns: 1fr; } .about h1 { font-size: 28px; } }
.news-page { padding-top: 20px; padding-bottom: 28px; }

/* ------------------------------------------------ "How we calculate this" links and the methods page */
.howlink { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; min-height: 32px; }
.howlink:hover { text-decoration-thickness: 2px; }
.methods .mtoc { margin: 18px 0 8px; }
.methods .mtoc a { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; }
.methods .mtoc a:hover { border-color: var(--accent); }
.methods .method { margin-top: 14px; max-width: 900px; scroll-margin-top: 80px; }
.methods .method h2 { margin: 0; font-size: 20px; }
.methods .method ul { margin: 6px 0 0; padding-inline-start: 20px; color: var(--ink2); display: grid; gap: 5px; }
.methods .method.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--teal-bg), var(--shadow); }
.methods .method:focus { outline: none; }
.methods .mlim { font-size: 14px; }
.methods .mlinks { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; font-size: 13px; }
.methods .mlinks a { color: var(--accent-ink); font-weight: 600; }
.methods .mlinks .muted { flex-basis: auto; }

/* ------------------------------------------------ first-visit tour (web/tour.js) */
.tour-layer { position: fixed; inset: 0; z-index: 1000; }
.tour-dim { position: fixed; inset: 0; background: rgba(6, 18, 16, .55); }
.tour-ring { position: fixed; border-radius: 14px; box-shadow: 0 0 0 3px var(--mint), 0 0 0 9999px rgba(6, 18, 16, .55); pointer-events: none; transition: top .25s, left .25s, width .25s, height .25s; }
.tour-card { position: fixed; width: min(400px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, .28); display: flex; flex-direction: column; gap: 8px; }
.tour-card.mid { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.tour-card h2 { margin: 0; font-size: 19px; }
.tour-card p { margin: 0; color: var(--ink2); font-size: 15px; line-height: 1.55; }
.tour-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tour-n { font-size: 12px; font-weight: 600; color: var(--accent-ink); }
.tour-skip { border: 0; background: none; color: var(--ink2); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; min-height: 32px; }
.tour-dots { display: flex; gap: 6px; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.tour-dots i.on { background: var(--accent); width: 18px; border-radius: 4px; }
.tour-btns { display: flex; justify-content: flex-end; gap: 8px; }
@media (prefers-reduced-motion: reduce) { .tour-ring { transition: none; } }

/* ---------------------------------------------------------------- uncertainty: ranges and confidence badges */
.unc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; font-weight: 500; color: var(--ink3); line-height: 1.3; }
.cb { --cb: var(--grey); position: relative; display: inline-flex; align-items: center; gap: 2px; padding: 2px 7px 2px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink2); font: 500 11.5px/1.2 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif; cursor: help; white-space: nowrap; vertical-align: middle; }
.cb:focus { outline: 2px solid var(--mint, var(--accent)); outline-offset: 1px; }
.cb > i { display: inline-block; width: 3px; border-radius: 1px; background: var(--line); }
.cb > i:nth-child(1) { height: 5px; } .cb > i:nth-child(2) { height: 8px; } .cb > i:nth-child(3) { height: 11px; margin-inline-end: 3px; }
.cb-high { --cb: var(--green); } .cb-medium { --cb: var(--amber); } .cb-low { --cb: var(--red); }
.cb-high > i, .cb-medium > i:nth-child(-n+2), .cb-low > i:nth-child(1) { background: var(--cb); }
.cb.compact { padding: 2px 5px; } .cb.compact > i:nth-child(3) { margin-inline-end: 0; }
.cb::after { content: attr(data-tip); position: absolute; z-index: 25; top: calc(100% + 8px); inset-inline-start: -8px; width: max-content; max-width: 280px; white-space: normal; background: var(--top); color: #F1F7F5;
  font: 400 13px/1.45 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif; padding: 9px 12px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); display: none; pointer-events: none; text-align: start; }
/* display:none (not just hidden) so the closed tooltip never widens a phone page */
.cb:hover::after, .cb:focus::after { display: block; }
@media (max-width: 640px) { .cb::after { max-width: 220px; } }
.kpi2-u { padding: 0 18px 12px; margin-top: -6px; }
.hstat .unc { margin-top: -2px; }

/* "UAE satellite ready" badge: parts of Ain that UAE satellite data could feed (see satellites.html) */
.sbadge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--blue-bg); color: var(--ink); border: 1px solid var(--line); text-decoration: none; white-space: nowrap; }
.sbadge:hover { border-color: var(--accent); }
.howrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }

/* ---------------------------------------------------------------- live weather, rain and satellite passes (now.js), farmer view */
.nowfarm { border: 1px solid var(--line); border-inline-start: 4px solid var(--blue); border-radius: 10px; padding: 10px 12px; display: grid; gap: 7px; background: color-mix(in srgb, var(--blue) 5%, var(--surface)); }
.nowfarm:empty { display: none; }
.nowfarm h3 { margin: 0; }
.nowfarm h3.nowsat { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.nowfarm small { color: var(--ink3); font-size: 12px; line-height: 1.4; }
.nowbig, .nowpass { margin: 0; }
.nowbig b { display: block; font-size: 17px; color: var(--blue); }
.nowpass b { display: block; font-size: 14px; color: var(--ink); }
.nowwarn { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.nowwarn li { --ic: var(--ink3); display: flex; gap: 8px; align-items: flex-start; }
.nowwarn li.lvl-red { --ic: var(--red); } .nowwarn li.lvl-amber { --ic: var(--amber); } .nowwarn li.lvl-green { --ic: var(--green); } .nowwarn li.lvl-info { --ic: var(--blue); }
.nowwarn li i { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--ic); color: #fff; font: 700 11px/18px system-ui, sans-serif; text-align: center; font-style: normal; }
.nowwarn li.lvl-amber i { color: #2A1F00; }
.nowwarn li p { margin: 0; font-size: 13px; color: var(--ink); }
.nowweek { width: 100%; border-collapse: collapse; font-size: 11.5px; table-layout: fixed; }
.nowweek th { text-align: start; font-weight: 600; color: var(--ink3); width: 52px; padding: 2px 0; }
.nowweek td { text-align: center; padding: 2px 0; color: var(--ink2); vertical-align: bottom; }
.nowweek td.hot { color: var(--red); font-weight: 700; }
.etbar { display: block; width: 10px; margin: 0 auto 2px; background: var(--blue); border-radius: 2px 2px 0 0; opacity: .7; }
.nowsnap { position: relative; margin: 0; width: 100%; max-width: 256px; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--soft); }
.nowsnap img { width: 100%; height: 100%; display: block; object-fit: cover; }
.nowsnap .crosshair { position: absolute; inset: 50% auto auto 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #0008; }
.nowseg { justify-self: start; }
.nowfarm .nowseg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--soft); }
.nowfarm .nowseg button { border: 0; background: none; padding: 5px 10px; border-radius: 999px; font-size: 12px; color: var(--ink2); cursor: pointer; }
.nowfarm .nowseg button[aria-checked="true"] { background: var(--accent); color: #fff; font-weight: 600; }

/* farmer view: map of the farm's fields (app.js farmMap) */
.farmmap { margin: 4px 0 2px; display: grid; gap: 4px; }
.farmmap svg { width: 100%; height: auto; display: block; border-radius: 10px; background: #3b4a3f; }
.farmmap polygon { cursor: pointer; transition: fill-opacity .15s; }
.farmmap a:hover polygon, .farmmap a:focus polygon { fill-opacity: .6; }
.fmlabel { pointer-events: none; }
.fmlabel circle { fill: #fff; stroke: #0E5E57; stroke-width: 2; }
.fmlabel text { font: 700 12px system-ui, sans-serif; fill: #0E5E57; text-anchor: middle; }

/* ------------------------------------------------ shared top bar and footer (site.js), the same on every page */
.site-top { position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.site-top .brand { text-decoration: none; }
.site-top .topnav { display: flex; align-items: center; gap: 2px; }
.nl { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 6px 11px; border-radius: 10px; color: #CFE6E1; text-decoration: none; font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s; }
.nl:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nl[aria-current="page"] { background: rgba(95, 211, 168, .14); color: var(--mint); }
.nic { width: 17px; height: 17px; flex: none; opacity: .9; }
.more { position: relative; }
.more > summary { list-style: none; cursor: pointer; }
.more > summary::-webkit-details-marker { display: none; }
.more[open] > summary { background: rgba(255, 255, 255, .07); color: #fff; }
.more[open] > summary .nic { transform: rotate(180deg); }
.more-list { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 230px; z-index: 70; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 14px 40px rgba(10, 30, 26, .22); padding: 6px; display: flex; flex-direction: column; animation: drop .14s ease-out; }
.more-list a, .more-list button { display: block; text-align: start; padding: 9px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; border: 0; background: none; width: 100%; }
.more-list a:hover, .more-list button:hover { background: var(--soft); }
.more-list [aria-current="page"] { color: var(--accent-ink); font-weight: 700; }
.more-list hr { border: 0; border-top: 1px solid var(--line); margin: 5px 6px; }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }
.site-top .theme-btn { width: 38px; min-height: 38px; padding: 0; display: inline-grid; place-items: center; margin-inline-start: 4px; border-color: transparent; }
.site-top .theme-btn:hover { background: rgba(255, 255, 255, .07); }
.site-top .theme-btn .nic, .site-top .menu-btn .nic { width: 19px; height: 19px; }
.site-top .tlabel { display: none; }
.site-top .seg { margin-inline-start: 6px; }
.site-top .menu-btn { width: 40px; padding: 0; place-items: center; }
@media (max-width: 1100px) {
  .site-top .menu-btn { display: inline-grid; }
  .site-top .topnav { display: none; }
  .site-top.open .topnav { display: flex; flex-direction: column; align-items: stretch; order: 10; width: 100%; max-height: calc(100dvh - 70px); overflow-y: auto; padding: 8px 0 10px; gap: 2px; border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 4px; }
  .site-top.open .nl { min-height: 44px; font-size: 15px; }
  .site-top.open .more > summary { display: none; }
  .site-top.open .more-list { position: static; display: flex; animation: none; background: transparent; border: 0; box-shadow: none; padding: 0; min-width: 0; }
  .site-top.open .more-list a, .site-top.open .more-list button { color: #CFE6E1; padding: 10px 11px; font-size: 15px; }
  .site-top.open .more-list a:hover, .site-top.open .more-list button:hover { background: rgba(255, 255, 255, .07); }
  .site-top.open .more-list hr { border-color: rgba(255, 255, 255, .08); }
  .site-top.open .theme-btn { width: auto; display: inline-flex; gap: 7px; justify-content: flex-start; padding: 0 11px; margin: 0; min-height: 44px; font-size: 15px; font-weight: 600; color: #CFE6E1; }
  .site-top.open .tlabel { display: inline; }
}
@media (max-width: 640px) {
  .site-top .rolepill, .site-top .wrap > .ghost[data-act="home"] { display: none; }
  .site-top .wrap { gap: 8px; }
  .site-top .seg button { padding: 6px 9px; }
  .brand img { width: 30px; height: 30px; }
  .brand b { font-size: 18px; }
}
@media (max-width: 380px) { .brand span { display: none; } }

.site-foot { margin-top: 48px; background: var(--top); color: #B9CEC8; font-size: 13px; padding: 36px 0 calc(96px + env(safe-area-inset-bottom)); }
.site-foot .wrap { display: grid; grid-template-columns: minmax(220px, 1fr) 2.6fr; gap: 28px 40px; }
.sf-brand { display: flex; gap: 12px; align-items: flex-start; }
.sf-brand b { color: #F1F7F5; font-size: 18px; }
.sf-brand p { margin: 4px 0 0; max-width: 260px; line-height: 1.5; }
.sf-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1100px) { .site-foot .wrap { grid-template-columns: 1fr; } }
.sf-cols h2 { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mint); }
[dir="rtl"] .sf-cols h2 { letter-spacing: 0; }
.sf-cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.site-foot a { color: #DCEAE6; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.sf-credits { grid-column: 1 / -1; margin: 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12px; color: #8FA8A1; }
.site-foot .linkbtn { font-size: 12px; font-weight: 600; color: #DCEAE6; padding: 0; }
@media (max-width: 760px) { .site-foot .wrap { grid-template-columns: 1fr; } .sf-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) { .nl, .more-list, .more[open] > summary .nic { animation: none; transition: none; } }
@media print { .site-top, .site-foot { display: none; } }
html { scroll-padding-top: 76px; }
.ares { display: flex; flex-direction: column; }
.ares h3 { margin: 0 0 6px; font-size: 16px; }
.ares p { margin: 0 0 8px; }
.ares .small { margin-top: auto; margin-bottom: 0; }

/* Line icons from icons.js (used instead of emoji) */
.i-svg { display: inline-block; width: 1em; height: 1em; vertical-align: -0.14em; flex: none; }

/* Footer: brand name pair and the legal line */
.sf-alt { font-weight: 600; opacity: .7; padding-inline-start: 8px; margin-inline-start: 4px; border-inline-start: 1px solid currentColor; }
.sf-legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-size: 12px; opacity: .75; }
.sf-legal a { color: inherit; }

/* Media kit (press.html) */
.press .pch { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.press .pcopy p { font-size: 15px; line-height: 1.6; }
.pfacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin: 0; }
.pfacts div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; }
.pfacts dt { color: var(--ink3); font-weight: 600; }
.pfacts dd { margin: 0; color: var(--ink); }
.plogos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plogo b { display: block; margin-top: 10px; }
.pprev { height: 130px; border-radius: 10px; display: grid; place-items: center; padding: 16px; border: 1px solid var(--line); overflow: hidden; }
.pprev.lt { background: #FFFFFF; } .pprev.dk { background: #0B1F1B; border-color: #0B1F1B; } .pprev.img { padding: 0; background: #0B1F1B; }
.pprev img { max-width: 100%; max-height: 72px; } .pprev.img img { max-height: none; width: 100%; height: 100%; object-fit: cover; }
.pcols { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.pcol { display: grid; gap: 4px; text-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; color: var(--ink); font: inherit; }
.pcol span { height: 54px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, .08); }
.pcol code { font-size: 12px; color: var(--ink3); }
.pshots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pshot { display: block; padding: 10px; text-decoration: none; color: var(--ink2); }
.pshot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line); display: block; margin-bottom: 8px; }
@media (max-width: 900px) { .plogos { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pcols { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pfacts { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .plogos, .pshots { grid-template-columns: 1fr; } .pcols { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pfacts div { grid-template-columns: 1fr; gap: 2px; } }

/* Home hero map: the emirates with each study area in its status colour */
.hero-map { margin: 0; width: 100%; max-width: 520px; justify-self: center; display: grid; gap: 10px; }
.hero-map svg { width: 100%; height: auto; display: block; overflow: visible; }
.hm-em { fill: rgba(95, 211, 168, .07); stroke: rgba(159, 216, 207, .45); stroke-width: 1.2; stroke-linejoin: round; }
.hm-ring { opacity: .22; transform-box: fill-box; transform-origin: center; }
.hm-pt.s-red .hm-ring { animation: hmPulse 2.4s ease-out infinite; }
@keyframes hmPulse { 0% { transform: scale(.6); opacity: .45; } 100% { transform: scale(1.8); opacity: 0; } }
.hm-scan { stroke: rgba(95, 211, 168, .55); stroke-width: 1.5; animation: hmScan 7s linear infinite; filter: drop-shadow(0 0 6px rgba(95, 211, 168, .8)); }
@keyframes hmScan { 0% { transform: translateY(-10px); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(490px); opacity: 0; } }
.hero-map figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 13px; color: #B9CEC8; }
.hero-map figcaption i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 6px; vertical-align: 0; }
@media (prefers-reduced-motion: reduce) { .hm-scan, .hm-pt.s-red .hm-ring { animation: none; } .hm-scan { display: none; } }

/* Closing call to action on the home page */
.hcta { background: var(--top); color: #F1F7F5; border-radius: 20px; padding: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  background-image: radial-gradient(600px 260px at 100% 0%, rgba(95, 211, 168, .16), transparent 70%); }
.hcta h2 { margin: 0 0 6px; font-size: 26px; color: #F1F7F5; }
.hcta p { margin: 0; color: #C3D9D3; max-width: 520px; }
.hcta-b { display: flex; flex-wrap: wrap; gap: 10px; }
.hcta-b a { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
