/* The sellers' community (server/src/routes/community.ts): a content site, not
   a console.

   ⚠ Redrawn 2026-09-26 after the boss called the first version ugly. That one
   wore the console's dark bar over bare lists and read as a back office. The
   shape now is the one sellers read every day, measured on AMZ123 and on
   wearesellers.com: a white bar with the search in it, a banner on the front
   page, the boards as pills over one card, a row per thread with the writer's
   picture, the title (15px / 500), two grey lines of what it says and its
   numbers (12px), and a right-hand column of cards. The console's blue and its
   Chinese font stack stay, so the two still read as one family. */

:root {
  --brand: #0050f0;
  --brand-2: #3d7bff;
  --brand-pale: #eef3ff;
  --ink: #1d2129;
  --ink-soft: #4e5969;
  --ink-faint: #86909c;
  --line: #eceff5;
  --bg: #f4f6fa;
  --bad: #d4380d;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/22px -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
h1 { margin: 0; }
.cm-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- the bar ------------------------------------------------------------ */
.cm-top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.cm-top .cm-wrap { display: flex; align-items: center; gap: 22px; height: 64px; }
/* The bar is wider than the page under it: signed in, with five menu items,
   three languages, a search box and the way back, 1200 did not hold it and
   the page scrolled sideways (2026-09-27). */
@media (min-width: 961px) { .cm-top .cm-wrap { max-width: 1440px; } }
.cm-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; white-space: nowrap; color: var(--ink); }
.cm-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; }
.cm-nav { display: flex; gap: 22px; white-space: nowrap; }
.cm-nav a { color: var(--ink-soft); font-size: 15px; line-height: 62px; border-bottom: 2px solid transparent; }
.cm-nav a:hover, .cm-nav a.on { color: var(--brand); border-bottom-color: var(--brand); }
.cm-search { flex: 1 1 auto; min-width: 0; max-width: 380px; display: flex; align-items: center; background: #f2f4f8; border-radius: 20px; padding: 0 6px 0 16px; height: 38px; }
.cm-search input { flex: 1; border: 0; background: transparent; font: inherit; color: var(--ink); outline: none; min-width: 0; }
.cm-search button { border: 0; background: transparent; color: var(--ink-faint); cursor: pointer; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; }
.cm-search:focus-within { background: #fff; box-shadow: 0 0 0 1px var(--brand) inset; }
/* The three communities (routes/community.ts LANGS): each a link to its own
   front page, not a translation of this one. */
.cm-langs { display: flex; gap: 2px; padding: 3px; background: #f2f4f8; border-radius: 16px; white-space: nowrap; }
.cm-langs a { padding: 2px 10px; border-radius: 13px; font-size: 12px; color: var(--ink-faint); }
.cm-langs a:hover { color: var(--ink); }
.cm-langs a.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.cm-me { display: flex; align-items: center; gap: 14px; margin-left: auto; white-space: nowrap; }
.cm-who { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; }
.cm-back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-soft); padding: 4px 10px; border: 1px solid var(--line); border-radius: 16px; font-size: 13px; }
.cm-back:hover { color: var(--brand); border-color: var(--brand); }
.cm-link { background: none; border: 0; color: var(--ink-soft); cursor: pointer; font: inherit; padding: 0; }
.cm-link:hover { color: var(--brand); }

/* --- buttons ------------------------------------------------------------ */
.cm-btn { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 18px; border-radius: 18px; border: 0; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.cm-btn:hover { filter: brightness(1.08); }
.cm-btn[disabled] { opacity: 0.6; cursor: default; }
.cm-btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
.cm-btn-light { background: #fff; color: var(--brand); }
.cm-wide { display: flex; width: 100%; }

/* --- layout ------------------------------------------------------------- */
.cm-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; padding-top: 20px; padding-bottom: 48px; }
/* A lesson is mostly screenshots of whole screens: give them the width. */
.cm-cols.cm-lessonpage { max-width: 1440px; grid-template-columns: minmax(0, 1fr) 280px; }
.cm-card { background: #fff; border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.cm-pad { padding: 24px 28px; }
.cm-center { text-align: center; }
.cm-card-h { padding: 16px 20px 8px; font-weight: 600; font-size: 15px; }
.cm-listhead { padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 600; }

/* --- the front page's banner and picks ---------------------------------- */
.cm-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 30px; margin-bottom: 16px; border-radius: var(--radius); color: #fff; overflow: hidden;
  background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.18), transparent 40%), linear-gradient(120deg, #0040c8, #0050f0 45%, #4c8dff); }
.cm-hero h1 { font-size: 24px; line-height: 34px; }
.cm-hero p { margin: 6px 0 0; opacity: 0.88; max-width: 520px; }
.cm-hero-stats { display: flex; gap: 26px; }
.cm-hero-stats div { display: flex; flex-direction: column; align-items: center; }
.cm-hero-stats b { font-size: 26px; line-height: 32px; }
.cm-hero-stats span { font-size: 12px; opacity: 0.8; }
.cm-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.cm-pickcard { display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: var(--radius); padding: 16px 18px; border: 1px solid transparent; transition: border-color 0.15s, transform 0.15s; }
.cm-pickcard:hover { border-color: #cfdcff; transform: translateY(-1px); }
.cm-pickcard b { font-size: 15px; line-height: 22px; font-weight: 600; }
.cm-pickcard span:last-child { color: var(--ink-faint); font-size: 13px; line-height: 20px; }
.cm-pickcard .cm-tag { align-self: flex-start; }

/* --- the pills and the sorts over a list -------------------------------- */
.cm-tabs { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.cm-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.cm-pills a { padding: 4px 14px; border-radius: 16px; background: #f2f4f8; color: var(--ink-soft); font-size: 13px; }
.cm-pills a:hover { color: var(--brand); }
.cm-pills a.on { background: var(--brand-pale); color: var(--brand); font-weight: 500; }
.cm-sorts { display: flex; gap: 16px; white-space: nowrap; font-size: 13px; }
.cm-sorts a { color: var(--ink-faint); }
.cm-sorts a.on { color: var(--ink); font-weight: 600; }

/* --- a row per thread ---------------------------------------------------- */
.cm-list { list-style: none; margin: 0; padding: 0; }
.cm-item { display: flex; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); transition: background 0.12s; }
.cm-item:last-child { border-bottom: 0; }
.cm-item:hover { background: #fafbfd; }
.cm-item-main { min-width: 0; flex: 1; }
.cm-title { display: block; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--ink); }
.cm-title:hover { color: var(--brand); }
.cm-excerpt { margin: 4px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 21px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--ink-faint); }
.cm-chip { padding: 0 8px; border-radius: 4px; background: #f2f4f8; color: var(--ink-soft); line-height: 20px; }
.cm-chip:hover { color: var(--brand); }
.cm-by { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.cm-by b { font-weight: 500; color: var(--ink); }
.cm-stats { display: inline-flex; gap: 12px; margin-left: auto; }
.cm-stats span { display: inline-flex; align-items: center; gap: 4px; }
.cm-av { flex: 0 0 auto; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.cm-av-gone { background: #f0f2f5; }
.cm-tag { display: inline-block; font-size: 12px; line-height: 18px; padding: 0 6px; border-radius: 4px; margin-right: 6px; vertical-align: 2px; font-weight: 500; }
.cm-tag-pin { background: #fff1e6; color: #d4580d; }
.cm-tag-pick { background: #fff6d6; color: #b67a00; }
.cm-badge { font-size: 11.5px; line-height: 18px; padding: 0 6px; border-radius: 9px; background: #e8f7ee; color: #16803c; font-weight: 500; }
.cm-badge-plain { background: #f0f2f5; color: var(--ink-soft); }
.cm-badge-wh { background: #fff1e6; color: #c25a0a; }
.cm-badge-official { background: var(--brand); color: #fff; }
.cm-empty { padding: 48px 20px; text-align: center; color: var(--ink-faint); }
.cm-empty-sm { padding: 24px 20px; }

.cm-pager { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 16px; border-top: 1px solid var(--line); }
.cm-pager a, .cm-pager span { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-soft); }
.cm-pager a:hover { background: #f2f4f8; }
.cm-pager .on { background: var(--brand); color: #fff; }

/* --- the right-hand column ---------------------------------------------- */
.cm-side .cm-card { padding-bottom: 12px; }
.cm-cta { padding: 20px !important; background: linear-gradient(160deg, #fff 55%, var(--brand-pale)); }
.cm-cta-h { font-size: 16px; font-weight: 600; }
.cm-cta p { margin: 4px 0 14px; color: var(--ink-soft); font-size: 13px; }
.cm-notice { display: block; padding: 6px 20px; color: var(--ink); font-size: 13px; line-height: 20px; }
.cm-notice::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ff7d00; margin-right: 8px; vertical-align: 2px; }
.cm-notice:hover { color: var(--brand); }
.cm-hot { list-style: none; margin: 0; padding: 0 20px; }
.cm-hot li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 13px; line-height: 20px; }
.cm-hot a { color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cm-hot a:hover { color: var(--brand); }
.cm-rank { flex: 0 0 18px; height: 18px; margin-top: 1px; border-radius: 4px; background: #f0f2f5; color: var(--ink-faint); font-size: 12px; line-height: 18px; text-align: center; font-weight: 600; }
.cm-rank.top { background: linear-gradient(135deg, #ff7d00, #ffb300); color: #fff; }
.cm-boardrow { display: flex; align-items: center; gap: 10px; padding: 9px 20px; color: var(--ink); }
.cm-boardrow:hover, .cm-boardrow.on { background: #f7f9fc; }
.cm-boardicon { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 8px; background: var(--brand-pale); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.cm-boardicon.big { flex-basis: 56px; width: 56px; height: 56px; border-radius: 14px; font-size: 24px; background: rgba(255, 255, 255, 0.2); color: #fff; }
.cm-boardname { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 500; }
.cm-boardname small { font-weight: 400; color: var(--ink-faint); font-size: 12px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-n { color: var(--ink-faint); font-size: 12px; }
.cm-promo { padding: 20px !important; color: #fff; background: linear-gradient(140deg, #001f4d, #0040c8); }
.cm-promo-h { font-weight: 600; font-size: 16px; }
.cm-promo p { margin: 6px 0 14px; opacity: 0.85; font-size: 13px; line-height: 20px; }
.cm-promo-links { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 13px; }
.cm-promo-links a { opacity: 0.9; }
.cm-promo-links a:hover { opacity: 1; text-decoration: underline; }

/* --- a board's banner ------------------------------------------------------ */
.cm-boardhero { display: flex; align-items: center; gap: 16px; padding: 22px 26px; margin-bottom: 16px; border-radius: var(--radius); color: #fff; background: linear-gradient(120deg, #0040c8, #4c8dff); }
.cm-boardhero h1 { font-size: 22px; line-height: 30px; }
.cm-boardhero p { margin: 4px 0 0; opacity: 0.85; }
.cm-boardhero > div:nth-child(2) { flex: 1; }
.cm-boardhero-n { display: flex; flex-direction: column; align-items: center; }
.cm-boardhero-n b { font-size: 24px; line-height: 30px; }
.cm-boardhero-n span { font-size: 12px; opacity: 0.8; }

/* --- a thread -------------------------------------------------------------- */
.cm-crumb { display: flex; gap: 8px; font-size: 13px; color: var(--ink-faint); padding: 0 2px 12px; }
.cm-crumb a:hover { color: var(--brand); }
.cm-post { padding: 28px 32px; }
.cm-post h1 { font-size: 24px; line-height: 36px; font-weight: 700; }
.cm-postby { display: flex; align-items: center; gap: 12px; margin: 16px 0 4px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.cm-postby .cm-meta { margin-top: 2px; }
.cm-body { font-size: 15px; line-height: 28px; margin-top: 18px; overflow-wrap: anywhere; color: #262b33; }
.cm-body h2 { font-size: 18px; line-height: 28px; margin: 26px 0 10px; padding-left: 10px; border-left: 3px solid var(--brand); }
.cm-body h3 { font-size: 16px; margin: 20px 0 8px; }
.cm-body p { margin: 0 0 14px; }
.cm-body ul, .cm-body ol { margin: 0 0 14px; padding-left: 22px; }
.cm-body li { margin: 4px 0; }
.cm-body strong { color: var(--ink); }
.cm-body a { color: var(--brand); }
.cm-body a:hover { text-decoration: underline; }
.cm-body code { background: #f2f4f8; border-radius: 4px; padding: 1px 6px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.cm-body pre { background: #f6f8fb; border-radius: 8px; padding: 14px 16px; overflow-x: auto; }
.cm-body pre code { background: none; padding: 0; }
.cm-reply { display: flex; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--line); }
.cm-reply-main { flex: 1; min-width: 0; }
.cm-reply .cm-meta { margin-top: 0; }
.cm-reply .cm-body { font-size: 14px; line-height: 24px; margin-top: 6px; }
.cm-reply .cm-body p:last-child { margin-bottom: 0; }
.cm-floor { margin-left: auto; color: var(--ink-faint); }
.cm-gone { margin-top: 6px; color: var(--ink-faint); font-style: italic; }
.cm-authorcard { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 20px !important; }
.cm-authorname { font-weight: 600; font-size: 15px; }

/* --- forms ------------------------------------------------------------------ */
.cm-form { display: flex; flex-direction: column; gap: 16px; }
.cm-card > .cm-form { padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.cm-pad > .cm-form { padding: 0; border-top: 0; margin-top: 16px; }
.cm-pad h1 { font-size: 20px; line-height: 30px; }
.cm-replyrow { display: flex; gap: 12px; }
.cm-replyrow textarea { flex: 1; }
.cm-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.cm-form label.cm-check { flex-direction: row; align-items: center; font-weight: 400; gap: 8px; }
.cm-form input:not([type="checkbox"]), .cm-form select, .cm-form textarea {
  font: inherit; font-weight: 400; color: var(--ink); border: 1px solid #dfe3eb; border-radius: 8px; padding: 7px 12px; background: #fff;
}
.cm-form input:not([type="checkbox"]), .cm-form select { height: 38px; }
.cm-form textarea { resize: vertical; line-height: 22px; }
.cm-form input:focus, .cm-form select:focus, .cm-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 80, 240, 0.1); }
.cm-formfoot { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.cm-err { color: var(--bad); margin-right: auto; }
.cm-hint { font-size: 12px; color: var(--ink-faint); }
.cm-note { padding: 16px 20px; background: #f7f9fc; border-top: 1px solid var(--line); color: var(--ink-soft); }
.cm-pad > .cm-note { border: 0; border-radius: 8px; margin: 14px 0; }

.cm-login { max-width: 560px; margin: 0 auto; }
.cm-login p { color: var(--ink-soft); }
.cm-choice { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 12px 0; color: var(--ink); transition: border-color 0.15s, background 0.15s; }
.cm-choice:hover { border-color: var(--brand); background: var(--brand-pale); }
.cm-choice b { font-size: 15px; display: block; }
.cm-choice span { color: var(--ink-faint); font-size: 13px; }
.cm-login a:not(.cm-choice) { color: var(--brand); }

/* --- the foot --------------------------------------------------------------- */
.cm-foot { background: #fff; border-top: 1px solid var(--line); }
.cm-foot .cm-wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; font-size: 13px; color: var(--ink-faint); }
.cm-foot-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-soft); }
.cm-foot-brand .cm-mark { width: 24px; height: 24px; font-size: 12px; border-radius: 6px; }
.cm-foot-links { display: flex; gap: 20px; }
.cm-foot-links a:hover { color: var(--brand); }

/* --- a phone ------------------------------------------------------------------ */
@media (max-width: 1360px) {
  .cm-who > span:last-child, .cm-back span { display: none; }
  .cm-langs a { padding: 2px 7px; }
}
/* Too narrow for a usable box: the bar drops it (the pages keep theirs). */
@media (max-width: 1200px) and (min-width: 961px) { .cm-top .cm-search { display: none; } }
@media (max-width: 960px) {
  /* minmax(0, ...): a bare 1fr is at least as wide as its widest word, and the
     page scrolled sideways on a phone. */
  .cm-cols, .cm-cols.cm-lessonpage { grid-template-columns: minmax(0, 1fr); }
  .cm-nav { display: none; }
  .cm-top .cm-wrap { gap: 12px; }
  .cm-search { max-width: none; }
}
@media (max-width: 640px) {
  .cm-wrap { padding: 0 12px; }
  .cm-logo span:last-child, .cm-who span, .cm-back span, .cm-top [data-logout] { display: none; }
  .cm-langs a { padding: 2px 6px; }
  .cm-back { padding: 6px; }
  /* One row was 547px on a 390px phone: the search box goes to its own row. */
  .cm-top .cm-wrap { gap: 8px; flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; }
  .cm-search { order: 9; flex: 1 1 100%; }
  .cm-me { gap: 8px; margin-left: auto; }
  .cm-hero { flex-direction: column; align-items: flex-start; padding: 20px; }
  .cm-picks { grid-template-columns: 1fr; }
  .cm-tabs { flex-direction: column; align-items: flex-start; }
  .cm-post { padding: 20px 16px; }
  .cm-item, .cm-reply { padding: 14px 14px; }
  .cm-stats { margin-left: 0; }
  .cm-foot .cm-wrap { flex-direction: column; justify-content: center; gap: 6px; }
}

/* --- the seller university (routes/community.ts, 2026-09-26) ----------------
   Courses as numbered cards; a lesson reads like documentation: its course's
   contents down the side, wide pictures, tip boxes, previous / next. */
.cm-hero-uni { background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.18), transparent 40%), linear-gradient(120deg, #0b3a8a, #1456d8 45%, #3f8cff); }
.cm-hero-help { background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.16), transparent 40%), linear-gradient(120deg, #0d4b52, #0f7a7a 45%, #2bb3a3); }
/* auto-fit: one course fills the row instead of leaving half of it empty (boss, 2026-09-27). */
.cm-courses { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 14px; }
.cm-course { display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: var(--radius); padding: 20px 22px; border: 1px solid transparent; transition: border-color 0.15s, transform 0.15s; }
.cm-course:hover { border-color: #cfdcff; transform: translateY(-1px); }
.cm-course-n { font-size: 13px; font-weight: 700; color: var(--brand); letter-spacing: 1px; }
.cm-course b { font-size: 18px; line-height: 26px; }
.cm-course p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 20px; }
.cm-course ol { margin: 6px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: 13px; line-height: 22px; }
.cm-course-foot { margin-top: auto; padding-top: 8px; color: var(--brand); font-size: 13px; font-weight: 500; }
.cm-coursehero { background: linear-gradient(120deg, #0b3a8a, #3f8cff); }
.cm-lessons { list-style: none; margin: 0; padding: 0; }
.cm-lessons li a { display: flex; gap: 16px; align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cm-lessons li:last-child a { border-bottom: 0; }
.cm-lessons li a:hover { background: #fafbfd; }
.cm-lesson-n { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--brand-pale); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.cm-lesson-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cm-lesson-main b { font-size: 15px; }
.cm-lesson-main span { color: var(--ink-faint); font-size: 13px; }
.cm-course-start { display: flex; align-items: center; gap: 18px; padding: 16px 20px; border-top: 1px solid var(--line); }
.cm-course-start .cm-link { color: var(--brand); }
.cm-coursecard { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; border: 1px solid #dfe8ff; }
.cm-coursecard b { flex: 1; }
.cm-coursecard span:last-child { color: var(--brand); font-size: 13px; }
.cm-tag-uni { background: var(--brand-pale); color: var(--brand); }
.cm-boardicon.uni { background: #eaf7ee; color: #16803c; }
.cm-toc ol { list-style: none; margin: 0; padding: 0 12px 4px; }
.cm-toc li a { display: flex; gap: 10px; padding: 7px 8px; border-radius: 6px; font-size: 13px; line-height: 20px; color: var(--ink-soft); }
.cm-toc li a span { flex: 0 0 18px; color: var(--ink-faint); font-weight: 600; }
.cm-toc li a:hover { background: #f5f7fb; color: var(--ink); }
.cm-toc li.on a { background: var(--brand-pale); color: var(--brand); font-weight: 600; }
.cm-toc li.on a span { color: var(--brand); }
.cm-lesson-of { font-size: 12px; font-weight: 600; color: var(--brand); letter-spacing: 0.5px; margin-bottom: 6px; }
.cm-lesson h1 { margin-bottom: 6px; }
.cm-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.cm-prevnext a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; }
.cm-prevnext a:hover { border-color: var(--brand); }
.cm-prevnext a.next { text-align: right; }
.cm-prevnext span { font-size: 12px; color: var(--ink-faint); }
.cm-prevnext b { font-size: 14px; color: var(--ink); }

/* Pictures and tips, in any post. */
.cm-fig { margin: 18px 0 22px; }
.cm-fig img { display: block; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(20, 40, 90, 0.08); cursor: zoom-in; }
.cm-fig figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-faint); text-align: center; }
.cm-tip { margin: 0 0 16px; padding: 12px 16px; border-radius: 8px; background: #f0f6ff; border-left: 4px solid var(--brand); color: #24344f; font-size: 14px; line-height: 24px; }
.cm-zoom { position: fixed; inset: 0; z-index: 50; background: rgba(10, 16, 30, 0.82); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.cm-zoom img { max-width: 100%; max-height: 100%; border-radius: 8px; background: #fff; }

@media (max-width: 640px) {
  .cm-courses { grid-template-columns: 1fr; }
  .cm-prevnext { grid-template-columns: 1fr; }
}

/* --- a shelf's front page (routes/community.ts, 2026-09-27) ------------------
   The design the boss approved: banner with search, learning path, course
   cards with covers, most-read lessons beside "carry on". Full width: the
   page lays out its own side column. */
.cm-full { padding-top: 20px; padding-bottom: 48px; }
.cm-uhero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: center; padding: 34px 40px; border-radius: 14px; color: #fff;
  background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.18), transparent 40%), linear-gradient(120deg, #0b3a8a, #1456d8 45%, #3f8cff); }
.cm-uhero.cm-hero-help { background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.16), transparent 40%), linear-gradient(120deg, #0d4b52, #0f7a7a 45%, #2bb3a3); }
.cm-uhero h1 { font-size: 28px; line-height: 38px; }
.cm-uhero p { margin: 4px 0 18px; opacity: 0.9; }
.cm-usearch { display: flex; max-width: 560px; height: 44px; background: #fff; border-radius: 22px; padding: 4px; }
.cm-usearch input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 16px; font: inherit; color: var(--ink); }
.cm-usearch button { border: 0; border-radius: 18px; padding: 0 20px; background: var(--brand); color: #fff; font: inherit; font-weight: 500; cursor: pointer; }
.cm-utags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cm-utags a { padding: 2px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.18); color: #fff; font-size: 12px; }
.cm-utags a:hover { background: rgba(255, 255, 255, 0.3); }
.cm-uhero-stats { display: flex; gap: 34px; text-align: center; }
.cm-uhero-stats b { display: block; font-size: 30px; line-height: 38px; }
.cm-uhero-stats span { font-size: 12px; opacity: 0.85; }
.cm-usec { margin-top: 26px; }
.cm-usec-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.cm-usec-h h2 { font-size: 19px; line-height: 28px; }
.cm-usec-h span { color: var(--ink-faint); font-size: 13px; }
.cm-usec-h .cm-link { margin-left: auto; }
.cm-usec .cm-pills { margin-bottom: 14px; }
.cm-path { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.cm-stage { background: #fff; border-radius: 12px; padding: 16px 18px; border-top: 4px solid var(--stage); }
.cm-stage-1 { --stage: #15945b; } .cm-stage-2 { --stage: #1456d8; } .cm-stage-3 { --stage: #6b2fb0; } .cm-stage-4 { --stage: #b86e00; } .cm-stage-5 { --stage: #d23b2f; }
.cm-stage-n { font-size: 12px; font-weight: 700; color: var(--stage); }
.cm-stage b { display: block; font-size: 16px; margin: 2px 0 6px; }
.cm-stage ul { margin: 0; padding-left: 16px; color: var(--ink-soft); font-size: 13px; }
.cm-stage a { color: inherit; } .cm-stage a:hover { color: var(--brand); }
.cm-ucards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; }
.cm-ucard { display: flex; flex-direction: column; background: #fff; border-radius: 12px; overflow: hidden; color: var(--ink); border: 1px solid transparent; transition: border-color 0.15s, transform 0.15s; }
.cm-ucard:hover { border-color: #cfdcff; transform: translateY(-1px); }
.cm-cover { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-height: 132px; padding: 18px 20px; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.cm-cover b { font-size: 19px; line-height: 1.35; }
.cm-cover-pf { align-self: flex-start; padding: 1px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.22); font-size: 12px; font-weight: 600; }
.cm-cover-amazon { --c1: #6b2fb0; --c2: #a765f0; } .cm-cover-temu { --c1: #c2410c; --c2: #f59e0b; } .cm-cover-tiktok { --c1: #111827; --c2: #e11d74; }
.cm-cover-shopify { --c1: #3f7d20; --c2: #7cb342; } .cm-cover-walmart { --c1: #0b4fa8; --c2: #3b8bf5; } .cm-cover-logistics { --c1: #0f7a7a; --c2: #2bb3a3; }
.cm-cover-general { --c1: #b86e00; --c2: #f0a93a; }
.cm-ucard-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 20px 16px; }
.cm-ucard-intro { color: var(--ink-soft); font-size: 13px; line-height: 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cm-ucard-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12px; color: var(--ink-faint); }
.cm-lv { padding: 0 8px; border-radius: 8px; font-weight: 600; }
.cm-lv-basic { background: #e7f6ee; color: #15945b; } .cm-lv-advanced { background: #fff4e0; color: #b86e00; }
.cm-ubottom { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.cm-uside { padding-top: 40px; }
.cm-kps { padding: 4px 20px; margin: 0; }
.cm-kp { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink); }
.cm-kp:first-child { border-top: 0; }
.cm-kp:hover .cm-kp-t { color: var(--brand); }
.cm-kp-c { flex: 0 0 auto; color: var(--ink-faint); font-size: 12px; }
.cm-carry, .cm-askcard { padding-bottom: 18px; }
.cm-carry > *:not(.cm-card-h), .cm-askcard > *:not(.cm-card-h) { margin-left: 20px; margin-right: 20px; }
.cm-carry-c { color: var(--ink-soft); }
.cm-bar { height: 6px; background: #eef1f8; border-radius: 3px; margin-top: 8px; margin-bottom: 8px; }
.cm-bar i { display: block; height: 6px; background: var(--brand); border-radius: 3px; }
.cm-carry-n { font-size: 12px; color: var(--ink-faint); margin-bottom: 12px; }
.cm-askcard p { margin-top: 0; color: var(--ink-soft); }
.cm-btn-soft { background: var(--brand-pale); color: var(--brand); }
@media (max-width: 960px) {
  .cm-uhero, .cm-ubottom { grid-template-columns: minmax(0, 1fr); }
  .cm-uside { padding-top: 0; }
}
@media (max-width: 640px) {
  .cm-uhero { padding: 22px 18px; }
  .cm-uhero-stats { gap: 18px; }
  .cm-kp { flex-direction: column; gap: 2px; }
}
