/* Arvum Pro — «чорнозем і колос», та сама візуальна система, що й Arvum Lite, плюс карта, огляди, питання, вхід. */
:root {
  --bg: #eef0e7; --card: #fdfdf9; --soft: #e6e9dc; --line: #d6dacb; --ink: #1d1c16; --muted: #5f6352;
  --soil: #25211a; --soil-2: #3b3326; --on-soil: #f4efe2; --wheat: #d4a12a; --wheat-soft: #f3e3b4; --wheat-ink: #6d4f00; --leaf: #3d7a35;
  --ok: #2c7a3f; --ok-bg: #e1f1e2; --warn: #8a5a00; --warn-bg: #fbefd2; --bad: #b8382b; --bad-bg: #f9e1dc; --info: #2f6787; --info-bg: #e2eef5;
  --chip-ink: #1d1c16; --shadow: 0 1px 2px rgba(37, 33, 26, .06), 0 10px 24px -16px rgba(37, 33, 26, .35);
  --r: 16px; --display: 'Unbounded', 'Manrope', system-ui, sans-serif; --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #14130f; --card: #1d1b16; --soft: #26241d; --line: #36332a; --ink: #ece8db; --muted: #a9a593;
  --soil: #0d0c09; --soil-2: #221e17; --on-soil: #f4efe2; --wheat: #e2b54a; --wheat-soft: #3d3220; --wheat-ink: #f3d78f; --leaf: #7dbb6f;
  --ok: #7fc98a; --ok-bg: #1e3222; --warn: #f0c060; --warn-bg: #3a2f17; --bad: #f08a7c; --bad-bg: #3d1f1a; --info: #8cc3e3; --info-bg: #1a2c38;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 24px -16px rgba(0, 0, 0, .7); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #14130f; --card: #1d1b16; --soft: #26241d; --line: #36332a; --ink: #ece8db; --muted: #a9a593;
  --soil: #0d0c09; --soil-2: #221e17; --on-soil: #f4efe2; --wheat: #e2b54a; --wheat-soft: #3d3220; --wheat-ink: #f3d78f; --leaf: #7dbb6f;
  --ok: #7fc98a; --ok-bg: #1e3222; --warn: #f0c060; --warn-bg: #3a2f17; --bad: #f08a7c; --bad-bg: #3d1f1a; --info: #8cc3e3; --info-bg: #1a2c38;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 24px -16px rgba(0, 0, 0, .7); color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--soil); }
body.noscroll { overflow: hidden; }
a { color: var(--leaf); }
h1, h2, h3 { text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 500; letter-spacing: -.02em; margin: 0 0 8px; }
h1 { font-size: clamp(22px, 3.2vw, 30px); line-height: 1.15; }
h2 { font-size: 17px; line-height: 1.3; }
h3 { font-size: 15px; margin: 0; }
p { margin: 4px 0; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; }
.num, .kpis b, .kv dd, .win, time { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.eyebrow { margin: 0 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: 11.5px; font-weight: 800; }
.count { display: inline-block; min-width: 26px; padding: 1px 9px; border-radius: 99px; background: var(--soft); color: var(--muted); font: 700 12px/20px var(--sans); text-align: center; letter-spacing: 0; vertical-align: middle; }

/* ---------- каркас ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--soil); color: var(--on-soil); border-bottom: 3px solid var(--wheat); }
.top-in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding-block: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--on-soil); text-decoration: none; font: 500 18px var(--display); letter-spacing: -.02em; white-space: nowrap; }
.brand b { color: var(--wheat); font-weight: 400; }
.logo { width: 28px; height: 28px; color: #8fae6a; }
.tabs { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs a, .bottom a { color: rgba(244, 239, 226, .72); text-decoration: none; font-weight: 700; font-size: 14px; border-radius: 10px; padding: 8px 11px; white-space: nowrap; }
.tabs a:hover { color: var(--on-soil); background: rgba(255, 255, 255, .06); }
.tabs a.on { color: var(--on-soil); background: rgba(255, 255, 255, .1); box-shadow: inset 0 -2px 0 var(--wheat); }
.season { display: flex; align-items: center; gap: 2px; font-size: 13px; color: rgba(244, 239, 226, .75); white-space: nowrap; }
.season b { color: var(--wheat); font: 500 15px var(--display); margin-left: 2px; }
.sbtn { background: none; border: 0; color: var(--on-soil); font-size: 20px; line-height: 1; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.sbtn:hover { background: rgba(255, 255, 255, .1); }
.gear { color: rgba(244, 239, 226, .75); display: flex; padding: 6px; border-radius: 10px; }
.gear.on, .gear:hover { color: var(--on-soil); background: rgba(255, 255, 255, .1); }
main { max-width: 1120px; margin: 0 auto; padding-block: 22px 120px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.bottom { display: none; }
.fab { position: fixed; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 25; display: flex; align-items: center; gap: 8px; padding: 12px 18px 12px 14px; border-radius: 16px; border: 0; background: var(--wheat); color: #23190a; font: 800 15px var(--sans); cursor: pointer; box-shadow: 0 14px 28px -12px rgba(37, 33, 26, .7); }
.fab span { font-size: 24px; line-height: 20px; font-weight: 500; }
.fab:hover { filter: brightness(1.05); }

/* ---------- загальні блоки ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; margin: 0 0 14px; min-width: 0; }
.card.empty { text-align: center; padding: 26px 20px; }
.hero { margin: 0 0 16px; max-width: 760px; }
.phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.phead > div { min-width: 0; max-width: 760px; }
.sh { margin: 28px 0 12px; display: flex; align-items: center; gap: 8px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.row.end { justify-content: flex-end; }
.back { display: inline-block; margin-bottom: 10px; text-decoration: none; font-weight: 700; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.cols > .card { margin: 0; }
.cols3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.cols3 .card { margin: 0; }
.ok-t { color: var(--ok); } .bad-t { color: var(--bad); }
.foot { margin-top: 32px; color: var(--muted); font-size: 12.5px; max-width: 760px; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 700 14px var(--sans); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--soil); border-color: var(--soil); color: var(--on-soil); }
.btn.primary:hover { background: var(--soil-2); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.danger, .link.danger { color: var(--bad); }
.link { background: none; border: 0; color: var(--leaf); font: 700 14px var(--sans); cursor: pointer; padding: 2px 0; }
.link.sm { font-size: 12.5px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--wheat) 70%, transparent); outline-offset: 2px; }

/* культура, стани, типи */
.crop { --c: #999; display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 7px; border-radius: 7px; background: color-mix(in srgb, var(--c) 30%, var(--card)); color: var(--ink); font-size: 12.5px; font-weight: 800; white-space: nowrap; box-shadow: inset 3px 0 0 var(--c); }
.crop.none { background: var(--soft); color: var(--muted); box-shadow: none; font-weight: 600; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.now { background: var(--wheat-soft); color: var(--wheat-ink); }
.pill.soon { background: var(--info-bg); color: var(--info); }
.pill.later, .pill.skip { background: var(--soft); color: var(--muted); }
.pill.done { background: var(--ok-bg); color: var(--ok); }
.tag { display: inline-block; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: var(--soft); color: var(--muted); vertical-align: 2px; }
.tag.t-herb { background: #e7efd8; color: #4c6a1c; } .tag.t-fung { background: #e2e9f3; color: #3d5f8a; } .tag.t-ins { background: #f6e1da; color: #9a3f26; }
.tag.t-fert { background: #efe6d2; color: #7a5a1c; } .tag.t-sow { background: #f3e3b4; color: #6d4f00; } .tag.t-harv { background: #f0dcae; color: #6b4a00; } .tag.t-pgr { background: #ebe1f0; color: #6b4a85; }
:root[data-theme="dark"] .tag[class*="t-"] { background: var(--soft); color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag[class*="t-"] { background: var(--soft); color: var(--ink); } }
.vd { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 800; }
.vd.ok { background: var(--ok-bg); color: var(--ok); } .vd.info { background: var(--info-bg); color: var(--info); } .vd.warn { background: var(--warn-bg); color: var(--warn); } .vd.bad { background: var(--bad-bg); color: var(--bad); }
.note { padding: 8px 12px; border-radius: 10px; font-size: 13.5px; margin: 8px 0 0; }
.note.warn { background: var(--warn-bg); color: var(--warn); } .note.bad { background: var(--bad-bg); color: var(--bad); }
.msgs { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.msgs li { padding: 7px 10px 7px 12px; border-radius: 10px; font-size: 13.5px; background: var(--soft); border-left: 3px solid var(--muted); }
.msgs li.ok { border-color: var(--ok); } .msgs li.info { border-color: var(--info); } .msgs li.warn { border-color: var(--wheat); background: var(--warn-bg); } .msgs li.bad { border-color: var(--bad); background: var(--bad-bg); }

/* шкала BBCH: 0 сівба → 99 збирання */
.bbch { position: relative; height: 8px; border-radius: 99px; margin: 8px 0 4px; background: linear-gradient(90deg, var(--soft) 0 100%); overflow: visible; }
.bbch span { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, #7aa35a, var(--leaf) 45%, var(--wheat) 80%, #b7862a); }
.bbch i { position: absolute; top: -3px; width: 4px; height: 14px; margin-left: -2px; border-radius: 2px; background: var(--ink); }
.ph { font-weight: 700; font-size: 14px; margin: 6px 0 0; }
.ph.big { font-size: 16px; }

/* Сьогодні */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpis > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; }
.kpis small { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.kpis b { font: 500 26px/1.2 var(--display); letter-spacing: -.02em; }
.kpis span { color: var(--muted); font-size: 12.5px; }
.kpis .alert { border-color: var(--bad); background: var(--bad-bg); }
.kpis .alert b, .kpis .alert small { color: var(--bad); }
.struct { display: flex; height: 14px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--soft); }
.struct span { background: var(--c); min-width: 3px; }
.struct.thin { height: 10px; flex: 1; min-width: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0; font-size: 13px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 6px; }
.legend small { color: var(--muted); }
.legend.small { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.task { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; min-width: 0; display: flex; flex-direction: column; }
.task-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.task-h h3 { margin-top: 4px; font-size: 16px; }
.task-a { text-align: right; display: grid; white-space: nowrap; }
.task-a b { font: 500 18px var(--display); }
.task-a small { color: var(--muted); font-size: 12px; }
.task-rows { list-style: none; padding: 0; margin: 10px 0 6px; display: grid; gap: 4px; }
.task-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 8px; align-items: center; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 13.5px; }
.task-rows li a { font-weight: 800; color: var(--ink); text-decoration: none; }
.task-rows .num { color: var(--muted); text-align: right; }
.task-rows .win { grid-column: 1 / 3; color: var(--muted); font-size: 12.5px; }
.task-rows .pill { justify-self: end; }
.task .hint { margin-top: auto; padding-top: 4px; }
.risks { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.risk { display: block; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--wheat); border-radius: 12px; padding: 12px 14px; }
.risk.bad { border-left-color: var(--bad); }
.risk > div { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.risk ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--muted); }

/* Поля */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.fcard { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; text-decoration: none; color: var(--ink); min-width: 0; }
.fcard:hover { border-color: var(--muted); }
.fc-h { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.fc-h h3 { font: 500 16px var(--display); letter-spacing: -.01em; }
.fc-h small { color: var(--muted); font-size: 12.5px; }
.fcard dl { margin: 10px 0 0; display: grid; gap: 4px; font-size: 13px; }
.fcard dl div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; }
.fcard dt { color: var(--muted); }
.fcard dd { margin: 0; }
.fc-v { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); }
.kv { margin: 10px 0; display: grid; gap: 6px; }
.kv div { display: grid; grid-template-columns: minmax(110px, 40%) minmax(0, 1fr); gap: 10px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.kv.cols4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 18px; }
.kv.cols4 div { grid-template-columns: 1fr; gap: 0; }
.strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 0 0 16px; }
.ystep { display: grid; justify-items: start; gap: 4px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font: inherit; color: var(--ink); text-align: left; min-width: 0; }
.ystep small { color: var(--muted); font-weight: 800; font-size: 12px; }
.ystep em { font-style: normal; font-size: 12px; color: var(--muted); min-height: 16px; }
.ystep.on { border-color: var(--wheat); box-shadow: inset 0 0 0 1px var(--wheat); }
.rot.bad { border-color: var(--bad); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--soft); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
.tm td:first-child { width: 1%; }
.tm tr.st-done td { color: var(--muted); }
.tm tr.st-done b { font-weight: 600; }
.tm tr.st-late td { background: color-mix(in srgb, var(--bad-bg) 60%, transparent); }
.tm tr.st-now td { background: color-mix(in srgb, var(--wheat-soft) 50%, transparent); }
.tm details summary { cursor: pointer; color: var(--leaf); font-size: 12.5px; font-weight: 700; }
.tm details p { font-size: 13px; color: var(--muted); max-width: 60ch; }
.recs { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.recs li { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; align-items: start; }
.recs time { font-weight: 800; font-size: 13.5px; padding-top: 1px; }
.recs .fl { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; margin-top: 4px; }
.recs .fl a { font-weight: 700; color: var(--ink); }
.recs .sum { font-size: 13.5px; color: var(--muted); }
.recs .ra { display: flex; gap: 10px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.filters label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }

/* сівозміна */
.rotg th, .rotg td { text-align: center; padding: 6px; }
.rotg tbody th { text-align: left; white-space: nowrap; position: sticky; left: 0; background: var(--card); z-index: 1; }
.rotg tbody th a { color: var(--ink); font-weight: 800; text-decoration: none; display: block; }
.rotg tbody th small { color: var(--muted); font-weight: 600; }
.rotg th.on, .rotg td.on { background: color-mix(in srgb, var(--wheat-soft) 45%, transparent); }
.cell { position: relative; display: grid; justify-items: center; gap: 2px; width: 100%; min-width: 92px; padding: 6px 4px; border: 1px dashed transparent; border-radius: 10px; background: none; cursor: pointer; font: inherit; color: var(--ink); }
.cell:hover { border-color: var(--muted); }
.cell small { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.cell .dot { position: absolute; top: 3px; right: 3px; margin: 0; }
.dot.bad { background: var(--bad); } .dot.warn { background: var(--wheat); }
.structs { display: grid; gap: 8px; }
.srow { display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(0, 260px); gap: 12px; align-items: center; font-size: 13px; }
.srow small { color: var(--muted); }
.emptybar { flex: 1; }

/* культури */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ccard { display: flex; gap: 12px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.ccard:hover { border-color: var(--muted); }
.ccard i { width: 10px; border-radius: 4px; background: var(--c); flex: none; }
.ccard div { display: grid; min-width: 0; }
.ccard small { color: var(--muted); font-size: 12.5px; }
.stages { list-style: none; display: flex; margin: 0; padding: 12px; gap: 0; min-width: max-content; }
.stages li { display: grid; gap: 2px; padding: 4px 12px; border-left: 2px solid var(--line); min-width: 96px; }
.stages b { font: 500 18px var(--display); color: var(--leaf); }
.stages span { font-size: 13px; font-weight: 700; }
.stages small { color: var(--muted); font-size: 12px; }

/* калькулятори */
.calcs { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.calcs .card { margin: 0; }
.out { display: block; margin-top: 12px; padding: 4px 14px; border-radius: 12px; background: var(--soft); }
.out .kv { margin: 8px 0; }

/* форми */
label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 10px; min-width: 0; }
input, select, textarea { font: 500 15px var(--sans); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; min-width: 0; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 12px 0 0; padding: 8px 12px 12px; min-width: 0; }
legend { font-weight: 800; font-size: 13px; padding: 0 6px; color: var(--muted); }
.fgrid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 12px; }
.fgrid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.prow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(70px, .8fr) minmax(80px, .8fr); gap: 6px; margin-top: 6px; }
.prods .prow { grid-template-columns: minmax(0, 2fr) minmax(70px, 1fr) minmax(80px, 1fr); }
.chks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; }
.chk { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 4px; color: var(--ink); font-weight: 700; cursor: pointer; border-radius: 8px; }
.chk:hover { background: var(--soft); }
.chk input { width: 18px; height: 18px; flex: none; accent-color: var(--leaf); }
.chk span { flex: 1; min-width: 0; }
.chk small { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.live { margin-top: 12px; font-size: 13.5px; }
.live > p:first-child { padding: 8px 12px; background: var(--soft); border-radius: 10px; }
.err { color: var(--bad); font-weight: 700; min-height: 1em; margin: 8px 0 0; }
.hist { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }
.hist > span { display: grid; gap: 2px; font-size: 12px; color: var(--muted); font-weight: 800; }
.rot .msgs { margin-top: 8px; }
.io textarea { font: 12px/1.4 ui-monospace, Consolas, monospace; margin-top: 8px; }
.io summary { cursor: pointer; font-weight: 700; margin-top: 14px; }

.ov { position: fixed; inset: 0; z-index: 50; background: rgba(20, 18, 14, .55); display: flex; align-items: flex-start; justify-content: center; padding: calc(24px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); overflow-y: auto; }
.sheet { width: 100%; max-width: 720px; background: var(--card); color: var(--ink); border-radius: 18px; padding: 20px 22px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: var(--soil); color: var(--on-soil); padding: 10px 18px; border-radius: 12px; font-weight: 700; box-shadow: var(--shadow); }

@media (max-width: 900px) {
  .tabs { display: none; }
  .top-in { justify-content: space-between; }
  .bottom { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 24; background: var(--soil); border-top: 2px solid var(--wheat); overflow-x: auto; scrollbar-width: none; padding-block: 4px calc(4px + env(safe-area-inset-bottom, 0px)); padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); }
  .bottom a { flex: 1 0 auto; text-align: center; font-size: 12.5px; padding: 9px 8px; }
  .bottom a.on { color: var(--wheat); }
  .fab { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); padding: 0; width: 56px; height: 56px; justify-content: center; font-size: 0; }
  .fab span { font-size: 30px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .brand span { display: none; }
  .tasks, .risks, .fgrid, .calcs { grid-template-columns: minmax(0, 1fr); }
  .recs li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .prow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .srow { grid-template-columns: 44px minmax(0, 1fr); }
  .srow small { grid-column: 2; }
  .sheet { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
