/* ============================================================
   LEARNING LAB
   The Lab's own components (category tiles, tool cards, filters,
   ski/riding variants). Colors come from site.css, which is dark
   site-wide; loaded after it on Lab, Classes, Ski and student pages.
   ============================================================ */

/* The dark palette, light nav, footer, buttons and contour lines are now
   the site-wide defaults in site.css, so body.lab needs no overrides. */

/* ---------- page header ---------- */
.lab-head { background: radial-gradient(120% 140% at 85% 0%, rgba(141, 186, 116, 0.10), transparent 60%); }
.lab-head .page-title { font-size: clamp(48px, 8.4vw, 108px); }
.lab-head .pill-row { margin-top: 28px; }
.lab-crumb {
  display: inline-block;
  margin-bottom: 18px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
}
.lab-crumb:hover { color: var(--blaze); }

.lab .pill { background: transparent; }
.pill--moss { border-color: rgba(141, 186, 116, 0.45); color: var(--moss); }

/* ---------- category tiles ---------- */
.lab-cats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 960px) { .lab-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lab-cats { grid-template-columns: 1fr; } }
.lab-cat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 22px 22px 20px;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--moss);
  text-decoration: none;
  transition: border-color .15s ease, transform .2s ease;
}
.lab-cat:hover { border-color: var(--ink); border-top-color: var(--blaze); transform: translateY(-3px); }
.lab-cat:focus-visible { outline: 2px solid var(--blaze); outline-offset: 3px; }
.lab-cat-name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 28px;
  line-height: 0.95;
  text-transform: uppercase;
  margin: 0;
}
.lab-cat-focus { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); }
.lab-cat-count {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--moss);
}

/* ---------- filters ---------- */
.lab-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin: 0 0 28px;
  padding: 0;
  border: 0;
}
.lab-filter { display: flex; flex-direction: column; gap: 6px; min-width: 150px; flex: 1 1 150px; }
.lab-filter label {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lab-filter select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 11px 36px 11px 12px;
  font: 15px/1.2 var(--f-body);
  color: var(--ink);
  background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23A8B4AA' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--rule);
  border-radius: 0;
  cursor: pointer;
}
.lab-filter select:hover { border-color: var(--ink-soft); }
.lab-filter select:focus-visible { outline: 2px solid var(--blaze); outline-offset: 2px; }
.lab-filter-reset {
  padding: 11px 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--rule);
  cursor: pointer;
}
.lab-filter-reset:hover { color: var(--ink); border-color: var(--ink); }
.lab-filter-reset:focus-visible { outline: 2px solid var(--blaze); outline-offset: 2px; }
.lab-count { margin: -12px 0 22px; }
.lab-empty {
  padding: 32px;
  border: 1px dashed var(--rule);
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- tool cards ---------- */
.lab-card .tool-card-title a { text-decoration: none; }
.lab-card .tool-card-title a:hover { color: var(--blaze); }
.lab-card .tool-card-title a:focus-visible { outline: 2px solid var(--blaze); outline-offset: 3px; }
.lab-card .tool-thumb { position: relative; }
.lab-flag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px 3px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--lab-deep);
  color: var(--ink);
  border: 1px solid var(--rule);
}
.lab-flag--featured { color: var(--moss); border-color: rgba(141, 186, 116, 0.45); }
.lab-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--rule-soft);
}
.lab-facts dt {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lab-facts dd { margin: 2px 0 0; font-size: 14px; color: var(--ink); }
.lab-card .pill-row { gap: 6px; }
.lab-card .pill { font-size: 11.5px; padding: 5px 9px; }
.lab-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin-top: auto;
  padding-top: 14px;
}
.lab-card-actions .button { padding: 12px 18px; font-size: 12px; }
.lab-card-actions .read-link { margin-top: 0; font-size: 12px; }
.lab-access { margin: 0; font-size: 13px; color: var(--ink-soft); }

/* in-development placeholders */
.lab-soon .tool-card-body { padding: 22px; }
.lab-soon .tool-card-title { font-size: 24px; }

/* ---------- section heads on dark ---------- */
.lab .section + .section { border-top-color: var(--rule); }
.lab-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 28px;
}
.lab-section-head .label { font-size: 30px; }

/* ---------- other categories strip ---------- */
.lab-also { display: flex; flex-wrap: wrap; gap: 10px 26px; list-style: none; margin: 0; padding: 0; }
.lab-also a {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--moss);
  padding-bottom: 3px;
}
.lab-also a:hover { color: var(--blaze); border-color: var(--blaze); }

/* ---------- tutoring call-to-action ---------- */
.lab-cta {
  background: var(--lab-deep);
  border-top: 1px solid var(--rule);
}
.lab-cta .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px 56px;
  align-items: end;
}
.lab-cta-title {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 0.92;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.lab-cta p { margin: 0; font-family: var(--f-serif); font-size: 20px; line-height: 1.5; color: var(--text); }
.lab-cta p.eyebrow { margin-bottom: 14px; font-family: var(--f-mono); font-size: 12.5px; line-height: 1.4; color: var(--blaze); }
.lab-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; }
.lab-cta-actions .read-link { margin-top: 0; }
@media (max-width: 760px) { .lab-cta .wrap { grid-template-columns: 1fr; } }


/* ---------- home page (index.html is the Lab) ---------- */
.lab-home-title { margin: 0; line-height: 0; }  /* the logo is the page heading */
.lab-extras { margin-top: 24px; }

/* Members card and the closing call-to-action were dark-on-light in
   site.css; in the Lab they sit on the deepest ground instead. */
.lab .tool-card--members { background: var(--lab-deep); border-color: var(--rule); color: var(--ink); }
.lab .tool-card--members .tool-card-desc { color: var(--ink-soft); }
.lab .contact { background: var(--lab-deep); color: var(--ink); border-top: 1px solid var(--rule); }
.lab .contact .button { color: var(--lab-deep); }
.lab .contact-links a { color: var(--ink); border-bottom-color: var(--rule); }
.lab .contact-links a:hover { color: var(--blaze); }

/* "Details" on a Lab card: a <details>; js/site.js opens it in a pop-up */
.lab-more > summary { list-style: none; cursor: pointer; margin-top: 0; font-size: 12px; }
.lab-more > summary::-webkit-details-marker { display: none; }
.lab-more[open] { flex-basis: 100%; }
.lab-more[open] > .tool-detail { margin-top: 18px; }

/* Private tutoring at the bottom of the home page */
.lab-tutoring { background: var(--lab-deep); }
.lab .section.lab-tutoring + .section.lab-tutoring { border-top: 0; padding-top: 0; }
.lab-tutoring .prose .eyebrow { font-family: var(--f-mono); font-size: 12.5px; line-height: 1.4; }
.lab-tutoring .label { font-size: clamp(30px, 4vw, 44px); }
.lab .prose a.button { color: var(--lab-deep); text-decoration: none; }
.lab .subject-card { background: var(--cream); }

/* ---------- Mathlete Ski (ski/): the same Lab with an icy-blue accent
   in place of trail green ---------- */
body.lab--ski { --moss: #8EC5E0; }
.lab--ski .lab-head { background: radial-gradient(120% 140% at 85% 0%, rgba(142, 197, 224, 0.13), transparent 60%); }
.lab--ski .pill--moss { border-color: rgba(142, 197, 224, 0.45); }

/* ---------- Riding curriculum (riding/): drafts for coach review ---------- */
.ride-banner {
  margin: 0;
  padding: 10px 16px;
  background: var(--contour);
  color: var(--lab-deep);
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-align: center;
}
.lab .ride-title { font-size: clamp(40px, 6vw, 76px); line-height: 0.95; }
.ride-intro { max-width: 46rem; margin: 0 0 28px; color: var(--ink-soft); }
.ride-status--draft { border-color: var(--contour); color: var(--contour); }
.ride-status--specialist { border-color: var(--blaze); color: var(--blaze); }
.ride-status--outline { border-color: var(--rule); color: var(--ink-soft); }
.ride-status--approved { border-color: var(--moss); color: var(--moss); }
.ride-risk--3 { border-color: var(--blaze); color: var(--blaze); }
.ride-card--outline { border-style: dashed; }
.ride-card .pill-row { margin: 4px 0 10px; }

.ride-review-wrap { padding-bottom: 0; }
.ride-review {
  padding: 24px 26px;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--contour);
}
.ride-review-title {
  margin: 0 0 16px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--contour);
}
.ride-review-sub, .ride-sub { margin: 18px 0 6px; font-weight: 600; color: var(--ink); }
.ride-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 24px; margin: 0; }
.ride-facts--stack { grid-template-columns: 1fr; }
.ride-facts dt {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.ride-facts dd { margin: 4px 0 0; color: var(--text); }
.ride-list { margin: 0; padding-left: 20px; }
.ride-list li { margin: 6px 0; }

.ride-section { padding: 48px 0; }
.ride-body p, .ride-body li, .ride-body dd { font-size: 17px; line-height: 1.6; }
.ride-h { margin: 22px 0 6px; font-family: var(--f-display); font-size: 22px; text-transform: uppercase; color: var(--ink); }
.ride-h:first-child { margin-top: 0; }
.ride-flag {
  padding: 10px 14px;
  border: 1px dashed var(--contour);
  font-family: var(--f-mono);
  font-size: 12.5px !important;
  line-height: 1.5 !important;
  color: var(--contour);
}

.ride-table-wrap { overflow-x: auto; }
.ride-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ride-table th, .ride-table td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.ride-table th { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.ride-pending { font-family: var(--f-mono); font-size: 12px; color: var(--contour); white-space: nowrap; }
.ride-check--text { color: var(--moss); }
.ride-check--video, .ride-check--outline { color: var(--contour); }
.ride-check--closed { color: var(--blaze); }

.ride-sources { list-style: none; margin: 0; padding: 0; }
.ride-source { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.ride-source-note { font-size: 15px; color: var(--ink-soft); }

/* ---------- field notes: annotated real-jump photos in a tool's details ---------- */
.field-notes { grid-column: 1 / -1; padding-top: 30px; border-top: 1px solid var(--rule); }
.field-notes-head { max-width: 560px; margin-bottom: 22px; }
.field-notes-head .kicker { margin-bottom: 8px; }
.field-notes-title { margin: 0 0 8px; font-family: var(--f-display); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.1; color: var(--ink); }
.field-notes-lede { margin: 0; color: var(--ink-soft); }
/* Portrait 3:4, portrait 3:4, landscape ~1.53:1: these column widths
   make all three photos the same height. */
.field-notes-grid { display: grid; grid-template-columns: 1fr 1fr 2.04fr; gap: 16px; align-items: start; }
.field-note { margin: 0; }
.field-note .fig-frame { position: relative; border: 1px solid var(--rule); }
.field-note img { display: block; height: auto; }
.field-note figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--text); }
.field-step { display: block; margin-bottom: 4px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blaze-dim); }

.field-ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.field-ink path, .field-ink circle { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.field-ink .fi-path { stroke: #F3F0E7; stroke-width: 2.5; stroke-dasharray: 2 7; }
.field-ink .fi-head { stroke: #F3F0E7; stroke-width: 2.5; }
.field-ink .fi-arc { stroke: var(--blaze); stroke-width: 3; stroke-dasharray: 9 7; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
.field-ink .fi-dot { fill: var(--blaze); stroke: #F3F0E7; stroke-width: 2; }
.field-ink .fi-dot--peak { fill: #F3F0E7; stroke: var(--blaze); }
.field-ink .fi-grid path { stroke: rgba(243, 240, 231, 0.32); stroke-width: 1; }
.field-ink .fi-axis { stroke: rgba(243, 240, 231, 0.8); stroke-width: 1.5; }
/* Labels are HTML, not SVG text, so they stay readable however small the photo is. */
.field-chips { position: absolute; inset: 0; pointer-events: none; }
.fi-chip { position: absolute; padding: 4px 7px; background: rgba(13, 17, 15, 0.84); color: #F3F0E7; font-family: var(--f-mono); font-size: 10.5px; line-height: 1.2; letter-spacing: 0.04em; white-space: nowrap; }
.fi-chip--eq { font-size: 11.5px; padding: 6px 9px; border-left: 2px solid var(--blaze); }
@media (prefers-reduced-motion: no-preference) {
  .field-ink .fi-arc--trace { animation: fi-trace 2.4s linear infinite; }
  @keyframes fi-trace { to { stroke-dashoffset: -32; } }
}

/* One photo beside a numbered list. */
.field-notes--single { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.field-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.field-list li { padding-left: 14px; border-left: 2px solid var(--rule); color: var(--text); line-height: 1.55; }
.tool-card .field-notes--single { grid-template-columns: 1fr; }

@media (max-width: 760px) {
  .field-notes-grid { grid-template-columns: 1fr 1fr; }
  .field-note--wide { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .field-notes-grid { grid-template-columns: 1fr; gap: 24px; }
  .field-notes--single { grid-template-columns: 1fr; gap: 24px; }
}
