/* =====================================================================
   Tutorials: lesson reader, preview, category page, authors, live class cards and the masterclass dock.
   Same look as the home page and the listing pages: Plus Jakarta Sans, cyan to blue accent, pill buttons, light and dark.
   Everything is scoped under .tu so it cannot leak into the rest of the site.
   ===================================================================== */
.tu, .tu-dock {
    --tu-a: #0891b2;
    --tu-b: #2563eb;
    --tu-grad: linear-gradient(135deg, #06b6d4, #3b82f6);
    --tu-ink: #0f1b2d;
    --tu-body: #3d4c60;
    --tu-muted: #64748b;
    --tu-bg: #ffffff;
    --tu-surface: #f4f9fb;
    --tu-card: #ffffff;
    --tu-line: rgba(20, 90, 140, .14);
    --tu-soft: rgba(8, 145, 178, .09);
    --tu-ok: #059669;
    --tu-warm: #d97706;
    --tu-bad: #dc2626;
    --tu-code: #0b1426;
    --tu-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 28px -16px rgba(15, 23, 42, .16);
    --tu-shadow-hover: 0 2px 4px rgba(15, 23, 42, .05), 0 24px 40px -20px rgba(8, 145, 178, .45);
    --tu-r: 16px;
    --tu-top: 0px; /* height of anything sticky above the page, set by tutorial-ui.js */
    --tu-fs: clamp(1.0625rem, .98rem + .3vw, 1.1875rem); /* article text size, changed by the A- and A+ buttons */
}

.tu {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--tu-body);
    background: var(--tu-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

[data-bs-theme="dark"] .tu, [data-bs-theme="dark"] .tu-dock {
    --tu-a: #22d3ee;
    --tu-b: #3b82f6;
    --tu-ink: #eef7ff;
    --tu-body: #b4c6d9;
    --tu-muted: #8aa0b8;
    --tu-bg: #020817;
    --tu-surface: #060f20;
    --tu-card: #0a1628;
    --tu-line: rgba(110, 190, 230, .18);
    --tu-soft: rgba(34, 211, 238, .10);
    --tu-ok: #34d399;
    --tu-warm: #fbbf24;
    --tu-bad: #f87171;
    --tu-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    --tu-shadow-hover: 0 24px 44px -22px rgba(34, 211, 238, .32);
}

.tu *, .tu *::before, .tu *::after, .tu-dock *, .tu-dock *::before, .tu-dock *::after { box-sizing: border-box; }
.tu a, .tu-dock a { text-decoration: none; }
.tu a:hover, .tu-dock a:hover { text-decoration: none; }
.tu img { max-width: 100%; }
.tu :focus-visible, .tu-dock :focus-visible { outline: 2px solid var(--tu-a); outline-offset: 2px; border-radius: 8px; }
.tu .visually-hidden, .tu-dock .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.tu-wrap { width: min(100% - 32px, 1400px); margin-inline: auto; }
.tu-shell-wrap { width: min(100% - 48px, 1880px); }

/* ---------- buttons: the same pills as the rest of the site ---------- */
.tu-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 0 20px; border: 0; border-radius: 999px;
    background: var(--tu-grad); color: #fff !important;
    font: inherit; font-size: .9rem; font-weight: 700; white-space: nowrap; cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 12px 22px -14px rgba(8, 145, 178, .8);
    transition: transform .2s cubic-bezier(.2, .7, .2, 1), box-shadow .2s, filter .2s;
}
.tu-btn:hover { filter: saturate(1.08) brightness(1.04); transform: translateY(-1px); }
.tu-btn:active { transform: translateY(0) scale(.98); }
.tu-btn--sm { min-height: 34px; padding: 0 15px; font-size: .82rem; }
.tu-btn--ghost { background: transparent; color: var(--tu-ink) !important; box-shadow: inset 0 0 0 1px var(--tu-line); }
.tu-btn--ghost:hover { background: var(--tu-soft); filter: none; }
.tu-btn--soft { background: var(--tu-soft); color: var(--tu-a) !important; box-shadow: none; }
.tu-btn--soft:hover { background: var(--tu-grad); color: #fff !important; filter: none; }
.tu-btn i { font-size: 1em; }

.tu-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
    background: var(--tu-soft); color: var(--tu-ink); font-size: .78rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.tu-chip i { color: var(--tu-a); font-size: .95em; }
.tu-chip--ok { background: color-mix(in srgb, var(--tu-ok) 13%, transparent); color: var(--tu-ok); }
.tu-chip--ok i, .tu-chip--warm i, .tu-chip--bad i { color: inherit; }
.tu-chip--warm { background: color-mix(in srgb, var(--tu-warm) 15%, transparent); color: var(--tu-warm); }
.tu-chip--bad { background: color-mix(in srgb, var(--tu-bad) 12%, transparent); color: var(--tu-bad); }

/* reading progress: a thin bar under the site header, driven by the page scroll (no script) */
.tu-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 1030; background: var(--tu-grad); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
@supports (animation-timeline: scroll()) {
    .tu-progress { animation: tu-grow linear both; animation-timeline: scroll(root); }
    @keyframes tu-grow { to { transform: scaleX(1); } }
}

/* ---------- reader shell: lesson list, article, right rail ---------- */
.tu-shell {
    --nav: 332px; --rail: 372px; /* panel width plus the gap next to it */
    display: grid; gap: 0; align-items: stretch;
    grid-template-columns: var(--nav) minmax(0, 1fr) var(--rail);
    grid-template-areas: "nav main rail";
    padding-block: 20px 56px;
    transition: grid-template-columns .4s cubic-bezier(.2, .7, .2, 1);
}
.tu-nav { margin-right: 32px; }
.tu-rail { margin-left: 32px; }
.tu[data-nav="closed"] .tu-shell { --nav: 0px; }
.tu[data-nav="closed"] .tu-nav { margin-right: 0; visibility: hidden; opacity: 0; pointer-events: none; }
/* the right panel folds away (wide screens only) and the lesson takes the whole width */
.tu-railtab { display: none; }
@media (min-width: 1280px) {
    .tu[data-rail="closed"] .tu-shell { --rail: 0px; }
    .tu[data-rail="closed"] .tu-rail { margin-left: 0; visibility: hidden; opacity: 0; pointer-events: none; overflow: hidden; }
    .tu[data-rail="closed"] .tu-prose :is(p, ul, ol, blockquote, h1, h2, h3, h4, h5, h6) { max-width: 170ch; }
    .tu[data-rail="closed"] .tu-railtab { display: inline-flex; }
}
.tu-rail { transition: opacity .25s, visibility .25s; }
.tu-railhide { display: flex; align-items: center; justify-content: flex-end; gap: 8px; width: 100%; padding: 4px 6px; border: 0; background: none; color: var(--tu-muted); font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.tu-railhide:hover { color: var(--tu-a); }
.tu-railtab {
    position: fixed; right: 0; top: 38%; z-index: 1015; align-items: center; gap: 8px; padding: 12px 12px 12px 14px; border: 1px solid var(--tu-line); border-right: 0; border-radius: 16px 0 0 16px;
    background: var(--tu-card); color: var(--tu-a); font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer; box-shadow: var(--tu-shadow-hover); transition: padding .2s, background .2s;
}
.tu-railtab:hover { padding-right: 20px; background: var(--tu-soft); }
.tu[data-focus="on"] .tu-shell-wrap { width: min(100% - 32px, 1080px); }
.tu[data-focus="on"] .tu-shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }
.tu[data-focus="on"] :is(.tu-nav, .tu-rail) { display: none; }
.tu[data-focus="on"] .tu-intro { grid-template-columns: minmax(0, 1fr); }
.tu-nav { grid-area: nav; transition: opacity .2s, visibility .2s; }
.tu-main { grid-area: main; min-width: 0; }
.tu-rail { grid-area: rail; min-width: 0; }

/* lesson list */
.tu-nav__in {
    position: sticky; top: calc(var(--tu-top) + 14px);
    display: flex; flex-direction: column; max-height: calc(100dvh - var(--tu-top) - 28px);
    background: var(--tu-card); border: 1px solid var(--tu-line); border-radius: var(--tu-r); box-shadow: var(--tu-shadow); overflow: hidden;
}
.tu-nav__top { padding: 14px 14px 12px; border-bottom: 1px solid var(--tu-line); }
.tu-nav__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tu-nav__t { flex: 1; min-width: 0; }
.tu-nav__h { font-size: .95rem; font-weight: 800; color: var(--tu-ink); letter-spacing: -.01em; }
.tu-nav__sub { margin-top: 2px; font-size: .75rem; color: var(--tu-muted); font-weight: 600; }
.tu-iconbtn {
    display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 10px;
    background: transparent; color: var(--tu-muted); cursor: pointer; font-size: 1rem; transition: background .2s, color .2s;
}
.tu-iconbtn:hover { background: var(--tu-soft); color: var(--tu-a); }
.tu-meter { height: 5px; margin-top: 10px; border-radius: 99px; background: var(--tu-soft); overflow: hidden; }
.tu-meter i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--tu-grad); }
.tu-find { position: relative; display: block; margin-top: 10px; }
.tu-find i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--tu-muted); font-size: .85rem; pointer-events: none; }
.tu-find input {
    width: 100%; height: 36px; padding: 0 12px 0 32px; border: 1px solid var(--tu-line); border-radius: 999px;
    background: var(--tu-surface); color: var(--tu-ink); font: inherit; font-size: .84rem;
}
.tu-find input::placeholder { color: var(--tu-muted); }
.tu-find input:focus { outline: none; border-color: var(--tu-a); box-shadow: 0 0 0 3px var(--tu-soft); }

.tu-nav__list { overflow-y: auto; overscroll-behavior: contain; padding: 8px; scrollbar-width: thin; scrollbar-color: var(--tu-line) transparent; }
.tu-grp + .tu-grp { margin-top: 2px; }
.tu-grp > summary {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-radius: 10px;
    font-size: .8rem; font-weight: 800; color: var(--tu-ink); cursor: pointer; list-style: none; letter-spacing: .005em;
}
.tu-grp > summary::-webkit-details-marker { display: none; }
.tu-grp > summary:hover { background: var(--tu-soft); }
.tu-grp > summary small { flex: none; font-size: .7rem; font-weight: 700; color: var(--tu-muted); }
.tu-grp > summary::after { content: "\F282"; font-family: bootstrap-icons; font-size: .7rem; color: var(--tu-muted); transition: transform .2s; }
.tu-grp[open] > summary::after { transform: rotate(180deg); }
.tu-grp > summary span { flex: 1; min-width: 0; }
.tu-lessons { position: relative; max-height: min(40dvh, 340px); padding: 2px 4px 6px 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--tu-line) transparent; }
.tu-lessons.has-more:not(.is-end) { -webkit-mask-image: linear-gradient(#000 calc(100% - 34px), transparent); mask-image: linear-gradient(#000 calc(100% - 34px), transparent); }
.tu-grp[open] > summary { position: sticky; top: 0; z-index: 1; background: var(--tu-card); }
.tu-grp > summary small { padding: 2px 8px; border-radius: 99px; background: var(--tu-soft); color: var(--tu-a); }
.tu-lesson {
    position: relative; display: block; padding: 8px 10px 8px 22px; border-radius: 10px; color: var(--tu-body);
    font-size: .84rem; line-height: 1.38; font-weight: 500; transition: background .15s, color .15s;
}
.tu-lesson::before { content: ""; position: absolute; left: 10px; top: 14px; width: 6px; height: 6px; border-radius: 50%; background: var(--tu-line); }
.tu-lesson:hover { background: var(--tu-soft); color: var(--tu-ink); }
.tu-lesson[aria-current="page"] { background: var(--tu-soft); color: var(--tu-a); font-weight: 700; }
.tu-lesson[aria-current="page"]::before { background: var(--tu-grad); box-shadow: 0 0 0 3px var(--tu-soft); }
.tu-lesson small { display: block; margin-top: 1px; font-size: .7rem; font-weight: 600; color: var(--tu-muted); }
.tu-lesson[hidden], .tu-grp[hidden] { display: none; }
.tu-nav__none { padding: 18px 12px; text-align: center; font-size: .82rem; color: var(--tu-muted); }

.tu-nav [data-tu-sheet-close] { display: none; }
.tu-tools { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; }
.tu-tools .tu-iconbtn[data-tu-size] { font-size: .78rem; font-weight: 800; }
.tu-crumb .active { color: var(--tu-ink); font-weight: 700; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* small bar above the article on tablets and phones: lessons, text size */
.tu-bar { display: none; }

/* ---------- article ---------- */
.tu-toprow { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.tu-openbtn { display: none; flex: none; }
.tu[data-nav="closed"] .tu-openbtn { display: inline-flex; }
.tu-toprow .tu-crumb { margin: 0; min-width: 0; }
.tu-crumb { margin-bottom: 14px; font-size: .8rem; color: var(--tu-muted); }
.tu-crumb :is(ol, ul) { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; padding: 0; list-style: none; }
.tu-crumb li { display: inline-flex; align-items: center; gap: 6px; }
.tu-crumb li + li::before { content: "/"; opacity: .5; }
.tu-crumb a { color: var(--tu-muted); font-weight: 600; }
.tu-crumb a:hover { color: var(--tu-a); }
.tu-crumb :is(.breadcrumb, .breadcrumb-item) { margin: 0; padding: 0; background: none; }
.tu-crumb .breadcrumb-item + .breadcrumb-item { padding-left: 0; }
.tu-crumb .breadcrumb-item + .breadcrumb-item::before { content: "/"; padding-right: 0; float: none; color: inherit; opacity: .5; }

.tu-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 28px; align-items: center; margin-bottom: 26px; }
.tu-intro .tu-head { margin: 0; }
.tu-intro .tu-hero { margin: 0; }
.tu-head { margin-bottom: 22px; }
.tu-title { margin: 0; font-size: clamp(1.75rem, 3.4vw, 2.6rem); line-height: 1.12; font-weight: 800; letter-spacing: -.028em; color: var(--tu-ink); text-wrap: balance; }
.tu-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tu-by { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; }
.tu-by a { display: inline-flex; align-items: center; gap: 9px; color: var(--tu-ink); font-size: .88rem; font-weight: 700; }
.tu-by a:hover { color: var(--tu-a); }
.tu-av { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--tu-soft); box-shadow: 0 0 0 2px var(--tu-bg), 0 0 0 3px var(--tu-line); }
.tu-by small { display: block; font-size: .72rem; font-weight: 600; color: var(--tu-muted); }

.tu-hero { margin: 0 0 24px; overflow: hidden; border-radius: 20px; border: 1px solid var(--tu-line); background: var(--tu-surface); box-shadow: var(--tu-shadow); }
.tu-hero img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

/* the lesson body: the HTML from the editor, restyled */
.tu-prose { font-size: var(--tu-fs); line-height: 1.78; color: var(--tu-body); max-width: none; overflow-wrap: anywhere; }
.tu-prose :is(p, ul, ol, blockquote, h1, h2, h3, h4, h5, h6) { max-width: 112ch; }
.tu-prose > div > :first-child { margin-top: 0; }
.tu-prose :is(h1, h2, h3, h4, h5, h6) { color: var(--tu-ink); font-weight: 800; letter-spacing: -.02em; line-height: 1.25; text-align: left; scroll-margin-top: calc(var(--tu-top) + 78px); padding: 0; }
.tu-prose h1 { font-size: 2rem; margin: 1.6em 0 .5em; }
.tu-prose h2 { font-size: 1.65rem; margin: 1.9em 0 .55em; padding-bottom: .35em; border-bottom: 1px solid var(--tu-line); }
.tu-prose h3 { font-size: 1.32rem; margin: 1.6em 0 .45em; color: var(--tu-ink); }
.tu-prose h4 { font-size: 1.12rem; margin: 1.4em 0 .4em; }
.tu-prose :is(h5, h6) { font-size: 1rem; margin: 1.3em 0 .4em; }
.tu-prose p, .tu-prose div { text-align: left; word-spacing: normal; }
.tu-prose p { margin: 0 0 1.1em; padding: 0; }
.tu-prose a { color: var(--tu-a); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--tu-a) 35%, transparent); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.tu-prose a:hover { text-decoration-color: currentColor; }
.tu-prose :is(ul, ol) { margin: 0 0 1.2em; padding-left: 1.4em; }
.tu-prose li { margin: .35em 0; padding-left: .2em; }
.tu-prose li::marker { color: var(--tu-a); font-weight: 700; }
.tu-prose strong { color: var(--tu-ink); }
.tu-prose img { display: block; max-width: 100%; height: auto; margin: 1.4em auto; border-radius: 14px; border: 1px solid var(--tu-line); box-shadow: none; }
.tu-prose p > img:only-child { margin-block: .4em; }
.tu-prose blockquote { margin: 1.4em 0; padding: 14px 18px; border-left: 4px solid var(--tu-a); border-radius: 0 14px 14px 0; background: var(--tu-soft); color: var(--tu-ink); }
.tu-prose blockquote p:last-child { margin: 0; }
.tu-prose :not(pre) > code { padding: .15em .45em; border-radius: 7px; background: var(--tu-soft); color: var(--tu-a); font-size: .88em; font-weight: 600; }
/* code: one dark block in both themes, with its own token colours */
.tu-prose pre { position: relative; margin: 1.4em 0; padding: 16px 18px; border-radius: 14px; overflow-x: auto; max-width: 100%; background: var(--tu-code); border: 1px solid rgba(110, 190, 230, .18); text-align: left; }
.tu-prose pre code, .tu-prose pre code.hljs { display: block; padding: 0 !important; background: transparent !important; color: #d6e2f0 !important; font: .88rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; overflow: visible; }
.tu-prose pre :is(.hljs-comment, .hljs-quote) { color: #7f93ab; font-style: italic; }
.tu-prose pre :is(.hljs-keyword, .hljs-selector-tag, .hljs-attr, .hljs-attribute, .hljs-name, .hljs-doctag, .hljs-tag) { color: #7dd3fc; }
.tu-prose pre :is(.hljs-string, .hljs-number, .hljs-literal, .hljs-addition, .hljs-template-tag) { color: #86efac; }
.tu-prose pre :is(.hljs-title, .hljs-section, .hljs-built_in, .hljs-type, .hljs-class, .hljs-function) { color: #fcd34d; }
.tu-prose pre :is(.hljs-variable, .hljs-symbol, .hljs-meta, .hljs-regexp, .hljs-link, .hljs-operator, .hljs-bullet, .hljs-deletion) { color: #f9a8d4; }
.tu-prose .table-responsive, .tu-prose table { max-width: 100%; }
.tu-prose table { display: block; overflow-x: auto; width: 100%; margin: 1.4em 0; border-collapse: separate; border-spacing: 0; border: 1px solid var(--tu-line); border-radius: 14px; font-size: .92em; }
.tu-prose :is(th, td) { padding: 10px 14px; border-bottom: 1px solid var(--tu-line); text-align: left; vertical-align: top; }
.tu-prose th { background: var(--tu-soft); color: var(--tu-ink); font-weight: 700; white-space: nowrap; }
.tu-prose tr:last-child td { border-bottom: 0; }
.tu-prose iframe, .tu-prose video { display: block; max-width: 100%; border: 0; border-radius: 14px; }
.tu-prose iframe[src*="youtube"], .tu-prose iframe[src*="youtu.be"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.tu-prose hr { margin: 2em 0; border: 0; border-top: 1px solid var(--tu-line); opacity: 1; }
.tu-prose .video-container { padding: 0; }
.tu-prose .video-container iframe { width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; border: 0; }
.tu-prose .number { background: var(--tu-grad); color: #fff; }

/* in-article ads: quiet, rounded, clearly separate from the lesson */
.tu-prose .centerAd { margin: 1.6em 0; padding: 0; }
.tu-prose .centerAd img { margin: 0 auto; border: 1px solid var(--tu-line); border-radius: 14px; box-shadow: none; }

/* contents list, built from the headings (script) */
.tu-toc { padding: 16px; background: var(--tu-card); border: 1px solid var(--tu-line); border-radius: var(--tu-r); }
.tu-toc__h { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--tu-muted); }
.tu-toc ol { margin: 0; padding: 0; list-style: none; max-height: 40dvh; overflow-y: auto; scrollbar-width: thin; }
.tu-toc a { display: block; padding: 6px 10px; border-left: 2px solid var(--tu-line); color: var(--tu-body); font-size: .84rem; line-height: 1.4; font-weight: 500; transition: color .15s, border-color .15s, background .15s; }
.tu-toc a:hover { color: var(--tu-ink); }
.tu-toc a.is-on { color: var(--tu-a); border-left-color: var(--tu-a); background: linear-gradient(90deg, var(--tu-soft), transparent); font-weight: 700; }
.tu-toc li.is-sub a { padding-left: 22px; font-size: .8rem; }
.tu-toc[hidden] { display: none; }
.tu-toc-m { display: none; margin: 0 0 22px; border: 1px solid var(--tu-line); border-radius: 14px; background: var(--tu-surface); }
.tu-toc-m > summary { padding: 12px 14px; font-size: .86rem; font-weight: 800; color: var(--tu-ink); cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.tu-toc-m > summary::-webkit-details-marker { display: none; }
.tu-toc-m > summary::after { content: "\F282"; font-family: bootstrap-icons; font-size: .75rem; color: var(--tu-muted); transition: transform .2s; }
.tu-toc-m[open] > summary::after { transform: rotate(180deg); }
.tu-toc-m ol { margin: 0; padding: 0 8px 10px; list-style: none; }
.tu-toc-m a { display: block; padding: 7px 10px; border-radius: 9px; color: var(--tu-body); font-size: .86rem; }
.tu-toc-m a:hover { background: var(--tu-soft); }
.tu-toc-m li.is-sub a { padding-left: 24px; }

/* ---------- blocks under the lesson ---------- */
.tu-block { margin-top: 36px; }
.tu-h2 { margin: 0 0 16px; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; color: var(--tu-ink); }

.tu-faq { border: 1px solid var(--tu-line); border-radius: 14px; background: var(--tu-card); overflow: hidden; }
.tu-faq + .tu-faq { margin-top: 10px; }
.tu-faq > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; font-size: .96rem; font-weight: 700; color: var(--tu-ink); cursor: pointer; list-style: none; }
.tu-faq > summary::-webkit-details-marker { display: none; }
.tu-faq > summary::after { content: "\F4FE"; flex: none; font-family: bootstrap-icons; color: var(--tu-a); font-size: 1.05rem; transition: transform .25s; }
.tu-faq[open] > summary::after { transform: rotate(45deg); }
.tu-faq[open] > summary { border-bottom: 1px solid var(--tu-line); }
.tu-faq__a { padding: 14px 16px 16px; font-size: .95rem; line-height: 1.7; }
.tu-faq__a > :last-child { margin-bottom: 0; }
.tu-faq__a img { height: auto; border-radius: 10px; }

.tu-card {
    display: flex; align-items: center; gap: 16px; padding: 18px; border: 1px solid var(--tu-line); border-radius: var(--tu-r);
    background: var(--tu-card); box-shadow: var(--tu-shadow);
}
.tu-card--tint { background: linear-gradient(135deg, var(--tu-soft), transparent 70%), var(--tu-card); }
.tu-card__ic { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--tu-grad); color: #fff; font-size: 1.4rem; }
.tu-card__t { flex: 1; min-width: 0; }
.tu-card__t b { display: block; font-size: 1rem; font-weight: 800; color: var(--tu-ink); letter-spacing: -.01em; }
.tu-card__t p { margin: 3px 0 0; font-size: .88rem; line-height: 1.5; color: var(--tu-body); }

.tu-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 0; border-block: 1px solid var(--tu-line); }
.tu-share b { font-size: .86rem; font-weight: 800; color: var(--tu-ink); margin-right: 4px; }
.tu-share a, .tu-share button {
    display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--tu-line); border-radius: 50%;
    background: var(--tu-card); color: var(--tu-ink); font-size: 1rem; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.tu-share a:hover, .tu-share button:hover { background: var(--tu-grad); color: #fff; border-color: transparent; transform: translateY(-2px); }

/* previous and next lesson: two clear buttons, the next one filled */
.tu-pn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 32px; }
.tu-pn a {
    position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 92px; padding: 18px 22px; border-radius: 18px;
    transition: transform .2s cubic-bezier(.2, .7, .2, 1), box-shadow .25s, filter .2s;
}
.tu-pn a:active { transform: scale(.985); }
.tu-pn small { display: flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.tu-pn small i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .85rem; letter-spacing: 0; transition: transform .2s; }
.tu-pn span { font-size: 1rem; font-weight: 700; line-height: 1.35; }
/* previous: outlined with the accent */
.tu-pn a[rel="prev"] { background: var(--tu-card); border: 2px solid color-mix(in srgb, var(--tu-a) 55%, transparent); box-shadow: var(--tu-shadow); }
.tu-pn a[rel="prev"] small { color: var(--tu-a); }
.tu-pn a[rel="prev"] small i { background: var(--tu-soft); }
.tu-pn a[rel="prev"] span { color: var(--tu-ink); }
.tu-pn a[rel="prev"]:hover { background: var(--tu-soft); transform: translateY(-2px); box-shadow: var(--tu-shadow-hover); }
.tu-pn a[rel="prev"]:hover small i { transform: translateX(-3px); }
/* next: solid gradient, white text */
.tu-pn a[rel="next"] { background: var(--tu-grad); border: 2px solid transparent; box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 18px 30px -18px rgba(8, 145, 178, .9); text-align: right; }
.tu-pn a[rel="next"] small { justify-content: flex-end; color: rgba(255, 255, 255, .85); }
.tu-pn a[rel="next"] small i { background: rgba(255, 255, 255, .22); color: #fff; }
.tu-pn a[rel="next"] span { color: #fff; }
.tu-pn a[rel="next"]:hover { transform: translateY(-2px); filter: saturate(1.08) brightness(1.05); }
.tu-pn a[rel="next"]:hover small i { transform: translateX(3px); }
.tu-pn .is-none { visibility: hidden; }

/* author */
.tu-authors { display: grid; gap: 14px; }
.tu-author { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; padding: 20px; border: 1px solid var(--tu-line); border-radius: var(--tu-r); background: var(--tu-card); box-shadow: var(--tu-shadow); }
.tu-author__img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--tu-soft); box-shadow: 0 0 0 3px var(--tu-bg), 0 0 0 4px var(--tu-line); }
.tu-author__name { margin: 0; font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; color: var(--tu-ink); }
.tu-author__role { margin: 2px 0 0; font-size: .85rem; font-weight: 600; color: var(--tu-a); }
.tu-author__bio { margin: 10px 0 0; font-size: .92rem; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tu-author__bio * { margin: 0; display: inline; font-size: inherit !important; color: inherit !important; text-align: left; }
.tu-author__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.tu-soc { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--tu-soft); color: var(--tu-a); font-size: .95rem; transition: background .2s, color .2s; }
.tu-soc:hover { background: var(--tu-grad); color: #fff; }

/* related lessons */
.tu-sim { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.tu-sim a { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%; padding: 14px 16px; border: 1px solid var(--tu-line); border-radius: 14px; background: var(--tu-card); color: var(--tu-ink); font-size: .92rem; font-weight: 600; line-height: 1.4; transition: border-color .2s, transform .25s, box-shadow .25s; }
.tu-sim a:hover { border-color: color-mix(in srgb, var(--tu-a) 50%, transparent); transform: translateY(-2px); box-shadow: var(--tu-shadow-hover); }
.tu-sim i { flex: none; color: var(--tu-a); }

/* courses under the lesson */
.tu-crs { display: grid; gap: 10px; }
.tu-crs a { min-width: 0; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--tu-line); border-radius: 14px; background: var(--tu-card); transition: border-color .2s, transform .25s, box-shadow .25s; }
.tu-crs a:hover { border-color: color-mix(in srgb, var(--tu-a) 50%, transparent); transform: translateY(-2px); box-shadow: var(--tu-shadow-hover); }
.tu-crs__img { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--tu-soft); }
.tu-crs__img img { width: 38px; height: 38px; object-fit: contain; }
.tu-crs b { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .96rem; font-weight: 700; color: var(--tu-ink); }
.tu-crs a > span:nth-child(2) { min-width: 0; }
.tu-crs__d { display: -webkit-box; margin-top: 2px; font-size: .82rem; line-height: 1.45; color: var(--tu-muted); -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- right rail ---------- */
.tu-rail__in { position: sticky; top: calc(var(--tu-top) + 14px); display: grid; gap: 14px; max-height: calc(100dvh - var(--tu-top) - 28px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding-bottom: 2px; }
.tu-rail__in::-webkit-scrollbar { display: none; }
.tu-promo { padding: 16px; border: 1px solid var(--tu-line); border-radius: var(--tu-r); background: linear-gradient(160deg, var(--tu-soft), transparent 60%), var(--tu-card); }
.tu-promo__top { display: flex; align-items: center; gap: 12px; }
.tu-promo__img { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--tu-card); border: 1px solid var(--tu-line); }
.tu-promo__img img { width: 36px; height: 36px; object-fit: contain; }
.tu-promo small { display: block; font-size: .72rem; font-weight: 700; color: var(--tu-muted); }
.tu-promo b { display: block; margin-top: 1px; font-size: .98rem; font-weight: 800; line-height: 1.3; color: var(--tu-ink); letter-spacing: -.01em; }
.tu-promo__links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tu-promo__links a { padding: 5px 11px; border-radius: 999px; background: var(--tu-card); border: 1px solid var(--tu-line); color: var(--tu-ink); font-size: .76rem; font-weight: 600; transition: border-color .2s, color .2s; }
.tu-promo__links a:hover { border-color: var(--tu-a); color: var(--tu-a); }
.tu-promo .tu-btn { width: 100%; margin-top: 12px; }

#rightSideAd:empty { display: none; }
#rightSideAd img { display: block; width: 100%; height: auto; border-radius: var(--tu-r); border: 1px solid var(--tu-line); box-shadow: none; }

/* live class cards (right rail and the category page) */
.tu-live { padding: 16px; border: 1px solid var(--tu-line); border-radius: var(--tu-r); background: var(--tu-card); }
.tu-live__h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 4px; font-size: .98rem; font-weight: 800; letter-spacing: -.01em; color: var(--tu-ink); }
.tu-live__h span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--tu-ok) 13%, transparent); color: var(--tu-ok); font-size: .7rem; font-weight: 800; }
.tu-live__sub { margin: 0 0 8px; font-size: .8rem; color: var(--tu-muted); }
.tu-live__list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; max-height: 300px; overflow-y: auto; scrollbar-width: thin; }
.tu-live__item { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--tu-line); }
.tu-live__item:first-child { border-top: 0; }
.tu-live__img { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--tu-soft); }
.tu-live__img img { width: 28px; height: 28px; object-fit: contain; }
.tu-live__item b { display: block; font-size: .88rem; font-weight: 700; line-height: 1.35; color: var(--tu-ink); }
.tu-live__item p { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 3px 0 0; font-size: .76rem; font-weight: 600; color: var(--tu-muted); }
.tu-live__item p i { margin-right: 4px; color: var(--tu-a); }
.tu-live__item .tu-btn { margin-top: 8px; }
.tu-live--wide .tu-live__list { max-height: none; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 24px; }

/* ---------- masterclass dock: a quiet pill that opens a panel with the next class; never opens by itself ---------- */
.tu-dock { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 1020; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.tu-dock[hidden] { display: none; }
.tu-dock__pill {
    display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 18px 0 6px; border: 0; border-radius: 999px;
    background: var(--tu-card); color: var(--tu-ink); font: inherit; text-align: left; cursor: pointer;
    box-shadow: 0 0 0 1px var(--tu-line), 0 16px 32px -14px rgba(15, 23, 42, .4); transition: transform .2s, box-shadow .2s;
}
.tu-dock__pill:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--tu-a) 50%, transparent), 0 20px 36px -14px rgba(8, 145, 178, .5); }
.tu-dock__ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tu-grad); color: #fff; font-size: 1.05rem; }
.tu-dock__t { display: grid; line-height: 1.2; }
.tu-dock__t b { font-size: .86rem; font-weight: 800; letter-spacing: -.01em; }
.tu-dock__t small { font-size: .72rem; font-weight: 600; color: var(--tu-muted); }
.tu-dock__scrim { display: none; }
.tu-dock__panel {
    position: absolute; right: 0; bottom: 64px; width: min(392px, calc(100vw - 32px)); max-height: min(78dvh, 600px); display: flex; flex-direction: column;
    background: var(--tu-card); border: 1px solid var(--tu-line); border-radius: 22px; overflow: hidden;
    box-shadow: 0 34px 70px -22px rgba(15, 23, 42, .5);
    transform-origin: 100% 100%; transition: opacity .2s, transform .28s cubic-bezier(.2, .7, .2, 1);
}
.tu-dock__panel[hidden] { display: none; }
.tu-dock:not(.is-open) .tu-dock__panel { opacity: 0; transform: translateY(10px) scale(.97); }
.tu-dock__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 6px 18px; }
.tu-dock__head b { font-size: .98rem; font-weight: 800; letter-spacing: -.01em; color: var(--tu-ink); }
.tu-dock__body { overflow-y: auto; padding: 4px 12px 8px; scrollbar-width: thin; }
.tu-next { position: relative; display: grid; gap: 12px; margin-bottom: 8px; padding: 16px; border: 1px solid color-mix(in srgb, var(--tu-a) 28%, transparent); border-radius: 18px; background: linear-gradient(150deg, var(--tu-soft), transparent 70%), var(--tu-card); }
.tu-next__top { display: flex; align-items: center; gap: 12px; }
.tu-next .tu-date { width: 58px; padding: 8px 0; border-radius: 14px; }
.tu-next .tu-date b { font-size: 1.4rem; }
.tu-when { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--tu-ok) 14%, transparent); color: var(--tu-ok); font-size: .74rem; font-weight: 800; }
.tu-next small { display: block; margin-top: 6px; font-size: .78rem; font-weight: 600; color: var(--tu-muted); }
.tu-next h3 { margin: 0; font-size: 1.02rem; font-weight: 800; line-height: 1.35; letter-spacing: -.01em; color: var(--tu-ink); }
.tu-next .tu-btn { width: 100%; }
.tu-dock__sub { margin: 10px 6px 4px; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--tu-muted); }
.tu-dock__list { margin: 0; padding: 0; list-style: none; }
.tu-dock__ev { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 6px; border-radius: 14px; transition: background .15s; }
.tu-dock__ev:hover { background: var(--tu-soft); }
.tu-dock__ev .tu-date { width: 46px; padding: 5px 0; }
.tu-dock__tt b { display: -webkit-box; font-size: .84rem; font-weight: 700; line-height: 1.35; color: var(--tu-ink); -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tu-dock__ev small { display: block; margin-top: 1px; font-size: .72rem; font-weight: 600; color: var(--tu-muted); }
.tu-date { display: grid; place-items: center; padding: 6px 0; border-radius: 12px; background: var(--tu-card); border: 1px solid var(--tu-line); line-height: 1.1; }
.tu-date b { font-size: 1.05rem; font-weight: 800; color: var(--tu-ink); }
.tu-date span { font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--tu-a); }
.tu-dock__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px 14px; border-top: 1px solid var(--tu-line); }
.tu-dock__foot a { font-size: .84rem; font-weight: 700; color: var(--tu-a); }
@media (max-width: 991.98px) {
    .tu-dock { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (max-width: 575.98px) {
    .tu-dock__t small { display: none; }
    .tu-dock__pill { min-height: 48px; padding-right: 14px; }
    .tu-dock.is-open .tu-dock__scrim { display: block; position: fixed; inset: 0; z-index: -1; background: rgba(2, 8, 23, .5); }
    .tu-dock__panel { position: fixed; inset: auto 10px calc(144px + env(safe-area-inset-bottom)) 10px; width: auto; max-height: 72dvh; }
}

/* ---------- category page (tutorial home of one technology) ---------- */
.tu-cat-hero { position: relative; padding: clamp(28px, 5vw, 56px) 0; background: radial-gradient(60% 90% at 85% 0%, rgba(8, 145, 178, .13), transparent 70%), radial-gradient(50% 80% at 0% 100%, rgba(37, 99, 235, .09), transparent 70%), var(--tu-surface); border-bottom: 1px solid var(--tu-line); }
.tu-cat-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 36px; align-items: center; }
.tu-cat-hero h1 { margin: 12px 0 0; font-size: clamp(1.9rem, 4.2vw, 3.2rem); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; color: var(--tu-ink); text-wrap: balance; }
.tu-grad { background: linear-gradient(100deg, var(--tu-a), var(--tu-b)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tu-cat-hero p { margin: 14px 0 0; max-width: 62ch; font-size: 1.05rem; line-height: 1.65; color: var(--tu-body); }
.tu-cat-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tu-cat-hero__img { display: grid; place-items: center; aspect-ratio: 1; width: min(100%, 260px); margin-inline: auto; padding: 36px; border-radius: 36px; background: var(--tu-card); border: 1px solid var(--tu-line); box-shadow: var(--tu-shadow-hover); }
.tu-cat-hero__img img { width: 100%; height: 100%; object-fit: contain; }
.tu-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.tu-cat-hero .tu-wrap, .tu-cat.tu-wrap { width: min(100% - 32px, 1240px); }
.tu-cat { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; padding-block: 28px 56px; }
.tu-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.tu-tab { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--tu-line); border-radius: 999px; background: var(--tu-card); color: var(--tu-ink); font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
a.tu-tab:hover { border-color: var(--tu-a); color: var(--tu-a); }
.tu-tab.is-on { background: var(--tu-grad); border-color: transparent; color: #fff; }
.tu-tab i { font-size: 1rem; }

.tu-unit { border: 1px solid var(--tu-line); border-radius: var(--tu-r); background: var(--tu-card); overflow: hidden; }
.tu-unit + .tu-unit { margin-top: 12px; }
.tu-unit > summary { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; list-style: none; }
.tu-unit > summary::-webkit-details-marker { display: none; }
.tu-unit__n { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--tu-soft); color: var(--tu-a); font-size: .9rem; font-weight: 800; }
.tu-unit__t { flex: 1; min-width: 0; }
.tu-unit__t b { display: block; font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; color: var(--tu-ink); }
.tu-unit__t small { display: block; margin-top: 2px; font-size: .82rem; color: var(--tu-muted); font-weight: 500; line-height: 1.45; }
.tu-unit__m { flex: none; display: flex; gap: 6px; }
.tu-unit > summary::after { content: "\F282"; flex: none; font-family: bootstrap-icons; font-size: .8rem; color: var(--tu-muted); transition: transform .2s; }
.tu-unit[open] > summary::after { transform: rotate(180deg); }
.tu-unit[open] > summary { border-bottom: 1px solid var(--tu-line); }
.tu-rows { margin: 0; padding: 6px 10px 10px; list-style: none; }
.tu-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 12px; color: var(--tu-ink); transition: background .15s; }
.tu-row:hover { background: var(--tu-soft); }
.tu-row__ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--tu-soft); color: var(--tu-a); font-size: .95rem; }
.tu-row b { display: block; font-size: .94rem; font-weight: 700; line-height: 1.4; }
.tu-row small { display: block; margin-top: 1px; font-size: .76rem; font-weight: 600; color: var(--tu-muted); }
.tu-row__go { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--tu-a); }
.tu-row__go i { transition: transform .2s; }
.tu-row:hover .tu-row__go i { transform: translateX(3px); }
.tu-cat__side { position: sticky; top: calc(var(--tu-top) + 14px); display: grid; gap: 14px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1279.98px) {
    .tu-intro { grid-template-columns: minmax(0, 1fr); }
    .tu-shell, .tu[data-nav="closed"] .tu-shell { grid-template-columns: var(--nav) minmax(0, 1fr); grid-template-areas: "nav main" ". rail"; --nav: 294px; }
    .tu[data-nav="closed"] .tu-shell { --nav: 0px; }
    .tu-rail { margin-left: 0; margin-top: 24px; }
    .tu-railhide { display: none; }
    .tu-rail__in { position: static; max-height: none; overflow: visible; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .tu-rail .tu-toc { display: none; }
    .tu-toc-m.has-items { display: block; }
    .tu-cat { grid-template-columns: minmax(0, 1fr); }
    .tu-cat__side { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 991.98px) {
    .tu-shell, .tu[data-nav="closed"] .tu-shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "rail"; padding-top: 0; }
    .tu-nav { margin-right: 0; }
    /* lessons become a sheet that slides in from the left */
    .tu-nav, .tu[data-nav="closed"] .tu-nav { position: fixed; inset: 0; z-index: 1045; visibility: hidden; opacity: 1; pointer-events: none; }
    .tu-nav::before { content: ""; position: absolute; inset: 0; background: rgba(2, 8, 23, .5); opacity: 0; transition: opacity .25s; }
    .tu-nav__in { position: absolute; inset: 0 auto 0 0; width: min(88vw, 340px); max-height: none; border-radius: 0 20px 20px 0; transform: translateX(-102%); transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
    .tu.is-sheet .tu-nav { visibility: visible; pointer-events: auto; }
    .tu.is-sheet .tu-nav::before { opacity: 1; }
    .tu.is-sheet .tu-nav__in { transform: none; }
    .tu-nav [data-tu-fold] { display: none; }
    .tu-nav [data-tu-sheet-close] { display: grid; }
    .tu-tools { display: none; }
    .tu-bar {
        position: sticky; top: var(--tu-top); z-index: 1010; display: flex; align-items: center; gap: 8px; padding: 8px 0; margin-bottom: 10px;
        background: color-mix(in srgb, var(--tu-bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--tu-line);
    }
    .tu-bar .tu-btn { flex: none; }
    .tu-bar__now { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; font-weight: 700; color: var(--tu-muted); }
    .tu-cat-hero__grid { grid-template-columns: minmax(0, 1fr); }
    .tu-cat-hero__img { display: none; }
}
@media (max-width: 767.98px) {
    .tu-prose { font-size: min(var(--tu-fs), 1.0625rem); line-height: 1.7; }
    .tu-prose h2 { font-size: 1.4rem; }
    .tu-prose h3 { font-size: 1.18rem; }
    .tu-pn, .tu-sim { grid-template-columns: minmax(0, 1fr); }
    .tu-pn a { min-height: 76px; padding: 14px 18px; }
    .tu-pn .is-none { display: none; }
    .tu-author { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 16px; }
    .tu-author__img { width: 64px; height: 64px; }
    .tu-card { flex-wrap: wrap; }
    .tu-card .tu-btn { width: 100%; }
    .tu-crs a { grid-template-columns: 48px minmax(0, 1fr); }
    .tu-crs a .tu-btn { grid-column: 1 / -1; }
    .tu-crs__img { width: 48px; height: 48px; }
    .tu-unit__m { display: none; }
    .tu-row { grid-template-columns: 34px minmax(0, 1fr); }
    .tu-row__go { display: none; }
}
@media (max-width: 575.98px) {
    .tu-wrap { width: min(100% - 24px, 1400px); }
    .tu-crumb :is(ol, ul) { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
    .tu-crumb .active { max-width: 22ch; flex: none; }
    .tu-hero { border-radius: 14px; margin-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .tu *, .tu *::before, .tu *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
    .tu-progress { display: none; }
}
@media print {
    .tu-nav, .tu-rail, .tu-bar, .tu-dock, .tu-progress, .tu-share, .tu-pn { display: none !important; }
    .tu-shell { display: block; }
}
