/* aspace ledgers — Water Balance, N Balance (beta), Season ribbon,
   decision card, field hub tabs. Discrete cells; solid measured, dashed
   projected, pale empty; navy text + 1 px navy border on every status. */

/* status words */
.lst{display:inline-flex;align-items:center;gap:6px;min-height:24px;padding:0 8px;border:1px solid var(--navy);color:var(--navy);
 font:500 12.5px/1 var(--f-sans);letter-spacing:-.005em;white-space:nowrap;background:var(--white);width:fit-content;align-self:flex-start}
.lst.q1{background:var(--q1)}.lst.q2{background:var(--q2)}.lst.q3{background:var(--q3)}.lst.q4{background:var(--q4)}
.lst.sea{background:var(--b5);border-color:var(--blue);color:var(--blue)}
.lst.hatch{background-image:var(--hatch)}
.sb .lst{border-color:var(--navy)}
a.lst{text-decoration:none}
a.lst:hover,a.lst:focus-visible{background:var(--lime);color:var(--on-lime);border-color:var(--on-lime)}

/* evidence chip */
.lev{display:inline-flex;align-items:center;min-height:22px;padding:0 7px;border:1px dashed var(--ln);color:var(--dim);
 font:400 12px/1 var(--f-mono);text-decoration:none;white-space:nowrap}
.lev:hover{background:var(--lime);color:var(--on-lime);border-style:solid;border-color:var(--on-lime)}
.lev .pips{display:inline-flex;gap:2px;margin-right:6px}
.lev .pips i{width:6px;height:6px;border:1px solid currentColor}
.lev .pips i.on{background:var(--blue);border-color:var(--blue)}
.lev:hover .pips i.on{background:currentColor;border-color:currentColor}

/* bar charts: day cells and outlook periods — y ticks, headroom above the
   tallest bar (scale = max × 1.2 to a round number), one tooltip per page */
.lstrip-w{display:flex;flex-direction:column;gap:6px;min-width:0}
.lchart{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:6px;row-gap:6px}
.lstrip-y{position:relative;min-width:2.2em;font-size:12px;line-height:1}
.lstrip-y span{position:absolute;right:0;transform:translateY(50%);white-space:nowrap;font-variant-numeric:tabular-nums}
.lstrip{position:relative;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:2px;height:190px;align-items:stretch;outline:0}
.lstrip.compact{height:84px}
.lstrip.compact>i{cursor:default}
@media (max-width:640px){.lstrip{height:150px}.lstrip.compact{height:72px}}
.lstrip:focus-visible{box-shadow:0 0 0 2px var(--lime),0 0 0 3px var(--navy)}
.lstrip .gl{position:absolute;left:0;right:0;height:0;border-top:1px solid var(--ln2);pointer-events:none}
.lstrip .lstrip-u{position:absolute;top:0;left:2px;font-size:12px;font-style:normal;line-height:1;pointer-events:none}
.lstrip>i{position:relative;display:flex;align-items:flex-end;min-width:0;cursor:pointer}
.lstrip>i>b{display:block;width:100%;height:calc(var(--v) * 100%);background:var(--blue);min-height:3px}
.lstrip>i.fc>b{background:var(--bg);border:1px dashed var(--blue)}
.lstrip>i.na>b{background:var(--b5)}
.lstrip>i.q1>b{background:var(--q1);border:1px solid var(--navy)}
.lstrip>i.q2>b{background:var(--q2);border:1px solid var(--navy)}
.lstrip>i.fc.q1>b,.lstrip>i.fc.q2>b{background:var(--bg);border:1px dashed var(--navy);box-shadow:inset 0 -3px 0 var(--q1)}
/* today: a dashed vertical line after the last recorded day, labelled (no outline on the bar) */
.lstrip>i[data-now]::after{content:"";position:absolute;top:16px;bottom:0;left:50%;transform:translateX(-1px);width:0;border-left:2px dashed var(--navy);box-shadow:0 0 0 1px rgba(247,245,239,.85);pointer-events:none;z-index:2}
.lstrip>i[data-now]::before{content:attr(data-now);position:absolute;top:0;left:50%;transform:translateX(-50%);padding:0 4px;background:var(--bg);
 color:var(--ink);font:400 12px/1.2 var(--f-sans,Archivo,sans-serif);font-style:normal;white-space:nowrap;pointer-events:none;z-index:3}
.lstrip.compact>i[data-now]::before{display:none}.lstrip.compact>i[data-now]::after{top:0}
.sb .lstrip>i[data-now]::after{border-color:var(--ivory)}.sb .lstrip>i[data-now]::before{color:var(--ivory)}
.lstrip>i.act>b{box-shadow:0 0 0 2px var(--navy)}
.lstrip>i.act.fc>b{border-style:solid}
.lstrip>i:hover{background:var(--ln2)}
/* range whisker: p10–p90 of the past-years runs */
.lstrip>i>s{position:absolute;left:50%;width:0;border-left:2px solid var(--navy);transform:translateX(-1px);pointer-events:none;z-index:2}
.lstrip>i>s::before,.lstrip>i>s::after{content:"";position:absolute;left:-5px;width:8px;border-top:2px solid var(--navy)}
.lstrip>i>s::before{top:-1px}.lstrip>i>s::after{bottom:-1px}
.lstrip-ax{display:flex;justify-content:space-between;gap:8px}
.lstrip-empty{padding:12px 0}.lstrip-empty.hatch{padding:12px 10px}
/* forecast / outlook band behind the future cells (ledger.js chart, tokens.css .hatch); bars sit on it solid */
.lstrip>.lfc{position:absolute;top:0;bottom:0;pointer-events:none}
.sb .lstrip>i>b{background:var(--ivory)}.sb .lstrip>i.fc>b{background:var(--bg);border-color:var(--ivory)}
.sb .lstrip>i>s,.sb .lstrip>i>s::before,.sb .lstrip>i>s::after{border-color:var(--ivory)}
.ltip{position:fixed;z-index:1000;max-width:min(320px,calc(100vw - 16px));padding:10px 12px;background:var(--navy);color:var(--ivory);
 border:1px solid var(--navy);box-shadow:0 6px 18px rgba(0,0,0,.18);font-size:12.5px;line-height:1.3;pointer-events:none}
.ltip[hidden]{display:none}
.ltip .tt{display:block;font-weight:500;font-size:13.5px}
.ltip .src{display:block;margin:2px 0 6px;opacity:.8;font-size:12px}
.ltip dl{display:grid;grid-template-columns:auto auto;gap:3px 12px;margin:0}
.ltip dt{opacity:.85}.ltip dd{margin:0;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
/* Water Balance tabs: Daily · Monthly outlook · Season outlook */
.wview{display:flex;flex-direction:column;gap:12px;min-width:0}
.wtabs{margin-bottom:12px}
/* Daily / Monthly outlook / Season outlook: plain text, the active one bold */
.wtabs{gap:22px;padding-left:0}
.wtabs .chip,.wtabs .chip:hover{border:0;background:none;box-shadow:none;color:var(--fg);margin:0;padding:0;min-height:32px;font-weight:400}
.wtabs .chip:hover{text-decoration:underline;text-underline-offset:4px}
.wtabs .chip[aria-selected="true"]{font-weight:700;text-decoration:none}
.wtab-p{display:flex;flex-direction:column;gap:12px;min-width:0}
.lev-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.lnote{margin:0;line-height:1.4}
.lnote a{color:inherit}
@media (max-width:760px){.lstrip{height:72px}.ltip dd{white-space:normal}}

/* statement */
.lstate{display:flex;flex-direction:column}
.lsh{display:flex;justify-content:space-between;gap:10px;padding:0 0 8px;border-bottom:1px solid var(--ln)}
.lsr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:baseline;padding:9px 0;border-bottom:1px solid var(--ln2)}
.lsr .l{display:flex;flex-direction:column;gap:2px;font-size:14.5px}
.lsr .v{font:300 20px/1 var(--f-sans);font-variant-numeric:tabular-nums;letter-spacing:-.02em;text-align:right;white-space:nowrap}
.lsr .v small{font-size:12px;font-weight:500}
.lsr.tot{border-top:1px solid var(--ln);border-bottom:1px solid var(--ln)}
.lsr.tot .l{font-weight:500}.lsr.tot .v{font-weight:500}
.lsr.muted .l{color:var(--dim)}
.lsr.act{grid-template-columns:1fr;background:var(--blue);color:var(--ivory);padding:12px;margin-top:10px;border:0}
.lsr.act .l{font-weight:500}

/* season ribbon */
.lrib{display:flex;gap:2px;min-height:56px}
.lrib .rc{position:relative;display:flex;flex-direction:column;justify-content:flex-end;gap:3px;padding:6px 6px 5px;min-width:0;border:1px solid var(--ln);background:var(--white)}
.lrib .rc small{font-size:12px;line-height:1.15;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.lrib .rc.done{background:var(--b5);color:var(--blue)}
.lrib .rc.now{background:var(--blue);border-color:var(--blue);color:var(--ivory)}
.lrib .rc.next{border-style:dashed;color:var(--dim)}
.lrib .rc.hatch{background-image:var(--hatch)}
.lrib .rc .pos{position:absolute;top:-4px;bottom:-4px;width:3px;background:var(--lime);box-shadow:0 0 0 1px var(--navy)}
.lrib.per .rc{flex:1}
.lrib.per .rc b{font-weight:400}
.lrib.per .rc.now{background:var(--blue);color:var(--ivory)}

/* decision card */
.ldec{display:flex;flex-direction:column;gap:12px}
.ldec .what{font:500 clamp(24px,2.4vw,34px)/1.05 var(--f-sans);letter-spacing:-.03em}
.ldec .why{font-size:15px;line-height:1.35;max-width:46ch}
.ldec .row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}

/* field hub */
.fdtabs{display:flex;flex-wrap:wrap;padding-left:1px;border-bottom:1px solid var(--ln)}
.fdtabs button{margin-left:-1px;min-height:44px;padding:0 14px;border:1px solid var(--ln);border-bottom:0;background:var(--ivory);color:var(--blue);
 font:500 14px var(--f-sans);cursor:pointer}
.fdtabs button[aria-selected="true"]{background:var(--blue);color:var(--ivory);border-color:var(--blue)}
.fdtabs button:hover{background:var(--lime);color:var(--on-lime)}
.fdp[hidden]{display:none!important}
.ltile{display:flex;flex-direction:column;gap:12px}
.ltile .top{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.ltile .hl{font-size:15.5px;line-height:1.3}
.lform{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.lform .full{grid-column:1/-1}
.lform label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:500}
.lform .chk{flex-direction:row;align-items:center;gap:8px;font-weight:400}
.llist{display:flex;flex-direction:column}
.llist .it{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;padding:10px 0;border-bottom:1px solid var(--ln2);align-items:baseline;font-size:14px}
.llist .it:last-child{border-bottom:0}
.lprog{display:flex;gap:2px}
.lprog span{flex:1;padding:8px 10px;border:1px solid var(--ln);font:400 12px var(--f-mono);color:var(--dim);background:var(--white)}
.lprog span.ok{background:var(--blue);color:var(--ivory);border-color:var(--blue)}
/* territory heat cells: discrete squares, pale = empty */
.hgrid{display:grid;gap:2px;max-width:100%;overflow-x:auto}
.hgrid>*{aspect-ratio:1;min-width:14px}
.hgrid i.e{background:var(--ln2);opacity:.35}
.hgrid button{border:1px solid var(--navy);color:var(--navy);font:400 12px/1 var(--f-mono);cursor:pointer;padding:0;display:grid;place-items:center}
.hgrid button[aria-pressed="true"]{outline:2px solid var(--lime);outline-offset:1px}
.hgrid button:hover{outline:2px solid var(--navy)}
/* soil report zone cells */
.rgrid{min-width:0;overflow-x:auto}
.rgrid canvas{display:block}
.rxa{display:inline-flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.llist .it.rx{grid-template-columns:auto minmax(0,1fr) auto}
@media (max-width:760px){.llist .it.rx{grid-template-columns:1fr}.rxa{justify-content:flex-start}.lform{grid-template-columns:1fr}.lrib{flex-wrap:wrap}.lrib:not(.per) .rc{flex:1 1 30%!important}.lrib.per{display:grid;grid-template-columns:repeat(6,minmax(0,1fr))}}
/* field map: vegetation index picker + legend */
.vix{border-bottom:1px solid var(--ln);flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
.vix .chip{flex:none}
.vix .chip{min-height:34px;font-size:13px;padding:0 10px}
.vleg{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 14px;border-top:1px solid var(--ln)}
.vleg .bar{flex:1 1 120px;min-width:80px;height:8px;border:1px solid var(--ln2)}
.vleg .co.dim:last-child{flex-basis:100%}
/* fertiliser form + records + P/K budget (fert.js) */
.fert-f{display:flex;flex-direction:column;gap:12px}
.fpick{border:1px solid var(--ln2);padding:8px 12px;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:6px 14px;max-height:220px;overflow:auto}
.fpick legend{font-size:13px;font-weight:500;padding:0 4px}
.fpick .chk{font-size:14px}
.fana summary{cursor:pointer;padding:4px 0}
.fana .fana3{grid-template-columns:repeat(3,minmax(0,1fr));margin:8px 0}
.fsum{font:400 14px/1.3 var(--f-mono);margin:0;min-height:1.3em}
.llist .it.fit{grid-template-columns:auto minmax(0,1fr);row-gap:4px}
.llist .it.fit>span:last-child{grid-column:2;display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.llist .it.fit .tag{margin-left:4px}
.llist .x{border:0;background:none;color:inherit;font:400 18px/1 var(--f-sans);padding:0 4px;margin-left:6px;cursor:pointer;opacity:.7}
.llist .x:hover,.llist .x:focus-visible{opacity:1}
.pkg{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:var(--gut)}
.pkb{display:flex;flex-direction:column;gap:8px;min-width:0}
.pkh{display:flex;justify-content:space-between;gap:8px;align-items:baseline;flex-wrap:wrap}
.pkv{display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:10px}
.pkv>div{display:flex;flex-direction:column;gap:3px}
.pkv b{font:300 28px/1 var(--f-sans);letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.pkv .now b{font-weight:500}
.pkt{position:relative;height:16px;border-bottom:1px solid var(--ln);margin:6px 0 2px}
.pkt .band{position:absolute;bottom:0;height:16px;background:var(--b5)}
.pkt .rng{position:absolute;bottom:5px;height:6px;background:var(--b3)}
.pkt .mk{position:absolute;bottom:0;width:2px;height:16px;margin-left:-1px;background:var(--blue)}
.pkt .mk.now{width:10px;height:10px;margin-left:-5px;bottom:3px;border-radius:50%;background:var(--blue)}
.pkt .mk.hv{background:none;border-left:2px dashed var(--blue)}
.pkleg{display:flex;gap:12px;flex-wrap:wrap}
.pkleg i{display:inline-block;width:10px;height:10px;margin-right:5px;vertical-align:-1px;background:var(--blue)}
.pkleg i.lab{width:2px}.pkleg i.now{border-radius:50%}.pkleg i.hv{width:0;border-left:2px dashed var(--blue);background:none}
.pkleg i.band{background:var(--b5)}
.pkc{border-left:2px solid var(--blue);padding-left:10px}
/* This week on a field (AspaceLedger.weekCard) */
.wk{display:flex;flex-direction:column;gap:14px}
.wk-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.wk-t{border:1px dashed var(--b3,#7D8BDA);padding:12px 14px;display:flex;flex-direction:column;gap:6px;min-width:0}
.wk-t .num{font-size:clamp(28px,3vw,40px)}
.wk-sec{display:flex;justify-content:space-between;align-items:baseline;border-top:1px solid var(--ln,#C8CCE5);padding-top:12px}
.wk-acts,.wk-tasks{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.wk-acts li{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:start}
/* which days are workable (ledger.js workDays) */
.wk-days{display:inline-flex;gap:3px;flex-wrap:nowrap}
.wk-days .wd,.wk-dleg .wd{display:inline-grid;place-items:center;width:24px;height:24px;font:400 12px/1 var(--f-mono);font-style:normal;
 border:1px solid var(--b4,#A7B2E6);color:var(--dim,#4A4F6A);background:transparent}
.wk-days .wd.y,.wk-dleg .wd.y{background:var(--blue,#223BC3);border-color:var(--blue,#223BC3);color:var(--ivory,#F7F5EF)}
.wk-days .wd.m,.wk-dleg .wd.m{background:var(--b5,#DCE0F1);border-color:var(--b3,#6B7FD6);color:var(--navy,#0B1A6E)}
.wk-days.sm .wd{width:18px;height:18px}
.wk-wd{display:inline-flex;align-items:center;gap:8px;justify-content:flex-end;white-space:nowrap}
.wk-dleg{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.wk-dleg .wd{width:12px;height:12px;margin-left:4px}.wk-dleg .wd:first-child{margin-left:0}
.wk-p{font:400 12px/1 var(--f-mono);padding:6px 10px;border:1px solid var(--navy,#0B1A6E);color:var(--navy,#0B1A6E);min-width:72px;text-align:center}
.wk-p.q1{background:var(--q1)}.wk-p.q2{background:var(--q2)}.wk-p.q3{background:var(--q3)}
.wk-a{display:flex;flex-direction:column;gap:3px;min-width:0}
.wk-a b{font-weight:500}
.wk-tasks li{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center}
.wk-tasks li.done span:not(.co){text-decoration:line-through;opacity:.6}
.wk-tasks input[type=checkbox]{width:18px;height:18px;margin:0;accent-color:var(--blue,#223BC3)}
@media (max-width:600px){.wk-tiles{grid-template-columns:1fr}.wk-acts li{grid-template-columns:auto minmax(0,1fr)}.wk-acts li .lnk{grid-column:2}}
/* workspace field lists (N & Water Balance, Carbon Balance): toolbar, open row, pager */
/* the toolbar sits above the bordered list, outside its frame */
.fl-tools{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:0 0 12px}
.fl-tools .chip[disabled]{opacity:.45;cursor:default;pointer-events:none}
.tb td.xo{text-align:right;white-space:nowrap;width:1%}
.tb tr.open>td{border-bottom:0}
/* the open field reads as one block: a tinted head row, a blue bar down the left of the row and its
   detail, and a blue rule closing it; the detail keeps the page colour so charts are unchanged */
.tb tbody tr.open{background:var(--b5)}
.tb tr.open>td:first-child,.tb tr.xrow>td{box-shadow:inset 4px 0 0 var(--blue)}
.tb tr.open>td:first-child{padding-left:16px}
.tb tr.open .xo .lnk{font-weight:600}
.tb tr.xrow>td{padding:4px 12px 28px 16px;border-bottom:2px solid var(--blue)}
.xd{min-width:0;max-width:100%}
/* the open row stays inside the screen even when the table scrolls sideways (phones) */
@media (max-width:900px){.tb tr.xrow>td .xd{position:sticky;left:0;max-width:calc(100vw - 48px)}}
.fl-foot{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;padding:12px 0 0}
@media (max-width:640px){.tb tr.xrow>td{padding:4px 0 22px 12px}}
.tb td.nw{white-space:nowrap}
