/* Core curriculum page (curriculum.html) and module overview pages (modules/*.html).
   Informational only: no learner progress is shown here. Loaded after theme.css. */

.cur-page { --c: var(--route-core); }
.cur-page .page-hero { padding: 56px 0 40px; }
.cur-page .page-hero h1 { font-size: clamp(2.4rem, 4.4vw, 3.8rem); }
.cur-page .breadcrumbs a { color: inherit; }
.cur-section { padding: 48px 0; }
.cur-section + .cur-section { padding-top: 8px; }
.cur-section > .shell > h2 { margin: 0 0 6px; font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.cur-section > .shell > .cur-intro { margin: 0 0 24px; max-width: 720px; color: var(--muted); }

/* Facts under the hero title */
.cur-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.cur-facts li { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: .86rem; }
.cur-facts b { font-weight: 600; }

/* The path: Module 1 -> 2 -> 3 -> Assessment */
.cur-path { position: relative; display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.cur-path::before { content: ''; position: absolute; left: 10%; right: 10%; top: 17px; height: 3px; border-radius: 2px; background: var(--route-core); }
.cur-path li { position: relative; text-align: center; }
.cur-path a, .cur-path span.cur-stop { display: grid; justify-items: center; gap: 4px; padding: 0 4px 6px; color: var(--ink); text-decoration: none; }
.cur-dot { display: grid; place-items: center; width: 36px; height: 36px; border: 3px solid var(--route-core); border-radius: 50%; background: #fff; color: var(--route-core); font-family: var(--plex-mono); font-size: .82rem; font-weight: 600; }
.cur-path strong { margin-top: 6px; font-size: .95rem; font-weight: 600; line-height: 1.25; }
.cur-path small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.cur-path a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.cur-path li.is-here .cur-dot { background: var(--route-core); color: #fff; }
.cur-path li.is-here strong { color: var(--route-core); }
.cur-path li.is-end .cur-dot { width: 28px; height: 28px; margin: 4px 0; }

/* One module block on the curriculum page */
.cur-module { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 20px 40px; padding: 28px 0; border-top: 1px solid var(--line); }
.cur-module:first-of-type { border-top: 0; padding-top: 4px; }
.cur-module-head .cur-kicker { margin: 0 0 6px; color: var(--route-core); font-family: var(--plex-mono); font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.cur-module-head h3 { margin: 0 0 8px; font-size: 1.35rem; line-height: 1.25; }
.cur-module-head p { margin: 0 0 12px; color: var(--muted); font-size: .95rem; }
.cur-more { color: var(--route-core); font-size: .9rem; font-weight: 600; text-decoration: none; }
.cur-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Lesson rows (curriculum page and module pages) */
.cur-lessons { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.cur-lessons li { display: grid; grid-template-columns: 52px 1fr auto; align-items: baseline; gap: 4px 14px; padding: 14px 18px; border-top: 1px solid var(--line); }
.cur-lessons li:first-child { border-top: 0; }
.cur-lessons .cur-n { color: var(--muted); font-family: var(--plex-mono); font-size: .82rem; font-weight: 600; }
.cur-lessons .cur-t { margin: 0; font-size: 1rem; font-weight: 600; }
.cur-lessons .cur-t a { color: var(--ink); text-decoration: none; }
.cur-lessons .cur-t a:hover { color: var(--route-core); text-decoration: underline; text-underline-offset: 3px; }
.cur-lessons .cur-d { grid-column: 2 / 4; margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.cur-lessons li.is-dev .cur-t a { color: var(--muted); }
.cur-tag { justify-self: end; padding: 2px 9px; border-radius: 999px; background: #e7f1ef; color: #2f6f66; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.cur-tag.dev { background: var(--route-soft); color: var(--muted); }
.cur-tag.opt { border: 1px solid var(--line); background: #fff; color: var(--muted); }
.cur-lessons.is-big li { padding: 18px 22px; }
.cur-lessons.is-big .cur-t { font-size: 1.1rem; }

/* Optional tracks */
.cur-tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cur-track { padding: 22px 24px; border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 12px; background: #fff; }
.cur-track h3 { margin: 0 0 4px; color: var(--c); font-size: 1.2rem; }
.cur-track > p { margin: 0 0 14px; color: var(--muted); font-size: .92rem; }
.cur-track ol { margin: 0 0 14px; padding: 0; list-style: none; }
.cur-track li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.cur-track li:first-child { border-top: 0; }
.cur-track li a { color: var(--ink); text-decoration: none; }
.cur-track li a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cur-track .cur-more { color: var(--c); }

/* Callout and next/previous links on module pages */
.cur-note { padding: 16px 20px; border-left: 4px solid var(--c, var(--route-core)); border-radius: 0 10px 10px 0; background: var(--route-soft); font-size: .95rem; }
.cur-note p { margin: 0; }
.cur-pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line); }
.cur-pager a { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; }
.cur-pager a:hover { border-color: var(--route-core); }
.cur-pager small { color: var(--muted); font-size: .76rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.cur-pager strong { font-size: .98rem; font-weight: 600; }
.cur-pager .next { margin-left: auto; text-align: right; }

@media (max-width: 860px) {
  .cur-module { grid-template-columns: 1fr; }
  .cur-tracks { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .cur-path { grid-template-columns: 1fr; gap: 0; }
  .cur-path::before { left: 17px; right: auto; top: 18px; bottom: 18px; width: 3px; height: auto; }
  .cur-path li { text-align: left; }
  .cur-path a, .cur-path span.cur-stop { grid-template-columns: 36px 1fr; justify-items: start; column-gap: 14px; padding: 6px 0; }
  .cur-path .cur-dot { grid-row: span 2; }
  .cur-path li.is-end .cur-dot { margin: 4px; }
  .cur-path strong { margin-top: 0; }
  .cur-lessons li { grid-template-columns: 40px 1fr; padding: 12px 14px; }
  .cur-lessons .cur-d { grid-column: 2; }
  .cur-tag { grid-column: 2; justify-self: start; }
}

/* The core lessons ribbon: Start -> Modules 1-3 -> Finish. Moved from the home page; tokens kept local. */
.cur-core .ribbon {
  --ink: #141a24; --ink-2: #3a4250; --muted: #5d6572; --wash: #eef4fb;
  --core: #13294a; --core-deep: #0c1c33; --check: #8ec1ee; --m1: #6aaee8; --m2: #3b82d0; --m3: #2557a5;
  --sans: 'IBM Plex Sans', 'Plex Fallback', system-ui, sans-serif; --serif: 'IBM Plex Serif', Georgia, serif; --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --wip: #b7bec8;
  --route: linear-gradient(90deg, var(--wip), var(--wip) 5%, var(--m1) 12%, var(--m2) 48%, var(--m2) 60%, var(--wip) 66%, var(--wip));
  position: relative; display: grid; grid-template-columns: auto 5fr 4fr 5fr auto; gap: 0 10px;
  padding: 30px 30px 26px; border-radius: 20px; background: var(--wash); color: var(--ink); font-family: var(--sans);
}
.cur-core .ribbon::before { content: ''; position: absolute; left: 30px; right: 30px; top: 94px; height: 14px; border-radius: 7px; background: var(--route); }
.cur-core .tx { color: color-mix(in srgb, var(--mc) 74%, #000); }
.cur-core .rg { position: relative; display: flex; flex-direction: column; min-width: 0; }
.cur-core .rg-h { height: 56px; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 4px 12px; }
.cur-core .rg-h small { font-weight: 600; font-size: .84rem; }
.cur-core .rg-h strong { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; line-height: 1.2; }
.cur-core .rg-dots { display: flex; justify-content: space-around; align-items: center; height: 30px; }
.cur-core .rd { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 4px solid var(--mc); font: 700 .62rem var(--mono); color: var(--ink); text-decoration: none; transition: transform .2s var(--ease-out), background-color .2s ease, color .2s ease; }
.cur-core .rd:active { transform: scale(.94); }
.cur-core .rd .tip { position: absolute; bottom: calc(100% + 10px); left: 50%; width: max-content; max-width: 220px; padding: 7px 11px; border-radius: 8px; background: var(--core-deep); color: #fff; font: 500 .84rem/1.3 var(--sans); text-align: center; opacity: 0; transform: translate(-50%, 4px) scale(.97); transform-origin: bottom center; pointer-events: none; transition: opacity .14s ease, transform .16s var(--ease-out); }
.cur-core .rd:hover .tip, .cur-core .rd:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); }
@media (hover: hover) and (pointer: fine) { .cur-core .rd:hover { transform: scale(1.15); background: var(--mc); color: #fff; } }
.cur-core .rg-list { list-style: none; margin: 14px 0 0; padding: 0 4px; font-size: .9rem; color: var(--ink-2); display: grid; gap: 3px; }
.cur-core .rg-list li { display: grid; grid-template-columns: 30px 1fr; gap: 4px; }
.cur-core .rg-list b { font-weight: 600; font-size: .82rem; padding-top: 1px; }
.cur-core .rg-list a { color: inherit; text-decoration: none; }
.cur-core .rg-list a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.cur-core .rg.cap .rg-dots { justify-content: center; }
.cur-core .rg.cap .rd { width: 40px; height: 40px; font-size: .6rem; }
.cur-core .rg.cap .rg-h { align-items: center; text-align: center; }
.cur-core .rg.cap p { font-size: .84rem; color: var(--muted); text-align: center; margin: 14px auto 0; max-width: 11ch; }
@media (max-width: 1000px) {
  .cur-core .ribbon { grid-template-columns: 5fr 4fr 5fr; }
  .cur-core .ribbon .rg.cap { display: none; }
}
@media (max-width: 700px) {
  .cur-core .ribbon { grid-template-columns: 1fr; padding: 22px 20px 22px 58px; }
  .cur-core .ribbon::before { left: 28px; right: auto; top: 30px; bottom: 30px; width: 10px; height: auto; background: linear-gradient(var(--m1), var(--m2) 60%, var(--wip) 70%); }
  .cur-core .rg { padding-bottom: 18px; }
  .cur-core .rg-h { height: auto; padding: 0 0 6px; }
  .cur-core .rg-dots { display: none; }
  .cur-core .rg-list { margin-top: 4px; padding: 0; }
  .cur-core .rg::before { content: ''; position: absolute; left: -38px; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--mc); }
}

/* Steps still in development (.wip) are drawn in gray. */
.cur-path li.wip .cur-dot { border-color: #b7bec8; color: var(--muted); }
.cur-path li.wip strong { color: var(--muted); }
.cur-core .rg.wip { --mc: #b7bec8 !important; }
.cur-core .rg.wip .rg-h strong, .cur-core .rg.wip .rg-list { color: var(--muted); }
.cur-core .rg.cap p span { display: block; font-size: .78rem; }
.cur-module.wip .cur-module-head .cur-kicker { color: var(--muted); }
.cur-module.wip .cur-module-head h3, .cur-module.wip .cur-t a { color: var(--muted); }
.cur-track.wip { --c: #8a94a3 !important; }
