/* Browse lessons (/lessons, public/browse.js). Scoped under .vb so it cannot collide with
   style.css; tokens match the Your Pathway pages (pathway.css). */
.vb {
  --text: #1F1B2E; --subtext: #3E3A4D; --faint: #6B6878; --rule: #E5E2EC; --field: #938FA3;
  --surface: #FFFFFF; --sunk: #F3F1F6; --oxford: #02122F; --oxford-soft: #E9EDF3;
  --amber: #D4882A; --amber-dark: #B8741F; --amber-wash: #FBF4E8; --steel: #5577A8;
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-family: var(--body); color: var(--text); font-size: 1.0625rem; line-height: 1.6;
}
.vb *, .vb *::before, .vb *::after { box-sizing: border-box; }
.vb button { font: inherit; cursor: pointer; }
.vb button:focus-visible, .vb input:focus-visible, .vb a:focus-visible { outline: 3px solid #D4882A; outline-offset: 2px; }
.vb ul { list-style: none; margin: 0; padding: 0; }
.vb-shell { max-width: 980px; margin: 0 auto; padding: 8px 0 56px; }

.vb-h1 { font-family: var(--display); font-weight: 700; font-size: 2.2rem; line-height: 1.15;
  color: var(--oxford); margin: 0 0 8px; }
.vb-sub { color: var(--subtext); font-size: 1.0625rem; margin: 0 0 24px; max-width: 70ch; }
.vb-h2 { font-family: var(--display); font-weight: 700; font-size: 1.375rem; color: var(--oxford);
  margin: 32px 0 16px; overflow-wrap: break-word; }

.vb-search { margin: 0 0 8px; }
.vb-search-in {
  width: 100%; max-width: 560px; min-height: 48px; font: inherit; font-size: 1rem; color: var(--text);
  padding: 0 18px; border: 1.5px solid var(--field); border-radius: 999px; background: var(--surface);
  -webkit-appearance: none; appearance: none;
}
.vb-search-in:hover { border-color: var(--oxford); }
.vb-search-in::placeholder { color: var(--faint); }

.vb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.vb-tile {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: left; padding: 16px 18px; background: var(--surface); color: var(--text);
  border: 1px solid var(--rule); border-left: 3px solid var(--amber); border-radius: 12px;
  box-shadow: 0 1px 2px rgba(31,27,46,.06); transition: background-color .13s, border-color .13s;
}
.vb-tile:hover { border-color: var(--amber); background: var(--amber-wash); }
.vb-tile-t { font-weight: 700; font-size: 1.0625rem; line-height: 1.3; color: var(--oxford); }
.vb-tile-n { font-size: .9375rem; color: var(--subtext); }

.vb-back { display: inline-flex; align-items: center; min-height: 48px; background: none; border: none;
  padding: 0; margin: 16px 0 0; color: var(--oxford); font-size: 1rem; font-weight: 500;
  text-decoration: underline; text-underline-offset: 3px; }
.vb-back:hover { text-decoration-color: var(--amber); text-decoration-thickness: 2px; }
.vb-topic-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.vb-topic-head .vb-h2 { margin: 8px 0 4px; }
.vb-count { color: var(--subtext); font-size: .9375rem; margin: 16px 0 12px; }
.vb-topic-head .vb-count { margin: 0; }

.vb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 24px; }
.vb-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--field); background: var(--surface); color: var(--text); font-size: .9375rem;
  max-width: 100%; text-align: left; line-height: 1.25; transition: background-color .13s, border-color .13s;
}
.vb-chip:hover { border-color: var(--oxford); }
.vb-chip.is-on { background: var(--oxford); border-color: var(--oxford); color: #FFFFFF; font-weight: 600; }
.vb-chip-n { font-size: .8125rem; color: var(--faint); }
.vb-chip.is-on .vb-chip-n { color: #E9EDF3; }

.vb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.vb-card {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  text-align: left; padding: 16px 18px; background: var(--surface); color: var(--text);
  border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 1px 2px rgba(31,27,46,.06);
  transition: border-color .13s, background-color .13s;
}
.vb-card:hover { border-color: var(--amber); background: var(--amber-wash); }
.vb-card-t { font-weight: 600; font-size: 1.0625rem; color: var(--oxford); line-height: 1.35; overflow-wrap: anywhere; }
.vb-card-d { font-size: .9375rem; line-height: 1.5; color: var(--subtext); overflow-wrap: anywhere; }
.vb-season {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .02em;
  color: #7A4E12; background: var(--amber-wash); border: 1px solid #EBCB9A; border-radius: 999px;
  padding: 2px 10px;
}

.vb-empty { padding: 22px 0; color: var(--subtext); }
.vb-empty-h { font-weight: 700; color: var(--oxford); margin: 0 0 4px; }
.vb-empty p { margin: 0 0 12px; }

/* The shared button system: primary orange fill, secondary white with a 1.5px navy border. */
.vb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 0 24px; font-size: 16px; font-weight: 600; line-height: 1.2; border-radius: 999px;
  background: #D4882A; color: #FFFFFF; border: 1.5px solid #D4882A; text-decoration: none;
  transition: background-color .15s, border-color .15s;
}
.vb-btn:hover { background: #B8741F; border-color: #B8741F; }
.vb-btn:disabled { opacity: .5; cursor: not-allowed; }
.vb-btn--ghost { background: #FFFFFF; color: #02122F; border-color: #02122F; }
.vb-btn--ghost:hover { background: var(--oxford-soft); border-color: #02122F; }

.vb-start {
  margin: 48px 0 0; padding: 24px; background: #FAF8F2; border: 1px solid #F0ECDD; border-radius: 14px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
}
.vb-start-h { font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--oxford); margin: 0; }

/* The age-group note under the intro. */
.vb .vb-note { color: var(--subtext); font-size: .9375rem; margin: -12px 0 24px; max-width: 70ch; }
.vb .vb-h2 + .vb-note { margin: -8px 0 16px; }

@media (max-width: 600px) {
  .vb-h1 { font-size: 1.75rem; }
  .vb-tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
  .vb-tile { padding: 14px; }
  .vb-grid { grid-template-columns: 1fr; }
  .vb-start { padding: 18px; }
  .vb-start .vb-btn { width: 100%; }
  /* Subtopic chips scroll sideways inside their own row instead of stacking down the page. */
  .vb-chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 2px 2px 8px; margin: 8px 0 16px; scrollbar-width: thin; }
  .vb-chip { flex: 0 0 auto; white-space: nowrap; }
}
@media (max-width: 360px) {
  .vb-tiles { grid-template-columns: 1fr; }
}
