/*
  Learn pages, the parts every page shares: headings, a world's hero (path, group, test, My learning) and the gender
  and video tags on course cards. Each page's own parts are in their own files, loaded after this one (_Layout, and
  Looks/LearnStyles.cs for which page takes which): today.css ("Where do I start?" and Today), course.css (a path's
  map, a group, a course, the course list, the path test), lock.css (the lock card and the locked page) and me.css
  (certificates, the certificate, My learning). LD2-0 split them out of this file so each can change on its own.
*/

/* ---------- Shared headings ---------- */
.ln-h2 { font-family: var(--ln-display); font-weight: 600; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.015em; line-height: 1.15; margin: 34px 0 16px; }
.ln-crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 650; opacity: .85; margin-bottom: 14px; }
.ln-crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ln-page-head { padding-top: 24px !important; }
.ln-page-title { font-family: var(--ln-display); font-weight: 600; font-size: clamp(28px, 2.9vw, 40px); line-height: 1.06; letter-spacing: -.02em; margin: 8px 0 6px; text-wrap: balance; }
.ln-page-sub { color: var(--ln-muted); max-width: 64ch; }
.ln-page-head .ln-kicker { color: var(--w-ink); }
.ln-note { font-size: 13px; color: var(--ln-muted); }
.ln-card-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--w-ink); }
.ln-coming-band--light { background: var(--ln-card); box-shadow: var(--ln-shadow); color: var(--ln-ink-2); }
.ln-meter { height: 8px; border-radius: 6px; background: var(--ln-line); overflow: hidden; }
.ln-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--w-accent), var(--w-glow)); }
.ln-gate { padding: 14px 16px; border-radius: 14px; background: rgba(0, 0, 0, .28); font-weight: 600; max-width: 56ch; }

/* ---------- A world's hero (path, group, test) ---------- */
.ln-world-hero, .ln-test-hero, .ln-me-head { position: relative; color: #fff; overflow: hidden; isolation: isolate; min-height: clamp(380px, 46vw, 520px); display: flex; align-items: flex-end; }
.ln-main > .ln-world-hero, .ln-main > .ln-test-hero, .ln-main > .ln-me-head { max-width: none; padding: 0; }
.ln-world-art { position: absolute !important; inset: 0; z-index: -2; }
.ln-world-hero::after, .ln-test-hero::after, .ln-me-head::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, color-mix(in srgb, var(--w-deep) 96%, transparent) 4%, color-mix(in srgb, var(--w-deep) 55%, transparent) 50%, transparent 85%), linear-gradient(90deg, color-mix(in srgb, var(--w-deep) 70%, transparent), transparent 70%); }
/* Right to left, the darker side of the shade and the scene follow the text to the right. */
[dir="rtl"] :is(.ln-world-hero, .ln-test-hero, .ln-me-head)::after { transform: scaleX(-1); }
[dir="rtl"] :is(.ln-world-art, .ln-hero-art) .ln-scene { transform: scaleX(-1); }
.ln-world-in, .ln-me-in { width: 100%; max-width: var(--ln-max); margin: 0 auto; padding: 60px 20px 34px; }
.ln-world-title { font-family: var(--ln-display); font-weight: 600; font-size: clamp(34px, 5vw, 60px); line-height: 1.03; letter-spacing: -.025em; margin: 10px 0 12px; max-width: 18ch; text-wrap: balance; text-shadow: 0 2px 30px rgba(0, 0, 0, .3); }
.ln-world-sum { font-size: clamp(15px, 1.4vw, 18px); color: rgba(255, 255, 255, .86); max-width: 62ch; }
.ln-world-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ln-world-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: 24px; }
.ln-world-stats { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-top: 22px; font-size: 13px; color: rgba(255, 255, 255, .78); }
.ln-world-row .ln-world-stats { margin-top: 0; }
.ln-world-stats li { display: flex; flex-direction: column; }
.ln-world-stats b { font-family: var(--ln-display); font-size: 34px; line-height: 1; color: #fff; }
.ln-world-stats small { font-size: 18px; opacity: .6; }
.ln-world-stats--ink { color: var(--ln-muted); }
.ln-world-stats--ink b { color: var(--ln-ink); }
.ln-world-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.ln-world-row .ln-world-cta { margin-top: 0; }
.ln-metaphor { margin-top: 18px; font-size: 13.5px; font-style: italic; color: var(--w-glow); font-family: var(--ln-display); }

/* ---------- Narrow screens ---------- */
@media (max-width: 620px) {
  .ln-world-stats b { font-size: 26px; }
  .ln-world-in { padding-top: 120px; }
}

/* A course written for one gender in a path for everyone: its tag, and the station drawn lighter when it is optional for this learner. */
.ln-gender-tag, .ln-course-tile .ln-gender-tag { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; margin: 0 0 4px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 750; letter-spacing: .02em; line-height: 1.5; background: var(--w-soft); color: var(--w-deep); }
.ln-gender-tag.is-either, .ln-course-tile .ln-gender-tag.is-either { background: color-mix(in srgb, var(--w-accent) 22%, var(--w-soft)); }
.ln-gender-tag.is-optional, .ln-course-tile .ln-gender-tag.is-optional { background: transparent; color: var(--ln-muted); box-shadow: inset 0 0 0 1px var(--ln-line-2); }
.ln-gender-tag.is-optional::before { content: "◇"; font-size: 10px; }
.ln-station.is-optional .ln-station-card { background: transparent; box-shadow: none; outline: 1.5px dashed var(--ln-line-2); outline-offset: -1.5px; }
.ln-station.is-optional .ln-station-node { opacity: .6; box-shadow: inset 0 0 0 2px var(--ln-line-2); }
.ln-station.is-optional .ln-station-cover { opacity: .7; }
.ln-beads i.is-optional { opacity: .35; }
.ln-path-opt { font-size: 12px; font-weight: 650; color: var(--ln-muted); }
.ln-path-opt::before { content: "◇ "; color: var(--w-ink); }
.ln-me-path-opt { font-size: 11.5px; color: rgba(255, 255, 255, .8); }

/* ---------- Videos (LV1) ---------- */
/* The "Videos" tag: a play mark and how many lessons have a video, on course cards, the course page, the path's
   stations and My learning; the "With videos" switch on the course list; the play mark on a lesson with a video. */
.ln-video-tag, .ln-course-tile .ln-video-tag { display: inline-flex; align-self: flex-start; justify-self: start; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .02em; line-height: 1.5; white-space: nowrap; color: var(--w-ink); background: color-mix(in srgb, var(--w-accent) 15%, var(--ln-card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--w-accent) 38%, transparent); -webkit-line-clamp: unset; overflow: visible; }
.ln-video-tag svg { width: 9px; height: 9px; flex: none; fill: currentColor; }
.ln-course-tile .ln-video-tag span:not(.visually-hidden) { display: inline; font-size: inherit; color: inherit; overflow: visible; }
.ln-course-tile .ln-tile-cover { position: relative; display: block; overflow: visible; color: inherit; font-size: inherit; }
.ln-course-tile .ln-tile-cover img { display: block; }
/* On a cover, the tag sits in its corner like a video's length, readable on any picture in either theme. */
.ln-course-tile .ln-tile-cover .ln-video-tag { position: absolute; bottom: 8px; inset-inline-end: 8px; padding: 3px 10px 3px 8px; font-size: 11.5px; color: #fff; background: rgba(12, 14, 24, .74); box-shadow: 0 0 0 1px rgba(255, 255, 255, .16); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ln-course-tile .ln-tile-cover .ln-video-tag svg { width: 10px; height: 10px; color: var(--w-glow, #fff); }
/* On the dark heads and panels (course page, next step), light on glass. */
.ln-course-meta .ln-course-meta-video { padding: 0; background: none; box-shadow: none; backdrop-filter: none; }
.ln-course-meta .ln-video-tag, .ln-next-body .ln-video-tag { height: 100%; padding: 5px 12px 5px 10px; font-size: 13px; font-weight: 750; letter-spacing: 0; color: #fff; background: color-mix(in srgb, var(--w-accent) 38%, rgba(255, 255, 255, .1)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ln-course-meta .ln-video-tag svg, .ln-next-body .ln-video-tag svg { width: 10px; height: 10px; }
.ln-next-body > .ln-video-tag { margin-top: 4px; padding: 2px 10px 2px 8px; font-size: 11.5px; opacity: 1; }
.ln-rail-body .ln-video-tag { justify-self: start; margin-top: 3px; font-size: 10.5px; color: var(--w-ink); }
.ln-continue-row .ln-video-tag { margin-inline-start: auto; flex: none; }
.ln-stop-detail .ln-video-tag { margin: 2px 0 4px; }
.ln-clink-meta .ln-video-tag { align-self: center; }

/* The switch beside the search: a real checkbox, so it is announced and reached like one. */
.ln-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.ln-filter-bar .ln-filter { flex: 1 1 260px; max-width: 460px; }
.ln-filter-bar .ln-filter input { margin-top: 0; width: 100%; }
.ln-filter-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px 0 12px; border-radius: 14px; cursor: pointer; user-select: none; -webkit-user-select: none; font-size: 14px; font-weight: 750; color: var(--ln-ink); background: var(--ln-card); box-shadow: var(--ln-shadow), inset 0 0 0 1px var(--ln-line-2); transition: background .2s, box-shadow .2s, transform .2s var(--ln-ease); }
.ln-filter-chip:hover { transform: translateY(-1px); box-shadow: var(--ln-shadow), inset 0 0 0 1.5px var(--w-accent); }
.ln-filter-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ln-filter-chip svg { width: 22px; height: 22px; padding: 6px 5px 6px 7px; border-radius: 50%; flex: none; fill: var(--w-ink); background: color-mix(in srgb, var(--w-accent) 16%, transparent); transition: background .2s, fill .2s; }
.ln-filter-chip small { min-width: 26px; padding: 1px 7px; border-radius: 999px; text-align: center; font-size: 11.5px; font-weight: 800; color: var(--ln-muted); background: color-mix(in srgb, var(--ln-ink) 7%, transparent); }
.ln-filter-chip:has(input:checked) { color: var(--w-ink); background: color-mix(in srgb, var(--w-accent) 14%, var(--ln-card)); box-shadow: var(--ln-shadow), inset 0 0 0 2px var(--w-accent); }
.ln-filter-chip:has(input:checked) svg { fill: #fff; background: var(--w-accent); }
.ln-filter-chip:has(input:checked) small { color: var(--w-ink); background: color-mix(in srgb, var(--w-accent) 22%, transparent); }
.ln-filter-chip:has(input:checked)::after { content: "✓"; font-weight: 900; color: var(--w-ink); }
.ln-filter-chip:has(input:focus-visible) { outline: 3px solid var(--w-accent); outline-offset: 2px; }
.ln-no-match--videos { display: grid; justify-items: center; gap: 8px; }
/* The quick search hides the tiles that do not match (a tile's own display would otherwise keep it on show). */
.ln-course-tile[hidden] { display: none; }

/* A lesson with a video: the play mark first, filled in the world's colour; still shown on a phone. */
.ln-lesson-video { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--w-accent); box-shadow: 0 3px 10px -4px var(--w-accent); }
.ln-lesson-video svg { width: 10px; height: 10px; fill: #fff; margin-inline-start: 1px; }
[dir="rtl"] .ln-lesson-video svg { margin-inline-start: 0; margin-inline-end: -1px; }
/* The path's map: a small play mark after a station's name, and how many courses have videos among the stats. */
.ln-stop-video { display: inline-block; width: 9px; height: 9px; margin-inline-end: 5px; vertical-align: 0; fill: currentColor; opacity: .9; }
.ln-world-stat-video b { display: inline-flex; align-items: center; gap: 6px; }
.ln-world-stat-video b svg { width: 18px; height: 18px; fill: var(--w-glow, #fff); }

/* ---------- Search as you type (LD2-F, find.js) ---------- */
/* The first results under a search box (the bar, the menu, Explore, search): a list box above the page, each result
   its kind's dot, its name with the words lit, and where it sits; "See every result" at the foot. */
.ln-suggest { position: absolute; z-index: 80; top: calc(100% + 8px); inset-inline-start: 0; width: max(100%, min(440px, 92vw)); max-height: min(70vh, 460px); overflow-y: auto; padding: 6px; border-radius: 18px; background: var(--ln-card); color: var(--ln-ink); box-shadow: var(--ln-shadow-lift), 0 0 0 1px var(--ln-line); text-align: start; }
.ln-bar .ln-suggest { inset-inline-start: auto; inset-inline-end: 0; }
.ln-suggest[hidden] { display: none; }
.ln .ln-suggest-item { display: grid; grid-template-columns: 10px minmax(0, 1fr); grid-template-areas: "dot title" "dot where"; gap: 0 10px; align-items: center; padding: 8px 10px; border-radius: 12px; }
.ln-suggest-item[aria-selected="true"], .ln-suggest-item:hover { background: color-mix(in srgb, var(--w-accent, #f29a3f) 12%, transparent); }
.ln-suggest-kind { grid-area: dot; width: 8px; height: 8px; border-radius: 50%; background: var(--w-accent, #f29a3f); }
.ln-suggest-kind--lesson, .ln-suggest-kind--term, .ln-suggest-kind--dua { background: transparent; box-shadow: inset 0 0 0 2px var(--w-accent, #f29a3f); }
.ln-suggest-title { grid-area: title; font-weight: 700; font-size: 14px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln-suggest-where { grid-area: where; font-size: 12px; color: var(--ln-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ln .ln-suggest-all { display: block; margin-top: 4px; padding: 9px 10px; border-top: 1px solid var(--ln-line); font-size: 13px; font-weight: 750; color: var(--w-ink, var(--ln-ink)); }
.ln-suggest mark { color: inherit; background: color-mix(in srgb, var(--w-glow, #ffd27a) 55%, transparent); border-radius: 3px; padding: 0 1px; }
