/* home/work.css: the work section of index.html ("The Work", the bento of eight
   domains). Owned by work. Builds on home/base.css (tokens, .h-btn, arrival).

   What it does
   - Eight tiles, each a door: the head of a tile is one link to its page.
   - The round control on a tile opens it in place (work.js). An open tile
     doubles its width and keeps its head exactly where it was; the new half
     holds a few facts from the page it links to and the way onward. Where a
     tile already fills the row (tablet wide tiles, every tile on a phone) the
     more opens below the head instead. The grid reflows around it.
   - Rows are equal height on desktop and tablet, so a tile that the reflow
     moves to another row keeps its size and only travels.

   MOTION RULE (same as base): every movement answers the visitor. The tiles
   carry no loops. The EKG trace and the investing line draw once when seen;
   the trace beats, the scales weigh and the bars speak once when you point at
   (or focus) their tile. Reduced motion: everything is simply there. */

/* ── SECTION ────────────────────────────────────────────────────────────── */
.work-bento-section {
  --h-work-gap: 1rem;
  padding: 5rem 5vw 7rem;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.work-bento-section__inner { max-width: var(--max-w); margin: 0 auto; }

.work-bento-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 1rem 2rem;
  margin-bottom: 3rem;
}
.work-bento-title {
  font-family: var(--display);
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 900;
  color: var(--ink); line-height: 0.9; letter-spacing: 0.01em;
}
/* Was --muted (2.9:1 on this grey). The caption of the title, so it sits on
   the baseline of "Work". */
.work-bento-sub {
  font-family: var(--sans); font-size: 1rem; font-weight: 500; line-height: 1.5;
  color: var(--text-2); letter-spacing: 0;
  padding-bottom: 0.35rem;
}

/* ── GRID ───────────────────────────────────────────────────────────────── */
.work-bento {
  position: relative;                 /* offsetParent for work.js */
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(190px, 1fr); /* equal rows: a moved tile keeps its size */
  grid-auto-flow: row dense;
  gap: var(--h-work-gap);
  overflow-anchor: none;              /* the reflow must never scroll the page */
}
.h-work-cell { position: relative; display: grid; min-width: 0; }
.h-work-cell--hero { grid-column: span 2; grid-row: span 2; }
.h-work-cell--wide { grid-column: span 2; }
.h-work-cell.h-work-z { z-index: 2; }
.h-work-cell.h-work-z2 { z-index: 3; }

/* ── TILE ───────────────────────────────────────────────────────────────── */
.bcard {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column;
  min-width: 0; overflow: hidden;
  background: #fff; color: var(--ink);
  border-radius: var(--h-r-box);
  box-shadow: var(--h-hairline), var(--h-shadow-1);
  transition:
    translate var(--h-t) var(--h-ease),
    box-shadow var(--h-t) var(--h-ease),
    scale var(--h-spring-dur) var(--h-spring);
}
@media (hover: hover) and (pointer: fine) {
  .bcard:not(.h-work-open):hover { translate: 0 -4px; box-shadow: var(--h-hairline-2), var(--h-shadow-2); }
}
.bcard:not(.h-work-open):has(.h-work-door:active) {
  scale: 0.985;
  transition-duration: var(--h-t), var(--h-t), var(--h-t-press);
  transition-timing-function: var(--h-ease), var(--h-ease), var(--h-ease-out);
}

/* Removed: the cursor spotlight (a teal glow that followed the pointer over
   every tile). Each tile now answers the pointer in its own terms, so a
   generic glow said nothing. Do not re-add. */

/* The head: everything the tile showed before. Its visual sits at the top,
   the words settle at the bottom. */
.h-work-head {
  position: relative; z-index: 1;
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  min-width: 0;
  padding: 1.8rem;
}

/* One link per tile, stretched over the whole head. */
.h-work-door { color: inherit; text-decoration: none; }
.h-work-door::after { content: ''; position: absolute; inset: 0; z-index: 2; }
.h-work-door:focus-visible { outline: none; }
.bcard:has(.h-work-door:focus-visible) { outline: 2px solid var(--h-focus); outline-offset: 3px; }

.bcard__title {
  font-family: var(--display); font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 700; color: var(--ink);
  letter-spacing: 0.01em; line-height: 1.05;
  margin-bottom: 0.55rem;
}
.bcard__desc {
  font-family: var(--sans); font-size: 0.86rem; line-height: 1.6;
  color: var(--text-2);
  padding-right: 1.4rem;
}
.bcard__tag {
  margin-top: 1rem; padding: 0.8rem 1.6rem 0 0;
  border-top: 1px solid var(--border);
  font-family: var(--sans); font-size: 0.76rem; font-weight: 500; line-height: 1.45;
  color: var(--text-2); letter-spacing: 0.01em;
}
.bcard__arrow {
  position: absolute; right: 1.5rem; bottom: 1.45rem; z-index: 1;
  font-size: 0; color: var(--muted);
  transition: color var(--h-t) var(--h-ease-out), translate var(--h-spring-dur) var(--h-spring);
}
.bcard__arrow::before { content: '\2197\FE0E'; font-size: 1rem; }
@media (hover: hover) and (pointer: fine) {
  .bcard:has(.h-work-door:hover) .bcard__arrow { color: var(--teal-2); translate: 3px -3px; }
}

.bcard__stat {
  font-family: var(--display); font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 900; line-height: 1; letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.h-work-head > .bcard__stat:first-child { margin-top: auto; }   /* a tile led by its number alone */
.bcard__stat sup { font-size: 0.46em; line-height: 0; vertical-align: super; color: var(--teal-2); }
.bcard__stat-label {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 600; line-height: 1.5;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 1.2rem;
}

.h-work-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ── THE OPEN CONTROL ───────────────────────────────────────────────────────
   Apple's "+": a 44px target around a 34px tonal circle. Open, it fills and
   the plus turns into a close (45 degrees, a small spring). */
.h-work-plus {
  position: absolute; top: 0.85rem; right: 0.85rem; z-index: 3;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: transparent; color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--h-t) var(--h-ease-out), scale var(--h-spring-dur) var(--h-spring);
}
.h-work-plus::before {
  content: ''; position: absolute; inset: 5px; border-radius: 50%;
  background: var(--h-tint-1);
  box-shadow: inset 0 0 0 1px rgba(11, 15, 46, 0.06);
  transition: background-color var(--h-t) var(--h-ease-out), box-shadow var(--h-t) var(--h-ease-out);
}
.h-work-plus__i { position: relative; width: 14px; height: 14px; transition: rotate var(--h-spring-dur) var(--h-spring); }
.h-work-plus__i::before,
.h-work-plus__i::after {
  content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 2px;
  border-radius: 2px; background: currentColor;
}
.h-work-plus__i::after { rotate: 90deg; }
.h-work-plus:focus-visible { outline: 2px solid var(--h-focus); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) {
  .h-work-plus:hover { color: #fff; }
  .h-work-plus:hover::before { background: var(--ink); box-shadow: 0 4px 12px -4px rgba(11, 15, 46, 0.5); }
}
.h-work-plus:active { scale: 0.9; transition-duration: var(--h-t), var(--h-t-press); transition-timing-function: var(--h-ease-out); }
.h-work-plus[aria-expanded="true"] { color: #fff; }
.h-work-plus[aria-expanded="true"]::before { background: var(--ink); }
.h-work-plus[aria-expanded="true"] .h-work-plus__i { rotate: 45deg; }

/* ── THE MORE ───────────────────────────────────────────────────────────── */
.h-work-detail {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  padding: 1.8rem 1.8rem 1.6rem 0.6rem;
}
.h-work-detail[hidden] { display: none; }
.h-work-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.h-work-facts li {
  font-family: var(--sans); font-size: 0.84rem; line-height: 1.45;
  color: var(--text-2);
  padding: 0.65rem 0;
  border-top: 1px solid var(--border);
}
.h-work-facts li:first-child { border-top: 0; padding-top: 0; }
.h-work-facts strong,
.h-work-lead,
.h-work-facts--list li {
  display: block;
  font-family: var(--display); font-size: 0.96rem; font-weight: 600; line-height: 1.3;
  color: var(--ink); letter-spacing: -0.005em;
}
.h-work-facts strong { margin-bottom: 0.12rem; }
.h-work-lead { margin-bottom: 0.65rem; }
.h-work-facts--list li { padding: 0.45rem 0; }
.h-work-facts--list li:first-child { padding-top: 0; }
.h-work-acts {
  margin-top: auto; padding-top: 1.1rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.25rem;
}
.h-work-acts .h-btn { max-width: 100%; white-space: normal; text-wrap: balance; padding-block: 0.55rem; }
.h-work-tel {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--display); font-size: 0.95rem; font-weight: 600;
  color: inherit; text-decoration: underline; text-underline-offset: 5px;
  text-decoration-thickness: 1px; text-decoration-color: rgba(255, 255, 255, 0.45);
  transition: text-decoration-color var(--h-t) var(--h-ease-out);
}
@media (hover: hover) and (pointer: fine) { .h-work-tel:hover { text-decoration-color: currentColor; } }

/* Open: side by side. The tile gains one column; the head keeps exactly the
   width and height it had (--h-work-hw, --h-work-hh, set by work.js) and the
   grid's own gap separates it from the more. The more never sizes the row
   (contain: size); work.js gives the tile another row if it needs one. */
.bcard.h-work-open {
  display: grid;
  grid-template-columns: var(--h-work-hw, 50%) minmax(0, 1fr);
  grid-template-rows: var(--h-work-hh, auto) minmax(0, 1fr);
  grid-template-areas: "head detail" ". detail";
  column-gap: var(--h-work-gap);
  box-shadow: var(--h-hairline-2), var(--h-shadow-2);
}
.bcard.h-work-open[data-h-work-dir="rtl"] { grid-template-columns: minmax(0, 1fr) var(--h-work-hw, 50%); grid-template-areas: "detail head" "detail ."; }
/* While it closes, the tile keeps the size it had (work.js sets it) and floats
   over its new, smaller place, so the reflow happens under it. */
.bcard.h-work-closing { position: absolute; top: 0; left: 0; }
.bcard.h-work-open > .h-work-head { grid-area: head; }
.bcard.h-work-open > .h-work-detail { grid-area: detail; contain: size; overflow: clip; }
.bcard.h-work-open[data-h-work-dir="ltr"] .h-work-detail > :first-child > :first-child,
.bcard.h-work-open[data-h-work-dir="ltr"] .h-work-lead { padding-right: 2.6rem; }
.bcard.h-work-open[data-h-work-dir="rtl"] > .h-work-detail { padding: 1.8rem 0.6rem 1.6rem 1.8rem; }

/* Open below the head: a wide tile on a tablet (stack) and any tile on a phone (flow). */
.bcard.h-work-open:is([data-h-work-mode="stack"], [data-h-work-mode="flow"]) {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "detail";
}
.bcard.h-work-open[data-h-work-mode="flow"] { grid-template-rows: var(--h-work-hh, auto) auto; }
.bcard.h-work-open[data-h-work-mode="flow"] > .h-work-detail { contain: none; overflow: visible; }
.bcard.h-work-open:is([data-h-work-mode="stack"], [data-h-work-mode="flow"]) > .h-work-detail { padding: 1.3rem 1.8rem 1.8rem; }
.bcard.h-work-open:is([data-h-work-mode="stack"], [data-h-work-mode="flow"]) > .h-work-detail::before {
  content: ''; position: absolute; top: 0; left: 1.8rem; right: 1.8rem; height: 1px; background: var(--border);
}

/* The more arrives the way base content does (a short rise out of a blur,
   one after another) while the tile grows; it simply fades when it closes. */
@keyframes h-work-in { from { opacity: 0; translate: 0 10px; filter: blur(6px); } }
@keyframes h-work-out { to { opacity: 0; } }
.h-work-enter .h-work-detail [data-h-work-i] {
  animation: h-work-in var(--h-t-content) var(--h-ease) calc(140ms + var(--h-work-i, 0) * 55ms) backwards;
}
.h-work-leave > .h-work-detail { animation: h-work-out var(--h-t-quick) var(--h-ease-std) forwards; }

/* ── 01 SURGERY: the navy feature tile ─────────────────────────────────── */
.bcard--hero {
  background: var(--navy); color: #fff;
  box-shadow: 0 1px 2px rgba(11, 15, 46, 0.25), 0 22px 48px -22px rgba(11, 15, 46, 0.55);
}
.bcard--hero.h-work-open { box-shadow: 0 1px 2px rgba(11, 15, 46, 0.25), 0 30px 64px -26px rgba(11, 15, 46, 0.6); }
@media (hover: hover) and (pointer: fine) {
  .bcard--hero:not(.h-work-open):hover { box-shadow: 0 2px 6px rgba(11, 15, 46, 0.25), 0 30px 64px -26px rgba(11, 15, 46, 0.6); }
}
/* Monitor paper: the grid the trace is drawn on. */
.bcard--hero .bcard__grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
}
.bcard--hero .h-work-head { padding: 2.2rem; }
/* The trace runs edge to edge through the open middle of the tile. */
.bcard--hero .hero-ekg {
  display: block; flex: none;
  width: calc(100% + 4.4rem); height: auto;
  margin: auto -2.2rem;
  padding: 0.6rem 0 1.4rem;
  overflow: visible;
}
.h-work-ekg, .h-work-beat { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.h-work-ekg { stroke: var(--teal); stroke-width: 1.5; opacity: 0.5; }
.h-work-beat { stroke: #fff; stroke-width: 2; stroke-dasharray: 7 100; stroke-dashoffset: 7; opacity: 0; }
.h-work-js .h-work-ekg { stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 2.2s cubic-bezier(0.4, 0.1, 0.5, 1); }
.h-work-js .h-work-drawn .h-work-ekg { stroke-dashoffset: 0; }
@keyframes h-work-beat {
  0% { stroke-dashoffset: 7; opacity: 0; }
  10% { opacity: 1; }
  86% { opacity: 1; }
  100% { stroke-dashoffset: -100; opacity: 0; }
}
.h-work-beating .h-work-beat { animation: h-work-beat 1.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) 1; }

.bcard--hero .bcard__stat { font-size: clamp(4.5rem, 9vw, 8rem); color: #fff; margin-bottom: 0.3rem; }
.bcard--hero .bcard__stat sup { color: var(--teal); }
.bcard--hero .bcard__stat-label { color: rgba(255, 255, 255, 0.66); }
.bcard--hero .bcard__title { font-size: clamp(1.6rem, 3vw, 2.8rem); color: #fff; margin-bottom: 0.7rem; }
.bcard--hero .bcard__desc { color: rgba(255, 255, 255, 0.72); font-size: 0.9rem; max-width: 330px; }
.bcard--hero .bcard__tag { color: rgba(255, 255, 255, 0.62); border-top-color: rgba(255, 255, 255, 0.14); margin-top: 1.4rem; }
.bcard--hero .bcard__arrow { color: rgba(255, 255, 255, 0.42); }
@media (hover: hover) and (pointer: fine) {
  .bcard--hero:has(.h-work-door:hover) .bcard__arrow { color: var(--teal); }
}
.bcard--hero .h-work-plus { color: #fff; }
.bcard--hero .h-work-plus::before { background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
@media (hover: hover) and (pointer: fine) {
  .bcard--hero .h-work-plus:hover { color: var(--ink); }
  .bcard--hero .h-work-plus:hover::before { background: #fff; box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.5); }
}
.bcard--hero .h-work-plus[aria-expanded="true"] { color: var(--ink); }
.bcard--hero .h-work-plus[aria-expanded="true"]::before { background: #fff; }
.bcard--hero .h-work-detail { padding: 2.2rem 1.6rem 2.2rem 0.6rem; justify-content: flex-end; }
.bcard--hero .h-work-facts li { color: rgba(255, 255, 255, 0.72); font-size: 0.95rem; border-top-color: rgba(255, 255, 255, 0.14); padding: 0.9rem 0; }
.bcard--hero .h-work-facts li:first-child { padding-top: 0; }
.bcard--hero .h-work-facts strong { color: #fff; font-size: clamp(1.1rem, 1.6vw, 1.35rem); margin-bottom: 0.2rem; }
.bcard--hero .h-work-acts { margin-top: 1.6rem; }
.bcard--hero.h-work-open:is([data-h-work-mode="stack"], [data-h-work-mode="flow"]) > .h-work-detail { padding: 1.4rem 2.2rem 2.2rem; }
.bcard--hero.h-work-open:is([data-h-work-mode="stack"], [data-h-work-mode="flow"]) > .h-work-detail::before { left: 2.2rem; right: 2.2rem; background: rgba(255, 255, 255, 0.14); }

/* ── 02 BOOKS: the three covers fan when pointed at; open, each title lifts its own cover ── */
.bcard__covers {
  display: flex; align-items: flex-end; gap: 7px;
  margin-bottom: auto; padding-bottom: 1.3rem;
}
.bcard__covers img {
  width: 50px; height: 70px; object-fit: cover; border-radius: 3px; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(11, 15, 46, 0.22), 0 1px 4px rgba(11, 15, 46, 0.1);
  transition: transform var(--h-t-content) var(--h-ease);
}
@media (hover: hover) and (pointer: fine) {
  .bcard--books:not(.h-work-open):hover .bcard__covers img:nth-child(1) { transform: rotate(-10deg) translate(-5px, -8px); }
  .bcard--books:not(.h-work-open):hover .bcard__covers img:nth-child(2) { transform: translateY(-12px) scale(1.06); }
  .bcard--books:not(.h-work-open):hover .bcard__covers img:nth-child(3) { transform: rotate(10deg) translate(5px, -8px); }
  .bcard--books:has([data-h-work-cover="1"]:hover) .bcard__covers img:nth-child(1),
  .bcard--books:has([data-h-work-cover="2"]:hover) .bcard__covers img:nth-child(2),
  .bcard--books:has([data-h-work-cover="3"]:hover) .bcard__covers img:nth-child(3) { transform: translateY(-12px) scale(1.08); }
}
.bcard--books [data-h-work-cover] strong { transition: color var(--h-t) var(--h-ease-out); }
@media (hover: hover) and (pointer: fine) {
  .bcard--books [data-h-work-cover]:hover strong { color: var(--teal-2); }
}

/* ── 04 ROBOTICS: a navigation field of points ───────────────────────────
   The reticle sits on a planned point of the field. It travels there once
   when the tile is seen, and under a fine pointer it steps from point to
   point after the pointer (work.js): navigation puts each screw where it was
   planned. The points belong to the head, so the reticle (positioned in head
   coordinates) always lands exactly on one. Point centres: 8.5px + 17px * n. */
.bcard--robotics .h-work-head {
  background-image: radial-gradient(rgba(14, 165, 233, 0.18) 1px, transparent 1px);
  background-size: 17px 17px;
}
.h-work-field { height: 44px; padding-bottom: 1.2rem; margin-bottom: auto; box-sizing: content-box; }
.h-work-reticle {
  position: absolute; left: 0; top: 0; z-index: 0;
  width: 32px; height: 32px; overflow: visible; pointer-events: none;
  fill: none; stroke: var(--teal-2); stroke-width: 1.4; stroke-linecap: round;
  translate: var(--h-work-rx, 26.5px) var(--h-work-ry, 43.5px);
  transition: translate var(--h-t) var(--h-ease-out);
}
.h-work-reticle__pt { fill: var(--teal-2); stroke: none; }
.h-work-reticle.h-work-travel { transition: translate 1.2s var(--h-ease); }

/* ── 05 MENTORSHIP: one point for each surgeon trained ─────────────────────
   work.js draws them and lights them in step with the count up. */
.bcard--mentor .bcard__stat { font-size: clamp(3.4rem, 6vw, 5.4rem); color: var(--teal-2); }
.h-work-cohort {
  display: grid; grid-template-columns: repeat(13, 4px); gap: 4px;
  align-content: start; width: max-content;
  margin-bottom: auto; padding-bottom: 1.2rem;
}
.h-work-cohort i {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--teal); opacity: 0.22;
  transition: opacity 0.35s var(--h-ease-out) var(--h-work-d, 0ms), background-color 0.35s var(--h-ease-out) var(--h-work-d, 0ms);
}
.h-work-cohort.h-work-lit i { opacity: 1; background: var(--teal-2); }

/* ── 06 EXPERT WITNESS: retained by both sides ────────────────────────────
   A balance with its two pans named (the tile's own words). Pointed at or
   focused, it weighs once and settles level. */
.h-work-balance {
  display: block; flex: none;
  width: 168px; height: auto; overflow: visible;
  margin-bottom: auto; padding-bottom: 1.2rem; box-sizing: content-box;
}
.h-work-balance path, .h-work-balance__pin {
  fill: none; stroke: var(--teal); stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.h-work-balance__pin { fill: #fff; }
.h-work-balance text {
  font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em;
  fill: var(--text-2);
}
.h-work-scales { transform-box: view-box; transform-origin: 120px 26px; }
@keyframes h-work-weigh {
  0% { transform: rotate(0deg); }
  22% { transform: rotate(-5deg); }
  48% { transform: rotate(3.5deg); }
  70% { transform: rotate(-1.6deg); }
  86% { transform: rotate(0.6deg); }
  100% { transform: rotate(0deg); }
}
.h-work-weighing .h-work-scales { animation: h-work-weigh 1.7s var(--h-ease) 1; }
/* Wide tile: drawn in the open right half, the words keep the left. */
@media (min-width: 601px) {
  .bcard--ew .h-work-balance {
    position: absolute; right: 4.6rem; top: 34%;
    width: clamp(212px, 40%, 232px); padding: 0; margin: 0;
    translate: 0 -50%;
  }
  .bcard--ew .bcard__title { margin-top: auto; }
  .bcard--ew .bcard__desc { max-width: 62%; }
}

/* ── 07 SPEAKING: a voice level at rest; it speaks once when pointed at ── */
.bcard__bars {
  display: flex; align-items: flex-end; gap: 4px;
  width: calc(100% - 2.75rem); height: 46px;
  margin-bottom: auto; padding-bottom: 0; box-sizing: content-box;
}
.bcard__bars { margin-bottom: auto; }
.bcard--speaking .h-work-head > .bcard__bars + .bcard__title { margin-top: 1.3rem; }
.bcard__bars span {
  flex: 1; height: 100%;
  border-radius: 3px 3px 2px 2px;
  background: var(--teal); opacity: 0.5;
  transform-origin: 50% 100%;
  scale: 1 var(--h-work-r, 0.5);
  transition: opacity var(--h-t) var(--h-ease-out);
}
@keyframes h-work-say {
  0% { scale: 1 var(--h-work-r); }
  35% { scale: 1 var(--h-work-p); }
  65% { scale: 1 calc(var(--h-work-r) * 0.55); }
  100% { scale: 1 var(--h-work-r); }
}
.h-work-saying .bcard__bars span {
  opacity: 0.85;
  animation: h-work-say 0.95s var(--h-ease) calc(var(--h-work-i, 0) * 45ms) 1 both;
}

/* ── 08 INVESTING: the line draws once when seen ──────────────────────── */
.bcard__trend { width: calc(100% - 2.75rem); height: 46px; margin-bottom: auto; }
.bcard--invest .h-work-head > .bcard__trend + .bcard__title { margin-top: 1.3rem; }
.bcard__trend svg { display: block; width: 100%; height: 100%; overflow: visible; }
.bcard__trend .t-fill { fill: rgba(14, 165, 233, 0.1); }
.bcard__trend .t-line {
  fill: none; stroke: var(--teal); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  /* no vector-effect: a non-scaling stroke breaks pathLength dashes in Chromium */
}
.h-work-js .bcard--invest .t-line { stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.6s var(--h-ease) 0.2s; }
.h-work-js .bcard--invest .t-fill { opacity: 0; transition: opacity var(--h-t-content) var(--h-ease) 1.2s; }
.h-work-js .bcard--invest.h-work-drawn .t-line { stroke-dashoffset: 0; }
.h-work-js .bcard--invest.h-work-drawn .t-fill { opacity: 1; }

/* ── TABLET: two columns, the navy tile tall on the left ───────────────── */
@media (max-width: 1000px) {
  .work-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-work-cell--hero { grid-column: span 1; grid-row: span 2; }
  .h-work-cell--wide { grid-column: span 2; }
  .bcard--hero .bcard__stat { font-size: clamp(3.5rem, 8vw, 5.5rem); }
}

/* ── PHONE: one column, every tile opens below its head ────────────────── */
@media (max-width: 600px) {
  .work-bento-section { --h-work-gap: 0.8rem; padding: 4rem 5vw 5rem; }
  .work-bento-header { margin-bottom: 2rem; }
  .work-bento { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .h-work-cell--hero, .h-work-cell--wide { grid-column: auto; grid-row: auto; }
  .bcard--hero .h-work-head { padding: 1.8rem; }
  .bcard--hero .hero-ekg { width: calc(100% + 3.6rem); margin: 0.6rem -1.8rem 0; }
  .bcard--hero .bcard__stat { font-size: clamp(3rem, 15vw, 5rem); }
  .bcard--hero.h-work-open:is([data-h-work-mode="stack"], [data-h-work-mode="flow"]) > .h-work-detail { padding: 1.3rem 1.8rem 1.8rem; }
  .bcard--hero.h-work-open:is([data-h-work-mode="stack"], [data-h-work-mode="flow"]) > .h-work-detail::before { left: 1.8rem; right: 1.8rem; }
  .bcard__covers img { width: 40px; height: 56px; }
}

/* ── PREFERENCES ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .bcard, .bcard__arrow, .bcard__covers img, .bcard__bars span,
  .h-work-plus, .h-work-plus::before, .h-work-plus__i, .h-work-cohort i, .h-work-reticle { transition: none !important; }
  .h-work-enter .h-work-detail [data-h-work-i], .h-work-leave > .h-work-detail,
  .h-work-beat, .bcard__bars span, .h-work-scales { animation: none !important; }
  .bcard:not(.h-work-open):hover { translate: none; }
  .h-work-js .h-work-ekg, .h-work-js .bcard--invest .t-line { stroke-dashoffset: 0; transition: none; }
  .h-work-js .bcard--invest .t-fill { opacity: 1; transition: none; }
}
@media (forced-colors: active) {
  .bcard { border: 1px solid CanvasText; }
  .h-work-plus::before { border: 1px solid ButtonText; }
}
@media print {
  .h-work-plus { display: none; }
}
