/* Shared motion contract: see docs/motion-system.md. Content is visible by default. */
:root {
  --motion-fast: 180ms;
  --motion-standard: 360ms;
  --motion-slow: 560ms;
  --motion-feature: 680ms;
  --ease-standard: cubic-bezier(.2, 0, .2, 1);
  --ease-enter: cubic-bezier(.22, .7, .22, 1);
  --ease-exit: cubic-bezier(.4, 0, 1, 1);
  --ease-emphasised: cubic-bezier(.16, 1, .3, 1);
  --reveal-distance-sm: 24px;
  --reveal-distance-md: 32px;
  --stagger-fast: 45ms;
  --stagger-standard: 90ms;
  --quick: var(--motion-fast);
  --change: var(--motion-standard);
  --settle: var(--motion-feature);
  --ease: var(--ease-enter);
}
.card-copy h2,.topic-card h2,.book-link { transition:color var(--motion-fast) var(--ease-standard); }
.card-link:is(:hover,:focus-visible) h2,.topic-card a:is(:hover,:focus-visible) h2 { color:var(--accent); }
.book-cover img { transition:transform var(--motion-standard) var(--ease-enter),box-shadow var(--motion-standard) var(--ease-standard); }
.book-card a:is(:hover,:focus-visible) img { transform:translateY(-4px) rotate(-1deg);box-shadow:3px 12px 22px #0003; }
.topic-card a:focus-visible .topic-art img { filter:brightness(1.04); }
.theme-toggle>span:first-child { transition:transform var(--motion-standard) var(--ease-emphasised); }
[data-theme=dark] .theme-toggle>span:first-child { transform:rotate(180deg); }
.ordered-readings { position:relative;view-timeline-name:--topic-path;view-timeline-axis:block; }
.ordered-readings::before { content:'';position:absolute;left:-14px;top:0;bottom:0;width:2px;background:var(--accent);opacity:.6;transform-origin:top; }
.ordered-readings>li { transition:border-color var(--motion-standard) var(--ease-standard); }
.ordered-readings>li.is-current { border-top-color:var(--accent); }
.ordered-readings .reading-number { transition:transform var(--motion-standard) var(--ease-enter); }
.ordered-readings>li.is-current .reading-number { transform:translateX(4px);font-weight:700; }
.reading-navigation a[aria-current=location] { color:var(--accent);text-decoration:underline;text-decoration-thickness:2px; }
.article-sequence { display:flex;justify-content:space-between;flex-wrap:wrap;gap:24px;margin-top:30px; }
.article-sequence a { max-width:30rem; }
.topic-practice { max-width:850px;margin:0 0 48px;padding-left:25px;border-left:2px solid var(--accent); }
.topic-practice h2 { font-size:30px;margin:10px 0 18px; }
.topic-practice p+p { margin-top:15px; }
@supports(animation-timeline:view()) {
  @media(prefers-reduced-motion:no-preference) {
    .ordered-readings::before { animation:trace-route linear both;animation-timeline:--topic-path;animation-range:entry 75% exit 10%; }
  }
}
/* Native same-origin navigation; no fetch interception or SPA router. */
@media(prefers-reduced-motion:no-preference) {
  @view-transition { navigation:auto; }
  ::view-transition-group(*) { animation-duration:var(--motion-standard);animation-timing-function:var(--ease-enter); }
  ::view-transition-old(root),::view-transition-new(root) { animation-duration:var(--motion-fast); }
}
@media(max-width:600px) {
  :root { --reveal-distance-sm:12px;--reveal-distance-md:16px;--stagger-fast:0ms;--stagger-standard:0ms; }
  .ordered-readings::before { left:-8px; }
  .feature-image { animation:none;transform:none; }
}
@media(hover:none) {
  .book-card a:hover img { transform:none; }
  .book-card a:active img { transform:translateY(-2px); }
}
@media(prefers-reduced-motion:reduce) {
  @view-transition { navigation:none; }
  *,*::before,*::after { animation:none!important;transition:none!important;scroll-behavior:auto!important; }
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*) { animation:none!important; }
  .book-card img,.theme-toggle>span:first-child,.ordered-readings .reading-number,.ordered-readings::before { transform:none!important; }
}
