/* Rise Progress – course hub. Colours can be overridden on .rph in your theme's CSS. */
.rph {
	--rph-navy: #1e3a8a;
	--rph-navy-2: #172554;
	--rph-blue: #1d4ed8;
	--rph-sky: #dbeafe;
	--rph-green: #16a34a;
	--rph-ink: #0f172a;
	--rph-muted: #64748b;
	--rph-line: #e2e8f0;
	--rph-bg: #f6f8fc;
	container-type: inline-size;
	color: var(--rph-ink);
	font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	margin: 1.5em auto;
	max-width: 1160px;
}
.rph *, .rph *::before, .rph *::after { box-sizing: border-box; }
/* If the shortcode was pasted with code/preformatted formatting (e.g. `[rise_course_hub]`
   in backticks), browsers repeat that formatting inside every line of the hub. Cancel it. */
.rph { white-space: normal; text-align: left; }
.rph code, .rph kbd, .rph samp, .rph tt, .rph pre { all: unset; }
.rph-thumb span:empty { display: none; }
.rph h2, .rph h3, .rph h4, .rph p { margin: 0; font-family: inherit; letter-spacing: normal; }
.rph a { text-decoration: none !important; }

/* Hero */
.rph-hero { background: linear-gradient(135deg, var(--rph-navy) 0%, var(--rph-navy-2) 100%); color: #fff; border-radius: 18px; padding: 30px 28px 30px; }
.rph-h1 { font-size: 30px; line-height: 1.2; font-weight: 800; color: #fff; }
.rph-sub { color: #c7d2fe; margin: 4px 0 20px !important; }
.rph-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.rph-resume { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 16px; }
.rph-resume-thumb { width: 224px; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; flex: 0 0 auto; }
.rph-resume-body { flex: 1 1 260px; min-width: 0; }
.rph-kicker { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #93c5fd; }
.rph-resume-title { font-size: 22px; line-height: 1.25; color: #fff; margin: 2px 0 2px !important; font-weight: 800; }
.rph-where { color: #e0e7ff; font-size: 15px; }
.rph-bar { margin-top: 12px; height: 10px; background: rgba(255,255,255,.18); border-radius: 99px; overflow: hidden; max-width: 420px; }
.rph-bar span { display: block; height: 100%; background: #4ade80; border-radius: 99px; min-width: 6px; }
.rph-meta { font-size: 13px; color: #c7d2fe; margin-top: 6px; }

/* Buttons */
.rph-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; font-weight: 700; white-space: nowrap; line-height: 1.1; cursor: pointer; transition: filter .15s ease, transform .15s ease; }
.rph-btn:hover { filter: brightness(1.08); }
.rph-btn:active { transform: scale(.98); }
.rph-btn-big { padding: 15px 26px; font-size: 17px; background: #22c55e; color: #052e16 !important; box-shadow: 0 6px 16px rgba(34,197,94,.35); }
.rph-btn-solid { padding: 10px 18px; font-size: 15px; background: var(--rph-blue); color: #fff !important; }
.rph-btn-ghost { padding: 8px 16px; font-size: 15px; background: #fff; color: var(--rph-blue) !important; border: 2px solid var(--rph-blue); }
.rph-btn-gold { padding: 12px 20px; font-size: 15px; background: #f59e0b; color: #422006 !important; }
.rph-btn-outline-light { padding: 13px 22px; font-size: 16px; color: #fff !important; border: 2px solid rgba(255,255,255,.7); }

/* Path */
.rph-path { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 18px; }
.rph-step { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 12px 14px; color: #fff !important; }
.rph-step b { display: block; font-size: 15px; line-height: 1.25; }
.rph-step small { display: block; color: #c7d2fe; font-size: 13px; }
.rph-step-lock { opacity: .78; }
.rph-ring { --p: 0; width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: conic-gradient(#4ade80 calc(var(--p) * 1%), rgba(255,255,255,.18) 0); }
.rph-ring::before { content: attr(data-v); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--rph-navy-2); font-size: 12px; font-weight: 800; }

/* Tests: score on the picture, no progress bar, their own look */
.rph-card-test { border: 2px solid #fbbf24; background: linear-gradient(#fff, #fffdf5); }
.rph-card-test .rph-thumb::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.08) 0 12px, transparent 12px 24px); pointer-events: none; }
.rph-card-test .rph-thumb > span { position: relative; }
.rph-card-test .rph-tag { background: #f59e0b; color: #422006; z-index: 1; }
.rph-card-test .rph-tag i { font-style: normal; }
.rph-score { position: absolute; top: 10px; right: 10px; z-index: 1; min-width: 84px; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 6px 18px rgba(15,23,42,.28); text-align: center; letter-spacing: 0; text-shadow: none; line-height: 1; }
.rph-score b { display: block; padding: 9px 12px 7px; font-size: 32px; font-weight: 800; color: var(--rph-ink); }
.rph-score span { display: block; padding: 5px 8px; font-size: 13px; font-weight: 800; letter-spacing: .08em; color: #fff; background: #475569; }
.rph-score-pass span { background: #16a34a; }
.rph-score-fail span { background: #dc2626; }
.rph-score-none { min-width: 0; background: rgba(15,23,42,.72); box-shadow: none; border-radius: 999px; }
.rph-score-none span { background: transparent; padding: 6px 12px; font-size: 12px; letter-spacing: .02em; }
.rph-testline { color: var(--rph-muted); font-size: 13px; }

/* Clickable card pictures */
a.rph-thumb-link { display: grid; color: #fff !important; text-decoration: none; cursor: pointer; transition: filter .15s ease; }
a.rph-thumb-link:hover { filter: brightness(1.06); }
a.rph-thumb-link:hover::after { content: "▶"; position: absolute; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(15,23,42,.6); color: #fff; font-size: 20px; text-shadow: none; }
.rph-card-locked a.rph-thumb-link:hover::after { content: none; }

/* My courses */
.rph-mine { margin-top: 22px; background: #fff; border: 1px solid var(--rph-line); border-radius: 16px; padding: 18px 20px; }
.rph-mine-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 12px; }
.rph-mine-h h3 { font-size: 21px; font-weight: 800; color: var(--rph-ink); }
.rph-mine-h span { color: var(--rph-muted); font-size: 14px; }
.rph-mine ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.rph-mine li { margin: 0; min-width: 0; }
.rph-mine a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; color: var(--rph-ink) !important; border: 1px solid transparent; transition: background .15s ease, border-color .15s ease; }
.rph-mine a:hover, .rph-mine a:focus-visible { background: var(--rph-bg); border-color: var(--rph-line); }
.rph-mine-thumb { flex: 0 0 auto; width: 80px; aspect-ratio: 16 / 9; border-radius: 8px; background-size: cover; background-position: center; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; }
.rph-mine-thumb i { font-style: normal; text-shadow: 0 1px 4px rgba(0,0,0,.3); }
.rph-mine-thumb i:empty { display: none; }
.rph-mine-text { flex: 1; min-width: 0; }
.rph-mine-text b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 15px; line-height: 1.25; }
.rph-mine-text small { display: block; color: var(--rph-muted); font-size: 13px; }
.rph-mine-go { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--rph-sky); color: var(--rph-navy); font-weight: 800; }

/* Jump targets: clear sticky headers, and flash the card you jumped to */
.rph-card, .rph-sec { scroll-margin-top: 110px; }
html:has(.rph) { scroll-behavior: smooth; }
.rph-card:target { animation: rph-flash 1.8s ease-out 1; }
@keyframes rph-flash { 0%, 35% { box-shadow: 0 0 0 4px #60a5fa, 0 10px 30px rgba(29,78,216,.25); } 100% { box-shadow: 0 1px 2px rgba(15,23,42,.04); } }

/* Unlock banner */
.rph-unlock { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 1px solid #fcd34d; border-radius: 16px; padding: 20px 24px; margin-top: 22px; }
.rph-unlock h3 { font-size: 21px; font-weight: 800; color: var(--rph-ink); }
.rph-unlock p { color: #78350f; margin-top: 2px !important; }
.rph-unlock ul { margin: 8px 0 0; padding: 0; list-style: none; display: flex; gap: 6px 18px; flex-wrap: wrap; color: #78350f; font-size: 14px; font-weight: 600; }

/* Sections + cards */
.rph-sec { margin-top: 30px; }
.rph-sec-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; }
.rph-sec-h h3 { font-size: 22px; font-weight: 800; color: var(--rph-ink); }
.rph-sec-h p { color: var(--rph-muted); font-size: 15px; }
.rph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.rph-card { background: #fff; border: 1px solid var(--rph-line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.rph-thumb { position: relative; aspect-ratio: 16 / 9; height: auto; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 40px; letter-spacing: -.02em; background-size: cover; background-position: center; }
.rph-thumb span { text-shadow: 0 2px 10px rgba(0,0,0,.25); }
.rph-tag { position: absolute; top: 10px; left: 10px; font-style: normal; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.92); color: var(--rph-ink); padding: 3px 9px; border-radius: 999px; letter-spacing: 0; }
.rph-card-locked .rph-thumb > span { opacity: .35; }
.rph-lock { position: absolute; inset: 0; background: rgba(15,23,42,.35); display: flex; align-items: flex-end; justify-content: flex-end; padding: 10px; }
.rph-lock span { background: #fff; color: var(--rph-ink); font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; letter-spacing: 0; text-shadow: none; opacity: 1; }
.rph-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rph-body h4 { font-size: 17px; line-height: 1.3; font-weight: 800; color: var(--rph-ink); }
.rph-desc { color: var(--rph-muted); font-size: 14px; }
.rph-facts { color: var(--rph-muted); font-size: 13px; }
.rph-prog { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--rph-muted); }
.rph-pbar { flex: 1; height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.rph-pbar span { display: block; height: 100%; background: var(--rph-blue); border-radius: 99px; }
.rph-prog-done .rph-pbar span { background: var(--rph-green); }
.rph-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.rph-chip { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.rph-chip-go { background: var(--rph-sky); color: var(--rph-navy); }
.rph-chip-done { background: #dcfce7; color: #166534; }
.rph-chip-new { background: #f1f5f9; color: #334155; }
.rph-chip-warn { background: #fee2e2; color: #991b1b; }
.rph-chip-lock { background: #fef3c7; color: #92400e; }
.rph-admin-note { font-size: 12px; color: #b45309; }
.rph-admin-warn { background: #fff7ed; border: 1px solid #fdba74; color: #7c2d12; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; font-size: 14px; }
.rph-admin-warn a { color: #c2410c; text-decoration: underline !important; font-weight: 700; }

/* Latest test result on a card */
.rph-result { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 13px; color: var(--rph-muted); }
.rph-result b { font-size: 14px; font-weight: 800; padding: 1px 9px; border-radius: 999px; background: #f1f5f9; color: var(--rph-ink); }
.rph-result-pass b { background: #dcfce7; color: #166534; }
.rph-result-fail b { background: #fee2e2; color: #991b1b; }

/* Narrow containers (phones, or a narrow theme column) */
@container (max-width: 640px) {
	.rph-hero { padding: 22px 16px; border-radius: 14px; }
	.rph-h1 { font-size: 24px; }
	.rph-resume-thumb { width: 100%; }
	.rph-btn-big { width: 100%; }
	.rph-path { grid-template-columns: 1fr; gap: 8px; }
	.rph-step { padding: 8px 12px; gap: 12px; }
	.rph-step > span:last-child { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; flex: 1; }
	.rph-ring { width: 38px; height: 38px; }
	.rph-ring::before { width: 30px; height: 30px; font-size: 11px; }
	.rph-unlock { padding: 18px; }
	.rph-mine { padding: 14px; }
	.rph-mine ul { grid-template-columns: minmax(0, 1fr); }
	.rph-mine a { padding: 6px 4px; gap: 10px; }
	.rph-mine-thumb { width: 64px; font-size: 13px; }
	.rph-score { min-width: 70px; }
	.rph-score b { font-size: 26px; padding: 7px 10px 5px; }
	.rph-unlock .rph-btn-gold { width: 100%; }
	.rph-sec-h { flex-direction: column; }
}
@supports not (container-type: inline-size) {
	@media (max-width: 640px) {
		.rph-resume-thumb { width: 100%; }
		.rph-btn-big { width: 100%; }
		.rph-path { grid-template-columns: 1fr; }
	}
}

/* A course opened from the hub: fills the window on top of the hub. */
.rph-overlay { position: fixed; inset: 0; z-index: 100000; background: #0f172a; animation: rph-in .18s ease-out; }
/* iPhone Safari: "inset: 0" / 100vh reach behind the browser's bottom toolbar, hiding buttons
   pinned to the bottom of a test. Size to the part of the screen you can actually see:
   the player measures it (--risep-view-h); 100dvh is the fallback. */
.rph-overlay { bottom: auto; height: 100vh; height: 100dvh; height: var(--risep-view-h, 100dvh); }
.rph-overlay .risep-frame-wrap { padding-bottom: env(safe-area-inset-bottom, 0px); box-sizing: border-box; }
@keyframes rph-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.rph-overlay .risep-player { position: absolute; inset: 0; margin: 0; border: 0; border-radius: 0; max-width: none; width: auto; display: flex; flex-direction: column; background: #fff; }
.rph-overlay .risep-frame-wrap { flex: 1; height: auto; min-height: 0; }
.rph-overlay--closing .risep-frame-wrap { opacity: .35; transition: opacity .2s ease; }
.rph-overlay--closing .risep-back { pointer-events: none; opacity: .7; }
.rph-title-link { color: inherit !important; }
.rph-title-link:hover { color: var(--rph-blue) !important; }
