/*
 * The Cloud tutorials (1 Oct 2026): the list and each video's page, on the
 * shop dashboard and on nishchitbd.com/tutorials.
 *
 * One stylesheet for two hosts. Every colour is the dashboard's token when
 * there is one (--nm-*, which also carries the dashboard's dark theme), else
 * the public site's (--fg, --accent …, light only), else a plain value — so
 * the page looks like whichever product it sits in.
 */

.tut {
	--tut-bg: var(--nm-surface, var(--surface, #ffffff));
	--tut-sunken: var(--nm-bg, var(--bg-sunken, #f5f8f7));
	--tut-line: var(--nm-border, var(--line, #dfe6e4));
	--tut-fg: var(--nm-text, var(--fg, #111a19));
	--tut-muted: var(--nm-muted, var(--fg-muted, #41504e));
	--tut-accent: var(--nm-primary, var(--accent, #0f766e));
	--tut-accent-soft: var(--nm-primary-soft, var(--accent-wash, #e7f3f1));
	--tut-warn: var(--nm-warn, var(--warn, #854d0e));
	--tut-warn-soft: var(--nm-warn-soft, var(--warn-wash, #fef3c7));
	--tut-on-accent: #ffffff;
	--tut-radius: 12px;

	color: var(--tut-fg);
	line-height: 1.6;
}

/* The dashboard's dark teal is light: what sits on it is dark. */
@media (prefers-color-scheme: dark) {
	.mg-shell .tut, .mg-main .tut { --tut-on-accent: #06231f; }
}

.tut a { color: var(--tut-accent); }
.tut h1, .tut h2, .tut h3 { color: var(--tut-fg); line-height: 1.3; }

.tut-head h1 { margin: 0 0 8px; font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); }
.tut-head p { margin: 0 0 20px; max-width: 62ch; color: var(--tut-muted); }

/* The count and the series to jump to. */
.tut-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 24px; }
.tut-count { flex: none; padding: 6px 14px; border-radius: 999px; background: var(--tut-accent-soft); color: var(--tut-accent); font-size: 0.9em; }
.tut-count b { font-variant-numeric: tabular-nums; }
.tut-jump { display: flex; flex-wrap: wrap; gap: 8px; }
.tut-jump a { padding: 6px 12px; border: 1px solid var(--tut-line); border-radius: 999px; background: var(--tut-bg); color: var(--tut-fg); font-size: 0.88em; text-decoration: none; }
.tut-jump a small { color: var(--tut-muted); }
.tut-jump a:hover { border-color: var(--tut-accent); }
.tut-jump a:focus-visible, .tut-chip:focus-visible, .tut-card h3 a:focus-visible, .tut-poster:focus-visible, .tut-pager-a:focus-visible, .tut-sibs a:focus-visible { outline: 2px solid var(--tut-accent); outline-offset: 2px; }

/* Watch first: a strip that scrolls sideways. */
.tut-first { margin-bottom: 32px; }
.tut-first h2 { margin: 0 0 12px; font-size: 1.15em; }
.tut-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.tut-chip { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--tut-line); border-radius: var(--tut-radius); background: var(--tut-bg); color: var(--tut-fg); text-decoration: none; scroll-snap-align: start; }
.tut-chip:hover { border-color: var(--tut-accent); }
.tut-chip-no { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--tut-sunken); color: var(--tut-muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.tut-chip.is-live .tut-chip-no { background: var(--tut-accent); color: var(--tut-on-accent); }
.tut-chip-text { display: grid; min-width: 0; gap: 2px; }
.tut-chip-text b { font-size: 0.95em; line-height: 1.35; }
.tut-chip-text small { color: var(--tut-muted); }

/* A series: its number, its name, what it is for, its videos. */
.tut-series { margin-bottom: 40px; scroll-margin-top: 80px; }
.tut-series h2 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px; font-size: 1.4em; }
.tut-series-no { color: var(--tut-accent); font-size: 0.7em; font-weight: 700; }
.tut-about { margin: 0 0 16px; max-width: 70ch; color: var(--tut-muted); }

.tut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.tut-card { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border: 1px solid var(--tut-line); border-radius: var(--tut-radius); background: var(--tut-bg); }
.tut-card-body { display: grid; align-content: start; gap: 6px; padding: 12px 14px 14px; }
.tut-meta { color: var(--tut-muted); font-size: 0.85em; }
.tut-meta b { color: var(--tut-accent); font-weight: 600; }
.tut-card h3 { margin: 0; font-size: 1.02em; }
.tut-card h3 a { color: var(--tut-fg); text-decoration: none; }
.tut-card h3 a:hover { color: var(--tut-accent); text-decoration: underline; }

/* The poster: a published video's frame, or the number and "আসছে". */
.tut-poster { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; border: 0; background: var(--tut-sunken); color: var(--tut-muted); font: inherit; text-decoration: none; cursor: pointer; }
.tut-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tut-poster.is-soon { background: linear-gradient(135deg, var(--tut-accent-soft), var(--tut-sunken)); cursor: default; }
a.tut-poster.is-soon { cursor: pointer; }
.tut-poster-no { color: var(--tut-accent); font-size: 2.6em; font-weight: 800; font-variant-numeric: tabular-nums; opacity: 0.55; }
.tut-badge { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 999px; background: var(--tut-bg); color: var(--tut-muted); font-size: 0.78em; font-weight: 600; }
.tut-playbtn { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(15, 118, 110, 0.92); color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); transition: transform 0.15s ease; }
.tut-play:hover .tut-playbtn { transform: scale(1.08); }
.tut-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }

.tut-shows summary { color: var(--tut-accent); font-size: 0.88em; cursor: pointer; }
.tut-shows ul { margin: 6px 0 0; padding-left: 1.1em; color: var(--tut-muted); font-size: 0.9em; }
.tut-shows li { margin: 2px 0; }

/* A video's own page: read like an article. */
.tut-page { max-width: 860px; }
.tut-crumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; color: var(--tut-muted); font-size: 0.9em; }
.tut-crumb a { text-decoration: none; }
.tut-crumb a:hover { text-decoration: underline; }
.tut-page-head h1 { margin: 6px 0 18px; font-size: clamp(1.6rem, 1.1rem + 2vw, 2.3rem); }
.tut-player { margin-bottom: 24px; overflow: hidden; border-radius: 16px; background: var(--tut-sunken); }
.tut-poster.is-big .tut-playbtn { width: 76px; height: 76px; }
.tut-more { margin: 0 0 28px; }
.tut-more h2 { margin: 0 0 12px; font-size: 1.15em; }
.tut-more-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tut-more-item { margin: 0; overflow: hidden; border: 1px solid var(--tut-line); border-radius: var(--tut-radius); background: var(--tut-bg); }
.tut-more-item figcaption { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; font-size: 0.95em; line-height: 1.5; }
.tut-more-no { display: grid; flex: none; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--tut-accent); color: var(--tut-on-accent); font-size: 0.85em; font-weight: 700; }
.tut-poster.is-big.is-soon { gap: 6px; align-content: center; padding: 24px; text-align: center; }
.tut-poster.is-big .tut-poster-no { font-size: 4em; }
.tut-soon-text { max-width: 36ch; color: var(--tut-muted); }

.tut-article { max-width: 70ch; }
.tut-lead { margin: 0 0 16px; font-size: 1.12em; }
.tut-needs { margin: 0 0 20px; padding: 12px 14px; border-radius: 10px; background: var(--tut-warn-soft); color: var(--tut-fg); }
.tut-needs b { color: var(--tut-warn); }
.tut-article h2 { margin: 24px 0 12px; font-size: 1.25em; }
.tut-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.tut-steps li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--tut-line); border-radius: 12px; background: var(--tut-bg); }
.tut-step-no { display: grid; flex: none; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tut-accent); color: var(--tut-on-accent); font-size: 0.85em; font-weight: 700; }
.tut-out { margin: 20px 0 0; }

.tut-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 32px 0; }
.tut-pager-a { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--tut-line); border-radius: 12px; background: var(--tut-bg); color: var(--tut-fg); text-decoration: none; }
.tut-pager-a:hover { border-color: var(--tut-accent); }
.tut-pager-a small { color: var(--tut-muted); }
.tut-pager-a.is-next { text-align: right; }

.tut-sibs h2 { margin: 0 0 10px; font-size: 1.1em; }
.tut-sibs ol { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.tut-sibs a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--tut-fg); text-decoration: none; }
.tut-sibs a:hover { background: var(--tut-sunken); }
.tut-sibs li[aria-current] a { background: var(--tut-accent-soft); font-weight: 600; }
.tut-sib-no { flex: none; width: 28px; color: var(--tut-muted); font-variant-numeric: tabular-nums; }
.tut-sib-title { flex: 1; min-width: 0; }
.tut-sibs small { flex: none; color: var(--tut-muted); }

@media (max-width: 640px) {
	.tut-pager { grid-template-columns: 1fr; }
	.tut-pager-a.is-next { text-align: left; }
	.tut-strip { grid-auto-columns: minmax(200px, 78vw); }
}

@media (prefers-reduced-motion: reduce) {
	.tut-playbtn { transition: none; }
}
