/* TechNetBuddy Learn: only what the main site's /assets/css/style.css does not already have (search, track chips,
   lab cards and the lab page). Every colour, radius, shadow and timing comes from that stylesheet's variables. */

/* the header carries one more link (Learn) than the main site, so keep links on one line and a little tighter */
.nav__link { white-space: nowrap; }
@media (min-width: 861px) and (max-width: 1180px) { .nav__link { padding-left: 10px; padding-right: 10px; } .nav__link.is-active::after { left: 10px; right: 10px; } }

.learn-hero { max-width: 820px; }
/* inner pages use the main site's .banner + .crumbs; these sit between its paragraph and breadcrumb */
.banner .lab-actions { margin-top: 18px; }

/* search and track chips */
.lab-search { display: flex; gap: 10px; max-width: 640px; margin: 0 auto 18px; }
.lab-search input {
  flex: 1; min-width: 0; font: inherit; font-size: 1rem; color: var(--ink); background: var(--white);
  border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 13px 16px; box-shadow: var(--sh-xs);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.lab-search input::placeholder { color: var(--muted); }
.lab-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.lab-tracks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto 8px; max-width: 980px; }
.lab-chip {
  display: inline-flex; align-items: center; padding: 7px 14px; border-radius: var(--r-pill); font-size: .84rem; font-weight: 550;
  color: var(--slate); background: var(--white); border: 1px solid var(--line); box-shadow: var(--sh-xs); text-decoration: none;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.lab-chip:hover { color: var(--brand); border-color: var(--line-strong); }
.lab-chip.is-on { color: var(--white); background: var(--brand); border-color: var(--brand); box-shadow: var(--sh-brand); }
.lab-chip:focus-visible, .lab-card__link:focus-visible, .track-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.lab-found { max-width: none; margin-left: auto; margin-right: auto; text-align: center; color: var(--slate); min-height: 1.4em; margin: 6px 0 22px; }
.lab-found:empty { min-height: 0; margin: 0 0 22px; }

/* lab cards */
.lab-card { position: relative; display: flex; flex-direction: column; gap: 6px; transition: box-shadow var(--base) var(--ease), transform var(--base) var(--ease); }
.lab-card[hidden] { display: none; }
.lab-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.lab-card h3 { margin: 6px 0 2px; }
.lab-card p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.lab-card__link { color: inherit; text-decoration: none; }
.lab-card__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; } /* whole card is the link */
.lab-card__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lab-badge {
  display: inline-block; padding: 4px 11px; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand-deep);
  font-size: .72rem; font-weight: 650; letter-spacing: .02em;
}
.lab-num { font-size: .78rem; color: var(--slate); font-family: var(--mono); white-space: nowrap; }
.lab-meta { margin-top: auto; padding-top: 10px; font-size: .84rem; color: var(--slate); }
.lab-meta--big { font-size: .95rem; margin: 12px 0 0; padding: 0; }

/* track cards on the Learn home */
.track-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; transition: box-shadow var(--base) var(--ease), transform var(--base) var(--ease); }
.track-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.track-card h3 { margin: 0; }
.track-card p { margin: 0; }
.track-card__go { margin-top: 10px; color: var(--brand); font-weight: 650; font-size: .9rem; }

/* one lab */
.lab-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.lab-body h2 { font-size: 1.4rem; margin: 0 0 6px; }
.lab-side { display: grid; gap: 18px; }
.lab-side h3 { margin: 8px 0 6px; }
.lab-side p { margin: 0; }
.lab-steps { counter-reset: step; list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 12px; }
.lab-steps li { counter-increment: step; position: relative; padding: 2px 0 0 44px; color: var(--slate); line-height: 1.55; }
.lab-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-deep); font-weight: 700; font-size: .85rem;
}
.lab-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lab-pager__link { display: flex; flex-direction: column; gap: 4px; text-decoration: none; padding: 20px 22px; }
.lab-pager__link span { color: var(--slate); font-size: .85rem; }
.lab-pager__link strong { color: var(--ink); }
.lab-pager__link:hover { box-shadow: var(--sh-md); }
.lab-pager__link--next { text-align: right; grid-column: 2; }

/* the simulator's trademark and independence notice */
.learn-notice { font-size: .78rem; line-height: 1.55; color: var(--slate); margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  .lab-body { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .lab-search { flex-direction: column; }
  /* one swipeable row of chips, so the labs start near the top on a phone */
  .lab-tracks { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)) 4px; padding: 2px var(--gutter) 10px; }
  .lab-tracks::-webkit-scrollbar { display: none; }
  .lab-chip { flex: none; }
  .lab-pager { grid-template-columns: 1fr; }
  .lab-pager__link--next { grid-column: auto; text-align: left; }
}
