/* ============================================================
   Human Practices page — TAU-Israel iGEM 2026 wiki
   ------------------------------------------------------------
   Loaded only by wiki/pages/human-practices.html (extra_head).

   Track colors follow the Experiments page's case lines, so a
   reader who has seen one page can read the other:
     endo     → blue    (PoC I · Endometriosis)
     pfas     → green   (PoC II · PFAS biosensor)
     platform → violet  (the CERNAL engine itself)
     shared   → kraft   (education & community, across tracks)
   A track color is a bar, a bracket or a kicker; a box on a track
   also gets the track's pale "-soft" wash behind it, as every
   .bd-callout does.
   ============================================================ */

[data-track="endo"]     { --hp-accent: var(--pipe-blue-deep); --hp-soft: var(--pipe-blue-soft); }
[data-track="pfas"]     { --hp-accent: var(--gate-green-deep); --hp-soft: var(--acc-green-soft); }
[data-track="platform"] { --hp-accent: var(--acc-violet);      --hp-soft: var(--acc-violet-soft); }
[data-track="shared"]   { --hp-accent: var(--acc-kraft);       --hp-soft: var(--acc-kraft-soft); }
[data-track="advisors"] { --hp-accent: var(--acc-gold);        --hp-soft: var(--acc-gold-soft); }

/* Every bracketed box on this page is the site's own .bd-callout, so a
   track only has to hand the callout its accent and soft tone - the corner
   brackets, background wash, border, radius and shadow all come from
   style.css unchanged. */
[data-track] {
  --callout-accent: var(--hp-accent);
  --callout-fg: var(--hp-accent);
  --callout-soft: var(--hp-soft);
}

/* Small mono label used for kickers, dates and sector tags. */
.hp-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hp-accent, var(--ink-3));
  margin-bottom: 0.35rem;
}

/* ------------------------------------------------------------
   Consent note + team statement
   ------------------------------------------------------------ */
.hp-consent {
  font-size: 0.875rem;
  color: var(--ink-3);
  font-style: italic;
}

/* The consent callouts carry only the bold sentence, so the shared
   automatic kicker ("// METHOD") is switched off. With no ::before box
   the label's bottom margin goes with it and no gap is left. */
.bd-callout.bd-callout-teal.hp-consent-callout:not(:has(h4))::before {
  content: none;
}

.hp-statement {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  border-left: var(--border-w-bold) solid var(--ink);
  background: var(--paper-sink);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

/* ------------------------------------------------------------
   The two PoC cards
   ------------------------------------------------------------ */
/* The two PoC cards. Each is a .bd-callout in the markup, so it only
   needs to fill its grid cell and keep its title looking like a title
   rather than being turned into a kicker by the callout's own h4 rule. */
.hp-card {
  height: 100%;
  margin: 0;
}

.hp-card > h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.hp-card p:last-child,
.hp-card ul:last-child {
  margin-bottom: 0;
}

.hp-card ul {
  font-size: 0.95rem;
}

.hp-card ul > li::marker {
  color: var(--hp-accent);
}

/* ------------------------------------------------------------
   Values: one callout, four quadrants
   ------------------------------------------------------------
   One statement, so one callout. Inside it the four values sit in
   the shared .quad grid (style.css); the tracks are carried by the
   numbered kickers.
   ------------------------------------------------------------ */
.hp-values {
  padding: 1.25rem 1.4rem 1.1rem;
}

.hp-values__item > h5 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.hp-values__item > ul {
  margin-bottom: 0;
}

/* The only color in the block: each section's bullets and its kicker
   carry that track's accent, so the four values stay legible as
   platform / clinical / environmental / shared without four frames. */
.hp-values__item ul > li::marker {
  color: var(--hp-accent);
}

.hp-values__item ul > li:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------
   Photos
   ------------------------------------------------------------ */
/* The uploads are modest (250-480px tall), so an image is never
   stretched past its own pixel size: width/height on the <img> reserve
   the right box before it loads, and width:auto keeps it sharp. */
.hp-photo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-sticker);
}

.hp-figure {
  margin: 1.25rem 0 1.5rem;
}

/* Narrow portrait figure set beside the text; stacks and centers on phones. */
.hp-figure--aside {
  max-width: 280px;
  margin: 0 auto 1.25rem;
}

.hp-figure--aside .hp-figure {
  margin: 0;
}

.hp-figure--aside img {
  width: 100%;
  height: auto;
}

@media (min-width: 768px) {
  .hp-figure--aside {
    float: right;
    width: 260px;
    margin: 0.25rem 0 1rem 1.5rem;
  }
}

.hp-figure figcaption {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-3);
}

/* A slot whose photo has not been uploaded yet: a dashed frame holding
   the right box, so the gap is visible instead of silently missing. */
.hp-ph__frame {
  aspect-ratio: var(--ar, 16 / 9);
  max-height: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem;
  text-align: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(26, 26, 26, 0.035) 14px 28px),
    var(--paper-sink);
  border: var(--border-w) dashed var(--ink-3);
  border-radius: var(--radius-lg);
}

.hp-ph__label {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink-2);
}

.hp-ph__src {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-3);
}

/* Several photos side by side (galleries). */
.hp-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
}

.hp-gallery .hp-figure {
  margin: 0;
}

/* Charts carry small text: wider minimum column so they stay readable. */
.hp-gallery--charts {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

/* ------------------------------------------------------------
   "Who we talked to" map
   ------------------------------------------------------------ */
.hp-map {
  margin: 1.5rem 0 2rem;
}

/* Only the column title is a callout: brackets mark the three tracks
   and nothing else, so the names below stay plain cards. */
.hp-map__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /* Brackets sit 9px outside the head callouts, so the gutter clears
     two of them plus air. */
  gap: 2rem;
}

/* NOTE for anything nested: .bd-callout sets --callout-accent on the
   element itself, so a callout INSIDE a [data-track] container does not
   inherit the track - a declaration on the element always beats an
   inherited value. Any nested callout that should take the track color
   has to restate ALL THREE variables, as this one does: accent and fg
   color the brackets and kicker, soft colors the background wash.
   Miss one and the box is half one track and half the default blue.
   (The cards that carry data-track on themselves are fine: same
   specificity, and this file is loaded after style.css.) */
.hp-map__head {
  --callout-accent: var(--hp-accent);
  --callout-fg: var(--hp-accent);
  --callout-soft: var(--hp-soft);
  margin: 0 0 1.75rem;
  padding: 0.85rem 0.9rem 0.8rem;
  text-align: center;
}

.hp-map__head-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.hp-map__head-sub {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--ink-3);
}

/* Sector groups need real air between them - they are the second level
   of grouping inside a column. */
.hp-map__group + .hp-map__group {
  margin-top: 2.25rem;
}

.hp-map__group > .hp-kicker {
  padding-bottom: 0.35rem;
  border-bottom: var(--border-w) solid var(--hp-accent);
  margin-bottom: 0.75rem;
}

/* Each person or event is a link to its full card further down. */
a.hp-node {
  display: block;
  margin-bottom: 0.5rem;
  padding: 0.55rem 0.7rem;
  background: var(--card);
  border: 1px solid var(--paper-edge);
  border-left: 3px solid var(--hp-accent);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.8rem;
  line-height: 1.35;
  transition: transform var(--dur-fast) var(--ease-standard),
              box-shadow var(--dur-fast) var(--ease-standard);
}

a.hp-node:hover,
a.hp-node:focus-visible {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-sticker-sm);
  border-color: var(--ink);
  border-left-color: var(--hp-accent);
}

.hp-node > strong {
  display: block;
  font-size: 0.9rem;
  color: var(--ink);
}

.hp-node > em {
  display: block;
  margin-top: 0.2rem;
  font-style: normal;
  font-weight: 700;
  color: var(--hp-accent);
}

.hp-map__shared {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: var(--border-w) solid var(--ink);
}

.hp-map__shared > .hp-kicker {
  margin-bottom: 0.75rem;
}

.hp-map__shared-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
}

.hp-map__shared-grid > .hp-node {
  margin-bottom: 0;
}

.hp-map__shared-note {
  margin: 0.9rem 0 0;
  font-size: 0.875rem;
}

/* ------------------------------------------------------------
   Timeline: how HP changed CERNAL
   ------------------------------------------------------------ */
.hp-timeline {
  list-style: none;
  margin: 1.5rem 0 2rem;
  padding: 0 !important;
  position: relative;
}

.hp-timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 7rem;
  width: var(--border-w);
  background: var(--ink);
}

.hp-timeline > li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0 1.5rem;
  position: relative;
  margin-bottom: 1rem;
}

.hp-timeline > li::marker {
  content: none;
}

/* The dot on the rail, coloured by track. */
.hp-timeline > li::before {
  content: "";
  position: absolute;
  left: calc(7rem - 6px);
  top: 0.45rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--hp-accent);
  border: var(--border-w) solid var(--ink);
}

.hp-timeline__date {
  padding-right: 1rem;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink-2);
  padding-top: 0.35rem;
}

.hp-timeline__body {
  background: var(--card);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.9rem;
}

.hp-timeline__body strong {
  display: block;
  color: var(--ink);
  line-height: 1.35;
}

.hp-timeline__body p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.hp-timeline__body a {
  font-size: 0.8rem;
  font-weight: 700;
}

/* The kind of change: pivot / design change / confirmed. */
.hp-tag {
  display: inline-block;
  margin-bottom: 0.3rem;
  padding: 0.05rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--hp-accent);
  border-radius: var(--radius-pill);
  color: var(--hp-accent);
  background: var(--hp-soft);
}

/* ------------------------------------------------------------
   Meeting cards
   ------------------------------------------------------------ */
/* A meeting card is a .bd-callout in the markup, so its frame, corner
   brackets and shadow are the site's, tinted by the track. Only the
   size and the heading need adjusting: a callout's h4 is normally the
   little mono kicker, and here it is the person's name. */
.hp-meet {
  padding: 1.15rem 1.35rem;
  scroll-margin-top: 80px;
}

/* Brackets sit 9px outside the box, so consecutive cards need more than
   the usual callout gap. */
.hp-meet + .hp-meet,
.hp-meet + .bd-callout,
.bd-callout + .hp-meet {
  margin-top: 2.25rem;
}

/* Arriving from the map or the timeline: ring the card once. */
.hp-meet:target {
  box-shadow: 0 0 0 4px var(--hp-soft), var(--shadow-sm);
}

.hp-meet .hp-meet__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
  margin: 0;
}

.hp-meet .hp-meet__role {
  margin: 0.2rem 0 0.75rem;
  color: var(--ink-3);
  font-size: 0.9rem;
}

.hp-meet__context {
  font-size: 0.95rem;
}

/* A nested callout (a Work-In-Progress note inside a card) keeps the
   yellow it asked for rather than inheriting the track's accent. */
.hp-meet .bd-callout-yellow {
  --callout-accent: var(--rna-amber-deep);
  --callout-fg: var(--rna-amber-deep);
  --callout-soft: var(--rna-amber-soft);
}

/* The loop is the point of the card, so it is always open. */
/* White, not the track's soft tone: the card around it already carries
   that wash, so a soft-on-soft box would vanish into it. */
.hp-loop {
  margin: 1rem 0 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--card);
  border-radius: var(--radius-md);
}

.hp-loop .hp-kicker {
  color: var(--ink);
}

.hp-loop ul {
  margin-bottom: 0;
}

.hp-loop ul > li::marker {
  color: var(--ink);
}

.hp-loop li:last-child {
  margin-bottom: 0;
}

/* "Read more": every callout shows its title and opens into the full
   text. The pill itself is the shared .pill-btn (style.css); here it
   takes the track color and its place in the callout. Label and arrow
   swap with aria-expanded, which Bootstrap's collapse keeps in step. */
.hp-more {
  --pill-accent: var(--hp-accent, var(--pipe-blue-deep));
  --pill-soft: var(--hp-soft, var(--pipe-blue-soft));
  align-self: flex-start;
  margin-top: 0.75rem;
}

.hp-more::after {
  content: "\2192";
  font-family: var(--font-mono);
  font-weight: 700;
}

.hp-more[aria-expanded="true"]::after {
  content: "\2191";
}

.hp-more__close,
.hp-more[aria-expanded="true"] .hp-more__open {
  display: none;
}

.hp-more[aria-expanded="true"] .hp-more__close {
  display: inline;
}

/* Space between the button and what it opens. Padding, not margin, so
   the collapse animates its full height without a jump at the end. */
.hp-more__body > :first-child {
  margin-top: 0;
  padding-top: 1rem;
}

.hp-more__body > :last-child {
  margin-bottom: 0;
}

/* Map: the opened column starts a little further below its title. */
.hp-map__col > .hp-more__body > :first-child {
  padding-top: 0;
}

/* Values: one button opens all four lists. */
.hp-values > .hp-more {
  margin-top: 1.1rem;
}

.hp-values__more > ul {
  margin: 0;
  padding-top: 0.5rem;
}

.hp-insights {
  margin-top: 0.5rem;
}

.hp-insights ul > li::marker {
  color: var(--hp-accent);
}

/* Nested bullet lists in the insights (e.g. toehold parameters). */
.hp-insights ul ul {
  margin-top: 0.35rem;
  font-size: 0.925rem;
}

/* ------------------------------------------------------------
   IsraGEM funnel
   ------------------------------------------------------------ */
.hp-funnel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 0 !important;
  list-style: none;
}

.hp-funnel li {
  margin: 0;
  padding: 1rem 0.75rem;
  text-align: center;
  background: var(--card);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sticker-sm);
}

.hp-funnel li::marker {
  content: none;
}

.hp-funnel > li > strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--ink);
}

.hp-funnel > li > span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--ink-2);
}

/* Arrows between the stages on wide screens. */
@media (min-width: 576px) {
  .hp-funnel li {
    position: relative;
  }

  .hp-funnel li + li::before {
    content: "→";
    position: absolute;
    left: -0.7rem;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--ink);
  }
}

/* ------------------------------------------------------------
   Small screens
   ------------------------------------------------------------ */
@media (max-width: 767.98px) {
  .hp-map__cols {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hp-timeline::before {
    left: 6px;
  }

  .hp-timeline > li {
    grid-template-columns: 1fr;
    padding-left: 1.75rem;
  }

  .hp-timeline > li::before {
    left: 0;
  }

  .hp-timeline__date {
    text-align: left;
    padding: 0 0 0.3rem;
  }

  .hp-meet {
    padding: 1rem 1.1rem;
  }
}

@media (max-width: 575.98px) {
  .hp-funnel {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  a.hp-node {
    transition: none;
  }
}

/* ------------------------------------------------------------
   Robot illustrations
   A decorative figure sits to the right of a section heading; on
   narrow screens it drops below the heading and stays centred.
   ------------------------------------------------------------ */
.hp-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.hp-sec-head > :is(h2, h3) { flex: 1; min-width: 0; }

.hp-robot {
  flex: 0 1 auto;
  margin: 0;
  max-width: 40%;
}

.hp-robot img {
  display: block;
  max-width: 100%;
  height: auto;
}

@media (max-width: 575.98px) {
  .hp-sec-head { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .hp-robot { align-self: center; max-width: 70%; }
}

/* Illustration between the "Who We Talked To" intro and the map. */
.hp-map-figure {
  margin: 2rem auto;
  max-width: 80%;
}

.hp-map-figure img {
  width: 100%;
}

/* ------------------------------------------------------------
   Click-to-enlarge photos (static/lightbox.js, opt-in .js-zoomable)
   Neutral ink and white only; no accent color.
   ------------------------------------------------------------ */
.js-zoomable {
  cursor: zoom-in;
  position: relative;
}

.js-zoomable:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.lb-modal .modal-dialog.lb-dialog {
  width: fit-content;
  max-width: calc(100vw - 2rem);
}

.lb-modal .lb-content {
  position: relative;
  align-items: center;
  background: transparent;
  border: 0;
}

.lb-img {
  display: block;
  width: auto;
  height: auto;
  max-height: calc(100vh - 8rem);
  border-radius: var(--radius-md);
  background: var(--card);
}

.lb-caption {
  margin: 0.75rem 0 0;
  max-width: 60ch;
  text-align: center;
  font-size: 0.9rem;
  color: var(--card);
}

.lb-caption--hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lb-close {
  position: absolute;
  top: -2.25rem;
  right: 0;
}

/* Zoom hint on hover/focus: a small magnifier badge in ink and white. */
figure:has(> .js-zoomable) {
  position: relative;
}

figure:has(> .js-zoomable)::after {
  content: "Click to enlarge";
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--card);
  font-size: 0.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

figure:has(> .js-zoomable:hover)::after,
figure:has(> .js-zoomable:focus-visible)::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  figure:has(> .js-zoomable)::after {
    transition: none;
  }
  .lb-modal.fade .modal-dialog,
  .lb-modal.fade {
    transition: none;
  }
}

/* Inline links inside the judging answers */
.judging__a a.hp-alink { font-weight: 700; font-style: italic; }
