/* AgroSenti design system.
   One bold element: the NDVI ramp (rust → pollen → green → pine) used wherever crop condition is shown.
   Everything else stays quiet: pine sidebar, field-grey canvas, white surfaces, leaf-green actions. */

@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque-latin-600-normal.72280bf66ee0.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-grotesque-latin-700-normal.48e4b00b03b4.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Instrument"; src: url("../fonts/instrument-sans-latin-400-normal.c178fc5e2d41.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument"; src: url("../fonts/instrument-sans-latin-500-normal.552cbb998bb6.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument"; src: url("../fonts/instrument-sans-latin-600-normal.36a59be54659.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Mono"; src: url("../fonts/jetbrains-mono-latin-400-normal.caf0dfde4e44.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --pine: #0F3E38; --pine-2: #17524a; --pine-3: #2a6a60;
  --leaf: #3F8A50; --leaf-dark: #2f6e3e; --leaf-tint: #e6f1e8;
  --canvas: #F3F5F1; --surface: #fff; --sunk: #eaeee8; --line: #d9dfd6; --line-strong: #c3ccc0;
  --ink: #16211b; --ink-2: #434e46; --ink-3: #5c675f;
  --pollen: #C99A1C; --pollen-tint: #fbf3dc; --rust: #B5472B; --rust-tint: #f8e7e2; --sky: #3c6e8f; --sky-tint: #e5eef4;
  --ndvi-0: #c2512f; --ndvi-1: #d6a83a; --ndvi-2: #5d9a3c; --ndvi-3: #25683d;
  --ramp: linear-gradient(90deg, var(--ndvi-0), var(--ndvi-1) 40%, var(--ndvi-2) 70%, var(--ndvi-3));
  --display: "Bricolage", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --mono: "Mono", ui-monospace, Menlo, monospace;
  --r-sm: 6px; --r: 10px; --r-lg: 16px;
  --shadow: 0 1px 2px rgba(15, 62, 56, .06), 0 8px 24px -12px rgba(15, 62, 56, .18);
  --side: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 15.5px/1.55 var(--body); font-variant-numeric: tabular-nums; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; max-width: 72ch; }
a { color: var(--leaf-dark); text-underline-offset: 2px; }
a:hover { color: var(--pine); }
:focus-visible { outline: 2.5px solid var(--leaf); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; display: block; }
code, .mono { font-family: var(--mono); font-size: .88em; }
.muted { color: var(--ink-3); }
.small { font-size: .87rem; }
.i { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--pine); color: #d5e3dd; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 12px; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: #fff; text-decoration: none; font: 700 1.2rem/1 var(--display); letter-spacing: -.01em; }
.brand svg { width: 30px; height: 30px; }
.brand:hover { color: #fff; }
.nav-group { font-size: .78rem; color: #8fb3a8; padding: 18px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 8px; color: #d5e3dd; text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--pine-2); color: #fff; }
.nav a[aria-current="page"] { background: #fff; color: var(--pine); }
.nav a[aria-current="page"] .i { color: var(--leaf); }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--pine-2); display: flex; flex-direction: column; gap: 6px; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 10px; color: #fff; text-decoration: none; }
.me:hover { color: #fff; background: var(--pine-2); border-radius: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--leaf); color: #fff; display: grid; place-items: center; font: 600 .8rem var(--body); flex: none; }
.me small { display: block; color: #8fb3a8; font-size: .78rem; }
.side-actions { display: flex; gap: 6px; padding: 0 6px; }
.side-actions form:first-child { flex: 1; }
.side-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; background: transparent; border: 1px solid var(--pine-3); color: #d5e3dd; border-radius: 8px; padding: 7px 10px; font: 500 .84rem var(--body); cursor: pointer; white-space: nowrap; }
.side-btn:hover { background: var(--pine-2); color: #fff; }
.side-btn[aria-pressed="true"] { background: var(--pine-2); border-color: #7cc48f; color: #fff; }
.side-btn[aria-pressed="true"] .i { color: #f3d36b; }
.main { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 64px; display: flex; flex-direction: column; gap: 22px; }
.topbar { display: none; }
@media (max-width: 920px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: min(84vw, 300px); z-index: 50; transform: translateX(-102%); transition: transform .2s ease; }
  #menu-toggle:checked ~ .shell .side { transform: none; box-shadow: 0 0 0 100vmax rgba(10, 30, 25, .35); }
  .topbar { display: flex; position: sticky; top: 0; z-index: 40; align-items: center; justify-content: space-between; background: var(--pine); color: #fff; padding: 10px 16px; }
  .topbar label { cursor: pointer; display: grid; place-items: center; width: 38px; height: 38px; }
  .topbar .brand { padding: 0; }
  .main { padding-top: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .crumbs { display: flex; gap: 6px; align-items: center; color: var(--ink-3); font-size: .9rem; margin-bottom: 6px; }
.page-head .crumbs a { color: var(--ink-3); text-decoration: none; }
.page-head .crumbs a:hover { color: var(--leaf-dark); }
.page-head .sub { color: var(--ink-2); margin-top: 6px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; padding: 9px 16px; font: 600 .93rem var(--body); cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap; }
.btn-primary { background: var(--leaf-dark); color: #fff; }
.btn-primary:hover { background: var(--pine); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--leaf); color: var(--leaf-dark); }
.btn-danger { background: var(--surface); border-color: #e2b6aa; color: var(--rust); }
.btn-danger:hover { background: var(--rust-tint); }
.btn-sm { padding: 6px 11px; font-size: .85rem; border-radius: 8px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--leaf-dark); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- surfaces ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-flush { padding: 0; overflow: hidden; }
.panel-flush > .panel-head { padding: 18px 20px 0; }
.empty { border: 1.5px dashed var(--line-strong); border-radius: var(--r); padding: 22px; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* ---------- KPI strip ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.kpi { padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; border-left: 1px solid var(--line); min-width: 0; }
.kpi:first-child { border-left: 0; }
a.kpi:hover { background: var(--canvas); color: inherit; }
.kpi b { font: 700 1.75rem/1.1 var(--display); }
.kpi span { color: var(--ink-2); font-size: .88rem; }
.kpi.attn b { color: var(--rust); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi:nth-child(odd) { border-left: 0; } .kpi { border-top: 1px solid var(--line); } .kpi:nth-child(-n+2) { border-top: 0; } }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-requested, .badge-queued, .badge-pending { background: var(--pollen-tint); color: #8a6a10; }
.badge-scheduled, .badge-processing { background: var(--sky-tint); color: var(--sky); }
.badge-flown { background: #ece8f6; color: #5b4b8a; }
.badge-delivered, .badge-verified, .badge-ready { background: var(--leaf-tint); color: var(--leaf-dark); }
.badge-cancelled { background: var(--sunk); color: var(--ink-3); }
.badge-changes, .badge-failed, .badge-overdue, .badge-high { background: var(--rust-tint); color: var(--rust); }
.badge-medium { background: var(--pollen-tint); color: #8a6a10; }
.planned { display: inline-flex; align-items: center; padding: 1px 8px; border: 1px dashed var(--pollen); color: #8a6a10; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; vertical-align: 1px; }

/* ---------- helper notes ---------- */
.help { background: #eef6ec; border: 1px solid #cfe3cc; border-radius: var(--r); color: #22402c; }
.help summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-weight: 600; font-size: .92rem; }
.help summary::-webkit-details-marker { display: none; }
.help summary::after { content: attr(data-show); margin-left: auto; font-weight: 500; font-size: .8rem; color: var(--leaf-dark); }
.help[open] summary::after { content: attr(data-hide); }
.help summary .i { color: var(--leaf); }
.help-body { padding: 0 14px 12px 40px; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; line-height: 1.6; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: .82rem; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbf9; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcfa; }
td.num, th.num { text-align: right; white-space: nowrap; }
td a.strong { font-weight: 600; color: var(--ink); text-decoration: none; }
td a.strong:hover { color: var(--leaf-dark); text-decoration: underline; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field legend { font-weight: 600; font-size: .92rem; }
.field .hint { color: var(--ink-3); font-size: .85rem; }
.field .err, .form-errors { color: var(--rust); font-size: .87rem; font-weight: 500; }
.form-errors { background: var(--rust-tint); border-radius: var(--r-sm); padding: 10px 14px; }
.fields-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .fields-2 { grid-template-columns: minmax(0, 1fr); } }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=search], select, textarea {
  width: 100%; font: 400 .97rem var(--body); color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 12px; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(63, 138, 80, .18); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--rust); }
input[type=file] { font: inherit; padding: 10px; border: 1.5px dashed var(--line-strong); border-radius: 9px; background: #fafbf9; width: 100%; }
input[type=checkbox], input[type=radio] { accent-color: var(--leaf); width: 17px; height: 17px; margin: 0; }
.checks { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: #fff; }
.checks label, .check-inline { display: flex; align-items: center; gap: 9px; font-weight: 400; cursor: pointer; }
.checks ul, .radios ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.radios ul { flex-direction: row; gap: 18px; flex-wrap: wrap; }
.radios label { display: flex; gap: 8px; align-items: center; font-weight: 500; cursor: pointer; }
.form-actions { display: flex; gap: 10px; align-items: center; padding-top: 4px; }

/* ---------- messages ---------- */
.messages { display: flex; flex-direction: column; gap: 8px; }
.msg { padding: 11px 16px; border-radius: var(--r); background: var(--leaf-tint); color: #1f4d2b; font-weight: 500; border: 1px solid #c7dfcc; }
.msg.error { background: var(--rust-tint); color: #7a2b18; border-color: #ecc4b8; }

/* ---------- maps ---------- */
.map { width: 100%; height: 420px; border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; background: var(--sunk); }
.map.tall { height: min(62vh, 620px); }
.map-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 6px 12px; font: 500 .85rem var(--body); color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--pine); color: #fff; }
.maplibregl-popup-content { font: 400 .9rem var(--body); border-radius: 10px; padding: 10px 14px; }
.maplibregl-popup-content a { font-weight: 600; }
.ramp { height: 8px; border-radius: 4px; background: var(--ramp); }
.legend { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--ink-3); }
.legend .ramp { flex: 1; min-width: 120px; height: 6px; }

/* ---------- index / zones ---------- */
.index-big { font: 700 2.6rem/1 var(--display); }
.delta-up { color: var(--leaf-dark); font-weight: 600; }
.delta-down { color: var(--rust); font-weight: 600; }
.zones { display: flex; height: 26px; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); }
.zones span { min-width: 2px; }
.z0 { background: var(--ndvi-0); } .z1 { background: #cd7d36; } .z2 { background: var(--ndvi-1); } .z3 { background: var(--ndvi-2); } .z4 { background: var(--ndvi-3); }
.zone-rows { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; font-size: .9rem; }
.zone-rows i { width: 12px; height: 12px; border-radius: 3px; display: block; }
.swatch { display: inline-block; width: 46px; height: 8px; border-radius: 4px; vertical-align: 2px; background: var(--sunk); }

/* ---------- lists: agenda, attention, timeline ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); align-items: center; text-decoration: none; color: inherit; }
.list-item:first-child { border-top: 0; }
a.list-item:hover .title { color: var(--leaf-dark); text-decoration: underline; }
.list-item .when { font-size: .85rem; color: var(--ink-3); line-height: 1.25; }
.list-item .when b { display: block; color: var(--ink); font: 600 1.05rem var(--display); }
.list-item .title { font-weight: 600; }
.list-item.overdue .when b { color: var(--rust); }
.attn { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: var(--r); font-weight: 500; text-decoration: none; }
.attn.alert { background: var(--rust-tint); color: #7a2b18; }
.attn.warn { background: var(--pollen-tint); color: #6b5210; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; position: relative; }
.tl::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .dot { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line-strong); background: var(--leaf); margin-top: 2px; }
.tl .dot.obs { background: var(--pollen); } .tl .dot.adv { background: var(--pine); }
.tl .meta { color: var(--ink-3); font-size: .85rem; }
.photo { border-radius: var(--r); max-height: 240px; object-fit: cover; margin-top: 6px; border: 1px solid var(--line); }

/* ---------- flight board ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.lane { background: var(--sunk); border-radius: var(--r-lg); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.lane-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; padding: 2px 4px; }
.lane-head .count { background: #fff; border-radius: 999px; padding: 0 9px; font-size: .82rem; color: var(--ink-2); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; box-shadow: 0 1px 0 rgba(15, 62, 56, .04); }
a.card:hover { border-color: var(--leaf); color: inherit; }
.card .title { font-weight: 600; }
.card .meta { font-size: .84rem; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; }
.card.overdue { border-left: 3px solid var(--rust); }
.steps { display: flex; gap: 0; counter-reset: s; }
.steps li { list-style: none; flex: 1; position: relative; padding-top: 22px; font-size: .84rem; color: var(--ink-3); text-align: center; }
.steps li::before { content: ""; position: absolute; top: 6px; left: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); transform: translateX(-50%); z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--line-strong); }
.steps li:first-child::after { display: none; }
.steps li.done { color: var(--ink-2); } .steps li.done::before, .steps li.done::after { background: var(--leaf); }
.steps li.now { color: var(--pine); font-weight: 600; } .steps li.now::before { background: var(--pine); box-shadow: 0 0 0 4px rgba(15, 62, 56, .15); }
.steps { margin: 0; padding: 0; }

/* ---------- farm cards ---------- */
.farms { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.farm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 6px; }
.farm-card:hover { border-color: var(--leaf); color: inherit; }
.farm-card .meta { color: var(--ink-3); font-size: .88rem; }
.farm-card .stats { display: flex; gap: 18px; margin-top: 6px; }
.farm-card .stats b { font: 700 1.2rem var(--display); display: block; }
.farm-card .stats span { font-size: .82rem; color: var(--ink-3); }

/* ---------- price list ---------- */
.price { font: 600 1.02rem var(--display); white-space: nowrap; }
.price-next { font-size: .82rem; color: var(--sky); white-space: nowrap; }
.quote-box { background: var(--pine); color: #e7f1ed; border-radius: var(--r-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.quote-box label { color: #c9ddd5; }
.quote-box .hint { color: #9fbfb4; }
.quote-box .amount { font: 700 2rem var(--display); color: #fff; }

/* ---------- AI ---------- */
.qa { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.qa .q { font-weight: 600; }
.qa .a { white-space: pre-wrap; line-height: 1.6; }
.conf { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--ink-2); }
.conf .bar { width: 70px; height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; }
.conf .bar i { display: block; height: 100%; background: var(--leaf); }
.thinking { display: flex; align-items: center; gap: 10px; color: var(--ink-3); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--leaf); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }

/* ---------- auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth-art { background: var(--pine); color: #e7f1ed; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art .brand { padding: 0; font-size: 1.4rem; }
.auth-art h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); color: #fff; max-width: 14ch; }
.auth-art p { color: #a9c6bc; margin-top: 12px; }
.auth-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 26px; max-width: 360px; }
.auth-rows div { height: 10px; border-radius: 5px; background: var(--ramp); }
.auth-rows div:nth-child(2) { width: 82%; filter: hue-rotate(-8deg); } .auth-rows div:nth-child(3) { width: 64%; }
.auth-rows div:nth-child(4) { width: 91%; } .auth-rows div:nth-child(5) { width: 47%; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(100%, 400px); display: flex; flex-direction: column; gap: 18px; }
.auth-card .form { max-width: none; }
.qr { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; width: 200px; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font: 500 1.05rem var(--mono); background: var(--sunk); padding: 16px; border-radius: var(--r); }
@media (max-width: 820px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth-art { padding: 28px 20px; gap: 18px; } .auth-rows { display: none; } }

.pagination { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 16px; }

/* ---------- small screens: tables become stacked rows ---------- */
.seg a { padding: 6px 12px; font: 500 .85rem var(--body); color: var(--ink-2); text-decoration: none; }
.seg a[aria-current="true"] { background: var(--pine); color: #fff; }
@media (max-width: 640px) {
  table.stackable thead { display: none; }
  table.stackable tr { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; }
  table.stackable td { padding: 0; border: 0; }
  table.stackable td:first-child { flex-basis: 100%; width: auto !important; }
  table.stackable td.num { text-align: left; margin-left: auto; }
  .main { gap: 16px; }
  .panel:not(.panel-flush) { padding: 16px; }
  .page-head .actions { width: 100%; }
}

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: #fff; color: var(--pine); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }
#menu-toggle:focus-visible ~ .topbar label { outline: 2.5px solid #7cc48f; border-radius: 8px; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
@media (max-width: 1100px) { .ask-form { order: -1; } }

/* ---------- language switch ---------- */
.lang { display: inline-flex; border: 1px solid var(--pine-3); border-radius: 8px; overflow: hidden; }
.lang button { background: none; border: 0; color: #a9c6bc; font: 600 .78rem var(--body); padding: 6px 9px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: #fff; color: var(--pine); }
.auth-card .lang { border-color: var(--line-strong); align-self: flex-end; }
.auth-card .lang button { color: var(--ink-3); }
.auth-card .lang button[aria-pressed="true"] { background: var(--pine); color: #fff; }

/* ---------- manual ---------- */
.manual { max-width: 78ch; display: flex; flex-direction: column; gap: 12px; line-height: 1.65; }
.manual h2 { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.manual h3 { margin-top: 12px; }
.manual ol, .manual ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.manual table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.manual blockquote { margin: 0; background: #eef6ec; border: 1px solid #cfe3cc; border-radius: var(--r); padding: 10px 14px; }
.manual-toc { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 4px; font-size: .92rem; }
.manual-toc a { text-decoration: none; color: var(--ink-2); padding: 4px 10px; border-left: 2px solid var(--line); }
.manual-toc a:hover { color: var(--pine); border-left-color: var(--leaf); }

/* legal: cookie notice, footer links, public pages */
.cookie-notice { position: fixed; z-index: 50; left: 16px; right: 16px; bottom: 16px; max-width: 640px; margin-inline: auto; display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow); font-size: .92rem; }
.cookie-notice p { margin: 0; flex: 1; }
@media (max-width: 560px) { .cookie-notice { flex-direction: column; align-items: stretch; } }
.legal-links { display: flex; gap: 12px; flex-wrap: wrap; font-size: .8rem; }
.legal-links a { color: inherit; opacity: .75; }
.legal-links a:hover { opacity: 1; }
.side-foot .legal-links { color: #a9c6bc; padding: 4px 8px 0; }
.auth-art .legal-links { color: #a9c6bc; margin-top: 8px; }
.public-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; background: var(--pine); }
.public-head .brand { padding: 0; }
.public-main { max-width: 1120px; margin: 0 auto; padding: 28px 16px 120px; }

/* ---------- field app (/m/): phone-first shell with a top bar and bottom tabs ---------- */
.field-app { --tabs: 64px; min-height: 100vh; min-height: 100dvh; padding-bottom: calc(var(--tabs) + env(safe-area-inset-bottom)); }
.f-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--pine); color: #fff;
  padding: calc(8px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); min-height: 52px; }
.f-bar .brand { padding: 0; font-size: 1.1rem; }
.f-bar .brand svg { width: 26px; height: 26px; }
.f-back { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; font-weight: 600; min-height: 40px; }
.f-back:hover { color: #fff; }
.f-status { display: flex; gap: 6px; }
.f-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: .8rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.f-offline { background: #f3d36b; color: #3d2f05; }
.f-queue { background: #fff; color: var(--pine); }
.f-queue:hover { color: var(--pine); }
.f-main { max-width: 640px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right)) 28px max(16px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 14px; }
.f-head h1 { font-size: 1.6rem; }
.f-tabs { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line);
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); box-shadow: 0 -6px 18px -14px rgba(15, 62, 56, .5); }
.f-tabs a { height: var(--tabs); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-3); text-decoration: none; font-size: .74rem; font-weight: 600; }
.f-tabs a .i { width: 22px; height: 22px; }
.f-tabs a[aria-current="page"] { color: var(--pine); }
.f-tabs a[aria-current="page"] .i { color: var(--leaf); }
.f-tabs .f-tab-main .i { width: 44px; height: 44px; padding: 10px; margin-top: -18px; border-radius: 50%; background: var(--leaf-dark); color: #fff; box-shadow: 0 4px 12px -4px rgba(15, 62, 56, .6); border: 3px solid var(--surface); box-sizing: content-box; }
.f-tabs .f-tab-main[aria-current="page"] .i { background: var(--pine); color: #fff; }
.field-app .cookie-notice { bottom: calc(var(--tabs) + env(safe-area-inset-bottom) + 10px); }
.f-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.f-list > li + li { border-top: 1px solid var(--line); }
.f-list.panel { padding: 4px 16px; gap: 0; }
.f-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; min-height: 56px; }
.f-row > div { min-width: 0; }
.f-row.overdue b { color: var(--rust); }
.f-link { color: inherit; text-decoration: none; }
.f-link:hover { color: var(--leaf-dark); }
.f-index { font: 700 1.25rem var(--display); color: var(--pine); flex: none; }
.f-card.overdue { border-left: 4px solid var(--rust); }
.f-card h2 { display: flex; align-items: center; gap: 8px; }
.f-checklist { display: flex; flex-direction: column; gap: 12px; }
.f-checklist fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px 12px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.f-checklist legend { font-weight: 600; padding: 0 4px; }
.f-checklist .check-inline { align-items: flex-start; min-height: 28px; }
.f-checklist input[type=checkbox] { width: 22px; height: 22px; margin-top: 1px; }
.f-map-wrap { display: flex; flex-direction: column; gap: 8px; }
.f-map { height: min(56vh, 460px); }
.f-wide { width: 100%; justify-content: center; padding: 13px 16px; font-size: 1rem; }
.f-gps { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-2); background: var(--sunk); border-radius: var(--r-sm); padding: 8px 12px; }
.f-gps .i { color: var(--leaf); }
.f-more summary { cursor: pointer; font-weight: 600; color: var(--leaf-dark); padding: 4px 0; }
.f-more[open] summary { margin-bottom: 12px; }
.f-me { color: var(--ink); padding: 0; }
.f-me:hover { color: var(--ink); background: none; }
.f-me small { color: var(--ink-3); }
.field-app .lang { border-color: var(--line-strong); }
.field-app .lang button { color: var(--ink-3); padding: 8px 12px; }
.field-app .lang button[aria-pressed="true"] { background: var(--pine); color: #fff; }
.field-app .legal-links { justify-content: center; color: var(--ink-3); }
.field-app input, .field-app select, .field-app textarea { font-size: 16px; min-height: 44px; }  /* 16px stops iOS from zooming into fields */
.field-app .btn-sm { min-height: 38px; }
