/* Video tutorials: cards, the home page strip, the player window and the tutorial pages. Uses the site's own colours. */
.tv-home, .tv-feature, .tv-series, .tv-page { --tv-accent: var(--primary, var(--brand, #1e7a5a)); --tv-card: var(--surface, #fff); --tv-line: var(--line, #e5e1d8); --tv-muted: var(--muted, #6b6459); }
.tv-modal, .tv-article { --tv-accent: var(--primary, var(--brand, #1e7a5a)); --tv-line: var(--line, #e5e1d8); --tv-muted: var(--muted, #6b6459); }

.tv-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tv-card { display: grid; align-content: start; overflow: hidden; border: 1px solid var(--tv-line); border-radius: 14px; background: var(--tv-card); color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
.tv-card:hover, .tv-card:focus-visible { transform: translateY(-3px); border-color: var(--tv-accent); box-shadow: 0 10px 28px rgba(0, 0, 0, .12); }
.tv-card[hidden] { display: none; }
.tv-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #111; }
.tv-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tv-play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(0, 0, 0, .55); box-shadow: 0 0 0 3px rgba(255, 255, 255, .85); transition: background .2s, transform .2s; }
.tv-play::after { content: ''; position: absolute; left: 21px; top: 16px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent #fff; }
.tv-card:hover .tv-play, .tv-player:hover .tv-play { background: var(--tv-accent); transform: scale(1.08); }
.tv-len { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, .78); color: #fff; font-size: .75rem; font-weight: 700; }
.tv-meta { display: grid; gap: .2rem; padding: .75rem .9rem .9rem; }
.tv-meta small { color: var(--tv-accent); font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.tv-meta b { font-size: .98rem; line-height: 1.3; }
.tv-ur { color: var(--tv-muted); font-size: .85rem; text-align: right; }

/* the home page strip */
.tv-strip { position: relative; }
.tv-track { display: flex; gap: 1.1rem; overflow-x: auto; padding: .6rem max(1.25rem, calc((100vw - var(--max, 1200px)) / 2)) 1.2rem; scrollbar-width: none; overscroll-behavior-x: contain; }
.tv-track::-webkit-scrollbar { display: none; }
.tv-track:focus-visible { outline: 2px solid var(--tv-accent); outline-offset: -2px; }
.tv-track .tv-card { flex: 0 0 280px; }
.tv-arrow { position: absolute; top: calc(50% - 40px); z-index: 2; width: 44px; height: 44px; border: 1px solid var(--tv-line); border-radius: 50%; background: var(--tv-card); color: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.tv-prev { left: 12px; } .tv-next { right: 12px; }
.tv-arrow:hover { background: var(--tv-accent); color: #fff; }
@media (max-width: 640px) { .tv-arrow { display: none; } .tv-track .tv-card { flex-basis: 240px; } }

/* the player window */
.tv-modal { width: min(960px, calc(100vw - 2rem)); max-width: none; padding: 0; border: 0; border-radius: 16px; background: #000; color: #fff; overflow: hidden; }
.tv-modal::backdrop { background: rgba(10, 10, 10, .82); }
.tv-modal .tv-frame { aspect-ratio: 16 / 9; background: #000; }
.tv-modal iframe { display: block; width: 100%; height: 100%; border: 0; }
.tv-modal .tv-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .8rem 1rem; background: #111; }
.tv-modal .tv-foot b { font-size: 1rem; }
.tv-modal .tv-foot a { color: #fff; font-weight: 700; }
.tv-modal .tv-foot > span { display: flex; align-items: center; gap: 1rem; }
.tv-close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.tv-close:hover { background: var(--tv-accent); }

/* a tutorial's page */
.tv-ur-title { margin: .2rem 0 0; color: var(--tv-muted); font-size: 1.15rem; }
.tv-player-wrap { margin-top: 1.6rem; max-width: 960px; }
.tv-player { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: #000; cursor: pointer; box-shadow: 0 18px 50px rgba(0, 0, 0, .25); }
.tv-player img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tv-player .tv-play { width: 78px; height: 78px; }
.tv-player .tv-play::after { left: 30px; top: 23px; border-width: 16px 0 16px 25px; }
.tv-player-wrap iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 16px; background: #000; }
.tv-article { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
.tv-article article { max-width: 760px; }
.tv-article article > p { font-size: 1.05rem; line-height: 1.75; }
.tv-article h3 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.6rem; }
@media (max-width: 900px) { .tv-article { grid-template-columns: 1fr; } }
.tv-chapters { list-style: none; padding: 0; display: grid; gap: .35rem; }
.tv-steps { display: grid; gap: .4rem; padding-left: 1.4rem; line-height: 1.65; }
.tv-seek { padding: .1rem .5rem; border: 1px solid var(--tv-line); border-radius: 999px; background: transparent; color: var(--tv-accent); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.tv-seek:hover { background: var(--tv-accent); color: #fff; }
.tv-links { padding-left: 1.1rem; display: grid; gap: .35rem; }
.tv-search-row { margin-top: 1.4rem; max-width: 560px; }
.tv-search { width: 100%; padding: .85rem 1.1rem; border: 1px solid var(--line, #ddd); border-radius: 999px; background: var(--surface, #fff); color: inherit; font: inherit; font-size: 1rem; }
.tv-search:focus { outline: 2px solid var(--primary, var(--brand, #1e7a5a)); outline-offset: 1px; }
.tv-box { padding: 1.4rem; border: 1px solid var(--tv-line); border-radius: 16px; background: var(--surface, #fff); }
.tv-aside { position: sticky; top: 6rem; }
.tv-series[hidden] { display: none; }
