/* Home page upgrades (22 Oct 2026): tree controls, map, timeline, gallery, words. */
.tool-row{display:flex;flex-wrap:wrap;gap:.5rem;margin:0 0 1rem}
.tbtn{font:inherit;font-size:.92rem;font-weight:600;min-height:44px;padding:.45rem .95rem;border-radius:999px;border:1px solid var(--line);background:var(--paper);color:var(--soil);cursor:pointer}
.tbtn:hover{border-color:var(--terra);color:var(--terra)}
.tbtn[aria-pressed="true"]{background:var(--soil);color:var(--paper);border-color:var(--soil)}
.tree-zoom{transform-origin:0 0;transition:transform .2s}
.tree .tog{font:inherit;background:none;border:0;cursor:pointer;color:var(--terra);font-weight:700;width:1.6rem;height:1.6rem;margin-right:.15rem;border-radius:6px;vertical-align:middle}
.tree .tog:hover{background:rgba(0,100,0,.1)}
.tree li.collapsed>ul{display:none}
.node{cursor:default}
.node.found{outline:3px solid var(--yam);outline-offset:2px}
.tree-search{font:inherit;min-height:44px;padding:.45rem .9rem;border:1px solid var(--line);border-radius:999px;background:var(--paper);min-width:12rem;flex:1 1 12rem;max-width:20rem}
#mb-map{height:380px;border-radius:18px;border:1px solid var(--line);box-shadow:var(--shadow);background:#e4e4e4;z-index:0}
.map-note{margin-top:.8rem;font-size:.92rem;color:var(--muted);max-width:46rem}
.leaflet-popup-content{font-family:"Source Sans 3",system-ui,sans-serif;font-size:.95rem}
.timeline{list-style:none;position:relative;margin-top:1rem;padding-left:1.6rem;border-left:3px solid rgba(0,100,0,.3);max-width:46rem}
.timeline li{position:relative;padding:.2rem 0 1.3rem}
.timeline li::before{content:"";position:absolute;left:calc(-1.6rem - 8px);top:.55rem;width:13px;height:13px;border-radius:50%;background:var(--yam);border:3px solid var(--soil)}
.timeline .yr{font-family:"Cormorant Garamond",serif;font-weight:700;font-size:1.5rem;color:var(--terra);line-height:1.1;display:block}
.timeline li[hidden]{display:none}
@media(min-width:700px){
.stat .k{text-transform:uppercase;letter-spacing:.12em;font-size:.75rem;font-weight:600;color:var(--terra)}
.stat .v{display:block;font-family:"Cormorant Garamond",serif;font-size:2rem;font-weight:700;color:var(--soil);line-height:1.15;margin:.2rem 0}
.stat .s{font-size:.92rem;color:var(--muted)}
.skel{display:inline-block;width:7rem;height:1.6rem;border-radius:6px;background:linear-gradient(90deg,#e2e2e2,#f5f5f5,#e2e2e2);background-size:200% 100%;animation:sk 1.2s infinite}
@keyframes sk{to{background-position:-200% 0}}
.gallery{display:grid;gap:.8rem;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));margin-top:1rem}
.gallery img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:12px}
.empty{border:2px dashed rgba(0,100,0,.35);border-radius:18px;padding:1.5rem;background:var(--paper);max-width:46rem}
.mb-form{display:grid;gap:.7rem;margin-top:1rem}
.mb-form label{font-weight:600;font-size:.95rem;color:var(--soil);display:grid;gap:.25rem}
.mb-form input,.mb-form textarea{font:inherit;padding:.6rem .8rem;border:1px solid rgba(0,0,0,.35);border-radius:10px;background:#fff;min-height:44px}
.mb-form button{justify-self:start}
.hp{position:absolute;left:-9999px}
.word-card .tiv{font-family:"Cormorant Garamond",serif;font-size:2.4rem;font-weight:700;color:var(--soil);line-height:1.1}
.word-card .mean{font-size:1.1rem;margin-top:.3rem}
.word-card .src{font-size:.88rem;color:var(--muted);margin-top:.5rem}
.quiz{margin-top:1.2rem}
.quiz .opts{display:grid;gap:.5rem;margin-top:.6rem}
@media(min-width:640px){.quiz .opts{grid-template-columns:repeat(2,1fr)}}
.quiz .opt{text-align:left;border-radius:12px}
.quiz .opt.right{background:var(--leaf);color:var(--paper);border-color:var(--leaf)}
.quiz .opt.wrong{background:#8b1a1a;color:#fff;border-color:#8b1a1a}
.quiz .fb{min-height:1.6rem;margin-top:.6rem;font-weight:600}
/* contrast: muted text on cream measured 7.4:1; tags and notes keep that colour */
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid var(--terra);outline-offset:3px}
.hero a:focus-visible,footer a:focus-visible{outline-color:var(--yam)}
