@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2) format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2) format('woff2'); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/ibm-plex-sans-arabic-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
/* The Field kit design: evergreen and olive gold on a sage ground, 17 px body, large controls, nothing under 13 px. */
:root {
  --bg: #f4f5f0; --card: #fff; --sunken: #eef0ea; --line: #e2e5dd; --control: #848c84; --ink: #0e1a14; --muted: #55625a;
  --brand: #17533a; --brand-ink: #17533a; --brand-soft: #e1efe4; --hero: #0f2e22; --select: #0f2e22; --on-select: #fff; --gold: #e0b43c;
  --water: #1f6fc5; --water-soft: #e4effa; --soil: #9a4f2c; --soil-soft: #f5e6dd; --warn: #8a5300; --warn-soft: #fdf0d2; --danger: #c8302a; --danger-soft: #fbe7e4; --safety: #b8231d; --on-danger: #fff; --ring-today: #c98a00; --ring-idle: #b3bab2;
  --green: var(--brand); --green-2: var(--brand-ink); --green-soft: var(--brand-soft);
  font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, "Segoe UI", Roboto, Tahoma, Arial, sans-serif; color: var(--ink); font-variant-numeric: tabular-nums;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b110e; --card: #151d19; --sunken: #1d2722; --line: #2a3530; --control: #7c8a82; --ink: #e9efeb; --muted: #a6b2ab;
    --brand: #2a8a57; --brand-ink: #8fd9a8; --brand-soft: #18301f; --hero: #173d2c; --select: #8fd9a8; --on-select: #0b110e; --gold: #e8c158;
    --water: #79b3f2; --water-soft: #142638; --soil: #e0a07f; --soil-soft: #33221a; --warn: #f3cd6a; --warn-soft: #2e2510; --danger: #f4968e; --danger-soft: #3a1b19; --safety: #a8221c; --on-danger: #0b110e; --ring-today: #f3cd6a; --ring-idle: #5d6a63;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); min-height: 100vh; font-size: 16px; }
#bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  background: var(--green); color: #fff; }
#title { flex: 1; font-weight: 650; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.icon { background: transparent; border: 0; color: #fff; font-size: 26px; width: 40px; height: 40px; border-radius: 10px; }
.sync { font-size: 12px; background: rgba(255,255,255,.18); padding: 3px 9px; border-radius: 999px; }
main { padding: 14px 14px 96px; max-width: 640px; margin: 0 auto; }
h2 { font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 20px 4px 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.row { display: flex; gap: 10px; align-items: center; }
.row .grow { flex: 1; min-width: 0; }
.t { font-weight: 600; }
.s { color: var(--muted); font-size: 14px; margin-top: 2px; }
.late { border-color: var(--danger); }
.soon { border-color: var(--warn); }
.chip { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--green-soft); color: var(--green-2); white-space: nowrap; }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--danger-soft); color: var(--danger); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.big { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 96px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 16px; font-weight: 600; }
.big span { font-size: 30px; }
button, input, select, textarea { font: inherit; }
.btn { display: block; width: 100%; min-height: 52px; border: 0; border-radius: 14px; background: var(--green); color: #fff; font-weight: 650; font-size: 17px; margin-top: 14px; }
.btn.ghost { background: transparent; color: var(--green-2); border: 1px solid var(--line); }
.btn.small { display: inline-block; width: auto; min-height: 40px; padding: 0 16px; margin: 0; font-size: 15px; }
label { display: block; font-size: 14px; color: var(--muted); margin: 14px 2px 6px; }
input, select, textarea { width: 100%; min-height: 50px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card); color: var(--ink); }
textarea { min-height: 90px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.photos img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.empty { color: var(--muted); text-align: center; padding: 28px 10px; }
.warnbox { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 10px 12px; margin-top: 10px; font-size: 14px; }
#toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #18221c; color: #fff;
  padding: 12px 18px; border-radius: 12px; max-width: 92vw; font-size: 15px; z-index: 9; }
.list-link { background: none; border: 0; padding: 0; width: 100%; text-align: start; color: inherit; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 14px; }
.seg button.on { background: var(--green); color: #fff; border-color: var(--green); }
[dir="rtl"] .num { direction: ltr; unicode-bidi: isolate; }

.grid.small .big { min-height: 84px; font-size: 15px; position: relative; }
.grid.small .big span { font-size: 24px; }
.big em { position: absolute; top: 8px; inset-inline-end: 8px; min-width: 22px; padding: 1px 6px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-style: normal; font-size: 13px; font-weight: 700; }
.big em.bad { background: var(--danger-soft); color: var(--danger); }
.managebtn em { margin-inline-start: 8px; min-width: 22px; padding: 1px 6px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-style: normal; font-size: 13px; }
.managebtn em.bad { background: var(--danger-soft); color: var(--danger); }
.btn.ghost.danger { color: var(--danger); }
.btn.small.wide { display: block; width: 100%; }
.btn + .btn { margin-top: 10px; }
.two > .btn + .btn { margin-top: 0; }
.warntext { color: var(--warn); font-weight: 600; }
.daybar { margin-bottom: 12px; }
.daybar input { flex: 1; min-width: 0; text-align: center; }
.daybar .btn { flex: none; min-height: 50px; width: 50px; padding: 0; font-size: 22px; }
.daybar .btn:disabled { opacity: .35; }
[dir="rtl"] .daybar .btn { transform: scaleX(-1); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px; text-align: center; font-size: 12px; color: var(--muted); }
.stats b { display: block; font-size: 20px; color: var(--ink); }
.stats .bad b { color: var(--danger); }
select.mini { width: auto; min-height: 40px; padding: 4px 8px; flex: none; }
#lightbox { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; padding: 12px; }
#lightbox[hidden] { display: none; }
#lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

.farmmap { height: 58vh; min-height: 300px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #2b332e; z-index: 0; }
.farmmap.small { height: 300px; margin-top: 12px; }
.maphead { justify-content: space-between; flex-wrap: wrap; margin: 10px 0 2px; }
.legend { display: flex; gap: 12px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { display: inline-block; width: 13px; height: 13px; border: 3px solid #ffb300; border-radius: 50%; }
.legend i.sq { border-color: #2e9e4f; border-radius: 2px; }
.center { text-align: center; margin-top: 6px; }
.big.startwork { grid-column: 1 / -1; min-height: 70px; flex-direction: row; gap: 10px; background: var(--green); color: #fff; border-color: var(--green); font-size: 18px; }
.big.startwork span { font-size: 20px; }
.card .btn.small { flex: none; }

a.linkbtn { display: flex; align-items: center; justify-content: center; text-decoration: none; margin-top: 10px; background: #25a244; }

a.helplink { display: flex; align-items: center; justify-content: center; text-decoration: none; margin-top: 10px; }
a.helplink.plain { color: var(--green-2); margin-top: 18px; min-height: 44px; }

.grid.small.team .big:first-child { grid-column: auto; }
.infobox { background: var(--green-soft); color: var(--ink); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; font-size: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#whopeople button.on, .seg button.on { background: var(--green); color: #fff; border-color: var(--green); }
.card.person .seg { align-items: center; }
.card.person .seg button { min-height: 44px; }
input.hours { width: 72px; min-height: 44px; }
.sheet { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px 12px; }
.sheethead, .sheetrow { display: grid; grid-template-columns: minmax(0, 1fr) 76px 76px; gap: 8px; align-items: center; }
.sheethead { font-size: 13px; color: var(--muted); padding: 6px 0; }
.sheetrow { padding: 6px 0; border-top: 1px solid var(--line); }
.sheetrow span { min-width: 0; overflow-wrap: anywhere; }
.sheetrow small { display: block; color: var(--muted); font-size: 12px; }
.sheetrow input { min-height: 44px; padding: 4px 8px; }
.linerow { padding: 3px 0; }
.stats.three { grid-template-columns: repeat(3, 1fr); margin-bottom: 10px; }
.stats.three b { font-size: 15px; }

/* ------------------------------------------------------------- Field kit: the shell */
body { font-size: 17px; line-height: 24px; overflow-x: hidden; }
#bar { padding: calc(8px + env(safe-area-inset-top)) 8px 8px; background: var(--bg); color: var(--ink); gap: 4px; min-height: 64px; }
#bar[hidden] { display: none; }
#bar.hero { background: var(--hero); color: #fff; }
#head { flex: 1; min-width: 0; min-height: 48px; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: inherit; padding: 0 8px; text-align: start; cursor: pointer; }
#head:disabled { cursor: default; opacity: 1; }
#head img[hidden], #caret[hidden], #kicker[hidden] { display: none; }
#bar.hero #mark { background: #fff; border-radius: 10px; padding: 3px; }
.headtext { display: flex; flex-direction: column; min-width: 0; }
#kicker { font-size: 14px; line-height: 18px; color: var(--muted); font-weight: 400; }
#bar.home #kicker { font-size: 13px; line-height: 16px; }
#bar.hero #kicker { color: #b9d3c4; }
#titleline { display: flex; align-items: center; gap: 4px; min-width: 0; }
#title { font-size: 22px; line-height: 28px; font-weight: 700; flex: initial; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bar.home #title { font-size: 19px; line-height: 24px; }
button.icon { width: 48px; height: 48px; color: inherit; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
button.icon[hidden] { display: none; }
[dir="rtl"] #back svg, [dir="rtl"] .flip { transform: scaleX(-1); }
.ic { flex: none; }
.sync { flex: none; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.sync[hidden] { display: none; }
.sync.waiting { background: var(--ink); color: var(--bg); }
#bar.hero .sync { background: rgba(255,255,255,.14); color: #fff; }
main { padding: 8px 16px 40px; max-width: 640px; }
body.has-nav main { padding-bottom: 110px; }
#nav { position: fixed; inset: auto 0 0 0; z-index: 6; display: grid; background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
#nav[hidden] { display: none; }
#nav button { min-height: 56px; border: 0; background: transparent; color: var(--muted); font-size: 13px; line-height: 16px; font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; }
#nav button.on { color: var(--brand-ink); font-weight: 700; }
#nav .pill { width: 54px; height: 30px; border-radius: 999px; display: flex; align-items: center; justify-content: center; position: relative; }
#nav .on .pill { background: var(--brand-soft); }
#nav em { position: absolute; top: -2px; inset-inline-end: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: var(--on-danger); font-size: 12px; line-height: 18px; font-style: normal; font-weight: 700; text-align: center; }
:focus-visible { outline: 3px solid var(--water); outline-offset: 2px; }

/* type */
h1 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
h2 { font-size: 20px; line-height: 26px; font-weight: 700; color: var(--ink); text-transform: none; letter-spacing: 0; margin: 22px 0 12px; }
h2 small { color: var(--muted); font-size: inherit; font-weight: 600; }
.t { font-weight: 600; font-size: 17px; line-height: 22px; }
.s { font-size: 15px; line-height: 20px; }
label { font-size: 15px; line-height: 20px; font-weight: 700; color: var(--ink); margin: 16px 0 8px; }

/* controls */
.btn { min-height: 60px; border-radius: 18px; font-size: 18px; font-weight: 700; margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--brand); color: #fff; }
.btn:disabled { opacity: .7; }
.btn.ghost { min-height: 56px; border-radius: 16px; font-size: 17px; border: 1.5px solid var(--control); color: var(--ink); background: var(--card); }
.btn.tonal { min-height: 56px; border-radius: 16px; font-size: 17px; background: var(--brand-soft); color: var(--brand-ink); }
.btn.small { display: inline-flex; min-height: 48px; border-radius: 14px; font-size: 15px; gap: 6px; }
input, select, textarea { min-height: 60px; border: 1.5px solid var(--control); border-radius: 16px; padding: 10px 16px; font-size: 18px; }
select { appearance: auto; }
textarea { min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: 0; border: 2px solid var(--water); box-shadow: 0 0 0 4px var(--water-soft); }
.seg button { min-height: 48px; padding: 8px 16px; font-weight: 600; }
.seg button.on, #whopeople button.on { background: var(--select); color: var(--on-select); border-color: var(--select); }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 10px; font-size: 15px; line-height: 20px; font-weight: 700; }

/* cards, chips */
.card { border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.card.raised { border: 0; box-shadow: 0 1px 0 var(--line), 0 12px 32px rgba(15, 46, 34, .06); padding: 24px 20px; }
.late { border-color: var(--danger); }
.soon { border-color: var(--ring-today); }
.chip { height: 30px; display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; font-size: 14px; font-weight: 700; background: var(--sunken); color: var(--muted); flex: none; }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--danger-soft); color: var(--danger); }
.empty { font-size: 16px; }
.emptycard { background: var(--card); border-radius: 20px; padding: 28px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin-bottom: 12px; }
.emptycard strong { font-size: 18px; }

/* warning levels: info is a line, advisory a tint with a gold icon, safety a solid block */
.infobox, .infoline { background: var(--water-soft); color: var(--ink); border-radius: 16px; padding: 12px 14px; margin: 0 0 12px; font-size: 16px; line-height: 22px; display: flex; align-items: center; gap: 12px; }
.infoline { margin-top: 12px; }
.infoline .ic { color: var(--water); }
.warnbox { background: var(--warn-soft); color: var(--warn); border-radius: 16px; padding: 12px 14px; margin: 0 0 12px; font-size: 16px; line-height: 22px; font-weight: 600; }
.warntext { color: var(--warn); }
.advisory { background: var(--warn-soft); border-radius: 20px; padding: 16px; display: flex; gap: 14px; margin-bottom: 12px; color: var(--ink); }
.advisory .tile { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--gold); color: #2a1d00; display: flex; align-items: center; justify-content: center; }
.advisory div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.advisory .over { font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--warn); }
.advisory strong { font-size: 18px; line-height: 24px; }
.advisory p { margin: 0; font-size: 16px; line-height: 22px; }
.advisory.severe { background: var(--danger-soft); }
.advisory.severe .tile { background: var(--danger); color: var(--on-danger); }
.advisory.severe .over { color: var(--danger); }
.safety { background: var(--safety); color: #fff; border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.safety .row { align-items: flex-start; gap: 12px; }
.safety .tile { flex: none; width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; }
.safety .grow { display: flex; flex-direction: column; gap: 2px; }
.safety .grow > strong { font-size: 19px; line-height: 24px; }
.safety .grow > span { font-size: 16px; line-height: 22px; }
.safelist { background: rgba(0,0,0,.16); border-radius: 14px; padding: 4px 12px; }
.safelist > div { min-height: 40px; display: flex; align-items: center; gap: 8px; font-size: 15px; line-height: 20px; }
.safelist > div + div { border-top: 1px solid rgba(255,255,255,.14); }
.safelist .grow { flex: 1; min-width: 0; }

/* toast */
#toast { display: flex; align-items: center; gap: 12px; background: #0e1a14; color: #fff; border-radius: 16px; padding: 14px; font-size: 16px; line-height: 22px; width: min(92vw, 420px); max-width: none; bottom: calc(92px + env(safe-area-inset-bottom)); }
#toast[hidden] { display: none; }
#toast.sent { background: #17533a; }
.tk { flex: none; width: 32px; height: 32px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
#toast.sent .tk { background: #fff; color: #17533a; }
#toast.kept .tk { background: #e0b43c; color: #2a1d00; }

/* tiles */
.grid { gap: 10px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.team { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.big, .grid.small .big { min-height: 108px; border-radius: 20px; border: 1px solid var(--line); gap: 10px; font-size: 16px; line-height: 20px; font-weight: 600; padding: 10px 6px; text-align: center; position: relative; background: var(--card); color: var(--ink); }
.ti { width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; flex: none; }
.big .ti { font-size: inherit; }
.ti.small { width: 40px; height: 40px; border-radius: 12px; }
.ti.big { width: 64px; height: 64px; border-radius: 22px; min-height: 0; border: 0; padding: 0; }
.tone-brand { background: var(--brand-soft); color: var(--brand-ink); }
.tone-water { background: var(--water-soft); color: var(--water); }
.tone-danger { background: var(--danger-soft); color: var(--danger); }
.tone-soil { background: var(--soil-soft); color: var(--soil); }
.tone-plain { background: var(--sunken); color: var(--ink); }
.big em { background: var(--danger); color: var(--on-danger); font-size: 13px; font-weight: 700; }
.grid.compact { gap: 8px; }
.grid.compact .big { min-height: 64px; flex-direction: row; justify-content: flex-start; gap: 8px; padding: 0 10px; font-size: 15px; border-radius: 16px; text-align: start; }
.grid.compact .ti { width: 32px; height: 32px; border-radius: 10px; }
.grid.compact .ti .ic { width: 20px; height: 20px; }

/* Today */
.dayhead { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.daychip { height: 34px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; background: var(--card); border: 1px solid var(--line); }
.daychip.sun .ic { color: #d99a16; }
.daychip.good { background: var(--brand-soft); color: var(--brand-ink); border: 0; }
.herobtn { width: 100%; min-height: 104px; border: 0; border-radius: 24px; background: var(--hero); color: #fff; padding: 20px; display: flex; align-items: center; gap: 16px; text-align: start; margin-top: 4px; }
.herobtn .grow { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.big1 { font-size: 26px; line-height: 30px; font-weight: 700; }
.hint { font-size: 15px; line-height: 20px; color: #b9d3c4; }
.gold { flex: none; width: 64px; height: 64px; border-radius: 999px; background: var(--gold); color: #2a1d00; display: flex; align-items: center; justify-content: center; }
.card.list { padding: 0; overflow: hidden; }
.taskrow { width: 100%; min-height: 76px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; background: transparent; border: 0; color: var(--ink); text-align: start; }
.taskrow + .taskrow, .morerow { border-top: 1px solid var(--line); }
.taskrow .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ring { flex: none; width: 26px; height: 26px; border-radius: 999px; border: 2px solid var(--ring-idle); }
.ring.bad { border-color: var(--danger); }
.ring.warn { border-color: var(--ring-today); }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.morerow { width: 100%; min-height: 52px; border-width: 1px 0 0; border-style: solid; border-color: var(--line); background: transparent; color: var(--brand-ink); font-size: 16px; font-weight: 700; }
.water { display: flex; flex-direction: column; gap: 14px; }
.waterrow { display: flex; flex-direction: column; gap: 8px; }
.waterrow .row { align-items: baseline; gap: 8px; }
.waterrow .grow { font-weight: 600; }
.vol { font-size: 22px; line-height: 26px; font-weight: 700; }
.hrs { font-size: 15px; color: var(--muted); min-width: 64px; text-align: end; }
.bar { height: 8px; border-radius: 999px; background: var(--water-soft); overflow: hidden; }
.bar i { display: block; height: 8px; border-radius: 999px; background: var(--water); }
.water .s { margin: 0; }

/* the manager's band */
.herohead { background: var(--hero); color: #fff; margin: -8px calc(50% - 50vw) 0; padding: 4px calc(50vw - 50% + 0px) 20px; display: flex; flex-direction: column; gap: 12px; }
.herohead .date { font-size: 15px; color: #b9d3c4; }
.herohead h1 { margin-top: -10px; }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats3 > div { border-radius: 16px; background: rgba(255,255,255,.08); padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stats3 span { font-size: 13px; line-height: 16px; color: #b9d3c4; font-weight: 500; }
.stats3 b { font-size: 24px; line-height: 32px; font-weight: 700; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.stats3 .u { font-size: 14px; color: #b9d3c4; font-weight: 500; }
.alerts { display: flex; flex-direction: column; gap: 8px; }
.alerts .advisory { margin: 0; }
.alertrow { min-height: 76px; border: 0; border-radius: 18px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; color: var(--ink); text-align: start; background: var(--card); width: 100%; }
.alertrow .tile { flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--danger-soft); color: var(--danger); }
.alertrow .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.alertrow strong { font-size: 17px; line-height: 22px; }
.alertrow .end { color: var(--muted); }
.alertrow.bad { background: var(--danger-soft); }
.alertrow.bad .tile { background: var(--danger); color: var(--on-danger); }
.alertrow.warn { background: var(--warn-soft); }
.alertrow.warn .tile { background: var(--gold); color: #2a1d00; }
.headrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 22px 0 12px; }
.headrow h2 { margin: 0; }
.tonalpill { min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

/* sign in */
.langs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding-top: 8px; }
.langs button { height: 44px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 15px; font-weight: 600; padding: 0 2px; min-width: 0; }
.langs button.on { background: var(--select); border-color: var(--select); color: var(--on-select); }
.signin { display: flex; flex-direction: column; gap: 24px; padding-top: 32px; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.brand p { margin: 0; color: var(--muted); text-align: center; }
.signin-logo img { width: 232px; height: auto; display: block; }
.signin .card { margin: 0; }
.signin .s { margin: 8px 0 0; }
.offnote { display: flex; gap: 12px; align-items: center; padding: 0 4px; }
.offnote p { margin: 0; font-size: 15px; line-height: 20px; color: var(--muted); }
a.helplink.plain { color: var(--brand-ink); font-weight: 600; margin: 0; min-height: 48px; }

/* the harvest form */
.form { display: flex; flex-direction: column; gap: 20px; padding-bottom: 8px; }
.form label { margin: 0 0 8px; }
.form .two { gap: 10px; }
.form fieldset select + label, .zonechips + label, .form fieldset select[hidden] + label { margin-top: 12px; display: block; }
.zonechips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.zonechip { min-height: 72px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); padding: 10px 14px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; text-align: start; min-width: 0; }
.zonechip[aria-pressed="true"] { border: 2px solid var(--select); }
.zonechip bdi { font-size: 17px; font-weight: 700; }
.zstate { font-size: 14px; line-height: 18px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.zstate i { flex: none; width: 8px; height: 8px; border-radius: 999px; background: currentColor; }
.zstate.bad { color: var(--danger); }
.zstate.ok { color: var(--brand-ink); }
.stepper { height: 120px; border-radius: 18px; background: var(--card); border: 1.5px solid var(--control); display: flex; flex-direction: column; overflow: hidden; }
.stepper.err { border: 2px solid var(--danger); }
.stepval { flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 6px; padding-top: 10px; min-height: 0; }
.stepval input { width: 96px; min-height: 0; height: 44px; border: 0; background: transparent; text-align: center; font-size: 34px; line-height: 40px; font-weight: 700; padding: 0; box-shadow: none; border-radius: 0; }
.stepval input:focus { border: 0; box-shadow: none; }
.stepval span { font-size: 16px; color: var(--muted); font-weight: 600; }
.stepbtns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stepbtns button { height: 48px; border: 0; background: var(--sunken); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.stepbtns button + button { border-left: 1px solid var(--line); }
.fielderr { margin: -8px 0 0; color: var(--danger); font-size: 15px; line-height: 20px; font-weight: 600; display: flex; gap: 6px; align-items: center; }
.fielderr[hidden] { display: none; }
.segbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; padding: 4px; border-radius: 16px; background: var(--sunken); }
.segbar button { min-height: 48px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font-weight: 600; }
.segbar button[aria-pressed="true"] { background: var(--select); color: var(--on-select); font-weight: 700; }
.extras { padding: 0; overflow: hidden; margin: 0; }
.lotrow { min-height: 60px; padding: 0 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.lotrow label { margin: 0; flex: none; font-weight: 400; color: var(--muted); }
.lotrow input { flex: 1; min-width: 0; min-height: 44px; border: 0; padding: 0 4px; background: transparent; font-size: 16px; font-weight: 700; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; text-align: end; border-radius: 8px; }
.extrabtns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.extrabtns > * { min-height: 64px; margin: 0; border: 0; border-inline-end: 1px solid var(--line); background: transparent; color: var(--brand-ink); font-size: 15px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
.extrabtns > *:last-child { border-inline-end: 0; }
.extras .photos { padding: 0 12px; margin: 0; }
.extras .photos:not(:empty) { padding: 12px; border-top: 1px solid var(--line); }
.extras textarea { display: block; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.extras textarea[hidden] { display: none; }
.savebar { position: sticky; bottom: 0; margin: 8px -16px -40px; background: var(--card); border-top: 1px solid var(--line); padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; z-index: 4; }
.savebar .btn { margin: 0; }
.savebar p { margin: 0; text-align: center; font-size: 14px; line-height: 18px; color: var(--muted); }

/* the tablet gets the phone layout with more room, not a stretched one */
@media (min-width: 720px) {
  main { max-width: 720px; }
  .grid.three, .grid.team { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* a satellite alert: a tinted card, a reason to go and look */
.satalert { background: var(--warn-soft); border-radius: 20px; padding: 16px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
.satalert .tile { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--gold); color: #2a1d00; display: flex; align-items: center; justify-content: center; }
.satalert .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.satalert .over { font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--warn); }
.satalert strong { font-size: 18px; line-height: 24px; }
.satalert ul { margin: 0; padding-inline-start: 20px; font-size: 16px; line-height: 22px; }
.satalert .s { margin: 0; color: var(--ink); opacity: .8; }
.nw { white-space: nowrap; }
.satalert .btn { margin: 0; min-height: 56px; font-size: 16px; }

/* crop health: the zones on a still map, the months, a line per zone */
.healthview { display: flex; flex-direction: column; gap: 10px; }
.healthview .seg { flex-wrap: nowrap; }
.healthview .seg button { flex: 1; min-height: 44px; font-weight: 700; }
.healthmap { height: 220px; border-radius: 14px; overflow: hidden; background: var(--sunken); }
.healthview input[type=range] { width: 100%; height: 44px; margin: -6px 0; accent-color: var(--brand); }
.healthramp { display: flex; height: 12px; border-radius: 6px; overflow: hidden; }
.healthramp span { flex: 1; }
.healthends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: -6px; }
.healthrow { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 16px; }
.healthrow .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.healthrow .grow { flex: 1; min-width: 0; }
.healthrow .num { font-weight: 700; }

/* the animals' pens on the live map: a quiet label with each group's head count */
.leaflet-tooltip.pentag { background: rgba(255,255,255,.88); border: 0; box-shadow: none; color: #2a2e25; font-weight: 600; font-size: 12px; padding: 1px 7px; border-radius: 999px; }
.leaflet-tooltip.pentag::before { display: none; }
