/* FarmHive site styles (My Farm page). Colors are tokens; dark mode follows the system or data-theme. */
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
/* Layout: a working form-and-ledger tool. Narrow reading column, one step per screen, the form's own section numbers as structure. */
:root {
  --bg: #f4f6f2; --surface: #ffffff; --ink: #1d2a22; --muted: #5d6b62; --line: #d5ddd5;
  --accent: #2f6b4f; --accent-ink: #ffffff; --water: #2a6496; --good: #2f7a3e; --warn: #9a6400; --bad: #b3362d;
  --chip-good: #e3f1e5; --chip-warn: #fbefd6; --chip-bad: #f8e1df; --soft: #e9efe9;
  --display: "Secular One", "Rubik", system-ui, sans-serif;
  --body: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #121815; --surface: #1a221d; --ink: #e4ebe5; --muted: #9aa89f; --line: #2e3a33;
  --accent: #7cc39b; --accent-ink: #0f1a14; --water: #7fb4e0; --good: #7cc98a; --warn: #e2b14f; --bad: #ef8a80;
  --chip-good: #1f3326; --chip-warn: #3a2f17; --chip-bad: #3d2220; --soft: #202a24; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #121815; --surface: #1a221d; --ink: #e4ebe5; --muted: #9aa89f; --line: #2e3a33;
  --accent: #7cc39b; --accent-ink: #0f1a14; --water: #7fb4e0; --good: #7cc98a; --warn: #e2b14f; --bad: #ef8a80;
  --chip-good: #1f3326; --chip-warn: #3a2f17; --chip-bad: #3d2220; --soft: #202a24; color-scheme: dark }

body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5; }
.wrap { max-width: 980px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0 48px; }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 18px 10px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.brand { font-family: var(--display); font-size: 22px; color: var(--accent); text-decoration: none; letter-spacing: .01em; }
.brand small { font-family: var(--body); font-size: 13px; color: var(--muted); margin-inline-start: 8px; letter-spacing: 0; }
nav.steps { display: flex; gap: 6px; flex-wrap: wrap; }
nav.steps a { font-size: 13px; color: var(--muted); text-decoration: none; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }
nav.steps a.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.preview-note a { color: inherit; font-weight: 500; }
.preview-note { font-size: 12.5px; color: var(--warn); background: var(--chip-warn); padding: 6px 10px; border-radius: 6px; margin-bottom: 18px; }
h1 { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 4.5vw, 36px); line-height: 1.15; margin: 0 0 8px; text-wrap: balance; }
h2 { font-family: var(--display); font-weight: 400; font-size: 21px; margin: 28px 0 8px; text-wrap: balance; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
p.lead { color: var(--muted); max-width: 62ch; margin: 0 0 18px; }
.he { font-family: var(--body); direction: rtl; unicode-bidi: isolate; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
button, .btn { font: inherit; font-weight: 500; cursor: pointer; border-radius: 8px; padding: 9px 16px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); text-decoration: none; display: inline-block; }
button.ghost, .btn.ghost { background: transparent; color: var(--accent); }
button.link { background: none; border: none; color: var(--accent); padding: 2px 4px; text-decoration: underline; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--water); outline-offset: 2px; }
input, select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; min-width: 0; }
input[type=number] { width: 6.5em; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* opening screen */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 8px 0 30px; }
.choice { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 8px; align-content: start; }
.choice .btn { justify-self: start; margin-top: 6px; }
.flow { overflow-x: auto; }
.device { border: 2px dashed var(--accent); border-radius: 14px; padding: 26px 14px 14px; position: relative; min-width: 640px; }
.device > .tag { position: absolute; top: -11px; left: 16px; background: var(--bg); padding: 0 8px; font-size: 12.5px; font-weight: 600; color: var(--accent); letter-spacing: .04em; text-transform: uppercase; }
.lane { display: grid; grid-template-columns: 1fr 22px 1fr 22px 1fr 22px 1fr; align-items: stretch; }
.node { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.node b { display: block; font-size: 14px; margin-bottom: 2px; }
.arrow { display: grid; place-items: center; color: var(--muted); font-size: 16px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; min-width: 640px; }
.server { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; background: var(--soft); }
.server b { display: block; }

/* form 1220 sections */
.sec { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.sec-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-bottom: 10px; }
.sec-head .no { font-family: var(--display); color: var(--accent); margin-inline-end: 6px; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: start; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: bottom; }
th .he { display: block; font-size: 12px; }
td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.r, th.r { text-align: end; }
td.aw { min-width: 8.5em; } td.dt { min-width: 7.5em; }
.cur { font-family: var(--body); font-size: .8em; margin-inline-end: 2px; }
tr.total td { font-weight: 600; border-bottom: none; }
.notasked { color: var(--muted); font-size: 12.5px; text-decoration: line-through; text-decoration-color: var(--bad); }
.example-tag { font-size: 12px; font-weight: 600; color: var(--warn); background: var(--chip-warn); border-radius: 999px; padding: 2px 9px; }

/* review */
.chip { font-size: 12px; font-weight: 500; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.chip.good { background: var(--chip-good); color: var(--good); }
.chip.warn { background: var(--chip-warn); color: var(--warn); }
.chip.bad { background: var(--chip-bad); color: var(--bad); }
.sbadge { font-family: var(--display); color: var(--accent); }
.privacy { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.privacy ul { margin: 6px 0 0; padding-inline-start: 18px; font-size: 13.5px; }
.read h3 { color: var(--good); } .notread h3 { color: var(--bad); }
.optin { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); margin-top: 16px; }
.optin label { display: flex; gap: 10px; align-items: flex-start; }
.optin input { margin-top: 4px; }
pre.json { background: var(--soft); border-radius: 8px; padding: 10px 12px; font-size: 12px; overflow-x: auto; max-height: 260px; }

/* dashboard */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 8px 0 18px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.tile .k { font-size: 12.5px; color: var(--muted); }
.tile .v { font-family: var(--display); font-size: 26px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tile .s { font-size: 12.5px; color: var(--muted); }
.neg { color: var(--bad); } .pos { color: var(--good); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: none; border-radius: 0; background: var(--surface); color: var(--ink); padding: 7px 12px; font-weight: 400; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.orchards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.orch { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.orch svg { width: 100%; height: auto; display: block; margin-top: 6px; }
.orch .axis { stroke: var(--line); } .orch .lineb { stroke: var(--accent); fill: none; stroke-width: 2; }
.orch .zero { stroke: var(--muted); stroke-dasharray: 3 3; } .orch .now { fill: var(--water); } .orch .nowline { stroke: var(--water); }
.orch text { fill: var(--muted); font-size: 10px; font-family: var(--body); }
.whatif { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 10px; }
.whatif select { max-width: 100%; } .whatif > * { min-width: 0; }
.delta { font-family: var(--display); font-size: 22px; }
.fine { font-size: 12.5px; color: var(--muted); max-width: 75ch; }
@media (prefers-reduced-motion: no-preference) { .screen { animation: in .18s ease-out; } @keyframes in { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } } }
.consent { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.consent ul { margin: 6px 0 10px; padding-inline-start: 18px; font-size: 13.5px; display: grid; gap: 4px; }
.consent label { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.sel { user-select: all; }
/* season record */
main a:not(.btn) { color: var(--accent); }
.crumb { margin: 0 0 6px; font-size: 13px; }
.badge-level { display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 1px 9px; margin-inline-start: 6px; vertical-align: middle; }
.act { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; display: grid; gap: 8px; }
.act-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.act-head .window { max-width: 46ch; text-align: end; }
.row.tight { gap: 6px; margin-top: 4px; }
.row label, .inputform label { display: grid; gap: 3px; font-size: 13px; color: var(--muted); }
.inputform { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 14px; margin: 8px 0; }
.inputform label.wide { grid-column: span 2; }
.inputform input, .inputform select { width: 100%; }
h3.grp { margin: 18px 0 6px; }
details.sec summary { cursor: pointer; }
ol.diary { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 10px; }
ol.diary > li { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 10px 12px; display: grid; grid-template-columns: 8rem 1fr; gap: 4px 14px; }
ol.diary .when { font-weight: 600; } ol.diary .when small { display: block; font-weight: 400; color: var(--muted); }
.negfill { background: var(--bad) !important; }
@media (max-width: 600px) { ol.diary > li { grid-template-columns: 1fr; } .inputform label.wide { grid-column: auto; } .act-head .window { text-align: start; } }
label.chk.scope{display:inline-flex;align-items:center;gap:.45rem;margin:.2rem 0 .6rem;font-size:.95rem}
#example-note .btn{margin-left:.5rem}
#example-note a.btn{background:var(--accent);color:var(--accent-ink);text-decoration:none}
/* season summary bars: one row per reason, a track scaled to the largest part */
.bars { display: grid; gap: .35rem; margin: .5rem 0 1rem; }
.bar { display: grid; grid-template-columns: minmax(9rem, 18rem) 1fr 5.5rem; gap: .6rem; align-items: center; font-size: .9rem; }
.bar .track { display: block; background: var(--soft); height: .7rem; border-radius: 3px; overflow: hidden; }
.bar .fill { display: block; background: var(--good); height: 100%; }
.bar .fill.negfill { background: var(--bad); }
.bar .val { text-align: right; font-variant-numeric: tabular-nums; }
.bar .val.neg { color: var(--bad); } .bar .val.pos { color: var(--good); }
@media (max-width: 600px) { .bar { grid-template-columns: 1fr 5rem; } .bar .track { grid-column: 1 / -1; grid-row: 2; } }

.beta-bar{background:#fff6dc;border-bottom:1px solid #ecd9a6;color:#5c4400;font-size:.88rem;padding:.55rem 5%;line-height:1.45}.beta-bar b{color:#5c4400}html[dir="rtl"] .beta-bar,.beta-bar[dir="rtl"]{text-align:right}

html.i18n-pending body{visibility:hidden}
