/* Revanalyticx — video tutorials: /tutorials and the Tutorials section on each plugin page.
   Uses the tokens from site.css (loaded after this sheet). */

/* ------------------------------------------------------- page head */
.tut-hero { padding: clamp(36px, 5vw, 64px) 0 clamp(24px, 3vw, 36px); background: linear-gradient(180deg, var(--paper) 0%, #fff 100%); border-bottom: 1px solid var(--line); }
.tut-hero h1 { font-size: clamp(32px, 4vw, 50px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; margin: 16px 0 14px; max-width: 20ch; }
.tut-hero .hero__lead { max-width: 60ch; margin: 0; }

/* ------------------------------------------------------- layout: list | player */
.tut { padding: clamp(28px, 4vw, 48px) 0 clamp(56px, 7vw, 88px); }
.tut__grid { display: grid; grid-template-columns: minmax(270px, 340px) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.tut__side { position: sticky; top: calc(var(--nav-h) + 16px); display: grid; gap: 10px; max-height: calc(100vh - var(--nav-h) - 32px); overflow: auto; overscroll-behavior: contain; padding: 2px; scrollbar-width: thin; }
.tut__main { min-width: 0; outline: none; }
.tut__main.is-entering .tv { animation: tv-in .35s var(--ease-out); }
@keyframes tv-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------- plugin groups (accordion) */
.tg { border: 1px solid var(--line); border-radius: var(--r); background: #fff; transition: border-color .2s, box-shadow .2s; }
.tg.is-open { border-color: var(--blue-soft); box-shadow: var(--shadow-1); }
.tg__head {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: none; cursor: pointer; text-align: left; border-radius: var(--r);
}
.tg__head:hover .tg__name b { color: var(--blue); }
.tg__head > img { width: 28px; height: 28px; flex: none; }
.tg__name { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.tg__name b { font: 700 15.5px/1.25 var(--font-display); color: var(--ink); transition: color .2s; }
.tg__name small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg__count { flex: none; min-width: 26px; padding: 3px 8px; border-radius: 99px; background: var(--blue-pale); color: var(--blue); font: 600 11.5px/1.2 var(--font-mono); text-align: center; }
.tg__count--soon { background: var(--amber-pale); color: #9a6200; letter-spacing: .04em; text-transform: uppercase; font-size: 10.5px; }
.tg__head > .i { width: 16px; height: 16px; color: var(--muted); transition: transform .3s var(--ease-out); }
.tg.is-open .tg__head > .i { transform: rotate(180deg); color: var(--blue); }

/* smooth open/close without measuring heights */
.tg__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s var(--ease-out); }
.tg.is-open .tg__body { grid-template-rows: 1fr; }
.tg__inner { overflow: hidden; min-height: 0; }
.tg__inner > :last-child { margin-bottom: 12px; }
.tg:not(.is-open) .tg__inner { visibility: hidden; transition: visibility 0s .32s; }

.tg__list { list-style: none; margin: 0; padding: 0 8px 10px; display: grid; gap: 2px; }
.ti { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-size: 14.5px; line-height: 1.35; transition: background .15s, color .15s; }
.ti:hover { background: var(--paper); color: var(--ink); }
.ti__n { font: 500 11.5px var(--font-mono); color: var(--muted-2); }
.ti__d { font: 500 11.5px var(--font-mono); color: var(--muted); }
.ti__d svg { width: 14px; height: 14px; fill: currentColor; }
.ti.is-active { background: var(--blue-pale); color: var(--blue); font-weight: 600; }
.ti.is-active .ti__n, .ti.is-active .ti__d { color: var(--blue); }
.tg__soon {
  display: flex; gap: 12px; align-items: flex-start; margin: 2px 12px 14px; padding: 14px 14px 15px;
  border: 1px dashed #f1cf8a; border-radius: 12px; background: linear-gradient(180deg, #fffaf0 0%, var(--amber-pale) 100%);
}
.tg__soonic { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: #fff; color: var(--amber); box-shadow: 0 2px 6px rgba(231, 154, 18, .18); }
.tg__soonic .i { width: 18px; height: 18px; animation: tg-tick 4s linear infinite; }
@keyframes tg-tick { to { transform: rotate(360deg); } }
.tg__soontx { display: grid; gap: 3px; min-width: 0; line-height: 1.4; }
.tg__soontx b { font: 700 14.5px/1.3 var(--font-display); color: #6d4a07; letter-spacing: -.01em; }
.tg__soontx small { font-size: 13px; color: #7a5a1c; }
.tg__soontx a { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 13px; font-weight: 600; color: #9a6200; }
.tg__soontx a .i { width: 13px; height: 13px; }
.tg__soontx a:hover { color: #6d4a07; }

.tut__yt { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--ink-2); }
.tut__yt > svg { width: 28px; height: 28px; flex: none; }
.tut__yt span { display: grid; flex: 1; line-height: 1.3; }
.tut__yt b { font-size: 14.5px; }
.tut__yt small { font-size: 12.5px; color: var(--muted); }
.tut__yt:hover { border-color: #ff0033; color: var(--ink); }

/* ------------------------------------------------------- the stage */
.tv__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: var(--ink); box-shadow: var(--shadow-2); }
.tv__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tv__play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.tv__play img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .25s, transform .6s var(--ease-out); }
.tv__play:hover img { opacity: 1; transform: scale(1.02); }
.tv__btn { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .95); box-shadow: 0 10px 30px rgba(11, 22, 48, .35); transition: transform .25s var(--ease-out), background .2s; }
.tv__btn svg { width: 30px; height: 30px; margin-left: 4px; fill: var(--blue); }
.tv__play:hover .tv__btn, .tv__play:focus-visible .tv__btn { transform: scale(1.08); background: #fff; }
.tv__play:focus-visible { box-shadow: inset 0 0 0 4px var(--blue-soft); }
.tv__frame--none { display: grid; place-items: center; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.tv__frame--none span { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font: 500 13px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }


.soon-card {
  position: relative; display: grid; grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(20px, 3vw, 40px);
  padding: clamp(22px, 3.4vw, 40px); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  background: radial-gradient(90% 120% at 0% 0%, var(--blue-pale) 0%, rgba(234, 240, 253, 0) 60%), radial-gradient(70% 90% at 100% 100%, #eaf7ef 0%, rgba(234, 247, 239, 0) 60%), #fff;
  box-shadow: var(--shadow-1);
}
.soon-card__art { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; }
.soon-card__screen {
  position: relative; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 16px;
  background: linear-gradient(160deg, #10204a 0%, #1a3a8f 100%); box-shadow: 0 18px 40px rgba(11, 22, 48, .22), inset 0 0 0 6px rgba(255, 255, 255, .06);
}
.soon-card__screen::before { content: ""; position: absolute; inset: 14px; border: 1px dashed rgba(255, 255, 255, .18); border-radius: 10px; }
.soon-card__screen img { position: relative; width: 44px; height: 44px; padding: 10px; box-sizing: content-box; border-radius: 16px; background: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.soon-card__rec { position: absolute; top: 22px; left: 24px; display: inline-flex; align-items: center; gap: 6px; font: 600 10.5px var(--font-mono); font-style: normal; letter-spacing: .14em; color: #ffd2d2; }
.soon-card__rec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 0 4px rgba(255, 77, 77, .25); animation: rec 1.6s ease-in-out infinite; }
@keyframes rec { 50% { opacity: .35; } }
.soon-card__play { position: absolute; right: -10px; bottom: -10px; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: #fff; box-shadow: 0 10px 24px rgba(11, 22, 48, .2); }
.soon-card__play svg { width: 22px; height: 22px; margin-left: 3px; fill: var(--blue); }
.soon-card__body { min-width: 0; }
.soon-card__tag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 99px; background: var(--amber-pale); color: #9a6200; font: 600 11.5px/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.soon-card__tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(231, 154, 18, .2); }
.soon-card__title { margin: 14px 0 10px; font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.soon-card__text { margin: 0; color: var(--muted); font-size: 15.5px; max-width: 52ch; }
.soon-card__list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 7px; }
.soon-card__list li { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--ink-2); }
.soon-card__list .i { width: 18px; height: 18px; padding: 3px; box-sizing: content-box; border-radius: 50%; background: var(--green-pale); color: var(--green); }
.soon-card__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.soon-card__more { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; font-size: 14.5px; font-weight: 500; }
.soon-card__more .i { width: 16px; height: 16px; transition: transform .2s; }
.soon-card__more:hover .i { transform: translateX(3px); }

.tv__meta { padding: 22px 4px 0; }
.tv__crumb { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 500 12.5px var(--font-mono); letter-spacing: .04em; color: var(--muted); }
.tv__title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -.03em; }
.tv__desc { margin-top: 14px; max-width: 72ch; color: var(--ink-2); font-size: 16px; }
.tv__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.tv__more { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 14.5px; font-weight: 500; }
.tv__more .i { width: 16px; height: 16px; transition: transform .2s; }
.tv__more:hover .i { transform: translateX(3px); }

/* rich text from the admin editor */
.rich > * + * { margin-top: .8em; }
.rich p { margin: 0; }
.rich h2, .rich h3, .rich h4 { font-size: 1.15em; margin-top: 1.2em; }
.rich ul, .rich ol { padding-left: 1.3em; margin: 0; }
.rich li + li { margin-top: .3em; }
.rich blockquote { margin: 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--blue-soft); color: var(--muted); }
.rich table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.rich th, .rich td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.rich th { background: var(--paper); }
.rich figure { margin: 0; overflow-x: auto; }
.rich code { font-size: .9em; padding: 1px 5px; border-radius: 5px; background: var(--paper); }
.rich a { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------- bottom call-out */
.tut-help { padding: clamp(44px, 6vw, 72px) 0; }
.tut-help__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.tut-help h2 { font-size: clamp(24px, 2.8vw, 34px); font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px; }
.tut-help p { color: var(--muted); }

/* ------------------------------------------------------- the Tutorials section on a plugin page */
.ptut .tut__grid { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); }
.ptut .tut__side { order: 2; position: static; max-height: none; overflow: visible; }
.ptut__all { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 0 4px; font-size: 14.5px; font-weight: 500; }
.ptut__all .i { width: 16px; height: 16px; }

/* ------------------------------------------------------- small screens: list above the player */
@media (max-width: 900px) {
  .tut__grid, .ptut .tut__grid { grid-template-columns: 1fr; }
  .tut__side { position: static; max-height: none; overflow: visible; }
  .ptut .tut__side { order: 0; }
  .tv__more { margin-left: 0; }
}
@media (max-width: 720px) {
  .soon-card { grid-template-columns: 1fr; }
  .soon-card__art { max-width: 320px; width: 100%; margin: 0 auto 8px; }
}
@media (max-width: 520px) {
  .soon-card__acts .btn { width: 100%; }
  .soon-card__more { margin: 4px 0 0; }
  .tv__frame { border-radius: var(--r); }
  .tv__btn { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .tv__nav .btn { width: 100%; justify-content: flex-start; white-space: normal; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .tg__body, .tg__head > .i, .tv__play img, .tv__btn { transition: none; }
  .tut__main.is-entering .tv { animation: none; }
  .tg__soonic .i, .soon-card__rec::before { animation: none; }
}

/* a plugin with no videos yet: a smaller card */
.ptut > .wrap > .tut__main { max-width: 980px; }
/* the plugin's own description (admin rich text) under its features */
.pp-about { max-width: 760px; margin: 36px auto 0; color: var(--ink-2); }
