
:root{
  /* surfaces */
  color-scheme: dark;
  --glass:      #1A1230;   /* night background */
  --paper:      #221838;
  --sheet:      rgba(30,21,54,.76);
  --sheet-edge: rgba(214,207,227,.12);
  --well:       #06030C;   /* the darkest panel */
  --well-sheet: rgba(6,3,12,.86);

  /* ink */
  --ink:        #EDE8F6;
  --ink-2:      #A99DC2;
  --ink-soft:   #CFC6E0;   /* body copy */
  --ink-well:   #D6CFE3;
  --ink-well-2: #9B8FB4;

  /*palette extracted*/
  --deep-twilight: #1C0A66ff;
  --raspberry-plum: #BB4492ff;
  --indigo-ink: #3E166Dff;
  --lavender: #E4E6F6ff;
  --vivid-royal: #31169Bff;

  /* accents */
  --eosin:      #E070B8;   /* H&E counterstain, lifted for night */
  --teal:       #1E8A85;   /* viridis mid */
  --live:       #B59BF2;
  --live-2:     #B59BF2;
  --rule:       rgba(237,232,246,.14);
  --rule-well:  rgba(214,207,227,.18);

  /* type */
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body:    "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* rhythm */
  --gut: clamp(1.25rem, 4vw, 2.5rem);
  --sec: clamp(2.5rem, 6vw, 5rem);
  --pad: clamp(1.5rem, 4vw, 3.25rem);
  --r:   16px;
}

*, *::before, *::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior: auto; } }

body{
  margin: 0;
  background: var(--glass);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  min-height: 100vh;
  display: flex; flex-direction: column;   /* footer always sits on the bottom edge */
  -webkit-font-smoothing: antialiased;
}
main{ flex: 1; padding-bottom: clamp(5rem, 12vw, 7rem); }   /* room for the control bar */

img, canvas, svg{ display: block; max-width: 100%; }
a{ color: var(--eosin); text-underline-offset: .18em; }
.img-people{
  border-radius:15px;
}
:focus-visible{
  outline: 2px solid var(--eosin);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip{
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--glass); padding: .7rem 1rem; z-index: 99;
  font-family: var(--mono); font-size: .8rem;
}
.skip:focus{ left: .5rem; top: .5rem; }

.wrap{ max-width: 1180px; margin-inline: auto; }


.scope{ position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.scope__canvas{
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity .9s ease;
}
.scope__canvas.is-on{ opacity: 1; }
.scope__scrim{
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(49,22,155,.08), transparent 60%),
    linear-gradient(rgba(14,8,30,.36), rgba(10,6,20,.08));
}

/* glass panes */

.sheet{
  position: relative;
  background: var(--sheet);
  border: 1px solid var(--sheet-edge);
  border-radius: var(--r);
  padding: var(--pad);
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 18px 44px -30px rgba(0,0,0,.9);
  backdrop-filter: blur(9px) saturate(1.05);
  -webkit-backdrop-filter: blur(9px) saturate(1.05);
}
.sheet--well{
  background: var(--well-sheet);
  border-color: rgba(214,207,227,.14);
  color: var(--ink-well);
}
.sheet--well .h2{ color: #F4EFFA; }
.sheet--well .eyebrow{ color: var(--live-2); }

/* shared type*/

.eyebrow{
  font-family: var(--mono);
  font-size: .705rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--live-2);
  margin: 0 0 1.1rem;
  transition: color .25s linear;
  font-weight:bolder;
}

.h2{
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -.028em;
  margin: 0 0 1.1rem;
  max-width: 20ch;
}

.prose{
  margin: 0 auto 2rem;
  max-width: 100ch;
  color: var(--ink-soft);
}
.sheet--well .prose{ color: var(--ink-well); }

/* top bar */

.topbar{
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  flex-wrap: wrap;   /* on narrow screens the links drop to a second row */
  padding: .75rem var(--gut);
  background: rgba(26,18,48,.7);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--rule);
}

.brand{
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--ink);
}
.brand img{ flex: none; }
.brand__mark{ width: 26px; height: 26px; flex: none; }
.mark-frame{ fill: none; stroke: var(--ink); stroke-width: 1.4; opacity: .85; }
.mark-spine{ fill: none; stroke: var(--live); stroke-width: 1.5; stroke-linecap: round; transition: stroke .25s linear; }
.mark-dot{ fill: var(--live-2); transition: fill .25s linear; }

.brand__name{
  font-family: var(--display);
  font-weight: 800; font-size: 1.02rem; letter-spacing: -.02em;
  white-space: nowrap;   /* keep "Glastonbury Group" on one line */
}
.brand__org{
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-2);
  padding-left: .6rem; border-left: 1px solid var(--rule);
}
@media (max-width: 640px){ .brand__org{ display: none; } }

.topnav{
  display: flex; gap: clamp(.8rem, 3vw, 1.8rem);
  max-width: 100%;
  overflow-x: auto;          /* on very small phones: swipe sideways instead of cutting off */
  scrollbar-width: none;
}
.topnav::-webkit-scrollbar{ display: none; }
.topnav a{
  font-family: var(--mono); font-size: .79rem;
  color: var(--ink-2); text-decoration: none; padding: .25rem 0;
  border-bottom: 1px solid transparent;
  flex: none; white-space: nowrap;
}
.topnav a:hover{ color: var(--ink); border-bottom-color: var(--live); }
.topnav a.is-here{ color: var(--ink); border-bottom-color: var(--live); }
@media (max-width: 480px){ .topnav a{ font-size: .72rem; } }

/* hero */

.hero{
  max-width: 1180px;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 3rem) var(--gut) var(--sec);
}

/* the hero pane spans the full column, like the panes below it */
.hero__text{
  container-type: inline-size;
  padding: clamp(1.75rem, 5vw, 4.25rem);
}

.hero__title{
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 12vw, 7.2rem);
  font-size: clamp(3rem, 11.2cqi, 7.6rem);   /* sized to the pane, so the name fills it */
  line-height: .9;
  letter-spacing: -.045em;
  margin: 0 0 clamp(1.6rem, 3.5vw, 2.6rem);
}
.hero__title span{
  color: transparent;
  -webkit-text-stroke: 2.4px var(--ink);
}

.hero__body{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.6rem clamp(2rem, 6vw, 5rem);
  align-items: end;
  margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
}

.lede{
  margin: 0;
  max-width: 60ch;
  font-size: clamp(1.05rem, 1.75vw, 1.3rem);
  line-height: 1.58;
  color: var(--ink-soft);
}

.hero__actions{ display: flex; flex-direction: column; gap: .6rem; }

@media (max-width: 760px){
  .hero__body{ grid-template-columns: 1fr; }
  .hero__actions{ flex-direction: row; flex-wrap: wrap; }
}

.btn{
  font-family: var(--mono); font-size: .82rem; text-align: center;
  padding: .66rem 1.2rem; border-radius: 999px;
  text-decoration: none; transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn--solid{ background: var(--ink); color: #120B1E; }
.btn--solid:hover{ background: var(--live); transform: translateY(-1px); }
.btn--ghost{ color: var(--ink); border: 1px solid var(--rule); background: rgba(255,255,255,.05); }
.btn--ghost:hover{ border-color: var(--ink); transform: translateY(-1px); }

.modalities{
  list-style: none; margin: 0; padding: 1.3rem 0 0;
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: .4rem 1.8rem;
  font-family: var(--mono); font-size: .8rem; color: var(--ink-2);
}
.modalities li::before{ content: "› "; color: var(--live-2); }

.hero__note{
  max-width: 46ch;
  margin: 1.4rem 0 0;
  font-family: var(--mono);
  font-size: .74rem; line-height: 1.7;
  color: var(--ink-2);
}

/* bands */

.band{ padding: 0 var(--gut) var(--sec); }

/* variant → gene → phenotype */

.chain{
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.chain__step{ padding-top: 1rem; border-top: 2px solid var(--ink); }
.chain__step p{ margin: .4rem 0 0; font-size: .95rem; color: var(--ink-2); }
.chain__label{
  font-family: var(--mono); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink) !important;
}

/* cards */

.cards{
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card{
  position: relative;
  display: flex; flex-direction: column;
  padding: 1.3rem;
  border: 1px solid var(--rule-well);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.card:hover{ transform: translateY(-2px); border-color: rgba(127,211,122,.55); background: rgba(255,255,255,.07); }
.card p{ margin: 0; font-size: .94rem; color: var(--ink-well-2); }
.card__tag,
.topic__tag{
  font-family: var(--mono); font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--eosin) !important;
  margin: 0 0 .55rem;
}
.card__title{
  font-family: var(--display); font-weight: 500; font-size: 1.08rem;
  line-height: 1.2; letter-spacing: -.015em;
  margin: 0 0 .55rem; color: #F4EFFA;
}

/* the title is the real button; its ::after stretches over the whole card */
.card__open{
  font: inherit; color: inherit; letter-spacing: inherit; text-align: left;
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
}
.card__open::after{
  content: ""; position: absolute; inset: 0; border-radius: 12px;
}
.card__open:focus-visible{ outline: none; }
.card__open:focus-visible::after{ outline: 2px solid #BB4492ff; outline-offset: 3px; }

.card__more{
  margin-top: auto; padding-top: 1.1rem;
  font-family: var(--mono); font-size: .72rem; color: var(--eosin);
}
.card:hover .card__more{ text-decoration: underline; text-underline-offset: .22em; }

/* topic pop-up */

.topic{
  width: min(620px, calc(100% - 2rem));
  max-height: min(84vh, 760px);
  margin: auto; padding: 0;
  overflow: auto; overscroll-behavior: contain;
  color: var(--ink-well);
  background: #170F25;
  border: 1px solid rgba(214,207,227,.16);
  border-radius: var(--r);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.85);
}
.topic::backdrop{
  background: rgba(18,11,30,.55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.topic__in{ position: relative; padding: clamp(1.6rem, 4.5vw, 2.8rem); }

.topic__close-form{ position: absolute; top: .9rem; right: .9rem; margin: 0; }
.topic__close{
  width: 34px; height: 34px; display: grid; place-items: center;
  font: inherit; font-size: 1.35rem; line-height: 1; cursor: pointer;
  color: var(--ink-well); background: rgba(255,255,255,.06);
  border: 1px solid var(--rule-well); border-radius: 9px;
}
.topic__close:hover{ background: rgba(255,255,255,.12); color: #fff; }
.topic__close:focus-visible{ outline-color: #BB4492ff; }

.topic__title{
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.45rem, 3.4vw, 2.1rem);
  line-height: 1.06; letter-spacing: -.026em;
  margin: 0 0 1.3rem; padding-right: 2.6rem;
  color: #F4EFFA;
}
.topic__body p{ margin: 0 0 1rem; max-width: 64ch; }
.topic__body p:last-child{ margin-bottom: 0; }

.topic[open]{ animation: topic-in .24s cubic-bezier(.2,.7,.3,1); }
.topic[open]::backdrop{ animation: topic-fade .24s ease; }
@keyframes topic-in{ from{ opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes topic-fade{ from{ opacity: 0; } }
@media (prefers-reduced-motion: reduce){
  .topic[open], .topic[open]::backdrop{ animation: none; }
}

body:has(.topic[open]){ overflow: hidden; }

/* people */

.lead{
  display: flex; gap: 1.3rem; align-items: flex-start;
  padding-bottom: 2.2rem; margin-bottom: 2.2rem;
  border-bottom: 1px solid var(--rule);
}
.lead__text{ min-width: 0; }
.lead .person__bio{ margin: .7rem 0 .9rem; max-width: 68ch; color: var(--ink-2); font-size: .97rem; }
.person__links{ margin: 0; }
.person__links .mail{ font-size: .8rem; }

.person__mono{
  display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 9px;
  background: var(--tint, #E6E3EC);
  font-family: var(--mono); font-size: .95rem; letter-spacing: .02em;
  color: rgba(255,255,255,.85);
  margin-bottom: .7rem; flex: none;
}
.person__mono--lg{ width: 86px; height: 86px; font-size: 1.6rem; border-radius: 12px; margin-bottom: 0; }

.person__name{
  font-family: var(--display); font-weight: 500; font-size: 1rem;
  letter-spacing: -.01em; margin: 0 0 .12rem;
}
.person__name--lg{ font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 0 0 .2rem; }
.person__role{
  font-family: var(--mono); font-size: .72rem; color: var(--ink-2); margin: 0;
}

.people{
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.6rem 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.person{ min-width: 0; }

@media (max-width: 560px){
  .lead{ flex-direction: column; gap: .9rem; }
}

/* alumni */
.alumni{
  margin-top: 2.6rem; padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.alumni__title{
  font-family: var(--display); font-weight: 800; font-size: 1.3rem;
  letter-spacing: -.02em; margin: 0 0 .6rem;
}
.alumni__list{ list-style: none; margin: 0; padding: 0; }
.alum{
  display: grid; align-items: baseline;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: .15rem 1.5rem;
  padding: .8rem 0; border-bottom: 1px solid var(--rule);
}
.alum:last-child{ border-bottom: 0; }
.alum__name{ font-family: var(--display); font-weight: 500; }
.alum__was{ font-family: var(--mono); font-size: .74rem; color: var(--ink-2); }
.alum__now{ font-size: .95rem; color: var(--ink-soft); }
@media (max-width: 640px){
  .alum{ grid-template-columns: 1fr; }
}

/* retreats gallery — small thumbnails, enlarged in the viewer */

.gallery{
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem .8rem;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}
.shot{ min-width: 0; }
.shot[hidden]{ display: none; }
.shot__open{
  display: block; width: 100%; padding: 0; margin: 0;
  border: 1px solid var(--rule); border-radius: 10px;
  background: rgba(255,255,255,.04);
  overflow: hidden; cursor: zoom-in;
  transition: transform .18s ease, border-color .18s ease;
}
.shot__open img{
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform .35s ease;
}
.shot__open:hover{ transform: translateY(-2px); border-color: var(--eosin); }
.shot__open:hover img{ transform: scale(1.04); }
.shot__cap{
  margin: .45rem 0 0;
  font-family: var(--mono); font-size: .7rem; line-height: 1.4;
  color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gallery__more{
  margin-top: 1.2rem;
  font: inherit; font-family: var(--mono); font-size: .78rem; cursor: pointer;
  color: var(--ink); background: rgba(255,255,255,.05);
  border: 1px solid var(--rule); border-radius: 999px;
  padding: .5rem 1rem;
}
.gallery__more:hover{ border-color: var(--ink); }

/* photo viewer */

.viewer{
  width: min(960px, calc(100% - 2rem));
  max-height: 92vh;
  margin: auto; padding: 0;
  overflow: hidden;
  color: var(--ink-well);
  background: #170F25;
  border: 1px solid rgba(214,207,227,.16);
  border-radius: var(--r);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.85);
}
.viewer::backdrop{
  background: rgba(10,6,20,.78);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.viewer__close-form{ position: absolute; top: .7rem; right: .7rem; margin: 0; z-index: 2; }
.viewer__fig{ margin: 0; }
.viewer__stage{ position: relative; }
.viewer__img{
  width: 100%; max-height: 72vh; object-fit: contain;
  background: #0B0714;
}
.viewer__text{ padding: 1rem clamp(1rem, 3vw, 1.6rem) 1.2rem; }
.viewer__count{
  font-family: var(--mono); font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--eosin);
}
.viewer__cap{
  margin: .25rem 0 0;
  font-family: var(--display); font-weight: 500; font-size: 1.1rem;
  letter-spacing: -.01em; color: #F4EFFA;
}
.viewer__desc{ margin: .35rem 0 0; font-size: .95rem; color: var(--ink-well-2); max-width: 70ch; }
.viewer__desc:empty{ display: none; }

.viewer__nav{
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; display: grid; place-items: center;
  font: inherit; font-size: 1.7rem; line-height: 1; cursor: pointer;
  color: #fff; background: rgba(18,11,30,.6);
  border: 1px solid var(--rule-well); border-radius: 50%;
}
.viewer__nav:hover{ background: rgba(18,11,30,.85); }
.viewer__nav--prev{ left: .7rem; }
.viewer__nav--next{ right: .7rem; }
.viewer__nav[hidden]{ display: none; }

.viewer[open]{ animation: topic-in .24s cubic-bezier(.2,.7,.3,1); }
.viewer[open]::backdrop{ animation: topic-fade .24s ease; }
@media (prefers-reduced-motion: reduce){
  .viewer[open], .viewer[open]::backdrop{ animation: none; }
  .shot__open, .shot__open img{ transition: none; }
}
body:has(.viewer[open]){ overflow: hidden; }

@media (max-width: 480px){
  .gallery{ grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem .5rem; }
}

/* contact  */

.contact{ margin: 0; }
.mail{
  font-family: var(--mono); font-size: .86rem;
  text-decoration: none; color: var(--eosin);
  border-bottom: 1px solid rgba(224,112,184,.45);
  padding: .1rem .15rem;
}
.mail:hover{ background: rgba(224,112,184,.12); }

/* open positions */

.positions{
  margin-top: 2.6rem; padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.positions__title{
  font-family: var(--display); font-weight: 800; font-size: 1.3rem;
  letter-spacing: -.02em; margin: 0 0 1rem;
}
.positions__grid{
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.position{
  display: flex; flex-direction: column;
  padding: 1.4rem;
  background: rgb(0, 0, 0, 0.4);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.position__tag{
  font-family: var(--mono); font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--eosin);
  margin: 0 0 .55rem;
}
.position__name{
  font-family: var(--display); font-weight: 500; font-size: 1.12rem;
  line-height: 1.25; letter-spacing: -.015em; margin: 0 0 .6rem;
}
.position__desc{ margin: 0 0 1rem; font-size: .95rem; color: var(--ink-soft); }
.position__meta{
  display: flex; flex-wrap: wrap; gap: .3rem 1.6rem;
  margin: 0 0 1.1rem;
  font-family: var(--mono); font-size: .74rem; color: var(--ink-2);
}
.position__meta div{ display: flex; gap: .4rem; }
.position__meta dt{ text-transform: uppercase; letter-spacing: .1em; }
.position__meta dd{ margin: 0; color: var(--ink); }
.position__link{
  margin-top: auto; align-self: flex-start;
  font-family: var(--mono); font-size: .78rem; text-decoration: none;
  border-bottom: 1px solid rgba(224,112,184,.45);
}
.position__link:hover{ background: rgba(224,112,184,.12); }

/* foot — a solid bar that closes the page, flush with the bottom edge */

.foot{
  background: var(--well);
  color: var(--ink-well);
  padding: clamp(1.8rem, 4vw, 2.6rem) var(--gut);
  border-top: 1px solid rgba(214,207,227,.14);
}
.foot__in{
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
  gap: 1rem 2rem;
  font-family: var(--mono); font-size: .84rem; line-height: 1.7;
}
.foot__in p{ margin: 0; }
.foot__where strong{
  font-family: var(--display); font-weight: 800; font-size: 1.05rem;
  letter-spacing: -.01em; color: #F4EFFA;
}
.foot__cred{ color: var(--ink-well-2); font-size: .78rem; }

/* the control bar steps aside while the footer is on screen */
.lens{ transition: opacity .3s ease, transform .3s ease, visibility .3s; }
.lens.is-away{
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateX(-50%) translateY(12px);
}

/*reveals */

.reveal{ opacity: 0; transform: translateY(14px); }
.reveal.in{ opacity: 1; transform: none; transition: opacity .7s ease, transform .7s ease; }
@media (prefers-reduced-motion: reduce){
  .reveal, .reveal.in{ opacity: 1; transform: none; transition: none; }
}

/* control bar*/

.lens{
  position: fixed; z-index: 30;
  left: 50%; transform: translateX(-50%);
  bottom: clamp(.7rem, 2vw, 1.2rem);
  width: min(760px, calc(100% - 1.5rem));
  display: grid; justify-items: center; gap: .4rem;
  font-family: var(--mono);
}

.lens__handle{
  font: inherit; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-2); cursor: pointer;
  background: rgba(20,13,34,.88);
  border: 1px solid var(--sheet-edge); border-radius: 999px;
  padding: .3rem .8rem;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.lens__handle:hover{ color: var(--ink); }
.lens__handle-off{ display: none; }
.lens.is-shut .lens__handle-on{ display: none; }
.lens.is-shut .lens__handle-off{ display: inline; }
.lens.is-shut .lens__panel{ display: none; }

.lens__panel{
  width: 100%;
  background: rgba(20,13,34,.9);
  border: 1px solid var(--sheet-edge);
  border-radius: 14px;
  padding: .8rem clamp(.8rem, 2.5vw, 1.1rem) .9rem;
  box-shadow: 0 22px 50px -32px rgba(0,0,0,.95);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  display: grid; gap: .7rem;
}

.lens__row{
  display: flex; align-items: center; gap: .9rem;
}

.lens__tools{ display: flex; gap: .3rem; margin-left: auto; flex: none; }
.lens__tools button{
  font: inherit; font-size: .82rem; line-height: 1; cursor: pointer;
  width: 28px; height: 28px; display: grid; place-items: center;
  border: 1px solid var(--rule); border-radius: 8px;
  background: rgba(255,255,255,.06); color: var(--ink-2);
}
.lens__tools button:hover{ color: var(--ink); border-color: var(--ink); }

/* colour bar  */
.bar{
  flex: 1; min-width: 0;
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  column-gap: .65rem; row-gap: .15rem; align-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
}
.bar.is-on{ opacity: 1; visibility: visible; }
.bar__label{
  grid-row: 1 / span 2;
  font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
}
.bar__ramp{
  grid-column: 2;
  height: 9px; border-radius: 3px; border: 1px solid var(--rule);
  background: linear-gradient(90deg, #440154, #414487, #2A788E, #22A884, #7AD151, #FDE725);
}
.bar__ticks{
  grid-column: 2;
  display: flex; justify-content: space-between;
  font-size: .6rem; color: var(--ink-2); font-style: normal;
}
.bar__ticks i{ font-style: normal; }

/* the blend slider */
.lens__slide{ display: flex; align-items: center; gap: .7rem; }
.lens__end{
  font-size: .66rem; color: var(--ink-2); white-space: nowrap; flex: none;
  max-width: 30vw; overflow: hidden; text-overflow: ellipsis;
}
.lens__end--r{ text-align: right; }

#mix{
  flex: 1; min-width: 60px; height: 20px;
  appearance: none; background: transparent; cursor: pointer;
}
#mix::-webkit-slider-runnable-track{
  height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, #C08BC0, #7A428E 38%, #31688E 68%, #FDE725);
  border: 1px solid rgba(23,17,34,.18);
}
#mix::-moz-range-track{
  height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, #C08BC0, #7A428E 38%, #31688E 68%, #FDE725);
  border: 1px solid rgba(23,17,34,.18);
}
#mix::-webkit-slider-thumb{
  appearance: none; width: 17px; height: 17px; margin-top: -6px;
  border-radius: 50%; background: #EDE8F6;
  border: 2px solid #120B1E;
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
}
#mix::-moz-range-thumb{
  width: 15px; height: 15px; border-radius: 50%;
  background: #EDE8F6; border: 2px solid #120B1E;
}

@media (max-width: 560px){
  .lens__end{ font-size: .6rem; max-width: 26vw; }
}
