/* AgriVerse design system. Material-3-expressive in spirit, built on the brand palette.
   Tokens -> base -> primitives -> app shell -> workspace -> public pages -> print. */

@font-face { font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/outfit-latin-wght-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: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/outfit-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/static/fonts/figtree-latin-wght-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: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/static/fonts/figtree-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --night: #071C18; --night-2: #0D2E25; --forest: #005530; --forest-d: #003D22;
  --leaf: #42B425; --lime: #8ED414; --sky: #6BCBF0; --sun: #FFC64B;
  --bg: #F3F7EF; --surface: #fff; --surface-2: #EBF2E6; --surface-3: #DDE8D6;
  --ink: #0F1C16; --ink-2: #37463D; --muted: #55645B; --line: #DAE3D4; --outline: #8D9E92;
  --green-c: #D6F2C2; --on-green: #0A3A17; --sky-c: #CFEEFB; --on-sky: #073D55;
  --sun-c: #FFEBB8; --on-sun: #5B3E00; --red: #D93025; --red-c: #FFDAD4; --on-red: #8A1C14;
  --blue: #1A73E8; --focus: #0B57D0;
  --display: "Outfit", "Segoe UI", system-ui, sans-serif; --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --r-sm: 12px; --r-md: 20px; --r-lg: 28px; --r-xl: 40px;
  --e1: 0 1px 2px rgba(7,28,24,.06), 0 2px 10px rgba(7,28,24,.05);
  --e2: 0 4px 18px rgba(7,28,24,.1); --e3: 0 18px 50px rgba(7,28,24,.2);
  --ease: cubic-bezier(.2, 0, 0, 1);
  font-family: var(--body); color: var(--ink); background: var(--bg);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); }
h1 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 700; line-height: 1.04; letter-spacing: -.03em; margin-bottom: 14px; }
h2 { font-size: 24px; font-weight: 650; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 10px; }
h3 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
a { color: var(--forest); text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sidebar :focus-visible, .on-dark :focus-visible, .login-story :focus-visible { outline-color: #9ADCF5; }
small { display: block; font-size: 12px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
em { font-style: normal; }
dl { margin: 0; }
.muted { color: var(--muted); font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: -100px; left: 12px; z-index: 200; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; }
.skip:focus { top: 12px; }
.wrap { width: min(1280px, 100%); padding: 0 clamp(20px, 4vw, 40px); margin: 0 auto; }
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 20px; height: 20px; }
.icon.lg { width: 32px; height: 32px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--forest); font: 700 12px/1.2 var(--body); letter-spacing: .14em; }
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--leaf); }

/* ---------- Buttons, chips ---------- */
.button { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--forest); color: #fff;
  font: 600 15px/1.1 var(--body); letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.button::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: currentColor; opacity: 0; transition: opacity .2s; }
.button:hover:not(:disabled) { box-shadow: var(--e2); }
.button:hover:not(:disabled)::before { opacity: .1; }
.button:active:not(:disabled) { transform: scale(.96); }
.button:active:not(:disabled)::before { opacity: .16; }
.button.secondary { min-height: 44px; padding: 0 20px; background: var(--green-c); color: var(--on-green); font-size: 14px; }
.button.clay, .button.lime { background: var(--lime); color: var(--night); }
.button.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }
.button.night { background: var(--night); color: #fff; }
.button.danger { background: var(--red); }
.button.large { min-height: 60px; padding: 0 34px; font-size: 17px; }
.button .icon { width: 20px; height: 20px; transition: transform .25s var(--ease); }
.button:hover .icon-arrow { transform: translateX(4px); }
.plain { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--forest); font-weight: 600; text-decoration: none; transition: background .2s; }
.plain:hover { background: rgba(66,180,37,.14); }
.icon-button { position: relative; display: grid; place-items: center; flex: none; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--ink); box-shadow: var(--e1); transition: transform .2s var(--ease), box-shadow .2s; }
.icon-button:hover { box-shadow: var(--e2); }
.icon-button:active { transform: scale(.94); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 9px; background: var(--green-c); color: var(--on-green); font: 700 12px/1 var(--body); letter-spacing: .03em; white-space: nowrap; }
.badge.sun, .badge.demo { background: var(--sun-c); color: var(--on-sun); }
.badge.sky { background: var(--sky-c); color: var(--on-sky); }
.badge.red { background: var(--red-c); color: var(--on-red); }
.badge.neutral { background: var(--surface-3); color: var(--ink-2); }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font-size: 13px; font-weight: 600; backdrop-filter: blur(8px); }
.pill.light { border-color: var(--line); background: #fff; color: var(--ink-2); box-shadow: var(--e1); }
.text-link { color: inherit; font-weight: 600; text-decoration: none; border-bottom: 2px solid currentColor; }

/* ---------- Forms ---------- */
form { display: grid; gap: 18px; }
label { display: grid; gap: 8px; font-size: 14px; font-weight: 600; }
.field { display: grid; gap: 8px; }
input, select, textarea { width: 100%; min-height: 52px; padding: 14px 16px; border: 1.5px solid var(--outline); border-radius: 16px; background: #fff; color: var(--ink); font: 500 15px/1.4 var(--body); transition: border-color .2s, box-shadow .2s; }
input:hover, select:hover, textarea:hover { border-color: #5E7266; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--forest); box-shadow: 0 0 0 4px rgba(0,85,48,.18); }
input::placeholder, textarea::placeholder { color: #6F7E74; font-weight: 400; }
input:disabled { background: var(--surface-2); color: var(--muted); }
textarea { resize: vertical; }
select { appearance: none; padding-right: 46px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2337463D' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 16px center / 18px no-repeat; }
input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 7px; accent-color: var(--forest); }
.checkbox { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-weight: 500; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.search { position: relative; display: flex; align-items: center; width: min(460px, 100%); }
.search .icon { position: absolute; left: 18px; z-index: 1; color: var(--muted); pointer-events: none; }
.search input { padding-left: 52px; border-color: transparent; border-radius: 999px; box-shadow: var(--e1); }
.search input:hover { border-color: var(--outline); }
.password-row { position: relative; }
.password-row input { padding-right: 84px; }
.password-row button { position: absolute; right: 8px; top: 8px; min-height: 36px; }
.fieldset-reset { border: 0; padding: 0; margin: 0; }

/* ---------- Surfaces ---------- */
.card { padding: 28px; border: 1px solid rgba(7,28,24,.06); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--e1); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.card-head h2, .card-head p { margin-bottom: 2px; }
.card-head a { font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.card-head a:hover { text-decoration: underline; }
.notice, .error { position: relative; margin: 0 0 20px; padding: 14px 18px 14px 54px; border-radius: 20px; font-size: 14px; overflow-wrap: anywhere; }
.notice::before, .error::before { content: ""; position: absolute; left: 18px; top: 14px; width: 24px; height: 24px; background: center / contain no-repeat; }
.notice { background: var(--sun-c); color: var(--on-sun); }
.notice::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B3E00' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8v.4'/%3E%3C/svg%3E"); }
.error { background: var(--red-c); color: var(--on-red); }
.error::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A1C14' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4l9 16H3z'/%3E%3Cpath d='M12 10v4M12 17v.4'/%3E%3C/svg%3E"); }
.message-box { padding: 18px 20px; border-radius: 20px; background: var(--surface-2); color: var(--ink); font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { padding: 36px 12px; text-align: center; color: var(--muted); }
.card dl { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 10px 22px; }
.card dt { color: var(--muted); font-weight: 600; }
.card dd { margin: 0; }
.big { margin-bottom: 14px; font: 800 clamp(48px, 6vw, 72px)/1 var(--display); letter-spacing: -.03em; color: var(--forest); }
.reading-time { margin: 0; color: var(--muted); font-size: 12px; }
.stack { display: grid; gap: 20px; min-width: 0; }
.section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 20px 0; align-items: start; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.settings-card { max-width: 620px; }
.hint { font-weight: 600; text-decoration: none; }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100dvh; background: var(--bg); }
.sidebar { position: sticky; top: 12px; display: flex; flex-direction: column; flex: none; width: 284px; height: calc(100dvh - 24px); margin: 12px 0 12px 12px; padding: 24px 14px 14px; overflow-y: auto; border-radius: 32px; background: linear-gradient(170deg, var(--night-2), var(--night) 55%); color: #fff; scrollbar-width: none; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-symbol { width: 54px; height: auto; flex: none; filter: drop-shadow(0 4px 10px rgba(0,0,0,.3)); }
.brand-word { width: 126px; height: auto; }
.brand-logo { display: block; height: 44px; width: auto; }
.sidebar .brand { padding: 0 8px; }
.workspace-label { display: flex; align-items: center; gap: 10px; margin: 26px 8px 20px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; background: rgba(255,255,255,.06); color: #D4E4D8; font-size: 13px; font-weight: 600; }
.live-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--lime); }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--lime); opacity: 0; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 18px; border-radius: 999px; color: #C3D5C8; text-decoration: none; font-size: 15px; font-weight: 600; transition: background-color .2s, color .2s; }
.sidebar nav a:hover { background: rgba(255,255,255,.09); color: #fff; }
.sidebar nav a.active { background: var(--lime); color: var(--night); }
.sidebar nav .count { margin-left: auto; min-width: 26px; padding: 3px 9px; border-radius: 999px; background: var(--sun); color: var(--night); font-size: 12px; font-weight: 800; text-align: center; }
.sidebar nav a.active .count { background: var(--night); color: #fff; }
.sidebar-bottom { margin-top: auto; padding-top: 22px; }
.tip { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 24px; background: rgba(255,255,255,.06); color: #D4E4D8; font-size: 13px; }
.tip .icon { color: var(--sun); grid-row: span 2; margin-top: 2px; }
.tip p { margin: 0; color: #B8CCBD; }
.local-link { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 16px; border-radius: 999px; color: #C3D5C8; font-size: 14px; font-weight: 600; text-decoration: none; }
.local-link:hover { background: rgba(255,255,255,.09); color: #fff; }
.user { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 8px 4px 8px; border-top: 1px solid rgba(255,255,255,.1); font-size: 14px; }
.user b { display: block; line-height: 1.2; }
.user small { margin-top: 2px; color: #9DB3A3; }
.avatar { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(140deg, var(--lime), var(--leaf)); color: var(--night); font: 800 18px var(--display); }
.logout { width: 100%; margin-top: 6px; justify-content: flex-start; min-height: 44px; padding: 0 16px; color: #E9C9C2; }
.logout:hover { background: rgba(217,48,37,.2); color: #fff; }
.workspace-main { flex: 1; min-width: 0; max-width: 1500px; margin: 0 auto; padding: 16px clamp(16px, 2.4vw, 36px) 56px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.search-anchor { flex: 1; max-width: 520px; }
.search-anchor .search { width: 100%; }
.demo-date { margin-left: auto; padding: 10px 16px; border-radius: 999px; background: #fff; box-shadow: var(--e1); font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.pop-anchor { position: relative; }
#unread-count { position: absolute; top: -3px; right: -3px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--red); box-shadow: 0 0 0 3px var(--bg); color: #fff; font: 700 12px/22px var(--body); text-align: center; }
#unread-count:empty { display: none; }
.popover { position: absolute; top: calc(100% + 10px); left: 0; z-index: 60; width: min(420px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; padding: 10px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--e3); }
.popover.right { left: auto; right: 0; }
.popover a { display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px; color: var(--ink); font-size: 14px; text-decoration: none; }
.popover a:hover, .popover a[aria-selected="true"] { background: var(--surface-2); }
.popover h4 { margin: 12px 14px 4px; color: var(--muted); font: 700 11px var(--body); letter-spacing: .1em; text-transform: uppercase; }
.popover small { color: var(--muted); }
.popover p { padding: 12px 14px; margin: 0; color: var(--muted); }
.popover .unread { background: var(--green-c); box-shadow: inset 4px 0 0 var(--leaf); }
.popover footer { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 0 14px; margin-top: 6px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.mobile-bar, .bottom-nav, .scrim { display: none; }

/* ---------- Workspace pages ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 8px 0 28px; }
.page-head > div { min-width: 0; }
.page-head p { max-width: 62ch; margin-bottom: 6px; color: var(--ink-2); font-size: 16px; }
.page-head a { font-weight: 600; text-decoration: none; }
.page-head a:hover { text-decoration: underline; }
.page-head > a.button, .page-head > .button { flex: none; text-decoration: none; }
.dashboard-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 32px; overflow: hidden; padding: clamp(24px, 4vw, 48px); border-radius: var(--r-xl); color: #fff; box-shadow: var(--e2);
  background: radial-gradient(90% 120% at 100% -10%, #13763F 0, transparent 55%), radial-gradient(70% 90% at -10% 120%, rgba(66,180,37,.36), transparent 60%), var(--night); }
.dashboard-hero::before, .dashboard-hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; transform: rotate(-22deg); pointer-events: none; }
.dashboard-hero::before { right: -180px; top: -90px; width: 780px; height: 320px; border: 2px solid rgba(142,212,20,.3); }
.dashboard-hero::after { right: -80px; top: 10px; width: 540px; height: 210px; border: 1.5px dashed rgba(107,203,240,.34); }
.dashboard-hero h1 { max-width: 12ch; margin-bottom: 18px; color: #fff; font-size: clamp(38px, 5vw, 72px); font-weight: 800; line-height: 1; letter-spacing: -.035em; }
.dashboard-hero h1 em { color: var(--lime); }
.dashboard-hero .eyebrow { color: var(--lime); }
.dashboard-hero .eyebrow::before { background: var(--lime); }
.dashboard-hero p { color: rgba(255,255,255,.84); font-size: 17px; }
.dashboard-hero p strong { color: #fff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.conditions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.rain-strip { padding: 22px 22px 8px; border-radius: var(--r-lg); background: #fff; color: var(--ink); box-shadow: var(--e3); }
.rain-strip .card-head { margin-bottom: 4px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.kpi { position: relative; display: flex; flex-direction: column; min-height: 168px; padding: 22px 24px; border-radius: var(--r-lg); background: var(--green-c); color: var(--on-green); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.kpi:nth-child(4n+2) { background: var(--sun-c); color: var(--on-sun); }
.kpi:nth-child(4n+3) { background: var(--sky-c); color: var(--on-sky); }
.kpi:nth-child(4n+4) { background: var(--surface-3); color: var(--ink); }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--e2); }
.kpi > span { position: relative; z-index: 1; max-width: calc(100% - 52px); font-size: 14px; font-weight: 700; }
.kpi b { position: relative; z-index: 1; margin: auto 0 4px; padding-top: 14px; font: 800 clamp(44px, 4.6vw, 64px)/.95 var(--display); letter-spacing: -.035em; }
.kpi b .unit { margin-left: .22em; font: 700 .3em/1 var(--body); letter-spacing: 0; }
.kpi small { position: relative; z-index: 1; font-size: 13px; font-weight: 500; opacity: .86; }
.kpi .kpi-icon { position: absolute; top: 18px; right: 18px; width: 42px; height: 42px; padding: 9px; border-radius: 50%; background: rgba(255,255,255,.62); }
.plot-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding: 18px 12px; margin: 0 -12px; border-radius: 20px; color: inherit; text-decoration: none; transition: background-color .2s;
  background-image: linear-gradient(var(--line), var(--line)); background-position: 12px 0; background-size: calc(100% - 24px) 1px; background-repeat: no-repeat; }
.plot-row:first-of-type { background-image: none; }
a.plot-row:hover, .plot-row.selected { background-color: var(--surface-2); }
.plot-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.plot-heading b, .plot-heading a { font-size: 16px; }
.plot-heading small { color: var(--muted); }
.plot-heading button { padding: 0; text-align: left; }
.plot-row p { margin: 6px 0 12px; color: var(--ink-2); font-size: 14px; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.row-actions a { font-size: 14px; font-weight: 600; }
.score { display: grid; place-items: center; flex: none; width: 52px; height: 52px; margin-top: 2px; border: 3.5px solid var(--red); border-radius: 50%; background: var(--red-c); color: var(--on-red); font: 700 18px var(--display); }
.score.watch { border-color: #F2A900; background: var(--sun-c); color: var(--on-sun); }
.score.ok, .score.low { border-color: var(--leaf); background: var(--green-c); color: var(--on-green); }
.score.sm { width: 40px; height: 40px; border-width: 3px; font-size: 14px; margin: 0; }
.risk-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.risk-item:first-of-type { border-top: 0; }
.risk-item b { margin-left: auto; font: 700 18px var(--display); }
.risk-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--leaf); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.filter-form { padding: 12px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--e1); margin-bottom: 20px; }
.toolbar select { width: auto; max-width: 100%; min-width: 120px; min-height: 44px; padding: 0 40px 0 16px; border-color: var(--line); border-radius: 999px; background-color: var(--surface-2); font-size: 14px; font-weight: 600; background-position: right 14px center; }
.toolbar .search { flex: 1 1 260px; width: auto; }
.toolbar .search input { min-height: 44px; background: var(--surface-2); box-shadow: none; }
.pager { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.pager span { margin-right: auto; font-weight: 600; }
.tabs { display: flex; gap: 4px; width: fit-content; max-width: 100%; margin: 0 0 24px; padding: 6px; overflow-x: auto; border-radius: 999px; background: #fff; box-shadow: var(--e1); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { display: inline-flex; align-items: center; flex: none; min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 600 14px var(--body); text-decoration: none; transition: background-color .2s, color .2s; }
.tabs a:hover, .tabs button:hover { background: var(--surface-2); }
.tabs [aria-selected="true"], .tabs [aria-current="page"] { background: var(--forest); color: #fff; }
[role="tabpanel"] { outline: none; }
[role="tabpanel"] > .card, [role="tabpanel"] > .notice, [role="tabpanel"] > .error { margin-bottom: 20px; }
.plot-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; margin-bottom: 24px; padding: clamp(22px, 3vw, 36px); border: 0; background: linear-gradient(135deg, #fff 55%, var(--green-c)); }
.plot-head h1 { margin-bottom: 6px; }
.plot-head > div:last-child { display: grid; justify-items: center; gap: 10px; text-align: center; min-width: 150px; }
.plot-head .score { width: 76px; height: 76px; font-size: 28px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; font-weight: 600; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

/* Tables */
.table-wrap:focus-visible { outline-offset: -3px; border-radius: var(--r-lg); }
.table-wrap { overflow-x: auto; }
.card.table-wrap { padding: 20px 22px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; text-align: left; }
th { padding: 14px; border-bottom: 1.5px solid var(--line); color: var(--muted); font: 700 11px var(--body); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
td { padding: 16px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .15s; }
tbody tr:hover { background: var(--surface-2); }
tr[data-href] { cursor: pointer; }
td small { margin-top: 2px; color: var(--muted); }
td a { font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }
td .plain { font-size: 14px; }
td .delete, .delete, .battery-low { color: var(--on-red); }
.plot-table th:first-child, .plot-table td:first-child { width: 72px; }
.phone-plots { display: none; }
.mbars { display: grid; gap: 4px; width: 96px; }
.mbars meter { height: 6px; }

/* Meters, progress */
meter, progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 10px; border: 0; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
meter::-webkit-meter-bar { height: 100%; border: 0; border-radius: 99px; background: var(--surface-3); }
meter::-webkit-meter-optimum-value, meter::-webkit-meter-suboptimum-value, meter::-webkit-meter-even-less-good-value { border-radius: 99px; background: linear-gradient(90deg, var(--leaf), var(--lime)); }
meter::-moz-meter-bar { border-radius: 99px; background: linear-gradient(90deg, var(--leaf), var(--lime)); }
.hbar { display: grid; grid-template-columns: minmax(110px, 1.1fr) minmax(60px, 1fr) 40px; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.hbar b { text-align: right; font: 700 16px var(--display); }
.hbar .why { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 13px; }
.histogram label { display: grid; grid-template-columns: 70px 1fr 36px; gap: 14px; align-items: center; padding: 8px 0; font-weight: 600; }
.histogram b { text-align: right; font-family: var(--display); }

/* Soil profile */
.soil-ground { height: 26px; background: url("/static/soil/grass.webp") center bottom / 100% 100% no-repeat; }
.soil-layer { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: space-between; height: 96px; padding: 0 18px; overflow: hidden; color: #fff; background-color: #5E3B24; background-position: center; background-size: cover; }
.soil-layer::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7,28,24,.82), rgba(7,28,24,.16)); }
.soil-layer + .soil-layer { background-color: #74482C; }
.soil-layer + .soil-layer + .soil-layer { background-color: #8B5C38; border-radius: 0 0 20px 20px; }
.soil-layer > span { position: relative; font-size: 14px; font-weight: 700; }
.soil-layer small { font-size: 12px; font-weight: 500; opacity: .88; }
.soil-layer b { position: relative; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.95); color: var(--ink); font: 700 14px var(--display); }
.wet-progress { position: absolute; inset: auto 0 0; width: 100%; height: 5px; border: 0; border-radius: 0; background: rgba(255,255,255,.25); }
.wet-progress::-webkit-progress-bar { background: rgba(255,255,255,.25); }
.wet-progress::-webkit-progress-value { background: var(--sky); }
.wet-progress::-moz-progress-bar { background: var(--sky); }
.soil-note { margin: 16px 0 10px; padding: 14px 16px; border-radius: 16px; background: var(--sky-c); color: var(--on-sky); font-size: 14px; }

/* Charts */
.chart svg { display: block; width: 100%; height: 150px; overflow: visible; }
.chart.large svg { height: 240px; }
.chart-box svg { height: 210px; }
.rain-strip .chart-box svg { height: 170px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; color: var(--muted); font-size: 13px; font-weight: 500; }
.chart-legend span { display: inline-flex; align-items: center; gap: 8px; }
.chart-legend span::before { content: ""; width: 14px; height: 4px; border-radius: 4px; background: var(--legend, var(--blue)); }
.chart .grid-line { stroke: var(--line); }
.chart .ref-line { stroke: #E37400; stroke-dasharray: 5 5; }
.chart .axis-label { fill: var(--muted); font: 500 11px var(--body); }
.chart .peak-label { fill: var(--ink); font: 700 12px var(--display); }

/* Lists */
.steps { padding: 0; margin: 0; list-style: none; counter-reset: step; }
.steps li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; }
.steps li:first-child { border-top: 0; }
.steps li::before { counter-increment: step; content: counter(step); display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 12px; background: var(--lime); color: var(--night); font: 800 14px var(--display); }
.timeline { padding: 0 0 0 22px; margin: 18px 0; list-style: none; border-left: 3px solid var(--green-c); }
.timeline li { position: relative; padding: 0 0 20px 14px; }
.timeline li::before { content: ""; position: absolute; left: -33px; top: 6px; width: 14px; height: 14px; border: 3px solid var(--leaf); border-radius: 50%; background: #fff; }
.timeline b { display: block; font-size: 15px; }
.timeline p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.timeline small { color: var(--muted); font-weight: 600; }
.window { margin-bottom: 18px; padding: 22px 24px; border-radius: var(--r-md); background: var(--red-c); color: var(--on-red); }
.window h2 { margin: 6px 0; color: #B3261E; font: 800 clamp(40px, 5vw, 56px)/1 var(--display); letter-spacing: -.03em; }
.window p { margin: 0 0 4px; }
.advisory-card .card-head { margin-bottom: 12px; }
.advisory-card h2 a { text-decoration: none; }
.advisory-card h2 a:hover { text-decoration: underline; }
.advisory-card h3 { margin-bottom: 10px; }
.advisory-card .message-box { margin-bottom: 16px; }
.plot-picker { max-height: 220px; margin: 0; padding: 6px; overflow-y: auto; border: 1.5px solid var(--outline); border-radius: 16px; }
.plot-picker legend { padding: 0 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.plot-picker .checkbox { padding: 8px 10px; border-radius: 12px; font-size: 14px; }
.plot-picker .checkbox:hover { background: var(--surface-2); }
#batch-fields { display: grid; gap: 16px; }
.detail-row { padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.detail-row dt { color: var(--muted); font-size: 13px; font-weight: 700; }
.detail-row dd { margin: 4px 0 0; white-space: pre-wrap; font-size: 15px; }
.camera-placeholder { display: grid; place-items: center; height: 190px; margin-bottom: 14px; border: 2px dashed var(--outline); border-radius: var(--r-md); background: var(--surface-2); color: var(--muted); text-align: center; }
.map { height: 600px; border-radius: var(--r-lg); overflow: hidden; z-index: 0; }
.map-legend { margin-top: 16px; color: var(--muted); font-size: 13px; font-weight: 600; }
.map-error { margin: 12px 0 0; }
.station-marker { background: var(--forest); border: 2px solid #fff; border-radius: 4px; }
.leaflet-container { font-family: var(--body); }
.leaflet-popup-content-wrapper { border-radius: 18px; }

/* Dialogs, toast */
dialog { width: min(94vw, 560px); max-height: 90dvh; padding: 28px; overflow-y: auto; border: 0; border-radius: var(--r-xl); background: #fff; color: var(--ink); box-shadow: var(--e3); }
dialog::backdrop { background: rgba(7,28,24,.55); backdrop-filter: blur(4px); }
dialog .card-head h2 { font-size: 28px; }
dialog .card-head button { width: 44px; height: 44px; justify-content: center; padding: 0; font-size: 26px; line-height: 1; }
.toast { position: fixed; bottom: 28px; left: 50%; z-index: 120; max-width: min(92vw, 520px); padding: 16px 24px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; box-shadow: var(--e3); transform: translateX(-50%); }

/* ---------- Public pages ---------- */
.landing, .login-page { background: var(--bg); }
.landing .wrap { width: 100%; max-width: none; padding-inline: clamp(20px, 4vw, 64px); }
.landing-nav { position: sticky; top: 12px; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 24px; width: calc(100% - 24px); margin: 12px auto 0; padding: 10px 10px 10px 26px; border: 1px solid rgba(255,255,255,.7); border-radius: 999px; background: rgba(255,255,255,.8); box-shadow: var(--e2); backdrop-filter: blur(18px) saturate(1.5); }
.landing-nav nav { display: flex; align-items: center; gap: 6px; }
.landing-nav nav a:not(.button) { padding: 10px 18px; border-radius: 999px; color: var(--ink-2); font-size: 15px; font-weight: 600; text-decoration: none; transition: background-color .2s; }
.landing-nav nav a:not(.button):hover { background: var(--surface-2); }
.landing-hero { position: relative; padding: clamp(40px, 6vw, 88px) 0 clamp(40px, 5vw, 72px); overflow: clip; }
.landing-hero .wrap:first-child { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: center; gap: clamp(24px, 4vw, 56px); }
.landing-hero .pill { margin-bottom: 26px; }
.landing-hero h1 { margin-bottom: 26px; font-size: clamp(50px, 7.4vw, 104px); font-weight: 800; line-height: .94; letter-spacing: -.04em; }
.gradient-text { background: linear-gradient(100deg, var(--forest), var(--leaf) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 52ch; margin-bottom: 34px; color: var(--ink-2); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; }
.hero-art { position: relative; width: min(660px, 100%); aspect-ratio: 4 / 5; margin-left: auto; }
.hero-art > * { position: absolute; }
.art-lime { right: -4%; top: 0; width: 72%; aspect-ratio: 1; border-radius: 50%; background: var(--lime); }
.art-sun { left: -2%; bottom: 8%; width: 30%; aspect-ratio: 1; border-radius: 50%; background: var(--sun); }
.art-sky { right: 6%; bottom: -3%; width: 22%; aspect-ratio: 1; border-radius: 34% 66% 60% 40%; background: var(--sky); }
.hero-photo { inset: 7% 9% 3% 7%; overflow: hidden; border-radius: 999px 999px 40px 40px; box-shadow: var(--e3); }
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 38% 50%; }
.hero-symbol { left: -9%; top: 3%; width: 46%; height: auto; filter: drop-shadow(0 14px 26px rgba(0,60,30,.3)); }
.float-card { display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border: 1px solid rgba(255,255,255,.8); border-radius: 22px; background: rgba(255,255,255,.88); box-shadow: var(--e3); backdrop-filter: blur(14px); font-size: 13px; line-height: 1.3; }
.float-card b { display: block; font: 700 17px var(--display); }
.float-card small { color: var(--muted); font-size: 12px; }
.float-card .score { width: 46px; height: 46px; margin: 0; font-size: 16px; }
.float-card.a { right: -3%; bottom: 17%; }
.float-card.b { left: -6%; top: 52%; }
.hero-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(28px, 4vw, 48px); }
.hero-strip > span { display: block; padding: 26px 28px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--e1); color: var(--ink-2); font-size: 15px; }
.hero-strip b { display: block; margin-bottom: 6px; color: var(--forest); font: 800 clamp(36px, 4vw, 52px)/1 var(--display); letter-spacing: -.03em; }
.section { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(48px, 6vw, 88px); }
.section-title { max-width: 16ch; margin-bottom: 36px; font-size: clamp(38px, 5.6vw, 76px); font-weight: 800; line-height: 1; letter-spacing: -.035em; }
.feature-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.feature { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; min-height: 360px; padding: clamp(24px, 3vw, 40px); border-radius: var(--r-xl); }
.feature.f1 { grid-column: span 7; background: var(--green-c); color: var(--on-green); }
.feature.f2 { grid-column: span 5; background: var(--sky-c); color: var(--on-sky); }
.feature.f3 { grid-column: span 12; flex-direction: row; align-items: center; min-height: 0; background: var(--sun-c); color: var(--on-sun); }
.feature h3 { margin-bottom: 10px; font: 750 clamp(26px, 2.6vw, 36px)/1.08 var(--display); letter-spacing: -.03em; color: inherit; }
.feature p { max-width: 46ch; margin: 0; font-size: 16px; }
.step { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px; font: 700 12px var(--body); letter-spacing: .14em; }
.step::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.mini-profile { display: grid; gap: 10px; }
.mini-profile label { grid-template-columns: 88px 1fr 44px; align-items: center; font-weight: 700; font-size: 14px; }
.mini-profile meter { height: 16px; background: rgba(255,255,255,.6); }
.mini-profile output { font: 800 18px var(--display); }
.rain-art { width: 100%; height: auto; }
.bubble { max-width: 440px; padding: 18px 22px; border-radius: 26px 26px 26px 6px; background: #fff; color: var(--ink); font-size: 16px; box-shadow: var(--e1); }
.bubble.me { margin-left: auto; border-radius: 26px 26px 6px 26px; background: var(--forest); color: #fff; }
.bubbles { display: grid; flex: 1; gap: 12px; }
.pilot-section { width: calc(100% - 24px); margin: 24px auto; padding: clamp(32px, 6vw, 88px); border-radius: var(--r-xl); background: radial-gradient(70% 80% at 100% 0, #12713F 0, transparent 60%), var(--night); color: #fff; }
.pilot-section .eyebrow { color: var(--lime); }
.pilot-section .eyebrow::before { background: var(--lime); }
.pilot-section h2 { margin-bottom: 0; color: #fff; font-size: clamp(36px, 5vw, 68px); font-weight: 800; line-height: 1; letter-spacing: -.035em; }
.pilot-section h2 em { display: block; color: var(--lime); }
.pilot-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(28px, 5vw, 72px); }
.pilot-grid p { color: rgba(255,255,255,.82); font-size: 17px; }
.checklist { display: grid; gap: 14px; padding: 0; margin: 0 0 30px; list-style: none; }
.checklist li { display: flex; align-items: flex-start; gap: 14px; color: #fff; font-size: 17px; font-weight: 500; }
.checklist .icon { width: 30px; height: 30px; padding: 5px; border-radius: 50%; background: var(--lime); color: var(--night); }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 28px; width: calc(100% - 24px); margin: 24px auto 0; padding: clamp(28px, 5vw, 64px); border-radius: var(--r-xl); background: var(--lime); color: var(--night); }
.cta-band h2 { max-width: 14ch; margin: 0; color: var(--night); font-size: clamp(34px, 4.6vw, 64px); font-weight: 800; line-height: 1; letter-spacing: -.035em; }
.catalog { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.catalog-card { display: flex; flex-direction: column; gap: 10px; min-height: 220px; padding: 24px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--e1); }
.catalog-card .icon { width: 36px; height: 36px; padding: 8px; border-radius: 14px; background: var(--green-c); color: var(--forest); }
.catalog-card h3 { margin: 0; font: 750 22px/1.15 var(--display); letter-spacing: -.02em; }
.catalog-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.mod-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.mod { display: flex; flex-direction: column; gap: 12px; padding: clamp(22px, 2.4vw, 32px); border-radius: var(--r-xl); }
.mod h3 { margin: 0; font: 800 clamp(26px, 2.4vw, 34px)/1.08 var(--display); letter-spacing: -.03em; }
.mod ul { display: grid; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.mod li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.45; }
.mod li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mod.soil { background: var(--green-c); color: var(--on-green); }
.mod.rover { background: var(--sky-c); color: var(--on-sky); }
.mod.tractor { background: var(--sun-c); color: var(--on-sun); }
.machine-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.machine-split article { padding: clamp(22px, 3vw, 36px); border-radius: var(--r-xl); background: #fff; box-shadow: var(--e1); }
.machine-split h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; font: 800 28px/1.1 var(--display); }
.machine-split .icon { width: 28px; height: 28px; color: var(--forest); }
.machine-split p { margin: 0; color: var(--ink-2); }
.fine { margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.phone-band { display: grid; }
.phone-band > div { padding: clamp(28px, 4vw, 48px); border-radius: var(--r-xl); background: #fff; box-shadow: var(--e1); }
.phone-band h3 { margin: 0 0 10px; font: 800 clamp(32px, 4vw, 52px)/1 var(--display); letter-spacing: -.03em; }
.phone-band p:last-child { max-width: 68ch; margin: 0; color: var(--ink-2); font-size: 17px; }
.cta-band p { max-width: 46ch; margin: 12px 0 0; color: var(--night); font-size: 16px; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 44px; padding-bottom: 44px; }
.footer .brand-logo { height: 36px; }
.footer span { color: var(--muted); font-size: 14px; }

.login-scene { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 100dvh; padding: 12px; gap: 12px; }
.login-story { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; overflow: hidden; padding: clamp(28px, 4vw, 56px); border-radius: var(--r-xl); color: #fff;
  background: linear-gradient(180deg, rgba(7,28,24,.55), rgba(7,28,24,.92) 78%), radial-gradient(80% 60% at 100% 0, rgba(19,118,63,.9), transparent 60%), var(--night); }
.login-story::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("/static/brand/field.webp") center / cover; opacity: .45; }
.login-story::after { content: ""; position: absolute; z-index: -1; right: -200px; top: 40px; width: 780px; height: 300px; border: 2px solid rgba(142,212,20,.34); border-radius: 50%; transform: rotate(-24deg); }
.login-story .brand-word { width: 150px; }
.login-story .brand-symbol { width: 66px; }
.login-story h1 { max-width: 11ch; margin-bottom: 20px; color: #fff; font-size: clamp(44px, 6vw, 92px); font-weight: 800; line-height: .98; letter-spacing: -.035em; }
.login-story h1 em { color: var(--lime); }
.login-story p { max-width: 38ch; color: rgba(255,255,255,.84); font-size: 18px; }
.login-story .eyebrow { color: var(--lime); }
.login-story .eyebrow::before { background: var(--lime); }
.login-story small { color: rgba(255,255,255,.7); font-size: 13px; }
.login-dock { display: grid; align-content: center; justify-items: start; padding: clamp(28px, 5vw, 80px); }
.login-dock > * { width: min(440px, 100%); }
.login-dock h2 { margin-bottom: 8px; font: 800 clamp(34px, 3.6vw, 48px)/1.05 var(--display); letter-spacing: -.03em; }
.login-dock form { margin-top: 26px; }
.login-dock .button { width: 100%; }
#demo-login { margin-top: 20px; }
#demo-login-help { margin: 12px 0 0; }
.login-help { margin: 28px 0 18px; padding: 14px 18px; border-radius: 18px; background: var(--surface-2); color: var(--ink-2); font-size: 14px; }
.back-home { display: inline-flex; align-items: center; gap: 8px; color: var(--forest); font-weight: 600; text-decoration: none; }
.back-home:hover { text-decoration: underline; }
.error-page { display: grid; place-items: center; min-height: 100dvh; padding: 20px; }
.error-card { display: grid; justify-items: center; gap: 6px; max-width: 520px; padding: clamp(32px, 6vw, 56px); border-radius: var(--r-xl); background: #fff; box-shadow: var(--e2); text-align: center; }
.error-card img { width: 120px; height: auto; margin-bottom: 10px; }
.error-card .code { font: 800 clamp(64px, 14vw, 112px)/1 var(--display); letter-spacing: -.04em; color: var(--forest); }
.error-card p { margin-bottom: 20px; color: var(--ink-2); }

/* ---------- Reports ---------- */
.report { width: 210mm; max-width: 100%; margin: 0 auto; padding: 18mm 16mm; border-radius: 6px; background: #fff; box-shadow: var(--e2); color: var(--ink); font-size: 10.5pt; line-height: 1.45; }
.report .report-brand { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 3px solid var(--lime); }
.report .report-brand img { height: 42px; width: auto; }
.report .report-brand span { color: var(--muted); font-size: 9pt; font-weight: 600; }
.report h1 { margin-top: 20px; font-size: 26pt; }
.report h2 { margin-top: 24px; font: 700 13pt var(--display); }
.report .period { color: var(--muted); }
.report .table-wrap { padding: 0; }
.report th, .report td { padding: 6px; font-size: 9pt; white-space: normal; overflow-wrap: anywhere; }
.report .foot { margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9pt; }
.report-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 20px; }
.report-toolbar form { margin: 0; }
.report-toolbar select { max-width: 290px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .sidebar { width: 236px; }
  .brand-word { width: 108px; }
  .brand-symbol { width: 46px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1020px) {
  .section-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-hero { grid-template-columns: minmax(0, 1fr); }
  .dashboard-hero h1 { max-width: 16ch; }
}
@media (max-width: 900px) {
  .app { display: block; }
  .scrim { position: fixed; inset: 0; z-index: 70; display: block; background: rgba(7,28,24,.55); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
  body.menu-open .scrim { opacity: 1; pointer-events: auto; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 80; width: min(88vw, 340px); height: 100dvh; margin: 0; border-radius: 0 32px 32px 0; visibility: hidden; transform: translateX(-104%); transition: transform .35s var(--ease), visibility 0s .35s; }
  body.menu-open .sidebar { visibility: visible; transform: none; transition: transform .35s var(--ease), visibility 0s; }
  .mobile-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); background: rgba(243,247,239,.92); backdrop-filter: blur(16px); }
  .mobile-bar .brand-logo { height: 38px; }
  .bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: #fff; box-shadow: 0 -4px 24px rgba(7,28,24,.12); }
  .bottom-nav a, .bottom-nav button { display: grid; justify-items: center; gap: 4px; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink-2); font: 600 12px var(--body); text-decoration: none; }
  .bottom-nav .icon { box-sizing: content-box; width: 24px; height: 24px; padding: 4px 20px; border-radius: 999px; transition: background-color .25s var(--ease); }
  .bottom-nav [aria-current="page"] { color: var(--on-green); font-weight: 800; }
  .bottom-nav [aria-current="page"] .icon { background: var(--lime); color: var(--night); }
  .workspace-main { padding: 16px 14px 120px; }
  .demo-date { display: none; }
  .topbar { margin-bottom: 16px; }
  .search-anchor { max-width: none; }
  .toast { bottom: 96px; }
  .map { height: 460px; }
  .plot-table { display: none; }
  .phone-plots { display: block; }
  .plot-head { grid-template-columns: minmax(0, 1fr); }
  .plot-head > div:last-child { justify-items: start; text-align: left; }
}
@media (max-width: 1100px) {
  .catalog { grid-template-columns: 1fr 1fr; }
  .mod-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .landing-hero .wrap:first-child, .pilot-grid, .catalog, .mod-grid, .machine-split { grid-template-columns: minmax(0, 1fr); }
  .hero-art { margin: 8px auto 0; width: min(400px, 92%); }
  .feature.f1, .feature.f2 { grid-column: span 12; min-height: 0; }
  .feature.f3 { flex-direction: column; align-items: stretch; }
  .hero-strip { grid-template-columns: minmax(0, 1fr); }
  .login-scene { grid-template-columns: minmax(0, 1fr); }
  .login-story { gap: 28px; padding: 24px; }
  .login-story h1 { font-size: clamp(40px, 11vw, 60px); }
  .login-story p { font-size: 16px; }
  .login-dock { padding: 28px 10px 24px; justify-items: center; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .landing-nav { padding: 8px 8px 8px 18px; }
  .landing-nav nav a:not(.button) { display: none; }
  .landing-nav .brand-logo { height: 36px; }
  .footer { flex-direction: column; align-items: flex-start; }
  .kpis { gap: 10px; }
  .kpi { min-height: 150px; padding: 18px; }
  .kpi > span { max-width: calc(100% - 44px); font-size: 13px; }
  .kpi .kpi-icon { top: 14px; right: 14px; width: 36px; height: 36px; padding: 8px; }
  .card { padding: 20px; border-radius: 24px; }
  .card.table-wrap { padding: 14px; }
  .page-head { flex-wrap: wrap; align-items: flex-start; margin-bottom: 20px; }
  .page-head p { font-size: 15px; }
  .dashboard-hero { padding: 24px 20px; border-radius: 32px; }
  .dashboard-hero p { font-size: 16px; }
  .rain-strip { padding: 16px 14px 4px; border-radius: 24px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .filter-form select { flex: 1 1 140px; }
  .hbar { grid-template-columns: minmax(90px, 1fr) minmax(50px, 1fr) 34px; gap: 10px; }
  .feature { border-radius: 32px; }
  .pilot-section, .cta-band { border-radius: 32px; }
  .float-card.b { left: -2%; }
  .float-card.a { right: 0; }
  dialog { width: 100%; max-width: 100%; margin: auto 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 32px 32px 0 0; }
  .map { height: 420px; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  @keyframes float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }
  @keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
  @keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
  @keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
  .workspace-main > :not(.topbar):not([hidden]) { animation: rise .55s var(--ease) both; }
  .workspace-main > :nth-child(3) { animation-delay: .04s; }
  .workspace-main > :nth-child(4) { animation-delay: .08s; }
  .workspace-main > :nth-child(5) { animation-delay: .12s; }
  .workspace-main > :nth-child(6) { animation-delay: .16s; }
  .workspace-main > :nth-child(n+7) { animation-delay: .2s; }
  .live-dot::after { animation: ping 2s ease-out infinite; }
  .hero-symbol { animation: float 7s ease-in-out infinite; }
  .float-card.a { animation: bob 5s ease-in-out infinite; }
  .float-card.b { animation: bob 6s ease-in-out -2s infinite; }
  .landing-hero .wrap > div:first-child > * { animation: rise .7s var(--ease) both; }
  .landing-hero .wrap > div:first-child > :nth-child(2) { animation-delay: .08s; }
  .landing-hero .wrap > div:first-child > :nth-child(3) { animation-delay: .16s; }
  .landing-hero .wrap > div:first-child > :nth-child(4) { animation-delay: .24s; }
  .hero-art { animation: pop .9s var(--ease) .1s both; }
  dialog[open] { animation: pop .35s var(--ease); }
  .toast:not([hidden]) { animation: pop .3s var(--ease); }
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}

/* ---------- Print ---------- */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; }
  .sidebar, .topbar, .mobile-bar, .bottom-nav, .scrim, .toast, .page-head, .report-toolbar, .skip, dialog, #pilot-error { display: none !important; }
  .app { display: block; }
  .workspace-main { max-width: none; padding: 0; margin: 0; }
  .workspace-main > * { animation: none !important; }
  .report { width: auto; padding: 0; border-radius: 0; box-shadow: none; }
  .report .table-wrap { overflow: visible; }
  .report h2 { break-after: avoid; }
  .report tr { break-inside: avoid; }
}
