/* assets/home-tour.css — "What do you need today?" on the Classic homepage (includes/home_tour.php), new small look 11 Nov 2026.
   Owner: "too big and dull — make it enjoyable and easy to work with". So: one line of heading, the ten problems as chips
   (one sliding line on phones), the teacher's one line of advice, three or four small cards with "how much", and one
   button to the tour page (/tour). The problems take turns by themselves until the visitor touches the block.
   Each chip and each card has its own colour (--c). Dark mode = the rules that start with "html.dark". */
.ht { position: relative; margin: 0; padding: 20px 22px 18px; border-radius: 26px; background: var(--card, #fff); border: 1px solid var(--line, #e7e4f5); overflow: hidden; }
.ht-head { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.ht-kick { display: inline-flex; align-items: center; gap: 8px; font: 700 12px/1 Inter, system-ui, sans-serif; letter-spacing: .05em; text-transform: uppercase; color: #0b7a55; order: 2; }
html.dark .ht-kick { color: #6ee7b7; }
.ht-cross { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: #0f9d6e; color: #fff; font: 800 16px/1 Inter, system-ui, sans-serif; }
.ht h2 { margin: 0; font: 800 clamp(21px, 2.8vw, 27px)/1.15 "Bricolage Grotesque", Inter, system-ui, sans-serif; letter-spacing: -.02em; color: var(--ink, #12102e); order: 1; }

/* the problems */
.ht-probs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ht-prob { --c: #6d4ee0; position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px 0 6px; border-radius: 999px; border: 1.5px solid var(--line, #e7e4f5); background: var(--card, #fff);
  color: var(--ink, #12102e); font: 650 13.5px/1.15 Inter, system-ui, sans-serif; white-space: nowrap; cursor: pointer; overflow: hidden; transition: transform .18s, border-color .18s, background .18s, color .18s, box-shadow .18s; -webkit-tap-highlight-color: transparent; }
.ht-prob i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); transition: background .18s, color .18s, transform .3s; }
.ht-prob:hover { border-color: var(--c); transform: translateY(-2px); }
.ht-prob:active { transform: scale(.96); }
.ht-prob.on { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 12px 20px -14px var(--c); }
/* o8i (25 Nov 2026): the chosen chip is a little darker, so its white words are easy to read (contrast 4.7:1 or more; old phones keep the line above) */
.ht-prob.on { background: color-mix(in srgb, var(--c) 75%, #000); border-color: color-mix(in srgb, var(--c) 75%, #000); }
.ht-prob.on i { background: rgba(255,255,255,.22); color: #fff; transform: rotate(-8deg) scale(1.06); }
.ht-prob em { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: rgba(255,255,255,.75); transform: scaleX(0); transform-origin: left center; }
[dir="rtl"] .ht-prob em { transform-origin: right center; }
.ht.auto .ht-prob.on em { animation: ht-fill 5s linear forwards; }
@keyframes ht-fill { to { transform: scaleX(1); } }
.ht-prob:focus-visible, .ht-items a:focus-visible, .ht-tour:focus-visible { outline: 3px solid #f0b429; outline-offset: 2px; }
html.dark .ht-prob i { background: color-mix(in srgb, var(--c) 26%, transparent); color: color-mix(in srgb, var(--c) 55%, #fff); }
html.dark .ht-prob.on i { background: rgba(255,255,255,.22); color: #fff; }

/* the answer: one line from the teacher + the things to use */
.ht-stage { margin-top: 12px; }
.ht-rx[hidden] { display: none; }
.ht-advice { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 600 14.5px/1.4 Inter, system-ui, sans-serif; color: var(--body, #45436a); }
.ht-advice img { flex: none; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--pc, #0f9d6e); }
.ht-advice span { position: relative; padding: 7px 12px; border-radius: 4px 14px 14px 14px; background: color-mix(in srgb, var(--pc, #0f9d6e) 10%, transparent); color: var(--ink, #12102e); }
[dir="rtl"] .ht-advice span { border-radius: 14px 4px 14px 14px; }
.ht-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--k, 3), minmax(0, 1fr)); gap: 10px; }
.ht-items a { --c: #6d4ee0; position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr auto; gap: 2px 11px; height: 100%; padding: 12px 13px 12px; border-radius: 16px; text-decoration: none;
  background: var(--card, #fff); border: 1.5px solid color-mix(in srgb, var(--c) 26%, var(--line, #e7e4f5)); color: var(--ink, #12102e); overflow: hidden; transition: transform .2s cubic-bezier(.2,.8,.2,1), border-color .2s, box-shadow .2s; }
.ht-items a::before { content: ""; position: absolute; right: -34px; top: -34px; width: 96px; height: 96px; border-radius: 50%; background: color-mix(in srgb, var(--c) 9%, transparent); transition: transform .35s; pointer-events: none; }
.ht-items a:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 16px 24px -18px var(--c); }
.ht-items a:hover::before { transform: scale(1.6); }
.ht-it-n { position: absolute; right: 11px; top: 8px; font: 400 22px/1 Anton, Impact, sans-serif; color: color-mix(in srgb, var(--c) 34%, transparent); }
[dir="rtl"] .ht-it-n { right: auto; left: 11px; }
.ht-it-ic { grid-row: 1 / span 2; align-self: start; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--c); color: #fff; box-shadow: 0 8px 14px -8px var(--c); }
.ht-it-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-inline-end: 22px; }
.ht-it-t b { font: 800 14.5px/1.2 Inter, system-ui, sans-serif; }
.ht-it-t small { font-size: 12.3px; line-height: 1.35; color: var(--mute, #6b6890); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ht-dose { grid-column: 2; justify-self: start; margin-top: 7px; padding: 4px 10px; border-radius: 999px; font: 800 11.5px/1.2 Inter, system-ui, sans-serif; background: color-mix(in srgb, var(--c) 12%, transparent); color: color-mix(in srgb, var(--c) 78%, #000); border: 1px dashed color-mix(in srgb, var(--c) 50%, transparent); }
html.dark .ht-dose { color: color-mix(in srgb, var(--c) 45%, #fff); }
html.dark .ht-it-t small { color: #a9a6c7; }
/* the cards come in one after another each time a problem opens */
.ht-rx:not([hidden]) .ht-advice { animation: ht-in .4s cubic-bezier(.2,.8,.2,1) both; }
.ht-rx:not([hidden]) .ht-items li { animation: ht-card .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * .07s + .06s); }
@keyframes ht-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes ht-card { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

/* the button to the tour page: a strip with the icons of every part of the site running along it */
.ht-tour { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 9px 12px 9px 9px; border-radius: 18px; text-decoration: none; overflow: hidden; color: #fff;
  background: linear-gradient(110deg, #1b1642, #2b1f6b 55%, #4a2a8f); box-shadow: 0 16px 26px -20px #2b1f6b; transition: transform .2s, box-shadow .2s; }
.ht-tour:hover { transform: translateY(-2px); box-shadow: 0 20px 30px -18px #2b1f6b; }
.ht-tour-play { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #ffd23f; color: #1b1642; box-shadow: 0 0 0 0 rgba(255,210,63,.6); }
.ht-tour-play svg { margin-left: 2px; }
.ht-tour-t { flex: none; max-width: 46%; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ht-tour-t b { font: 800 15px/1.2 Inter, system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 24 Nov 2026: the title and a small yellow "New · 10" tag in one row */
.ht-tour-r { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ht-tour-r b { min-width: 0; }
.ht-tour-nw { flex: none; padding: 3px 7px; border-radius: 999px; background: #ffd23f; color: #1b1642; font: 800 10px/1.1 Inter, system-ui, sans-serif; font-style: normal; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.ht-tour-t small { font-size: 12.3px; line-height: 1.3; color: #cfc8f5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-tour-run { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
.ht-tour-run > span { display: flex; gap: 8px; width: max-content; }
.ht-tour-run i { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--c); color: #fff; }
.ht-tour-go { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); transition: transform .2s, background .2s; }
.ht-tour:hover .ht-tour-go { transform: translateX(3px); background: rgba(255,255,255,.26); }
[dir="rtl"] .ht-tour-go svg { transform: scaleX(-1); }
@media (prefers-reduced-motion: no-preference) {
  html:not(.lk-lite) .ht-tour-run > span { animation: ht-run 64s linear infinite; }   /* 24 Nov 2026: 44 icons now (was 32 at 46s): the same speed */
  html:not(.lk-lite) .ht-tour-play { animation: ht-pulse 2.2s ease-out infinite; }
  html.lk-hidden .ht-tour-run > span, html.lk-hidden .ht-tour-play { animation-play-state: paused; }
}
@keyframes ht-run { to { transform: translateX(-50%); } }
[dir="rtl"] .ht-tour-run > span { animation-direction: reverse; }
@keyframes ht-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,210,63,.55); } 70%, 100% { box-shadow: 0 0 0 12px rgba(255,210,63,0); } }

@media (max-width: 900px) { .ht-items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .ht { padding: 16px 14px 14px; border-radius: 22px; }
  .ht-probs { flex-wrap: nowrap; overflow-x: auto; margin: 12px -14px 0; padding: 2px 14px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .ht-probs::-webkit-scrollbar { display: none; }
  .ht-prob { flex: none; }
  .ht-items { grid-template-columns: 1fr; gap: 8px; }
  .ht-items a { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto; align-items: center; padding: 10px 12px; }
  .ht-it-ic { grid-row: auto; align-self: center; }
  .ht-it-n { display: none; }
  .ht-it-t { padding-inline-end: 0; }
  .ht-it-t small { -webkit-line-clamp: 1; }
  .ht-dose { grid-column: 3; margin-top: 0; max-width: 112px; text-align: center; }
  .ht-advice { font-size: 13.5px; }
  .ht-tour-t { max-width: none; flex: 1; }
  .ht-tour-t b { white-space: normal; font-size: 14.5px; }
  .ht-tour-t small { display: none; }
  .ht-tour-run { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ht-rx .ht-advice, .ht-rx .ht-items li, .ht-prob em { animation: none !important; } .ht-prob, .ht-items a, .ht-tour { transition: none; } }
html.lk-lite .ht-rx .ht-advice, html.lk-lite .ht-rx .ht-items li { animation: none !important; }
