/* The course "מעלים לחנות": the sales page (/course, classes .cs-*) and the private lesson area that
   internal/course/build_course_site.py builds (classes .ca-*). Loaded after styles.css and built only
   from its tokens, type and components, so both display modes and the accessibility settings carry over.
   The colours keep their meanings: amber is the one action, sky the steps before the store, mint what is
   done or included. Official English text is set left to right on a panel with a sky edge, apart from ours. */

/* ======================================================================= the sales page */

.cs-hero { position: relative; isolation: isolate; padding: 64px 0 72px; overflow-x: clip; }
.cs-hero::before {
  content: ''; position: absolute; z-index: -1; inset-inline: -10%; top: -120px; height: 560px; pointer-events: none;
  background: radial-gradient(42% 46% at 72% 40%, var(--spot), transparent 72%);
}
.cs-hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 56px; align-items: center; }
.cs-kicker {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; padding: 4px 14px 4px 12px; border-radius: 999px;
  font-size: var(--fs-meta); font-weight: 600; color: var(--ink); border: 1px solid var(--line-2);
}
.cs-kicker::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--sky); }
.cs-hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); line-height: 1.08; letter-spacing: -.024em; }
.cs-hero .h1-q { color: var(--ink-soft); }
.cs-lead { margin-top: 26px; font-size: var(--fs-lead); line-height: 1.7; max-width: 34em; }
.cs-lead a { color: var(--ink); }
.cs-by { display: flex; align-items: center; gap: 12px; margin-top: 22px; font-size: var(--fs-meta); color: var(--ink-soft); }
.cs-by img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; background: var(--surface); outline: 1px solid var(--line-2); outline-offset: 2px; }
.cs-by b { color: var(--ink); font-weight: 600; }
.cs-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 0; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.cs-facts li { display: flex; flex-direction: column; gap: 2px; padding-inline-end: 26px; margin-inline-end: 26px; border-inline-end: 1px solid var(--line); }
.cs-facts li:last-child { border-inline-end: 0; margin-inline-end: 0; padding-inline-end: 0; }
.cs-facts b { font-family: var(--font-display); font-weight: 700; font-size: 1.85rem; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.cs-facts span { font-size: var(--fs-meta); color: var(--ink-soft); }
.cs-facts .cs-stores { flex-direction: row; align-items: center; gap: 8px; }
.cs-stores img { display: block; width: 24px; height: 24px; }
.cs-stores span { color: var(--ink); font-size: var(--fs-ui); font-weight: 500; }

/* a real page from lesson 6.1: the official sentence, then what it means */
.cs-sample {
  position: relative; margin: 0; padding: 22px 22px 18px; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 24px; box-shadow: var(--shadow-panel); transform: rotate(-1.2deg);
}
.cs-sample-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cs-sample-pill { display: inline-flex; padding: 2px 11px; border-radius: 999px; font-size: var(--fs-meta); font-weight: 600; color: var(--sky-text); border: 1px solid color-mix(in srgb, var(--sky-text) 50%, transparent); font-variant-numeric: tabular-nums; }
.cs-sample-time { font-size: var(--fs-meta); color: var(--ink-soft); }
.cs-sample-title { margin: 0 0 14px; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; line-height: 1.3; color: var(--ink); }
.cs-sample-q { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); border-inline-start: 3px solid var(--sky-text); }
.cs-sample-q p { margin: 0; font-size: var(--fs-meta); line-height: 1.6; color: var(--ink); text-align: left; }
.cs-sample-q .cs-sample-src { margin-top: 6px; text-align: right; font-size: var(--fs-fine); color: var(--ink-soft); }
.cs-sample-note { margin: 0 0 12px; font-size: var(--fs-ui); line-height: 1.6; color: var(--ink-soft); }
.cs-sample-note b { color: var(--ink); }
.cs-sample-kit { display: flex; align-items: center; gap: 8px; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: var(--fs-meta); color: var(--ink); }
.cs-sample-kit span { padding: 1px 9px; border-radius: 999px; font-weight: 600; color: var(--mint-text); border: 1px solid color-mix(in srgb, var(--mint-text) 50%, transparent); }
.cs-sample figcaption { margin-top: 14px; font-size: var(--fs-fine); line-height: 1.5; color: var(--ink-soft); }

/* who it is for: three lines on hairlines, the tool on the start side */
.cs-for-list { list-style: none; margin-top: 36px; max-width: 980px; }
.cs-for-list li { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr); gap: 8px 40px; padding: 24px 0; border-top: 1px solid var(--line); }
.cs-for-list li:last-child { border-bottom: 1px solid var(--line); }
.cs-for-list h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; line-height: 1.4; color: var(--ink); }
.cs-for-list p { margin: 0; line-height: 1.7; }
.cs-for-list .cs-honest { display: block; margin-top: 10px; color: var(--ink); }
.cs-for-list .cs-honest b { -webkit-box-decoration-break: clone; box-decoration-break: clone; background: linear-gradient(color-mix(in srgb, var(--mint) 30%, transparent), color-mix(in srgb, var(--mint) 30%, transparent)) right 0 bottom .12em / 100% .34em no-repeat; }

/* what is inside: the nine parts down one road, the kit beside them */
.cs-inside-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 56px; align-items: start; margin-top: 44px; }
.cs-road { list-style: none; position: relative; }
.cs-road::before {
  content: ''; position: absolute; inset-inline-start: 19px; top: 22px; bottom: 30px; width: 2px; border-radius: 2px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--sky) 60%, transparent), color-mix(in srgb, var(--sky) 60%, transparent) 86%, color-mix(in srgb, var(--mint) 70%, transparent));
}
.cs-road li { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 18px; padding: 0 0 22px; }
.cs-road li:last-child { padding-bottom: 0; }
.cs-node {
  position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--c, var(--sky)); color: var(--ink); font-size: var(--fs-ui); font-weight: 600; font-variant-numeric: tabular-nums;
}
.cs-road b { display: block; padding-top: 7px; font-size: 1.1rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.cs-road li > div > span { display: block; margin-top: 4px; color: var(--ink-soft); line-height: 1.6; }
.cs-road small { color: var(--ink-soft); font-size: var(--fs-meta); font-weight: 400; margin-inline-start: 6px; }
.cs-kit { position: sticky; top: 100px; padding: 26px 24px 24px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; }
.cs-kit h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.3; margin-bottom: 6px; color: var(--ink); }
.cs-kit > p { font-size: var(--fs-ui); margin-bottom: 16px; }
.cs-kit ul { list-style: none; display: grid; gap: 11px; }
.cs-kit li { position: relative; padding-inline-start: 26px; font-size: var(--fs-ui); line-height: 1.55; color: var(--ink); }
.cs-kit li::before, .cs-ticks li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: .32em; width: 15px; height: 15px; background: var(--mint-text);
  -webkit-mask: var(--tick) center / contain no-repeat; mask: var(--tick) center / contain no-repeat;
}

/* what it is not: three plain columns, each with a drawn cross in the quiet ink */
.cs-nots { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.cs-nots li { padding: 24px 22px; border: 1px solid var(--line); border-radius: 20px; }
.cs-nots h3 { position: relative; padding-inline-start: 26px; font-size: 1.12rem; line-height: 1.4; margin-bottom: 8px; color: var(--ink); }
.cs-nots h3::before, .cs-nots h3::after { content: ''; position: absolute; inset-inline-start: 2px; top: .7em; width: 14px; height: 1.6px; border-radius: 2px; background: var(--ink-soft); transform: rotate(45deg); }
.cs-nots h3::after { transform: rotate(-45deg); }
.cs-nots p { margin: 0; font-size: var(--fs-ui); line-height: 1.65; }

/* the price: one card, the credit rule beside it */
.cs-price-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: stretch; margin-top: 40px; max-width: 980px; }
.cs-price-card { margin: 0; }
.cs-price-card .price-fig { margin-bottom: 6px; }
.cs-price-once { font-size: var(--fs-ui); color: var(--ink); margin-bottom: 22px; }
.cs-price-card .price-list { margin-bottom: 0; }
.cs-price-side { display: flex; flex-direction: column; gap: 16px; }
.cs-credit { padding: 22px 22px 20px; border-radius: 20px; background: color-mix(in srgb, var(--mint) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--mint-text) 38%, transparent); }
.cs-credit p { margin: 0; color: var(--ink); font-size: var(--fs-body); line-height: 1.65; }
.cs-credit .cs-credit-k { margin-bottom: 6px; font-size: var(--fs-meta); font-weight: 600; color: var(--mint-text); }
.cs-price-notes { list-style: none; }
.cs-price-notes li { padding: 14px 0; border-top: 1px solid var(--line); font-size: var(--fs-ui); color: var(--ink-soft); }
.cs-price-notes li:last-child { border-bottom: 1px solid var(--line); }

/* the founder links on to the apps page */
.cs-founder-more { margin-top: 22px; }

/* the one button: a WhatsApp message to Isaac, under a warm light */
.cs-join { padding-bottom: 130px; }
.cs-join-box {
  position: relative; isolation: isolate; max-width: 760px; margin: 0 auto; padding: 52px 40px 44px; text-align: center;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 28px;
}
.cs-join-box::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 260px; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0%, color-mix(in srgb, var(--amber) 13%, transparent), transparent 72%);
}
.cs-join-box h2 { margin: 0 auto 14px; max-width: 18ch; }
.cs-join-box > p { max-width: 32em; margin: 0 auto 28px; font-size: var(--fs-lead); line-height: 1.65; }
.cs-join-box .btn { white-space: normal; text-align: center; }
.cs-join-box .btn svg { width: 20px; height: 20px; }
.cs-join-hours { margin-top: 16px !important; font-size: var(--fs-meta) !important; color: var(--ink-soft); }

@media (max-width: 980px) {
  .cs-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .cs-sample { max-width: 520px; transform: none; }
  .cs-inside-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .cs-kit { position: static; }
}
@media (max-width: 760px) {
  .cs-for-list li { grid-template-columns: minmax(0, 1fr); padding: 20px 0; }
  .cs-nots { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cs-price-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 640px) {
  .cs-hero { padding: 32px 0 52px; }
  .cs-hero h1 { font-size: 2.2rem; line-height: 1.12; }
  .cs-lead { font-size: var(--fs-body); }
  .cs-facts li { padding-inline-end: 16px; margin-inline-end: 16px; }
  .cs-facts b { font-size: 1.5rem; }
  .cs-sample { padding: 18px 16px 16px; border-radius: 20px; }
  .cs-join { padding-bottom: 96px; }
  .cs-join-box { padding: 36px 20px 32px; border-radius: 22px; }
  .cs-join-box .btn { width: 100%; }
}
@media (max-width: 380px) {
  .cs-facts li:nth-child(3) { border-inline-end: 0; margin-inline-end: 0; padding-inline-end: 0; }
}

/* ======================================================================= the lesson area */

/* the preview banner: never on a student build */
.ca-preview { padding: 10px 0; font-size: var(--fs-meta); line-height: 1.5; color: var(--ink); background: color-mix(in srgb, var(--amber) 15%, var(--bg)); border-bottom: 1px solid color-mix(in srgb, var(--amber-text) 45%, transparent); }
.ca-preview b { color: var(--amber-text); }
.ca-preview code { direction: ltr; unicode-bidi: isolate; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95em; }

.ca .container { max-width: 800px; }
.ca-crumb { font-size: var(--fs-meta); color: var(--ink-soft); margin-bottom: 24px; }
.ca-crumb a { color: var(--ink-soft); }
.ca-head { padding-bottom: 6px; margin-bottom: 8px; }
.ca-num { display: inline-flex; align-items: baseline; gap: 6px; margin-bottom: 14px; padding: 3px 13px; border-radius: 999px; border: 1px solid var(--line-2); font-size: var(--fs-meta); color: var(--ink-soft); }
.ca-num b { font-weight: 600; color: var(--sky-text); font-variant-numeric: tabular-nums; }
.ca-head-kit .ca-num b { color: var(--mint-text); }
.guide-body.ca h1 { margin-bottom: 12px; }
.page-body .ca-meta { margin: 0 0 6px; font-size: var(--fs-meta); color: var(--ink-soft); }
.ca-meta a { color: var(--ink-soft) !important; }
.ca-outcome { margin: 18px 0 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; }
.page-body .ca-outcome p { margin: 0; color: var(--ink); }
.page-body .ca-outcome .ca-outcome-k { margin-bottom: 4px; font-size: var(--fs-meta); font-weight: 600; color: var(--mint-text); }

/* reading */
.ca-body { padding-top: 10px; overflow-wrap: break-word; }
.guide-body .ca-body h2 { margin-top: 46px; scroll-margin-top: 96px; }
.guide-body .ca-body h3 { margin: 30px 0 10px; font-size: 1.15rem; line-height: 1.4; color: var(--ink); }
.ca-body hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.ca-body a:not(.btn) { color: var(--ink); text-decoration-color: color-mix(in srgb, var(--amber-text) 55%, transparent); text-underline-offset: .3em; }
.ca-body a:not(.btn):hover { text-decoration-color: currentColor; }
.ca-body .ca-url { overflow-wrap: anywhere; }
.ca-body code {
  direction: ltr; unicode-bidi: isolate; padding: .08em .38em; border-radius: 6px; background: var(--surface); border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: .88em; color: var(--ink); overflow-wrap: anywhere;
}

/* official English text: left to right, on a panel with a sky edge, the source in Hebrew under it */
.ca-body blockquote { margin: 16px 0 22px; padding: 14px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.ca-body .ca-q { border-inline-start: 3px solid var(--sky-text); }
.page-body .ca-q p, .page-body .ca-q li { margin: 0 0 10px; font-size: var(--fs-ui); line-height: 1.65; color: var(--ink); }
.page-body .ca-q > :last-child, .page-body .ca-q li:last-child { margin-bottom: 0; }
.ca-q p[dir="ltr"], .ca-q ul[dir="ltr"], .ca-q ol[dir="ltr"] { text-align: left; }
.page-body .ca-q ul, .page-body .ca-q ol { margin: 0 0 10px; padding-inline-start: 20px; }
.page-body .ca-q .ca-q-src { margin: 8px 0 12px; font-size: var(--fs-meta); line-height: 1.55; color: var(--ink-soft); }
.page-body .ca-q .ca-q-src:last-child { margin-bottom: 0; }
.ca-q-src a { color: var(--ink-soft) !important; }
/* a note of ours in a box: Hebrew, no edge */
.ca-body .ca-note { border-color: var(--line-2); }
.page-body .ca-note p { color: var(--ink); margin: 0 0 8px; }
.page-body .ca-note p:last-child { margin-bottom: 0; }

/* numbered references to the sources at the end of a kit document */
.page-body .ca-ref-label { margin: 22px 0 6px; font-size: var(--fs-meta); font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; scroll-margin-top: 96px; }
.ca-ref-label:target { color: var(--amber-text); }
.ca-body a.ca-ref { padding: 0 1px; font-size: .86em; font-variant-numeric: tabular-nums; color: var(--sky-text); text-decoration: none; }
.ca-body a.ca-ref:hover { text-decoration: underline; }

/* prompts, templates and code: a copy button, lines that wrap, the direction of the text inside */
.ca-code { margin: 12px 0 24px; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: var(--surface); }
.ca-code-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 4px 6px 4px 14px; border-bottom: 1px solid var(--line); }
.ca-code-lang { font-size: var(--fs-fine); color: var(--ink-soft); direction: ltr; }
.ca-copy {
  position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 14px; border-radius: 999px;
  background: transparent; color: var(--ink); border: 1px solid var(--edge); cursor: pointer;
  font-family: var(--font-body); font-size: var(--fs-meta); font-weight: 600; transition: border-color .2s var(--ease), color .2s var(--ease);
}
.ca-copy::before {
  content: ''; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='13' height='13' rx='2.5'/%3E%3Cpath d='M16 8V5.5A2.5 2.5 0 0 0 13.5 3h-8A2.5 2.5 0 0 0 3 5.5v8A2.5 2.5 0 0 0 5.5 16H8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='13' height='13' rx='2.5'/%3E%3Cpath d='M16 8V5.5A2.5 2.5 0 0 0 13.5 3h-8A2.5 2.5 0 0 0 3 5.5v8A2.5 2.5 0 0 0 5.5 16H8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ca-copy::after { content: ''; position: absolute; inset: -5px; border-radius: 999px; }
@media (hover: hover) { .ca-copy:hover { border-color: var(--ink); } }
.ca-copy.is-done { color: var(--mint-text); border-color: var(--mint-text); }
.ca-copy.is-done::before { -webkit-mask-image: var(--tick); mask-image: var(--tick); }
.ca-code pre {
  margin: 0; padding: 14px 16px 16px; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2;
  background: color-mix(in srgb, var(--bg) 55%, var(--surface)); color: var(--ink);
  font-family: var(--font-body); font-size: var(--fs-ui); line-height: 1.65;
}
.ca-code pre[dir="ltr"] { text-align: left; }
.ca-code pre code { all: unset; font: inherit; white-space: inherit; }

/* tables: a frame that scrolls on its own if it has to; on a phone a wide table becomes one card a row */
.ca-table-wrap { margin: 16px 0 24px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; scrollbar-width: thin; }
.ca-table { width: 100%; border-collapse: collapse; font-size: var(--fs-ui); line-height: 1.55; }
.ca-table th, .ca-table td { padding: 10px 12px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.ca-table th { background: var(--surface); color: var(--ink); font-weight: 600; }
.ca-table td { color: var(--ink-soft); min-width: 5.5em; }
.ca-table td:first-child { color: var(--ink); }
.ca-table tbody tr:last-child td { border-bottom: 0; }
.ca-table td input.ca-task { margin: 2px 0 0; }

/* checklists: each box stays ticked on this device */
.page-body ul.ca-tasks, .page-body ol.ca-tasks { list-style: none; padding-inline-start: 0; margin: 12px 0 22px; }
.page-body li.ca-task-item { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); }
.page-body li.ca-task-item:last-child { border-bottom: 1px solid var(--line); }
.ca-task-label { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; cursor: pointer; color: var(--ink); }
input.ca-task { width: 20px; height: 20px; margin: .2em 0 0; accent-color: var(--mint-text); cursor: pointer; }
.ca-task:checked + span { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-soft) 70%, transparent); text-decoration-thickness: 1px; }
.ca-task-item > blockquote { margin: 10px 0 4px; margin-inline-start: 34px; }

/* the closing lines of a lesson: what you take with you, and the sources */
.page-body .ca-hand { margin: 26px 0 18px; padding: 14px 16px; border-radius: 14px; color: var(--ink); background: color-mix(in srgb, var(--mint) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--mint-text) 30%, transparent); }
.page-body .ca-sources-head { margin: 22px 0 6px; font-size: var(--fs-meta); }
.page-body ul.ca-sources { padding-inline-start: 18px; }
.page-body ul.ca-sources li { margin-bottom: 4px; font-size: var(--fs-meta); }
.ca-sources a { color: var(--ink-soft) !important; }

/* open points, in the preview only */
.ca-verify { padding: .05em .4em; border-radius: 6px; color: var(--ink); background: color-mix(in srgb, var(--amber) 22%, transparent); border: 1px dashed var(--amber-text); }
.ca-verify b, .ca-verify-block b { color: var(--amber-text); font-weight: 700; }
.ca-verify-block { margin: 12px 0 18px; padding: 10px 14px; border-radius: 12px; color: var(--ink); background: color-mix(in srgb, var(--amber) 16%, transparent); border: 1px dashed var(--amber-text); font-size: var(--fs-ui); line-height: 1.6; }
.ca-badge { display: inline-block; margin-inline-start: 6px; padding: 0 8px; border-radius: 999px; font-size: var(--fs-fine); font-weight: 600; line-height: 1.6; color: var(--amber-text); border: 1px dashed var(--amber-text); vertical-align: .1em; white-space: nowrap; }

/* previous and next */
.ca-pager { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 52px; padding-top: 26px; border-top: 1px solid var(--line); }
.ca-pager a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 16px; text-decoration: none; color: var(--ink); transition: border-color .2s var(--ease); }
@media (hover: hover) { .ca-pager a:hover { border-color: var(--edge); } }
.ca-pager-next { text-align: end; align-items: flex-end; }
.ca-pager-k { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-meta); color: var(--ink-soft); }
.ca-pager-k::before { content: ''; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat; }
.ca-pager-prev .ca-pager-k::before { transform: scaleX(-1); }
.ca-pager-next .ca-pager-k { flex-direction: row-reverse; }
.ca-pager-t { font-weight: 500; line-height: 1.45; }
.ca-pager-t b { margin-inline-end: 6px; color: var(--sky-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.page-body .ca-back { margin-top: 18px; font-size: var(--fs-ui); }
.page-body .ca-back a { color: var(--ink-soft); }

/* ---------- the course map ---------- */
.ca-map .container { max-width: 980px; }
.ca-map-head { padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.page-body .ca-kicker { margin-bottom: 10px; font-size: var(--fs-meta); font-weight: 600; color: var(--sky-text); }
.page-body.ca-map h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: 14px; }
.page-body .ca-map-lead { max-width: 36em; font-size: var(--fs-lead); line-height: 1.65; color: var(--ink); }
.page-body .ca-howto { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 10px; max-width: 46em; }
.page-body .ca-howto li { position: relative; margin: 0; padding-inline-start: 20px; font-size: var(--fs-ui); line-height: 1.65; }
.ca-howto li::before { content: ''; position: absolute; inset-inline-start: 2px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--sky); }
.page-body .ca-map-start { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 0; }
.ca-map-total { font-size: var(--fs-meta); color: var(--ink-soft); }
.ca-part { padding: 34px 0 30px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.ca-part-head { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 4px 18px; align-items: start; }
.ca-part-num {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-weight: 700; font-size: 1.05rem;
  color: var(--sky-text); border: 1.5px solid color-mix(in srgb, var(--sky) 60%, transparent); background: color-mix(in srgb, var(--sky) 8%, transparent); font-variant-numeric: tabular-nums;
}
#part-8 .ca-part-num { color: var(--mint-text); border-color: color-mix(in srgb, var(--mint) 60%, transparent); background: color-mix(in srgb, var(--mint) 8%, transparent); }
.page-body .ca-part-title h2 { margin: 6px 0 4px; font-size: 1.5rem; line-height: 1.3; }
.page-body .ca-part-desc { margin: 0; font-size: var(--fs-ui); }
.page-body .ca-part-time { margin: 12px 0 0; font-size: var(--fs-meta); white-space: nowrap; }
.page-body ol.ca-lessons { list-style: none; margin: 18px 0 0; padding: 0; padding-inline-start: 64px; }
.page-body ol.ca-lessons li { margin: 0; }
.ca-lessons a { display: grid; grid-template-columns: 3em minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 13px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.ca-l-num { color: var(--sky-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ca-l-title { font-weight: 500; line-height: 1.45; transition: color .2s var(--ease); }
.ca-l-time { font-size: var(--fs-meta); color: var(--ink-soft); white-space: nowrap; }
@media (hover: hover) { .ca-lessons a:hover .ca-l-title, .ca-kit-list a:hover .ca-k-title { color: var(--amber-text); } }
.page-body .ca-part-kit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; padding-inline-start: 64px; font-size: var(--fs-meta); }
.ca-part-kit-k { color: var(--mint-text); font-weight: 600; margin-inline-end: 4px; }
.page-body .ca-part-kit a { display: inline-flex; gap: 6px; padding: 4px 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink); text-decoration: none; line-height: 1.45; }
.ca-part-kit a b { color: var(--mint-text); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .page-body .ca-part-kit a:hover { border-color: var(--edge); } }
.ca-kit { margin-top: 52px; scroll-margin-top: 90px; }
.page-body .ca-kit h2 { margin: 0 0 8px; font-size: clamp(1.6rem, 2.6vw, 2rem); }
.page-body .ca-kit-lead { max-width: 40em; }
.page-body ul.ca-kit-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.page-body ul.ca-kit-list li { margin: 0; }
.ca-kit-list a { display: grid; grid-template-columns: 3em minmax(0, 1fr); gap: 2px 12px; padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.ca-k-num { grid-row: span 2; color: var(--mint-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ca-k-title { font-weight: 500; line-height: 1.45; transition: color .2s var(--ease); }
.ca-k-for { grid-column: 2; font-size: var(--fs-meta); color: var(--ink-soft); }
.page-body .ca-updated { margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--line); font-size: var(--fs-meta); }

@media (max-width: 640px) {
  .ca-pager { grid-template-columns: minmax(0, 1fr); }
  .ca-pager-next { order: -1; text-align: start; align-items: flex-start; }
  .ca-pager-gap { display: none; }
  .ca-part-head { grid-template-columns: 44px minmax(0, 1fr); gap: 2px 14px; }
  .page-body .ca-part-time { grid-column: 2; margin-top: 4px; }
  .page-body ol.ca-lessons, .page-body .ca-part-kit { padding-inline-start: 0; }
  .ca-lessons a { grid-template-columns: 2.6em minmax(0, 1fr) auto; gap: 10px; }
  .page-body ul.ca-kit-list { grid-template-columns: minmax(0, 1fr); }
  .ca-task-item > blockquote { margin-inline-start: 0; }
  .ca-body blockquote { padding: 12px 14px; }
  /* a wide table: one card a row, the first cell its title, each value under its column's name */
  .ca-stack-wrap { border: 0; border-radius: 0; overflow: visible; }
  .ca-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .ca-stack, .ca-stack tbody, .ca-stack tr, .ca-stack td { display: block; width: 100%; }
  .ca-stack tr { margin-bottom: 10px; padding: 4px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .ca-stack td { display: grid; grid-template-columns: minmax(0, 7.2em) minmax(0, 1fr); gap: 12px; min-width: 0; padding: 9px 0; border-bottom: 1px solid var(--line); }
  .ca-stack tbody tr:last-child td { border-bottom: 1px solid var(--line); }
  .ca-stack tr td:last-child, .ca-stack td:not(:has(~ td:not(:empty))) { border-bottom: 0; }
  .ca-stack td::before { content: attr(data-label); font-size: var(--fs-meta); color: var(--ink-soft); }
  .ca-stack td:first-child { display: block; padding-top: 12px; font-weight: 600; color: var(--ink); }
  .ca-stack td:first-child::before { content: none; }
  .ca-stack td:empty { display: none; }
  /* a numbered table: "1  the item" is the card's title */
  .ca-numbered td:first-child { display: none; }
  .ca-numbered td:nth-child(2) { display: block; padding-top: 12px; font-weight: 600; color: var(--ink); }
  .ca-numbered td:nth-child(2)::before { content: attr(data-num); margin-inline-end: 8px; font-size: inherit; color: var(--sky-text); font-variant-numeric: tabular-nums; }
}
