/*!
 * roininja — supplement.
 *
 * The static source has no WordPress archive, search-results, 404 or generic document
 * page, so those templates use markup the ported stylesheets know nothing about. These
 * rules are written against the SAME design tokens as the ported CSS (--bg, --text,
 * --dim, --line, --accent, --max) so the added surfaces read as part of the same system
 * rather than as unstyled browser defaults.
 *
 * Everything here is additive. Nothing in this file overrides a ported rule.
 */

/* ---------- accessibility: skip link (added by this theme, not the source) ---------- */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
	white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed; top: 12px; left: 12px; z-index: 200;
	width: auto; height: auto; margin: 0; clip: auto; clip-path: none;
	padding: 10px 16px; border-radius: 8px;
	background: var(--accent); color: #0a0a0a;
	font-weight: 700; font-size: 14px; text-decoration: none;
}

/* ---------- marquee: logos supplied without transparent padding ----------
   The ported `.m-chip img { height: 64px }` assumes the source's SVGs, whose artwork only
   fills ~31% of their canvas (measured: 22-40%), so they read as roughly 20px of ink.
   A logo cropped to its artwork rendered at 64px comes out about 3x larger than its
   neighbours. `.is-trim` restores the original optical size for those files. */
.m-chip img.is-trim {
	height: 20px;
	max-width: 190px;
}

@media (max-width: 980px) {
	.m-chip img.is-trim { height: 18px; }
}

/* ---------- generic document page (privacy, terms, any plain page) ---------- */
.doc-page { padding: 140px 0 120px; background: var(--bg); }
.doc-wrap { max-width: 820px; margin: 0 auto; }
.doc-h {
	font-size: clamp(34px, 5vw, 60px);
	font-weight: 700; line-height: 1.02; letter-spacing: -0.035em;
	color: var(--text); margin: 0 0 28px;
}
.doc-body { color: #c2c2c2; font-size: 17px; line-height: 1.72; }
.doc-body > * + * { margin-top: 18px; }
.doc-body h2 {
	color: var(--text); font-size: 26px; font-weight: 700;
	letter-spacing: -0.02em; margin: 44px 0 10px;
}
.doc-body h3 {
	color: var(--text); font-size: 19px; font-weight: 600;
	letter-spacing: -0.01em; margin: 30px 0 8px;
}
.doc-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.doc-body a:hover { text-decoration: none; }
.doc-body ul, .doc-body ol { padding-left: 22px; }
.doc-body li + li { margin-top: 8px; }
.doc-body strong, .doc-body b { color: var(--text); }
.doc-body hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.doc-body table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc-body th, .doc-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.doc-body th { color: var(--text); font-weight: 600; }

@media (max-width: 980px) {
	.doc-page { padding: 96px 0 80px; }
}

/* ---------- archive / search results ---------- */
.archive-section { padding: 140px 0 120px; background: var(--bg); }
.archive-h {
	font-size: clamp(34px, 5vw, 60px);
	font-weight: 700; line-height: 1.02; letter-spacing: -0.035em;
	color: var(--text); margin: 0 0 40px;
}
.archive-empty { color: var(--dim); font-size: 17px; }

.rn-search { display: flex; gap: 10px; margin: 0 0 40px; max-width: 520px; }
.rn-search-input {
	flex: 1 1 auto; min-width: 0;
	background: var(--surface); color: var(--text);
	border: 1px solid var(--line-2); border-radius: 999px;
	padding: 12px 18px; font: inherit; font-size: 15px;
}
.rn-search-input::placeholder { color: var(--mute); }
.rn-search-input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.rn-search-btn {
	flex: 0 0 auto; cursor: pointer;
	background: var(--accent); color: #0a0a0a; border: 0;
	border-radius: 999px; padding: 12px 22px;
	font: inherit; font-size: 15px; font-weight: 600;
}

.pagination, .nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 48px; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 12px;
	border: 1px solid var(--line-2); border-radius: 999px;
	color: var(--dim); text-decoration: none; font-size: 14px;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover { color: #0a0a0a; background: var(--accent); border-color: var(--accent); }

/* ---------- 404 ---------- */
.err-section { padding: 180px 0 160px; background: var(--bg); }
.err-wrap { max-width: 720px; }
.err-code { color: var(--accent); font-size: 15px; font-weight: 700; letter-spacing: 0.24em; margin: 0 0 14px; }
.err-h { font-size: clamp(38px, 6vw, 76px); font-weight: 700; line-height: 0.98; letter-spacing: -0.035em; color: var(--text); margin: 0 0 18px; }
.err-body { color: var(--dim); font-size: 18px; line-height: 1.6; margin: 0 0 30px; }
.err-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }

/* ---------- lead form error state ----------
   The thank-you renders only on a server success; this is its visibly DIFFERENT
   failure style, so a customer is never told a message arrived when it did not. */
.rn-form-error {
	margin-top: 14px; padding: 12px 14px;
	border: 1px solid #e5484d; border-left-width: 3px; border-radius: 6px;
	background: rgba(229, 72, 77, 0.08);
	color: #ffb4b6; font-size: 14px; line-height: 1.5;
}
.rn-form-error a { color: #fff; text-decoration: underline; }

/* ---------- related posts rail under an article ---------- */
.related { padding: 0 0 120px; background: var(--bg); }
.related-h {
	color: var(--text); font-size: 24px; font-weight: 700;
	letter-spacing: -0.02em; margin: 0 0 24px;
}

/* ============================================================================
   COURSE — the lesson-watching page (template-course.php).
   Player left, lesson list right; stacked on mobile. Same dark surface + lime
   accent language as the marketing page so the members area does not feel like
   a different product.
   ========================================================================= */
#course { padding: 140px 0 120px; border-bottom: none; }

.course-head { max-width: 760px; margin: 0 0 44px; }
.course-kicker {
	display: block; margin-bottom: 16px;
	font-size: 11px; color: var(--accent); font-weight: 700;
	letter-spacing: 0.2em; text-transform: uppercase;
}
.course-h {
	font-size: clamp(32px, 4.4vw, 60px); font-weight: 700;
	letter-spacing: -0.03em; line-height: 1.02; color: var(--text);
	margin: 0 0 14px;
}
.course-meta { font-size: 14px; color: var(--dim); letter-spacing: 0.02em; }

.course-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 28px;
	align-items: start;
}

/* ---- player ---- */
.course-stage {
	position: relative;
	aspect-ratio: 16 / 9;      /* Cloudflare Stream serves 16:9; reserves the box before load */
	background: #000;
	border: 1px solid rgba(212, 255, 61, 0.16);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.85);
}
.course-stage iframe {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	border: 0; display: block;
}

/* Shown until a lesson has a Stream UID. */
.course-empty {
	position: absolute; inset: 0;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 10px; padding: 24px; text-align: center;
	background: radial-gradient(circle at 50% 40%, rgba(212,255,61,0.06), transparent 60%), var(--bg-soft);
}
.course-empty-icon { color: var(--accent); opacity: 0.75; }
.course-empty-t { font-size: 16px; font-weight: 600; color: var(--text); }
.course-empty-s { font-size: 13.5px; color: var(--dim); max-width: 340px; line-height: 1.5; }

.course-now { display: flex; gap: 16px; align-items: flex-start; margin-top: 22px; }
.course-now-n {
	flex-shrink: 0; font-size: 13px; font-weight: 700; color: var(--accent);
	letter-spacing: 0.12em; padding-top: 4px;
}
.course-now-t { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; margin: 0 0 4px; }
.course-now-s { font-size: 14px; color: var(--dim); line-height: 1.55; margin: 0; }
.course-now-s:empty { display: none; }

/* ---- lesson list ---- */
.course-list {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 16px;
	overflow: hidden;
}
.course-list-head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid var(--line);
	font-size: 11px; color: var(--mute); font-weight: 700;
	letter-spacing: 0.2em; text-transform: uppercase;
}
.course-list-count { color: var(--accent); }
.course-items { list-style: none; margin: 0; padding: 6px; max-height: 560px; overflow-y: auto; }

.course-item {
	width: 100%;
	display: flex; align-items: center; gap: 12px;
	padding: 13px 14px;
	background: transparent; border: 0; border-radius: 10px;
	color: var(--text); font: inherit; text-align: left;
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
}
.course-item:hover:not(:disabled) { background: rgba(255, 255, 255, 0.04); }
.course-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.course-item.is-active { background: rgba(212, 255, 61, 0.1); }
.course-item.is-active .course-item-t { color: var(--accent); font-weight: 600; }
.course-item.is-active .course-item-n { color: var(--accent); }

.course-item-n {
	flex-shrink: 0; width: 22px;
	font-size: 11.5px; font-weight: 700; color: var(--mute); letter-spacing: 0.06em;
}
.course-item-t { flex: 1 1 auto; min-width: 0; font-size: 14.5px; letter-spacing: -0.005em; line-height: 1.35; }
.course-item-d {
	flex-shrink: 0; display: inline-flex; align-items: center;
	font-size: 12px; color: var(--mute); letter-spacing: 0.04em;
	font-variant-numeric: tabular-nums;
}

/* A lesson with no video yet: visibly present, explicitly not clickable. */
.course-item:disabled { cursor: default; }
.course-item.is-locked .course-item-t { color: var(--mute); }
.course-item.is-locked .course-item-d { color: var(--mute); opacity: 0.8; }

@media (max-width: 1024px) {
	.course-grid { grid-template-columns: 1fr; gap: 24px; }
	.course-items { max-height: none; }
}
@media (max-width: 640px) {
	#course { padding: 96px 0 80px; }
	.course-stage { border-radius: 12px; }
	.course-list { border-radius: 12px; }
	.course-now { gap: 12px; margin-top: 18px; }
	.course-now-t { font-size: 17px; }
}
