:root {
  color-scheme:light;
  --paper:#f6f5ee; --panel:#eff1e6; --ink:#192f24; --pine:#254d37;
  --dim:#506255; --line:#c3cabc; --lime:#dfedb4;
  --serif:"Baskervville",Georgia,serif; --mono:"IBM Plex Mono",Consolas,monospace;
  font:16px/1.5 "Instrument Sans","Segoe UI",sans-serif;
  color:var(--ink); background:var(--paper);
}
* { box-sizing:border-box }
body,h1,h2,p { margin:0 }
button,input,select { font:inherit; color:inherit }
button { cursor:pointer }
a { color:inherit; text-underline-offset:3px }
:focus-visible { outline:3px solid #b56b23; outline-offset:3px }
[hidden] { display:none!important }
.wrap { max-width:1420px; width:calc(100% - clamp(32px,8vw,148px)); margin:auto }
.scope-toolbar,.tray-heading,.control-line,.stage-base,.stage-top,.sample-line,.footer,.dialog-head {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.intro { padding:clamp(30px,4vw,60px) 0 23px }
.kicker,.section-label,.stage-top,.stage-base,.sample-id,.grain-number,.zoom-note,.slide-num,.field-id {
  font-family:var(--mono);
}
.kicker,.section-label { text-transform:uppercase; font-size:.73rem; letter-spacing:.12em; color:var(--dim) }
.kicker { display:flex; align-items:center; gap:9px }
.kicker i { width:20px; height:1px; background:currentColor }
h1 { font:normal clamp(3.35rem,6.1vw,6.4rem)/1.02 var(--serif); letter-spacing:-.067em; margin-top:5px }
h1 em { font-weight:normal; color:var(--pine) }
.lede { margin:13px 0 4px; font:normal clamp(1.25rem,2.1vw,1.9rem)/1.25 var(--serif); letter-spacing:-.025em }
.tray-intro { color:var(--dim); font-size:.94rem }
.tray-intro a { font-weight:600 }
.scope-toolbar { border-top:1px solid var(--line); padding:10px 0 }
.line-button,.solid-button,.reset,.close { border-radius:5px; background:transparent; border:1px solid var(--line); padding:6px 12px; font-size:.9rem }
.line-button span,.solid-button span { margin-right:4px; font-size:1.04em }
.line-button:hover,.focus button:hover,.browse:hover { background:#e4e9dc }
.line-button[aria-pressed=true],.solid-button,.focus button[aria-pressed=true] { color:#fff; background:var(--pine); border-color:var(--pine) }
#viewers { display:grid; gap:12px }
.viewer { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(270px,1fr); grid-template-areas:"stage plant" "controls plant"; min-width:0; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:var(--panel) }
.stage {
  --diam:clamp(272px,26vw,420px);
  grid-area:stage; min-width:0; position:relative; isolation:isolate; display:grid; place-items:center;
  min-height:calc(var(--diam) + 77px); padding:38px 0; color:#e7ecd9;
  background:radial-gradient(ellipse at center,#3a513c,#1c3125 58%,#14251b);
}
.stage::before { content:""; position:absolute; inset:0; pointer-events:none; opacity:.17; background:radial-gradient(#a7b49a .6px,transparent 1px) 0 0/7px 7px }
.ring { width:min(var(--diam),80%); aspect-ratio:1; padding:5px; position:relative; border-radius:50%; border:1px solid #8e9e84; box-shadow:0 0 0 6px #26392b,0 0 0 7px #60735d,0 12px 35px #0f1c15; background:#1b2a1d }
.lens { position:relative; overflow:hidden; border-radius:50%; width:100%; height:100%; background:#67705b; cursor:grab; touch-action:none }
.lens.dragging { cursor:grabbing }
.image-slot,.image-slot img { position:absolute; top:0; left:0 }
.image-slot img { max-width:none; transform-origin:0 0; user-select:none; pointer-events:none }
.reticle { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:14px; height:14px; pointer-events:none; opacity:.52; background:linear-gradient(#2e3c2c,#2e3c2c) center/1px 100% no-repeat,linear-gradient(#2e3c2c,#2e3c2c) center/100% 1px no-repeat }
.stage-top,.stage-base { position:absolute; left:17px; right:17px; font-size:.72rem; color:#d5ddc9 }
.stage-top { top:13px; text-transform:uppercase; letter-spacing:.07em }
.plane-tag { text-transform:none }
.field-tag::before { content:""; display:inline-block; width:7px; height:7px; margin-right:7px; border-radius:50%; background:var(--lime) }
.stage-base { bottom:10px }
.reset { padding:3px 8px; color:#ecf0e2; border-color:#758774; font-size:.75rem }
.loading { position:absolute; background:#213428; padding:6px 12px; border-radius:4px; font-size:.9rem }
.settings { grid-area:controls; padding:14px 18px; display:grid; grid-template-columns:1.2fr 1fr auto; align-items:center; gap:14px; min-width:0 }
.specimen { grid-area:plant; margin:0; min-width:0; padding:clamp(18px,2vw,30px); border-left:1px solid var(--line); display:flex; flex-direction:column; gap:9px; justify-content:center }
.plant-portrait { position:relative; display:block; padding:0; border:0; border-radius:5px; background:#d8dfce; overflow:hidden; cursor:zoom-in }
.plant-portrait img { display:block; width:100%; height:clamp(135px,15vw,230px); object-fit:cover }
.enlarge { position:absolute; bottom:6px; right:6px; background:#1b322ae8; color:white; border-radius:4px; font-size:1.15rem; line-height:1; padding:5px }
.specimen h2 { font:normal clamp(1.65rem,2.4vw,2.5rem)/1.1 var(--serif); letter-spacing:-.045em; overflow-wrap:anywhere }
.species { font:italic 1rem/1.35 var(--serif); color:var(--dim) }
.plant-description { font-size:.95rem; line-height:1.5 }
.photo-credit { font-size:.77rem; line-height:1.4; color:var(--dim); overflow-wrap:anywhere }
#plant-detail { width:min(820px,calc(100% - 24px)); max-height:90dvh }
#plant-detail .plant-image { display:block; margin:14px auto; max-width:100%; max-height:54vh; object-fit:contain; border-radius:4px }
#plant-detail .photo-credit { margin-top:10px }
.browse { font-size:.8rem; color:var(--pine); background:none; border:0; text-decoration:underline; padding:3px 0 }
.grain-number,.zoom-note { font-size:.74rem; color:var(--dim) }
.control-title { font-size:.92rem; font-weight:600 }
.focus-block,.zoom-block { min-width:0 }
.grain-block { display:grid; justify-items:start; gap:5px }
.focus { display:flex; gap:4px; margin-top:7px }
.focus button { padding:7px 4px; flex:1; border-radius:4px; border:1px solid #b8c3b0; background:transparent; font-size:.86rem }
.control-line output { font:.83rem var(--mono) }
.zoom-label input { width:100%; margin:8px 0 2px; accent-color:var(--pine); cursor:pointer }
.find-grain { justify-self:start }
.comparing { grid-template-columns:repeat(2,minmax(0,1fr)) }
.comparing .viewer { display:flex; flex-direction:column; justify-content:flex-start }
.comparing .stage { --diam:clamp(205px,22vw,350px) }
.comparing .settings { grid-template-columns:1fr 1fr; align-items:start; gap:12px 18px }
.comparing .specimen { display:grid; grid-template-columns:70px minmax(0,1fr); align-content:start; align-items:center; gap:5px 12px; border-left:0; border-bottom:1px solid var(--line); padding:14px 18px }
.comparing .sample-line,.comparing .photo-credit { grid-column:1/-1 }
.comparing .plant-portrait img { height:60px }
.comparing .plant-description { display:none }
.comparing .enlarge { font-size:.8rem; padding:2px; right:3px; bottom:3px }
.comparing .specimen h2 { font-size:1.8rem }
.without-portrait :is(.plant-portrait,.species,.photo-credit,.plant-description) { display:none }
.tray-section { padding:28px 0 35px }
.tray-heading { margin-bottom:13px }
.tray-heading h2,.dialog-head h2,.credits h2 { font:normal 1.95rem/1.15 var(--serif); letter-spacing:-.045em }
.tray-heading .section-label { margin-bottom:5px }
.solid-button { font-weight:600; padding:8px 16px }
.solid-button:hover { background:#163322 }
.tray { display:grid; grid-template-columns:repeat(10,minmax(0,1fr)); gap:7px }
.slide { padding:4px; background:transparent; border:1px solid var(--line); border-radius:5px; min-width:0; text-align:left }
.slide:hover,.slide[aria-pressed=true] { border-color:var(--pine) }
.slide[aria-pressed=true] { box-shadow:inset 0 0 0 1px var(--pine); background:#e2e8d5 }
.slide img { display:block; width:100%; height:clamp(48px,5.2vw,83px); object-fit:cover; border-radius:2px }
.slide-num { display:block; font-size:.71rem; margin:5px 2px 0; color:var(--dim) }
.slide-name { display:block; margin:1px 2px 3px; font:italic .87rem/1.14 var(--serif); overflow-wrap:anywhere }
.footer { padding:18px 0 24px; border-top:1px solid var(--line); font-size:.82rem; color:var(--dim) }
dialog { padding:24px; width:min(600px,calc(100% - 25px)); max-height:80vh; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:var(--paper) }
dialog::backdrop { background:#12241ac7 }
.close { font-size:1.25rem }
.species-filter { display:flex; gap:12px; align-items:center; margin:16px 0 }
.species-filter select { flex:1; min-width:0; padding:6px; border:1px solid var(--line); border-radius:4px; background:var(--paper) }
#field-list { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:6px }
.credits { max-width:760px; padding:42px 0 60px }
.credits h1 { margin-bottom:24px }
.credits section { padding:18px 0; border-top:1px solid var(--line) }
.credits p { margin:9px 0; line-height:1.6 }
.credit-list { padding:0; list-style:none }
.credit-list li { padding:14px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere }
.credit-list h3 { margin:0; font:italic 1.25rem var(--serif) }
.credit-list p { margin:3px 0; font-size:.92rem }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap }
@media(max-width:950px) {
  .tray { grid-template-columns:repeat(5,minmax(0,1fr)) }
  .settings { grid-template-columns:1fr 1fr }
  .comparing .settings { grid-template-columns:1fr }
}
@media(max-width:680px) {
  .intro { display:block; padding:24px 0 18px }
  .lede { margin-top:10px }
  .viewer { display:flex; flex-direction:column }
  .stage { --diam:min(69vw,340px) }
  .settings { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; padding:17px }
  .specimen { border-left:0; border-bottom:1px solid var(--line) }
  .plant-portrait img { height:clamp(150px,40vw,235px) }
  .focus button { font-size:.75rem }
  .comparing { grid-template-columns:1fr 1fr; gap:5px!important }
  .comparing .stage { --diam:min(30vw,190px); min-height:calc(var(--diam) + 64px) }
  .comparing .stage-top,.comparing .stage-base { left:6px;right:6px; font-size:.62rem }
  .comparing .stage-top { top:8px }
  .comparing .stage-base>span { display:none }
  .comparing .stage-base { justify-content:flex-end; bottom:5px }
  .comparing .settings { padding:10px;gap:8px }
  .comparing .sample-line { align-items:flex-start; flex-direction:column; gap:0 }
  .comparing .specimen { grid-template-columns:1fr; padding:10px }
  .comparing .plant-portrait img { height:80px }
  .comparing .specimen h2 { font-size:1.35rem }
  .comparing .focus { flex-wrap:wrap }
  .comparing .focus button { min-width:38px }
  .comparing .find-grain { padding:5px;font-size:.81rem }
  .footer { flex-wrap:wrap }
}
@media(max-width:410px) {
  .settings { grid-template-columns:1fr }
  .tray { gap:4px }
  .slide-name { font-size:.73rem }
  #field-list { grid-template-columns:repeat(3,minmax(0,1fr)) }
}
