/* ==========================================================================
   The Mountain Institute – India  ·  Dr. Ghanashyam Sharma
   Prototype stylesheet. Field-led, photographic, restrained.
   ========================================================================== */

:root{
  --ink:#1c211f;
  --ink-soft:#4a534f;
  --ink-faint:#676f6c;
  --paper:#fbfaf7;
  --paper-warm:#f3efe7;
  --forest:#1f3a30;
  --forest-mid:#2f5c4a;
  --moss:#5a7456;
  --clay:#b0613a;
  --line:#ddd8cd;
  --max:1180px;
  --gut:clamp(1.25rem,4vw,3rem);
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Helvetica,Arial,sans-serif;
  font-size:17px;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block;height:auto}
a{color:var(--forest-mid);text-decoration:none}
a:hover{text-decoration:underline;text-underline-offset:3px}

h1,h2,h3,h4{
  font-family:'Source Serif 4',Georgia,'Times New Roman',serif;
  font-weight:600;
  line-height:1.18;
  letter-spacing:-.01em;
  color:var(--forest);
  margin:0 0 .6em;
}
h1{font-size:clamp(2.1rem,5vw,3.4rem)}
h2{font-size:clamp(1.6rem,3.2vw,2.3rem)}
h3{font-size:clamp(1.15rem,2vw,1.4rem)}
p{margin:0 0 1.1em;max-width:68ch}
.lede{font-size:clamp(1.08rem,1.6vw,1.28rem);color:var(--ink-soft);line-height:1.62}

.wrap{max-width:var(--max);margin-inline:auto;padding-inline:var(--gut)}
.narrow{max-width:760px}
section{padding-block:clamp(3rem,7vw,5.5rem)}
.tint{background:var(--paper-warm)}
.dark{background:var(--forest);color:#e7eee9}
.dark h1,.dark h2,.dark h3{color:#fff}
.dark p{color:#c9d8cf}
.dark a{color:#a8d0bd}

.eyebrow{
  font-size:.735rem;letter-spacing:.16em;text-transform:uppercase;
  font-weight:600;color:var(--moss);margin:0 0 1rem;
}
.dark .eyebrow{color:#8fbca6}

/* ---------- header ---------- */
.site-head{
  position:sticky;top:0;z-index:50;
  background:rgba(251,250,247,.94);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.head-inner{
  max-width:var(--max);margin-inline:auto;padding:.75rem var(--gut);
  display:flex;align-items:center;justify-content:space-between;gap:1.5rem;flex-wrap:wrap;
}
.brand{display:flex;flex-direction:column;line-height:1.25}
.brand b{
  font-family:'Source Serif 4',Georgia,serif;font-size:1.06rem;font-weight:600;color:var(--forest);
}
.brand span{font-size:.7rem;letter-spacing:.11em;text-transform:uppercase;color:var(--ink-faint)}
nav ul{display:flex;gap:1.35rem;list-style:none;margin:0;padding:0;flex-wrap:wrap}
nav a{
  font-size:.86rem;color:var(--ink-soft);font-weight:500;
  padding-bottom:3px;border-bottom:2px solid transparent;
}
nav a:hover{color:var(--forest);text-decoration:none;border-bottom-color:var(--moss)}
nav a[aria-current="page"]{color:var(--forest);border-bottom-color:var(--clay)}

/* ---------- hero ---------- */
.hero{position:relative;min-height:clamp(430px,72vh,660px);display:flex;align-items:flex-end;overflow:hidden}
.hero img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.hero::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(16,28,22,.30) 0%,rgba(16,28,22,.20) 40%,rgba(16,28,22,.86) 100%);
}
/* Wide screens: add a left-to-right scrim so the copy sits on darkness while the
   right of the frame stays clear. Lets a photograph with a bright subject in the
   middle band (the Khangchendzonga hero) keep its subject legible behind the text. */
@media (min-width:821px){
  .hero::after{
    background:
      linear-gradient(90deg,rgba(16,28,22,.66) 0%,rgba(16,28,22,.34) 40%,rgba(16,28,22,0) 66%),
      linear-gradient(180deg,rgba(16,28,22,.26) 0%,rgba(16,28,22,.16) 38%,rgba(16,28,22,.84) 100%);
  }
}
.hero-copy{position:relative;z-index:2;color:#fff;padding-block:clamp(2.5rem,6vw,4rem);max-width:var(--max);margin-inline:auto;width:100%;padding-inline:var(--gut)}
.hero-copy h1{color:#fff;max-width:20ch;text-shadow:0 2px 24px rgba(0,0,0,.35)}
.hero-copy p{color:#e2ece5;max-width:56ch;font-size:clamp(1rem,1.5vw,1.18rem)}
.page-hero{min-height:clamp(240px,36vh,340px)}

/* ---------- buttons ---------- */
.btn{
  display:inline-block;padding:.72rem 1.5rem;border-radius:2px;
  font-size:.88rem;font-weight:600;letter-spacing:.02em;
  background:var(--clay);color:#fff;border:1px solid var(--clay);
}
.btn:hover{background:#9d5433;border-color:#9d5433;text-decoration:none}
.btn-ghost{background:transparent;color:#fff;border-color:rgba(255,255,255,.55)}
.btn-ghost:hover{background:rgba(255,255,255,.12);border-color:#fff}
.btn-row{display:flex;gap:.85rem;flex-wrap:wrap;margin-top:1.6rem}

/* ---------- stats ---------- */
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:1px;background:var(--line);border:1px solid var(--line)}
.stat{background:var(--paper);padding:1.5rem 1.25rem}
.tint .stat{background:var(--paper-warm)}
.stat b{display:block;font-family:'Source Serif 4',Georgia,serif;font-size:clamp(1.9rem,3.4vw,2.6rem);color:var(--forest);line-height:1}
.stat span{display:block;margin-top:.5rem;font-size:.82rem;color:var(--ink-faint);line-height:1.45}

/* ---------- grids & cards ---------- */
.grid{display:grid;gap:clamp(1.25rem,2.6vw,2rem)}
.g2{grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}
.g3{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.card{background:var(--paper);border:1px solid var(--line);overflow:hidden;display:flex;flex-direction:column}
.tint .card{background:#fff}
.card img{aspect-ratio:3/2;object-fit:cover;width:100%}
.card-body{padding:1.35rem 1.4rem 1.6rem}
.card h3{margin-bottom:.45rem}
.card p{font-size:.94rem;color:var(--ink-soft);margin-bottom:0}

.split{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:clamp(1.5rem,4vw,3.5rem);align-items:center}
.split img{aspect-ratio:4/3;object-fit:cover;width:100%}
.portrait{aspect-ratio:3/4;max-width:340px;object-fit:cover;border:1px solid var(--line)}

/* ---------- lists ---------- */
.ticks{list-style:none;padding:0;margin:0 0 1.2em}
.ticks li{position:relative;padding-left:1.55rem;margin-bottom:.6rem;max-width:66ch}
.ticks li::before{content:"";position:absolute;left:0;top:.62em;width:8px;height:8px;background:var(--moss);border-radius:50%}
.dark .ticks li::before{background:#8fbca6}

/* ---------- table ---------- */
table{width:100%;border-collapse:collapse;font-size:.92rem;margin-bottom:1.4rem}
th,td{text-align:left;padding:.78rem .9rem;border-bottom:1px solid var(--line);vertical-align:top}
th{background:var(--forest);color:#fff;font-weight:600;font-size:.8rem;letter-spacing:.05em;text-transform:uppercase}
tbody tr:nth-child(even){background:var(--paper-warm)}
.tint tbody tr:nth-child(even){background:#fff}
.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}

/* ---------- publications ---------- */
.pub{padding:1rem 0;border-bottom:1px solid var(--line);max-width:none}
.pub .year{font-size:.78rem;letter-spacing:.08em;color:var(--clay);font-weight:600}
.pub .title{font-family:'Source Serif 4',Georgia,serif;font-size:1.06rem;color:var(--forest);margin:.15rem 0}
.pub .venue{font-size:.88rem;color:var(--ink-faint);font-style:italic}

/* ---------- quote ---------- */
.pull{
  border-left:3px solid var(--clay);padding:.4rem 0 .4rem 1.5rem;margin:2rem 0;
  font-family:'Source Serif 4',Georgia,serif;font-size:clamp(1.15rem,2.2vw,1.5rem);
  line-height:1.45;color:var(--forest);max-width:44ch;
}
.dark .pull{color:#dfeee6;border-left-color:#8fbca6}

/* ---------- strip of images ---------- */
.strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:2px}
.strip img{aspect-ratio:1/1;object-fit:cover;width:100%}

/* ---------- footer ---------- */
.site-foot{background:#16241d;color:#9fb3a8;padding-block:3rem 2rem;font-size:.9rem}
.site-foot .wrap{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:2rem}
.site-foot h4{color:#fff;font-size:.98rem;margin-bottom:.7rem}
.site-foot a{color:#9fb3a8}
.site-foot a:hover{color:#fff}
.site-foot ul{list-style:none;padding:0;margin:0}
.site-foot li{margin-bottom:.4rem}
.foot-bottom{border-top:1px solid #24382e;margin-top:2.5rem;padding-top:1.4rem;font-size:.8rem;color:#6c8175}
.foot-bottom .wrap{display:block}

/* ---------- misc ---------- */
.note{font-size:.85rem;color:var(--ink-faint);font-style:italic}
.proto-flag{background:#fff4d6;border-bottom:1px solid #e8d9a8;color:#6a5514;font-size:.8rem;padding:.5rem var(--gut);text-align:center}

@media (max-width:640px){
  .head-inner{flex-direction:column;align-items:flex-start;gap:.7rem}
  nav ul{gap:.95rem}
  body{font-size:16px}
}

/* ==========================================================================
   Added for the field school, retreat and booking pages
   ========================================================================== */

/* ---------- skip link ---------- */
.skip{
  position:absolute;left:-9999px;top:0;z-index:100;
  background:var(--forest);color:#fff;padding:.7rem 1.2rem;font-size:.9rem;font-weight:600;
}
.skip:focus{left:0;text-decoration:none}

/* ---------- visible focus ---------- */
a:focus-visible,button:focus-visible,input:focus-visible,
select:focus-visible,textarea:focus-visible{
  outline:3px solid var(--clay);outline-offset:2px;
}

/* ---------- header additions ---------- */
/* Nav is now nine items plus a call-to-action button. Tightened so the header
   stays on one line at 1180px content width instead of wrapping. */
nav{display:flex;align-items:center;gap:1.1rem}
nav ul{gap:1.02rem}
nav a{font-size:.83rem}
.btn-sm{padding:.45rem 1rem;font-size:.8rem}
.nav-cta{white-space:nowrap}
.nav-toggle{
  display:none;background:none;border:1px solid var(--line);border-radius:2px;
  padding:.55rem .6rem;cursor:pointer;line-height:0;
}
.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after{
  display:block;width:20px;height:2px;background:var(--forest);content:"";position:relative;
}
.nav-toggle .bars::before{position:absolute;top:-6px}
.nav-toggle .bars::after{position:absolute;top:6px}
.nav-toggle[aria-expanded="true"] .bars{background:transparent}
.nav-toggle[aria-expanded="true"] .bars::before{top:0;transform:rotate(45deg)}
.nav-toggle[aria-expanded="true"] .bars::after{top:0;transform:rotate(-45deg)}

/* ---------- button variants ---------- */
/* solid light: for use over photography, where a transparent ghost button
   loses contrast wherever the image happens to be pale */
.btn-solid-light{background:rgba(255,255,255,.92);color:var(--forest);border-color:rgba(255,255,255,.92)}
.btn-solid-light:hover{background:#fff;border-color:#fff;text-decoration:none}
/* ghost for use on paper backgrounds, not on photographs */
.btn-ghost-dark{background:transparent;color:var(--forest);border-color:var(--forest)}
.btn-ghost-dark:hover{background:var(--forest);color:#fff;text-decoration:none}

/* ---------- forms ---------- */
.bookform p{max-width:none;margin:0 0 1rem}
.bookform label{display:block;font-size:.85rem;font-weight:600;margin-bottom:.3rem;color:var(--forest)}
.bookform .opt{font-weight:400;color:var(--ink-faint)}
.bookform input,.bookform select,.bookform textarea{
  width:100%;padding:.65rem;border:1px solid var(--line);background:#fff;
  font:inherit;color:var(--ink);border-radius:2px;
}
.bookform textarea{resize:vertical}
.bookform .hint{display:block;font-size:.8rem;color:var(--ink-faint);margin-top:.3rem}

/* ---------- callout ---------- */
.callout{background:var(--paper-warm);border:1px solid var(--line);border-left:3px solid var(--clay);padding:1.3rem 1.4rem}
.callout h3{margin-bottom:.5rem}
.callout p:last-child{margin-bottom:0}
.tint .callout{background:#fff}

/* ---------- numbered steps ---------- */
.steps{counter-reset:s;list-style:none;padding:0;margin:0 0 1.2em}
.steps li{position:relative;padding-left:2.1rem;margin-bottom:.7rem;max-width:60ch}
.steps li::before{
  counter-increment:s;content:counter(s);
  position:absolute;left:0;top:.15em;
  width:1.5rem;height:1.5rem;border-radius:50%;
  background:var(--forest);color:#fff;
  font-size:.78rem;font-weight:600;line-height:1.5rem;text-align:center;
}

/* ---------- mobile ---------- */
@media (max-width:820px){
  .head-inner{flex-direction:row;align-items:center;gap:1rem;flex-wrap:nowrap}
  .nav-toggle{display:block}
  nav{
    display:none;position:absolute;left:0;right:0;top:100%;
    flex-direction:column;align-items:stretch;gap:0;
    background:var(--paper);border-bottom:1px solid var(--line);
    padding:.5rem var(--gut) 1.1rem;
    box-shadow:0 12px 24px rgba(0,0,0,.07);
  }
  nav.open{display:flex}
  nav ul{flex-direction:column;gap:0}
  nav li{border-bottom:1px solid var(--line)}
  nav ul a{display:block;padding:.8rem 0;font-size:.95rem;border-bottom:none}
  nav ul a[aria-current="page"]{border-bottom:none;color:var(--clay)}
  .nav-cta{margin-top:1rem;text-align:center}
}

/* ---------- figure captions ---------- */
figure{margin:0}
figcaption{
  margin-top:.6rem;
  font-size:.82rem;
  line-height:1.5;
  color:var(--ink-faint);
  font-style:italic;
  max-width:52ch;
}

/* caption inside a card: align it to the card body's padding */
.card figure{margin:0}
.card figcaption{margin:0;padding:.7rem 1.4rem 0}

/* ==========================================================================
   Lecture repositioning, responsive <picture>, forms and motion
   ========================================================================== */

/* ---------- <picture> wrappers ----------
   picture is an inline element by default; in the grid and flex contexts the
   layout uses, it must behave like the <img> it replaces. */
picture{display:block;min-width:0}
.hero picture{position:absolute;inset:0}
.card picture,.split picture,.strip picture{display:block}

/* ---------- hero secondary text link ---------- */
.hero-link{margin:1.1rem 0 0}
.hero-link a{
  color:#fff;font-size:.9rem;font-weight:500;
  border-bottom:1px solid rgba(255,255,255,.45);padding-bottom:2px;
}
.hero-link a:hover{border-bottom-color:#fff;text-decoration:none}

/* ---------- course-fit line on lecture cards ---------- */
.fits{
  margin:.9rem 0 0;padding-top:.75rem;border-top:1px solid var(--line);
  font-size:.82rem;color:var(--ink-faint);line-height:1.5;
}
.fits strong{color:var(--ink-soft)}

/* ---------- DOI on publication rows ---------- */
.pub .doi{color:var(--ink-faint);font-style:normal;white-space:nowrap}
.pub .title a{color:var(--forest)}
.pub .title a:hover{color:var(--forest-mid)}

/* ---------- honeypot: reachable by bots, invisible and unfocusable to people ---------- */
.hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}

/* ---------- respect a reduced-motion preference ---------- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.01ms!important;animation-iteration-count:1!important;
    transition-duration:.01ms!important;scroll-behavior:auto!important;
  }
}

/* Tables should overflow and scroll on narrow screens rather than squeeze
   their columns into unreadable slivers. */
.table-scroll table{min-width:36rem}

/* The hero paragraph is a short strapline again; the full scientific statement
   lives at the opening of the About page. Kept a little tighter than the
   original so the call to action stays above the fold on a ~760px laptop. */
.hero-copy{padding-block:clamp(2.1rem,4vw,3rem)}
.hero-copy p{line-height:1.6;max-width:58ch}

/* ---------- numbered list (committee and statutory service) ---------- */
.numlist{list-style:none;counter-reset:n;padding:0;margin:0 0 1.2em}
.numlist li{position:relative;padding-left:1.9rem;margin-bottom:.6rem;max-width:66ch}
.numlist li::before{
  counter-increment:n;content:counter(n) ".";
  position:absolute;left:0;top:0;
  font-family:'Source Serif 4',Georgia,serif;font-weight:600;
  color:var(--moss);font-size:.95rem;
}

/* ---------- stacked media column inside a .split ---------- */
.stack{display:flex;flex-direction:column;gap:clamp(1rem,2vw,1.5rem);min-width:0}
.stack .portrait{max-width:100%}

/* Images stacked in a split column keep their own proportions rather than
   being forced into the 4:3 frame the split otherwise imposes. */
.stack img{aspect-ratio:auto}

/* Two photographs side by side inside a stacked media column — used for detail
   shots that read better as a pair than stacked one above the other. */
.pair{display:grid;grid-template-columns:1fr 1fr;gap:clamp(.6rem,1.2vw,.9rem)}
.pair figure{margin:0;min-width:0}
.pair img{display:block;width:100%;height:auto;aspect-ratio:auto}
.pair figcaption{font-size:.72rem;line-height:1.4;margin-top:.35rem;color:var(--ink-faint)}

/* A map inside a media column: a hairline keeps the pale map ground from bleeding
   into the page, and the caption matches the photographs around it. */
.mapfig img{display:block;width:100%;height:auto;border:1px solid rgba(0,0,0,.14)}

/* A four-up variant of .pair, used where photographs illustrate a list of
   services rather than a single argument. Captions carry a little more weight. */
.pair.quad{row-gap:clamp(1.2rem,2.4vw,2rem)}
.pair.quad figcaption{font-size:.82rem;line-height:1.5;margin-top:.5rem}
@media (max-width:620px){.pair.quad{grid-template-columns:1fr}}

/* Prose set beside a column of photographs: slightly smaller, so the two
   columns balance rather than the text towering over the images. */
.compact p{font-size:.94rem;line-height:1.62}
.compact .lede{font-size:1.04rem;line-height:1.58}
.compact h2{font-size:clamp(1.45rem,2.6vw,1.95rem)}

/* A photograph set inside a split's prose column keeps its own proportions
   rather than being forced into the 4:3 frame the split otherwise imposes. */
.split figure{margin:1.5rem 0 0}
.split figure img{aspect-ratio:auto}
.split figcaption{font-size:.78rem;line-height:1.45;margin-top:.45rem;color:var(--ink-faint)}

/* ---------- multi-column list (partner institutions) ---------- */
.collist{
  list-style:none;padding:0;margin:0 0 1.2em;
  columns:3 14rem;column-gap:clamp(1.5rem,3vw,2.5rem);
}
.collist li{
  break-inside:avoid;position:relative;padding-left:1.1rem;
  margin-bottom:.5rem;font-size:.94rem;color:var(--ink-soft);
}
.collist li::before{
  content:"";position:absolute;left:0;top:.62em;
  width:5px;height:5px;background:var(--moss);border-radius:50%;
}

/* ---------- agroforestry system gallery beside prose ---------- */
.agro-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:clamp(.9rem,1.8vw,1.4rem);align-content:start;min-width:0;
}
.agro-grid figure{margin:0;min-width:0}
.agro-grid img{aspect-ratio:3/2;object-fit:cover;width:100%}
.agro-grid figcaption{font-size:.78rem;line-height:1.45;margin-top:.45rem;max-width:none}

/* A wide frame spanning the whole gallery, closing the gap an odd tile count
   leaves and placing the individual systems in one landscape. */
.agro-grid .span{grid-column:1/-1}
.agro-grid .span img{aspect-ratio:auto}   /* full frame, never cropped */

/* A three-up gallery at full content width, for a section with more photographs
   than its prose column can carry beside it. */
.agro-grid.three{grid-template-columns:repeat(auto-fit,minmax(290px,1fr))}

/* Rows of photographs of mixed shape at full content width. Each image's width
   follows its proportions (--r, width over height), so a row shares one height
   and nothing is cropped. One caption serves the row. Stacks on a phone. */
.photo-rows{display:flex;flex-direction:column;gap:clamp(1.4rem,2.6vw,2rem)}
.photo-rows figure{margin:0}
.photo-row{display:flex;gap:clamp(.5rem,1vw,.75rem)}
.photo-row>div{flex:var(--r) 1 0;min-width:0}
.photo-row picture{display:block}
.photo-row img{display:block;width:100%;height:auto;aspect-ratio:auto}
.photo-rows figcaption{font-size:.78rem;line-height:1.45;margin-top:.45rem;max-width:none}
/* Narrow screens: a wide frame marked .row-break takes its own line, so the
   upright photographs beside it do not shrink too far. */
@media (max-width:1000px){
  .photo-row{flex-wrap:wrap}
  .photo-row>.row-break{flex:0 0 100%}
}
@media (max-width:620px){
  .photo-row{flex-direction:column;flex-wrap:nowrap}
  .photo-row>div,.photo-row>.row-break{flex:none;width:100%}
}

/* ---------- contents box: jump links to the sections of a long page ---------- */
.toc{
  margin:clamp(1.6rem,3vw,2.2rem) 0;padding:1.2rem 1.4rem .9rem;
  background:var(--paper-warm);border:1px solid var(--line);
}
.toc .eyebrow{margin-bottom:.7rem}
.toc .collist{margin-bottom:0}

/* A section reached by a jump link stops clear of the sticky header. */
section[id]{scroll-margin-top:4.5rem}

/* These two sections open with their photographs. On a phone that would put the
   heading more than a screen below where a contents link lands, so text comes first. */
@media (max-width:720px){
  #springs .stack,#seed-banks .stack{order:1}
}

/* ---------- grouped publication sub-headings ---------- */
.pub-group{
  margin:1.8rem 0 .5rem;padding-bottom:.4rem;
  border-bottom:1px solid var(--line);
  font-size:1.02rem;
}
.pub-group:first-of-type{margin-top:.6rem}
.pub-group span{color:var(--ink-faint);font-weight:400;font-size:.88rem}

/* ---------- "On this page" jump links under the hero of long pages ---------- */
.onpage{
  background:var(--paper-warm);border-bottom:1px solid var(--line);
  font-size:.85rem;
}
.onpage .wrap{
  display:flex;align-items:baseline;gap:.4rem 1rem;flex-wrap:wrap;
  padding-top:.65rem;padding-bottom:.65rem;
}
.onpage-label{
  font-size:.68rem;letter-spacing:.11em;text-transform:uppercase;color:var(--moss);
  font-weight:600;white-space:nowrap;
}
.onpage ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.25rem 1.1rem}
.onpage li{margin:0}
.onpage a{color:var(--forest-mid);text-decoration:none;border-bottom:1px solid transparent}
.onpage a:hover,.onpage a:focus-visible{border-bottom-color:currentColor}
@media (max-width:640px){
  .onpage .wrap{flex-direction:column;gap:.35rem}
  .onpage ul{gap:.3rem .9rem}
}

/* ---------- back to top: appears after the first screen or so ---------- */
.totop{
  position:fixed;right:clamp(.8rem,2.5vw,1.5rem);bottom:clamp(.8rem,2.5vw,1.5rem);z-index:40;
  display:inline-flex;align-items:center;gap:.3rem;
  padding:.55rem .8rem;border-radius:999px;
  background:var(--forest);color:#fff;font-size:.82rem;font-weight:600;line-height:1;
  text-decoration:none;box-shadow:0 2px 10px rgba(28,33,31,.25);
  opacity:0;transform:translateY(.6rem);pointer-events:none;
  transition:opacity .2s ease,transform .2s ease;
}
.totop.show{opacity:1;transform:none;pointer-events:auto}
.totop:hover,.totop:focus-visible{background:var(--forest-mid);color:#fff;text-decoration:none}
.totop:focus-visible{outline:3px solid var(--clay);outline-offset:2px}
@media (max-width:640px){.totop span{display:none}.totop{padding:.65rem .75rem}}
@media print{.totop,.onpage{display:none}}
