/* Local thematic SVG: district geometry is context, never a field location. */
body[data-page=trials] .trial-wrap{max-width:1240px}
.trial-geography-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;align-items:start;margin-top:22px}
.has-trial-map .trial-geography-layout{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr)}
.trial-workspace .trial-controls{display:block}
.trial-controls .hybrid-pills{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
.field-hybrid-pills{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
.trial-workspace .hybrid-pills,.trial-workspace .field-hybrid-pills{border-radius:18px;padding:6px;gap:6px}
.trial-workspace .hybrid-pills button,.trial-workspace .field-hybrid-pills button{min-width:0;border-radius:12px;white-space:normal;line-height:1.3;overflow-wrap:break-word}
.trial-workspace .hybrid-pills button:focus-visible,.trial-workspace .field-hybrid-pills button:focus-visible{outline-offset:-3px;box-shadow:none}
.trial-result-pane{min-width:0}
.trial-map-panel{min-width:0;background:#f5f3e9;color:#113f2e;border-radius:17px;padding:22px}
.trial-map-heading{margin-bottom:14px}
.trial-map-heading h3{font-size:1.375rem;font-weight:400;line-height:1.25;letter-spacing:-.025em;margin:0}
.trial-map-heading p{font-size:.8125rem;line-height:1.6;color:#476151;margin:6px 0 0}
.trial-map-stage{perspective:1100px;padding:6px 0 12px;margin:18px 0 0}
.trial-map-svg{width:100%;height:auto;display:block;overflow:visible;transform:rotateX(17deg) rotateZ(-4deg);transform-origin:50% 54%}
.map-land-depth{fill:url(#trial-map-edge);stroke:#87966f;stroke-width:.6;stroke-linejoin:round;fill-rule:evenodd;pointer-events:none}
.map-land-surface{fill:url(#trial-map-neutral);fill-rule:evenodd;pointer-events:none}
.map-district-hit{fill:transparent;stroke:none;pointer-events:fill}
.map-interactive-district:has(.map-district-shape[aria-disabled=false]) .map-district-hit{cursor:pointer}
.map-district-visual{transform-box:fill-box;transform-origin:center;transition:transform .24s cubic-bezier(.2,.7,.2,1),filter .24s ease}
.map-interactive-district:has(.map-district-shape[aria-disabled=false]:focus-visible) .map-district-visual{transform:translateY(-5px) scale(1.1);filter:drop-shadow(0 6px 3px rgba(58,64,31,.22))}
@media(hover:hover) and (pointer:fine){
 .map-interactive-district:has(.map-district-shape[aria-disabled=false]):hover .map-district-visual{transform:translateY(-5px) scale(1.1);filter:drop-shadow(0 6px 3px rgba(58,64,31,.22))}
}
.map-context-district{fill:url(#trial-map-neutral);stroke:#f5f3e9;stroke-opacity:.8;stroke-width:1;stroke-linejoin:round;fill-rule:evenodd;pointer-events:none}
.map-district-shape{fill:url(#trial-map-available);stroke:#e8eed9;stroke-width:1.5;stroke-linejoin:round;cursor:pointer;fill-rule:evenodd;transition:transform .22s ease,filter .22s ease}
.map-district-shape[data-state=selected]{fill:url(#trial-map-selected);stroke:#6c6228;stroke-width:1.6;transform:translateY(-8px);filter:drop-shadow(0 7px 2px rgba(58,64,31,.32))}
.map-district-shape[data-state=empty]{fill:url(#trial-map-neutral);cursor:default}
.map-district-shape[aria-disabled=false]:hover{stroke:#113f2e;stroke-width:2.5}
.map-district-shape:focus-visible{outline:none;stroke:#113f2e;stroke-width:4}
.map-district-number{font-family:inherit;font-size:18px;font-weight:600;text-anchor:middle;dominant-baseline:central;fill:#f5f3e9;pointer-events:none;transition:transform .22s ease}
.map-district-number[data-state=selected]{fill:#113f2e;transform:translateY(-8px)}
.map-district-number[data-state=empty]{fill:#52624e}
.trial-map-legend{display:flex;gap:7px;align-items:center;flex-wrap:wrap;font-size:.75rem;line-height:1.5;margin:4px 0 14px;color:#476151}
.map-key-available,.map-key-selected{width:10px;height:10px;background:#1e513b;border-radius:2px;flex:none}
.map-key-selected{background:#e6bc47;border:1px solid #113f2e;margin-left:7px}
.map-district-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,max(180px,40%)),1fr));gap:8px}
.map-district-list button{display:flex;align-items:center;gap:8px;min-height:46px;background:#e3e9d7;color:#113f2e;border:0;border-radius:999px;box-shadow:inset 0 0 0 1px rgba(66,91,47,.08);text-align:left;padding:9px 12px;font:inherit;font-size:.8125rem;line-height:1.4;cursor:pointer;transition:background-color .18s ease,box-shadow .18s ease}
.map-key-number{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:rgba(245,243,233,.75);font-size:.75rem;font-weight:600;flex:none}
.map-district-list button[aria-pressed=true]{background:#e6bc47;box-shadow:0 3px 9px rgba(129,101,28,.12)}
.map-district-list button[aria-pressed=true] .map-key-number{background:#f8df80}
.map-district-list button:enabled:hover{background:#d6e0c5;box-shadow:inset 0 0 0 1px rgba(66,91,47,.25)}
.map-district-list button[aria-pressed=true]:hover{background:#edc85e;box-shadow:0 3px 9px rgba(129,101,28,.18)}
.map-district-list button:disabled{color:#687562;background:#ecefe3;box-shadow:none;cursor:default}
.map-farm-choice{margin-top:16px}
.map-farm-choice>p{margin:0 0 6px;color:#476151;font-size:.8125rem;line-height:1.5}
#map-farms{display:flex;flex-direction:column;gap:6px}
#map-farms button{min-height:44px;width:100%;padding:9px 12px;text-align:left;border:1px solid #a4b39b;border-radius:9px;background:transparent;color:#113f2e;font:inherit;font-size:.8125rem;line-height:1.5;cursor:pointer}
#map-farms button[aria-pressed=true]{background:#dce5c8;border-color:#113f2e}
.trial-map-credit{margin:14px 0 0;font-size:.75rem;line-height:1.6;color:#476151}
.trial-map-credit>a,.trial-map-about summary{display:inline-flex;align-items:center;min-height:32px;text-decoration:underline;text-underline-offset:3px}
.trial-map-credit>span{margin-inline:4px}
.trial-map-about{display:inline}
.trial-map-about summary{list-style:none;cursor:pointer}
.trial-map-about summary::-webkit-details-marker{display:none}
.trial-map-about-content{margin-top:8px;padding:12px;background:#e3e9d8;border-radius:10px}
.trial-map-about-content p{margin:0}
.trial-map-about-content p+p{margin-top:6px}
.trial-map-about-content a{text-decoration:underline;text-underline-offset:3px}
.trial-map-panel button:focus-visible,.trial-map-credit a:focus-visible,.trial-map-about summary:focus-visible{outline:2px solid #113f2e;outline-offset:3px}
.trial-result-pane .metric-switch{margin-top:18px}
.trial-result-pane .farm-context{margin-bottom:18px}
.trial-result-pane .bar-chart{height:240px}
.trial-result-pane .trial-actions{flex-wrap:wrap;column-gap:18px}
.trial-result-pane .trial-actions button,.trial-result-pane .trial-actions a{font-size:.8125rem}
.trial-section-title{font-size:clamp(24px,2.6vw,32px);font-weight:400;line-height:1.2;letter-spacing:-.03em;margin:0 0 22px}
.trial-characteristics .profile-card{margin-top:22px}
.trial-characteristics .profile-facts{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 30px;margin-bottom:0}
.trial-characteristics .profile-facts>div:last-child{grid-column:auto}
.trial-characteristics .profile-oil strong{font-size:48px}
.trial-characteristics .trial-actions{justify-content:flex-end}
.static-profiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.static-profiles .profile-facts{grid-template-columns:1fr}
.field-trials{margin-top:32px;scroll-margin-top:100px}
.field-trials .trial-controls{display:block}
.field-trials .farm-context{margin:12px 0 0}
.field-trials .trial-geography-layout{margin-top:20px}
.field-trials .figure-heading h3{font-size:22px;letter-spacing:-.02em;font-weight:400}
#field-trials[hidden],#profile-controls[hidden]{display:none!important}
/* Native fallback profiles remain the only controls when JavaScript is off. */
body:has(.static-profiles) #profile-controls,body:has(.static-profiles) #trial-profile,body:has(.static-profiles) #field-trials{display:none}
@media(max-width:850px){
 .trial-geography-layout,.has-trial-map .trial-geography-layout{grid-template-columns:minmax(0,1fr);gap:22px;margin-top:18px}
 .trial-map-panel{padding:18px}
 .trial-map-svg{max-width:560px;margin-inline:auto;transform:rotateX(11deg) rotateZ(-2deg)}
 .trial-result-pane .bar-chart{height:210px}
}
@media(max-width:479px){
 .trial-controls .hybrid-pills{grid-template-columns:repeat(2,minmax(0,1fr))}
 .trial-map-panel{padding:16px 12px;border-radius:13px}
 .trial-map-heading h3{font-size:1.25rem}
 .map-district-list{gap:6px}
 .map-district-list button{padding:8px 9px;font-size:.75rem;gap:6px}
 .map-key-number{width:20px;height:20px;font-size:.6875rem}
 .trial-result-pane .bar-chart{height:180px}
 .trial-map-svg{transform:rotateX(7deg) rotateZ(-1.5deg)}
 .map-district-number{font-size:28px}
 .trial-map-stage{padding-block:8px 12px}
 .trial-map-legend{font-size:.6875rem;column-gap:5px}
 .map-key-selected{margin-left:3px}
}
@media(max-width:600px){
 .trial-section-title{margin-bottom:18px}
 .trial-characteristics .profile-card{margin-top:18px}
 .trial-characteristics .profile-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 .trial-characteristics .profile-facts>div:last-child{grid-column:1/-1}
 .trial-characteristics .profile-oil strong{font-size:38px}
 .field-trials{margin-top:24px}
 .field-trials .trial-controls{grid-template-columns:minmax(0,1fr);gap:14px}
 .field-trials .trial-controls>div:last-child .control-label{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}
 .field-trials .figure-heading h3{font-size:1.125rem}
 .static-profiles{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:379px){
 .map-district-list{grid-template-columns:minmax(0,1fr)}
}
@media(prefers-reduced-motion:reduce){
 .map-district-shape,.map-district-number,.map-district-visual,.map-district-list button{transition:none}
}

@media(max-width:600px){.field-hybrid-pills{grid-template-columns:repeat(2,minmax(0,1fr))}}
