:root{--brand:#256b22;--brand-dark:#184e1b;--accent:#f59e0b;--info:#2563eb;--danger:#c2410c;--ink:#172033;--muted:#5f6b7a;--line:#d8dee8;--surface:#f4f6f9;--panel:#fff;--affirm-ui-font:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}
*{box-sizing:border-box}
html{width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%}
body{width:100%;margin:0;overflow-x:hidden;font-family:var(--affirm-ui-font);color:var(--ink);background:var(--surface)}
header{
  position:relative;
  z-index:200;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:16px;
  min-height:78px;
  padding:12px 24px;
  background:#fff;
  border-bottom:1px solid var(--line);
  box-shadow:0 1px 10px rgba(15,23,42,.08);
  overflow:hidden;
}
header::after{
  content:"";
  position:absolute;
  top:-42px;
  right:-54px;
  width:210px;
  height:120px;
  background:linear-gradient(135deg,rgba(37,107,34,.12),rgba(245,158,11,.16));
  transform:rotate(-12deg);
  pointer-events:none;
}
header::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:4px;
  background:linear-gradient(90deg,var(--brand) 0%,var(--brand) 52%,var(--accent) 52%,var(--accent) 68%,var(--info) 68%,var(--info) 100%);
}
header img{
  width:148px;
  height:52px;
  padding:6px 10px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  object-fit:contain;
  box-shadow:0 1px 4px rgba(15,23,42,.06);
}
h1{
  max-width:1100px;
  margin:0;
  color:var(--brand-dark);
  font-size:clamp(18px,2vw,24px);
  line-height:1.2;
  letter-spacing:0;
  text-wrap:balance;
}
.app-title-block{
  position:relative;
  z-index:1;
  min-width:0;
}
.app-title,.app-subtitle{
  margin:0;
  letter-spacing:0;
}
.app-title{
  color:var(--brand-dark);
  font:900 clamp(27px,3vw,42px)/.95 var(--affirm-ui-font);
}
.app-subtitle{
  margin-top:7px;
  color:#41513f;
  font:800 clamp(13px,1.25vw,17px)/1.25 var(--affirm-ui-font);
  text-wrap:balance;
}
h2{margin:14px 0 8px;font-size:18px}
section{margin-bottom:16px}

.layout{display:grid;grid-template-columns:minmax(720px,46vw) 1fr;min-height:calc(100vh - 85px);transition:grid-template-columns .18s ease}
.layout.sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)}
aside{display:grid;grid-template-columns:1fr 1fr;align-content:start;gap:10px;min-width:0;overflow:auto;padding:12px;background:#d9e1dc;color:var(--ink)}
.sidebar-collapsed aside{min-width:0;width:0;padding:0;gap:0;overflow:hidden;visibility:hidden;pointer-events:none}
main{min-width:0;overflow:auto;padding:16px}
.sidebar-toggle{position:fixed;top:50%;left:calc(min(720px,46vw) - 17px);z-index:10000;width:34px;height:48px;padding:0;background:#ffb13b;color:#103b09;border:2px solid #fff;border-radius:8px;box-shadow:0 4px 16px rgba(0,0,0,.34),0 0 0 2px rgba(16,59,9,.28);font-size:28px;font-weight:900;line-height:1;transform:translateY(-50%);transition:left .18s ease,background-color .16s ease,box-shadow .16s ease,color .16s ease}
.sidebar-toggle:hover:not(:disabled){background:#ffd166;color:#062f05;box-shadow:0 5px 18px rgba(0,0,0,.38),0 0 0 3px rgba(255,255,255,.45)}
.sidebar-toggle:active:not(:disabled){transform:translateY(-50%)}
body.sidebar-is-collapsed .sidebar-toggle{left:0;border-radius:0 8px 8px 0}
.run-rec-cluster{position:fixed;right:18px;bottom:22px;z-index:10000;display:grid;justify-items:end;gap:7px}
.run-rec-toggle{display:flex;align-items:center;justify-content:center;width:52px;height:52px;padding:0;background:var(--brand);color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 4px 14px rgba(15,23,42,.24);font-size:20px;font-weight:900;line-height:1}
.run-rec-toggle svg,.action-command svg{display:block;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.run-rec-toggle svg{fill:currentColor;stroke:none;width:23px;height:23px;margin-left:2px}
.run-rec-toggle:hover:not(:disabled){background:var(--brand-dark);box-shadow:0 5px 16px rgba(15,23,42,.28)}
.scenario-sync-status{max-width:132px;padding:5px 8px;background:#fff;color:var(--muted);border:1px solid var(--line);border-radius:999px;box-shadow:0 3px 10px rgba(15,23,42,.12);font-size:11px;font-weight:800;line-height:1.1;text-align:center}
.scenario-sync-status.current{color:#166534;border-color:#86c68c;background:#f0f9f1}
.scenario-sync-status.stale{color:#9a3412;border-color:#fdba74;background:#fff7ed}
.scenario-sync-status.not-run{color:#475569;background:#f8fafc}
.sidepanel{min-width:0;padding:10px;background:#dfe7e3;color:var(--ink);border:1px solid #c0ccc5;border-radius:8px;box-shadow:none}
.sidepanel h2{margin-top:12px;padding-top:7px;color:var(--ink)}
.sidepanel label{display:block;margin:6px 0;color:var(--ink);font-size:13px;font-weight:700;line-height:1.25}

button,.button{display:inline-block;min-height:40px;padding:10px 12px;background:var(--brand);color:#fff;border:1px solid var(--brand-dark);border-radius:4px;font:700 14px/1.2 var(--affirm-ui-font);text-decoration:none;cursor:pointer;transition:background-color .16s ease,box-shadow .16s ease,transform .16s ease}
button:hover:not(:disabled),.button:hover{background:var(--brand-dark);box-shadow:0 2px 6px rgba(15,23,42,.18)}
button:active:not(:disabled),.button:active{transform:translateY(1px)}
button:disabled,.button[aria-disabled="true"]{background:#71816c;color:#e8eee5;box-shadow:none;opacity:.72;cursor:not-allowed}
.secondary-button{padding:6px 9px;background:#fff;color:var(--brand-dark);border-color:#b6c3d1}
.secondary-button:hover:not(:disabled){background:#f8fafc;color:var(--brand-dark)}
.secondary-button:disabled{opacity:.5;cursor:not-allowed}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid #ff9f1c;outline-offset:3px}

select,input{width:100%;min-width:0;padding:8px;border:1px solid #b6c3d1;border-radius:4px;font:inherit}
.sidepanel input:not([type="range"]),.sidepanel select{min-height:36px;padding:7px 9px;background:#fff;color:var(--ink);border:1px solid #b6c3d1;border-radius:5px;box-shadow:none;font-weight:600;transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease}
.sidepanel select{appearance:none;padding-right:30px;background-image:linear-gradient(45deg,transparent 50%,#475569 50%),linear-gradient(135deg,#475569 50%,transparent 50%);background-position:calc(100% - 16px) 50%,calc(100% - 10px) 50%;background-size:6px 6px,6px 6px;background-repeat:no-repeat}
.sidepanel input:not([type="range"]):focus,.sidepanel select:focus{background:#fff;border-color:var(--info);box-shadow:0 0 0 3px rgba(37,99,235,.16);outline:0}
.sidepanel input:not([type="range"]):disabled,.sidepanel select:disabled{background:#eef2f7;color:#64748b;border-color:#cbd5e1;opacity:1}
.required-field input,.required-field select{border-left:4px solid var(--accent)}

.row2,.legal-land-row{display:grid;gap:8px}
.row2{grid-template-columns:2fr 1fr;align-items:end}
.legal-land-row{grid-template-columns:repeat(5,minmax(0,1fr));align-items:end;column-gap:6px}
.legal-land-row label{display:flex;flex-direction:column;justify-content:flex-end;height:100%;min-width:0;font-size:12px;white-space:nowrap}
.legal-land-row select{min-width:0;min-height:35px;padding-left:5px;padding-right:5px}
.input-with-unit{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:3px}
.input-with-unit input{flex:1;min-width:0;order:1}
.input-with-unit>span:last-child{order:2;padding:7px 8px;background:#f1f5f9;color:#475569;border:1px solid #cbd5e1;border-radius:5px;font-size:12px;font-weight:800;line-height:1;white-space:nowrap}
.input-with-unit .input-validation{flex-basis:100%;order:3}
.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;white-space:nowrap}

.is-loading{position:relative;padding-left:38px!important}
.is-loading::before,.import-status.loading::before{content:"";position:absolute;border-radius:50%;animation:button-spin .7s linear infinite}
.is-loading::before{left:50%;top:50%;width:16px;height:16px;margin:-11px 0 0 -11px;border:3px solid rgba(255,255,255,.45);border-top-color:#fff}
@keyframes button-spin{to{transform:rotate(360deg)}}

.farm-optimizer-inputs{margin:0 0 14px;padding:12px;background:linear-gradient(145deg,#eef3ef 0%,#dbe5de 100%);color:var(--ink);border:1px solid #b8c8bd;border-left:5px solid var(--accent);border-radius:7px;box-shadow:inset 2px 2px 5px rgba(82,100,86,.22),inset -2px -2px 5px rgba(255,255,255,.72),0 1px 0 rgba(255,255,255,.55)}
.farm-optimizer-inputs label{color:var(--ink)}
.farm-detail-control{display:block;margin:8px 0;padding:9px 10px;background:linear-gradient(145deg,#f9fbf8 0%,#e6eee7 100%);color:var(--ink);border:1px solid #b9c8bd;border-left:4px solid var(--brand);border-radius:6px;box-shadow:inset 1px 1px 4px rgba(74,91,80,.18),inset -1px -1px 4px rgba(255,255,255,.82)}
.farm-detail-control input{margin-top:6px}
.sidepanel .farm-optimizer-inputs h2.farm-details-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0 0 12px;padding:9px 10px;color:var(--brand-dark);background:linear-gradient(145deg,#f2f6f1 0%,#dfe9e0 100%);border:1px solid #b7c7bf;border-left:5px solid var(--brand);border-radius:6px;box-shadow:inset 1px 1px 4px rgba(73,88,80,.2),inset -1px -1px 4px rgba(255,255,255,.76);text-shadow:0 1px 0 rgba(255,255,255,.7)}
.sidepanel .farm-optimizer-inputs h2.farm-details-heading::before{content:"Farm";flex:0 0 auto;padding:3px 7px;background:var(--brand);color:#fff;border-radius:4px;font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.sidepanel .farm-optimizer-inputs h2.farm-details-heading span{color:var(--ink)}
.sidepanel h2.sidebar-group-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:12px 0 10px;padding:9px 10px;color:var(--ink);background:linear-gradient(145deg,#eef4f1 0%,#dbe5e0 100%);border:1px solid #b7c7bf;border-left:5px solid var(--info);border-radius:6px;box-shadow:inset 1px 1px 4px rgba(73,88,80,.2),inset -1px -1px 4px rgba(255,255,255,.72);text-shadow:0 1px 0 rgba(255,255,255,.65)}
.sidepanel h2.sidebar-group-heading.field-details-continuation{margin-top:0}
.sidepanel h2.sidebar-group-heading::before{content:"Field";flex:0 0 auto;padding:3px 7px;background:var(--info);color:#fff;border-radius:4px;font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;text-shadow:none}
.sidepanel h2.sidebar-group-heading span{color:var(--ink)}
.sidepanel h2.sidebar-group-heading+.sidebar-section{margin-top:10px}
.sidepanel h2.sidebar-group-heading~.sidebar-section{background:linear-gradient(145deg,#f7faf7 0%,#e7eee8 100%);border-color:#b9c8bd;box-shadow:inset 1px 1px 4px rgba(74,91,80,.16),inset -1px -1px 4px rgba(255,255,255,.82)}
.farm-field{display:grid;gap:8px;margin:8px 0;padding:10px;background:linear-gradient(145deg,#f9fbf8 0%,#e6eee7 100%);border:1px solid #b9c8bd;border-left:4px solid #7f91a3;border-radius:6px;box-shadow:inset 1px 1px 4px rgba(74,91,80,.18),inset -1px -1px 4px rgba(255,255,255,.82);transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease}
.farm-field.active{background:linear-gradient(145deg,#fff8e8 0%,#eadfc9 100%);border-color:#d69b37;border-left-color:var(--accent);box-shadow:inset 1px 1px 5px rgba(119,82,21,.2),inset -1px -1px 5px rgba(255,255,255,.78),0 0 0 1px rgba(245,158,11,.18)}
.farm-field label{margin:0}
.farm-field .field-select{width:auto;margin:0 6px 0 0}
.field-name-control>span{display:flex;align-items:center;margin-bottom:6px}
.field-size-control .input-with-unit{margin-top:6px}
.farm-field .input-with-unit>span:last-child{background:#f1f5f9;color:#475569;border-color:#cbd5e1}
.field-row-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:3px}
.scenario-status{display:inline-block;margin:0;padding:5px 8px;background:#f1f5f9;color:#475569;border:1px solid #cbd5e1;border-radius:999px;font-size:12px;font-weight:900;line-height:1}
.farm-help{margin:10px 0 0;padding:9px 10px;background:linear-gradient(145deg,#edf4f2 0%,#dde8e4 100%);color:#475569;border:1px solid #b9c8bd;border-left:4px solid var(--info);border-radius:6px;box-shadow:inset 1px 1px 4px rgba(74,91,80,.16),inset -1px -1px 4px rgba(255,255,255,.76);font-size:12.5px;font-weight:700;line-height:1.35}

.sidebar-section{margin:9px 0;overflow:hidden;background:linear-gradient(145deg,#f7faf7 0%,#e7eee8 100%);border:1px solid #b9c8bd;border-radius:6px;box-shadow:inset 1px 1px 4px rgba(74,91,80,.16),inset -1px -1px 4px rgba(255,255,255,.82)}
.sidebar-section summary{padding:9px 10px;background:linear-gradient(180deg,#f3f7f4 0%,#e2ebe5 100%);color:var(--ink);border-bottom:1px solid rgba(133,153,139,.45);font-size:15px;font-weight:800;list-style:none;cursor:pointer;text-shadow:0 1px 0 rgba(255,255,255,.65)}
.sidebar-section summary::-webkit-details-marker{display:none}
.sidebar-section summary::after{content:"+";float:right;font-size:22px;line-height:18px}
.sidebar-section[open] summary::after{content:"-"}
.sidebar-section-content{padding:5px 10px 10px}
.sidebar-section-content>label:first-child{margin-top:8px}

.sidebar-output-grid{display:grid;gap:9px;margin:12px 0}
.sidebar-output-card{display:block;padding:10px;background:linear-gradient(145deg,#f8fbf7 0%,#e4ece5 100%);color:var(--ink);border:1px solid #b9c8bd;border-left:4px solid var(--accent);border-radius:6px;box-shadow:inset 1px 1px 4px rgba(74,91,80,.18),inset -1px -1px 4px rgba(255,255,255,.82)}
.sidebar-output-card>span{display:block;margin-bottom:6px;color:#245320;font-size:12px;font-weight:800;line-height:1.25}
.sidebar-output-card strong{display:flex;align-items:baseline;gap:7px;color:var(--brand-dark);font-size:24px;font-weight:900;line-height:1}
.sidebar-output-card small{color:#315934;font-size:13px;font-weight:800;line-height:1.15}
.investment-ratio-control{display:block;margin:12px 0 8px;padding:10px;background:linear-gradient(145deg,#f7faf8 0%,#e3ebe5 100%);color:var(--ink);border:1px solid #b9c8bd;border-left:4px solid var(--info);border-radius:6px;box-shadow:inset 1px 1px 4px rgba(74,91,80,.18),inset -1px -1px 4px rgba(255,255,255,.82)}
.investment-ratio-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;color:#245320;font-weight:900}
.investment-ratio-head output{min-width:48px;padding:5px 9px;background:#0f5f2b;color:#fff;border-radius:999px;text-align:center;font-size:18px;line-height:1;box-shadow:0 2px 5px rgba(0,45,0,.25)}
#inv_rat{appearance:none;width:100%;height:10px;padding:0;background:linear-gradient(90deg,#38bdf8 0%,#8b5cf6 55%,#ffb13b 100%);border:0;border-radius:999px;box-shadow:inset 0 1px 3px rgba(0,0,0,.25);cursor:pointer}
#inv_rat::-webkit-slider-thumb{appearance:none;width:24px;height:24px;background:#174f10;border:3px solid #fff;border-radius:50%;box-shadow:0 2px 7px rgba(0,0,0,.35);cursor:pointer}
#inv_rat::-moz-range-thumb{width:20px;height:20px;background:#174f10;border:3px solid #fff;border-radius:50%;box-shadow:0 2px 7px rgba(0,0,0,.35);cursor:pointer}
#inv_rat::-moz-range-track{height:10px;background:linear-gradient(90deg,#38bdf8 0%,#8b5cf6 55%,#ffb13b 100%);border:0;border-radius:999px}
.investment-ratio-scale{display:flex;justify-content:space-between;margin-top:8px;color:#315934;font-size:12px;font-weight:800}

.warn{margin:6px 0;padding:8px 10px;background:#fff7ed;color:var(--danger);border:1px solid #fdba74;border-left:4px solid var(--danger);border-radius:6px;font-weight:bold;white-space:pre-line}
.warn:empty,.recommended-budget-warning:empty,.prediction-limit-warning:empty,.input-validation:empty{display:none}
.large{font-size:18px}
.input-validation{margin-top:4px;padding:6px 8px;background:#fff7ed;color:var(--danger);border-left:4px solid var(--danger);font-weight:bold}
.validation-summary{display:none;margin:0 0 18px;padding:13px 15px;background:#fff7ed;color:var(--danger);border:2px solid #fdba74;border-radius:6px;text-align:center}
.validation-summary:not(:empty){display:block}
.recommended-budget-warning,.investment-warning{margin:-2px 0 10px;padding:7px 9px;background:#fff2a8;color:#5f3f00;border:1px solid #d18b00;border-left:5px solid #d18b00;border-radius:5px;font-weight:bold}
.investment-warning{margin:10px 0 0;padding:8px 10px;background:#fff0e6;color:#8a2c00;border-color:#d96b00;border-left:6px solid #d96b00;font-size:15px;font-weight:800;line-height:1.35}
.prediction-limit-warning{margin:-6px 0 14px;padding:10px 12px;background:#fff0e6;color:#8a2c00;border:1px solid #d96b00;border-left:6px solid #d96b00;border-radius:6px;font-size:16px;font-weight:bold;line-height:1.35}
.prediction-limit-warning strong{display:inline-block;padding:1px 5px;background:#fff;color:#5f1f00;border:1px solid rgba(217,107,0,.45);border-radius:4px}

.tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 20px;padding:8px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 1px 6px rgba(15,23,42,.06)}
.tab{position:relative;flex:1 1 150px;min-height:62px;padding:11px 12px 12px;background:#fff;color:#263524;border:1px solid #c6d4c0;border-radius:8px;box-shadow:0 1px 2px rgba(0,0,0,.06);transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease,color .16s ease}
.tab::after{content:"";position:absolute;left:12px;right:12px;bottom:7px;height:3px;background:transparent;border-radius:999px;transition:background-color .16s ease}
.tab span,.tab small{display:block}
.tab span{font-size:15px;line-height:1.15}
.tab small{margin-top:4px;color:#52644c;font-size:11px;font-weight:400;line-height:1.15;opacity:1}
.tab:hover:not(:disabled){background:#f8fafc;color:var(--brand-dark);border-color:#94a3b8;box-shadow:0 3px 9px rgba(15,23,42,.10);transform:translateY(-1px)}
.tab:hover:not(:disabled)::after{background:var(--accent)}
.tab.active,.tab.active:hover:not(:disabled){background:var(--brand);color:#fff;border-color:var(--brand-dark);box-shadow:0 5px 14px rgba(37,107,34,.22);transform:none}
.tab.active::after{background:var(--accent)}
.tab.active small{color:#e9f5e5;opacity:.95}
.panel{display:none}
.panel.active{display:block}
.panel>h2{margin-top:4px}

.summary-tools{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;margin-bottom:24px}
.summary-card{margin:0;padding:18px;background:#fff;border:1px solid var(--line);border-top:5px solid var(--brand);border-radius:8px;box-shadow:0 1px 6px rgba(15,23,42,.06)}
.summary-card h2{margin:0 0 14px;color:#174f10;font-size:18px}
.tutorial-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.tutorial-links a,.disabled-help-link{display:flex;align-items:center;gap:10px;padding:10px 12px;background:#fff;color:#000080;border:1px solid #ccd2df;border-radius:5px;text-decoration:none;font-weight:bold}
.tutorial-links a:hover{background:#f1faed;border-color:#398f0e}
.tutorial-links a span,.disabled-help-link span{display:inline-block;min-width:52px;padding:4px 6px;background:#398f0e;color:#fff;border-radius:4px;text-align:center;font-size:12px}
.disabled-help-link{color:#64748b;background:#f8fafc;border-color:#d8dee8;cursor:not-allowed;opacity:.78}
.disabled-help-link span{background:#7f8a79;color:#fff}
.under-development-notice{margin:0 0 12px;padding:10px 12px;background:#fff7ed;color:#8a2c00;border:1px solid #fdba74;border-left:5px solid var(--accent);border-radius:6px;font-weight:800;line-height:1.35}
.data-save-actions{margin-top:0;padding:15px;background:#fff;border:1px solid var(--line);border-left:6px solid var(--accent);border-radius:7px;box-shadow:0 1px 6px rgba(15,23,42,.06)}
.data-save-actions h3{margin:0 0 11px;color:#174f10;font-size:16px}
.project-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0}
.action-command{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"icon label" "icon meta";align-items:center;column-gap:11px;min-height:58px;width:100%;margin:0;padding:10px 12px;background:#fff;color:var(--ink);border:1px solid var(--line);border-left:5px solid var(--brand);border-radius:8px;box-shadow:none;font:700 14px/1.15 var(--affirm-ui-font);text-align:left;cursor:pointer;transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.action-command:hover:not(:disabled){background:#f4fbf0;color:#103b09;border-color:#7ea56f;box-shadow:0 4px 11px rgba(23,63,23,.15);transform:translateY(-1px)}
.action-command span{grid-area:icon;display:flex;align-items:center;justify-content:center;width:34px;height:34px;background:var(--brand);color:#fff;border-radius:50%;font-size:20px;font-weight:900;line-height:1}
.action-command strong{grid-area:label;min-width:0;color:inherit;font-size:14px;line-height:1.15}
.action-command small{grid-area:meta;color:#52644c;font-size:11px;font-weight:800;line-height:1.15;text-transform:uppercase}
.action-save{border-left-color:#28740d}
.action-load{border-left-color:var(--info)}
.action-load span{background:var(--info)}
.action-print{border-left-color:var(--accent)}
.action-print span{background:#b45309}
.project-upload input{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;white-space:nowrap}
.import-status{margin:8px 0 0;font-weight:bold}
.import-status.success{padding:8px;background:#e4f7df;color:#187000;border:1px solid #187000}
.import-status.error{padding:8px;background:#ffc300;color:brown;border:1px solid brown}
.import-status.loading{position:relative;padding:8px 8px 8px 34px;color:#174f10}
.import-status.loading::before{left:10px;top:50%;width:12px;height:12px;margin-top:-8px;border:3px solid #b9cfb2;border-top-color:#28740d}

.snap{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:20px 0 22px;padding:0}
.snap>div{
  position:relative;
  display:flex;
  align-items:flex-start;
  min-height:112px;
  padding:16px 16px 15px 58px;
  background:#fff;
  color:var(--ink);
  border:1px solid var(--line);
  border-left:6px solid var(--brand);
  border-radius:10px;
  box-shadow:0 1px 8px rgba(15,23,42,.07);
  line-height:1.3;
  overflow:hidden;
}
.snap>div::before{
  content:"";
  position:absolute;
  left:16px;
  top:17px;
  width:26px;
  height:26px;
  border-radius:999px;
  background:var(--brand);
  box-shadow:inset 0 0 0 7px #fff,0 0 0 1px rgba(15,23,42,.16);
}
.snap>div::after{
  content:"Recommendation";
  position:absolute;
  left:58px;
  right:14px;
  bottom:13px;
  color:var(--muted);
  font-size:11px;
  font-weight:900;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.snap b{
  display:block;
  padding-bottom:20px;
  color:inherit;
  font-size:16px;
  font-weight:900;
  line-height:1.3;
}
.snap div:nth-child(1){border-left-color:var(--info)}
.snap div:nth-child(1)::before{background:var(--info)}
.snap div:nth-child(2){border-left-color:#64748b}
.snap div:nth-child(2)::before{background:#64748b}
.snap div:nth-child(3){border-left-color:#dc2626}
.snap div:nth-child(3)::before{background:#dc2626}
.no-recommendation{width:100%;margin:32px auto;color:#d00000;font-size:24px;font-weight:bold;text-align:center}

.cap{
  display:flex;
  align-items:flex-start;
  gap:9px;
  margin:0 0 16px;
  padding:10px 12px;
  background:#f8fafc;
  color:var(--ink);
  border:1px solid var(--line);
  border-left:5px solid var(--info);
  border-radius:7px;
  font-size:15px;
  font-style:normal;
  font-weight:800;
  line-height:1.35;
}
.cap::before{
  content:"";
  flex:0 0 auto;
  width:18px;
  height:18px;
  margin-top:1px;
  border-radius:999px;
  background:var(--info);
  box-shadow:inset 0 0 0 5px #fff,0 0 0 1px rgba(37,99,235,.35);
}
#opt>.cap{border-left-color:var(--info)}
#inter>.cap{border-left-color:#64748b}
#low>.cap{border-left-color:#dc2626}
#inter>.cap::before{background:#64748b;box-shadow:inset 0 0 0 5px #fff,0 0 0 1px rgba(100,116,139,.35)}
#low>.cap::before{background:#dc2626;box-shadow:inset 0 0 0 5px #fff,0 0 0 1px rgba(220,38,38,.35)}

/* Modern responsive table system - hosting-safe, high-contrast, web-native */
.tablewrap{
  position:relative!important;
  overflow:auto!important;
  max-width:100%!important;
  margin-top:16px!important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbf6 100%)!important;
  border:1px solid rgba(57,143,14,.22)!important;
  border-radius:14px!important;
  box-shadow:0 12px 30px rgba(23,79,16,.10),0 2px 8px rgba(0,0,0,.06)!important;
  -webkit-overflow-scrolling:touch!important;
}
.tablewrap::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg,#174f10,#398f0e,#ff9f1c);
  border-radius:14px 14px 0 0;
  pointer-events:none;
  z-index:2;
}
table{
  width:100%!important;
  margin-top:0!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  background:#fff!important;
  font-size:13.5px!important;
  line-height:1.35!important;
}
.tablewrap th,.tablewrap td{
  padding:10px 12px!important;
  border:0!important;
  border-bottom:1px solid rgba(23,79,16,.10)!important;
  text-align:right!important;
  vertical-align:middle!important;
}
.tablewrap th{
  position:sticky!important;
  top:0!important;
  z-index:3!important;
  background:linear-gradient(180deg,#174f10 0%,#236d17 100%)!important;
  color:#fff!important;
  font-size:12px!important;
  font-weight:800!important;
  letter-spacing:.025em!important;
  text-transform:none!important;
  box-shadow:0 2px 0 rgba(255,255,255,.08) inset,0 2px 8px rgba(23,79,16,.16)!important;
}
.tablewrap th:first-child{border-top-left-radius:10px!important}
.tablewrap th:last-child{border-top-right-radius:10px!important}
.tablewrap td{
  color:#243321!important;
  background:rgba(255,255,255,.96)!important;
  font-variant-numeric:tabular-nums!important;
}
.tablewrap tbody tr:nth-child(even) td{background:#f6faf3!important}
.tablewrap tbody tr:hover td{background:#edf8e8!important;transition:background-color .14s ease!important}
.tablewrap td:first-child,.tablewrap th:first-child{
  text-align:left!important;
  font-weight:700!important;
  color:inherit!important;
}
.tablewrap tbody tr:last-child td{border-bottom:0!important}
.tablewrap tbody tr.chosen td,.tablewrap tr.chosen td{
  background:linear-gradient(90deg,#ff9f1c 0%,#ffb84d 100%)!important;
  color:#17230f!important;
  font-weight:900!important;
  border-top:2px solid rgba(255,255,255,.55)!important;
  border-bottom:2px solid rgba(138,90,0,.28)!important;
}
.tablewrap tbody tr.chosen td:first-child::before{
  content:"★ ";
  color:#174f10;
  font-weight:900;
}
.scenario-record .tablewrap,.scenario-record table{box-shadow:none!important}
.scenario-record .tablewrap{margin-top:8px!important}
.scenario-record table{border-radius:10px!important;overflow:hidden!important}
.scenario-record th,.scenario-record td{text-align:left!important}

.panel>h2,
#summary_field_heading,
#map_farm_heading,
#saved_scenarios>h3,
.farm-result>h3,
.farm-result h4,
.scenario-record h4{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  margin:0 0 14px;
  padding:11px 14px;
  background:#fff;
  color:var(--ink)!important;
  border:1px solid var(--line);
  border-left:6px solid var(--brand);
  border-radius:8px;
  box-shadow:0 1px 6px rgba(15,23,42,.06);
  font-weight:900;
  line-height:1.2;
}
.panel>h2::before,
#summary_field_heading::before,
#map_farm_heading::before,
#saved_scenarios>h3::before,
.farm-result>h3::before,
.farm-result h4::before,
.scenario-record h4::before{
  content:"";
  flex:0 0 auto;
  width:9px;
  height:9px;
  background:var(--accent);
  border-radius:999px;
  box-shadow:0 0 0 4px rgba(245,158,11,.16);
}
#tab_cap_opt,
.condition-opt>h3,
.condition-opt h4{border-left-color:var(--info)}
#tab_cap_inter,
.condition-inter>h3,
.condition-inter h4{border-left-color:#64748b}
#tab_cap_low,
.condition-low>h3,
.condition-low h4{border-left-color:#dc2626}
.scenario-record h4{min-height:0;margin:0 0 8px;padding:9px 11px;font-size:15px}
.scenario-record h4::before{width:7px;height:7px}

.farm-opt-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 18px;padding:14px 16px;background:#f8faf7;border:1px solid #c7d3c2;border-left:6px solid #398f0e;border-radius:7px;box-shadow:0 2px 7px rgba(0,0,0,.07)}
.farm-opt-actions h3{margin:0;color:#174f10;font-size:17px}
.farm-opt-actions #print_report{max-width:260px}
.report-cover{display:none}
.report-cover-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,42%);gap:18px;align-items:start;margin:0 0 18px;padding:18px;background:#fff;border:1px solid var(--line);border-left:6px solid var(--brand);border-radius:8px}
.report-cover-card h2{margin:3px 0 6px;color:var(--brand-dark);font-size:25px;line-height:1.15}
.report-cover-card p{margin:0;color:var(--muted)}
.report-kicker{color:var(--brand-dark)!important;font-size:12px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.report-cover-card dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0}
.report-cover-card dl div{padding:10px;background:#f8fafc;border:1px solid var(--line);border-radius:6px}
.report-cover-card dt{margin:0 0 4px;color:var(--muted);font-size:11px;font-weight:900;text-transform:uppercase}
.report-cover-card dd{margin:0;color:var(--ink);font-size:18px;font-weight:900}
.farm-result,.scenario-record{background:#fff;border:1px solid #d4ddd0;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,.07)}
.farm-result{margin-top:24px;padding:16px}
.condition-opt .cap,h4.condition-opt{color:var(--info)!important}
.condition-inter .cap,h4.condition-inter{color:var(--ink)!important}
.condition-low .cap,h4.condition-low{color:#dc2626!important}
.farm-summary-box{margin:10px 0 4px;padding:14px 18px;background:#f8faf7;border:1px solid #c7d3c2;border-left:6px solid #398f0e;border-radius:7px;box-shadow:0 2px 7px rgba(0,0,0,.07);font-size:18px;line-height:1.45}
.farm-summary-box h4{margin:0 0 12px;color:var(--ink)!important;font-size:17px}
.farm-summary-box h5{margin:0 0 6px;color:#174f10;font-size:15px;letter-spacing:0}
.farm-summary-box ul{margin:0;padding-left:22px}
.farm-summary-box li{padding:2px 0}
.farm-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.farm-summary-grid section{padding:10px 12px;background:#fff;border:1px solid #d4ddd0;border-radius:6px}
.scenario-records{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:18px}
.scenario-records .scenario-record:last-child:nth-child(odd){grid-column:1 / -1}
.scenario-record{min-width:0;padding:12px}
.scenario-record p{margin:0 0 8px;font-size:12px}
.scenario-record th{text-align:left;width:62%}
.scenario-record td{text-align:left}
#report_data_record{display:none}

#mapCanvas{position:relative;width:100%;height:clamp(520px,calc(100vh - 150px),760px);overflow:hidden;background:#fff;border:1px solid #bbb}
.mapNotice{padding:12px;background:#fff;color:#333;border:1px solid #bbb}
.map-footnote{margin:8px 0 0;color:#333;font-size:13px;font-style:italic;line-height:1.35}

footer.app-footer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:"disclaimer disclaimer" "link-a link-b";gap:12px 16px;padding:24px clamp(18px,3vw,42px);background:#10251f;color:#eef8ec;border-top:5px solid var(--accent);box-shadow:0 -4px 18px rgba(15,23,42,.16);font-family:var(--affirm-ui-font);font-size:13.5px;line-height:1.6;letter-spacing:.005em}
footer.app-footer section{margin:0;font-size:inherit;line-height:inherit}
.footer-disclaimer-card{grid-area:disclaimer;grid-column:1 / -1;width:100%;padding:4px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);border-radius:14px}
.footer-link-card:nth-of-type(2){grid-area:link-a}
.footer-link-card:nth-of-type(3){grid-area:link-b}
.footer-link-card{padding:4px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);border-radius:14px}
.disclaimer-panel{position:relative;overflow:hidden;border:1px solid rgba(255,255,255,.16);border-radius:10px;background:rgba(255,255,255,.08);box-shadow:none;backdrop-filter:none}
.disclaimer-panel::before{content:"";position:absolute;inset:0 auto 0 0;width:5px;background:linear-gradient(180deg,#ffb13b,#f37021)}
.disclaimer-panel summary{position:relative;display:flex;align-items:center;gap:10px;padding:14px 18px 13px 20px;cursor:pointer;list-style:none;font-weight:800;color:#fff}
.disclaimer-panel summary::-webkit-details-marker{display:none}
.disclaimer-panel summary::after{content:"▾";margin-left:auto;font-size:16px;color:#ffcf8a;transition:transform .18s ease}
.disclaimer-panel:not([open]) summary::after{transform:rotate(-90deg)}
.disclaimer-icon{display:inline-grid;place-items:center;flex:0 0 auto;width:28px;height:28px;border-radius:999px;background:#ffb13b;color:#173f17;font-weight:900;font-style:italic;box-shadow:0 0 0 3px rgba(255,177,59,.18)}
.disclaimer-title{font-size:clamp(15.5px,1.25vw,17px);font-weight:900;letter-spacing:.018em;line-height:1.2}
.disclaimer-toggle-label{display:inline-flex;align-items:center;margin-left:4px;padding:4px 9px;background:rgba(255,255,255,.16);color:#fff3dc;border:1px solid rgba(255,255,255,.22);border-radius:999px;font-size:11.5px;font-weight:850;letter-spacing:.045em;text-transform:uppercase}
.disclaimer-copy{padding:0 20px 18px 58px;color:#edf7ea;font-size:13.9px;line-height:1.75;font-weight:500}
.disclaimer-copy p{margin:0 0 9px}
.disclaimer-copy p:last-child{margin-bottom:0}
.disclaimer-copy strong{color:#fff}
.disclaimer-note{padding-top:10px;border-top:1px solid rgba(255,255,255,.16);color:#ffdfae}
.footer-link-card a{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;min-height:60px;padding:13px 16px;background:#fff;color:#174f10;border:1px solid rgba(255,255,255,.7);border-left:5px solid var(--accent);border-radius:10px;text-align:center;text-decoration:none;font-size:inherit;font-weight:800;line-height:1.25;box-shadow:none;transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.footer-link-card a span{display:block;color:#627261;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.footer-link-card a:hover{background:#fffaf0;border-color:#ffcf8a;box-shadow:0 12px 22px rgba(0,0,0,.22);transform:translateY(-1px)}

@media(max-width:1100px){
  .layout{grid-template-columns:1fr}
  .layout.sidebar-collapsed{grid-template-columns:1fr}
  aside{grid-template-columns:1fr 1fr}
  .sidebar-toggle{left:0;border-radius:0 8px 8px 0}
  .sidebar-collapsed aside{display:none}
  .snap{grid-template-columns:1fr}
  .tabs .tab{flex-basis:30%}
}
@media(max-width:900px){
  header{position:sticky;top:0}
  .app-title{font-size:clamp(24px,5vw,34px)}
  .app-subtitle{font-size:clamp(12px,2.4vw,15px)}
  #mapCanvas{height:clamp(460px,70vh,680px)}
  footer.app-footer{grid-template-columns:1fr;grid-template-areas:"disclaimer" "link-a" "link-b";padding:20px 16px}
  .footer-disclaimer-card,.footer-link-card{width:100%;min-width:0}
  .disclaimer-copy{padding:0 18px 18px 48px}
}
@media(max-width:850px){
  .scenario-records{grid-template-columns:1fr}
}
@media(max-width:700px){
  header{grid-template-columns:auto minmax(0,1fr);align-items:center;min-height:70px;padding:10px 12px;gap:10px}
  header img{width:98px;height:42px;padding:5px 7px}
  .app-title{font-size:24px;line-height:1}
  .app-subtitle{margin-top:4px;font-size:12px;line-height:1.2}
  .layout main{padding:10px}
  aside{grid-template-columns:1fr}
  .sidebar-toggle{top:50%;width:34px;height:46px;font-size:25px;z-index:10000}
  .run-rec-cluster{right:12px;bottom:16px;gap:5px}
  .run-rec-toggle{width:46px;height:46px;font-size:18px}
  .scenario-sync-status{max-width:118px;font-size:10.5px}
  .snap>div{min-height:96px;padding:14px 14px 14px 52px}
  .snap>div::before{left:14px;top:15px;width:24px;height:24px}
  .snap>div::after{left:52px;bottom:12px}
  .snap b{font-size:15px}
  .row2,.legal-land-row{grid-template-columns:1fr}
  .farm-summary-grid{grid-template-columns:1fr}
  .tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:7px;border-radius:9px}
  .tab{min-height:64px;padding:10px 9px 12px;border-right:0}
  .tab span{font-size:14px}
  .tab small{font-size:10px}
  .tab.active{box-shadow:0 4px 12px rgba(40,116,13,.3)}
  .tablewrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;border-radius:12px!important}
  table{min-width:760px!important}
  .scenario-records{width:100%;max-width:100%;margin-left:0;margin-right:0}
  .scenario-record{width:100%;max-width:100%;overflow:hidden}
  .scenario-record .tablewrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  .scenario-record table{min-width:620px!important;width:100%;table-layout:fixed}
  .scenario-record th,.scenario-record td{overflow-wrap:anywhere;word-break:break-word}
  .tutorial-links{grid-template-columns:1fr}
  .project-tools{grid-template-columns:1fr}
  .farm-opt-actions{align-items:stretch;flex-direction:column}
  .farm-opt-actions #print_report{max-width:none}
  .report-cover-card{grid-template-columns:1fr;padding:14px}
  .report-cover-card dl{grid-template-columns:1fr 1fr}
  .web-chart{max-width:100%;overflow:hidden}
  .footer-link-card a{min-height:56px}
  .disclaimer-panel summary{padding:13px 14px 12px 16px;gap:8px}
  .disclaimer-copy{padding:0 16px 16px 16px}
  .disclaimer-toggle-label{margin-left:auto}
}
@media(max-width:430px){
  .tabs{grid-template-columns:1fr}
  .tab{min-height:56px;padding-left:14px;padding-right:14px;text-align:left}
  .tab::after{left:14px;right:14px}
  .tutorial-links a{align-items:flex-start}
  .legal-land-row{grid-template-columns:1fr}
  .report-cover-card dl{grid-template-columns:1fr}
  header img{width:86px;height:38px}
  .app-title{font-size:21px}
  .app-subtitle{font-size:11px}
  .run-rec-cluster{right:10px;bottom:12px}
  .scenario-sync-status{max-width:104px}
}
@media print{
  aside,.tabs,button,.button,.project-upload,.project-tools,.import-status,.farm-opt-actions,#mapCanvas,footer,.panel,.sidebar-toggle,.run-rec-toggle,.run-rec-cluster{display:none!important}
  header{display:flex!important;align-items:center!important;gap:18px!important;padding:14px 18px!important;background:#fff!important;border-bottom:4px solid #28740d!important;box-shadow:none!important}
  header img{display:block!important;width:150px!important;height:50px!important;padding:4px 8px!important;background:#fff!important;border:1px solid #d8e1d4!important;border-radius:7px!important;object-fit:contain!important}
  .app-title{color:#174f10!important;font-size:28px!important;line-height:1!important}
  .app-subtitle{color:#333!important;font-size:13px!important;line-height:1.25!important}
  .layout{display:block}
  .layout main{padding:0}
  .panel#farm-opt{display:block!important;position:relative}
  .report-cover{display:block!important}
  .report-cover-card{display:grid!important;grid-template-columns:1fr 1fr!important;gap:14px!important;margin:14px 0 18px!important;padding:14px 16px!important;background:#fff!important;border:1px solid #999!important;border-left:5px solid #28740d!important;border-radius:0!important;break-inside:avoid!important;page-break-inside:avoid!important}
  .report-cover-card h2{margin:2px 0 5px!important;color:#000!important;font-size:22px!important}
  .report-cover-card p,.report-cover-card dt,.report-cover-card dd{color:#000!important}
  .report-cover-card dl{display:grid!important;grid-template-columns:repeat(2,1fr)!important;gap:6px!important}
  .report-cover-card dl div{padding:6px 8px!important;background:#fff!important;border:1px solid #bbb!important;border-radius:0!important}
  .report-cover-card dt{font-size:9px!important}
  .report-cover-card dd{font-size:14px!important}
  #saved_scenarios{break-after:page;page-break-after:always}
  #report_data_record{display:block!important;position:static!important;width:1px!important;height:1px!important;max-height:1px!important;overflow:hidden!important;background:transparent!important;color:rgba(255,255,255,.01)!important;font:1px/1 monospace!important;opacity:.01!important;overflow-wrap:anywhere!important}
  .scenario-records{display:block}
  .scenario-record{break-inside:avoid;page-break-inside:avoid;margin:0 0 16px}
  .farm-result{break-before:page;page-break-before:always}
  .web-chart{max-height:46vh;page-break-inside:avoid}
  .farm-budget-svg-crowded .chart-value{font-size:9px!important}
  .farm-budget-svg-crowded .chart-x-label{font-size:10px!important}
  .tablewrap,.tablewrap::before,.tablewrap table,.tablewrap thead,.tablewrap tbody,.tablewrap tr,.tablewrap th,.tablewrap td{background:#fff!important;background-image:none!important;box-shadow:none!important;text-shadow:none!important;color:#000!important}
  .tablewrap::before{display:none!important}
  .tablewrap{overflow:visible!important;border:1px solid #bbb!important;border-radius:0!important;break-inside:auto!important}
  .tablewrap table{width:100%!important;min-width:0!important;table-layout:fixed!important}
  .tablewrap th,.tablewrap td{border:1px solid #bbb!important;padding:4px!important;font-size:9px!important;line-height:1.15!important;overflow-wrap:anywhere!important;word-break:normal!important}
  .tablewrap th{position:static!important;font-weight:bold!important}
  .budget-table th:nth-child(5),.budget-table td:nth-child(5),
  .budget-table th:nth-child(7),.budget-table td:nth-child(7),
  .recommended-table th:nth-child(6),.recommended-table td:nth-child(6){display:none!important}
  .tablewrap tbody tr.chosen td,.tablewrap tr.chosen td{background:#e8f3e4!important;color:#000!important;font-weight:bold!important}
  .tablewrap tbody tr.chosen td:first-child::before{content:""!important}
}

/* Modern SVG chart engine: natural-flow web graphics */
.web-chart{
  width:100%;
  max-width:none;
  min-height:360px;
  margin:22px 0 28px;
  padding:10px 10px 4px;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,250,247,.96));
  box-shadow:0 16px 42px rgba(15,49,32,.10);
  border:1px solid rgba(26,87,48,.12);
  box-sizing:border-box;
}
.chart-svg{display:block;width:100%;height:auto;min-height:360px;overflow:visible;font-family:Inter,Segoe UI,Roboto,Arial,sans-serif}
.chart-grid{stroke:rgba(15,23,42,.10);stroke-width:1;stroke-dasharray:3 7;shape-rendering:geometricPrecision}
.chart-grid-vertical{stroke:rgba(15,23,42,.07)}
.chart-axis{stroke:rgba(15,23,42,.42);stroke-width:1.3;shape-rendering:crispEdges}
.chart-plot-border{fill:rgba(255,255,255,.38);stroke:rgba(15,23,42,.28);stroke-width:1.25}
.chart-flow-line{filter:drop-shadow(0 4px 8px rgba(15,23,42,.10));transition:stroke-width .18s ease, opacity .18s ease}
.chart-flow-line:hover{stroke-width:5}
.chart-area{pointer-events:none}
.chart-dot{transition:r .15s ease}
.chart-dot:hover{r:6}
.chart-tick{fill:rgba(17,24,39,.78);font-size:13px;font-weight:650}
.chart-x-label{fill:rgba(17,24,39,.83);font-size:13px;font-weight:700}
.chart-axis-title{fill:#14331f;font-size:16px;font-weight:800;letter-spacing:.01em}
.chart-legend{fill:#111827;font-size:14px;font-weight:750}
.chart-value{fill:#111827;font-size:12px;font-weight:800}
.farm-budget-svg-crowded .chart-value{font-size:10.5px}
.farm-budget-svg-crowded .chart-x-label{font-size:11.5px}
.chart-no-data{fill:#b91c1c;font-size:42px;font-weight:850}
.chart-bar{filter:drop-shadow(0 6px 10px rgba(15,23,42,.12));transition:opacity .15s ease, transform .15s ease}
.chart-bar:hover{opacity:.85}
.chart-recommendation-marker{cursor:help}
@media (max-width:720px){
  .web-chart{min-height:300px;margin:16px 0 22px;padding:6px;border-radius:18px}
  .chart-svg{min-height:300px}
  .chart-tick{font-size:12px}
  .chart-axis-title{font-size:14px}
  .chart-legend{font-size:12px}
}


/* Print recommendation report cleanup: never print app chrome */
@media print {
  html body button#sidebar_toggle.sidebar-toggle,
  html body button#run_rec_sticky.run-rec-toggle,
  html body .sidebar-toggle,
  html body .run-rec-toggle,
  html body footer.app-footer,
  html body .app-footer,
  html body .footer-disclaimer-card,
  html body .footer-link-card,
  html body .disclaimer-panel,
  html body .disclaimer-copy {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -99999px !important;
    top: -99999px !important;
    pointer-events: none !important;
  }

  html body {
    padding-bottom: 0 !important;
  }
}


/* Table base */
html body .tablewrap > table,
html body main .tablewrap > table,
html body .panel .tablewrap > table{
  border-collapse:separate!important;
  border-spacing:0!important;
  font-family:Arial,Helvetica,sans-serif!important;
}
html body .tablewrap > table thead th{
  background:linear-gradient(180deg,#174f10 0%,#236d17 100%)!important;
  color:#fff!important;
}
html body .tablewrap > table tbody tr.chosen td{
  background:linear-gradient(90deg,#ff9f1c 0%,#ffb84d 100%)!important;
  color:#17230f!important;
}

/* Table emphasis */
html body .tablewrap > table thead th:first-child,
html body main .tablewrap > table thead th:first-child,
html body .panel .tablewrap > table thead th:first-child,
html body .tablewrap th:first-child {
  background: linear-gradient(180deg, #0b3517 0%, #174f10 52%, #236d17 100%) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 1px rgba(0,0,0,.34) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 2px 8px rgba(23,79,16,.18) !important;
  border-right: 1px solid rgba(255,255,255,.18) !important;
}
html body .tablewrap > table tbody td:first-child,
html body .tablewrap td:first-child {
  color: #173f17 !important;
  font-weight: 850 !important;
  background-image: linear-gradient(90deg, rgba(57,143,14,.055), rgba(255,255,255,0)) !important;
}
html body .tablewrap > table tbody tr.chosen td:first-child,
html body .tablewrap tbody tr.chosen td:first-child {
  color: #17230f !important;
  background-image: linear-gradient(90deg, rgba(255,255,255,.22), rgba(255,255,255,0)) !important;
}

/* Final table typography system: consistent headers across every AFFIRM Lite table */
:root{
  --affirm-table-header-bg: linear-gradient(180deg,#0b3517 0%,#174f10 54%,#236d17 100%);
  --affirm-table-header-color: #ffffff;
  --affirm-table-header-size: 13px;
  --affirm-table-header-weight: 800;
  --affirm-table-header-letter: .018em;
}
html body table,
html body .tablewrap table,
html body .scenario-record table{
  font-family: var(--affirm-ui-font) !important;
}
html body .tablewrap > table > thead > tr > th,
html body main .tablewrap > table > thead > tr > th,
html body .panel .tablewrap > table > thead > tr > th,
html body #summary .tablewrap > table > thead > tr > th{
  font-family: var(--affirm-ui-font) !important;
  font-size: var(--affirm-table-header-size) !important;
  font-weight: var(--affirm-table-header-weight) !important;
  line-height: 1.22 !important;
  letter-spacing: var(--affirm-table-header-letter) !important;
  text-transform: none !important;
  color: var(--affirm-table-header-color) !important;
  background: var(--affirm-table-header-bg) !important;
  text-align: center !important;
  vertical-align: middle !important;
  padding: 12px 13px !important;
  min-height: 46px !important;
  border-right: 1px solid rgba(255,255,255,.18) !important;
  text-shadow: 0 1px 1px rgba(0,0,0,.34) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 8px rgba(23,79,16,.16) !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}
html body .tablewrap > table > thead > tr > th:first-child,
html body main .tablewrap > table > thead > tr > th:first-child,
html body .panel .tablewrap > table > thead > tr > th:first-child,
html body #summary .tablewrap > table > thead > tr > th:first-child{
  text-align: left !important;
  color: #ffffff !important;
  background: var(--affirm-table-header-bg) !important;
}
html body .tablewrap > table > thead > tr > th:last-child{
  border-right: 0 !important;
}
html body .tablewrap > table > tbody > tr > td{
  font-family: var(--affirm-ui-font) !important;
  font-size: 13.5px !important;
  line-height: 1.38 !important;
}
html body .tablewrap > table > tbody > tr > td:not(:first-child){
  text-align: right !important;
  font-variant-numeric: tabular-nums !important;
}
html body .tablewrap > table > tbody > tr > td:first-child{
  text-align: left !important;
}
/* Key-value tables inside saved scenario cards use same font family and visual hierarchy */
html body .scenario-record table,
html body .scenario-record table tbody,
html body .scenario-record table tr,
html body .scenario-record table th,
html body .scenario-record table td{
  font-family: var(--affirm-ui-font) !important;
}
html body .scenario-record table th{
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  letter-spacing: .012em !important;
  color: #174f10 !important;
  background: linear-gradient(90deg,#eef8ea 0%,#f8fbf6 100%) !important;
  text-align: left !important;
  padding: 10px 12px !important;
  border-bottom: 1px solid rgba(23,79,16,.12) !important;
  vertical-align: middle !important;
}
html body .scenario-record table td{
  font-size: 13.5px !important;
  line-height: 1.35 !important;
  color: #243321 !important;
  padding: 10px 12px !important;
  border-bottom: 1px solid rgba(23,79,16,.10) !important;
}
@media(max-width:700px){
  :root{--affirm-table-header-size:12.5px;}
  html body .tablewrap > table > thead > tr > th{padding:11px 12px !important;}
  html body .tablewrap > table > tbody > tr > td{font-size:13px !important;}
}
@media print{
  html body .tablewrap > table > thead > tr > th{
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 10px !important;
    font-weight: bold !important;
    color: #000 !important;
    background: #fff !important;
    text-shadow: none !important;
    box-shadow: none !important;
  }
}
