/* Toolkit edition: one view at a time, reached through four reader questions. Builds on field-guide.css. */
.toolkit .views{min-height:70vh}
.toolkit .view{animation:view-in .28s ease-out}
@keyframes view-in{from{opacity:.4;transform:translateY(6px)}to{opacity:1;transform:none}}

/* Header: four questions instead of chapter links */
.question-tabs{display:flex;gap:4px}
.question-tabs a{font:12px/1.5 var(--sans);text-decoration:none;color:var(--muted);padding:8px 12px;border-bottom:1px solid transparent;white-space:nowrap}
.question-tabs a:hover{color:var(--green)}
.question-tabs a[aria-current=page]{color:var(--green);border-bottom-color:var(--green)}

/* Overview: the herbarium label answers "what am I looking at" */
.herbarium-label{margin-top:34px;border:1px solid #b9b3a2;outline:1px solid #b9b3a2;outline-offset:3px;background:#f9f7f1;padding:4px 18px 10px;max-width:520px}
.herbarium-label .label-head{display:flex;justify-content:space-between;font:10px/1.7 var(--sans);letter-spacing:1.4px;text-transform:uppercase;color:var(--brown);border-bottom:1px solid var(--line);padding:8px 0 6px;margin-bottom:4px}
.herbarium-label>div:not(.label-head){display:grid;grid-template-columns:110px 1fr;gap:14px;padding:7px 0;border-bottom:1px dotted #d9d4c6}
.herbarium-label>div:last-child{border-bottom:0}
.herbarium-label dt{font:italic 16px/1.45 var(--serif);color:var(--brown)}
.herbarium-label dd{font-size:17px;line-height:1.45}

.question-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;border-top:1px solid var(--ink);border-bottom:1px solid var(--line);margin:10px 0 0}
.question-card{position:relative;display:flex;flex-direction:column;gap:10px;padding:26px 24px 30px;text-decoration:none;color:var(--ink);border-left:1px solid var(--line);transition:background .18s}
.question-card:first-child{border-left:0;padding-left:0}
.question-card:hover{background:#eef0e6}
.question-card:hover .q-arrow{transform:translateX(4px);color:var(--green)}
.q-number{font:12px/1 var(--sans);letter-spacing:1.4px;color:var(--brown)}
.q-title{font-size:27px;line-height:1.15;letter-spacing:-.02em}
.q-text{font-size:17px;line-height:1.45;color:var(--muted)}
.q-arrow{margin-top:auto;font-size:20px;color:var(--brown);transition:transform .18s,color .18s}

/* Layer views: a strip to move between the seven layers */
.layer-strip{display:flex;flex-wrap:wrap;align-items:stretch;gap:0;margin-top:56px;border-top:1px solid var(--ink)}
.layer-strip>.eyebrow{flex-basis:100%;padding:12px 0 8px}
.layer-strip a{flex:1 1 0;min-width:110px;display:flex;flex-direction:column;padding:10px 12px 12px;border-left:1px solid var(--line);text-decoration:none;color:var(--ink)}
.layer-strip a:nth-of-type(1){border-left:0;padding-left:0}
.layer-strip .strip-part{font:italic 14px/1.3 var(--serif);color:var(--brown)}
.layer-strip .strip-name{font-size:19px}
.layer-strip a[aria-current=page]{background:#eaece1}
.layer-strip a[aria-current=page] .strip-name{color:var(--green)}
.layer-strip a:hover .strip-name{color:var(--green)}
.layer-strip .strip-key{flex:0 0 auto;justify-content:center;font:12px/1.5 var(--sans);color:var(--green)}

/* The key */
.key-layout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:64px;align-items:start}
.key-form fieldset{border:0;border-top:1px solid var(--line);margin:0;padding:20px 0 28px}
.key-form legend{display:flex;align-items:baseline;gap:14px;font-size:25px;line-height:1.2;padding:0;margin-bottom:16px}
.key-form legend small{font-size:16px;color:var(--muted);font-style:italic;margin-left:6px}
.key-form .q-number{font-size:13px;border:1px solid var(--brown);border-radius:50%;width:26px;height:26px;display:inline-flex;align-items:center;justify-content:center;flex:none;transform:translateY(-3px)}
.key-options{display:flex;flex-wrap:wrap;gap:10px}
.key-options label,.symptom{position:relative;cursor:pointer}
.key-options input,.symptom input{position:absolute;opacity:0;pointer-events:none}
.key-options span{display:inline-block;font-size:18px;padding:8px 16px;border:1px solid var(--line);background:#faf8f2;transition:border-color .15s,background .15s}
.key-options label:hover span{border-color:#a2ab96}
.key-options input:checked+span{border-color:var(--green);background:#e7ebde;color:#2f3d27}
.key-options input:focus-visible+span,.symptom input:focus-visible+span{outline:2px solid var(--green);outline-offset:3px}
.symptoms{display:grid;grid-template-columns:1fr;gap:0}
.symptom span{display:block;font-size:18px;line-height:1.4;padding:10px 6px 10px 38px;border-bottom:1px dotted #d9d4c6;transition:background .15s}
.symptom span::before{content:'';position:absolute;left:4px;top:13px;width:17px;height:17px;border:1px solid #a39c88;background:#faf8f2}
.symptom input:checked+span{background:#eef0e6}
.symptom input:checked+span::before{background:var(--green);border-color:var(--green);box-shadow:inset 0 0 0 3px #faf8f2}
.symptom:hover span{background:#f1f2ea}

.key-result{position:sticky;top:100px;display:flex;flex-direction:column;gap:22px}
.key-plate .specimen-art{aspect-ratio:1.05}
.key-art img{left:-14%;width:80%;opacity:.92}
.key-label{left:60%;width:40%;opacity:.38;transition:opacity .2s}
.key-label::before{width:30px}
.key-label.is-lit{opacity:calc(.55 + .45 * var(--lit,0))}
.key-label.is-lit .layer-name{color:var(--green)}
.key-label.is-lit::before{background:var(--green);width:calc(30px + 40px * var(--lit,0))}
.key-badge{position:absolute;left:-30px;top:50%;transform:translateY(-50%);font:600 11px/1 var(--sans);color:var(--paper);background:var(--green);border-radius:50%;width:20px;height:20px;display:flex;align-items:center;justify-content:center}
.key-badge:empty{display:none}
.key-empty{font-style:italic;color:var(--muted);font-size:18px;border-top:1px solid var(--line);padding-top:14px}
.key-steps{list-style:none;margin:0;padding:0;border-top:1px solid var(--ink)}
.key-steps a{display:flex;flex-direction:column;gap:2px;padding:12px 0 14px;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink)}
.key-steps a:hover strong{color:var(--green)}
.key-steps strong{font-weight:400;font-size:24px;line-height:1.2}
.key-steps .key-question{font-size:17px;color:#626858}
.key-steps .key-why{font:italic 15px/1.4 var(--serif);color:var(--muted);margin-top:4px}
.key-steps li.also strong{font-size:19px}
.key-steps li.also .key-question{display:none}
.key-move{border-left:2px solid var(--green);padding:4px 0 4px 18px}
.key-move .eyebrow{margin-bottom:6px}
.key-move p+p{margin-top:8px}

/* Apply: pathway plus the instruments */
.kit-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.85fr);gap:56px;align-items:center;margin-bottom:24px}
.kit-head .section-heading{margin-bottom:0}
.kit-plate img{width:100%}
.kit-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--ink)}
.kit-card{position:relative;display:flex;flex-direction:column;gap:6px;min-height:190px;padding:20px 22px 24px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink);transition:background .18s}
.kit-card:nth-child(4n){border-right:0}
.kit-card:hover{background:#eef0e6}
.kit-card:hover .q-arrow{color:var(--green);transform:translate(3px,-3px)}
.kit-name{font-size:24px;line-height:1.15}
.kit-text{font-size:17px;line-height:1.45;color:var(--muted)}

/* Records: three kinds of evidence */
.provenance{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid var(--ink)}
.provenance-card{display:flex;flex-direction:column;gap:10px;padding:24px 26px 28px;border-left:1px solid var(--line);text-decoration:none;color:var(--ink);transition:background .18s}
.provenance-card:first-child{border-left:0;padding-left:0}
.provenance-card:hover{background:#eef0e6}
.provenance-card h3{font-size:25px}
.provenance-card p{font-size:17px;line-height:1.5;color:var(--muted)}
.provenance-card .q-arrow{font:12px/1.5 var(--sans)}
.sources-section .references{columns:2;column-gap:56px;padding-left:20px;font-size:18px;line-height:1.6;margin:0 0 20px}
.sources-section .references li{break-inside:avoid;margin-bottom:8px}

/* One line between a view and the footer: the view's own bottom rule and the footer row's rule give way to it. */
.toolkit .view.chapter,.toolkit .view>.chapter:last-child{border-bottom:0}
.toolkit-footer{border-top:1px solid var(--line);margin-top:20px;padding:0}
.toolkit-footer .footer-bottom{display:flex;gap:30px;justify-content:space-between;align-items:baseline;margin-top:0;border-top:0;padding-block:26px 40px;font-size:11px;color:var(--muted)}
.toolkit-footer .footer-bottom span:nth-child(2){max-width:60ch}

@media(max-width:1100px){
  .toolkit .reading-link{display:none}
  .question-cards,.kit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .question-card:nth-child(3){border-left:0;padding-left:0}
  .question-card{border-top:1px solid var(--line)}
  .question-card:nth-child(-n+2){border-top:0}
  .kit-card:nth-child(2n){border-right:0}
}
@media(max-width:900px){
  .toolkit .header-inner{flex-wrap:wrap;gap:6px 20px;padding-top:8px}
  .toolkit .header-inner nav.question-tabs{display:flex;order:3;flex-basis:100%;overflow-x:auto;scrollbar-width:none;margin:0 -12px;padding-bottom:2px}
  .key-layout,.kit-head{grid-template-columns:1fr;gap:34px}
  .key-result{position:static}
  .provenance{grid-template-columns:1fr}
  .provenance-card{border-left:0;padding-left:0;border-top:1px solid var(--line)}
  .provenance-card:first-child{border-top:0}
  .sources-section .references{columns:1}
}
@media(max-width:640px){
  .question-cards,.kit-grid{grid-template-columns:1fr}
  .question-card{border-left:0;padding-left:0;border-top:1px solid var(--line)}
  .question-card:nth-child(2){border-top:1px solid var(--line)}
  .kit-card{border-right:0}
  .herbarium-label>div:not(.label-head){grid-template-columns:1fr;gap:0}
  .layer-strip a{min-width:33%;flex-basis:33%;border-left:0;padding-left:0;border-top:1px solid var(--line)}
  .key-label{left:58%;width:42%}
  .key-badge{left:-24px}
  .toolkit-footer .footer-bottom{flex-direction:column;gap:10px}
}
@media(prefers-reduced-motion:reduce){.toolkit .view{animation:none}}

/* Overview, screen by screen. The first screen holds the whole plate, sized to the
   height left under the header; the label and the four questions form the second. */
.question-tabs .tab-short{display:none}
.toolkit .overview-view{--screen:calc(100svh - var(--header-h,77px));--art-ratio:.84;--plate-chrome:150px}
.toolkit .overview-view .hero{min-height:var(--screen);box-sizing:border-box;padding:24px 0;gap:56px;align-items:center}
.toolkit .overview-view .hero h1{margin:14px 0 18px}
.toolkit .overview-view .hero-thesis{margin-bottom:18px}
.toolkit .overview-view .hero-intro{margin-bottom:26px}
.toolkit .overview-view .hero-actions .button{gap:14px;font-size:13px}
.toolkit .overview-view .botanical-plate{justify-self:center;width:min(100%,calc((var(--screen) - var(--plate-chrome)) * var(--art-ratio)))}
.toolkit .overview-view .specimen-art{aspect-ratio:var(--art-ratio)}
.overview-intro{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:56px;align-items:start;padding:56px 0 24px;border-top:1px solid var(--line)}
.overview-intro .herbarium-label{margin-top:0}
.overview-intro .question-cards{grid-template-columns:repeat(2,minmax(0,1fr));margin:0}
.overview-intro .question-card{padding:20px 22px 22px;border-left:1px solid var(--line);border-top:1px solid var(--line)}
.overview-intro .question-card:nth-child(-n+2){border-top:0}
.overview-intro .question-card:nth-child(odd){border-left:0;padding-left:0}
.overview-intro .q-title{font-size:24px}
@media(max-width:850px){.toolkit .overview-view{--art-ratio:.68}}
@media(max-width:900px){.overview-intro{grid-template-columns:1fr;gap:36px}}
@media(max-width:680px){
  .toolkit .header-inner{min-height:56px}
  .toolkit .header-inner nav.question-tabs{justify-content:space-between;gap:0;margin:0;min-width:0;max-width:100%;overflow:visible}
  .question-tabs a{font-size:11px;padding:6px 2px 8px}
  .question-tabs .tab-long{display:none}
  .question-tabs .tab-short{display:inline}
  /* Phone: title, thesis and the whole tree first; caption, intro and the button follow. */
  .toolkit .overview-view{--art-ratio:.86;--plate-chrome:180px}
  .toolkit .overview-view .hero .plate-heading{display:none}
  .toolkit .overview-view .hero{min-height:0;gap:10px;padding:14px 0 30px}
  .toolkit .overview-view .hero .eyebrow{margin:0}
  .toolkit .overview-view .hero h1{font-size:44px;margin:0;letter-spacing:-1.2px}
  .toolkit .overview-view .hero-thesis{font-size:20px;margin:0}
  .toolkit .overview-view .botanical-plate{grid-row:4;margin:6px auto 0}
  .toolkit .overview-view .hero-intro{grid-row:5;margin:14px 0 0;font-size:17px}
  .toolkit .overview-view .hero-actions{grid-row:6;margin:4px 0 0}
  .overview-intro{padding:36px 0 10px}
  .overview-intro .question-cards{grid-template-columns:1fr}
  .overview-intro .question-card,.overview-intro .question-card:nth-child(odd){border-left:0;padding-left:0;border-top:1px solid var(--line)}
  .overview-intro .question-card:first-child{border-top:0}
}

/* Every view, screen by screen: --screen is the height left under the sticky header.
   Each plate is capped so it can be seen whole on one screen. */
.toolkit{--screen:calc(100svh - var(--header-h,77px))}
.toolkit .ring-image{max-width:calc(var(--screen) - 150px);margin-inline:auto}
.toolkit .water-reflection{max-width:min(440px,calc((var(--screen) - 60px) * .667))}
.toolkit .culture-figure{max-width:min(980px,calc((var(--screen) - 190px) * 1.5));margin:0 auto 34px}
.toolkit .culture-figure .plate-number{margin-bottom:10px}
.toolkit .culture-figure .culture-plate{max-width:none}
.toolkit .culture-study .study-top{justify-content:flex-start}
.toolkit .growth-study{max-width:calc((var(--screen) - 150px) * 1.5);margin-inline:auto}
.toolkit .branch-study{max-width:calc((var(--screen) - 120px) * 1.5);margin-inline:auto}
.toolkit .kit-plate{max-width:calc((var(--screen) - 80px) * 1.5);margin-inline:auto}
.toolkit .key-plate{width:min(100%,calc((var(--screen) - 120px) * 1.05));margin-inline:auto}
@media(min-width:901px){
  /* Wide screens: the heading runs in two columns so the first plate shares the first screen. */
  .toolkit .view.chapter,.toolkit .view>.chapter:first-child{padding-top:36px}
  .toolkit .view>.section-heading{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:56px;align-items:end;max-width:none;margin-bottom:30px}
  .toolkit .view>.section-heading>.eyebrow{grid-column:1/-1}
  .toolkit .view>.section-heading>h2{grid-column:1;margin-bottom:4px}
  .toolkit .view>.section-heading>:not(.eyebrow):not(h2){grid-column:2;margin-bottom:0;font-size:19px}
  .toolkit .ring-study{align-items:start}
  /* The AI plate is tall: the seven-layer ledger fills the first screen and the plate follows. */
  .toolkit #ai{display:flex;flex-direction:column}
  .toolkit #ai>.section-heading{order:-2}
  .toolkit #ai>.agent-ledger{order:-1;margin:0 0 64px}
}
@media(max-width:900px){
  /* Narrow screens: title, then the plate, then the lead. */
  .toolkit .view.chapter:has(>.section-heading+:is(.ring-study,.reflection-study)){display:flex;flex-direction:column}
  .toolkit .view.chapter:has(>.section-heading+:is(.ring-study,.reflection-study))>.section-heading{display:contents}
  .toolkit .view>.section-heading>:is(.eyebrow,h2){order:-2}
  .toolkit .view>.section-heading+:is(.ring-study,.reflection-study){order:-1;margin-bottom:28px}
  .toolkit .ring-image{max-width:calc(var(--screen) - 200px)}
  .toolkit .reflection-study{display:flex;flex-direction:column}
  .toolkit .reflection-study .reflection-intro{order:1;margin-top:20px}
  .toolkit .water-reflection{max-width:min(440px,calc((var(--screen) - 190px) * .667))}
}

/* Culture and Requests: like the overview, the heading and the plate share the first screen; the rest follows. */
.toolkit #canopy .culture-study{display:contents}
.toolkit #canopy .culture-figure .plate-number{text-align:center}
/* Plate IV holds two rows; compact spacing keeps both, with their labels, on the first screen. */
.toolkit #soil .growth-study{padding-top:12px}
.toolkit #soil .growth-study .study-top{margin-bottom:12px}
.toolkit #soil .growth-row+.growth-row{margin-top:14px}
.toolkit #soil :is(.growth-way,.growth-labels p){font-size:15px;line-height:1.3}
@media(min-width:681px){
  .toolkit :is(#canopy,#soil){display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);column-gap:48px;align-items:center}
  .toolkit :is(#canopy,#soil)>*,.toolkit #canopy .culture-study>*{grid-column:1/-1}
  .toolkit :is(#canopy,#soil)>.section-heading{grid-column:1;grid-row:1;display:block;margin:0}
  .toolkit :is(#canopy,#soil)>.section-heading>.lead{font-size:19px;margin:0}
  .toolkit :is(#canopy .culture-figure,#soil .growth-study){grid-column:2;grid-row:1;width:100%;max-width:min(100%,calc((var(--screen) - 150px) * 1.5));margin:0 auto}
  .toolkit #canopy .study-top{margin-top:40px;padding-top:18px;border-top:1px solid var(--line)}
  .toolkit #soil .growth-study{margin-bottom:0}
  .toolkit #soil .demand{margin-top:40px;padding-top:28px;border-top:1px solid var(--line)}
}
@media(max-width:680px){
  .toolkit :is(#canopy,#soil){display:flex;flex-direction:column}
  .toolkit :is(#canopy,#soil)>.section-heading{display:contents}
  .toolkit :is(#canopy,#soil)>.section-heading>:is(.eyebrow,h2){order:-2}
  .toolkit :is(#canopy .culture-figure,#soil .growth-study){order:-1;margin-bottom:26px}
  .toolkit #canopy .study-top{margin-top:28px;padding-top:16px;border-top:1px solid var(--line)}
  .toolkit #soil .demand{margin-top:28px;padding-top:20px;border-top:1px solid var(--line)}
  .toolkit #soil .growth-study .micro{display:none}
  .toolkit #soil .growth-way{font-size:14px;margin-bottom:2px}
  .toolkit #soil .growth-way .eyebrow{display:block;margin:0 0 2px}
  .toolkit #soil .growth-labels>div{padding-inline:2px}
  .toolkit #soil .growth-labels p{font-size:13px;line-height:1.25;max-width:none}
}
@media(min-width:681px) and (max-width:1100px){
  .toolkit :is(#canopy,#soil){grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:36px}
  .toolkit :is(#canopy,#soil)>.section-heading>.lead{font-size:17px}
  .toolkit #canopy .culture-specimens h3{font-size:21px;letter-spacing:-.3px}
  .toolkit #canopy .culture-specimens .culture-answer{font-size:15px}
  .toolkit #soil .growth-study .micro{display:none}
}
@media(min-width:681px) and (max-height:620px){
  /* Short windows: a tighter heading so the intro stays beside the plate on the first screen. */
  .toolkit :is(#canopy,#soil).chapter{padding-top:24px}
  .toolkit :is(#canopy,#soil) h2{font-size:30px;margin-bottom:12px}
  .toolkit :is(#canopy,#soil)>.section-heading>.lead{font-size:16px;line-height:1.4}
  .toolkit #soil .growth-study .micro{display:none}
  .toolkit #soil .growth-way{font-size:14px;margin-bottom:2px}
  .toolkit #soil .growth-way .eyebrow{display:block;margin:0 0 2px}
  .toolkit #soil .growth-labels>div{padding-inline:2px}
  .toolkit #soil .growth-labels p{font-size:13px;line-height:1.25}
}
