/* ============================================================
   Cyberpedia CTF v2 — new section types (home, dashboard, podium,
   tracks, ladder, event band, page upgrades). Uses cp-skin tokens.
   ============================================================ */
html[data-cp-lang="ar"] [data-l="en"],
html:not([data-cp-lang="ar"]) [data-l="ar"] { display: none !important; }
html, body { overflow-x: clip; }

.v2 { --r-lg: 22px; --r-md: 16px; --r-sm: 12px; }
.v2 *, .v2 *::before, .v2 *::after { box-sizing: border-box; }
.v2-ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .v2-flip, html[data-cp-lang="ar"] .v2-flip { transform: scaleX(-1); }
.v2-eyebrow { font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--cp-link); }
html[data-cp-lang="ar"] .v2-eyebrow { letter-spacing: 0; text-transform: none; font-size: .82rem; }
.v2-sec { padding-block: 72px 0; display: grid; gap: 26px; }
.v2-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.v2-head > div { display: grid; gap: 8px; max-width: 640px; }
.v2-head h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; color: var(--cp-head); }
.v2-head p { margin: 0; color: var(--cp-mute); }
.v2-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--cp-link); text-decoration: none; }
.v2-link:hover { text-decoration: underline; }
.v2-link .v2-ico { width: 16px; height: 16px; }
.v2-card { background: var(--cp-surface); border: 1px solid var(--cp-line); border-radius: var(--r-md); box-shadow: var(--cp-shadow); }
.v2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: .92rem; text-decoration: none !important; border: 1px solid transparent; cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s; }
.v2-btn.main { background: #47bbc9; color: #0c222b !important; }
.v2-btn.main:hover { background: #53c5d3; transform: translateY(-1px); }
.v2-btn.ghost { background: transparent; border-color: var(--cp-line); color: var(--cp-head) !important; }
.v2-btn.ghost:hover { border-color: #47bbc9; }
.v2-bleed { margin-inline: calc(50% - 50vw); padding-inline: max(16px, calc(50vw - 50%)); }
.v2-navy {
  background:
    radial-gradient(900px 300px at 88% -20%, rgba(71, 187, 201, .22), transparent 70%),
    radial-gradient(700px 260px at 0% 120%, rgba(4, 122, 134, .28), transparent 70%),
    #0c222b;
  color: #bcd6e1;
  --cp-head: #f2f8fa; --cp-ink: #dfeaef; --cp-mute: #9fb8c2; --cp-line: rgba(223, 234, 239, .12);
  --cp-surface: rgba(255, 255, 255, .04); --cp-surface-2: rgba(255, 255, 255, .07); --cp-link: #53c5d3;
}
.v2-navy .v2-btn.ghost { color: #f2f8fa !important; border-color: rgba(223, 234, 239, .22); }
.v2-pill { display: inline-flex; align-items: center; gap: 8px; width: max-content; max-width: 100%; border-radius: 999px; padding: 6px 14px; font-size: .82rem; font-weight: 600; border: 1px solid rgba(71, 187, 201, .4); background: rgba(71, 187, 201, .1); color: #53c5d3; }
.v2-pill i { width: 8px; height: 8px; border-radius: 50%; background: #47bbc9; box-shadow: 0 0 0 4px rgba(71, 187, 201, .2); flex: none; }
.v2-empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 36px 20px; color: var(--cp-mute); }
.v2-empty .v2-ico { width: 34px; height: 34px; color: #47bbc9; }
.v2-empty b { color: var(--cp-head); font-size: 1.05rem; }
.v2-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: .85rem; color: #0c222b; background: linear-gradient(135deg, #53c5d3, #47bbc9); }
.v2-num { font-variant-numeric: tabular-nums; }

/* ---- home: hero ---- */
.cp .v2-hero { padding-block: 64px 96px; }
.v2-hero-in { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 56px; align-items: center; }
.v2-hero h1 { margin: 18px 0 16px; color: #f2f8fa !important; font-size: clamp(2rem, 3.5vw, 2.9rem); line-height: 1.12; font-weight: 800 !important; letter-spacing: -.02em; }
html[data-cp-lang="ar"] .v2-hero h1 { line-height: 1.35; letter-spacing: 0; }
.v2-hero h1 em { font-style: normal; color: #47bbc9; display: block; }
.v2-hero .lead { color: #bcd6e1 !important; font-size: 1.05rem; max-width: 560px; margin: 0; }
.v2-hero .cp-actions { justify-content: flex-start !important; margin: 26px 0 0 !important; }
.v2-hero-sub { margin-top: 18px; font-size: .88rem; color: #9fb8c2; }
.v2-hero-sub a { color: #53c5d3; }
.v2-hero .cp-flag { margin: 0 !important; max-width: none !important; width: 100%; background: rgba(8, 26, 33, .65) !important; border-color: rgba(223, 234, 239, .14) !important; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); }
.v2-hero .cp-term-body { height: 10.5rem !important; }

/* ---- home: pulse strip ---- */
.v2-pulse { position: relative; margin-top: -44px; z-index: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 6px; }
.v2-pulse > div { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-inline-start: 1px solid var(--cp-line); min-width: 0; }
.v2-pulse > div:first-child { border-inline-start: 0; }
.v2-pulse .v2-ico { color: #47bbc9; }
.v2-pulse b { display: block; color: var(--cp-head); font-size: 1.05rem; line-height: 1.3; }
.v2-pulse span { display: block; color: var(--cp-mute); font-size: .8rem; line-height: 1.4; }

/* ---- home: tracks (bento) ---- */
.v2-tracks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.v2-track { position: relative; display: grid; gap: 10px; align-content: start; padding: 22px; min-height: 176px; text-decoration: none !important; color: var(--cp-ink) !important; transition: transform .15s, border-color .15s; }
.v2-track:hover { transform: translateY(-3px); border-color: #47bbc9; }
.v2-track.wide { grid-column: span 2; background: linear-gradient(135deg, rgba(71, 187, 201, .14), rgba(4, 122, 134, .06)), var(--cp-surface); }
.v2-track .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(71, 187, 201, .12); color: #47bbc9; }
.v2-track h3 { margin: 4px 0 0; font-size: 1.05rem; color: var(--cp-head); }
.v2-track p { margin: 0; color: var(--cp-mute); font-size: .88rem; line-height: 1.65; }
.v2-track .meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .8rem; color: var(--cp-mute); }
.v2-track .meta .v2-ico { width: 18px; height: 18px; color: var(--cp-link); }
.v2-track .bar { height: 6px; border-radius: 999px; background: var(--cp-surface-2); overflow: hidden; }
.v2-track .bar i { display: block; height: 100%; width: 0; background: #47bbc9; border-radius: inherit; transition: width .6s; }
.v2-diff { display: inline-flex; gap: 4px; align-items: center; }
.v2-diff i { width: 7px; height: 7px; border-radius: 50%; background: var(--cp-surface-2); }
.v2-diff i.on { background: #47bbc9; }

/* ---- home: difficulty ladder ---- */
.v2-ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; position: relative; padding-top: 6px; }
.v2-ladder::before { content: ""; position: absolute; top: 26px; inset-inline: 10%; height: 2px; background: linear-gradient(90deg, #47bbc9, rgba(71, 187, 201, .15)); }
html[data-cp-lang="ar"] .v2-ladder::before { background: linear-gradient(270deg, #47bbc9, rgba(71, 187, 201, .15)); }
.v2-rung { position: relative; display: grid; justify-items: center; text-align: center; gap: 8px; }
.v2-rung .dot { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; background: var(--cp-bg); border: 2px solid #47bbc9; color: var(--cp-head); }
.v2-rung:nth-child(1) .dot { background: #47bbc9; color: #0c222b; }
.v2-rung:nth-child(4) .dot, .v2-rung:nth-child(5) .dot { border-color: rgba(71, 187, 201, .45); }
.v2-rung h3 { margin: 6px 0 0; font-size: 1rem; color: var(--cp-head); }
.v2-rung p { margin: 0; font-size: .85rem; color: var(--cp-mute); line-height: 1.6; }
.v2-rung .sug { margin-top: 4px; font-size: .8rem; font-weight: 600; color: var(--cp-link); text-decoration: none; }

/* ---- event band ---- */
.cp .v2-event { margin-top: 72px; padding-block: 48px; }
.v2-event-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; }
.v2-event h2 { margin: 12px 0 10px; color: #f2f8fa !important; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.v2-event p { margin: 0; color: #bcd6e1; }
.v2-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.v2-chips > span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(223, 234, 239, .16); border-radius: 999px; padding: 5px 12px; font-size: .8rem; color: #dfeaef; background: rgba(255, 255, 255, .04); }
.v2-chips .v2-ico { width: 15px; height: 15px; color: #47bbc9; }
.v2-event-box { display: grid; gap: 14px; padding: 22px; border-radius: var(--r-md); border: 1px solid rgba(223, 234, 239, .12); background: rgba(255, 255, 255, .04); }
.v2-event-box .cp-cdbox { margin: 0 !important; }
.v2-event-box .cp-cdlabel { margin: 0 !important; color: #dfeaef !important; font-weight: 600; }

/* ---- podium + feed ---- */
.v2-board { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.v2-board > .v2-card { padding: 22px; display: grid; gap: 16px; }
.v2-board h3 { margin: 0; font-size: 1rem; color: var(--cp-head); display: flex; align-items: center; gap: 8px; }
.v2-board h3 .v2-ico { color: #47bbc9; width: 18px; height: 18px; }
.v2-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; padding-top: 8px; }
.v2-podium .p { display: grid; justify-items: center; gap: 6px; text-align: center; min-width: 0; }
.v2-podium .p .nm { font-weight: 600; color: var(--cp-head); font-size: .9rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-podium .p .sc { font-size: .78rem; color: var(--cp-mute); }
.v2-podium .ped { width: 100%; border-radius: 12px 12px 4px 4px; display: grid; place-items: center; font-weight: 800; color: var(--cp-head); background: var(--cp-surface-2); border: 1px solid var(--cp-line); }
.v2-podium .p1 .ped { height: 96px; background: linear-gradient(180deg, rgba(71, 187, 201, .35), rgba(71, 187, 201, .08)); border-color: rgba(71, 187, 201, .5); }
.v2-podium .p2 .ped { height: 70px; }
.v2-podium .p3 .ped { height: 52px; }
.v2-podium .p1 .v2-av { width: 48px; height: 48px; box-shadow: 0 0 0 4px rgba(71, 187, 201, .25); }
.v2-podium .open .v2-av { background: transparent; border: 1.5px dashed var(--cp-line); color: var(--cp-mute); }
.v2-rows { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.v2-rows li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; font-size: .9rem; }
.v2-rows li:nth-child(odd) { background: var(--cp-surface-2); }
.v2-rows li.me { outline: 1.5px solid #47bbc9; }
.v2-rows .pl { color: var(--cp-mute); font-weight: 700; }
.v2-rows a { color: var(--cp-head); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-rows .pt { color: var(--cp-link); font-weight: 700; }
.v2-feed { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.v2-feed li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--cp-line); font-size: .86rem; }
.v2-feed li:last-child { border-bottom: 0; }
.v2-feed .v2-av { width: 30px; height: 30px; font-size: .72rem; }
.v2-feed b { color: var(--cp-head); font-weight: 600; }
.v2-feed time { color: var(--cp-mute); font-size: .76rem; white-space: nowrap; }

/* ---- learn bridge ---- */
.v2-learn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.v2-learn .v2-card { padding: 26px; display: grid; gap: 10px; align-content: start; }
.v2-learn .v2-card.alt { background: linear-gradient(135deg, rgba(71, 187, 201, .16), rgba(4, 122, 134, .06)), var(--cp-surface); }
.v2-learn h3 { margin: 0; font-size: 1.15rem; color: var(--cp-head); }
.v2-learn p { margin: 0; color: var(--cp-mute); }
.v2-learn .v2-btn { margin-top: 8px; width: max-content; }

/* ---- faq mini ---- */
.v2-faq { display: grid; gap: 10px; }
.v2-faq details { padding: 0; }
.v2-faq summary { list-style: none; cursor: pointer; padding: 16px 20px; display: flex; justify-content: space-between; gap: 12px; font-weight: 600; color: var(--cp-head); }
.v2-faq summary::-webkit-details-marker { display: none; }
.v2-faq summary::after { content: "+"; color: #47bbc9; font-weight: 700; }
.v2-faq details[open] summary::after { content: "–"; }
.v2-faq details p { margin: 0; padding: 0 20px 18px; color: var(--cp-mute); }

/* ---- player dashboard ---- */
.cp .v2-dash { padding-block: 48px 88px; }
.v2-dash-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 28px; align-items: stretch; }
.v2-dash h1 { margin: 10px 0 6px; color: #f2f8fa !important; font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800 !important; }
.v2-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.v2-stats div { padding: 14px 16px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .05); border: 1px solid rgba(223, 234, 239, .1); }
.v2-stats b { display: block; color: #f2f8fa; font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.v2-stats span { font-size: .8rem; color: #9fb8c2; }
.v2-spark { margin-top: 14px; height: 54px; width: 100%; }
.v2-next { display: grid; gap: 12px; align-content: space-between; padding: 22px; border-radius: var(--r-md); background: rgba(255, 255, 255, .05); border: 1px solid rgba(223, 234, 239, .12); }
.v2-next h3 { margin: 0; color: #f2f8fa; font-size: 1.15rem; }
.v2-next p { margin: 0; font-size: .9rem; color: #bcd6e1; }
.v2-next .tag { display: inline-flex; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: #9fb8c2; }
.v2-next .tag > span { border: 1px solid rgba(223, 234, 239, .16); border-radius: 999px; padding: 3px 10px; }

/* ---- CTFd pages: injected blocks ---- */
.v2-page { max-width: 1140px; margin: 0 auto 28px; padding-inline: 12px; }
.v2-state { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; padding: 28px; }
.v2-state .ic { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: rgba(71, 187, 201, .12); color: #47bbc9; }
.v2-state .ic .v2-ico { width: 30px; height: 30px; }
.v2-state h2 { margin: 0 0 6px; font-size: 1.3rem; color: var(--cp-head); }
.v2-state p { margin: 0; color: var(--cp-mute); }
.v2-state .acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.v2-filters { position: sticky; top: 76px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; margin-bottom: 10px; border-radius: 999px; background: var(--cp-surface); border: 1px solid var(--cp-line); box-shadow: var(--cp-shadow); }
.v2-filters button { border: 1px solid var(--cp-line); background: transparent; color: var(--cp-ink); border-radius: 999px; padding: 6px 14px; font-size: .84rem; font-weight: 600; cursor: pointer; }
.v2-filters button[aria-pressed="true"] { background: #47bbc9; border-color: #47bbc9; color: #0c222b; }
.v2-filters .sep { width: 1px; background: var(--cp-line); margin-inline: 4px; }
.v2-catprog { margin-inline-start: auto; font-size: .82rem; font-weight: 600; color: var(--cp-mute); display: inline-flex; align-items: center; gap: 10px; }
.v2-catprog .bar { width: 90px; height: 6px; border-radius: 999px; background: var(--cp-surface-2); overflow: hidden; }
.v2-catprog .bar i { display: block; height: 100%; background: #47bbc9; }
.category-header { display: flex !important; align-items: center; gap: 10px; }
.v2-podium-wrap { padding: 24px; margin-bottom: 20px; }
.v2-podium-wrap .v2-podium { max-width: 560px; margin: 0 auto; }
tr.v2-me td { background: rgba(71, 187, 201, .12) !important; }
.v2-merow { position: sticky; bottom: 12px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 18px; margin-top: 12px; border-radius: 999px; background: #0c222b; color: #dfeaef; border: 1px solid #47bbc9; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.v2-merow b { color: #47bbc9; }
.v2-profile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.v2-profile .v2-card { padding: 22px; display: grid; gap: 14px; align-content: start; }
.v2-pcard { grid-column: 1 / -1; display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.v2-pcard .v2-av { width: 72px; height: 72px; font-size: 1.5rem; }
.v2-pcard h2 { margin: 0; font-size: 1.4rem; color: var(--cp-head); }
.v2-pcard .sub { color: var(--cp-mute); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.v2-pstats { display: flex; gap: 22px; }
.v2-pstats div { text-align: center; }
.v2-pstats b { display: block; font-size: 1.4rem; color: var(--cp-head); line-height: 1.2; }
.v2-pstats span { font-size: .76rem; color: var(--cp-mute); }
.v2-catbars { display: grid; gap: 10px; }
.v2-catbars div { display: grid; grid-template-columns: 120px minmax(0, 1fr) 36px; gap: 10px; align-items: center; font-size: .85rem; }
.v2-catbars .bar { height: 8px; border-radius: 999px; background: var(--cp-surface-2); overflow: hidden; }
.v2-catbars .bar i { display: block; height: 100%; background: #47bbc9; }
.v2-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.v2-timeline li { position: relative; padding: 0 0 14px; padding-inline-start: 22px; font-size: .88rem; }
.v2-timeline li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: #47bbc9; }
.v2-timeline li::after { content: ""; position: absolute; inset-inline-start: 8px; top: 18px; bottom: 0; width: 1px; background: var(--cp-line); }
.v2-timeline li:last-child::after { display: none; }
.v2-timeline b { color: var(--cp-head); }
.v2-timeline time { display: block; color: var(--cp-mute); font-size: .76rem; }
.v2-auth { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 0; max-width: 980px; margin: 0 auto; border-radius: 24px; overflow: hidden; border: 1px solid var(--cp-line); box-shadow: var(--cp-shadow); background: var(--cp-surface); }
.v2-auth .side { padding: 36px 32px; display: grid; gap: 18px; align-content: center; }
.v2-auth .side h2 { margin: 0; color: #f2f8fa !important; font-size: 1.5rem; }
.v2-auth .side ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.v2-auth .side li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; color: #bcd6e1; font-size: .92rem; }
.v2-auth .side li b { display: block; color: #f2f8fa; }
.v2-auth .side li .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(71, 187, 201, .14); color: #47bbc9; }
.v2-auth .side li .ic .v2-ico { width: 18px; height: 18px; }
.v2-auth .formcol { padding: 32px; }
.v2-auth .formcol form { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
.v2-auth .formcol .col-md-6, .v2-auth .formcol [class*="col-"] { width: 100% !important; max-width: 100% !important; margin: 0 !important; flex: 1 1 auto !important; }
.v2-auth .alt { margin-top: 18px; text-align: center; font-size: .9rem; color: var(--cp-mute); }
.v2-pw { position: relative; }
.v2-pw input { padding-inline-end: 72px !important; }
.v2-pw button { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); border: 0; background: var(--cp-surface-2); color: var(--cp-ink); border-radius: 999px; font-size: .76rem; font-weight: 600; padding: 5px 12px; cursor: pointer; }
.v2-settings-h { margin: 22px 0 12px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cp-mute); }
.v2-users-av { display: inline-flex; align-items: center; gap: 10px; }
.v2-users-av .v2-av { width: 30px; height: 30px; font-size: .72rem; }

/* ---- navbar regroup ---- */
.v2-navavatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .78rem; color: #0c222b; background: linear-gradient(135deg, #53c5d3, #47bbc9); }
.navbar .v2-menu .dropdown-item { display: flex; align-items: center; gap: 10px; }
.navbar .v2-menu .dropdown-item i { width: 16px; text-align: center; color: var(--cp-mute); }
.navbar .v2-bell .nav-link { font-size: 0 !important; }
.navbar .v2-bell .nav-link i, .navbar .v2-bell .nav-link .badge { font-size: .95rem; }
.navbar .v2-bell .nav-link .badge { font-size: .62rem; }
.navbar .dropdown-toggle.v2-guide::after, .navbar .v2-user > .nav-link::after { margin-inline-start: 6px; vertical-align: 2px; }

/* ---- guide pages ---- */
.v2-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0 6px; }
.v2-tool { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 16px; text-decoration: none !important; color: var(--cp-ink) !important; transition: border-color .15s; }
.v2-tool:hover { border-color: #47bbc9; }
.v2-tool .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(71, 187, 201, .12); color: #47bbc9; }
.v2-tool b { display: block; color: var(--cp-head); }
.v2-tool span { font-size: .84rem; color: var(--cp-mute); }
.v2-tool em { font-style: normal; display: inline-block; margin-top: 6px; font-size: .72rem; font-weight: 600; color: var(--cp-link); }
.v2-check { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.v2-check label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--cp-line); background: var(--cp-surface); cursor: pointer; font-weight: 500; color: var(--cp-ink); margin: 0; }
.v2-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: #47bbc9; flex: none; }
.v2-check input:checked + span { color: var(--cp-mute); text-decoration: line-through; }
.v2-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 24px 26px; margin-top: 28px; }
.v2-cta h3 { margin: 0 0 4px; font-size: 1.15rem; color: var(--cp-head); }
.v2-cta p { margin: 0; color: var(--cp-mute); }
.v2-tldr { padding: 22px 24px; margin-bottom: 28px; display: grid; gap: 12px; background: linear-gradient(135deg, rgba(71, 187, 201, .12), rgba(4, 122, 134, .04)), var(--cp-surface); }
.v2-tldr h2 { margin: 0 !important; font-size: 1.1rem !important; }
.v2-tldr ol { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }
.v2-tldr li::marker { color: #47bbc9; font-weight: 700; }
.v2-ladder2 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.v2-ladder2 div { padding: 16px; border-radius: 14px; border: 1px solid var(--cp-line); background: var(--cp-surface); display: grid; gap: 4px; }
.v2-ladder2 div:nth-child(1) { border-top: 3px solid #facc15; }
.v2-ladder2 div:nth-child(2) { border-top: 3px solid #fb923c; }
.v2-ladder2 div:nth-child(3) { border-top: 3px solid #fb7185; }
.v2-ladder2 div:nth-child(4) { border-top: 3px solid #e11d48; }
.v2-ladder2 b { color: var(--cp-head); }
.v2-ladder2 span { font-size: .84rem; color: var(--cp-mute); }
.v2-updated { display: inline-block; margin-top: 12px; font-size: .8rem; color: #9fb8c2; }
.v2-chipsrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.v2-chipsrow button { border: 1px solid var(--cp-line); background: var(--cp-surface); color: var(--cp-ink); border-radius: 999px; padding: 6px 14px; font-size: .84rem; font-weight: 600; cursor: pointer; }
.v2-chipsrow button[aria-pressed="true"] { background: #47bbc9; border-color: #47bbc9; color: #0c222b; }
.v2-reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
.v2-reason { padding: 20px; display: grid; gap: 8px; align-content: start; }
.v2-reason .top { display: flex; align-items: center; gap: 12px; }
.v2-reason .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(71, 187, 201, .12); color: #47bbc9; flex: none; }
.v2-reason h3 { margin: 0; font-size: 1rem; color: var(--cp-head); }
.v2-reason p { margin: 0; font-size: .88rem; color: var(--cp-mute); }
.v2-reason .rt { font-size: .76rem; font-weight: 600; color: var(--cp-link); }
.v2-reason .row2 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.v2-copy { display: inline-flex; align-items: center; gap: 8px; border: 1px dashed var(--cp-line); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: .8rem; color: var(--cp-ink); }
html[data-cp-lang="ar"] .v2-copy { padding: 4px 12px 4px 6px; }
.v2-copy code { color: var(--cp-head); background: none; padding: 0; unicode-bidi: plaintext; direction: ltr; }
.v2-copy button { border: 0; border-radius: 999px; background: var(--cp-surface-2); color: var(--cp-ink); font-size: .74rem; font-weight: 600; padding: 3px 10px; cursor: pointer; }
.v2-evcard { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 26px; margin-bottom: 26px; border-radius: 20px; }
.v2-evcard h2 { margin: 10px 0 6px !important; color: #f2f8fa !important; }
.v2-phases { list-style: none; margin: 16px 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.v2-phases li { padding: 14px 12px; border-radius: 12px; border: 1px solid var(--cp-line); background: var(--cp-surface); display: grid; gap: 2px; font-size: .84rem; }
.v2-phases li b { color: var(--cp-head); }
.v2-phases li span { color: var(--cp-mute); font-size: .78rem; }
.v2-phases li.now { border-color: #47bbc9; box-shadow: 0 0 0 3px rgba(71, 187, 201, .15); }

@media (max-width: 991.98px) {
  .v2-hero-in, .v2-event-in, .v2-dash-in, .v2-board { grid-template-columns: minmax(0, 1fr); }
  .v2-tracks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-ladder { grid-template-columns: repeat(5, minmax(140px, 1fr)); overflow-x: auto; padding-bottom: 8px; }
  .v2-pulse { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-pulse > div:nth-child(3) { border-inline-start: 0; }
  .v2-phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .cp .v2-hero { padding-block: 36px 80px; }
  .v2-sec { padding-top: 52px; }
  .v2-learn, .v2-profile, .v2-tools, .v2-reasons, .v2-auth { grid-template-columns: minmax(0, 1fr); }
  .v2-ladder2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-track.wide { grid-column: span 2; }
  .v2-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v2-stats b { font-size: 1.2rem; }
  .v2-pcard { grid-template-columns: auto minmax(0, 1fr); }
  .v2-pcard .v2-pstats { grid-column: 1 / -1; justify-content: space-around; }
  .v2-state { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
  .v2-state .acts { justify-content: center; }
  .v2-filters { border-radius: 18px; top: 64px; }
  .v2-evcard { grid-template-columns: minmax(0, 1fr); }
  .v2-auth .side { padding: 26px 22px; }
  .v2-auth .formcol { padding: 24px 20px; }
}
@media (max-width: 479.98px) {
  .v2-tracks { grid-template-columns: minmax(0, 1fr); }
  .v2-track.wide { grid-column: auto; }
  .v2-pulse { grid-template-columns: minmax(0, 1fr); }
  .v2-pulse > div { border-inline-start: 0 !important; border-top: 1px solid var(--cp-line); }
  .v2-pulse > div:first-child { border-top: 0; }
  .v2-phases { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .v2-track, .v2-btn, .v2-track .bar i { transition: none; }
}

/* ---- fixes ---- */
.cp .cp-prose .v2-check { padding: 0 !important; margin-inline: 0 !important; }
.cp .cp-prose .v2-check li { list-style: none; margin: 0; padding: 0; }
.cp .cp-prose .v2-check li::before { display: none !important; }
.cp-doc:not(:has(.cp-toc)) { display: block !important; }
.cp-doc:not(:has(.cp-toc)) .cp-prose { max-width: 860px; margin-inline: auto; }
.cp .cp-search { width: 100% !important; max-width: none !important; border-radius: 999px !important; }
.cp .cp-faq, .cp .cp-faq-group { width: 100%; max-width: none; }

/* ---- logo: full white ---- */
img.v2-logo { filter: brightness(0) invert(1); width: auto !important; object-fit: contain; }
.navbar-brand img.v2-logo { height: 30px !important; max-height: 30px !important; }
.cp-foot img.v2-logo-foot { height: 30px !important; max-height: 30px !important; max-width: 170px !important; }
@media (max-width: 767.98px) { .navbar-brand img.v2-logo { height: 22px !important; } }
.navbar-brand:has(img.v2-logo) { overflow: visible !important; height: auto !important; width: auto !important; display: flex !important; align-items: center; padding: 0 !important; margin-inline-end: 22px; }
img.v2-logo { position: static !important; top: auto !important; left: auto !important; right: auto !important; bottom: auto !important; transform: none !important; margin: 0 !important; clip-path: none !important; max-width: none !important; }
.cp-foot *:has(> img.v2-logo-foot) { overflow: visible !important; height: auto !important; width: auto !important; }
.v2-filters + .pt-5, .v2-filters + * { padding-top: 1.5rem !important; }

/* ---- language switcher: EN | عربي pill ---- */
.navbar li.v2-langli { display: flex; align-items: center; }
.navbar li.v2-langli > .dropdown-toggle { display: none !important; }
.v2-lang { display: inline-flex; align-items: center; gap: 2px; padding: 3px; margin-inline: 6px; border-radius: 999px; border: 1px solid rgba(223, 234, 239, .18); background: rgba(255, 255, 255, .04); }
.v2-lang button { border: 0; background: transparent; color: #c4d8df; font-size: .76rem; font-weight: 700; min-width: 40px; height: 26px; padding: 0 10px; border-radius: 999px; cursor: pointer; line-height: 1; transition: background-color .15s, color .15s; }
.v2-lang button[lang="ar"] { font-size: .8rem; }
.v2-lang button:hover:not([aria-pressed="true"]) { color: #fff; background: rgba(255, 255, 255, .08); }
.v2-lang button[aria-pressed="true"] { background: #47bbc9; color: #0c222b; cursor: default; }
.v2-lang button:focus-visible { outline: 2px solid #47bbc9; outline-offset: 2px; }
@media (max-width: 767.98px) { .navbar li.v2-langli { padding: 8px 0; } .v2-lang { margin-inline: 0; } }

/* ---- phone navbar ---- */
.v2-mbar, .navbar .v2-mi { display: none; }
@media (max-width: 767.98px) {
  body .navbar { min-height: 60px; }
  body .navbar > .container { flex-wrap: wrap; align-items: center; }
  .v2-mbar { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; margin-inline-end: 8px; }
  .v2-mbar .v2-lang { margin: 0; }
  .v2-mbar .v2-lang button { min-width: 34px; height: 26px; padding: 0 8px; }
  .v2-mbtn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: #dfeaef !important; border: 1px solid rgba(223, 234, 239, .16); background: rgba(255, 255, 255, .04); text-decoration: none; }
  .v2-dot { position: absolute; top: 7px; inset-inline-end: 8px; width: 8px; height: 8px; border-radius: 50%; background: #fb7185; box-shadow: 0 0 0 2px #0c222b; }
  body .navbar-toggler { width: 42px; height: 38px; padding: 0 !important; display: grid; place-items: center; border-radius: 12px !important; border: 1px solid rgba(223, 234, 239, .16) !important; box-shadow: none !important; }
  body .navbar-toggler .navbar-toggler-icon { width: 20px; height: 20px; }

  /* the menu panel */
  body .navbar-collapse { flex-basis: 100%; }
  body .navbar-collapse.show, body .navbar-collapse.collapsing {
    margin: 10px -4px 6px; padding: 8px; border-radius: 18px;
    background: #0c222b; border: 1px solid rgba(223, 234, 239, .12);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
    max-height: calc(100vh - 84px); overflow-y: auto;
  }
  body .navbar-collapse .navbar-nav { align-items: stretch !important; text-align: start !important; gap: 2px; margin: 0 !important; }
  body .navbar-collapse .navbar-nav + .navbar-nav { margin-top: 6px !important; padding-top: 6px; border-top: 1px solid rgba(223, 234, 239, .1); }
  body .navbar-collapse .nav-link,
  body .navbar-collapse .dropdown-item {
    display: flex !important; align-items: center; gap: 12px; width: 100%;
    padding: 12px 14px !important; border-radius: 12px; font-size: .98rem !important; font-weight: 500;
    color: #dfeaef !important; background: transparent; text-align: start; white-space: normal;
  }
  body .navbar-collapse .nav-link:hover, body .navbar-collapse .dropdown-item:hover { background: rgba(255, 255, 255, .06); }
  body .navbar-collapse .nav-link.active { background: rgba(71, 187, 201, .14); color: #47bbc9 !important; }
  body .navbar-collapse .dropdown-item i, body .navbar-collapse .v2-mi { display: inline-block; width: 18px; text-align: center; color: #9fb8c2; }
  body .navbar-collapse .nav-link.active .v2-mi { color: #47bbc9; }

  /* Guide and account: open lists with a small section label */
  body .navbar-collapse .dropdown-menu { position: static !important; display: block !important; transform: none !important; margin: 0 !important; padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
  body .navbar-collapse .dropdown-divider { border-color: rgba(223, 234, 239, .1); margin: 4px 14px; }
  body .navbar-collapse .v2-guide { pointer-events: none; font-size: .72rem !important; font-weight: 700 !important; letter-spacing: .08em; text-transform: uppercase; color: #9fb8c2 !important; padding: 14px 14px 4px !important; background: transparent !important; }
  html[data-cp-lang="ar"] body .navbar-collapse .v2-guide { letter-spacing: 0; text-transform: none; font-size: .8rem !important; }
  body .navbar-collapse .v2-guide::after, body .navbar-collapse .v2-user > .nav-link { display: none !important; }
  body .navbar-collapse .v2-user .dropdown-item-text { display: flex; align-items: center; gap: 10px; padding: 12px 14px 6px; color: #f2f8fa !important; }
  body .navbar-collapse .v2-user .dropdown-item-text::before { content: attr(data-initials); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: #0c222b; background: linear-gradient(135deg, #53c5d3, #47bbc9); }

  /* items that live in the top bar on phones */
  body .navbar-collapse .v2-bell, body .navbar-collapse .v2-langli { display: none !important; }
  body .navbar-collapse .v2-themeli .nav-link { color: #bcd6e1 !important; }
}

/* ---- Arabic: menus read right to left ---- */
html[data-cp-lang="ar"] .navbar .dropdown-menu { direction: rtl; text-align: right; }
@media (max-width: 767.98px) {
  html[data-cp-lang="ar"] body .navbar-collapse { direction: rtl; }
  html[data-cp-lang="ar"] body .navbar-collapse .nav-link,
  html[data-cp-lang="ar"] body .navbar-collapse .dropdown-item { text-align: right; }
}

/* ---- Arabic: whole site right to left (html[dir=rtl] is set in the theme header) ---- */
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .me-auto { margin-right: 0 !important; margin-left: auto !important; }
html[dir="rtl"] .ms-auto, html[dir="rtl"] .ms-md-auto { margin-left: 0 !important; margin-right: auto !important; }
@media (max-width: 767.98px) { html[dir="rtl"] .ms-md-auto { margin-right: 0 !important; } }
html[dir="rtl"] .text-start { text-align: right !important; }
html[dir="rtl"] .text-end { text-align: left !important; }
html[dir="rtl"] .float-end { float: left !important; }
html[dir="rtl"] .float-start { float: right !important; }
html[dir="rtl"] .pe-1 { padding-right: 0 !important; padding-left: .25rem !important; }
html[dir="rtl"] .me-1, html[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: .4rem !important; }
html[dir="rtl"] .navbar .dropdown-menu-end { right: auto !important; left: 0 !important; }
html[dir="rtl"] .modal-header .btn-close, html[dir="rtl"] .alert-dismissible .btn-close { margin: 0; left: 0; right: auto; }
html[dir="rtl"] .alert-dismissible { padding-right: 1rem; padding-left: 3rem; }
html[dir="rtl"] body .input-group > .form-control:not(:last-child) { border-radius: 0 12px 12px 0 !important; }
html[dir="rtl"] body .input-group > .btn:last-child, html[dir="rtl"] body .input-group > .form-control:not(:first-child) { border-radius: 12px 0 0 12px !important; }
html[dir="rtl"] .form-select { background-position: left .75rem center; padding-left: 2.25rem; padding-right: .95rem; }
html[dir="rtl"] .table th, html[dir="rtl"] .table td { text-align: right; }
html[dir="rtl"] .table th.text-center, html[dir="rtl"] .table td.text-center { text-align: center; }
html[dir="rtl"] .v2-flip { transform: scaleX(-1); }
html[dir="rtl"] .v2-catbars div, html[dir="rtl"] .v2-rows li, html[dir="rtl"] .v2-feed li { direction: rtl; }
html[dir="rtl"] code, html[dir="rtl"] .cp-term, html[dir="rtl"] .cp-flag input, html[dir="rtl"] #challenge-input { direction: ltr; text-align: left; unicode-bidi: plaintext; }

/* ---- overflow guards ---- */
.cp .cp-doc > *, .cp .cp-prose { min-width: 0; }
.cp .cp-prose > * { max-width: 100%; }
.cp .cp-term-body .ln { overflow-wrap: anywhere; }
.v2-tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; }
.v2-tscroll > .table { margin-bottom: 0; }
