/* Teaching with EduCS (/teaching/, 2026-10-25).
   Three ways to use a lesson, each a card whose small scene acts its idea
   out when the card is pointed at (the app's "Your first hour" pattern),
   with the how as numbered beats; then two tiles for the guides and the
   school pilot. Each card has its own brand colour in --scene. Touch
   screens and reduced motion show each scene in its finished state. */

.tw-lede {
  margin: -0.25rem 0 1.5rem;
  color: #4A5868;
  font-size: 1.1rem;
  line-height: 1.5;
}

.main-content ul.tw-ways {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}
.main-content ul.tw-ways > li.tw-way::before { content: none; }
/* --scene draws the scene; --scene-ink is the same hue dark enough for
   small text (4.5:1 or more on the tinted number circles). */
.tw-way--teach { --scene: #2B6F9B; --scene-ink: #2B6F9B; }
.tw-way--share { --scene: #2F855A; --scene-ink: #276749; }
.tw-way--check { --scene: #C05621; --scene-ink: #9C4221; }

.main-content .tw-way {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0.9rem;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(15, 20, 25, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
@media (min-width: 40rem) {
  .main-content .tw-way {
    grid-template-columns: 9rem minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    padding: 1rem 1.25rem 1rem 1rem;
  }
  .tw-way .tw-scene { grid-row: 1 / span 3; }
}
.tw-way:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--scene) 40%, #E2E8F0);
  box-shadow: 0 14px 30px -24px var(--scene);
}

.tw-scene {
  height: 5.75rem;
  border: 1px solid color-mix(in srgb, var(--scene) 18%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--scene) 7%, #FFFFFF);
  color: var(--scene);
}
.tw-svg { display: block; width: 100%; height: 100%; padding: 0.3rem; overflow: visible; }
.tw-svg * { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.tw-svg .tw-tint { fill: color-mix(in srgb, currentColor 10%, #FFFFFF); stroke-width: 1.5; }
.tw-svg .tw-soft { fill: color-mix(in srgb, currentColor 22%, #FFFFFF); stroke-width: 1.5; }
.tw-svg .tw-thin { stroke-width: 1.5; opacity: 0.75; }
.tw-svg .tw-bold { stroke-width: 2.6; }
.tw-svg .tw-line { stroke-width: 2; }
.tw-svg .tw-dot { fill: currentColor; stroke: none; }
.tw-svg .tw-pick { stroke-width: 1.5; }
.tw-svg .tw-path { stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; }
.tw-svg .tw-tick { stroke-width: 2.6; stroke-dasharray: 1; stroke-dashoffset: 1; }

/* The scenes at rest, and acted out. */
.tw-menu { transition: transform 0.45s ease, opacity 0.35s ease; }
.tw-lines { transform-box: view-box; transform-origin: 42px 18px; transition: transform 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) 0.1s; }
.tw-link { transform-box: fill-box; transform-origin: center; transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1); }
.tw-svg .tw-path { transition: stroke-dashoffset 0.5s ease 0.15s; }
.tw-chip { opacity: 0; transform: translateY(4px); transition: opacity 0.3s ease 0.55s, transform 0.4s ease 0.55s; }
.tw-svg .tw-pick { transition: fill 0.25s ease 0.1s; }
.tw-svg .tw-tick { transition: stroke-dashoffset 0.4s ease 0.3s; }

.tw-way:hover .tw-menu { transform: translateX(-10px); opacity: 0; }
.tw-way:hover .tw-lines { transform: translateX(-22px) scale(1.14); }
.tw-way:hover .tw-link { transform: scale(1.15); }
.tw-way:hover .tw-svg .tw-path { stroke-dashoffset: 0; }
.tw-way:hover .tw-chip { opacity: 1; transform: none; }
.tw-way:hover .tw-svg .tw-pick { fill: currentColor; }
.tw-way:hover .tw-svg .tw-tick { stroke-dashoffset: 0; }

@media (hover: none), (prefers-reduced-motion: reduce) {
  .tw-way, .tw-menu, .tw-lines, .tw-link, .tw-chip, .tw-svg .tw-path, .tw-svg .tw-pick, .tw-svg .tw-tick { transition: none; }
  .tw-way:hover { transform: none; }
  .tw-menu { transform: translateX(-10px); opacity: 0; }
  .tw-lines { transform: translateX(-22px) scale(1.14); }
  .tw-chip { opacity: 1; transform: none; }
  .tw-svg .tw-path, .tw-svg .tw-tick { stroke-dashoffset: 0; }
  .tw-svg .tw-pick { fill: currentColor; }
}

.main-content h2.tw-title {
  margin: 0.15rem 0 0;
  padding: 0;
  border: 0;
  color: #1A2433;
  font-size: 1.1rem !important; /* the theme sizes every h2 with !important */
  font-weight: 600;
  line-height: 1.3;
}
.main-content .tw-text {
  margin: 0;
  color: #4A5868;
  font-size: 0.95rem;
  line-height: 1.45;
}

/* The how, as numbered beats in the card's colour. */
.main-content ol.tw-beats {
  display: flex;
  flex-wrap: wrap;
  align-self: start;
  gap: 0.45rem 1rem;
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: tw-beat;
}
.main-content ol.tw-beats > li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  color: #2D3748;
  font-size: 0.875rem;
  line-height: 1.35;
}
.main-content ol.tw-beats > li::before {
  position: static;
  display: grid;
  flex: none;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid color-mix(in srgb, var(--scene) 45%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--scene) 10%, #FFFFFF);
  color: var(--scene-ink);
  font-size: 0.7rem !important;
  font-weight: 600;
  content: counter(tw-beat);
  counter-increment: tw-beat;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.tw-way:hover .tw-beats > li::before { background: var(--scene-ink); color: #FFFFFF; }

/* The guides and the pilot. */
.tw-more {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1rem;
}
@media (min-width: 40rem) {
  .tw-more { grid-template-columns: 1fr 1fr; }
}
.tw-tile {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  background: #F7FAFC;
}
.tw-icon {
  flex: none;
  width: 2rem;
  height: 2rem;
  fill: none;
  stroke: #2B6F9B;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tw-tile__body { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; min-width: 0; }
.main-content h2.tw-tile__title {
  margin: 0;
  padding: 0;
  border: 0;
  color: #1A2433;
  font-size: 1.05rem !important;
  font-weight: 600;
  line-height: 1.3;
}
.main-content .tw-tile__text { margin: 0 0 0.35rem; color: #4A5868; font-size: 0.925rem; line-height: 1.45; }

/* Dark theme. */
[data-theme="dark"] .tw-lede,
[data-theme="dark"] .main-content .tw-text,
[data-theme="dark"] .main-content .tw-tile__text { color: #B8C2CE; }
[data-theme="dark"] .main-content h2.tw-title,
[data-theme="dark"] .main-content h2.tw-tile__title,
[data-theme="dark"] .main-content ol.tw-beats > li { color: #E2E8F0; }
[data-theme="dark"] .tw-way--teach { --scene: #87D1E8; --scene-ink: #87D1E8; }
[data-theme="dark"] .tw-way--share { --scene: #8FD4BF; --scene-ink: #8FD4BF; }
[data-theme="dark"] .tw-way--check { --scene: #F6AD55; --scene-ink: #F6AD55; }
[data-theme="dark"] .main-content .tw-way { background: #1A2029; border-color: #313D4F; box-shadow: none; }
[data-theme="dark"] .tw-way:hover { border-color: color-mix(in srgb, var(--scene) 45%, #313D4F); }
[data-theme="dark"] .tw-scene { background: color-mix(in srgb, var(--scene) 8%, #0F1419); }
[data-theme="dark"] .tw-svg .tw-tint { fill: color-mix(in srgb, currentColor 10%, #0F1419); }
[data-theme="dark"] .tw-svg .tw-soft { fill: color-mix(in srgb, currentColor 24%, #0F1419); }
[data-theme="dark"] .main-content ol.tw-beats > li::before { background: color-mix(in srgb, var(--scene) 12%, #1A2029); }
[data-theme="dark"] .tw-way:hover .tw-beats > li::before { background: var(--scene); color: #0F1419; }
[data-theme="dark"] .tw-tile { background: #1A2029; border-color: #313D4F; }
[data-theme="dark"] .tw-icon { stroke: #87D1E8; }
