/* ============================================================
   ENCORE - wiki stylesheet
   iGEM Team KIT 2026

   WHAT THIS FILE IS
   This is the ONLY place where colours, fonts and components are
   defined. layout.html loads it on every page, so a change here
   changes the whole wiki!!

   Pages in wiki/pages/ must NOT contain a <style> block. They only
   use the .enc-* classes defined here.

   HOW TO CHANGE THE COLOURS
   Edit the variables in :root below. Nothing else. Every component
   reads its colour from those variables.

   NAMING
   Every class starts with "enc-" so it can never collide with
   Bootstrap, which is still loaded for the old template pages.
   ============================================================ */

:root{
  /* ---------------------------------------------------------------
     ENCORE PALETTE
     The values below come from the team's illustration guidelines
     (the colour hexagon). Two darker teals were ADDED on purpose:
     the illustration palette is built for drawings, not for text.
     Measured against the page background #FCFCFB:
        Blue Spruce #1C8070 ....  4.68  (ok for links, not for body)
        Ocean Mist  #2BBFA6 ....  2.25  (decorative only)
        Amber Glow  #FF9900 ....  2.09  (decorative only)
        Gold        #FFD500 ....  1.39  (decorative only)
     WCAG asks for 4.5 on normal text and 7.0 for the AAA level, so
     headings and body text use --teal-900 and --ink instead.

     --teal-900 is #1F342E. That value is not from the hexagon - it is
     the dark green the team already uses for the labels inside the
     illustrations. Reusing it means the text in a drawing and the text
     next to it are literally the same colour. It scores 12.9 : 1.
     --------------------------------------------------------------- */

  /* Text - these carry the contrast */
  --teal-900:#1F342E;   /* headings         12.9 : 1  AAA */
  --ink:#17211F;        /* body text        16.1 : 1  AAA */
  --muted:#4A5754;      /* secondary text    7.4 : 1  AAA */
  --text:#2A3634;       /* paragraphs and lists in the main column */
  --note-text:#5A4308;  /* text in the gold note boxes */

  /* Illustration palette - these carry the identity */
  --teal-700:#1C8070;   /* Blue Spruce - shell outline, links   */
  --teal-500:#2BBFA6;   /* Ocean Mist  - cargo                  */
  --teal-100:#BEEAE2;   /* inside of the encapsulin             */
  --teal-050:#F0F5F3;   /* lightest surface                     */
  --gold:#FF9900;       /* Amber Glow  - accents, linker        */
  --gold-050:#FFF3E0;
  --lime:#97B331;       /* Lime Moss   - targeting peptide      */
  --lime-050:#F2F7E4;
  --purple:#A367BB;     /* Lavender    - second linker          */
  --purple-050:#F6EDFA;
  --blue:#2494C7;       /* Blue Bell   - promoters              */
  --blue-050:#E8F4FB;
  --yellow:#FFD500;     /* Gold        - targeting peptide      */

  /* Names used by the SVG illustrations, so a colour change here
     updates the drawings and the interface at the same time. */
  --shell-line:var(--teal-700);
  --shell-fill:var(--teal-100);
  --cargo:var(--teal-500);
  --linker:var(--purple);
  --linker-alt:var(--gold);
  --tp:var(--yellow);
  --tp-alt:var(--lime);
  --rna:#7C8785;

  --page:#FCFCFB;
  --surface:#fff;       /* cards, boxes, tables - dark in dark mode */
  --line:#DDE9E5;

  --font-display:"Segoe UI",Helvetica,Arial,sans-serif;
  --font-body:"Segoe UI",Helvetica,Arial,sans-serif;
  --font-mono:"Segoe UI",Helvetica,Arial,sans-serif;

  --wrap:1600px;
  --radius:14px;
  --shadow:0 1px 2px rgba(15,79,70,.06),0 12px 32px -18px rgba(15,79,70,.35);
}

/* ---------- Dyslexia-friendly font (OpenDyslexic) ----------
   Switched on and off in the reading options (the eye next to the
   search); the browser remembers the choice. The files live on
   static.igem.wiki and are only downloaded once someone switches the
   font on. */
@font-face{font-family:"OpenDyslexic";src:url("https://static.igem.wiki/teams/6296/wiki/fonts/opendyslexic/opendyslexic-regular.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"OpenDyslexic";src:url("https://static.igem.wiki/teams/6296/wiki/fonts/opendyslexic/opendyslexic-bold.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"OpenDyslexic";src:url("https://static.igem.wiki/teams/6296/wiki/fonts/opendyslexic/opendyslexic-italic.woff2") format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"OpenDyslexic";src:url("https://static.igem.wiki/teams/6296/wiki/fonts/opendyslexic/opendyslexic-bolditalic.woff2") format("woff2");font-weight:700;font-style:italic;font-display:swap}
:root.enc-dyslexic{
  --font-display:"OpenDyslexic","Segoe UI",Helvetica,Arial,sans-serif;
  --font-body:"OpenDyslexic","Segoe UI",Helvetica,Arial,sans-serif;
  --font-mono:"OpenDyslexic","Segoe UI",Helvetica,Arial,sans-serif;
}
/* Labels inside the drawn figures (inline SVG) are fitted to their boxes,
   so they keep the normal font. */
.enc-dyslexic svg{
  --font-display:"Segoe UI",Helvetica,Arial,sans-serif;
  --font-body:"Segoe UI",Helvetica,Arial,sans-serif;
  --font-mono:"Segoe UI",Helvetica,Arial,sans-serif;
}
/* While the font is on, justified text is set left-aligned instead
   (the class is added by wiki.js part 5 to every justified block). */
.enc-dyslexic .enc-nojustify{text-align:left !important}
/* OpenDyslexic is much wider: keep the menu items on one line in the
   desktop menu bar (below 1080px the hamburger menu takes over anyway). */
@media (min-width:1081px){
  .enc-dyslexic .enc-nav__links a,.enc-dyslexic .enc-subtrigger{white-space:nowrap;font-size:.85rem}
  .enc-dyslexic .enc-nav__inner{gap:16px}
  .enc-dyslexic .enc-nav__links{gap:12px}
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:96px}
/* Page scrollbar (right edge of every page): narrow, no arrow buttons,
   shorter (starts below the sticky menu bar, ends just above the bottom).
   Chrome, Edge and Safari use the ::-webkit-scrollbar rules; Firefox,
   which does not know them, gets the standard thin scrollbar instead. */
html::-webkit-scrollbar{width:8px;height:8px}
html::-webkit-scrollbar-button{display:none;width:0;height:0}
html::-webkit-scrollbar-track{background:transparent;margin:67px 0 8px} /* runs from below the menu bar */
html::-webkit-scrollbar-thumb{background:#C2D0CC;border-radius:8px}
html::-webkit-scrollbar-thumb:hover{background:#9AABA6}
@supports not selector(::-webkit-scrollbar){html{scrollbar-width:thin;scrollbar-color:#C2D0CC transparent}}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}
  *{animation-duration:.001ms !important;transition-duration:.001ms !important}}

body{
  margin:0;background:var(--page);color:var(--ink);
  font-family:var(--font-body);font-size:17px;line-height:1.7;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--teal-700)}
:focus-visible{outline:3px solid var(--gold);outline-offset:3px;border-radius:4px}

/* ---------- Top navigation ---------- */
.enc-nav{
  position:sticky;top:0;z-index:60;background:rgba(252,252,251,.92);
  backdrop-filter:blur(10px);border-bottom:1px solid var(--line);
}
.enc-nav__inner{
  max-width:var(--wrap);margin:0 auto;padding:14px 24px;
  display:flex;align-items:center;gap:28px;
}
.enc-brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--teal-900);flex:none}
.enc-brand__mark{height:30px;width:auto;display:block}
.enc-brand__word{font-family:var(--font-display);font-weight:800;font-size:1.28rem;letter-spacing:.06em}
.enc-nav__links{display:flex;align-items:center;gap:24px;margin-left:auto;list-style:none;padding:0;margin-block:0}
.enc-nav__links a{
  text-decoration:none;color:var(--muted);font-size:.95rem;font-weight:500;
  padding-bottom:3px;border-bottom:2px solid transparent;
}
.enc-nav__links a:hover{color:var(--teal-700)}
.enc-nav__links a[aria-current="page"]{color:var(--teal-900);font-weight:600;border-bottom-color:var(--gold)}
.enc-nav__cta{
  flex:none;background:var(--teal-700);color:#fff;text-decoration:none;
  font-family:var(--font-display);font-weight:700;font-size:.95rem;
  padding:11px 22px;border-radius:10px;
}
.enc-nav__cta:hover{background:var(--teal-900)}

/* ---------- Nav dropdown ("Wet Lab", "Dry Lab") ---------- */
.enc-nav__links li{position:relative}
/* Plain links and dropdown buttons get the same box (text + underline
   gap), so all menu labels sit on one line. Desktop bar only - the
   phone menu stacks its items and must not become a row. */
@media (min-width:1081px){.enc-nav__links > li{display:flex;align-items:center}}
.enc-subtrigger{
  font-family:var(--font-body);font-size:.95rem;font-weight:500;line-height:inherit;
  color:var(--muted);background:none;border:0;cursor:pointer;
  padding:0 0 3px;border-bottom:2px solid transparent;
  display:inline-flex;align-items:center;gap:6px;
}
.enc-has-sub:hover .enc-subtrigger,
.enc-has-sub:focus-within .enc-subtrigger{color:var(--teal-700)}
.enc-subnav{
  position:absolute;top:100%;left:0;min-width:196px;
  margin:0;padding:8px;list-style:none;
  background:var(--surface);border:1px solid var(--line);border-radius:12px;
  box-shadow:var(--shadow);display:none;z-index:70;
}
.enc-has-sub:hover .enc-subnav,
.enc-has-sub:focus-within .enc-subnav{display:block}
/* The last menu item sits at the right edge, so its submenu opens to the
   left instead of running off the screen. */
.enc-nav__links > .enc-has-sub:last-child .enc-subnav{left:auto;right:0}
.enc-subnav li{display:block}
.enc-subnav a{
  display:block;padding:9px 12px;border-radius:8px;border-bottom:0;
  color:var(--muted);font-size:.93rem;
}
.enc-subnav a:hover{background:var(--teal-050);color:var(--teal-900)}
.enc-subnav a[aria-current="page"]{color:var(--teal-900);font-weight:600;background:var(--teal-050)}
/* The menu item whose submenu contains the current page is underlined
   like a current top-level link (e.g. "Team" while on Meet us). */
.enc-has-sub:has(.enc-subnav a[aria-current="page"]) > .enc-subtrigger{color:var(--teal-900);font-weight:600;border-bottom-color:var(--gold)}
/* Submenu entries that belong to the entry above them (VCPO Reactor,
   Oxygen-Free Space and mRNA Capture under toolKIT) sit a step further in. */
.enc-subnav__indent > a{padding-left:28px}
/* Wet Lab submenu on desktop: two columns, five entries on the left (the
   sixth entry onwards stands to the right), divided by a vertical line.
   The phone menu keeps one list. */
@media (min-width:1081px){
  .enc-has-sub:hover .enc-subnav--cols,
  .enc-has-sub:focus-within .enc-subnav--cols{
    display:grid;grid-template-rows:repeat(5,auto);grid-auto-flow:column;
    column-gap:8px;width:max-content;
  }
  .enc-subnav--cols > li:nth-child(n+6){border-left:1px solid var(--line);padding-left:8px}
  /* With nine entries the second column holds four of them: it starts a
     row lower so both columns end on the same line. The rule applies only
     to a list of exactly nine (6th from the start, 4th from the end). */
  .enc-subnav--cols > li:nth-child(6):nth-last-child(4){grid-row:2}
}

/* ---------- Search (magnifier in the menu bar + search box) ----------
   The logic lives in wiki.js, part 3. */
.enc-searchbtn,.enc-themebtn,.enc-viewbtn{
  flex:none;display:flex;align-items:center;justify-content:center;
  width:38px;height:38px;padding:0;cursor:pointer;
  background:var(--surface);border:1px solid var(--line);border-radius:10px;color:var(--teal-900);
}
.enc-searchbtn[hidden],.enc-themebtn[hidden],.enc-viewbtn[hidden]{display:none}
.enc-searchbtn:hover,.enc-themebtn:hover,.enc-viewbtn:hover{border-color:var(--teal-500);color:var(--teal-700)}
.enc-searchbtn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
/* Dark mode switch (left of the search button): half sun, half moon.
   The logic lives in wiki.js, part 5; the colours at the end of this file. */
.enc-themebtn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.enc-themebtn .enc-themebtn__sun{fill:currentColor;stroke:none}
/* Reading options (eye, left of the search button): opens a small panel
   underneath with the dyslexia-friendly font and the dark mode switch. The logic lives in wiki.js, part 5. */
.enc-view{position:relative;flex:none}
.enc-viewbtn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.enc-viewbtn[aria-expanded="true"]{border-color:var(--teal-500);color:var(--teal-700)}
.enc-view__panel{
  position:absolute;top:calc(100% + 8px);right:0;z-index:70;display:flex;gap:8px;padding:8px;
  background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);
}
.enc-view__panel[hidden]{display:none}
/* font switch: heavy baseline under b and d; marked while the font is on */
.enc-fontbtn .enc-fontbtn__base{stroke-width:3}
.enc-fontbtn[aria-pressed="true"]{background:var(--teal-050);border-color:var(--teal-500);color:var(--teal-700)}

/* ---------- Back to top (bottom right, every page) ----------
   Same look as the search button. Fades in once the page has been
   scrolled down (wiki.js part 4). */
.enc-totop{
  position:fixed;right:24px;bottom:24px;z-index:50;
  width:44px;height:44px;padding:0;display:flex;align-items:center;justify-content:center;
  background:var(--surface);border:1px solid var(--line);border-radius:50%;color:var(--teal-900);
  box-shadow:var(--shadow);cursor:pointer;
  opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .2s,transform .2s,visibility .2s;
}
.enc-totop[hidden]{display:none}
.enc-totop.is-visible{opacity:1;visibility:visible;transform:none}
.enc-totop:hover{border-color:var(--teal-500);color:var(--teal-700)}
.enc-totop svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media (max-width:640px){.enc-totop{right:16px;bottom:16px}}
.enc-search{
  width:min(680px,calc(100vw - 32px));max-height:min(80vh,720px);
  margin:10vh auto auto;padding:0;overflow:hidden; /* only the result list scrolls */
  border:1px solid var(--line);border-radius:var(--radius);
  background:var(--surface);color:var(--ink);box-shadow:var(--shadow);
}
.enc-search::backdrop{background:rgba(31,52,46,.35)}
.enc-search__panel{display:flex;flex-direction:column;gap:10px;max-height:inherit;padding:18px 20px 20px;box-sizing:border-box}
.enc-search__bar{display:flex;align-items:center;gap:10px}
.enc-search__input{
  flex:1;min-width:0;font:inherit;font-size:1rem;color:var(--ink);
  padding:10px 14px;background:var(--page);border:1px solid var(--line);border-radius:10px;
}
/* no orange focus frame around the search field */
.enc-search__input:focus,.enc-search__input:focus-visible{outline:none}
.enc-search__close{
  flex:none;width:38px;height:38px;padding:0;cursor:pointer;
  font-size:1.4rem;line-height:1;color:var(--muted);
  background:none;border:1px solid transparent;border-radius:10px;
}
.enc-search__close:hover{color:var(--teal-900);background:var(--teal-050)}
.enc-search__status{margin:0;font-size:.85rem;color:var(--muted)}
.enc-search__status:empty{display:none}
.enc-search__results{flex:1;min-height:0;overflow:auto;list-style:none;margin:0;padding:0}
.enc-search__results ul{list-style:none;margin:0;padding:0}
.enc-search__page{
  margin:14px 0 4px;font-family:var(--font-display);font-weight:700;
  font-size:.95rem;color:var(--teal-900);
}
.enc-search__results > li:first-child .enc-search__page{margin-top:4px}
.enc-search__hit a{
  display:block;padding:8px 10px;border-radius:8px;text-decoration:none;
  font-size:.9rem;line-height:1.45;color:var(--ink);
}
.enc-search__hit a:hover{background:var(--teal-050)}
.enc-search__where{display:block;margin-bottom:2px;font-size:.78rem;font-weight:600;color:var(--teal-700)}
.enc-search__hit mark{background:var(--gold-050);color:inherit;font-weight:600;padding:0 1px;border-radius:3px}
.enc-search__more{padding:2px 10px 6px;font-size:.8rem;color:var(--muted)}
.enc-search__more button{padding:0;font:inherit;color:var(--teal-700);background:none;border:0;cursor:pointer}
.enc-search__more button:hover{text-decoration:underline}
/* The match on a page opened from a search result */
.enc-searchhit{
  background:#FFE58F;color:inherit;border-radius:3px;box-shadow:0 0 0 2px #FFE58F;
  transition:background-color .6s ease,box-shadow .6s ease;
}
/* wiki.js adds this after 4 seconds: the yellow fades out */
.enc-searchhit.is-fading{background-color:transparent;box-shadow:0 0 0 2px transparent}
@media (prefers-reduced-motion:reduce){.enc-searchhit{transition:none}}

@media (max-width:1080px){
  .enc-nav__links,.enc-nav__cta{display:none}
}

/* ---------- Hero ----------
   Default: one column. If the page adds a card or graphic on the right
   (.enc-heroside / .enc-hero-visual / .enc-strand), the hero becomes
   two columns by itself. You do not have to switch anything on. */
.enc-hero{background:var(--teal-050);border-bottom:1px solid var(--line)}
.enc-hero__inner{
  max-width:var(--wrap);margin:0 auto;padding:34px 24px 56px;
  display:grid;grid-template-columns:minmax(0,1fr);gap:56px;align-items:center;
}
.enc-hero__inner:has(.enc-heroside),
.enc-hero__inner:has(.enc-hero-visual),
.enc-hero__inner:has(.enc-strand),
/* added: a figure in the hero counts too. Without this line the hero
   stayed in one column and the drawing dropped underneath the text. */
.enc-hero__inner:has(.enc-hero-figure){
  grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);
}
.enc-crumbs{grid-column:1/-1;font-size:.85rem;color:var(--muted);margin:0 0 26px}
.enc-crumbs a{color:var(--muted);text-decoration:none}
.enc-crumbs a:hover{color:var(--teal-700);text-decoration:underline}
.enc-crumbs span{margin:0 8px;color:var(--teal-500)}

/* Hero with a banner photo (pages listed in layout.html): the photo
   fills the whole strip, a light veil, darker on the left where the
   text sits, plus a soft shadow keep the white text readable
   (title at least 3.5 : 1, intro text about 4 : 1 or more). */
.enc-hero--photo{position:relative;isolation:isolate;overflow:hidden;background:#1F342E}
/* The photo and the veil are two layers behind the text. Per page
   (layout.html, hero_frames) the photo can get its own section
   (--hero-pos, default centre 49%: the hand holding the dish of the Wet
   Lab photo stays just below the edge), a slight rotation to straighten
   it (--hero-rotate) and a zoom so that no corner shows after rotating
   (--hero-zoom). --hero-size enlarges the photo itself (e.g. 151% auto
   instead of cover) to show only one part of it; --hero-pos-sm and
   --hero-size-sm do the same on phones, where the strip is much less
   wide. */
.enc-hero--photo::before,
.enc-hero--photo::after{content:"";position:absolute;inset:0;pointer-events:none}
.enc-hero--photo::before{
  z-index:-2;
  /* optional extra layers behind the photo (Modeling: the chat bubble in
     front, a white fade, then the protein structures): --hero-fade and
     --hero-photo-2; without them both layers are empty */
  background:var(--hero-photo) var(--hero-pos,center 49%) / var(--hero-size,cover) no-repeat,
    var(--hero-fade,none) 0 0 / 100% 100% no-repeat,
    var(--hero-photo-2,none) var(--hero-pos-2,center) / var(--hero-size-2,cover) no-repeat;
  /* --hero-flip:-1 mirrors the photo left to right */
  transform:rotate(var(--hero-rotate,0deg)) scale(calc(var(--hero-zoom,1) * var(--hero-flip,1)),var(--hero-zoom,1));
}
@media (max-width:700px){
  .enc-hero--photo::before{
    background-position:var(--hero-pos-sm,var(--hero-pos,center 49%)),0 0,var(--hero-pos-2-sm,var(--hero-pos-2,center));
    background-size:var(--hero-size-sm,var(--hero-size,cover)),100% 100%,var(--hero-size-2-sm,var(--hero-size-2,cover));
  }
  /* a fixed format on phones (--hero-ar-sm), so that a section of the
     photo can be cut exactly, e.g. whole wells only; a longer title
     still makes the banner taller */
  .enc-hero--photo{aspect-ratio:var(--hero-ar-sm,auto)}
}
/* A photo that has to be turned by a quarter (layout.html, hero_turned):
   the photo layer becomes a square as wide as the banner, centred on it,
   so that it still covers the whole strip after turning; --hero-size and
   --hero-pos then refer to that square. */
.enc-hero--turn::before{
  inset:auto;left:0;top:50%;width:100%;aspect-ratio:1;
  transform:translateY(-50%) rotate(var(--hero-rotate,0deg)) scale(var(--hero-zoom,1));
}
.enc-hero--photo::after{
  z-index:-1;
  /* two layers: a light wash of Amber Glow (--gold) that ties the banners
     to the warm tones of the home page (--hero-warm, a page can turn it
     off with 0), over the dark gradient that keeps the white title
     readable (--hero-dim-1 to -3; --hero-veil sets its colour as r,g,b,
     default a dark petrol) */
  background:
    linear-gradient(rgba(255,153,0,var(--hero-warm,.10)),rgba(255,153,0,var(--hero-warm,.10))),
    linear-gradient(90deg,rgba(var(--hero-veil,14,32,28),var(--hero-dim-1,.62)) 0%,rgba(var(--hero-veil,14,32,28),var(--hero-dim-2,.40)) 45%,rgba(var(--hero-veil,14,32,28),var(--hero-dim-3,.12)) 100%);
}
.enc-hero--photo h1.enc-title,
.enc-hero--photo .enc-lede,
.enc-hero--photo .enc-eyebrow,
.enc-hero--photo .enc-title__sub,
.enc-hero--photo .enc-crumbs,
.enc-hero--photo .enc-crumbs a{color:#fff;text-shadow:0 1px 12px rgba(0,0,0,.45)}
.enc-hero--photo .enc-crumbs span{color:#fff}
/* White banner (Dry Lab pages): the picture sits small on white, no veil,
   and the title is dark. The same in dark mode, where the banner stays
   white like the picture's own background. */
.enc-hero--light{background:#fff;border-bottom:1px solid #DDE9E5}
.enc-hero--light::after{display:none}
.enc-hero--light h1.enc-title,
.enc-hero--light .enc-lede,
.enc-hero--light .enc-eyebrow,
.enc-hero--light .enc-title__sub,
.enc-hero--light .enc-crumbs,
.enc-hero--light .enc-crumbs a,
.enc-hero--light .enc-crumbs span{color:#1F342E;text-shadow:none}
/* the same banner height on every page, the text in its lower part */
.enc-hero--photo .enc-hero__inner{min-height:clamp(240px,22vw,320px);padding-top:40px;padding-bottom:40px;align-content:end}
/* no extra space under the intro text or subtitle, so the text block
   sits equally low on every page */
.enc-hero--photo .enc-lede,
.enc-hero--photo .enc-title__sub{margin-bottom:0}

.enc-eyebrow{
  display:flex;align-items:center;gap:14px;margin:0 0 18px;
  font-family:var(--font-display);font-weight:700;font-size:.8rem;
  letter-spacing:.16em;text-transform:uppercase;color:var(--teal-700);
}
.enc-eyebrow::before{content:"";width:34px;height:3px;background:var(--gold);border-radius:2px;flex:none}

h1.enc-title{
  font-family:var(--font-display);font-weight:800;color:var(--teal-900);
  font-size:clamp(2.6rem,6vw,4rem);line-height:1.04;letter-spacing:-.02em;margin:0 0 6px;
}
.enc-title__sub{
  font-family:var(--font-display);font-weight:600;color:var(--teal-700);
  font-size:clamp(1.05rem,2vw,1.32rem);margin:0 0 22px;
}
.enc-lede{font-size:1.09rem;color:var(--muted);max-width:36em;margin:0 0 30px}
.enc-lede:empty{display:none}
.enc-actions{display:flex;flex-wrap:wrap;gap:14px}
.enc-btn{
  display:inline-flex;align-items:center;gap:10px;text-decoration:none;
  font-family:var(--font-display);font-weight:700;font-size:1rem;
  padding:14px 26px;border-radius:11px;border:2px solid transparent;
}
.enc-btn--gold{background:var(--gold);color:#3A2A05}
.enc-btn--gold:hover{background:#E5960F}
.enc-btn--ghost{background:var(--surface);color:var(--teal-700);border-color:var(--teal-100)}
.enc-btn--ghost:hover{border-color:var(--teal-500)}

/* ---------- Hero side card ("at a glance") ---------- */
.enc-heroside{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:26px 24px;
}
.enc-heroside__label{
  font-family:var(--font-display);font-size:.74rem;font-weight:700;letter-spacing:.14em;
  text-transform:uppercase;color:var(--muted);margin:0 0 16px;
}
.enc-heroside dl{margin:0;display:grid;grid-template-columns:auto 1fr;gap:10px 18px}
.enc-heroside dt{font-family:var(--font-mono);font-size:.82rem;color:var(--teal-700);white-space:nowrap}
.enc-heroside dd{margin:0;font-size:.94rem;color:var(--text)}

/* ---------- Signature: fusion-site strip (Software) ---------- */
.enc-strand{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:26px 22px;overflow-x:auto;
}
.enc-strand__label{
  font-family:var(--font-display);font-size:.74rem;font-weight:700;letter-spacing:.14em;
  text-transform:uppercase;color:var(--muted);margin:0 0 16px;
}
.enc-strand__row{
  font-family:var(--font-mono);font-size:1rem;font-weight:500;
  white-space:nowrap;letter-spacing:.06em;color:var(--teal-900);
}
.enc-strand__row + .enc-strand__row{margin-top:4px}
.enc-strand__row--bottom{color:var(--teal-500)}
.enc-nt-site{background:var(--gold-050);border-bottom:2px solid var(--gold);padding:2px 3px;border-radius:3px 3px 0 0}
.enc-nt-cds{background:var(--teal-050);padding:2px 3px;border-radius:3px}
.enc-strand__key{
  display:flex;flex-wrap:wrap;gap:18px;margin-top:20px;padding-top:16px;
  border-top:1px dashed var(--line);font-size:.82rem;color:var(--muted);
}
.enc-key{display:flex;align-items:center;gap:8px}
.enc-key i{width:12px;height:12px;border-radius:3px;display:block;flex:none}
.enc-key--gold i{background:var(--gold)}
.enc-key--teal i{background:var(--teal-500)}
.enc-key--pale i{background:var(--teal-100)}

/* ---------- Hero visual: rotating shell canvas (Home) ---------- */
.enc-hero-visual{
  position:relative;display:flex;align-items:center;justify-content:center;min-height:380px;
}
#shell{width:100%;height:100%;max-width:480px}
.enc-hero-visual .cap{
  position:absolute;bottom:2px;right:2px;text-align:right;line-height:1.5;
  font-family:var(--font-mono);font-size:.68rem;letter-spacing:.08em;
  text-transform:uppercase;color:var(--muted);
}

@media (max-width:900px){
  .enc-hero__inner,
  .enc-hero__inner:has(.enc-heroside),
  .enc-hero__inner:has(.enc-hero-visual),
  .enc-hero__inner:has(.enc-strand),
  .enc-hero__inner:has(.enc-hero-figure){grid-template-columns:1fr;gap:36px;padding-bottom:40px}
  .enc-hero-visual{order:-1;min-height:300px}
}

/* ---------- Facts strip ---------- */
.enc-facts{border-bottom:1px solid var(--line);background:var(--surface)}
.enc-facts__inner{
  max-width:var(--wrap);margin:0 auto;display:grid;grid-template-columns:repeat(4,1fr);
}
.enc-fact{padding:22px 24px;border-left:1px solid var(--line)}
.enc-fact:first-child{border-left:0}
.enc-fact b{
  display:block;font-family:var(--font-mono);font-size:.82rem;font-weight:600;
  color:var(--teal-700);letter-spacing:.08em;margin-bottom:4px;
}
.enc-fact span{font-size:.95rem;color:var(--muted)}
@media (max-width:820px){
  .enc-facts__inner{grid-template-columns:repeat(2,1fr)}
  .enc-fact:nth-child(3){border-left:0}
  .enc-fact:nth-child(n+3){border-top:1px solid var(--line)}
}

/* ---------- Layout: single column ---------- */
.enc-shell{max-width:1200px;margin:0 auto;padding:56px 24px 90px}
@media (max-width:1000px){.enc-shell{padding-top:32px}}
/* On computer screens the text keeps some room on the right as well, so
   it does not run up to the window edge: about 1 cm on a laptop, a little
   more on large screens. Not on the pages whose pictures run across the
   whole window (home page bands, Wet Lab overview), which stay centred. */
@media (min-width:1081px){
  .enc-shell:not(:has(.hm-stage, .wl-ov-wrap)){padding-right:calc(24px + clamp(16px, 2.6vw, 56px))}
}

/* ---------- Embedded app (Software) ---------- */
.enc-embed{
  border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;
  background:var(--surface);box-shadow:var(--shadow);margin:26px 0 0;
}
.enc-embed__bar{
  display:flex;align-items:center;gap:14px;padding:10px 14px;
  background:var(--teal-050);border-bottom:1px solid var(--line);
}
.enc-embed__dots{display:flex;gap:6px;flex:none}
.enc-embed__dots i{width:10px;height:10px;border-radius:50%;background:var(--teal-100);display:block}
.enc-embed__url{
  flex:1;min-width:0;font-family:var(--font-mono);font-size:.8rem;color:var(--muted);
  background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:5px 14px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.enc-embed__open{
  flex:none;font-family:var(--font-display);font-weight:700;font-size:.85rem;
  color:var(--teal-700);text-decoration:none;white-space:nowrap;
}
.enc-embed__open:hover{color:var(--teal-900)}
.enc-embed__frame{display:block;width:100%;height:clamp(560px,76vh,900px);border:0;background:var(--surface)}
.enc-embed__fallback{
  border-top:1px solid var(--line);background:var(--gold-050);
  padding:18px 20px;font-size:.92rem;color:var(--note-text);margin:0;
}
.enc-embed__fallback a{color:var(--note-text);font-weight:600}
@media (max-width:600px){
  .enc-embed__url{display:none}
  .enc-embed__frame{height:70vh}
}

/* ---------- Content typography ---------- */
.enc-main > section{scroll-margin-top:96px;margin-bottom:64px}
/* a heading jumped to from the contents list lands below the header */
.enc-main :is(h2,h3,h4)[id]{scroll-margin-top:96px}
.enc-main h2{
  font-family:var(--font-display);font-weight:800;color:var(--teal-900);
  font-size:clamp(1.7rem,3vw,2.15rem);line-height:1.15;letter-spacing:-.015em;
  margin:0 0 18px;padding-top:8px;
}
.enc-main h3{
  font-family:var(--font-display);font-weight:700;color:var(--teal-900);
  font-size:1.2rem;margin:34px 0 10px;
}
.enc-main p{margin:0 0 18px;color:var(--text)}
.enc-main strong{color:var(--teal-900);font-weight:600}
/* subscripts (N2, O2, OD600) at 70 % of the text size, without stretching the line height */
.enc-main sub{font-size:70%;line-height:0;vertical-align:-.25em}
/* charges (Na+, Cl-) at 70 % of the text size, raised */
.enc-main sup.enc-ion{font-size:70%;line-height:0;vertical-align:.45em}
.enc-main ul{margin:0 0 18px;padding-left:20px}
.enc-main li{margin-bottom:9px;color:var(--text)}
.enc-main li::marker{color:var(--teal-500)}
/* Running text is justified on every page except the home page (its
   bands are centred). Headings and the contents list stay left-aligned.
   Boxes, cards and figures that set their own alignment keep it (the
   :where() rule weighs nothing, so any other rule wins over it). */
.enc-main:not(:has(> .hm-stage)){text-align:justify}
:where(.enc-main:not(:has(> .hm-stage))) :where(h1,h2,h3,h4,h5,h6),:where(.enc-toc){text-align:left}

.enc-sectionlabel{
  display:flex;align-items:center;gap:12px;margin:0 0 10px;
  font-family:var(--font-display);font-weight:700;font-size:.76rem;
  letter-spacing:.16em;text-transform:uppercase;color:var(--teal-700);
}
.enc-sectionlabel::before{content:"";width:26px;height:3px;background:var(--gold);border-radius:2px;flex:none}

/* ---------- Abstract block ---------- */
.enc-abstract{
  background:var(--teal-050);border:1px solid var(--teal-100);
  border-radius:var(--radius);padding:30px 32px;
}
.enc-abstract p:last-child{margin-bottom:0}
.enc-abstract p:first-of-type{font-size:1.06rem}

/* ---------- Feature cards / grid ---------- */
.enc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:26px 0 8px}
.enc-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
.enc-card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:26px 26px 22px;position:relative;
}
.enc-card__num{
  font-family:var(--font-mono);font-size:.82rem;font-weight:600;
  color:var(--gold);letter-spacing:.1em;
}
.enc-card h3{margin:8px 0 8px;font-size:1.16rem;font-family:var(--font-display);font-weight:700;color:var(--teal-900)}
.enc-card p{font-size:.97rem;color:var(--muted);margin:0}
.enc-card__meta{
  margin-top:16px;padding-top:14px;border-top:1px dashed var(--line);
  font-family:var(--font-mono);font-size:.8rem;color:var(--teal-700);
  text-decoration:none;display:inline-block;
}
.enc-card__meta:hover{color:var(--teal-900)}
@media (max-width:760px){.enc-grid,.enc-grid--3{grid-template-columns:1fr}}

/* ---------- Protocol / workflow steps ---------- */
.enc-steps{list-style:none;margin:26px 0 0;padding:0;counter-reset:step}
.enc-step{
  display:grid;grid-template-columns:56px minmax(0,1fr);gap:22px;
  padding:22px 0;border-top:1px solid var(--line);
}
.enc-step:last-child{border-bottom:1px solid var(--line)}
.enc-step__n{
  counter-increment:step;font-family:var(--font-mono);font-weight:600;
  font-size:.95rem;color:var(--teal-700);padding-top:2px;
}
.enc-step__n::before{content:counter(step,decimal-leading-zero)}
.enc-step h3{margin:0 0 6px;font-size:1.1rem}
.enc-step p{margin:0;color:var(--muted);font-size:.97rem}

/* ---------- Timeline (Notebook) ---------- */
.enc-timeline{list-style:none;margin:26px 0 0;padding:0}
.enc-entry{
  display:grid;grid-template-columns:120px minmax(0,1fr);gap:22px;
  padding:22px 0;border-top:1px solid var(--line);
}
.enc-entry:last-child{border-bottom:1px solid var(--line)}
.enc-entry__date{
  font-family:var(--font-mono);font-weight:600;font-size:.9rem;
  color:var(--teal-700);padding-top:2px;
}
.enc-entry h3{margin:0 0 6px;font-size:1.1rem}
.enc-entry p{margin:0;color:var(--muted);font-size:.97rem}
@media (max-width:640px){
  .enc-entry{grid-template-columns:1fr;gap:6px}
}

/* ---------- Figure ---------- */
.enc-fig{margin:28px 0;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--surface)}
.enc-fig__ph{
  aspect-ratio:16/8;background:
    repeating-linear-gradient(45deg,var(--teal-050) 0 12px,var(--surface) 12px 24px);
  display:flex;align-items:center;justify-content:center;
  color:var(--teal-500);font-family:var(--font-mono);font-size:.85rem;text-align:center;padding:20px;
}
.enc-fig figcaption{
  padding:14px 20px;font-size:.88rem;color:var(--muted);border-top:1px solid var(--line);
}
.enc-fig figcaption b{color:var(--teal-900)}

/* ---------- Table ---------- */
.enc-tablewrap{overflow-x:auto;margin:22px 0;border:1px solid var(--line);border-radius:var(--radius)}
table.enc-table{width:100%;border-collapse:collapse;font-size:.92rem;background:var(--surface)}
.enc-table th{
  text-align:left;background:var(--teal-050);color:var(--teal-900);
  font-family:var(--font-display);font-weight:700;font-size:.82rem;
  letter-spacing:.06em;text-transform:uppercase;padding:12px 16px;white-space:nowrap;
}
.enc-table td{padding:12px 16px;border-top:1px solid var(--line);color:var(--text);vertical-align:top}
.enc-table td.mono,.enc-table td .mono{font-family:var(--font-mono);color:var(--teal-700)}

/* ---------- Callout / TODO ---------- */
.enc-note{
  border-left:4px solid var(--gold);background:var(--gold-050);
  padding:16px 20px;border-radius:0 10px 10px 0;margin:22px 0;
  font-size:.94rem;color:var(--note-text);
}
.enc-note b{color:var(--note-text)}

/* ---------- Download panel (protocol PDF) ---------- */
.enc-download{
  display:flex;flex-wrap:wrap;align-items:center;gap:14px;
  margin:20px 0 0;padding:16px 18px;
  background:var(--teal-050);border:1px solid var(--teal-100);border-radius:12px;
}
.enc-download__txt{font-size:.92rem;color:var(--text);margin:0;flex:1 1 240px}
.enc-download__txt b{color:var(--teal-900)}
.enc-download .enc-btn{padding:11px 20px;font-size:.92rem}

/* ---------- Board game kit ("The Yeast We Can Do") ----------
   The same block on Contribution and Public Outreach (wiki/boardgame-kit.html):
   title, key facts as pills, the board with the hopping figures and the
   download list. */
.enc-main .bgk-title{margin:0 0 14px}
.bgk-title img{display:block;width:min(100%,380px);height:auto}
.bgk-title .bgk-title__dark{display:none}
html[data-theme=dark] .bgk-title .bgk-title__light{display:none}
html[data-theme=dark] .bgk-title .bgk-title__dark{display:block}
.enc-main .bgk-facts{list-style:none;margin:0 0 18px;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.enc-main .bgk-facts li{
  --c:var(--teal-500);margin:0;padding:5px 12px;border:1px solid var(--line);border-radius:999px;
  background:var(--surface);font-size:.85rem;color:var(--teal-900);transition:background .2s,border-color .2s,color .2s;
}
/* on hover each pill fills with its own colour of the palette */
.enc-main .bgk-facts li:nth-child(2){--c:var(--lime)}
.enc-main .bgk-facts li:nth-child(3){--c:var(--blue)}
.enc-main .bgk-facts li:nth-child(4){--c:var(--purple)}
.enc-main .bgk-facts li:hover{background:var(--c);border-color:var(--c);color:#17211F} /* dark text: readable on all four fills, in both modes */
.bgk-ph{display:flex;align-items:center;justify-content:center;text-align:center;border:1px dashed var(--line);border-radius:8px;background:var(--teal-050);color:var(--muted);font-size:.9rem}
/* the board is only as big as fits under the title and the pills, so
   both can be seen at once on a laptop and on a phone (the 250px are the
   menu bar, title, pills and spacing above the board) */
.enc-main .bgk-fig > .bgk-board{width:100%;max-width:min(520px,calc((100vh - 250px) * 2756 / 2835));margin-left:auto;margin-right:auto}
@supports (height:100svh){.enc-main .bgk-fig > .bgk-board{max-width:min(520px,calc((100svh - 250px) * 2756 / 2835))}}
/* board with the two hopping figures; the figure image is a square with
   the model in the middle, so its foot sits about 80% down */
.bgk-board{position:relative}
.bgk-board__img{display:block;width:100%;height:auto}
.bgk-piece{
  position:absolute;width:13%;height:auto;transform:translate(-50%,-72%);pointer-events:none;
  transition:left .6s ease-in-out,top .6s ease-in-out;
}
.bgk-piece.is-hop{animation:bgk-hop .6s ease-in-out}
@keyframes bgk-hop{50%{transform:translate(-50%,-125%) scale(1.08)}}
@media (prefers-reduced-motion:reduce){.bgk-piece{transition:none}.bgk-piece.is-hop{animation:none}}
.enc-main .bgk-dl{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.enc-main .bgk-dl > li{
  margin:0;display:grid;grid-template-columns:64px minmax(0,1fr);grid-template-rows:auto auto;column-gap:14px;row-gap:8px;align-items:center;
  padding:12px;border:1px solid var(--teal-100);border-radius:12px;background:var(--teal-050);text-align:left;
}
.bgk-dl__thumb{grid-row:1 / span 2;width:64px;height:64px;object-fit:contain;font-size:.75rem}
img.bgk-dl__thumb{border-radius:8px}
/* both figures in one tile: yeast cell back left, budding yeast front right */
.bgk-dl__thumb--pair{position:relative;border-radius:8px}
.bgk-dl__thumb--pair img{position:absolute;width:44px;height:44px}
.bgk-dl__thumb--pair img:first-child{left:0;top:4px}
.bgk-dl__thumb--pair img:last-child{right:0;bottom:2px}
.bgk-dl__txt{font-size:.92rem;color:var(--text);line-height:1.35}
.bgk-dl__txt b{color:var(--teal-900)}
.bgk-dl__txt span{display:block;font-size:.82rem;color:var(--muted)}
.bgk-dl__soon,.bgk-dl__btn{justify-self:start;padding:5px 12px;border-radius:999px;font-size:.82rem;font-weight:600;white-space:nowrap}
.bgk-dl__soon{border:1.5px dashed var(--gold);background:var(--gold-050);color:var(--note-text)}
.bgk-dl__btn{background:var(--teal-700);color:var(--surface);text-decoration:none}
.bgk-dl__btn:hover{background:var(--teal-900)}
/* the files of the game, one button each, wrapping onto a second line */
.enc-main .bgk-dl__files{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.enc-main .bgk-dl__files li{margin:0}
.bgk-dl__files .bgk-dl__btn{display:inline-block}
@media (max-width:640px){.enc-main .bgk-dl{grid-template-columns:minmax(0,1fr)}}
/* "How and why we developed a board game" folds open under the downloads */
.bgk-more{margin:18px 0 0;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.bgk-more > summary{
  display:flex;align-items:center;gap:10px;padding:12px 16px;cursor:pointer;list-style:none;
  font-family:var(--font-display);font-weight:700;color:var(--teal-900);
}
.bgk-more > summary::-webkit-details-marker{display:none}
.bgk-more > summary::before{
  content:"";flex:none;width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;
  transform:rotate(-45deg);transition:transform .2s;
}
.bgk-more[open] > summary::before{transform:rotate(45deg)}
.bgk-more > summary:focus-visible{outline:2px solid var(--teal-700);outline-offset:2px;border-radius:12px}
.enc-main .bgk-more__body{padding:0 16px 14px}
.enc-main .bgk-more__body > :last-child{margin-bottom:0}
/* What our team says about the game: three short quotes side by side, like
   the praise on the back of a bestseller (on phones one under the other) */
.enc-main .bgk-blurbs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0 4px}
.enc-main .bgk-blurb{margin:0;padding:18px 18px 14px;border-radius:12px;background:var(--teal-050);border:1px solid var(--teal-100);display:flex;flex-direction:column;justify-content:space-between}
.enc-main .bgk-blurb blockquote{margin:0;padding:0;border:0;background:none}
.enc-main .bgk-blurb blockquote p{margin:0;font-family:var(--font-display);font-size:1.05rem;font-style:italic;font-weight:600;line-height:1.4;color:var(--teal-900);text-align:left}
.enc-main .bgk-blurb blockquote p::before{content:"\201C";display:block;font-size:2.4rem;line-height:.8;color:var(--teal-500);font-style:normal}
.enc-main .bgk-blurb figcaption{margin-top:12px;font-size:.82rem;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);text-align:left}
.enc-main .bgk-blurb figcaption::before{content:"\2014\00a0"}
/* the game block on Public Outreach and Contributions hides its figure captions; the names under the quotes stay */
.po-game .bgk-blurb figcaption,.eg-game .bgk-blurb figcaption{display:block}
@media (max-width:760px){.enc-main .bgk-blurbs{grid-template-columns:minmax(0,1fr)}}

/* ---------- Availability panel (Software) ---------- */
.enc-split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-top:24px}
.enc-panel{border:1px solid var(--line);border-radius:var(--radius);padding:26px;background:var(--surface)}
.enc-panel--primary{background:var(--teal-900);border-color:var(--teal-900);color:var(--teal-100)}
.enc-panel--primary h3,.enc-panel--primary strong{color:#fff}
.enc-panel--primary p{color:#C4DBD4}
.enc-panel h3{margin-top:0}
.enc-panel p{font-size:.97rem;margin-bottom:16px}
.enc-panel a.enc-btn{padding:11px 20px;font-size:.94rem}
@media (max-width:760px){.enc-split{grid-template-columns:1fr}}

/* ---------- References ---------- */
/* ---------- References ----------
   The number is placed with position:absolute, NOT with a grid.
   The grid version broke every citation: a grid turns each child into
   its own cell, so the plain text, each <em> and the <a> of the DOI
   all landed in different cells and overlapped each other. */
.enc-refs{list-style:none;counter-reset:ref;margin:0;padding:0;font-size:.92rem}
.enc-refs li{
  counter-increment:ref;position:relative;
  padding:12px 0 12px 40px;border-top:1px solid var(--line);
  color:var(--muted);line-height:1.6;
}
.enc-refs li::before{
  content:"[" counter(ref) "]";position:absolute;left:0;top:12px;
  font-family:var(--font-mono);color:var(--teal-700);
  font-variant-numeric:tabular-nums;
}
.enc-refs li em{font-style:italic}
.enc-refs a{word-break:break-word}

/* ---------- Footer ---------- */
.enc-foot{border-top:1px solid var(--line);background:var(--surface)}
.enc-foot__inner{
  max-width:var(--wrap);margin:0 auto;padding:34px 24px;
  display:flex;flex-wrap:wrap;gap:18px;justify-content:space-between;
  font-size:.87rem;color:var(--muted);
}
.enc-foot a{color:var(--teal-700)}

/* ============================================================
   ADDED IN THE CLEAN-UP - everything below is new
   ============================================================ */

/* ---------- Skip link ----------
   Invisible until you press Tab. Lets keyboard users jump straight
   to the content instead of tabbing through the whole menu.
   Required for good accessibility, which iGEM judges do check. */
.enc-skip{
  position:absolute;left:-9999px;top:0;z-index:100;
  background:var(--teal-900);color:#fff;padding:12px 20px;border-radius:0 0 10px 0;
  font-family:var(--font-display);font-weight:700;text-decoration:none;
}
.enc-skip:focus{left:0}

/* ---------- Mobile menu button ("hamburger") ----------
   Hidden on desktop. Appears below 1080px, where the normal menu
   does not fit. wiki.js makes it open and close. */
.enc-navtoggle{
  display:none;margin-left:auto;background:none;border:0;cursor:pointer;
  padding:8px;flex-direction:column;gap:5px;
}
.enc-navtoggle span{display:block;width:24px;height:2px;background:var(--teal-900);border-radius:2px}

/* ---------- Optional table of contents on the left ----------
   A page gets a sticky contents column by putting

     <nav class="enc-toc"> ... </nav>
     <div class="enc-main__body"> ...all the sections... </div>

   inside its page_content. The rules below notice the nav and switch
   the page to two columns. Pages without it stay single column.

   IMPORTANT - why the wrapper is not optional:
   this is a CSS grid, and a grid fills its cells one after another.
   If the sections are loose siblings of the nav, the first section
   goes in column 2, the second one goes back to column 1 and lands on
   top of the contents list, the third in column 2 again, and so on.
   Wrapping them means the grid only ever has two children, so each one
   gets its own column and nothing can collide.
   The wrapper also gives the sticky nav the full height of the page to
   travel through, so the contents list follows the reader to the end. */
.enc-shell:has(.enc-toc){max-width:var(--wrap)}
.enc-main:has(> .enc-toc){
  display:grid;grid-template-columns:15rem minmax(0,1fr);
  gap:48px;align-items:start;
}
/* Pages with encapsulin symbols left of their headings (inc-hicon,
   ihp-hicon, po-hicon, nb-hicon, ctr-hicon, aid-hicon, sfs-hicon ...):
   the symbols sit in this gap, so it is wider there and they keep some
   air to the contents list. Wide screens only; below 1000px the symbols
   sit above the headings. */
@media (min-width:1001px){
  .enc-main:has(> .enc-toc):has([class*="-hicon"]){column-gap:80px}
}
/* min-width:0 stops a wide figure or table from pushing the column
   out and squashing the contents list. */
.enc-main__body{min-width:0}
/* Belt and braces: even if someone forgets the wrapper one day, this
   keeps the contents list in column 1 and everything else in column 2. */
.enc-main:has(> .enc-toc) > .enc-toc{grid-column:1}
.enc-main:has(> .enc-toc) > *:not(.enc-toc){grid-column:2}
.enc-toc{position:sticky;top:96px}
/* Pages without a contents list get the same text column - same width,
   same place - as pages with one; the list's column just stays empty.
   Not the home page: it is built from full-width stages. Below 1000px
   all pages are one column anyway. */
@media (min-width:1001px){
  .enc-shell:not(:has(.enc-toc)):not(:has(.hm-stage)){max-width:var(--wrap)}
  .enc-main:not(:has(> .enc-toc)):not(:has(> .hm-stage)){padding-left:calc(15rem + 48px)}
}
.enc-toc__label{
  font-family:var(--font-display);font-size:.74rem;font-weight:700;letter-spacing:.14em;
  text-transform:uppercase;color:var(--muted);
  margin:0 0 14px;padding-bottom:12px;border-bottom:1px solid var(--line);
}
.enc-toc ul{list-style:none;margin:0;padding:0}
.enc-toc li{margin:0}
.enc-toc a{
  display:block;padding:7px 0 7px 14px;font-size:.9rem;line-height:1.4;
  color:var(--muted);text-decoration:none;
  border-left:2px solid transparent;transition:color .15s,border-color .15s;
}
.enc-toc a:hover{color:var(--teal-700)}
/* wiki.js adds .is-active to the section you are currently reading */
.enc-toc a.is-active{color:var(--teal-900);font-weight:600;border-left-color:var(--gold)}
.enc-toc__sub a{padding-left:28px;font-size:.85rem}
.enc-toc__sub .enc-toc__sub a{padding-left:42px;font-size:.8rem}
.enc-toc__sub .enc-toc__sub .enc-toc__sub a{padding-left:56px}
/* The parts of an entry (its sub-list) are folded when the page opens;
   wiki.js gives every entry with parts a small arrow that unfolds them
   (class is-open). The same on every page, on every screen width. */
.enc-toc__sub{display:none}
.enc-toc__sub.is-open{display:block}
.enc-toc__row{display:flex;align-items:center}
.enc-toc__row > a{flex:1;min-width:0}
.enc-toc__toggle{
  flex:none;display:flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;
  border:0;border-radius:50%;background:none;color:var(--muted);cursor:pointer;
}
.enc-toc__toggle svg{width:16px;height:16px;transition:transform .18s ease}
.enc-toc__toggle[aria-expanded="true"] svg{transform:rotate(90deg)}
.enc-toc__toggle:hover,.enc-toc__toggle:focus-visible{background:var(--teal-050);color:var(--teal-700);outline:none}
.enc-toc__toggle:focus-visible{box-shadow:0 0 0 2px var(--teal-900)}
@media (prefers-reduced-motion:reduce){.enc-toc__toggle svg{transition:none}}
/* A long contents list scrolls on its own, at most one window high.
   While the mouse is over it, the wheel scrolls only the list, never the
   text next to it. Desktop only - on narrow screens the list sits above
   the text and does not stick. The small side padding (cancelled by the
   negative margin) keeps keyboard focus rings from being cut off. */
@media (min-width:1001px){
  .enc-toc{
    max-height:calc(100vh - 120px);overflow-y:auto;overscroll-behavior:contain;
    scrollbar-width:none;padding:0 6px 6px;margin-inline:-6px;
  }
  .enc-toc::-webkit-scrollbar{display:none} /* scrolls, but without a visible bar */
}

/* ---------- Safety warning box (red) ----------
   Same idea as .enc-note, but for real hazards. Use sparingly. */
.enc-warn{
  border-left:4px solid #C0392B;background:#FDECEA;
  padding:16px 20px;border-radius:0 10px 10px 0;margin:22px 0;
  font-size:.94rem;color:#6E211A;
}
.enc-warn b{color:#8C2A20}

/* ---------- Footer with columns ----------
   Replaces the old one-line footer. The legal row at the bottom is
   required by iGEM and must stay. */
.enc-foot__top{
  max-width:var(--wrap);margin:0 auto;padding:44px 24px 34px;
  display:grid;grid-template-columns:minmax(0,3fr) minmax(0,1fr);gap:40px;
}
/* On wide screens the contact column is at least as wide as its longest
   line, so the institute name stays on one line. */
@media (min-width:1001px){
  .enc-foot__top{grid-template-columns:minmax(0,3fr) minmax(max-content,1fr)}
}
.enc-foot__brand{
  font-family:var(--font-display);font-weight:800;font-size:1.28rem;
  letter-spacing:.06em;color:var(--teal-900);margin:0 0 10px;
}
.enc-foot__about p{margin:0;font-size:.92rem;color:var(--muted);max-width:44ch}
.enc-foot__label{
  font-family:var(--font-display);font-size:.74rem;font-weight:700;letter-spacing:.14em;
  text-transform:uppercase;color:var(--muted);margin:0 0 12px;
}
.enc-foot ul{list-style:none;margin:0;padding:0}
.enc-foot li{margin-bottom:8px;font-size:.92rem;color:var(--muted)}
/* Social media icons under the contact details. */
/* LinkedIn and Instagram stacked in a column, the KIT logo beside them
   spanning both rows: two 32px icons + 8px gap = the 72px the KIT logo
   visibly fills. */
.enc-foot .enc-foot__social{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px 12px;margin-top:14px}
.enc-foot .enc-foot__social li{margin:0}
.enc-foot__social a{display:block;color:var(--teal-700)}
.enc-foot__social a:hover{color:var(--teal-900)}
.enc-foot__social svg{display:block;width:32px;height:32px}
/* KIT logo next to the icons, 24px to their right */
.enc-foot .enc-foot__social .enc-foot__kit{grid-column:2;grid-row:1 / span 2;min-width:0;display:flex;justify-content:flex-start;padding-left:12px}
.enc-foot__kit img{display:block;height:80px;width:auto;max-width:100%;min-width:0;object-fit:contain;margin:-4px 0} /* -4px: empty band in the file */
.enc-foot__legal{
  max-width:var(--wrap);margin:0 auto;padding:20px 24px 34px;
  border-top:1px solid var(--line);
  display:flex;flex-wrap:wrap;gap:8px 24px;justify-content:space-between;
  font-size:.85rem;color:var(--muted);
}
@media (max-width:760px){
  .enc-foot__top{grid-template-columns:1fr;gap:28px}
}

/* ---------- Sponsors (footer, every page, left of the contact column) ----------
   Two fixed logos, below them ten logos that run slowly from left to
   right in an endless loop, with the same space between all of them
   (each logo takes only its own width). The list is in the page twice and
   the track moves by exactly one list, so the copy takes over without a
   jump. Stops while
   the mouse is on it, and stands still for visitors who ask their system
   for reduced motion. */
.enc-sponsors{min-width:0}
.enc-foot .enc-sponsors__static{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px 40px;margin:0 4px 55px;padding:0}
.enc-foot .enc-sponsors__static li{margin:0}
.enc-sponsors__static .enc-sponsors__ph,.enc-sponsors__static img{height:110px}
.enc-sponsors__static img{display:block;width:auto;max-width:100%;object-fit:contain}
.enc-sponsors__viewport{overflow:hidden}
.enc-sponsors__track{display:flex;width:max-content;animation:enc-sponsors-run 78s linear infinite}
.enc-sponsors__viewport:hover .enc-sponsors__track{animation-play-state:paused}
.enc-foot .enc-sponsors__list{display:flex;flex:none;margin:0;padding:0}
.enc-foot .enc-sponsors__item{flex:none;margin:0;padding:0 32px;display:flex;align-items:center}
.enc-sponsors__ph{
  display:flex;align-items:center;justify-content:center;height:56px;
  border:2px dashed var(--line);border-radius:10px;background:var(--page);
  font-size:.72rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);
}
/* All logos in the strip show the same visible height (--logo-h) and the
   same space between them. Each <img> carries factors measured from its
   file: --k = image height / visible height, and negative margins
   (--mt, --mr, --mb, --ml) that cancel the empty space inside the file.
   A new logo needs its own values. */
.enc-sponsors{--logo-h:55px}
.enc-sponsors__item img{
  display:block;width:auto;max-width:none;height:calc(var(--logo-h) * var(--k,1));
  margin:calc(var(--logo-h) * var(--mt,0)) calc(var(--logo-h) * var(--mr,0)) calc(var(--logo-h) * var(--mb,0)) calc(var(--logo-h) * var(--ml,0));
}
@keyframes enc-sponsors-run{from{transform:translateX(-50%)}to{transform:translateX(0)}}
@media (prefers-reduced-motion:reduce){.enc-sponsors__track{animation:none}}

/* ---------- Mobile layout ----------
   Below 1080px the desktop menu is replaced by the hamburger menu.
   The old CSS hid the menu here and offered nothing instead, so the
   wiki could not be navigated on a phone at all. */
@media (max-width:1080px){
  .enc-navtoggle{display:flex}
  /* logo, menu button, dark mode and search stay on one line */
  .enc-nav__inner{position:relative;flex-wrap:nowrap;gap:14px}
  .enc-nav__links{
    display:none;position:absolute;top:100%;left:0;right:0;
    flex-direction:column;align-items:stretch;gap:0;
    background:var(--surface);border-bottom:1px solid var(--line);
    box-shadow:var(--shadow);padding:8px;
  }
  .enc-nav__links.is-open{display:flex}
  .enc-brand{min-width:0}
  .enc-nav__links > li > a,
  .enc-subtrigger{
    display:block;width:100%;text-align:left;
    padding:12px 14px;border-bottom:0;border-radius:8px;
  }
  .enc-nav__links > li > a:hover,.enc-subtrigger:hover{background:var(--teal-050)}
  /* Submenus open on tap, not on hover - phones have no hover */
  .enc-subnav{
    position:static;display:none;box-shadow:none;border:0;
    border-left:2px solid var(--teal-100);border-radius:0;
    margin:0 0 4px 14px;padding:0 0 0 6px;
  }
  .enc-has-sub:hover .enc-subnav{display:none}
  .enc-has-sub.is-open .enc-subnav{display:block}
}

/* very narrow phones: a little less room around the menu bar items */
@media (max-width:380px){
  .enc-nav__inner{gap:8px;padding-inline:16px}
  .enc-brand{gap:8px}
  .enc-brand__word{font-size:1.1rem}
}

@media (max-width:1000px){
  .enc-main:has(> .enc-toc){grid-template-columns:1fr;gap:28px}
  /* one column here: the text goes below the list, not into a second
     column that no longer exists (that squeezed it to a sliver on phones).
     Long words such as URLs may break so they cannot widen the page. */
  .enc-main:has(> .enc-toc) > *:not(.enc-toc){grid-column:1;min-width:0;overflow-wrap:break-word}
  .enc-toc{position:static;border-bottom:1px solid var(--line);padding-bottom:20px}
  .enc-toc ul{columns:2;column-gap:24px}
  /* an unfolded sub-list stays in one column and with its entry, so the
     list never splits it or grows wider than the page */
  .enc-toc ul ul{columns:auto}
  .enc-toc > ul > li{break-inside:avoid}
}

/* ============================================================
   KEPT FROM THE OLD TEMPLATE STYLESHEET

   These rules are still used by the pages that have not been
   converted to the ENCORE design yet (engineering.html,
   results.html, contribution.html, ...). Deleting them would
   break the layout of those pages.

   Once every page uses the .enc-* classes, this whole block can
   go. To check: search the repo for "bd-callout".

   NOTE - three rules from the old file were deliberately REMOVED:
     body { padding-top: 56px }  was for the old fixed Bootstrap
                                 navbar; it now leaves an empty
                                 56px gap at the top of every page
     footer a { color: white }   the new footer has a white
                                 background, so white links were
                                 invisible
     .bg-hero / .bg-dark /
     .left-aligned               only used by the old menu and
                                 header, which no longer exist
   ============================================================ */

.bd-callout{
  padding:1.25rem;margin-top:1.25rem;margin-bottom:1.25rem;
  border:1px solid #e9ecef;border-left-width:.25rem;border-radius:.25rem;
}
.bd-callout h4{margin-bottom:1.25rem}
.bd-callout p:last-child{margin-bottom:0}
.bd-callout code{border-radius:.25rem}
.bd-callout+.bd-callout{margin-top:-.25rem}
.bd-callout-info{border-left-color:#5bc0de}
.bd-callout-warning{border-left-color:#f0ad4e}
.bd-callout-danger{border-left-color:#d9534f}


/* ============================================================
   ADDED FOR THE PROJECT DESCRIPTION PAGE
   ============================================================ */

/* ---------- Two-level text ----------
   Every section opens with a plain-language summary that anyone can
   read. The detail sits inside <details>, closed by default, so the
   page stays short for a visitor and complete for a judge. */
.enc-more{
  border:1px solid var(--line);border-radius:var(--radius);
  background:var(--surface);margin:0 0 22px;max-width:68ch;overflow:hidden;
}
.enc-more>summary{
  cursor:pointer;list-style:none;padding:14px 20px;
  font-family:var(--font-display);font-weight:700;font-size:.92rem;
  color:var(--teal-900);display:flex;align-items:center;gap:10px;
}
.enc-more>summary::-webkit-details-marker{display:none}
/* the little triangle, drawn in CSS so it can be recoloured */
.enc-more>summary::before{
  content:"";width:0;height:0;flex:none;
  border-left:7px solid var(--gold);
  border-top:5px solid transparent;border-bottom:5px solid transparent;
  transition:transform .18s;
}
.enc-more[open]>summary::before{transform:rotate(90deg)}
.enc-more>summary:hover{background:var(--teal-050)}
.enc-more__body{padding:2px 20px 6px;border-top:1px solid var(--line)}
.enc-more__body p:last-child{margin-bottom:14px}

/* ---------- Collapsible References ----------
   On every page the References heading is a toggle, closed when the
   page opens, so the sources do not take up so much room:
     <section id="references">
       <details class="enc-refsfold">
       <summary><h2>References</h2></summary>
       ...the list...
       </details>
     </section>
   The same gold triangle as the boxes above. A citation such as [3]
   opens it by itself (wiki.js, part 7). */
.enc-refsfold>summary{display:flex;align-items:center;gap:12px;cursor:pointer;list-style:none;border-radius:8px}
.enc-refsfold>summary::-webkit-details-marker{display:none}
.enc-refsfold>summary::before{
  content:"";width:0;height:0;flex:none;margin-top:8px; /* h2 has 8px padding on top */
  border-left:9px solid var(--gold);
  border-top:6px solid transparent;border-bottom:6px solid transparent;
  transition:transform .18s;
}
.enc-refsfold[open]>summary::before{transform:rotate(90deg)}
.enc-main .enc-refsfold>summary h2{margin:0}
.enc-refsfold[open]>summary{margin-bottom:18px}
.enc-refsfold>summary:hover h2{color:var(--teal-700)}
.enc-refsfold>summary:focus-visible{outline:2px solid var(--teal-900);outline-offset:4px}
/* Plain variant: just "Read more" and the text below it - no box, no
   background, no border. Used on the Modeling page. */
.enc-more--plain{border:0;border-radius:0;background:none;max-width:none;overflow:visible}
.enc-more--plain>summary{padding:0}
.enc-more--plain>summary:hover{background:none;text-decoration:underline}
.enc-more--plain .enc-more__body{padding:14px 0 0;border-top:0}
.enc-more--plain .enc-more__body p:last-child{margin-bottom:0}

/* ---------- SVG illustrations ----------
   The drawings are written as SVG inside the page, so they stay
   sharp at any size, weigh almost nothing, can be read by screen
   readers, and follow the colour variables above. */
.enc-figure{margin:30px 0;max-width:100%}
.enc-svg{width:100%;height:auto;display:block}
.enc-svg-lbl{font-family:var(--font-display);font-size:15px;font-weight:700;fill:var(--teal-900)}
.enc-svg-sub{font-family:var(--font-body);font-size:13px;fill:var(--muted)}
.enc-svg-mono{font-family:var(--font-mono);font-size:12px;font-weight:600;fill:var(--muted)}
.enc-svg-step{font-family:var(--font-display);font-size:12px;font-weight:700;
  letter-spacing:.13em;fill:var(--teal-700)}
/* Captions run the full width of the text column under their figure,
   so they line up with the body text even where the picture itself is
   narrower. */
.enc-figure figcaption{
  font-size:.88rem;color:var(--muted);line-height:1.55;
  margin-top:12px;
}
/* a caption above its table (tables are captioned above, figures below) */
.enc-figure > figcaption:first-child{margin-top:0;margin-bottom:10px}
.enc-figure figcaption b{color:var(--teal-900)}

/* A page whose banner carries the menu name ("Software", "Hardware")
   opens with the name of the tool itself, one step below the title. */
.enc-main h2.enc-title__page{
  margin:0 0 22px;font-size:clamp(1.7rem,3vw,2.1rem);line-height:1.15;
  letter-spacing:-.01em;color:var(--teal-900);text-align:left;
}

/* ============================================================
   Guide covers (TeamKIT, LAB KIT, workshop): a click on the cover
   downloads or opens the guide's PDF. A cover without a PDF yet has
   no href and is not clickable (TODO: add href once uploaded).
   ============================================================ */
.enc-main .kit-cover{text-decoration:none}
.kit-cover{display:block;border-radius:6px;transition:transform .2s,box-shadow .2s}
.kit-cover img{display:block;border-radius:6px}
.kit-cover[href]{cursor:pointer}
.kit-cover[href]:hover{transform:translateY(-3px)}
.kit-cover[href]:hover img,.kit-cover[href]:hover .kit-cover__ph{box-shadow:0 0 0 3px #296357,var(--shadow)} /* dark green of "KIT" on the covers */
.kit-cover:focus-visible{outline:3px solid var(--gold);outline-offset:4px}
/* LAB KIT and workshop covers sit right of the text, 220px wide like the TeamKIT cover */
.kit-shelf{display:flex;flex-direction:column;align-items:center;margin:6px 0 22px}
.kit-shelf .kit-cover{width:220px}
.kit-shelf .kit-cover img{width:100%;height:auto;border:1px solid var(--line);border-radius:6px;box-shadow:var(--shadow)}
@media (min-width:760px){
  .kit-shelf{float:right;margin:4px 0 14px 28px}
  /* the middle of the three covers stands on the other side, so they
     alternate right, left, right down the Guide Collection */
  .kit-shelf--left{float:left;margin:4px 28px 14px 0}
}
.kit-clear{clear:both}
/* Workshop cover placeholder until the design is ready */
.kit-cover__ph{
  display:flex;flex-direction:column;justify-content:center;gap:8px;aspect-ratio:1414/2000;padding:18px;
  border:2px dashed var(--teal-500);border-radius:6px;background:var(--surface);box-shadow:var(--shadow);
  text-align:center;color:var(--teal-900);font-family:var(--font-display);font-weight:800;line-height:1.25;
}
.enc-main .kit-cover__ph,.enc-main .kit-cover__ph small{text-decoration:none}
.kit-cover__ph small{font-family:inherit;font-weight:600;font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
/* Hand-written note under every guide cover, with a curved arrow back up
   at it, so it is clear that the cover itself is the download. */
.enc-main .kit-hint,.kit-hint{display:flex;flex-direction:column;align-items:center;max-width:230px;margin:4px auto 0;color:#296357}
.enc-main .kit-hint__txt{margin:0;font-size:.98rem;font-style:italic;line-height:1.25;text-align:center;color:inherit}
.kit-hint__arrow{flex:none;width:114px;height:33px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
html[data-theme="dark"] .enc-main .kit-hint,html[data-theme="dark"] .kit-hint{color:var(--teal-700)}
@media (prefers-reduced-motion:reduce){.kit-cover{transition:none}.kit-cover[href]:hover{transform:none}}

/* ---------- Key-term chip ----------
   Small inline marker for words that also live in the Glossary. */
.enc-term{
  border-bottom:2px dotted var(--gold);cursor:help;
  font-weight:500;color:var(--teal-900);text-decoration:none;
}

/* ---------- Numbered module card ---------- */
.enc-card--wide{grid-column:1/-1}


/* ---------- Sizes for the team's own illustrations ----------
   The drawings come from Inkscape with their own proportions. These
   classes stop a square drawing from filling half the screen and keep
   the small keys next to the scene they explain. */
.enc-figure--square .enc-svg{max-width:430px;margin:0 auto}
.enc-figure--wide   .enc-svg{max-width:100%}
.enc-figure__key{max-width:340px;margin:18px auto 0}
.enc-figure__key .enc-svg{width:100%}
/* Scene and key side by side ONLY when the card is wide enough.
   This used to key off the window width, which was wrong: two cards
   sitting next to each other are half as wide as the window, so the
   pair kept trying to go horizontal inside a narrow card and pushed
   the drawing off the edge. A container query measures the card
   itself, so the figure adapts wherever it is put. */
.enc-card{container-type:inline-size}

@container (min-width:620px){
  .enc-figure--pair{display:grid;grid-template-columns:minmax(0,1fr) 260px;
    gap:26px;align-items:center}
  .enc-figure--pair .enc-figure__key{margin:0}
  .enc-figure--pair figcaption{grid-column:1/-1}
}


/* ============================================================
   HERO OF THE PROJECT DESCRIPTION
   A statement instead of a label, next to a picture that makes
   the same argument. The two are meant to be read together, so
   neither should shout over the other.
   ============================================================ */

/* The headline is a sentence, not a title, so it needs a tighter
   line and a narrower measure than the default enc-title. */
/* The page cannot add a class to the hero, because layout.html writes
   that markup. So the rules key off the drawing being present, the same
   trick the contents column uses. Any page that puts .enc-hero-svg in
   its hero gets the statement treatment automatically. */
.enc-hero__inner:has(.enc-hero-svg) h1.enc-title{
  font-size:clamp(2rem,3.6vw,3.1rem);
  line-height:1.08;letter-spacing:-.02em;max-width:15ch;
}
.enc-hero__inner:has(.enc-hero-svg) .enc-title__sub{max-width:34ch}
.enc-hero__inner:has(.enc-hero-svg) .enc-lede{max-width:38ch}

/* Colours used only by the contrast drawing. Named by what they
   mean, so the drawing follows the palette automatically. */
.enc-hero-svg{
  --cell-fill:#FFFFFF;
  --cell-line:#C9D4D0;
  --react:var(--gold);
  --enzyme:var(--teal-500);
}
.enc-hero-svg .enc-hero-cap{
  font-family:var(--font-display);font-size:15px;font-weight:700;
  fill:var(--teal-900);
}
.enc-hero-figure{
  margin:0;
  /* The drawing sits beside the headline, so it must not outgrow it.
     Both numbers are caps, not fixed sizes: on a narrow screen the
     figure shrinks with the column instead of overflowing. */
  /* The drawing is close to square, so it can take the full width of
     its column and still sit beside a tall block of text. The cap only
     stops it growing absurdly on very wide screens. */
  max-width:520px;
  margin-inline:auto;
}
.enc-hero-figure .enc-svg{width:100%;height:auto}
.enc-hero-figure figcaption{
  font-size:.85rem;color:var(--muted);line-height:1.5;
  margin-top:10px;text-align:center;
}
@media (max-width:900px){
  /* The page cannot add a class to the hero, because layout.html writes
   that markup. So the rules key off the drawing being present, the same
   trick the contents column uses. Any page that puts .enc-hero-svg in
   its hero gets the statement treatment automatically. */
.enc-hero__inner:has(.enc-hero-svg) h1.enc-title{max-width:none}
}

/* The "at a glance" list, moved out of the hero and into the
   abstract. Same data, less competition for attention. */
.enc-glance{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:1px;background:var(--line);border:1px solid var(--line);
  border-radius:var(--radius);overflow:hidden;margin:26px 0 0;
}
.enc-glance div{background:var(--surface);padding:14px 18px}
.enc-glance dt{
  font-family:var(--font-display);font-size:.7rem;font-weight:700;
  letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin-bottom:4px;
}
.enc-glance dd{margin:0;font-size:.94rem;color:var(--teal-900);font-weight:600}


/* ---------- Variant D: the assembling compartment ----------
   The animation plays once and stops on the finished shell: a hero
   that loops forever pulls the eye away from the text next to it.
   All the keyframes live inside the SVG so the drawing stays
   self-contained and can be moved or deleted in one piece.
   Anyone who has asked their system to reduce motion sees the
   finished compartment straight away instead. */
.enc-asm-cap{
  font-family:var(--font-display);font-size:19px;font-weight:700;
  fill:var(--teal-900);
}


/* The hero columns were tuned for a text card, not a drawing. A drawing
   needs less width and more breathing room beside the sentence. */
/* human-practices.html puts its quick navigation in the hero aside with
   the class .enc-quicknav, which was not on the list either, so that
   hero was stacking as well. Same one-line fix. */
.enc-hero__inner:has(.enc-quicknav){grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)}
@media (max-width:900px){
  .enc-hero__inner:has(.enc-quicknav){grid-template-columns:1fr}
}

.enc-hero__inner:has(.enc-hero-figure){
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:48px;align-items:center;
}
@media (max-width:900px){
  .enc-hero__inner:has(.enc-hero-figure){grid-template-columns:1fr}
  .enc-hero-figure{max-width:400px}
}


/* ---------- Figures inside a card ----------
   Left at full width the square drawings were taller than the text
   they illustrate, which made the page read as a picture book with
   captions. These caps bring them back into proportion. */
.enc-card .enc-figure .enc-svg{max-width:330px;margin-inline:auto}
.enc-card .enc-figure__key{max-width:240px}
.enc-card .enc-figure__key .enc-svg{max-width:100%}

/* When the card is wide the drawing can afford a little more room. */
@container (min-width:620px){
  .enc-card .enc-figure .enc-svg{max-width:380px}
}

/* Cards in a pair keep the same height, so the two applications line
   up instead of one hanging below the other. */
.enc-grid{align-items:stretch}
.enc-card{display:flex;flex-direction:column}
.enc-card__meta{margin-top:auto}


/* ============================================================
   THE "AT A GLANCE" STRIP, DARK VARIANT
   A white strip between two white areas is invisible, and this one
   carries the whole project in four lines. Putting it on a dark band
   gives the page a rhythm: pale hero, dark strip, white content.
   Contrast was measured, not guessed - white text on #1F342E is
   13.2 : 1 and the gold icons are 6.2 : 1, both well past the bar.
   ============================================================ */
.enc-facts--dark{background:var(--teal-900);border-bottom:0}
.enc-facts--dark .enc-facts__inner{
  max-width:var(--wrap);margin:0 auto;
  display:grid;grid-template-columns:190px repeat(4,minmax(0,1fr));
}

/* The label fills the space that used to sit empty on the left. */
.enc-facts--dark .enc-facts__label{
  padding:22px 20px 22px 24px;display:flex;flex-direction:column;justify-content:center;
}
.enc-facts--dark .enc-facts__brand{
  font-family:var(--font-display);font-weight:800;font-size:1.65rem;
  letter-spacing:.06em;color:var(--teal-100);margin:0;
}
.enc-facts--dark .enc-facts__sub{
  font-family:var(--font-display);font-size:.8rem;font-weight:700;
  letter-spacing:.14em;text-transform:uppercase;color:var(--teal-500);margin:4px 0 0;
}

.enc-facts--dark .enc-fact{
  padding:22px 20px;border-left:1px solid rgba(190,234,226,.18);
  display:flex;flex-direction:column;gap:10px;
}
/* Two lines per cell: the module name, then what it lets you do.
   The name is what links this strip to the cards further down. */
.enc-facts--dark .enc-fact__name{
  font-family:var(--font-display);font-weight:700;font-size:1.2rem;
  color:#fff;margin:0;line-height:1.25;
}
.enc-facts--dark .enc-fact__what{
  font-size:.88rem;line-height:1.45;color:var(--teal-100);margin:4px 0 0;
}
.enc-fact__icon{width:44px;height:44px;flex:none;display:block}

@media (max-width:960px){
  .enc-facts--dark .enc-facts__inner{grid-template-columns:repeat(2,1fr)}
  .enc-facts--dark .enc-facts__label{
    grid-column:1/-1;border-bottom:1px solid rgba(190,234,226,.18);
    flex-direction:row;align-items:baseline;gap:12px;padding-bottom:14px;
  }
  .enc-facts--dark .enc-facts__sub{margin:0}
  .enc-facts--dark .enc-fact:nth-child(2),
  .enc-facts--dark .enc-fact:nth-child(4){border-left:0}
  .enc-facts--dark .enc-fact:nth-child(n+4){border-top:1px solid rgba(190,234,226,.18)}
}
@media (max-width:560px){
  .enc-facts--dark .enc-facts__inner{grid-template-columns:1fr}
  .enc-facts--dark .enc-fact{border-left:0;border-top:1px solid rgba(190,234,226,.18)}
}


/* ---------- Each cell is a link down to its section ----------
   The strip is the first thing most visitors read, so the four parts
   should also be the four ways into the page. Making the whole cell
   clickable rather than just the name gives a much larger target,
   which matters on a phone. */
a.enc-fact{text-decoration:none;transition:background .18s}
a.enc-fact:hover{background:rgba(190,234,226,.07)}
a.enc-fact:focus-visible{outline:3px solid var(--gold);outline-offset:-3px}

/* The arrow marks the line as a destination, and nudges right on hover
   so the cell feels like something you can follow. */
.enc-facts--dark .enc-fact__what::before{
  content:"\2192";           /* → */
  color:var(--gold);font-weight:700;
  margin-right:8px;display:inline-block;
  transition:transform .18s;
}
a.enc-fact:hover .enc-fact__what::before{transform:translateX(3px)}
@media (prefers-reduced-motion:reduce){
  a.enc-fact,.enc-facts--dark .enc-fact__what::before{transition:none}
}


/* ============================================================
   HARDWARE PAGE
   The page is built around the engineering cycle, so the layout
   repeats it: one band per version, four phases across.
   ============================================================ */

/* ---------- The cycle wheel ---------- */
.hw-wheel{max-width:340px;margin-inline:auto;display:block}
.hw-ph{font-family:var(--font-display);font-size:13px;font-weight:700;letter-spacing:.09em}
.hw-rd{font-family:var(--font-mono);font-size:11px;fill:var(--teal-500)}

/* ---------- Problem chains ----------
   The summary at the top: one row per problem, with every attempt
   in order. A reader who only looks at this still gets the story. */
.hw-chains{display:grid;gap:14px;margin:26px 0 0;max-width:68ch}
.hw-chain{
  display:grid;grid-template-columns:54px minmax(0,1fr);gap:16px;
  align-items:start;padding:16px 18px;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
}
.hw-ico{width:54px;height:54px;display:block}
.hw-chain__name{
  font-family:var(--font-display);font-weight:700;font-size:1.02rem;
  color:var(--teal-900);margin:0 0 10px;
}
.hw-steps{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0}
.hw-step{
  font-size:.85rem;padding:5px 11px;border-radius:7px;
  background:var(--teal-050);color:var(--muted);
}
.hw-step--fail{background:#FBE6E2;color:#8C2A20}
.hw-step--pass{background:#DFF3EC;color:#12564A;font-weight:600}
.hw-arrow{color:var(--muted);font-size:.9rem}

/* ---------- One band per cycle ----------
   Four phases across, so the shape of the cycle is visible before
   a single word is read. The test cell carries the result marker. */
.hw-cycle{
  display:grid;grid-template-columns:104px minmax(0,1fr);gap:18px;
  align-items:start;margin:0 0 18px;
}
.hw-cycle__tag{
  background:var(--teal-900);color:#fff;border-radius:var(--radius);
  padding:18px 14px;text-align:center;
}
.hw-cycle__n{
  font-family:var(--font-display);font-weight:800;font-size:1.5rem;
  line-height:1;margin:0;
}
.hw-cycle__q{
  font-size:.74rem;line-height:1.35;color:var(--teal-100);margin:8px 0 0;
}
.hw-phases{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.hw-phase{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:14px 15px;
}
.hw-phase__label{
  font-family:var(--font-display);font-size:.68rem;font-weight:700;
  letter-spacing:.13em;text-transform:uppercase;color:var(--teal-700);
  margin:0 0 8px;display:flex;align-items:center;gap:8px;
}
.hw-mark{width:22px;height:22px;flex:none}
.hw-phase p{font-size:.86rem;line-height:1.5;color:var(--ink);margin:0 0 8px}
.hw-phase p:last-child{margin-bottom:0}
.hw-phase--fail{border-color:#E9BDB5;background:#FEF7F5}
.hw-phase--pass{border-color:#A9DCCC;background:#F4FBF9}
.hw-phase--part{border-color:#F2D4A0;background:#FFFBF4}

@media (max-width:1000px){
  .hw-phases{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:700px){
  .hw-cycle{grid-template-columns:1fr;gap:12px}
  .hw-cycle__tag{display:flex;align-items:baseline;gap:12px;text-align:left}
  .hw-cycle__q{margin:0}
  .hw-phases{grid-template-columns:1fr}
}

/* ---------- The abandoned design path ----------
   Deliberately styled apart from the cycles. It is not a step on the
   way to V4, it is a branch that was cut, and it deserves to be
   visible rather than buried. */
.hw-dead{
  border:2px dashed #D9B3AC;border-radius:var(--radius);
  background:#FEF7F5;padding:26px 28px;margin:26px 0 0;
}
.hw-dead__label{
  font-family:var(--font-display);font-size:.72rem;font-weight:700;
  letter-spacing:.14em;text-transform:uppercase;color:#8C2A20;margin:0 0 8px;
}

/* ---------- Checklist of files still to publish ---------- */
.hw-todo{list-style:none;padding:0;margin:14px 0 0;max-width:68ch}
.hw-todo li{
  position:relative;padding:7px 0 7px 30px;font-size:.92rem;
  color:var(--muted);border-bottom:1px solid var(--line);
}
.hw-todo li::before{
  content:"";position:absolute;left:0;top:10px;width:15px;height:15px;
  border:2px solid var(--line);border-radius:4px;
}
.hw-todo li:last-child{border-bottom:0}
/* ---------- Content pages (Inclusivity, Contribution, Teambuilding) ---------- */

/* Text with a picture next to it (e.g. the Team KIT cover);
   on phones the picture moves below the text. */
.enc-feature{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:28px;align-items:start;margin:0 0 18px}
.enc-feature__img{width:100%;height:auto;border:1px solid var(--line);border-radius:6px;box-shadow:var(--shadow)}
/* Wider image column for landscape images */
.enc-feature--wide{grid-template-columns:minmax(0,1fr) 360px}
@media (max-width:640px){
  .enc-feature{grid-template-columns:minmax(0,1fr)}
  .enc-feature__img{max-width:220px}
  .enc-feature--wide .enc-feature__img{max-width:360px}
}

/* Photos and charts inside a figure fill the text column (scoped to
   pages with the .enc-main__body wrapper, so Software keeps its look). */
.enc-main__body .enc-figure > img{width:100%;height:auto;display:block;border-radius:6px}
/* Small images (e.g. screenshots) are never stretched beyond their own width. */
.enc-main__body .enc-figure--native > img{width:auto;max-width:100%}

/* Photo grid: two photos per row, one on phones. */
.enc-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:30px 0}
.enc-gallery .enc-figure{margin:0}
.enc-gallery img{aspect-ratio:3/2;object-fit:cover}
@media (max-width:640px){.enc-gallery{grid-template-columns:minmax(0,1fr)}}

/* Content the team still has to deliver. Remove once filled. */
.enc-todo{border:2px dashed var(--gold);border-radius:var(--radius);padding:14px 18px;margin:18px 0;color:var(--muted);font-size:.92rem}
.enc-todo b{color:var(--teal-900)}

/* ---------- Figure viewer (lightbox) ----------
   On the Wet Lab pages (layout.html marks them with <body data-figure-zoom>)
   wiki.js (part 6) makes every image inside a <figure class="enc-figure">
   clickable and opens it here, large, with zoom and panning. A figure
   that should not react gets class "no-zoom".

   The viewer is appended to <body>, so it sits outside .enc-main and
   none of the dark-mode rules for page images reach it. It brings its
   own light plate for the image instead - the figures are diagrams on
   white, which stay readable that way in both themes. */
[data-figure-zoom] .enc-figure img{cursor:zoom-in}
[data-figure-zoom] .enc-figure.no-zoom img{cursor:auto}

.enc-lb{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center}
.enc-lb[hidden]{display:none}
.enc-lb__backdrop{position:absolute;inset:0;background:rgba(8,28,24,.9)}

/* The stage clips the image while it is zoomed in and panned around. */
.enc-lb__stage{
  position:relative;width:100%;height:100%;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  touch-action:none;                /* we handle drag and pinch ourselves */
}
.enc-lb__img{
  max-width:94vw;max-height:84vh;width:auto;height:auto;display:block;
  background:#FCFCFB;border-radius:8px;
  transform-origin:center center;
  transition:transform .12s ease-out;
  will-change:transform;
}
.enc-lb.is-grabbing .enc-lb__img{transition:none;cursor:grabbing}
.enc-lb.is-zoomed  .enc-lb__img{cursor:grab}

/* Toolbar */
.enc-lb__bar{
  position:absolute;top:16px;right:16px;display:flex;align-items:center;gap:6px;
  background:var(--surface);border:1px solid var(--line);border-radius:999px;
  padding:6px;box-shadow:0 6px 24px rgba(0,0,0,.25);
}
.enc-lb__bar button{
  width:36px;height:36px;border:0;border-radius:50%;background:transparent;
  color:var(--teal-900);font-family:var(--font-display);font-size:1.05rem;font-weight:700;
  cursor:pointer;display:flex;align-items:center;justify-content:center;
  transition:background .15s;
}
.enc-lb__bar button:hover{background:var(--teal-050)}
.enc-lb__bar button[disabled]{opacity:.35;cursor:default;background:transparent}
.enc-lb__bar button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.enc-lb__pct{
  min-width:52px;text-align:center;font-family:var(--font-mono);font-size:.8rem;
  color:var(--muted);user-select:none;
}
.enc-lb__sep{width:1px;height:22px;background:var(--line)}

/* Caption under the image - the figure's own caption, shortened */
.enc-lb__cap{
  position:absolute;left:50%;bottom:18px;transform:translateX(-50%);
  max-width:min(900px,92vw);margin:0;padding:10px 16px;
  background:var(--surface);border:1px solid var(--line);border-radius:10px;
  font-size:.84rem;line-height:1.5;color:var(--muted);text-align:center;
}
.enc-lb__cap b{color:var(--teal-900)}
.enc-lb__cap:empty{display:none}

/* The hint is for the mouse; it would only be in the way on a phone. */
@media (max-width:700px){
  .enc-lb__cap{display:none}
  .enc-lb__bar{top:auto;bottom:16px;right:50%;transform:translateX(50%)}
  .enc-lb__img{max-height:78vh}
}

/* Someone who turned animations off should not be moved around. */
@media (prefers-reduced-motion:reduce){
  .enc-lb__img{transition:none}
}

/* ============================================================
   DARK MODE
   Switched on with the half sun / half moon in the menu bar
   (wiki.js part 5), which sets data-theme="dark" on <html>.

   Most of the wiki takes its colours from the variables at the top
   of this file, so dark mode mainly gives those variables new values.
   Text stays light on dark and keeps a high contrast (measured against
   --page #111A18):
     --ink       #E4ECE9   14.7 : 1  body text
     --teal-900  #F0F6F4   16.2 : 1  headings
     --muted     #A9B9B4    8.7 : 1  secondary text
     --teal-700  #5CD0BD    9.5 : 1  links
   (on the card colour --surface #18231F all of them are still above 7.5)
   Some places use these variables as a BACKGROUND with white text on
   top (dark strips, teal buttons). They would turn light here, so they
   are pinned to their light-mode colours further down.

   Pictures (from static.igem.wiki) are never changed - no filters, no
   recolouring. They simply look as in light mode and therefore stand
   out brighter. Pictures with a transparent background get the light
   page colour behind them, exactly what they sit on in light mode, so
   their dark lines and labels stay visible. The drawings coded into
   the pages (.enc-svg) keep the light palette for the same reason.
   ============================================================ */
html[data-theme="dark"]{
  color-scheme:dark;
  --page:#111A18;
  --surface:#18231F;
  --line:#2D3E3A;
  --ink:#E4ECE9;
  --text:#DCE5E2;
  --note-text:#F2D49A;
  --teal-900:#F0F6F4;
  --muted:#A9B9B4;
  --teal-700:#5CD0BD;
  --teal-100:#24433C;
  --teal-050:#1A2724;
  --gold-050:#2C2416;
  --lime-050:#1F2716;
  --purple-050:#271D2D;
  --blue-050:#14242E;
  --shadow:0 1px 2px rgba(0,0,0,.35),0 12px 32px -18px rgba(0,0,0,.8);
}
html[data-theme="dark"] .enc-nav{background:rgba(17,26,24,.92)}
html[data-theme="dark"]::-webkit-scrollbar-thumb{background:#3A4D48}
html[data-theme="dark"]::-webkit-scrollbar-thumb:hover{background:#557069}

/* Variables used as backgrounds under white text: keep them dark */
html[data-theme="dark"] .enc-nav__cta{background:#1C8070}
html[data-theme="dark"] .enc-nav__cta:hover{background:#156656}
html[data-theme="dark"] .enc-panel--primary{background:#1F342E;border-color:#2D4A42;color:#BEEAE2}
html[data-theme="dark"] .enc-facts--dark{background:#0B1311}
html[data-theme="dark"] .enc-facts--dark .enc-facts__brand,
html[data-theme="dark"] .enc-facts--dark .enc-fact__what{color:#BEEAE2}
html[data-theme="dark"] .enc-skip,html[data-theme="dark"] .hw-cycle__tag{background:#1F342E}

/* Pictures: unchanged, on the light page colour (only visible where
   a picture is transparent). Drawings: light palette and light page. */
html[data-theme="dark"] .enc-main img,
html[data-theme="dark"] .enc-foot img{background-color:#FCFCFB}
html[data-theme="dark"] .enc-svg{
  --teal-900:#1F342E;--ink:#17211F;--muted:#4A5754;--teal-700:#1C8070;
  --teal-100:#BEEAE2;--teal-050:#F0F5F3;--line:#DDE9E5;--surface:#fff;
  --shell-line:#1C8070;--shell-fill:#BEEAE2;--cargo:#2BBFA6;--cell-fill:#FFFFFF;
  background-color:#FCFCFB;border-radius:var(--radius);
}

/* Logos in dark mode (unchanged pictures, on white like in light mode):
   - the sponsor strip sits on one white area, so the logos show no
     light squares of their own
   - KIT logo, LinkedIn and Instagram sit on one white strip; the icons
     keep their light-mode teal there
   - the ENCORE mark in the menu bar keeps no backing at all: its teal
     reads on the dark bar, and a white circle would sit on it like a
     sticker */
html[data-theme="dark"] .enc-sponsors{background:#fff;border-radius:var(--radius);padding:24px 8px}
html[data-theme="dark"] .enc-foot .enc-sponsors img{background:transparent}
html[data-theme="dark"] .enc-foot .enc-foot__social{
  --teal-700:#1C8070;--teal-900:#1F342E;
  background:#fff;border-radius:12px;padding:10px 14px;
}
html[data-theme="dark"] .enc-foot__kit img{background:transparent}
/* board game: board, title and figures are cut out already, so no
   backing behind them */
html[data-theme="dark"] .enc-main .bgk-board img,
html[data-theme="dark"] .enc-main .bgk-title img,
html[data-theme="dark"] .enc-main .bgk-dl__thumb,
html[data-theme="dark"] .enc-main .bgk-dl__thumb img{background:transparent}
html[data-theme="dark"] .enc-brand__mark{background:transparent}
/* icons and symbols: transparent pictures with their own coloured disc
   (Contribution timeline and headings, project symbols on the Methods,
   Protocols & Notebooks pages), so no light backing behind them */
html[data-theme="dark"] .enc-main img.ctr-tl__icon,
html[data-theme="dark"] .enc-main img.ctr-hicon__icon,
html[data-theme="dark"] .enc-main .wl-node img,
html[data-theme="dark"] .enc-main .nb-tree__node img{background:transparent}

/* ---------- Reveal on scroll ----------
   class="reveal" on any element: it fades in and rises 18px the first
   time it scrolls into view; inside a .reveal-group the .reveal elements
   follow one another 70ms apart. Visible by default - these rules only
   hide anything once wiki.js (part 8) has set .reveal-ready on <html>,
   which it skips for reduced motion. */
.reveal-ready .reveal{
  transition:opacity .5s ease-out,transform .5s ease-out;
  transition-delay:var(--reveal-delay,0ms);
}
.reveal-ready .reveal:not(.is-revealed){opacity:0;transform:translateY(18px)}
@media print{.reveal-ready .reveal:not(.is-revealed){opacity:1;transform:none}}