/* Research page only */

.wtem-stats{list-style:none;margin:1.4rem 0 0;padding:0;display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:var(--rule);border:1px solid var(--rule)}
.wtem-stats li{background:#f5f6ee;padding:1rem 1.1rem}
.wtem-stats strong{display:block;font-family:var(--serif);font-size:clamp(1.9rem,4vw,2.8rem);line-height:1.1;color:var(--green)}
.wtem-stats span{font-size:.92rem;color:var(--muted)}
main>.wtem-figure{display:block}
.wtem-figure-heading{max-width:68ch;margin-bottom:1.2rem}
.wtem-chart{width:100%;height:auto;display:block;margin:.5rem 0 1rem;font-family:var(--sans)}
.wtem-chart .nm{font-size:15px;font-weight:650;fill:var(--ink)}
.wtem-chart .sub,.wtem-chart .ax{font-size:12.5px;fill:var(--muted)}
.wtem-chart .val{font-size:14px;font-weight:650;fill:var(--ink)}
.wtem-chart .pct{font-size:15px;font-weight:700;fill:var(--green)}
.wtem-chart .pct.bad{fill:#a2543a}
.wtem-chart .pos{fill:#7f9a83}.wtem-chart .hi{fill:var(--green)}.wtem-chart .neg{fill:#c07a5c}.wtem-chart .low{fill:#b9c4b4}
.wtem-chart .cell{fill:#eef0e7}
.wtem-chart .bean{fill:#8a6a4f}.wtem-chart .fruit{fill:#d2a86e}
.wtem-chart .bigw{font-size:18px;font-weight:700;fill:#fff}.wtem-chart .bigd{font-family:var(--serif);font-size:28px;font-weight:600;fill:var(--ink)}
.wtem-chart .zero{stroke:var(--ink);stroke-width:1}
.wtem-chart .thr{stroke:#a2543a;stroke-width:2;stroke-dasharray:6 5}.wtem-chart .thrt{font-size:13px;font-weight:650;fill:#a2543a}
.wtem-caption{max-width:68ch;border-left:2px solid #819480;padding-left:.85rem;color:var(--muted);font-size:1rem;line-height:1.6}
.wtem-findings,.wtem-path{padding-left:1.1rem}.wtem-findings li,.wtem-path li{margin-bottom:.7em}
.wtem-limits{color:var(--muted)}

.wtem-chart-desktop{margin:0}
.wtem-mobile-chart{display:none}

.wtem-study-note { color: var(--muted); max-width: 65ch; margin-top: 1rem; }
.wtem-source { margin: .8rem 0 0; font-size: .88rem; color: var(--muted); }
.wtem-source a { font-weight: 400; }
main > .wtem-figure > .wtem-viability { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: none; }
.wtem-viability article { background: #f0f2ec; border-top: 2px solid var(--green); padding: 1.2rem; }
.wtem-viability h3 { margin: .3rem 0 .65rem; line-height: 1.3; }
@media(max-width:650px) {
  .wtem-stats { grid-template-columns: 1fr 1fr; }
  main > .wtem-figure > .wtem-viability { grid-template-columns: 1fr; }
}

/* Research hierarchy: body copy, one central question, and quieter chart notes. */
.research-page > section > div { font-size: 1.11rem; }
.research-page .research-question {
  margin: 1.15rem 0 0;
  max-width: 43ch;
  color: var(--green);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.25vw, 1.5rem);
  font-style: normal;
  font-weight: 500;
  line-height: 1.4;
}
.research-page .wtem-figure-heading > .label { margin-bottom: .55rem; }
.research-page .wtem-figure-heading > h2 { margin-bottom: .65rem; }
.research-page .wtem-chart-note,
.research-page .wtem-study-note {
  font-family: var(--sans);
  font-size: 1rem;
  font-style: normal;
  line-height: 1.6;
  color: var(--muted);
}
.research-page .wtem-chart-note { margin: 0; }
.research-page .wtem-introduction { margin: 0; }
.research-page .wtem-viability h3 { font-size: 1.35rem; font-weight: 620; }
.research-page #thesis-source .research-citation { margin-top: 0; }
@media (max-width:650px) {
  .research-page > section > div { font-size: 1.05rem; }
  .research-page > .wtem-figure > .wtem-viability { gap: .85rem; }
}

/* Supporting discussion stays available in concise, keyboard-accessible disclosures. */
main.research-page > .research-disclosure { display: block; padding: 0; scroll-margin-top: 16px; }
.research-disclosure > details > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  padding: 1.15rem 0; list-style: none; cursor: pointer;
}
.research-disclosure > details > summary::-webkit-details-marker { display: none; }
.research-disclosure > details > summary:hover { color: var(--green); }
.research-disclosure > details > summary:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.research-disclosure-mark { flex: 0 0 1.25rem; text-align: center; color: var(--green); font: 400 1.5rem/1 var(--sans); }
.research-disclosure-mark::before { content: "+"; }
.research-disclosure details[open] > summary .research-disclosure-mark::before { content: "−"; }
.research-disclosure-body { max-width: 68ch; padding: .2rem 0 1.5rem; font-size: 1.11rem; }
.research-disclosure-body > :first-child { margin-top: 0; }
.research-disclosure-body > :last-child { margin-bottom: 0; }
.wtem-method-list { padding-left: 1.15rem; margin-top: 1rem; }
.wtem-method-list li { margin-bottom: .8em; }

/* Compact chart layouts use actual text and proportional bars at readable sizes. */
@media (max-width:900px) {
  .wtem-chart-desktop { display: none; }
  .wtem-mobile-chart { display: block; margin: 1.35rem 0 1.5rem; max-width: 38rem; }
  .wtem-mobile-chart figcaption { margin-bottom: .8rem; color: var(--muted); font-size: 1rem; line-height: 1.5; }
  .mobile-chart-rows { margin: 0; padding: 0; list-style: none; }
  .mobile-chart-rows > li { margin: 0; padding: 1rem 0 1.15rem; border-top: 1px solid var(--rule); }
  .mobile-chart-rows h3 {
    margin: 0; font: 650 1.05rem/1.35 var(--sans); overflow-wrap: normal;
  }
  .mobile-row-note { color: var(--muted); font-size: .95rem; line-height: 1.45; margin: .25rem 0 0; }
  .mobile-row-values { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .3rem 1rem; margin: .5rem 0 .7rem; }
  .mobile-row-values strong { color: var(--ink); font: 550 1.45rem/1.25 var(--serif); font-variant-numeric: tabular-nums; }
  .mobile-row-values > span { color: var(--muted); font-size: .95rem; }
  .mobile-axis { position: relative; display: flex; justify-content: space-between; color: var(--muted); font-size: .9rem; margin-bottom: .35rem; }
  .mobile-axis-zero { position: absolute; left: var(--zero); transform: translateX(-50%); }
  .mobile-value-track { position: relative; height: 14px; background: #eef0e7; }
  .mobile-value-track::after { content: ""; position: absolute; left: var(--zero); top: -3px; bottom: -3px; width: 1px; background: #647365; }
  .mobile-value-track > span { position: absolute; left: var(--bar-left); width: var(--bar-width); top: 0; bottom: 0; background: var(--bar-color); }
  .mobile-farm-rows .mobile-row-values strong { font-size: 1.65rem; }
  .mobile-revenue-total { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.15rem; margin: .9rem 0; background: #eef0e7; border-top: 2px solid var(--green); }
  .mobile-revenue-total > span { color: var(--muted); font-size: .95rem; }
  .mobile-revenue-total > strong { font: 550 2rem/1.2 var(--serif); color: var(--green); }
  .mobile-revenue-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
  .mobile-revenue-heading > span { font-weight: 650; }
  .mobile-revenue-rows .mobile-row-values { margin: .25rem 0 .65rem; }
  .mobile-revenue-rows .mobile-row-values strong { font-size: 1.3rem; }
  .mobile-share-track { height: 14px; background: #eef0e7; }
  .mobile-share-track > span { display: block; height: 100%; }
}
@media (max-width:650px) {
  .research-disclosure-body { font-size: 1.05rem; }
}

/* The phone calendar keeps both harvest windows aligned to the same twelve months. */
@media (max-width:900px) {
  .wtem-mobile-chart.mobile-calendar-figure { max-width: 30rem; }
  .harvest-calendar-head, .harvest-month {
    display: grid; grid-template-columns: 2.7rem minmax(0,1fr) minmax(0,1fr); column-gap: .65rem;
  }
  .harvest-calendar-head { align-items: end; padding-bottom: .85rem; }
  .harvest-calendar-head > span { color: var(--muted); font-size: .85rem; }
  .harvest-calendar-head strong { display: block; font-size: 1rem; line-height: 1.25; font-weight: 650; color: var(--ink); }
  .harvest-calendar-head small { display: block; margin-top: .35rem; font-size: .82rem; line-height: 1.25; color: var(--muted); }
  .harvest-calendar-months { border-top: 1px solid var(--rule); padding-top: .45rem; }
  .harvest-month { align-items: center; min-height: 29px; }
  .harvest-month-name { font-size: .95rem; line-height: 1.2; color: var(--muted); }
  .harvest-month-cell { display: block; height: 24px; background: #eef0e7; }
  .harvest-month-cell.cherry.is-active { background: #c07a5c; }
  .harvest-month-cell.leaf.is-active { background: #7f9a83; }
}
