/* =========================================================
   Learning Rewired Lab — The Lab · The Bench
   File: /the-lab/app/assets/css/the-bench.css
   Founder-led coaching space. Pairs with the-bench.js.
   ========================================================= */

.tb-content {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */

.tb-hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 30px 34px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 22px;
  background:
    radial-gradient(120% 160% at 8% 0%, rgba(244, 201, 93, .16), transparent 55%),
    radial-gradient(100% 120% at 100% 100%, rgba(20, 184, 166, .08), transparent 50%),
    #ffffff;
  border: 1px solid rgba(212, 160, 23, .22);
  box-shadow: 0 16px 38px rgba(15, 23, 42, .06);
}

.tb-hero__img {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .16);
  flex: none;
}

.tb-hero__eyebrow {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8a5a00;
}

.tb-hero__title {
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -.03em;
  color: #07111f;
  margin: 4px 0 0;
}

.tb-hero__lede {
  font-size: 13.5px;
  color: #5b6b78;
  margin: 6px 0 0;
  max-width: 640px;
  line-height: 1.5;
}

/* ---------------------------------------------------------
   PATH CARDS
   --------------------------------------------------------- */

.tb-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.tb-path {
  border-radius: 20px;
  padding: 20px 20px 18px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
  border: 1px solid;
  background: #fff;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.tb-path:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, .09);
}

.tb-path--question {
  border-color: rgba(20, 184, 166, .22);
  background: linear-gradient(165deg, #f0fdfa, #ffffff);
}

.tb-path--project {
  border-color: rgba(99, 102, 241, .22);
  background: linear-gradient(165deg, #f5f4ff, #ffffff);
}

.tb-path--signal {
  border-color: rgba(37, 99, 235, .2);
  background: linear-gradient(165deg, #eff6ff, #ffffff);
}

.tb-path__ic {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 17px;
  margin-bottom: 12px;
  font-weight: 800;
}

.tb-path--question .tb-path__ic {
  background: rgba(20, 184, 166, .14);
  color: #0f766e;
}

.tb-path--project .tb-path__ic {
  background: rgba(99, 102, 241, .14);
}

.tb-path--signal .tb-path__ic {
  background: rgba(37, 99, 235, .12);
}

.tb-path__title {
  font-weight: 900;
  font-size: 15px;
  color: #07111f;
}

.tb-path__desc {
  font-size: 12.5px;
  color: #5b6b78;
  margin: 4px 0 0;
  line-height: 1.4;
}

.tb-path__reveal {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, .08);
  animation: tb-reveal .24s ease both;
}

.tb-path__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tb-path__chip {
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .12);
  color: #334155;
  cursor: pointer;
  font-family: inherit;
}

.tb-path__chip.is-selected {
  color: #fff;
}

.tb-path--question .tb-path__chip.is-selected {
  background: #0f766e;
  border-color: #0f766e;
}

.tb-path--project .tb-path__chip.is-selected {
  background: #4338ca;
  border-color: #4338ca;
}

.tb-path__note {
  margin-top: 12px;
  font-size: 12px;
  color: #7a5b00;
  background: rgba(244, 201, 93, .14);
  border: 1px solid rgba(212, 160, 23, .3);
  border-radius: 10px;
  padding: 9px 12px;
  line-height: 1.5;
}

.tb-path__capture {
  font-size: 12px;
  color: #334155;
  background: #fff;
  border: 1px solid #dbe6fb;
  border-radius: 10px;
  padding: 9px 12px;
}

/* ---------------------------------------------------------
   BENCH CARD
   --------------------------------------------------------- */

.tb-card,
.tb-bench,
.tb-bench-card {
  position: relative;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
  overflow: hidden;
}

.tb-cardhead {
  display: flex;
  align-items: center;
  gap: 9px;
}

.tb-cardhead__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  font-size: 16px;
  color: #07111f;
  margin: 0;
}

.tb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d4a017;
  flex: none;
}

.tb-cardhead__sub {
  font-size: 12.5px;
  color: #5b6b78;
  margin: 6px 0 18px;
  line-height: 1.45;
}

/* Use this if the On the Bench section has a wrapper class */
.tb-bench {
  padding: 20px;
}

/* Defensive styling for the actual Bench section even if the HTML
   only uses generic classes from the app shell. */
.tb-content > section:last-child,
.tb-content > article:last-child {
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
  overflow: hidden;
}

/* ---------------------------------------------------------
   EMPTY STATE
   This is the part that fixes the giant Kip image.
   --------------------------------------------------------- */

.tb-empty,
.tb-bench-empty,
.tb-empty-state {
  min-height: 260px;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 26px;
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(20, 184, 166, .08), transparent 55%),
    linear-gradient(180deg, #ffffff, #fbfdff);
}

/* Guardrail for Kip/empty-state images */
.tb-empty img,
.tb-bench-empty img,
.tb-empty-state img,
.tb-content > section:last-child img,
.tb-content > article:last-child img {
  display: block;
  width: min(100%, 220px);
  max-width: 220px;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  border-radius: 18px;
}

/* If the current HTML has the image sitting directly inside the Bench card,
   this keeps it from exploding while we wait for cleaner markup. */
.tb-content img[src*="kip"],
.tb-content img[src*="Kip"],
.tb-content img[alt*="Kip"],
.tb-content img[alt*="kip"] {
  width: min(100%, 220px);
  max-width: 220px;
  height: auto;
  max-height: 260px;
  object-fit: contain;
}

.tb-empty__copy,
.tb-bench-empty__copy,
.tb-empty-state__copy {
  max-width: 560px;
}

.tb-empty__title,
.tb-bench-empty__title,
.tb-empty-state__title {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -.03em;
  font-weight: 900;
  color: #07111f;
}

.tb-empty__text,
.tb-bench-empty__text,
.tb-empty-state__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #475569;
}

/* If the empty message is plain text after the image, keep it aligned */
.tb-content > section:last-child > p,
.tb-content > article:last-child > p {
  margin: 0;
  padding: 0 28px 28px;
  font-size: 14px;
  line-height: 1.55;
  color: #334155;
}

/* ---------------------------------------------------------
   SUBMISSION / ITEM STATES
   --------------------------------------------------------- */

.tb-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.tb-item {
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, .08);
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.tb-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.tb-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, .08);
}

.tb-pill--question {
  color: #0f766e;
  background: rgba(20, 184, 166, .1);
  border-color: rgba(20, 184, 166, .18);
}

.tb-pill--project {
  color: #4338ca;
  background: rgba(99, 102, 241, .1);
  border-color: rgba(99, 102, 241, .18);
}

.tb-pill--signal {
  color: #1d4ed8;
  background: rgba(37, 99, 235, .09);
  border-color: rgba(37, 99, 235, .16);
}

.tb-item__title {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  color: #07111f;
}

.tb-item__desc {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}

/* ---------------------------------------------------------
   MOTION
   --------------------------------------------------------- */

@keyframes tb-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 1080px) {
  .tb-paths {
    grid-template-columns: 1fr;
  }

  .tb-empty,
  .tb-bench-empty,
  .tb-empty-state {
    grid-template-columns: 1fr;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .tb-hero {
    align-items: flex-start;
    padding: 22px;
    border-radius: 22px;
  }

  .tb-hero__img {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  .tb-hero__title {
    font-size: 22px;
  }

  .tb-path {
    padding: 18px;
  }

  .tb-empty,
  .tb-bench-empty,
  .tb-empty-state {
    padding: 22px;
    gap: 18px;
  }

  .tb-empty img,
  .tb-bench-empty img,
  .tb-empty-state img,
  .tb-content > section:last-child img,
  .tb-content > article:last-child img,
  .tb-content img[src*="kip"],
  .tb-content img[src*="Kip"],
  .tb-content img[alt*="Kip"],
  .tb-content img[alt*="kip"] {
    width: min(100%, 180px);
    max-width: 180px;
    max-height: 220px;
  }

  .tb-content > section:last-child > p,
  .tb-content > article:last-child > p {
    padding: 0 22px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tb-path,
  .tb-path__reveal {
    animation: none !important;
    transition: none !important;
  }
}
/* =========================================================
   Bench empty state
   Fixes JS-rendered Kip empty state.
   ========================================================= */

#tb-bench-list {
  width: 100%;
}

.tb-bench-empty {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 190px;
  padding: 22px;
  border-radius: 18px;
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(20, 184, 166, .10), transparent 58%),
    linear-gradient(180deg, #ffffff, #fbfdff);
  border: 1px solid rgba(15, 23, 42, .06);
}

.tb-bench-empty__media {
  width: 150px;
  height: 150px;
  border-radius: 22px;
  overflow: hidden;
  background: #061126;
  display: grid;
  place-items: center;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .12);
}

.tb-bench-empty__kip {
  display: block;
  width: 150px;
  height: 150px;
  max-width: 150px;
  max-height: 150px;
  object-fit: cover;
  object-position: center top;
}

.tb-bench-empty__copy {
  min-width: 0;
  max-width: 620px;
}

.tb-bench-empty__title {
  margin: 0 0 7px;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -.03em;
  color: #07111f;
}

.tb-bench-empty__text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #475569;
}

@media (max-width: 720px) {
  .tb-bench-empty {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
  }

  .tb-bench-empty__media {
    width: 132px;
    height: 132px;
  }

  .tb-bench-empty__kip {
    width: 132px;
    height: 132px;
    max-width: 132px;
    max-height: 132px;
  }
}
/* =========================================================
   Bench page layout repair
   Fixes cramped Bench header + right rail.
   ========================================================= */

.tb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 320px);
  gap: 28px;
  align-items: start;
}

.tb-rail {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.tb-rail .lab-card {
  padding: 18px;
}

.tb-rail p {
  max-width: 100%;
}

/* Bench card gets its own internal rhythm */
.tb-bench-card {
  padding: 0 !important;
  overflow: hidden;
}

.tb-bench-card .tb-cardhead,
.tb-bench-card .tb-cardhead__sub {
  padding-left: 22px;
  padding-right: 22px;
}

.tb-bench-card .tb-cardhead {
  padding-top: 20px;
}

.tb-bench-card .tb-cardhead__sub {
  margin: 6px 0 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(15, 23, 42, .07);
}

#tb-bench-list {
  padding: 0;
}

/* Empty state sits cleanly under the Bench header */
.tb-bench-empty {
  margin: 0;
  border-radius: 0;
  border: 0;
  border-top: 0;
  box-shadow: none;
}

/* Give the right rail cards a little breathing room */
.tb-rail .lab-card h4 {
  line-height: 1.25;
}

.tb-rail .lab-card p {
  line-height: 1.55;
}

.tb-rail .lab-card a {
  line-height: 1.25;
}

/* Responsive: right rail drops below instead of squeezing */
@media (max-width: 1180px) {
  .tb-layout {
    grid-template-columns: 1fr;
  }

  .tb-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .tb-rail {
    grid-template-columns: 1fr;
  }

  .tb-bench-card .tb-cardhead,
  .tb-bench-card .tb-cardhead__sub {
    padding-left: 18px;
    padding-right: 18px;
  }

  .tb-bench-card .tb-cardhead {
    padding-top: 18px;
  }
}
