/* Folder sections for the home pages (retreat, everyday, homestead).
   16 Nov 2026 (Leo): rebuilt to match the home page exactly: the same rounded cards that pin under the menu and stack,
   the same folder tabs (no flared corners, never dimmed, a tab grows taller on hover), and the same liquid glass over
   the whole white border, tinted with the colour of the card at the top. The hero is a rounded card like the home hero.
   Markup is unchanged: <section class="rsec" id="..." data-tab="Short name" style="--tb:#F4F1EA">.
   sections.js builds the tabs and frame caps, pins the cards and tints the glass; this file is the look. */
:root{--gap:calc(48 * var(--u)); --card-r:calc(34 * var(--u)); --tbg:var(--gap)}
@media (max-width:700px){:root{--gap:calc(21 * var(--u)); --card-r:calc(24 * var(--u))}}
html{scroll-padding-top:calc(var(--hh) + var(--gap)); background:#FFFFFF}
body{padding-inline:var(--gap)}
.model,.fade,.rsfoot{margin-inline:calc(-1 * var(--gap))}

/* The glass: the side strips and the band are on for these pages (pages.css keeps them off elsewhere) */
#topbar::after{display:block}

/* The hero: a rounded card inside the white border, like the home hero */
html.hs .model{background:transparent}
html.hs .model .pin{background:var(--mbg); clip-path:inset(var(--gap) round var(--card-r))}

/* The cards */
section.rsec{--fg:#26211E; --fg-soft:#6E6661; --line:#D9D3C8; --lw:rgba(38,33,30,.26); --bg:#FFFFFF; color-scheme:light;
  --px:clamp(calc(20 * var(--u)),4vw,calc(56 * var(--u))); --py:clamp(calc(36 * var(--u)),6vh,calc(80 * var(--u)));
  position:sticky; top:calc(var(--hh) + var(--gap)); isolation:isolate; display:flex; flex-direction:column; justify-content:flex-start;
  margin:calc(var(--gap) + calc(34 * var(--u))) 0 0; padding:var(--py) var(--px);
  background:var(--tb,#F4F1EA); color:var(--fg); border-radius:var(--card-r); box-shadow:none}
section.rsec + section.rsec{margin-top:calc(var(--gap) + calc(34 * var(--u)))}
section.rsec > .fcap + *{margin-top:auto}
section.rsec > :last-child{margin-bottom:auto}
/* the outline: the side lines stop at the frame's top edge; above it the card's content blurs under the glass */
section.rsec::after{content:""; position:absolute; inset:0; z-index:5; pointer-events:none; border-radius:inherit;
  box-shadow:inset 0 0 0 1px var(--lw); clip-path:inset(var(--cut, 0px) 0 0 0)}
/* the frame cap: the card's rounded top edge holds its place under the menu while a tall card's content runs up under it */
.fcap{position:sticky; top:var(--capt, calc(var(--hh) + var(--gap))); z-index:6; flex:none; align-self:stretch; height:var(--card-r);
  margin:calc(-1 * var(--py)) calc(-1 * var(--px)) calc(var(--py) - var(--card-r)); pointer-events:none}
.fcap::before{content:""; position:absolute; inset:0 0 -1px; border-radius:var(--card-r) var(--card-r) 0 0;
  box-shadow:inset 0 1px 0 var(--lw), inset 1px 0 0 var(--lw), inset -1px 0 0 var(--lw)}

/* The folder tabs */
.stab,.srail a{--T:calc(34 * var(--u)); height:calc(var(--T) + 1px); box-sizing:border-box; display:flex; align-items:center; white-space:nowrap; text-decoration:none;
  font-family:var(--mono); font-size:calc(10 * var(--u)); letter-spacing:.07em; text-transform:uppercase; color:#26211E;
  background:var(--tb,#F4F1EA); border-radius:calc(12 * var(--u)) calc(12 * var(--u)) 0 0; padding:0 calc(26 * var(--u)) 0 calc(16 * var(--u));
  box-shadow:inset 0 1px 0 rgba(38,33,30,.26), inset 1px 0 0 rgba(38,33,30,.26), inset -1px 0 0 rgba(38,33,30,.26)}
/* the section's own tab rides on its top edge, its foot over the card's top line */
.stab{position:absolute; bottom:calc(100% - 1px); left:calc(var(--card-r) + calc(6 * var(--u))); transition:height .25s}
.stab:hover{height:calc(var(--T) + calc(6 * var(--u)))}
section.rsec.docked > .stab{visibility:hidden}
/* the row along the top, above the glass */
.srail{position:fixed; top:var(--hh); left:var(--gap); right:var(--gap); height:var(--gap); z-index:41; display:flex; align-items:flex-end;
  padding-left:var(--card-r); pointer-events:none}
.srail a{position:relative; flex:none; margin:0 calc(-14 * var(--u)) -1px 0; opacity:0; translate:0 calc(10 * var(--u)); pointer-events:none;
  box-shadow:inset 0 1px 0 rgba(38,33,30,.26), inset 1px 0 0 rgba(38,33,30,.26), inset -1px 0 0 rgba(38,33,30,.26), inset 0 -1px 0 rgba(38,33,30,.26);
  transition:opacity .3s, translate .3s, height .25s}
.srail a.in{opacity:1; translate:0 0; pointer-events:auto}
.srail.away a{opacity:0; translate:0 calc(10 * var(--u)); pointer-events:none}
.srail a.in:hover{height:calc(var(--T) + calc(6 * var(--u)))}
.srail a.front{z-index:5; box-shadow:inset 0 1px 0 rgba(38,33,30,.26), inset 1px 0 0 rgba(38,33,30,.26), inset -1px 0 0 rgba(38,33,30,.26)}
/* tabs behind the front card stop on its frame line, which cuts them off */
.srail a:not(.front){margin-bottom:0; height:var(--T); box-shadow:inset 0 1px 0 rgba(38,33,30,.26), inset 1px 0 0 rgba(38,33,30,.26), inset -1px 0 0 rgba(38,33,30,.26)}
.srail a.in:not(.front):hover{height:calc(var(--T) + calc(5 * var(--u)))}
.mk{display:block; height:0}

/* The footer slides up over the last card and covers the gap above it */
.rsfoot{position:relative; z-index:36; margin-top:var(--gap); box-shadow:0 calc(-1 * var(--gap)) 0 0 #FFFFFF}

/* Phones: cards scroll freely, no row of tabs, each tab rides on its card */
@media (max-width:700px){
  section.rsec{position:relative; top:auto}
  section.rsec::after{clip-path:none}
  .fcap{position:relative; top:auto} .fcap::before{display:none}
  .srail{display:none}
  section.rsec.docked > .stab{visibility:visible}
  .stab{left:var(--card-r)}
}
@media (prefers-reduced-motion: reduce){.stab,.srail a{transition:none}}
