/* Tutorials (/tutorials/, /tutorials/<slug>/) and public help (/help/).
   Page-only rules on top of the html.v3 kit (static/css/ui.css, tokens.css). Tokens only, no new colours.
   dx- = shared by both pages; hp-/tu- = help/tutorial specifics (moved here from the old inline styles). */

/* ---- hero: cool wash with two soft blobs (they drift only if motion is allowed) */
.v3 .dx-hero { position: relative; isolation: isolate; overflow: clip; padding: clamp(48px, 8vw, 104px) 0 clamp(44px, 6vw, 80px); background: var(--bg-warm); border-bottom: 1px solid var(--line); }
.v3 .dx-hero::before, .v3 .dx-hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.v3 .dx-hero::before { width: 40rem; height: 40rem; right: -12rem; top: -20rem; background: radial-gradient(circle, var(--blob-a), transparent 66%); }
.v3 .dx-hero::after { width: 34rem; height: 34rem; left: -14rem; bottom: -22rem; background: radial-gradient(circle, var(--blob-b), transparent 66%); }
@media (prefers-reduced-motion: no-preference) {
  .v3 .dx-hero::before { animation: dx-drift 18s ease-in-out infinite alternate; }
  @keyframes dx-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-4rem, 3rem, 0) scale(1.1); } }
}
.v3 .dx-hero .display-1 { max-width: 16ch; font-size: clamp(2.5rem, 1.4rem + 4.6vw, 4.75rem); text-wrap: balance; }
.v3 .dx-hero .lede { max-width: 40em; }
.v3 .dx-hero .tu-listen { background: var(--paper); }
.v3 .dx-hero .tu-narrow > .display-1 { max-width: 20ch; font-size: clamp(2.25rem, 1.3rem + 3.6vw, 3.75rem); }

/* ---- card grids: equal heights, footer row pinned to the bottom */
.v3 .dx-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); align-items: stretch; }
.v3 .dx-card { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 24px; position: relative; }
.v3 .dx-card h3 { margin: 0; font-size: 1.25rem; line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }
.v3 .dx-card p { margin: 0; line-height: 1.55; color: var(--text); }
.v3 .dx-card .dx-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 4px; }
.v3 .dx-card .meta { margin-top: auto; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.v3 .dx-card .meta a { font-weight: 600; }

.v3 .dx-section-head { max-width: 46rem; }
.v3 .dx-section-head .display-2 { font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3rem); text-wrap: balance; }
.v3 .dx-section-head p { max-width: 72ch; text-wrap: pretty; }

/* ---- help: process cards and topic grid */
.v3 .hp-card { padding: 0; overflow: hidden; gap: 0; }
.v3 .hp-card .hp-poster { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-warm); border-bottom: 1px solid var(--line); }
.v3 .hp-card .hp-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px 22px 22px; }
.v3 .hp-card .hp-body p { margin: 0; color: var(--text); line-height: 1.55; }
.v3 .hp-card .hp-body .meta { margin-top: auto; padding-top: 12px; }
.v3 .dx-how .dx-card { background: var(--paper); }
.v3 .dx-how .dx-num { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent-text); font-weight: 800; font-size: 1.0625rem; font-variant-numeric: tabular-nums; margin-bottom: 6px; }

/* "Not recorded" list: readable measure, definition pairs divided by hairlines */
.v3 .hp-left dl { max-width: 72ch; margin: 0; display: grid; gap: 0; }
.v3 .hp-left dl > div { padding: 18px 0; border-top: 1px solid var(--line); }
.v3 .hp-left dl > div:last-child { border-bottom: 1px solid var(--line); }
.v3 .hp-left dt { font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.v3 .hp-left dd { margin: 4px 0 0; color: var(--text); font-size: 1rem; line-height: 1.65; }

/* ---- one tutorial */
.tu-narrow { width: min(100% - 2rem, 48rem); margin-inline: auto; }
.v3 .tu-listen { margin-top: 28px; padding: 18px 20px; }
.tu-listen-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.tu-listen h2 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.tu-listen h2 i { color: var(--accent-text); }
.tu-listen .len { font-size: .8125rem; color: var(--muted); }
.tu-listen audio { display: block; width: 100%; margin-top: 12px; }
.tu-listen p { margin: 12px 0 0; font-size: .875rem; color: var(--muted); max-width: 72ch; }
.tu-video { margin-top: 28px; }
.v3 .video-frame { border-radius: 20px; }
.v3 .tu-outcome { margin-top: 28px; padding: 24px 26px; border-radius: 20px; }
.tu-outcome h2 { margin: 0 0 8px; font-size: .9375rem; font-weight: 700; color: var(--on-grad-soft); }
.tu-outcome p { margin: 0; font-size: 1.125rem; line-height: 1.6; color: var(--on-grad); max-width: 60ch; }
.tu-outcome b { font-weight: 700; }

.tu-walk { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.v3 .tu-walk > li { padding: clamp(20px, 3vw, 30px); scroll-margin-top: calc(var(--head-h) + 1rem); transition: border-color .2s, box-shadow .2s; }
.v3 .tu-walk > li:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tu-walk .tu-step-head { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; }
.v3 .tu-walk .step-num, .v3 .tu-start .step-num { width: 36px; height: 36px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent-line); font-family: inherit; font-weight: 800; }
.v3 .tu-walk h3 { margin: 0; font-family: inherit; font-weight: 750; letter-spacing: -.025em; font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem); line-height: 1.15; color: var(--ink); text-wrap: balance; }
.tu-walk p.body { margin: 0; font-size: 1.0625rem; line-height: 1.7; color: var(--text); max-width: 60ch; }
.tu-walk p.body b { color: var(--ink); font-weight: 650; }
.v3 .tu-walk .note-box { margin-top: 16px; max-width: 60ch; border-radius: 14px; background: var(--bg-warm); border-color: var(--line); }
.tu-step-foot { margin: 14px 0 0; }
.speak {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 14px;
  border: 1px solid var(--field-line); border-radius: 999px; background: transparent; color: var(--ink);
  font: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer;
}
.speak:hover { background: var(--bg-warm); }
.speak[hidden] { display: none; }
.speak i { flex: none; }

/* ---- tutorials index: start-here panel + feed demo */
.v3 .tu-start { padding: clamp(24px, 3.4vw, 40px); max-width: 56rem; }
.tu-start ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tu-start li { display: flex; gap: 16px; align-items: flex-start; color: var(--text); line-height: 1.65; padding: 18px 0; border-top: 1px solid var(--line); max-width: 72ch; }
.tu-start li:first-child { border-top: 0; padding-top: 0; }
.tu-start li b { color: var(--ink); font-weight: 650; }
.v3 .tu-start .step-num { margin-top: -2px; }
.tu-start .cta-row { margin-top: 24px; }

/* accordion: card-like, rotating chevron */
.v3 .tu-demo-alt { margin-top: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.tu-demo-alt summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 18px; cursor: pointer; font-weight: 650; color: var(--ink); list-style: none; border-radius: 16px; }
.tu-demo-alt summary::-webkit-details-marker { display: none; }
.tu-demo-alt summary::after { content: "\ea4e"; font-family: "remixicon"; font-size: 1.25rem; color: var(--muted); transition: transform .2s; }
.tu-demo-alt[open] summary::after { transform: rotate(180deg); }
.tu-demo-alt summary:hover { background: var(--bg-warm); }
.tu-demo-alt ol { margin: 0; padding: 4px 18px 6px 2.4rem; display: grid; gap: 10px; color: var(--text); font-size: .9375rem; line-height: 1.6; max-width: 72ch; }
.tu-demo-alt ol b { color: var(--ink); font-weight: 650; }
.tu-demo-alt p { margin: 0; padding: 10px 18px 18px; font-size: .8125rem; color: var(--muted); }
.tu-demo-grid { display: grid; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (min-width: 60rem) {
  .tu-demo-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .tu-demo-grid .sec-intro { position: sticky; top: calc(var(--head-h) + 1.5rem); }
}

/* ---- closing CTA band: only what the kit does not cover */
.v3 .dx-cta .wrap { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.v3 .dx-cta .cta-row { justify-content: center; margin-top: 0; }
.v3 .dx-cta .url-row { max-width: 560px; }
.v3 .dx-cta .btn-secondary { background: transparent; color: #fff; border-color: var(--on-grad-line); }
.v3 .dx-cta .btn-secondary:hover { background: rgba(255, 255, 255, .12); }
.v3 .dx-cta p { margin: 0; }
