/* CLIK.ma forum (forums.tpl, __clik_forum_*.tpl, clik-forum.js). Built on the shared .cd tokens (style.min.css):
   --cd-ink, --cd-soft, --cd-mute, --cd-line, --cd-card, --cd-panel, --cd-chip, --cd-ac, --cd-acs, --cd-shadow.
   Each forum brings its colour as --c. Spacing on the 8px grid. Logical properties, so RTL needs little. */

.cd.cf { --cf-pink: #F0125A; --cf-yellow: #FFD000; --cf-green: #10B981; --cf-r: 16px; --c: var(--cd-ac); padding: 8px 8px 32px; font-size: 14.5px; }
.cd.cf a { color: inherit; text-decoration: none; }
.cd.cf .cf-ic { flex: none; display: block; }
.cd.cf h1, .cd.cf h2, .cd.cf h3 { margin: 0; color: var(--cd-ink); }
.cd.cf p { margin: 0; }
.cd.cf ul, .cd.cf ol { margin: 0; padding: 0; list-style: none; }
.cd.cf img { max-width: 100%; }
.cd.cf .cd-btn.is-icon { width: 36px; padding: 0; }
.cd.cf .cd-btn .cf-ic { margin: 0; }
.cd.cf select { height: 36px; padding: 0 32px 0 12px; border: 0; border-radius: 10px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--cd-ink); background: var(--cd-chip) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a93a1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; -webkit-appearance: none; appearance: none; cursor: pointer; max-width: 100%; }
[dir="rtl"] .cd.cf select { padding: 0 12px 0 32px; background-position: left 12px center; }
.cd.cf select:focus { outline: 2px solid var(--cd-ac); outline-offset: 1px; }

/* ---------- the hero ---------- */
.cf-hero { position: relative; display: flex; align-items: center; gap: 24px; overflow: hidden; margin-bottom: 16px; padding: 40px 40px; border-radius: 24px; color: #fff;
  background: radial-gradient(circle at 85% 18%, rgba(140, 200, 255, .34), transparent 44%), linear-gradient(135deg, #2f7bff 0%, #0a4dff 55%, #0840d8 100%); }
.cf-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1.4px); background-size: 18px 18px; -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 85%); mask-image: linear-gradient(90deg, transparent 30%, #000 85%); pointer-events: none; }
[dir="rtl"] .cf-hero::before { -webkit-mask-image: linear-gradient(270deg, transparent 30%, #000 85%); mask-image: linear-gradient(270deg, transparent 30%, #000 85%); }
.cf-hero-in { position: relative; z-index: 2; flex: 0 1 640px; min-width: 0; }
.cd.cf .cf-hero h1 { margin: 16px 0 8px; font-size: 34px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: #fff; }
.cf-hero p { max-width: 560px; font-size: 15.5px; line-height: 1.55; color: rgba(255, 255, 255, .86); }
.cf-kicker { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cf-hero.is-small { padding: 24px 32px; }
.cd.cf .cf-hero.is-small h1 { margin: 8px 0 0; font-size: 26px; }
.cf-hero { min-height: 300px; }
.cf-hero.is-small { min-height: 300px; }
.cf-hero.is-small .cf-hero-art { --art: .95; margin-top: 56px; }

.cf-search { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 24px; height: 56px; padding: 0 8px 0 16px; border-radius: 16px; color: var(--cd-mute); background: #fff; box-shadow: 0 16px 40px -16px rgba(4, 20, 70, .55); }
[dir="rtl"] .cf-search { padding: 0 16px 0 8px; }
.cf-hero.is-small .cf-search { margin-top: 16px; height: 52px; }
.cf-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; font: inherit; font-size: 15.5px; color: #0f1419; background: transparent; }
.cf-search input::-webkit-search-cancel-button { display: none; }
.cf-search .cd-btn { flex: none; height: 40px; }
.cf-suggest { position: absolute; inset-inline: 0; top: calc(100% + 8px); z-index: 30; overflow: hidden; padding: 8px; border-radius: 16px; text-align: start; color: var(--cd-ink); background: var(--cd-card); box-shadow: 0 24px 48px -16px rgba(4, 20, 70, .4), 0 0 0 1px var(--cd-line); }
.cf-suggest a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; }
.cf-suggest a:hover, .cf-suggest a.is-on { background: var(--cd-panel); }
.cf-suggest a > .cf-ic { color: var(--cd-mute); }
.cf-suggest a span { flex: 1; min-width: 0; }
.cf-suggest b { display: block; overflow: hidden; font-size: 14.5px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.cf-suggest small { font-size: 12.5px; color: var(--cd-mute); }
.cf-suggest .is-ok, .cd.cf .is-ok { font-style: normal; font-weight: 700; color: var(--cf-green); }
.cf-suggest .is-all { justify-content: center; margin-top: 4px; font-size: 13.5px; font-weight: 700; color: var(--cd-ac); background: var(--cd-acs); }
.cf-suggest p { padding: 12px; font-size: 13.5px; color: var(--cd-mute); }

.cf-hero-stats { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; font-size: 13.5px; color: rgba(255, 255, 255, .82); }
.cf-hero-stats b { font-size: 16px; font-weight: 800; color: #fff; }
.cf-hero-stats .is-live, .cf-box-note.is-live { display: inline-flex; align-items: center; gap: 8px; }
.cf-hero-stats .is-live i, .cf-box-note.is-live i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: cf-pulse 2s infinite; }
@keyframes cf-pulse { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

.cf-hero-art { position: relative; z-index: 1; flex: none; width: 240px; height: 200px; margin: 64px auto 0; transform: scale(var(--art, 1)); }
@media (min-width: 1400px) { .cf-hero { min-height: 350px; } .cf-hero-art { --art: 1.3; } .cf-hero.is-small .cf-hero-art { --art: 1; } }
@media (min-width: 1600px) { .cf-hero { min-height: 410px; } .cf-hero.is-small { min-height: 320px; } .cf-hero-art { --art: 1.6; } .cf-hero.is-small .cf-hero-art { --art: 1.05; } }
@media (min-width: 1900px) { .cf-hero { min-height: 440px; } .cf-hero.is-small { min-height: 340px; } .cf-hero-art { --art: 1.75; } .cf-hero.is-small .cf-hero-art { --art: 1.2; } }
.cf-cube { position: absolute; inset-inline-end: 40px; top: 40px; width: 120px; height: 120px; filter: drop-shadow(0 24px 24px rgba(4, 20, 70, .35)); animation: cf-float 6s ease-in-out infinite; }
.cf-bub { position: absolute; display: grid; place-items: center; border-radius: 20px; color: #fff; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: cf-float 5s ease-in-out infinite; }
.cf-bub.is-1 { inset-inline-start: 0; top: 16px; width: 64px; height: 64px; border-end-start-radius: 4px; animation-delay: -1s; }
.cf-bub.is-2 { inset-inline-end: 0; top: 0; width: 52px; height: 52px; color: #1a1300; background: var(--cf-yellow); border-end-end-radius: 4px; animation-delay: -2.5s; }
.cf-bub.is-3 { inset-inline-start: 32px; bottom: 8px; width: 52px; height: 52px; background: var(--cf-green); border-start-end-radius: 4px; animation-delay: -3.5s; }
@keyframes cf-float { 50% { transform: translateY(-8px); } }

/* ---------- tabs ---------- */
.cf-tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 8px; border-radius: var(--cf-r); background: var(--cd-card); box-shadow: var(--cd-shadow); }
.cf-tabs-in { display: flex; flex: 1; min-width: 0; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cf-tabs-in::-webkit-scrollbar { display: none; }
.cf-tabs-in a { display: inline-flex; flex: none; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--cd-soft); transition: background .15s, color .15s; }
.cf-tabs-in a:hover { color: var(--cd-ink); background: var(--cd-panel); }
.cd.cf .cf-tabs-in a.is-on { color: var(--cd-ac); background: var(--cd-acs); }
.cf-tabs .cf-new { flex: none; height: 40px; }

/* ---------- layout ---------- */
.cf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.cf-grid.is-wide { grid-template-columns: minmax(0, 1fr); }
.cf-grid.is-thread { grid-template-columns: minmax(0, 1fr) 264px; gap: 24px; }
.cf-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cf-side { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.cf-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; padding: 0 8px; font-size: 13.5px; color: var(--cd-mute); }
.cf-crumbs a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--cd-soft); }
.cf-crumbs a:hover { color: var(--cd-ac); }
.cf-crumbs b { font-weight: 600; color: var(--cd-ink); }

/* ---------- sections and forum rows (home) ---------- */
.cf-sec { overflow: hidden; border-radius: var(--cf-r); background: var(--cd-card); box-shadow: var(--cd-shadow); }
.cd.cf .cf-sec-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 16px 24px; font-size: 17px; font-weight: 800; border-bottom: 1px solid var(--cd-line); }
.cf-sec-h > .cf-ic { color: var(--cd-ac); }
.cf-sec-h small { flex-basis: 100%; font-size: 13px; font-weight: 500; color: var(--cd-mute); }
.cf-sec-h > .cf-ic ~ small { flex-basis: auto; flex: 1; }
.cf-sec-h a:hover { color: var(--cd-ac); }
.cd.cf .cf-sec-more { margin-inline-start: auto; font-size: 13px; font-weight: 700; color: var(--cd-ac); }
.cf-sec-h small + .cf-sec-more { margin-inline-start: 0; }

.cf-forum { display: grid; grid-template-columns: 48px minmax(0, 1fr) 88px 240px; align-items: center; gap: 16px; padding: 16px 24px; transition: background .15s; }
.cf-forum + .cf-forum { border-top: 1px solid var(--cd-line); }
.cf-forum:hover { background: var(--cd-panel); }
.cf-forum-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); transition: transform .2s; }
.cf-forum:hover .cf-forum-ic { transform: rotate(-6deg) scale(1.05); }
.cf-forum-main h3 { font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.cf-forum-main h3 a:hover { color: var(--c); }
.cf-forum-main p { margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--cd-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cf-subs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cf-subs a { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--cd-soft); background: var(--cd-chip); }
.cf-subs a .cf-ic { color: var(--c); }
.cf-subs a:hover { color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.cf-forum-n { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--cd-mute); text-align: center; }
.cf-forum-n b { display: block; font-size: 15px; font-weight: 800; color: var(--cd-ink); }
.cf-forum-n span + span { display: flex; gap: 4px; justify-content: center; }
.cf-forum-n span + span b { display: inline; font-size: 12px; font-weight: 700; color: var(--cd-soft); }
.cf-forum-last a { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border-radius: 12px; }
.cf-forum-last a:hover { background: var(--cd-card); box-shadow: 0 0 0 1px var(--cd-line); }
.cf-forum-last img { flex: none; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.cf-forum-last a > span { min-width: 0; display: flex; flex-direction: column; }
.cf-forum-last em { overflow: hidden; font-size: 13px; font-style: normal; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.cf-forum-last small { overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; color: var(--cd-mute); }
.cf-forum-last .is-empty { font-size: 13px; font-weight: 600; color: var(--c); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 30%, transparent); border-radius: 12px; justify-content: center; }
.cf-forum-last .is-empty:hover { background: color-mix(in srgb, var(--c) 8%, transparent); }

/* waiting for your help */
.cf-sec.is-help { background: linear-gradient(180deg, color-mix(in srgb, var(--cf-yellow) 14%, var(--cd-card)), var(--cd-card) 120px); }
.cf-sec.is-help .cf-sec-h > .cf-ic { color: #d97706; }
.cf-help { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 16px 24px 24px; }
.cf-help-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px; border-radius: 14px; background: var(--cd-card); box-shadow: 0 0 0 1px var(--cd-line); transition: transform .15s, box-shadow .15s; }
.cf-help-card::before { content: ""; position: absolute; inset-block: 16px; inset-inline-start: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
[dir="rtl"] .cf-help-card::before { border-radius: 3px 0 0 3px; }
.cf-help-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent), 0 12px 24px -16px color-mix(in srgb, var(--c) 70%, transparent); }
.cf-help-f { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--c); }
.cf-help-card b { font-size: 14.5px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cf-help-card small { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--cd-mute); }
.cf-help-card small img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.cf-help-go { display: inline-flex; align-items: center; align-self: flex-start; gap: 8px; height: 32px; margin-top: auto; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--cd-ac); background: var(--cd-acs); }
.cf-help-card:hover .cf-help-go { color: #fff; background: var(--cd-ac); }

/* ---------- a discussion in a list ---------- */
.cf-list { overflow: hidden; border-radius: var(--cf-r); background: var(--cd-card); box-shadow: var(--cd-shadow); }
.cf-sec .cf-list { border-radius: 0; box-shadow: none; }
.cf-tr { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 220px; align-items: center; gap: 16px; padding: 16px 24px; transition: background .15s; }
.cf-tr + .cf-tr { border-top: 1px solid var(--cd-line); }
.cf-tr:hover { background: var(--cd-panel); }
.cf-tr.is-pinned { background: color-mix(in srgb, var(--cf-yellow) 7%, transparent); }
.cf-tr.is-compact { padding-block: 12px; }
.cf-av img, .cf-post-av img { display: block; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--cd-chip); }
.cf-tr.is-compact .cf-av img { width: 40px; height: 40px; }
.cd.cf .cf-tr-title { font-size: 15.5px; font-weight: 600; line-height: 1.35; text-wrap: pretty; }
.cf-tr-title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cf-tr-title a::after { content: ""; position: absolute; inset: 0; }
.cf-tr-title a:hover { color: var(--cd-ac); }
.cf-tr.is-unread .cf-tr-title { font-weight: 800; }
.cf-tr.is-unread .cf-av { position: relative; }
.cf-tr.is-unread .cf-av::after { content: ""; position: absolute; top: 0; inset-inline-end: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--cd-ac); box-shadow: 0 0 0 2px var(--cd-card); }
.cf-tr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; font-size: 12.5px; color: var(--cd-mute); }
.cf-tr-meta a, .cf-tr-stats, .cf-tr-last, .cf-av { position: relative; z-index: 1; }
.cf-tr-snip { margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: var(--cd-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cf-tr-stats { display: flex; gap: 12px; }
.cf-stat { display: inline-flex; align-items: center; gap: 4px; min-width: 40px; font-size: 13px; color: var(--cd-mute); }
.cf-stat b { font-weight: 700; color: var(--cd-soft); }
.cf-stat.is-on, .cf-stat.is-on b { color: var(--cf-pink); }
.cf-stat.is-zero { color: #d97706; }
.cf-stat.is-zero b { color: #d97706; }
.cf-tr-last { min-width: 0; }
.cf-tr-last-in { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border-radius: 10px; font-size: 12.5px; color: var(--cd-mute); }
.cf-tr-last-in:hover { background: var(--cd-card); box-shadow: 0 0 0 1px var(--cd-line); }
.cf-tr-last-in img { flex: none; width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.cf-tr-last-in > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cf-tr-last-in b { font-weight: 700; color: var(--cd-ink); }
.cf-tr-last-in em { display: block; overflow: hidden; font-style: normal; white-space: nowrap; text-overflow: ellipsis; color: var(--cd-soft); }
.cf-tr-first { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: #d97706; background: color-mix(in srgb, #f59e0b 12%, transparent); }
.cd.cf .cf-tr-first { color: #b45309; }
.cd.cf .cf-tr-first:is(:hover, :focus-visible) { color: #fff; background: #b45309; }

/* badges and chips */
.cf-badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; line-height: 1; white-space: nowrap; color: var(--cd-soft); background: var(--cd-chip); }
.cf-badge.is-lg { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.cf-badge.is-pin { color: #b45309; background: color-mix(in srgb, var(--cf-yellow) 26%, transparent); }
.cf-badge.is-solved { color: #047857; background: color-mix(in srgb, var(--cf-green) 15%, transparent); }
.cf-badge.is-lock { color: var(--cd-soft); background: var(--cd-chip); }
.cf-badge.is-new { color: #fff; background: var(--cf-pink); }
.cf-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 11%, transparent); }
.cf-chip:hover { color: #fff; background: var(--c); }
.cf-chip.is-solid { height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; color: #fff; background: var(--c); }
.cf-chip.is-solid:hover { filter: brightness(1.08); }
/* round 115: links keep their own colour - « .cd.cf a { color: inherit } » (0,2,1) outweighed every one-class rule (the forum chip read grey on its tint, white text never came on hover) */
/* the forum's own colour, darkened by day so light colours (pink, yellow) still read on their tint (the owner's 146) */
.cd.cf a.cf-chip { color: color-mix(in srgb, var(--c) 68%, #000); }
.cd.cf a.cf-chip:is(:hover, :focus-visible), .cd.cf a.cf-chip.is-solid { color: #fff; }
body.night-mode .cd.cf a.cf-chip:not(.is-solid):not(:hover):not(:focus-visible) { color: color-mix(in srgb, var(--c) 62%, #fff); background: color-mix(in srgb, var(--c) 20%, transparent); }
.cd.cf a.cf-tr-last-in { color: var(--cd-mute); }
.cd.cf a.cf-forum-ic { color: var(--c); }
.cd.cf a.cf-badge.is-solved { color: #047857; }
body.night-mode .cd.cf a.cf-badge.is-solved { color: #34d399; }
.cd.cf a.cf-rss { color: var(--cd-mute); }
.cd.cf a.cf-rss:hover { color: var(--cd-ink); }
.cd.cf a.cf-post-name:hover { color: var(--cd-ac); }
.cd.cf a.cf-post-num { color: var(--cd-mute); }
.cd.cf a.cf-post-num:hover { color: var(--cd-ac); }
.cf-pill { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; color: var(--cd-soft); background: var(--cd-chip); }
.cf-pill b { font-weight: 800; color: var(--cd-ink); }

/* ---------- filters, sort, pager, empty ---------- */
.cf-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cf-filters { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--cd-card); box-shadow: var(--cd-shadow); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.cf-filters a { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--cd-soft); }
.cf-filters a:hover { color: var(--cd-ink); background: var(--cd-panel); }
.cd.cf .cf-filters a.is-on { color: #fff; background: var(--cd-ink); }
body.night-mode .cd.cf .cf-filters a.is-on { color: #111; }
.cf-sort { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--cd-mute); }
.cd.cf .cf-sort select { background-color: var(--cd-card); box-shadow: var(--cd-shadow); }
.cf-sfilter label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; font-weight: 600; color: var(--cd-soft); }
.cd.cf .cf-sfilter select { background-color: var(--cd-card); box-shadow: var(--cd-shadow); }
.cf-found { padding: 0 8px; font-size: 13.5px; color: var(--cd-soft); }
.cf-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cf-pager a, .cf-pager span { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--cd-soft); background: var(--cd-card); box-shadow: var(--cd-shadow); }
.cf-pager a:hover { color: var(--cd-ac); }
.cd.cf .cf-pager .is-on { color: #fff; background: var(--cd-ac); }
.cd.cf .cf-pager .is-gap { background: transparent; box-shadow: none; }
.cf-pager .is-nav:not(.is-next) .cf-ic, [dir="rtl"] .cf-pager .is-next .cf-ic { transform: scaleX(-1); }
[dir="rtl"] .cf-pager .is-nav:not(.is-next) .cf-ic { transform: none; }
.cf-empty { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 48px 24px; border-radius: var(--cf-r); text-align: center; color: var(--cd-mute); background: var(--cd-card); box-shadow: var(--cd-shadow); }
.cf-empty p { max-width: 420px; font-size: 15px; line-height: 1.5; color: var(--cd-soft); }

/* ---------- a forum's page ---------- */
.cf-fhead { display: flex; align-items: center; gap: 24px; margin-bottom: 16px; padding: 24px; border-radius: 20px; background: linear-gradient(120deg, color-mix(in srgb, var(--c) 16%, var(--cd-card)), var(--cd-card) 70%); box-shadow: var(--cd-shadow), inset 0 0 0 1px color-mix(in srgb, var(--c) 18%, transparent); }
.cf-fhead-ic { display: grid; place-items: center; flex: none; width: 72px; height: 72px; border-radius: 20px; color: #fff; background: var(--c); box-shadow: 0 12px 24px -12px var(--c); }
.cf-fhead-t { flex: 1; min-width: 0; }
.cd.cf .cf-fhead h1 { font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.cf-fhead p { margin-top: 8px; font-size: 14.5px; line-height: 1.5; color: var(--cd-soft); }
.cf-fhead-n { display: flex; gap: 16px; margin-top: 8px; font-size: 13px; color: var(--cd-mute); }
.cf-fhead-n b { color: var(--cd-ink); }
.cf-fhead-act { display: flex; gap: 8px; flex: none; }
.cd.cf .cf-fhead-act .cd-btn.is-pri { background: var(--c); box-shadow: 0 8px 18px -10px var(--c); }
.cf-fhead-act .cd-btn.is-line:not(.js_cf-ffollow):not(.js_cf-ffollow-guest) { width: 36px; padding: 0; }
.cf-fhead-act .js_cf-ffollow-guest { gap: 8px; }
.cf-subgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.cf-subcard { display: flex; gap: 16px; padding: 16px; border-radius: var(--cf-r); background: var(--cd-card); box-shadow: var(--cd-shadow); transition: transform .15s, box-shadow .15s; }
.cf-subcard:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent), 0 12px 24px -16px color-mix(in srgb, var(--c) 70%, transparent); }
.cf-subcard .cf-forum-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; }
.cf-subcard > span:last-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cf-subcard b { font-size: 15px; font-weight: 700; }
.cf-subcard small { font-size: 13px; line-height: 1.4; color: var(--cd-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cf-subcard em { font-size: 12px; font-style: normal; color: var(--cd-mute); }

/* ---------- the side column ---------- */
.cf-box { padding: 16px; border-radius: var(--cf-r); background: var(--cd-card); box-shadow: var(--cd-shadow); }
.cf-box.is-flat { padding: 16px 0 0; border-radius: 0; background: transparent; box-shadow: none; border-top: 1px solid var(--cd-line); }
.cd.cf .cf-box-h { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 15px; font-weight: 800; }
.cf-box-h > .cf-ic { color: var(--cd-ac); }
.cf-box-h span { flex: 1; min-width: 0; }
.cf-box-h a { font-size: 12.5px; font-weight: 700; color: var(--cd-ac); }
.cf-box.is-flat .cf-box-h { margin-bottom: 8px; font-size: 13.5px; }
.cf-count { min-width: 24px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-style: normal; line-height: 22px; text-align: center; color: #047857; background: color-mix(in srgb, var(--cf-green) 15%, transparent); }
.cf-box-note { margin-top: 16px; font-size: 12px; line-height: 1.5; color: var(--cd-mute); }
.cf-rank { counter-reset: n; }
.cf-rank li + li, .cf-feed li + li, .cf-people li + li { margin-top: 4px; }
.cf-rank a, .cf-feed a, .cf-people a { display: flex; align-items: flex-start; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: 10px; }
.cf-rank a:hover, .cf-feed a:hover, .cf-people a:hover { background: var(--cd-panel); }
.cf-rank b { flex: none; width: 24px; font-size: 20px; font-weight: 800; line-height: 1.1; color: var(--cd-line); -webkit-text-stroke: 1px var(--cd-mute); color: transparent; }
.cf-rank li:first-child b { color: var(--cd-ac); -webkit-text-stroke: 0; }
.cf-rank span, .cf-feed span, .cf-people span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cf-rank em, .cf-feed em { font-size: 13.5px; font-style: normal; font-weight: 600; line-height: 1.4; color: var(--cd-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cf-rank small { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--cd-mute); }
.cf-feed img, .cf-people img { flex: none; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.cf-feed span { display: block; font-size: 13px; line-height: 1.4; color: var(--cd-soft); }
.cf-feed b { font-weight: 700; color: var(--cd-ink); }
.cf-feed em { display: inline; }
.cf-feed small { display: block; margin-top: 4px; font-size: 12px; color: var(--cd-mute); }
.cf-people a { align-items: center; }
.cf-people img { width: 34px; height: 34px; }
.cf-people b { font-size: 13.5px; font-weight: 700; }
.cf-people small { font-size: 12px; color: var(--cd-mute); }
.cf-medal { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-style: normal; font-weight: 800; color: var(--cd-soft); background: var(--cd-chip); }
.cf-medal.is-1 { color: #5c4500; background: linear-gradient(135deg, #ffe680, var(--cf-yellow)); }
.cf-medal.is-2 { color: #374151; background: linear-gradient(135deg, #f3f4f6, #cbd5e1); }
.cf-medal.is-3 { color: #fff; background: linear-gradient(135deg, #e7a26b, #b4683a); }
.cf-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cf-stats div { padding: 12px; border-radius: 12px; background: var(--cd-panel); }
.cf-stats b { display: block; font-size: 20px; font-weight: 800; line-height: 1.2; }
.cf-stats span { font-size: 12px; color: var(--cd-mute); }
.cf-online { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-online img { display: block; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--cd-card); }
.cf-online a { position: relative; transition: transform .15s; }
.cf-online a:hover { transform: translateY(-2px); }
.cf-online a.is-author img { box-shadow: 0 0 0 2px var(--cd-card), 0 0 0 4px var(--cd-ac); }
.cf-rss { display: flex; align-items: center; gap: 8px; padding: 0 8px; font-size: 13px; font-weight: 600; color: var(--cd-mute); }
.cf-rss .cf-ic { color: #f97316; }
.cf-rss:hover { color: var(--cd-ink); }

/* ---------- a discussion ---------- */
.cf-th-head { position: relative; margin-bottom: 24px; padding: 24px; border-radius: 20px; background: linear-gradient(120deg, color-mix(in srgb, var(--c) 10%, var(--cd-card)), var(--cd-card) 60%); box-shadow: var(--cd-shadow); }
.cd.cf .cf-th-head h1 { font-size: 28px; font-weight: 800; line-height: 1.25; letter-spacing: -.015em; overflow-wrap: anywhere; }
.cf-th-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.cf-th-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.cf-when-off, .cf-when-on { display: inline-flex; align-items: center; gap: 8px; }
.js_cf-follow .cf-when-on, .js_cf-follow.is-on .cf-when-off, .js_cf-ffollow .cf-when-on, .js_cf-ffollow.is-on .cf-when-off { display: none; }
.js_cf-follow.is-on .cf-when-on, .js_cf-ffollow.is-on .cf-when-on { display: inline-flex; }

.cf-post { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 24px; border-radius: var(--cf-r); background: var(--cd-card); box-shadow: var(--cd-shadow); scroll-margin-top: 88px; transition: box-shadow .3s; }
.cf-post.is-op { box-shadow: var(--cd-shadow), inset 0 3px 0 var(--c, var(--cd-ac)); }
.cf-post.is-answer { box-shadow: var(--cd-shadow), inset 0 0 0 2px color-mix(in srgb, var(--cf-green) 55%, transparent); }
.cf-post.is-flash { animation: cf-flash 2.2s ease-out; }
@keyframes cf-flash { 0%, 30% { box-shadow: 0 0 0 3px var(--cd-ac), 0 0 0 9px var(--cd-acs); } 100% { box-shadow: var(--cd-shadow); } }
.cf-posts { display: flex; flex-direction: column; gap: 16px; }
.cf-post-av { position: sticky; top: 88px; align-self: start; }
.cf-post-body { min-width: 0; }
.cf-post-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 12px; }
.cf-post-name { font-size: 15px; font-weight: 700; }
.cf-post-name:hover { color: var(--cd-ac); }
.cf-role { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--cd-ac); background: var(--cd-acs); }
.cf-role.is-admin { color: #fff; background: var(--cd-ink); }
body.night-mode .cd.cf .cf-role.is-admin { color: #111; }
.cf-role.is-author { color: #7c3aed; background: color-mix(in srgb, #8b5cf6 14%, transparent); }
.cf-post-time { font-size: 13px; color: var(--cd-mute); }
.cf-post-num { margin-inline-start: auto; font-size: 13px; font-weight: 700; color: var(--cd-mute); }
.cf-post-num:hover { color: var(--cd-ac); }

.cf-post-text { font-size: 15.5px; line-height: 1.7; color: var(--cd-ink); overflow-wrap: anywhere; }
.cf-post.is-op .cf-post-text { font-size: 16.5px; }
.cf-post-text > :first-child { margin-top: 0; }
.cf-post-text > :last-child { margin-bottom: 0; }
.cd.cf .cf-post-text p { margin: 0 0 12px; }
.cf-post-text a { color: var(--cd-ac); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.cf-post-text img, .cf-post-text video, .cf-post-text iframe { max-width: 100%; height: auto; border-radius: 12px; }
.cd.cf .cf-post-text ul, .cd.cf .cf-post-text ol { margin: 0 0 12px; padding-inline-start: 24px; list-style: revert; }
.cf-post-text li + li { margin-top: 4px; }
.cf-post-text blockquote { margin: 0 0 12px; padding: 8px 16px; border-inline-start: 3px solid var(--cd-line); color: var(--cd-soft); background: var(--cd-panel); border-radius: 0 10px 10px 0; }
[dir="rtl"] .cf-post-text blockquote { border-radius: 10px 0 0 10px; }
.cf-post-text pre { margin: 0 0 12px; padding: 16px; overflow-x: auto; border-radius: 12px; font-size: 13.5px; background: var(--cd-panel); }
.cf-post-text code { padding: 2px 4px; border-radius: 4px; font-size: .9em; background: var(--cd-chip); }
.cf-post-text pre code { padding: 0; background: none; }
.cf-post-text h1, .cf-post-text h2, .cf-post-text h3, .cf-post-text h4 { margin: 16px 0 8px; font-size: 1.15em; font-weight: 800; }
.cf-post-text table { width: 100%; margin: 0 0 12px; border-collapse: collapse; font-size: 14px; }
.cf-post-text td, .cf-post-text th { padding: 8px; border: 1px solid var(--cd-line); }

.cf-quote { display: block; margin-bottom: 12px; padding: 8px 16px; border-inline-start: 3px solid var(--cd-ac); border-radius: 0 12px 12px 0; background: var(--cd-panel); transition: background .15s; }
[dir="rtl"] .cf-quote { border-radius: 12px 0 0 12px; }
.cf-quote:hover { background: var(--cd-acs); }
.cf-quote b { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--cd-ac); }
.cf-quote span { display: -webkit-box; margin-top: 4px; font-size: 13.5px; line-height: 1.5; color: var(--cd-soft); -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.cf-post-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 16px; margin-inline-start: -8px; }
.cf-act { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 0; border-radius: 10px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--cd-soft); background: transparent; cursor: pointer; transition: background .15s, color .15s; }
.cf-act:hover { color: var(--cd-ink); background: var(--cd-chip); }
.cf-act b { font-weight: 700; }
.cf-act b:empty { display: none; }
.cf-act.is-icon { width: 36px; padding: 0; justify-content: center; }
.cf-act.js_cf-like.is-on { color: var(--cf-pink); }
.cf-act.js_cf-like.is-on .cf-ic { fill: currentColor; }
.cf-act.js_cf-like.is-pop .cf-ic { animation: cf-pop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes cf-pop { 40% { transform: scale(1.35); } }
.cf-act.is-solve:hover, .cf-act.is-solve.is-on { color: #047857; background: color-mix(in srgb, var(--cf-green) 13%, transparent); }
.cf-act.is-busy { opacity: .5; pointer-events: none; }

.cf-menu { position: relative; margin-inline-start: auto; }
.cf-th-act .cf-menu { margin-inline-start: 0; }
.cf-menu-pop { position: absolute; inset-inline-end: 0; top: calc(100% + 4px); z-index: 40; min-width: 220px; padding: 8px; border-radius: 14px; background: var(--cd-card); box-shadow: 0 16px 40px -12px rgba(16, 24, 40, .3), 0 0 0 1px var(--cd-line); animation: cf-in .15s ease-out; }
@keyframes cf-in { from { opacity: 0; transform: translateY(-4px); } }
.cf-menu-pop > a, .cf-menu-pop > button, .cf-move { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; margin: 0; padding: 0 12px; border: 0; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 500; text-align: start; color: var(--cd-ink); background: transparent; cursor: pointer; }
.cf-menu-pop > a:hover, .cf-menu-pop > button:hover { background: var(--cd-panel); }
.cf-menu-pop .cf-ic { color: var(--cd-soft); }
.cf-menu-pop .is-danger, .cf-menu-pop .is-danger .cf-ic { color: #e11d48; }
.cf-move { flex-wrap: wrap; height: auto; padding: 8px 12px; cursor: default; }
.cf-move span { flex: 1; }
.cd.cf .cf-move select { flex-basis: 100%; height: 32px; }

/* the summary */
.cf-sum { position: relative; overflow: hidden; padding: 16px 24px; border-radius: var(--cf-r); background: linear-gradient(120deg, color-mix(in srgb, #8b5cf6 12%, var(--cd-card)), color-mix(in srgb, var(--cd-ac) 8%, var(--cd-card))); box-shadow: var(--cd-shadow), inset 0 0 0 1px color-mix(in srgb, #8b5cf6 20%, transparent); }
.cf-sum header { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.cf-sum header .cf-ic { color: #7c3aed; }
.cf-sum header b { font-size: 15px; font-weight: 800; }
.cf-sum header small { font-size: 12px; color: var(--cd-mute); }
.cf-sum-body:empty { display: none; }
.cf-sum-body { margin-top: 12px; font-size: 14.5px; line-height: 1.6; }
.cd.cf .cf-sum-body ul { display: flex; flex-direction: column; gap: 8px; }
.cf-sum-body li { position: relative; padding-inline-start: 20px; }
.cf-sum-body li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .6em; width: 6px; height: 6px; border-radius: 2px; background: #8b5cf6; transform: rotate(45deg); }
.cf-sum .js_cf-sum-go { margin-top: 12px; color: #7c3aed; background: color-mix(in srgb, #8b5cf6 14%, transparent); }
.cf-sum.is-loading .cf-sum-body { display: block; height: 72px; border-radius: 10px; background: linear-gradient(90deg, var(--cd-chip) 25%, var(--cd-panel) 50%, var(--cd-chip) 75%); background-size: 200% 100%; animation: cf-shine 1.2s linear infinite; }
@keyframes cf-shine { to { background-position: -200% 0; } }

/* the chosen answer */
.cf-solution { padding: 16px 24px; border-radius: var(--cf-r); background: color-mix(in srgb, var(--cf-green) 8%, var(--cd-card)); box-shadow: var(--cd-shadow), inset 0 0 0 1.5px color-mix(in srgb, var(--cf-green) 40%, transparent); scroll-margin-top: 88px; }
.cf-solution header { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: #047857; }
.cf-solution header b { font-size: 15px; font-weight: 800; }
.cf-solution header a { margin-inline-start: auto; font-size: 13px; font-weight: 700; color: #047857; }
.cf-solution header a:hover { text-decoration: underline; }
.cf-solution-by { display: flex; align-items: center; gap: 8px; margin: 12px 0 8px; font-size: 13px; color: var(--cd-mute); }
.cf-solution-by img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.cf-solution-by b { font-weight: 700; color: var(--cd-ink); }
.cf-solution .cf-post-text { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
body.night-mode .cd.cf .cf-solution header, body.night-mode .cd.cf .cf-solution header a, body.night-mode .cd.cf .cf-badge.is-solved, body.night-mode .cd.cf .cf-act.is-solve.is-on { color: #34d399; }

.cf-th-sep { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 0; }
.cf-th-sep b { font-size: 16px; font-weight: 800; }
.cf-order { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--cd-chip); }
.cf-order a { height: 28px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; line-height: 28px; color: var(--cd-soft); }
.cd.cf .cf-order a.is-on { color: var(--cd-ink); background: var(--cd-card); box-shadow: var(--cd-shadow); }
.cf-unread { display: flex; align-items: center; gap: 16px; font-size: 12.5px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--cf-pink); scroll-margin-top: 96px; }
.cf-unread::before, .cf-unread::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: color-mix(in srgb, var(--cf-pink) 40%, transparent); }

/* the reply box */
.cf-reply { scroll-margin-top: 88px; }
.cf-note { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 24px; border-radius: var(--cf-r); font-size: 14.5px; color: var(--cd-soft); background: var(--cd-card); box-shadow: var(--cd-shadow); }
.cf-note > .cf-ic { color: var(--cd-ac); }
.cf-note span { flex: 1; min-width: 200px; }
.cf-compose, .cf-write { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: var(--cf-r); background: var(--cd-card); box-shadow: var(--cd-shadow); }
.cf-compose-h { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 800; }
.cf-compose-h img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.cf-compose .tox-tinymce, .cf-write .tox-tinymce { border-radius: 12px !important; border-color: var(--cd-line) !important; }
.cd.cf .cf-compose textarea.form-control, .cd.cf .cf-write textarea.form-control { min-height: 180px; border-radius: 12px; }
.cf-quoting { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-inline-start: 3px solid var(--cd-ac); border-radius: 0 12px 12px 0; font-size: 13px; color: var(--cd-soft); background: var(--cd-acs); animation: cf-in .2s ease-out; }
[dir="rtl"] .cf-quoting { padding: 8px 16px 8px 8px; border-radius: 12px 0 0 12px; }
.cf-quoting[hidden] { display: none; }
.cf-quoting > .cf-ic { color: var(--cd-ac); }
.cf-quoting > span { flex: none; }
.cf-quoting b { color: var(--cd-ink); }
.cf-quoting em { flex: 1; min-width: 0; overflow: hidden; font-style: normal; white-space: nowrap; text-overflow: ellipsis; }
.cf-quoting button { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border: 0; border-radius: 8px; color: var(--cd-soft); background: transparent; cursor: pointer; }
.cf-quoting button:hover { color: var(--cd-ink); background: var(--cd-card); }
.cf-compose-f { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cf-draft { flex: 1; min-width: 0; font-size: 12.5px; color: var(--cd-mute); }
.cf-compose .js_cf-improve, .cf-write .js_cf-improve { color: #7c3aed; background: color-mix(in srgb, #8b5cf6 13%, transparent); }
.cf-compose .js_cf-improve.is-busy .cf-ic, .cf-write .js_cf-improve.is-busy .cf-ic { animation: cf-spin 1s linear infinite; }
@keyframes cf-spin { to { transform: rotate(360deg); } }
.cd.cf .cd-btn.is-busy { opacity: .7; pointer-events: none; }
.cf-sec.is-more { margin-top: 8px; }

/* the sticky column and the navigator */
.cf-side.is-thread { position: sticky; top: 80px; }
.cf-sticky { display: flex; flex-direction: column; gap: 16px; }
.cd.cf .cf-reply-btn { width: 100%; }
.cf-nav { display: flex; flex-direction: column; gap: 8px; }
.cf-nav-top { display: inline-flex; align-items: center; align-self: flex-start; gap: 8px; height: 32px; padding: 0 8px; border: 0; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--cd-soft); background: transparent; cursor: pointer; }
.cf-nav-top:hover { color: var(--cd-ac); background: var(--cd-acs); }
.cf-nav-track { --p: 0%; position: relative; height: 200px; margin: 24px 16px; border-inline-start: 3px solid var(--cd-line); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.cf-nav-track:focus-visible { outline: 2px solid var(--cd-ac); outline-offset: 4px; border-radius: 4px; }
.cf-nav-fill { position: absolute; inset-inline-start: -3px; top: 0; width: 3px; height: var(--p); border-radius: 3px; background: var(--cd-ac); }
.cf-nav-knob { position: absolute; inset-inline-start: -3px; top: var(--p); display: flex; flex-direction: column; gap: 2px; padding-inline-start: 16px; font-size: 13px; white-space: nowrap; color: var(--cd-mute); transform: translateY(-50%); transition: top .08s linear; }
.cf-nav-knob::before { content: ""; position: absolute; inset-inline-start: -4px; top: 50%; width: 11px; height: 40px; border-radius: 8px; background: var(--cd-ac); box-shadow: 0 0 0 3px var(--cd-acs); transform: translateY(-50%); transition: transform .15s; }
.cf-nav-track:hover .cf-nav-knob::before, .cf-nav.is-drag .cf-nav-knob::before { transform: translateY(-50%) scaleX(1.25); }
.cf-nav-knob b { font-size: 15px; font-weight: 800; color: var(--cd-ink); }
.cf-nav-knob small { font-size: 12px; }
.cf-nav.is-drag .cf-nav-knob { transition: none; }
.cf-sim { display: flex; flex-direction: column; gap: 4px; }
.cf-sim a { display: block; padding: 8px; margin: 0 -8px; border-radius: 10px; font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--cd-ink); }
.cf-sim a:hover { color: var(--cd-ac); background: var(--cd-panel); }
.cf-sim small { display: block; margin-top: 4px; font-size: 12px; font-weight: 500; color: var(--cd-mute); }

/* ---------- writing a discussion ---------- */
.cd.cf .cf-write h1 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.cf-write-sub { margin-top: -4px; font-size: 14.5px; color: var(--cd-soft); }
.cd.cf .cf-label { display: block; margin: 8px 0 0; font-size: 13.5px; font-weight: 700; color: var(--cd-ink); }
.cf-input { width: 100%; height: 52px; padding: 0 16px; border: 0; border-radius: 12px; font: inherit; font-size: 16px; font-weight: 600; color: var(--cd-ink); background: var(--cd-panel); box-shadow: inset 0 0 0 1.5px var(--cd-line); transition: box-shadow .15s; }
.cf-input:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--cd-ac), 0 0 0 4px var(--cd-acs); }
.cf-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-pick-it { margin: 0; cursor: pointer; }
.cf-pick-it input { position: absolute; opacity: 0; pointer-events: none; }
.cf-pick-it span { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--cd-soft); background: var(--cd-panel); box-shadow: inset 0 0 0 1.5px var(--cd-line); transition: background .15s, box-shadow .15s, color .15s; }
.cf-pick-it span .cf-ic { color: var(--c); }
.cf-pick-it:hover span { color: var(--cd-ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 50%, transparent); }
.cf-pick-it input:checked + span { color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); box-shadow: inset 0 0 0 2px var(--c); }
.cf-pick-it input:focus-visible + span { outline: 2px solid var(--c); outline-offset: 2px; }
.cf-dupes { padding: 16px; border-radius: 12px; background: color-mix(in srgb, var(--cf-yellow) 16%, var(--cd-card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cf-yellow) 50%, transparent); animation: cf-in .2s ease-out; }
.cf-dupes[hidden] { display: none; }
.cf-dupes > b { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 800; color: #92400e; }
body.night-mode .cd.cf .cf-dupes > b { color: var(--cf-yellow); }
.cf-dupes ul { margin-top: 8px; }
.cf-dupes a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; margin: 0 -8px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.cf-dupes a:hover { background: color-mix(in srgb, var(--cf-yellow) 22%, transparent); }
.cf-dupes small { flex: none; font-size: 12px; font-weight: 500; color: var(--cd-mute); }
.cf-write .cf-compose-f { margin-top: 8px; }
.cf-tips ol { counter-reset: tip; display: flex; flex-direction: column; gap: 16px; }
.cf-tips li { position: relative; padding-inline-start: 40px; font-size: 13.5px; line-height: 1.5; color: var(--cd-soft); counter-increment: tip; }
.cf-tips li::before { content: counter(tip); position: absolute; inset-inline-start: 0; top: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-size: 13px; font-weight: 800; color: var(--cd-ac); background: var(--cd-acs); }
.cf-tips li b { display: block; margin-bottom: 4px; font-weight: 700; color: var(--cd-ink); }

/* ---------- night ---------- */
body.night-mode .cf-hero { background: radial-gradient(circle at 85% 18%, rgba(110, 170, 255, .2), transparent 44%), linear-gradient(135deg, #1d5be0 0%, #0a36b8 55%, #082d99 100%); }
body.night-mode .cf-search { background: #2a2a2a; }
body.night-mode .cf-search input { color: #e9edf2; }
body.night-mode .cd.cf .cf-badge.is-pin { color: var(--cf-yellow); }
body.night-mode .cd.cf .cf-stat.is-zero, body.night-mode .cd.cf .cf-stat.is-zero b, body.night-mode .cd.cf .cf-tr-first { color: #fbbf24; }
body.night-mode .cd.cf .cf-tr-first:is(:hover, :focus-visible) { color: #18191a; background: #fbbf24; }
body.night-mode .cd.cf .cf-role.is-author, body.night-mode .cd.cf .cf-sum header .cf-ic, body.night-mode .cd.cf .js_cf-improve, body.night-mode .cd.cf .js_cf-sum-go { color: #c4b5fd; }
body.night-mode .cd.cf .cf-count { color: #34d399; }
body.night-mode .cd.cf .cf-medal.is-2 { color: #111; }

/* ---------- smaller screens ---------- */
@media (max-width: 1199px) {
  .cf-grid { grid-template-columns: minmax(0, 1fr) 280px; }
  .cf-forum { grid-template-columns: 48px minmax(0, 1fr) 72px; }
  .cf-forum-last { grid-column: 2 / -1; margin-top: -8px; }
  .cf-forum-last a { display: inline-flex; max-width: 100%; padding: 4px 8px; background: var(--cd-panel); }
  .cf-forum-last img { width: 22px; height: 22px; }
  .cf-forum-last a > span { flex-direction: row; gap: 8px; }
  .cf-tr { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .cf-tr-last { display: none; }
}
@media (max-width: 991px) {
  .cf-grid, .cf-grid.is-thread { grid-template-columns: minmax(0, 1fr); }
  .cf-side.is-thread { position: static; }
  .cf-side.is-thread .cf-reply-btn { display: none; }
  .cf-hero-art { display: none; }
  .cf-hero, .cf-hero.is-small { min-height: 0; padding-top: 80px; }
  .cf-help { grid-template-columns: minmax(0, 1fr); }
  /* the navigator becomes a small floating pill */
  .cf-nav { position: fixed; inset-inline-end: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 50; flex-direction: row; align-items: center; gap: 0; padding: 4px; border-radius: 99px; background: var(--cd-card); box-shadow: 0 12px 32px -8px rgba(16, 24, 40, .35), 0 0 0 1px var(--cd-line); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .2s, transform .2s; }
  .cf-nav.is-shown { opacity: 1; transform: none; pointer-events: auto; }
  .cf-nav-top { align-self: center; width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; }
  .cf-nav-top span { display: none; }
  .cf-nav-track { height: auto; margin: 0 4px; border: 0; cursor: default; }
  .cf-nav-fill, .cf-nav-knob::before { display: none; }
  .cf-nav-knob { position: static; flex-direction: row; align-items: baseline; gap: 4px; padding: 0 8px; transform: none; }
  .cf-nav-knob small { display: none; }
}
@media (max-width: 668px) {
  .cd.cf { padding: 8px 0 24px; }
  .cf-hero, .cf-hero.is-small { padding: 24px 16px; border-radius: 0 0 20px 20px; margin-top: -8px; }
  .cf-hero, .cf-hero.is-small { padding-top: 64px; }
  .cd.cf .cf-hero h1 { font-size: 26px; }
  .cd.cf .cf-hero.is-small h1 { font-size: 22px; }
  .cf-hero p { font-size: 14.5px; }
  .cf-search { height: 52px; margin-top: 16px; }
  .cf-search .cd-btn { display: none; }
  .cf-tabs { margin-inline: 8px; flex-wrap: wrap; }
  .cf-tabs-in { flex-basis: 100%; }
  .cf-tabs .cf-new { flex: 1; }
  .cf-grid, .cf-crumbs, .cf-fhead, .cf-subgrid, .cf-th-head { margin-inline: 8px; }
  .cd.cf .cf-sec-h { padding: 16px; }
  .cf-forum { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 16px; }
  .cf-forum-ic { width: 40px; height: 40px; border-radius: 12px; }
  .cf-forum-n { grid-column: 2; flex-direction: row; gap: 12px; margin-top: -4px; text-align: start; }
  .cf-forum-n b { display: inline; font-size: 12.5px; margin-inline-end: 4px; }
  .cf-forum-n span + span b { font-weight: 800; color: var(--cd-ink); }
  .cf-forum-last { grid-column: 2; margin-top: -4px; }
  .cf-forum-last a { display: flex; }
  .cf-forum-last a > span { flex-direction: column; gap: 0; }
  .cf-help { padding: 16px; }
  .cf-tr { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 16px; }
  .cf-av img, .cf-tr.is-compact .cf-av img { width: 36px; height: 36px; }
  .cf-tr-stats { grid-column: 2; margin-top: -4px; }
  .cd.cf .cf-tr-title { font-size: 15px; }
  .cf-bar { padding: 0; }
  .cf-sort { flex: 1; justify-content: flex-end; }
  .cf-fhead { flex-wrap: wrap; gap: 16px; padding: 16px; }
  .cf-fhead-ic { width: 56px; height: 56px; border-radius: 16px; }
  .cd.cf .cf-fhead h1 { font-size: 22px; }
  .cf-fhead-act { flex-basis: 100%; }
  .cf-fhead-act .cd-btn.is-pri { flex: 1; }
  .cf-fhead-act { flex-wrap: wrap; }
  .cf-fhead-act :is(.js_cf-ffollow, .js_cf-ffollow-guest) { flex: 1 1 auto; justify-content: center; }
  .cf-th-head { padding: 16px; }
  .cd.cf .cf-th-head h1 { font-size: 22px; }
  .cf-post { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 16px; border-radius: 0; }
  .cf-posts { gap: 8px; }
  .cf-post-av { position: absolute; top: 16px; inset-inline-start: 16px; }
  .cf-post-av img { width: 36px; height: 36px; }
  .cf-post-head { min-height: 36px; padding-inline-start: 48px; }
  .cf-post.is-op .cf-post-text { font-size: 16px; }
  .cf-act-l { display: none; }
  .cf-act.js_cf-like .cf-act-l, .cf-act.is-solve .cf-act-l { display: inline; }
  .cf-sum, .cf-solution, .cf-note, .cf-compose, .cf-write, .cf-list, .cf-sec, .cf-empty, .cf-box { border-radius: 0; }
  .cf-sum, .cf-solution, .cf-note { padding: 16px; }
  .cf-compose, .cf-write { padding: 16px; }
  .cf-th-sep { padding: 8px 16px 0; }
  .cf-pager { padding: 0 8px; }
  .cf-side { padding: 0; }
  .cf-side .cf-rss, .cf-found { padding: 0 16px; }
  .cf-grid { margin-inline: 0; }
  .cf-side.is-thread .cf-sticky { padding: 0 16px; }
  .cf-pick-it span { height: 36px; padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .cd.cf *, .cd.cf *::before, .cd.cf *::after { animation: none !important; transition: none !important; }
}

/* what members write keeps its own direction (French in the Arabic site, Arabic in the French one) */
.cd.cf h1, .cf-post-text > *, .cf-tr-title a, .cf-tr-snip, .cf-forum-main h3, .cf-forum-main p, .cf-subcard small, .cf-rank em, .cf-feed em, .cf-sim a, .cf-help-card b,
.cf-forum-last em, .cf-tr-last-in em, .cf-quote span, .cf-sum-body li, .cf-sec-h small, .cf-fhead p, .cf-dupes a span, .cf-suggest b { unicode-bidi: plaintext; }

/* ---------- round 115: 👎, Ghali's replies, « Premier à répondre », the one-tap poll ---------- */
.cd.cf .cf-act.js_cf-dislike.is-on { color: var(--cd-ink); }
.cd.cf .cf-act.js_cf-dislike.is-on .cf-ic { fill: currentColor; }
.cd.cf .cf-act.js_cf-dislike.is-pop .cf-ic { animation: cf-pop .45s cubic-bezier(.2, 1.6, .4, 1); }
.cd.cf .cf-act.js_cf-like + .js_cf-dislike { margin-inline-start: -4px; }
.cd.cf .cf-role.is-bot { gap: 4px; color: #0e7490; background: color-mix(in srgb, #06b6d4 15%, transparent); }
.cd.cf .cf-post.is-bot .cf-post-av img { box-shadow: 0 0 0 2px var(--cd-card, #fff), 0 0 0 4px #22d3ee; }
.cd.cf .cf-badge.is-first { color: #92400e; background: color-mix(in srgb, #f59e0b 22%, transparent); }
body.night-mode .cd.cf .cf-role.is-bot { color: #67e8f9; background: rgba(34, 211, 238, .16); }
body.night-mode .cd.cf .cf-badge.is-first { color: #fcd34d; background: rgba(245, 158, 11, .2); }

.cd.cf .cf-poll { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 0; padding: 16px; border: 1px solid var(--cd-line); border-radius: 16px; background: var(--cd-panel); }
.cd.cf .cf-poll-h { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.cd.cf .cf-poll-tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; color: #7c3aed; background: color-mix(in srgb, #8b5cf6 14%, transparent); }
.cd.cf .cf-poll-q { font-size: 15.5px; font-weight: 800; line-height: 1.35; color: var(--cd-ink); text-align: start; unicode-bidi: plaintext; }
.cd.cf .cf-poll-opts { display: flex; flex-direction: column; gap: 8px; }
.cd.cf .cf-poll-o { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 8px 14px; overflow: hidden; border: 1px solid var(--cd-line); border-radius: 12px; font: inherit; font-size: 14px; font-weight: 600; text-align: start; color: var(--cd-ink); background: var(--cd-card); cursor: pointer; isolation: isolate; transition: border-color .15s, transform .12s; }
.cd.cf .cf-poll-o::before { content: ""; position: absolute; inset: 0; z-index: -1; width: var(--pc, 0%); background: color-mix(in srgb, var(--cd-ac) 14%, transparent); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
[dir="rtl"] .cd.cf .cf-poll-o::before { inset-inline-start: 0; left: auto; right: 0; }
.cd.cf .cf-poll-o:hover { border-color: var(--cd-ac); }
.cd.cf .cf-poll-o:active { transform: scale(.99); }
.cd.cf .cf-poll-o.is-mine { border-color: var(--cd-ac); box-shadow: 0 0 0 1px var(--cd-ac) inset; }
.cd.cf .cf-poll-o.is-mine::before { background: color-mix(in srgb, var(--cd-ac) 24%, transparent); }
.cd.cf .cf-poll-t { display: inline-flex; align-items: center; gap: 8px; min-width: 0; unicode-bidi: plaintext; }
.cd.cf .cf-poll-o.is-mine .cf-poll-t { color: var(--cd-ac); }
.cd.cf .cf-poll-pc { flex: none; font-size: 13px; font-weight: 800; color: var(--cd-soft); font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .3s; }
.cd.cf .cf-poll.is-voted .cf-poll-pc { opacity: 1; }
.cd.cf .cf-poll-f { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; font-size: 12.5px; color: var(--cd-mute); }
.cd.cf .cf-poll.is-busy { opacity: .7; pointer-events: none; }
@media (max-width: 668px) {
  .cd.cf .cf-poll { padding: 8px; border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .cd.cf .cf-poll-o::before, .cd.cf .cf-poll-pc { transition: none; }
}

/* ---------- round 117: « Meilleure réponse » (members' vote) and Ghali's 3-line summary ---------- */
.cd.cf .cf-act.is-best:hover, .cd.cf .cf-act.is-best.is-on { color: #b45309; background: color-mix(in srgb, #f59e0b 16%, transparent); }
.cd.cf .cf-act.is-best.is-on .cf-ic { fill: color-mix(in srgb, #f59e0b 45%, transparent); }
.cd.cf .cf-act.is-best.is-pop .cf-ic { animation: cf-pop .45s cubic-bezier(.2, 1.6, .4, 1); }
.cd.cf .cf-act.is-best.is-static { cursor: default; color: #b45309; }
.cd.cf .cf-act.is-best.is-static:hover { background: transparent; }
.cd.cf .cf-badge.is-best { color: #92400e; background: color-mix(in srgb, #f59e0b 22%, transparent); }
.cd.cf .cf-badge.is-best.is-new { animation: cf-pop .45s cubic-bezier(.2, 1.6, .4, 1); }
.cd.cf .cf-solution.is-best { background: color-mix(in srgb, #f59e0b 8%, var(--cd-card)); box-shadow: var(--cd-shadow), inset 0 0 0 1.5px color-mix(in srgb, #f59e0b 42%, transparent); }
.cd.cf .cf-solution.is-best header, .cd.cf .cf-solution.is-best header a { color: #b45309; }
.cd.cf .cf-best-n { font-size: 13px; font-weight: 700; color: #92400e; }
.cd.cf .cf-sum header.is-face { gap: 8px; }
.cd.cf .cf-sum-av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--cd-card), 0 0 0 3.5px color-mix(in srgb, #06b6d4 55%, transparent); }
.cd.cf .cf-sum header.is-face small { flex-basis: 100%; padding-inline-start: 40px; }
@media (max-width: 668px) {
  .cd.cf .cf-act.is-best .cf-act-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cd.cf .cf-sum header.is-face small { padding-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cd.cf .cf-act.is-best.is-pop .cf-ic, .cd.cf .cf-badge.is-best.is-new { animation: none; }
}
body.night-mode .cd.cf .cf-act.is-best:hover, body.night-mode .cd.cf .cf-act.is-best.is-on, body.night-mode .cd.cf .cf-act.is-best.is-static { color: #fbbf24; }
body.night-mode .cd.cf .cf-badge.is-best, body.night-mode .cd.cf .cf-best-n { color: #fcd34d; }
body.night-mode .cd.cf .cf-badge.is-best { background: rgba(245, 158, 11, .2); }
body.night-mode .cd.cf .cf-solution.is-best header, body.night-mode .cd.cf .cf-solution.is-best header a { color: #fbbf24; }

/* round 118: « Meilleurs contributeurs du mois » - the month in a gold chip, a trophy before the best answers, the last
   month's note right under the head (8 px) */
.cd.cf .cf-month .cf-box-h { margin-bottom: 8px; }
.cd.cf .cf-month .cf-box-h + .cf-people { margin-top: 8px; }
.cf-month-chip { flex: none; height: 22px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-style: normal; font-weight: 700; line-height: 22px; text-transform: capitalize; color: #8a5a00; background: color-mix(in srgb, #f5a623 18%, transparent); }
body.night-mode .cf-month-chip { color: #ffc23d; background: color-mix(in srgb, #f5a623 22%, transparent); }
.cd.cf .cf-month .cf-box-h + .cf-box-note { margin: 0 0 8px; }
.cd.cf .cf-month .cf-people small { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cd.cf .cf-month .cf-people small > .cf-ic { flex: none; color: #d08b00; }
body.night-mode .cd.cf .cf-month .cf-people small > .cf-ic { color: #ffc23d; }
