/* The pages behind the tabs that are lists of things: the guides' overview,
   the questions, what is new, the plugins and the manual's first page. They
   share the guide pages' large headline (howto.css) and add what each needs. */

/* ---------- The guides' overview ---------- */

.hub__list {
  display: grid;
  margin-top: var(--space-block);
}

.guide {
  position: relative;
  display: grid;
  gap: 1.5rem;
  padding-block: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  border-top: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}

.guide:last-child {
  border-bottom: 1px solid var(--border);
}

/* The picture of the program a guide is about, cut to one shape for all of them. */
.guide__shot {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-window);
  background: var(--panel);
}

.guide__shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0 0;
}

.guide__fact {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.guide h2 {
  margin-top: 0.4rem;
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2.1rem);
  font-weight: 300;
  line-height: 1.08;
}

.guide h2 strong {
  font-weight: 700;
}

.guide__text > p:not(.guide__fact) {
  max-width: 40rem;
  margin-top: 0.9rem;
  color: var(--text-soft);
}

/* "Open the guide", with the arrow that moves on when the row is pointed at. */
.guide__go {
  display: inline-block;
  margin-top: 1.1rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--border-strong);
  color: var(--text);
  font-weight: 600;
  transition: border-color var(--duration-fast) ease;
}

.guide__go::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-left: 0.6em;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg) translateY(-0.1em);
  transition: transform var(--duration) var(--ease-out);
}

.guide:hover .guide__go,
.guide:focus-visible .guide__go {
  border-color: var(--accent);
}

.guide:hover .guide__go::after,
.guide:focus-visible .guide__go::after {
  transform: translateX(0.35em) rotate(45deg) translateY(-0.1em);
}

/* The first guide is the one to begin with: its picture is the size of the page. */
.guide--first {
  border-top: 0;
  padding-top: 0;
}

.guide--first h2 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.4rem);
  line-height: 1;
}

.guide--first .guide__shot {
  box-shadow: var(--shadow-window);
}

@media (min-width: 1000px) {
  .guide {
    grid-template-columns: 22rem minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
  }

  .guide--first {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 3.5rem;
    padding-bottom: clamp(3rem, 2rem + 3vw, 5rem);
  }
}

.hub__more {
  margin-top: var(--space-block);
  color: var(--text-soft);
}

/* ---------- A picture that is scrubbed ---------- */

/* The pointer over a picture of the program moves SceneMill's playhead across
   it, as it would over the timeline (main.js sets --x). */
[data-scrub]::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: var(--x, 0%);
  width: 2px;
  margin-left: -1px;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
  pointer-events: none;
}

[data-scrub].is-scrubbed::before {
  opacity: 1;
}

/* ---------- What is new: the versions along a timeline ---------- */

/* The versions hang on one line, the newest at the top with the playhead on it. */
.releases {
  position: relative;
  max-width: 68rem;
  margin-top: var(--space-block);
  padding-left: 2.25rem;
}

.releases::before {
  content: "";
  position: absolute;
  top: 0.6rem;
  bottom: 0;
  left: 5px;
  width: 1px;
  background: var(--border-strong);
}

.release {
  position: relative;
  display: grid;
  gap: 0.9rem 3rem;
  padding-bottom: clamp(2.25rem, 1.6rem + 2vw, 3.5rem);
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

/* A tick on the line for each version ... */
.release::before {
  content: "";
  position: absolute;
  top: 0.95rem;
  left: -2.25rem;
  width: 11px;
  height: 1px;
  background: var(--border-strong);
}

/* ... and the playhead on the one that is current. */
.release--current::before {
  top: 0.45rem;
  width: 11px;
  height: 12px;
  background: var(--accent);
  clip-path: polygon(0 0, 58% 0, 100% 50%, 58% 100%, 0 100%);
}

.release__when {
  display: grid;
  align-content: start;
  gap: 0.2rem;
  color: var(--text-muted);
  font-size: var(--text-small);
}

.release h2 {
  color: var(--text-soft);
  font-size: clamp(1.7rem, 1.4rem + 1vw, 2.3rem);
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.release--current h2 {
  color: var(--text);
  font-weight: 700;
}

.release__now {
  color: var(--accent);
  font-weight: 600;
}

.release__notes {
  display: grid;
  gap: 0.55rem;
  align-content: start;
  max-width: 44rem;
  padding-top: 0.25rem;
  color: var(--text-soft);
}

.release--current .release__notes {
  color: var(--text);
  font-size: 1.12rem;
}

.release__notes li {
  position: relative;
  padding-left: 1.1rem;
}

.release__notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  background: var(--border-strong);
  transform: rotate(45deg);
}

.release--current .release__notes li::before {
  background: var(--accent);
}

@media (min-width: 800px) {
  .release {
    grid-template-columns: 12rem minmax(0, 1fr);
  }
}

/* ---------- The questions ---------- */

/* The list beside the answers holds whole questions: rows as tall as they need. */
.toc--plain ol {
  display: grid;
  gap: 0.7rem;
  padding-left: 0;
  counter-reset: none;
}

.toc--plain li {
  height: auto;
}

.toc--plain a {
  display: block;
  height: auto;
  line-height: 1.35;
}

.toc.toc--plain ol a::before,
.toc.toc--plain ol::before {
  content: none;
}

.toc--plain a[aria-current="true"] {
  color: var(--text);
}

.answer {
  padding-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem);
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.answer + .answer {
  padding-top: clamp(2rem, 1.5rem + 2vw, 3.25rem);
  border-top: 1px solid var(--border);
}

.answer h2 {
  max-width: 24ch;
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.3rem);
  font-weight: 300;
  line-height: 1.08;
}

.answer > p,
.answer > ul {
  max-width: 44rem;
  margin-top: 1.1rem;
}

.answer a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}
