/* The home page's "What's new" cards and live demos (static/js/home-demos.js). */
.new-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.new-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px; }
.new-card b { font-family: Fredoka, Nunito, sans-serif; font-size: 18px; line-height: 1.25; color: rgb(var(--c-ink)); }
.new-card span { font-size: 14px; color: rgb(var(--c-slate-500)); }
.new-card .new-ico { font-size: 30px; line-height: 1; }
.new-badge { position: absolute; top: 14px; right: 14px; padding: 2px 9px; border-radius: 999px; font-size: 11px !important; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: #fff !important; background: linear-gradient(90deg, #0d9488, #6366f1); }
.new-go { margin-top: auto; padding-top: 6px; font-weight: 600; color: rgb(var(--c-accent-2, 13 148 136)) !important; }

.demo-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.demo-card { margin: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.demo-card canvas { display: block; width: 100%; height: auto; cursor: pointer; border-bottom: 1px solid rgb(var(--c-line)); }
.demo-card figcaption { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; font-size: 14px; color: rgb(var(--c-slate-500)); flex: 1; }
.demo-card figcaption b { font-size: 16px; color: rgb(var(--c-ink)); }
.demo-code { margin: 2px 0; padding: 10px 12px; border-radius: 10px; background: #0f172a; color: #e2e8f0; font: 12.5px/1.55 "JetBrains Mono", ui-monospace, monospace; white-space: pre; overflow-x: auto; }
.demo-btn { align-self: flex-start; padding: 6px 12px; border-radius: 10px; border: 1px solid rgb(var(--c-line)); background: rgb(var(--c-paper)); color: rgb(var(--c-ink)); font-weight: 600; font-size: 13px; cursor: pointer; }
.demo-go { margin-top: auto; padding-top: 4px; font-weight: 600; color: rgb(var(--c-accent-2, 13 148 136)); }

/* ---- Meet your tutor (home) ---- */
.tutor-band { display: grid; gap: 2rem; align-items: center; padding: 2rem; border-radius: 36px; background: rgb(var(--c-card)); border: 1px solid rgb(var(--c-line));
  box-shadow: 0 30px 60px -48px rgb(var(--c-ink) / .5); }
@media (min-width: 900px) { .tutor-band { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 3rem; padding: 2.6rem; } }
@media (max-width: 639px) { .tutor-band { padding: 1.2rem; border-radius: 28px; } }
.tutor-photo { position: relative; margin: 0; overflow: visible !important; }
.tutor-photo img { display: block; width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; object-position: 42% 30%;
  border-radius: 999px 999px 28px 28px; border: 6px solid rgb(var(--c-paper)); box-shadow: 0 26px 50px -30px rgb(var(--c-ink) / .55); }
@media (max-width: 899px) { .tutor-photo img { aspect-ratio: 16 / 11; border-radius: 28px; } }
.tutor-photo figcaption { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%) rotate(-2deg); white-space: nowrap; padding: .45rem 1rem;
  border-radius: 999px; background: rgb(var(--c-sun)); color: #09251c; font-weight: 800; font-size: .85rem; box-shadow: 0 10px 20px -12px rgb(0 0 0 / .5); }
.tutor-lead { margin-top: 1rem; font-size: 1.1rem; line-height: 1.75; color: rgb(var(--c-slate-600)); max-width: 40rem; }
.tutor-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin: 1.4rem 0 0; padding: 0; list-style: none; max-width: 32rem; }
.tutor-facts li { padding: .8rem .9rem; border-radius: 18px; background: rgb(var(--c-accent-1-tint)); }
.tutor-facts b { display: block; font-family: Fredoka, Nunito, sans-serif; font-size: 1.35rem; color: rgb(var(--c-accent-1-dark)); }
.tutor-facts span { font-size: .8rem; font-weight: 700; color: rgb(var(--c-slate-500)); }
.tutor-sub { margin: 1.6rem 0 .6rem; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgb(var(--c-accent-2)); }
.tutor-steps { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.tutor-steps li { display: flex; gap: .8rem; align-items: flex-start; }
.tutor-steps li > span { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 14px; background: rgb(var(--c-peach)); font-size: 1.2rem; }
.tutor-steps b { display: block; color: rgb(var(--c-ink)); }
.tutor-steps small { display: block; color: rgb(var(--c-slate-500)); font-size: .92rem; line-height: 1.5; }
.tutor-teach { margin-top: 1.3rem; color: rgb(var(--c-slate-600)); line-height: 1.7; }
.tutor-teach b { color: rgb(var(--c-ink)); }
:root[data-theme="dark"] .tutor-photo img { filter: brightness(.9); }
@media (max-width: 480px) { .tutor-facts { gap: .5rem; } .tutor-facts li { padding: .65rem .6rem; } .tutor-facts b { font-size: 1.1rem; } .tutor-facts span { font-size: .72rem; } }

/* phones: long card lists become swipeable rows (the next card peeks in), so the page isn't a mile long */
@media (max-width: 640px) {
  .landing-page .new-grid, .landing-page #practise .grid, .landing-page #domains .grid, .no-motion .landing-page .path-track {
    display: flex; flex-wrap: nowrap; gap: .9rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    margin-inline: -1rem; padding: .3rem 1rem 1rem; scrollbar-width: none; }
  .landing-page .new-grid::-webkit-scrollbar, .landing-page #practise .grid::-webkit-scrollbar, .landing-page #domains .grid::-webkit-scrollbar,
  .no-motion .landing-page .path-track::-webkit-scrollbar { display: none; }
  .landing-page .new-grid > *, .landing-page #practise .grid > *, .landing-page #domains .grid > *, .no-motion .landing-page .path-track > .landing-path-card {
    flex: 0 0 84%; width: auto; scroll-snap-align: start; }
  .clipart.is-edge { display: none; }
}
@media (max-width: 640px) and (prefers-reduced-motion: reduce) {
  .landing-page .path-track { display: flex; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -1rem; padding: .3rem 1rem 1rem; }
  .landing-page .path-track > .landing-path-card { flex: 0 0 84%; width: auto; scroll-snap-align: start; }
}
