/* Styling of the home page alone */
/* Loads after site.css on the home page alone so the other pages are lighter */

/* The first screen (decision 388) */
/* The panel has a dark color under its gradients so the contrast of what is above it is measured against it */
:root {
  --hero-pad-top: clamp(3rem, 1.6rem + 5vw, 6rem);
  --hero-pad-x: clamp(1rem, 0.2rem + 4vw, 5rem);
  /* The width of the text block on desktop and the distance of the title and what is under it from the start side */
  --hero-copy-wide: 44rem;
  --hero-step: clamp(2rem, 0.5rem + 3vw, 4rem);
  /* The phone screen in the first screen */
  --phone-w: 18.5rem;
  --phone-h: 38rem;
  --phone-r: 3rem;
  --phone-edge: 0.5rem;
  --phone-row: 2.75rem;
  --note-step: 4.25rem;
  --notes-loop: 24s;
  /* What goes out of the window below the panel edge and by how much the two floating cards go out of the window edge */
  --hang: clamp(2.5rem, 1rem + 6vw, 7rem);
  --float-out: clamp(0.5rem, -0.5rem + 3vw, 3rem);
  --app-max: 70rem;
  --app-rail: 4.25rem;
  --app-detail: 21rem;
  --app-bar-h: 3.25rem;
  --app-search: 18rem;
  --app-row-bar: 4.5rem;
  --stage-perspective: 120rem;
  --float-z: 3rem;
  --float-z-2: 4.5rem;
}

.hero {
  position: relative;
  padding-block: var(--sp-4) var(--hang);
  overflow-x: clip;
}

.hero-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  gap: var(--sp-12);
  padding: var(--hero-pad-top) var(--hero-pad-x) 0;
  border-radius: var(--r-device);
  background-color: var(--hero-deep);
  background-image:
    radial-gradient(60% 55% at 50% 0%, var(--hero-glow-1), transparent 72%),
    radial-gradient(38% 45% at 8% 92%, var(--hero-glow-2), transparent 70%),
    linear-gradient(180deg, var(--hero-deep), var(--hero-deep-2));
  color: var(--on-deep);
  text-align: center;
  --focus: var(--on-deep);
}

:root[data-theme='dark'] .hero-panel {
  box-shadow: inset 0 0 0 var(--line) var(--border);
}

/* Light dots on the panel that fade from its top like the stage grid */
.hero-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background-image: radial-gradient(circle at center, var(--on-deep-dots) var(--line), transparent var(--line-2));
  background-size: var(--grid-dot) var(--grid-dot);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 20%, var(--mask-on), transparent 80%);
  mask-image: radial-gradient(70% 60% at 50% 20%, var(--mask-on), transparent 80%);
  pointer-events: none;
}

.hero-copy {
  display: grid;
  justify-items: center;
  gap: var(--sp-5);
  max-inline-size: var(--measure-wide);
}

/* The title and the line under it shrink on small screens (the owner's note) */
.hero-title {
  font-size: clamp(1.75rem, 1.15rem + 2.7vw, 3.5rem);
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-heading);
  color: var(--on-deep);
}

/* The second part of the title has a light turquoise gradient on the panel and the dark color under it for whoever does not render the gradient */
.hero-title .accent {
  color: var(--hero-accent-to);
  background-image: linear-gradient(135deg, var(--hero-accent-from), var(--hero-accent-to));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* The hook question above the title (decision 395) */
.hero-hook {
  color: var(--hero-accent-to);
  font-size: clamp(1rem, 0.9rem + 0.45vw, 1.375rem);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
}

.hero-lead {
  max-inline-size: var(--measure);
  color: var(--on-deep);
  font-size: clamp(1.0625rem, 0.9rem + 0.7vw, 1.625rem);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
}

/* The start button and the two store buttons in one row */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3) var(--sp-4);
  margin-block-start: var(--sp-2);
}

.hero-cta {
  display: none;
  justify-content: center;
}

/* The buttons at the height of the header button (decision 397) */
.hero-cta .btn {
  padding-inline: var(--sp-6);
  box-shadow: 0 var(--sp-2) var(--sp-6) calc(-1 * var(--sp-2)) var(--accent-ring);
}

.hero-stores .stores--sm {
  padding-block-start: 0;
}

.hero-stores .store {
  block-size: var(--store-h-sm);
  padding-block: 0;
}

/* The reassurance line appears with the start button */
.hero-note {
  display: none;
  margin-block-start: calc(-1 * var(--sp-2));
  color: var(--on-deep-muted);
  font-size: var(--fs-sm);
}

/* The start button is under the title on wide screens alone */
@media (min-width: 64rem) {
  .hero-cta {
    display: flex;
  }

  .hero-note {
    display: block;
  }
}

/* Desktop: the text at the start side and the phone at the end side (decision 398) */
.hero-phone {
  display: none;
}

@media (min-width: 64rem) {
  .hero-copy {
    justify-self: start;
    justify-items: start;
    inline-size: min(var(--hero-copy-wide), calc(100% - var(--phone-w) - var(--sp-16)));
    text-align: start;
  }

  .hero-title,
  .hero-lead,
  .hero-actions,
  .hero-note {
    margin-inline-start: var(--hero-step);
  }

  .hero-actions {
    justify-content: flex-start;
  }

  /* The floating notification that was on the window is now in the phone screen */
  .hero-visual .mock-toast {
    display: none;
  }

  .hero-phone {
    display: block;
    position: absolute;
    inset-block-start: calc(var(--hero-pad-top) - var(--sp-1));
    inset-inline-end: calc(var(--hero-pad-x) + var(--sp-4));
    z-index: calc(var(--z-float) + 1);
    inline-size: var(--phone-w);
  }

  /* The phone frame in the language of the window frame (decision 400) */
  .phone {
    position: relative;
    block-size: var(--phone-h);
    padding: var(--phone-edge);
    border: var(--line) solid var(--border);
    border-radius: var(--phone-r);
    background: var(--surface);
    box-shadow:
      0 0 0 var(--sp-2) var(--on-deep-fill),
      0 var(--sp-10) var(--sp-20) calc(-1 * var(--sp-8)) rgb(var(--shadow-rgb) / 0.55);
  }

  /* The "My dashboard" screen as in the app (decision 399) */
  .phone-app {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    block-size: 100%;
    overflow: hidden;
    border-radius: calc(var(--phone-r) - var(--phone-edge));
    background: var(--surface-sunken);
    color: var(--text);
    font-size: var(--fs-2xs);
    line-height: var(--lh-tight);
    text-align: start;
  }

  .phone-status {
    position: absolute;
    inset-block-start: var(--sp-2);
    inset-inline: var(--sp-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--on-deep);
    font-weight: var(--fw-bold);
  }

  .phone-island {
    inline-size: 4.5rem;
    block-size: 1.25rem;
    border-radius: var(--r-pill);
    background: var(--device);
  }

  /* The signal climbs from the left in both languages */
  .phone-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    direction: ltr;
  }

  .phone-bars i {
    inline-size: 3px;
    block-size: calc(var(--bar-i, 1) * 3px);
    border-radius: 1px;
    background: var(--on-deep);
  }

  .phone-bars i:nth-child(2) {
    --bar-i: 2;
  }

  .phone-bars i:nth-child(3) {
    --bar-i: 3;
  }

  .phone-bars i:nth-child(4) {
    --bar-i: 4;
  }

  .phone-top {
    background-color: var(--hero-deep);
    background-image: radial-gradient(120% 140% at 100% 0%, var(--hero-glow-1), transparent 62%);
    color: var(--on-deep);
  }

  .phone-top {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: 2.6rem var(--sp-4) var(--sp-4);
    border-end-start-radius: var(--r-lg);
    border-end-end-radius: var(--r-lg);
  }

  .phone-heading {
    flex: 1;
  }

  .phone-date {
    color: var(--on-deep-muted);
  }

  .phone-title {
    font-size: var(--fs-md);
    font-weight: var(--fw-black);
  }

  .phone-bell,
  .phone-avatar {
    position: relative;
    display: inline-grid;
    place-items: center;
    inline-size: var(--sp-8);
    block-size: var(--sp-8);
    border-radius: var(--r-pill);
  }

  .phone-avatar {
    background: var(--on-deep);
    color: var(--hero-deep);
    font-weight: var(--fw-black);
  }

  /* The previous and the next number in one cell and with no motion the next one appears */
  .phone-badge,
  .phone-num {
    display: inline-grid;
  }

  .phone-badge b,
  .phone-num b {
    grid-area: 1 / 1;
  }

  .phone-badge .was,
  .phone-num .was {
    opacity: 0;
  }

  .phone-badge {
    position: absolute;
    inset-block-start: calc(-1 * var(--sp-1));
    inset-inline-end: calc(-1 * var(--sp-1));
    place-items: center;
    min-inline-size: 1.1rem;
    block-size: 1.1rem;
    border-radius: var(--r-pill);
    background: var(--accent);
    color: var(--on-accent);
    font-size: 0.6875rem;
  }

  .phone-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-2);
    margin-inline: var(--sp-3);
  }

  .phone-tile {
    display: grid;
    gap: var(--sp-1);
    padding: var(--sp-3) var(--sp-2);
    border-radius: var(--r-md);
    font-weight: var(--fw-bold);
    white-space: nowrap;
  }

  .phone-num {
    font-size: var(--fs-lg);
    font-weight: var(--fw-black);
    line-height: var(--lh-flat);
  }

  .phone-tile.is-open {
    background: var(--brand-teal-strong);
    color: var(--on-deep);
  }

  .phone-tile.is-today {
    background: var(--accent);
    color: var(--on-accent);
  }

  .phone-tile.is-late {
    border: var(--line) solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
  }

  .phone-tile.is-late .phone-num {
    color: var(--danger);
  }

  .phone-eyebrow {
    margin-inline: var(--sp-4);
    color: var(--text-muted);
    font-weight: var(--fw-bold);
  }

  .phone-rows {
    display: grid;
    gap: var(--sp-2);
    margin-inline: var(--sp-3);
  }

  .phone-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
    block-size: var(--phone-row);
    padding-inline: var(--sp-5) var(--sp-3);
    border: var(--line) solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
  }

  .phone-row::before {
    content: '';
    position: absolute;
    inset-block: var(--sp-2);
    inset-inline-start: var(--sp-2);
    inline-size: 3px;
    border-radius: var(--r-pill);
    background: var(--mark-info);
  }

  .phone-row.is-new::before {
    background: var(--accent);
  }

  .phone-row:nth-child(2)::before {
    background: var(--mark-warn);
  }

  .phone-row div {
    display: grid;
    gap: 2px;
    min-inline-size: 0;
  }

  .phone-row-title {
    overflow: hidden;
    font-weight: var(--fw-bold);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .phone-row-due {
    color: var(--text-muted);
  }

  .phone-nav {
    position: absolute;
    inset-block-end: var(--sp-4);
    inset-inline: var(--sp-4);
    display: flex;
    align-items: center;
    justify-content: space-around;
    block-size: var(--phone-row);
    border-radius: var(--r-pill);
    background: var(--brand-teal-strong);
    color: var(--on-deep);
    box-shadow: 0 var(--sp-2) var(--sp-5) rgb(var(--shadow-rgb) / 0.35);
  }

  .phone-nav span {
    display: grid;
    place-items: center;
    inline-size: var(--sp-8);
    block-size: var(--sp-8);
    border-radius: var(--r-pill);
  }

  .phone-nav .is-current {
    background: var(--on-deep-line);
  }

  /* The notifications in the shape of the floating notification and with no motion only the last of them appears */
  .phone-notes {
    position: absolute;
    inset-block-start: 2.6rem;
    inset-inline: var(--sp-4);
  }

  /* A selector stronger than .mock that comes after it and makes them relative */
  .phone-notes .phone-note {
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3);
    border-radius: var(--r-md);
    white-space: nowrap;
  }

  .phone-note:not(.n5) {
    display: none;
  }

  .phone-note .toast-title,
  .phone-note .toast-body {
    display: block;
  }

  .tile--warn {
    background: var(--warning-soft);
    color: var(--warning);
  }

  .tile--good {
    background: var(--success-soft);
    color: var(--success);
  }

  .tile--info {
    background: var(--info-soft);
    color: var(--info);
  }

  /* The new one at the top pushes what was before it */
  .motion-on .hero-phone.is-in .phone-note {
    display: flex;
  }

  .motion-on .hero-phone.is-in :is(.phone-note, .was, .now, .phone-rows, .is-new) {
    animation: var(--notes-loop) var(--ease) infinite both;
  }

  .motion-on .hero-phone.is-in .n1 {
    animation-name: phone-n1;
  }

  .motion-on .hero-phone.is-in .n2 {
    animation-name: phone-n2;
  }

  .motion-on .hero-phone.is-in .n3 {
    animation-name: phone-n3;
  }

  .motion-on .hero-phone.is-in .n4 {
    animation-name: phone-n4;
  }

  .motion-on .hero-phone.is-in .n5 {
    animation-name: phone-n5;
  }

  .motion-on .hero-phone.is-in .was {
    animation-name: phone-was;
  }

  .motion-on .hero-phone.is-in .now,
  .motion-on .hero-phone.is-in .is-new {
    animation-name: phone-now;
  }

  .motion-on .hero-phone.is-in .phone-rows {
    animation-name: phone-rows;
  }
}

@keyframes phone-n1 {
  0%, 1% { opacity: 0; translate: 0 calc(-1 * var(--sp-4)); }
  3%, 10% { opacity: 1; translate: 0 0; }
  12%, 19% { translate: 0 var(--note-step); }
  21%, 28% { translate: 0 calc(2 * var(--note-step)); }
  30%, 37% { translate: 0 calc(3 * var(--note-step)); }
  39%, 46% { opacity: 1; translate: 0 calc(4 * var(--note-step)); }
  52%, 100% { opacity: 0; translate: 0 calc(4 * var(--note-step)); }
}

@keyframes phone-n2 {
  0%, 10% { opacity: 0; translate: 0 calc(-1 * var(--sp-4)); }
  12%, 19% { opacity: 1; translate: 0 0; }
  21%, 28% { translate: 0 var(--note-step); }
  30%, 37% { translate: 0 calc(2 * var(--note-step)); }
  39%, 46% { opacity: 1; translate: 0 calc(3 * var(--note-step)); }
  52%, 100% { opacity: 0; translate: 0 calc(3 * var(--note-step)); }
}

@keyframes phone-n3 {
  0%, 19% { opacity: 0; translate: 0 calc(-1 * var(--sp-4)); }
  21%, 28% { opacity: 1; translate: 0 0; }
  30%, 37% { translate: 0 var(--note-step); }
  39%, 46% { opacity: 1; translate: 0 calc(2 * var(--note-step)); }
  52%, 100% { opacity: 0; translate: 0 calc(2 * var(--note-step)); }
}

@keyframes phone-n4 {
  0%, 28% { opacity: 0; translate: 0 calc(-1 * var(--sp-4)); }
  30%, 37% { opacity: 1; translate: 0 0; }
  39%, 46% { opacity: 1; translate: 0 var(--note-step); }
  52%, 100% { opacity: 0; translate: 0 var(--note-step); }
}

@keyframes phone-n5 {
  0%, 37% { opacity: 0; translate: 0 calc(-1 * var(--sp-4)); }
  39%, 95% { opacity: 1; translate: 0 0; }
  98%, 100% { opacity: 0; translate: 0 0; }
}

@keyframes phone-was {
  0%, 41%, 98%, 100% { opacity: 1; }
  45%, 95% { opacity: 0; }
}

@keyframes phone-now {
  0%, 41%, 98%, 100% { opacity: 0; }
  46%, 95% { opacity: 1; }
}

@keyframes phone-rows {
  0%, 41%, 98%, 100% { translate: 0 calc(-1 * (var(--phone-row) + var(--sp-2))); }
  47%, 95% { translate: 0 0; }
}

/* A short desktop screen: narrower spacing so the window shows its numbers */
@media (min-width: 64rem) and (max-height: 56.25rem) {
  :root {
    --hero-pad-top: 3.25rem;
  }

  .hero-copy {
    gap: var(--sp-4);
  }

  .hero-panel {
    gap: var(--sp-10);
  }
}

/* The two store buttons on the panel */
.hero-stores {
  display: flex;
  justify-content: center;
  max-inline-size: 100%;
}

.hero-panel .store {
  border-color: var(--on-deep-line);
  background: var(--on-deep-fill);
  color: var(--on-deep);
  box-shadow: none;
}

.hero-panel .store-mark {
  background: var(--on-deep);
  color: var(--brand-teal);
}

/* Three dots in the window bar like an app window and the last one in the accent color */
.stage-dots {
  display: flex;
  flex: none;
  gap: var(--sp-2);
}

.stage-dots span {
  inline-size: var(--dot);
  block-size: var(--dot);
  border-radius: var(--r-pill);
  background: var(--border-strong);
}

.stage-dots span:last-child {
  background: var(--accent);
}

/* Drawing elements shared by all the illustrations */
.mock {
  position: relative;
  padding: var(--sp-5);
  background: var(--surface);
  border: var(--line) solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  color: var(--text);
  font-size: var(--fs-xs);
  line-height: var(--lh-ui);
}

.mock-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

.mock-row--between {
  justify-content: space-between;
}

.mock-label {
  color: var(--text-muted);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
}

.mock-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-black);
  line-height: var(--lh-heading);
}

.mock-meta {
  color: var(--text-muted);
  font-size: var(--fs-2xs);
}

.mock-count {
  color: var(--text-muted);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  min-block-size: var(--chip-h);
  padding-inline: var(--sp-2);
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  white-space: nowrap;
}

.chip--soft {
  background: var(--primary-soft);
  color: var(--on-primary-soft);
}

.chip--info {
  background: var(--info-soft);
  color: var(--info);
}

.chip--success {
  background: var(--success-soft);
  color: var(--success);
}

.dot {
  flex: none;
  inline-size: var(--dot);
  block-size: var(--dot);
  border-radius: var(--r-pill);
  background: var(--mark-info);
}

.dot--warn {
  background: var(--mark-warn);
}

.mock-priority {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-inline-start: auto;
  color: var(--text-muted);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
}

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: var(--avatar);
  block-size: var(--avatar);
  border-radius: var(--r-pill);
  background: var(--primary);
  color: var(--on-primary);
}

.avatar--alt {
  background: var(--primary-soft);
  color: var(--primary-text);
}

.people {
  display: grid;
  gap: var(--sp-2);
}

.person {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.person-name {
  margin-inline-end: auto;
  font-weight: var(--fw-bold);
}

/* The percentage bar's track is a shade lighter than the fill color itself */
.bar {
  display: block;
  flex: 1;
  block-size: var(--bar-h);
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--primary-soft);
}

.bar-fill {
  display: block;
  block-size: 100%;
  border-radius: var(--r-pill);
  background: var(--primary);
}

.bar--good .bar-fill {
  background: var(--mark-good);
}

.is-66 {
  inline-size: 66%;
}

.is-72 {
  inline-size: 72%;
}

.is-80 {
  inline-size: 80%;
}

.is-88 {
  inline-size: 88%;
}

.is-94 {
  inline-size: 94%;
}

.mock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-block-size: var(--mock-btn-h);
  min-inline-size: var(--mock-btn-h);
  padding-inline: var(--sp-2);
  border: var(--line) solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-muted);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}

.mock-btn--primary {
  padding-inline: var(--sp-3);
  border-color: transparent;
  background: var(--primary);
  color: var(--on-primary);
}

/* The task card in the first screen */
.mock-task {
  display: grid;
  gap: var(--sp-4);
  z-index: var(--z-raised);
}

/* The colored edge in the priority color as in the tasks list */
.mock-task::before {
  content: '';
  position: absolute;
  inset-block: var(--sp-5);
  inset-inline-start: 0;
  inline-size: var(--edge);
  border-start-end-radius: var(--r-pill);
  border-end-end-radius: var(--r-pill);
  background: var(--mark-warn);
}

.mock-task-head {
  display: grid;
  gap: var(--sp-2);
}

.mock-block {
  display: grid;
  gap: var(--sp-3);
  padding-block-start: var(--sp-4);
  border-block-start: var(--line) solid var(--border);
}

.subtasks {
  display: grid;
  gap: var(--sp-2);
}

.subtask {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.subtask-name {
  margin-inline-end: auto;
  font-weight: var(--fw-semibold);
}

.tick {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: var(--icon);
  block-size: var(--icon);
  border: var(--line-2) solid var(--border-strong);
  border-radius: var(--r-pill);
  color: transparent;
}

.subtask.is-done .tick {
  border-color: var(--mark-good);
  background: var(--mark-good);
  color: var(--surface);
}

.subtask.is-done .subtask-name {
  color: var(--text-muted);
}

.tick .icon {
  --icon: var(--tick-icon);
  stroke-width: var(--tick-stroke);
}

.mock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding-block-start: var(--sp-4);
  border-block-start: var(--line) solid var(--border);
}

.mock-actions .mock-btn--primary {
  margin-inline-end: auto;
}

/* The score card */
.mock-score {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--sp-3) var(--sp-4);
  padding: var(--sp-4);
  z-index: var(--z-float);
}

.score-head {
  grid-column: 1 / -1;
}

.score-figure {
  display: grid;
  justify-items: center;
  gap: var(--sp-2);
}

.score-ring {
  position: relative;
  inline-size: var(--ring);
  block-size: var(--ring);
}

.ring {
  inline-size: 100%;
  block-size: 100%;
  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: var(--ring-stroke);
}

.ring-track {
  stroke: var(--primary-soft);
}

.ring-value {
  stroke: var(--mark-good);
  stroke-linecap: round;
  stroke-dasharray: 86 100;
}

.score-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.score-num {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-black);
  line-height: var(--lh-flat);
}

.score-of {
  margin-block-start: var(--sp-1);
  color: var(--text-muted);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
}

.score-cap {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  text-align: center;
}

.meters {
  display: grid;
  gap: var(--sp-2);
}

.meter {
  display: grid;
  gap: var(--sp-1);
  color: var(--text-muted);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
}

/* The floating notification */
.mock-toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  order: -1;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  z-index: var(--z-float);
}

.toast-title {
  font-weight: var(--fw-bold);
}

.toast-body {
  color: var(--text-muted);
  font-size: var(--fs-2xs);
}

/* The product window */
/* And from 56rem the "My tasks" list appears with its numbers and rows between the side menu and the task card */
.hero-visual {
  inline-size: 100%;
  max-inline-size: var(--app-max);
  margin-block-end: calc(-1 * var(--hang));
  text-align: start;
}

/* Under 56rem the score card does not appear */
.stage {
  position: relative;
  display: block;
  padding-block-start: var(--sp-6);
}

.mock-score {
  display: none;
}

.mock-toast {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: var(--sp-3);
  z-index: var(--z-float);
  inline-size: min(19rem, 88%);
}

/* The task card on the phone leaves its top for the floating notification */
.app .mock-task {
  padding-block-start: calc(var(--sp-12) + var(--sp-2));
}

.app-bar,
.app-rail,
.app-main {
  display: none;
}

.app {
  color: var(--text);
}

.app-body {
  display: grid;
}

.bar-fill.is-15 {
  inline-size: 15%;
}

.bar-fill.is-60 {
  inline-size: 60%;
}

.bar-fill.is-100 {
  inline-size: 100%;
}

@media (min-width: 40rem) {
  .app {
    overflow: hidden;
    border: var(--line) solid var(--border);
    border-radius: var(--r-xl);
    background: var(--surface-sunken);
    box-shadow:
      0 0 0 var(--sp-2) var(--on-deep-fill),
      0 var(--sp-10) var(--sp-20) calc(-1 * var(--sp-8)) rgb(var(--shadow-rgb) / 0.55);
  }

  /* The window in the shape of the new platform (decision 395) */
  .app-bar {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    min-block-size: var(--app-bar-h);
    margin: var(--sp-3) var(--sp-3) 0;
    padding-inline: var(--sp-5);
    border: var(--line) solid var(--border);
    border-radius: var(--r-pill);
    background: var(--surface);
    color: var(--text-muted);
    box-shadow: 0 var(--line) var(--sp-1) rgb(var(--shadow-rgb) / 0.08);
  }

  .app-search {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    flex: 0 1 var(--app-search);
    min-block-size: var(--sp-8);
    margin-inline: auto;
    padding-inline: var(--sp-3);
    border-radius: var(--r-pill);
    background: var(--surface-sunken);
  }

  .app-search-line {
    flex: 1;
    max-inline-size: 60%;
    block-size: var(--skel-h);
    border-radius: var(--r-pill);
    background: var(--border);
  }

  .app-bell {
    display: inline-grid;
    place-items: center;
  }

  .app-body {
    grid-template-columns: var(--app-rail) minmax(0, 1fr);
    align-items: stretch;
  }

  .app-rail {
    display: grid;
    align-content: start;
    justify-items: center;
    gap: var(--sp-2);
    margin: var(--sp-3) var(--sp-2) var(--sp-3);
    padding-block: var(--sp-4);
    border-radius: var(--r-lg);
    background-color: var(--brand-teal);
    background-image: linear-gradient(180deg, var(--brand-teal) 45%, var(--hero-deep));
    color: var(--on-deep);
  }

  .app-rail-item {
    position: relative;
    display: grid;
    place-items: center;
    inline-size: var(--tile-sm);
    block-size: var(--tile-sm);
    border-radius: var(--r-pill);
    opacity: 0.78;
  }

  .app-rail-item.is-current {
    background: var(--surface);
    color: var(--accent-text);
    opacity: 1;
    box-shadow: 0 var(--sp-1) var(--sp-3) rgb(var(--shadow-rgb) / 0.25);
  }

  /* The task card inside the window is a details panel with no shadow and no corners */
  .app .mock-task {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  /* Inside the window there is no need for the notification's space and the notification is on its top edge under the bell */
  .stage {
    padding-block-start: 0;
  }

  .app .mock-task {
    padding-block-start: var(--sp-5);
  }

  .mock-toast {
    inset-block-start: calc(-1 * var(--sp-6));
    inset-inline-end: calc(-1 * var(--float-out));
    inline-size: 19rem;
  }
}

@media (min-width: 56rem) {
  .app-body {
    grid-template-columns: var(--app-rail) minmax(0, 1fr) minmax(0, var(--app-detail));
  }

  .app .mock-task {
    border-inline-start: var(--line) solid var(--border);
  }

  /* The score card is horizontal and comes out of the window's bottom corner and does not reach the next section's title (decision 401) */
  .mock-score {
    --ring: 5.25rem;
    display: grid;
    position: absolute;
    inset-block-end: calc(-1 * var(--sp-4));
    inset-inline-start: calc(-1 * var(--float-out));
    inline-size: 21rem;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .app-main {
    display: grid;
    align-content: start;
    gap: var(--sp-4);
    padding: var(--sp-5);
    background: var(--surface-sunken);
  }

  .app-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
  }

  .app-title {
    font-size: var(--fs-lg);
    font-weight: var(--fw-black);
    line-height: var(--lh-tight);
  }

  .app-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-3);
  }

  .app-kpi {
    display: grid;
    gap: var(--sp-1);
    padding: var(--sp-3) var(--sp-4);
    border: var(--line) solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: 0 var(--line) var(--sp-1) rgb(var(--shadow-rgb) / 0.06);
  }

  .app-kpi::before {
    content: '';
    inline-size: var(--sp-6);
    block-size: var(--edge);
    border-radius: var(--r-pill);
    background: var(--primary);
  }

  .app-kpi:nth-child(2)::before {
    background: var(--mark-warn);
  }

  .app-kpi:nth-child(3)::before {
    background: var(--mark-good);
  }

  .app-kpi-value {
    font-size: var(--fs-xl);
    font-weight: var(--fw-black);
    line-height: var(--lh-flat);
    font-variant-numeric: tabular-nums;
  }

  .app-kpi:first-child .app-kpi-value {
    color: var(--primary-text);
  }

  .app-kpi-label {
    color: var(--text-muted);
    font-size: var(--fs-2xs);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-tight);
  }

  .app-rows {
    display: grid;
    gap: var(--sp-2);
  }

  /* The task row has an edge in its priority color as in the tasks list and the open one is marked in the details card */
  .app-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto var(--app-row-bar);
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    padding-inline-start: var(--sp-6);
    border: var(--line) solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: 0 var(--line) var(--sp-1) rgb(var(--shadow-rgb) / 0.06);
    font-size: var(--fs-xs);
  }

  .app-row::before {
    content: '';
    position: absolute;
    inset-block: var(--sp-3);
    inset-inline-start: var(--sp-2);
    inline-size: var(--edge);
    border-radius: var(--r-pill);
    background: var(--mark-info);
  }

  .app-row--warn::before {
    background: var(--mark-warn);
  }

  .app-row--good::before {
    background: var(--mark-good);
  }

  .app-row.is-open {
    border-color: var(--primary);
    box-shadow: 0 0 0 var(--line) var(--primary);
  }

  .app-row-title {
    overflow: hidden;
    font-weight: var(--fw-bold);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-row-people {
    display: inline-flex;
  }

  .app-row-people .avatar + .avatar {
    margin-inline-start: calc(-1 * var(--sp-2));
    box-shadow: 0 0 0 var(--line-2) var(--surface);
  }
}

/* The depth of the scene on wide screens */
/* The window tilts back a little and the two floating cards are nearer to the viewer in the same scene so they move with it in depth */
@media (min-width: 64rem) {
  .hero-visual {
    perspective: var(--stage-perspective);
  }

  /* The scene is straight at rest (decision 400) */
  .stage {
    transform-style: preserve-3d;
    transform-origin: 50% 100%;
  }

  .mock-score {
    transform: translateZ(var(--float-z));
  }

  .mock-toast {
    transform: translateZ(var(--float-z-2));
  }
}

/* The phone and the window and the "My dashboard" card are one straight scene at rest in which the phone and the card float (decision 400) */
/* On mouse enter the phone and the card move apart to the two sides and the window recedes a little and what is under the mouse comes forward */
:root {
  --to-end: 1;
  --spread: 2.75rem;
}

:root[dir='rtl'] {
  --to-end: -1;
}

@media (min-width: 64rem) and (prefers-reduced-motion: no-preference) {
  .phone {
    animation: float var(--float) ease-in-out calc(var(--float) / -3) infinite;
  }
}

@media (min-width: 64rem) and (hover: hover) and (prefers-reduced-motion: no-preference) {
  .stage,
  .phone,
  .hero-phone,
  .mock-score {
    transition:
      transform var(--dur-4) var(--ease),
      scale var(--dur-3) var(--ease);
  }

  .hero-visual:hover .stage {
    transform: scale(0.98);
  }

  .hero-visual:hover .mock-score {
    transform: translateZ(var(--float-z)) translate(calc(-1 * var(--to-end) * var(--spread)), var(--sp-2));
  }

  .hero-visual:hover:not(:has(.mock-score:hover)) .stage {
    transform: none;
  }

  .mock-score:hover {
    scale: 1.03;
  }
}

/* The hidden phone (decision 422): tilted 45 degrees behind the window with only its top corner showing and on it a bell inviting a press */
/* Pressing it brings it out straight into its place in front of the window and its notifications begin, and pressing anywhere else returns it. The script measures the distance of the window from it */
@media (min-width: 64rem) {
  .hero-visual {
    position: relative;
    z-index: 2;
  }

  .hero-phone.has-peek {
    --peek: 6.5rem;
    --peek-r: calc(0.72 * (var(--phone-w) + var(--phone-h)) / 2.8284);
    z-index: 1;
    cursor: pointer;
    transform: translate(calc(-1 * var(--to-end) * 6rem), calc(var(--peek-y, 20rem) - var(--peek) + var(--peek-r) - var(--phone-h) / 2 + var(--peek-lift, 0rem))) rotate(calc(var(--to-end) * -45deg)) scale(0.72);
  }

  .hero-phone.has-peek:not(.is-open):hover {
    --peek-lift: -0.75rem;
  }

  .hero-phone.has-peek.is-open {
    z-index: calc(var(--z-float) + 1);
    cursor: auto;
    transform: none;
  }
}

.phone-peek {
  display: none;
}

@media (min-width: 64rem) {
  /* The bell on the visible corner at full touch size after scaling down and it stays upright and does not tilt */
  .has-peek .phone-peek {
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    inline-size: 3.875rem;
    block-size: 3.875rem;
    padding: 0;
    border: 0;
    border-radius: var(--r-pill);
    background: transparent;
    cursor: pointer;
    transition: opacity var(--dur-2) var(--ease);
  }

  .phone-peek-dot {
    display: grid;
    place-items: center;
    inline-size: 100%;
    block-size: 100%;
    border-radius: inherit;
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: 0 0 0 0.4rem rgb(251 100 27 / 0.28);
    rotate: calc(var(--to-end) * 45deg);
  }

  .phone-peek-dot .icon {
    inline-size: 1.6rem;
    block-size: 1.6rem;
  }

  .has-peek .phone-peek:focus-visible {
    outline: 0.2rem solid var(--on-deep);
    outline-offset: 0.25rem;
  }

  .has-peek.is-open .phone-peek:not(:focus-visible) {
    opacity: 0;
  }
}

@media (min-width: 64rem) and (prefers-reduced-motion: no-preference) {
  .hero-phone.has-peek {
    transition:
      transform var(--dur-3) var(--ease),
      z-index 0s linear 280ms;
  }

  .hero-phone.has-peek.is-open {
    transition:
      transform var(--dur-3) var(--ease),
      z-index 0s linear 200ms;
  }

  .has-peek:not(.is-open) .phone-peek-dot {
    animation: peek-pulse 2.4s var(--ease) infinite;
  }
}

@keyframes peek-pulse {
  50% { box-shadow: 0 0 0 0.9rem rgb(251 100 27 / 0); }
}

@supports (animation-timeline: scroll()) {
  @media (min-width: 64rem) and (prefers-reduced-motion: no-preference) {
    .hero-phone,
    .hero-visual {
      animation: drift-up linear both;
      animation-timeline: scroll(root);
      animation-range: 0 32rem;
    }

    .hero-visual {
      animation-name: drift-down;
    }
  }
}

@keyframes drift-up {
  to { translate: 0 calc(-1 * var(--sp-8)); }
}

@keyframes drift-down {
  to { translate: 0 var(--sp-3); }
}

/* A calm motion for the two floating elements */
@media (prefers-reduced-motion: no-preference) {
  .mock-score {
    animation: float var(--float) ease-in-out infinite;
  }

  .mock-toast {
    animation: float var(--float) ease-in-out calc(var(--float) / -2) infinite;
  }
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 calc(-1 * var(--sp-2));
  }
}

/* An orange line under the second part of the title drawn from its start */
.hero-title .accent {
  position: relative;
  display: inline-block;
}

.hero-title .accent::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  inset-block-end: var(--underline-gap);
  block-size: var(--underline-h);
  border-radius: var(--r-pill);
  background: var(--accent);
  transform-origin: var(--origin-start);
}

.motion-on .is-in .hero-title .accent::after {
  animation: m-stroke var(--dur-4) var(--ease) calc(var(--stagger) * 6) backwards;
}

@keyframes m-stroke {
  from {
    scale: 0 1;
  }
}

/* The score card and the notification enter and then float and the score ring is drawn */
.motion-on [data-scene].is-in .mock-score {
  animation:
    m-rise var(--dur-3) var(--ease) calc(var(--stagger) * 4) backwards,
    float var(--float) ease-in-out var(--float-wait) infinite;
}

.motion-on [data-scene].is-in .mock-toast {
  animation:
    m-pop var(--dur-3) var(--ease-back) calc(var(--stagger) * 18) backwards,
    float var(--float) ease-in-out calc(var(--float-wait) * 2) infinite;
}

.motion-on [data-scene].is-in .ring-value {
  animation: m-ring var(--dur-4) var(--ease) calc(var(--stagger) * 8) backwards;
}

@keyframes m-ring {
  from {
    stroke-dasharray: 0 100;
  }
}

.motion-on [data-scene].is-in .mock-toast .tile .icon {
  stroke-dasharray: none;
  transform-origin: 50% 10%;
  animation: m-bell var(--dur-4) ease-in-out calc(var(--stagger) * 24) backwards;
}

@keyframes m-bell {
  20% {
    rotate: 14deg;
  }

  40% {
    rotate: -12deg;
  }

  60% {
    rotate: 8deg;
  }

  80% {
    rotate: -4deg;
  }
}

/* Two texts in one cell that swap with the ring's step */
.swap {
  display: inline-grid;
  align-items: center;
  justify-items: start;
}

.swap.mock-count {
  justify-items: end;
}

.swap > * {
  grid-area: 1 / 1;
}

.swap-b,
[data-loop][data-step='1'] .swap-a {
  visibility: hidden;
  opacity: 0;
}

[data-loop][data-step='1'] .swap-b {
  visibility: visible;
  opacity: 1;
}

.motion-on .swap > * {
  transition:
    opacity var(--dur-2) var(--ease),
    visibility var(--dur-2);
}

/* The task card's ring completes the last subtask so the percentage is full */
.mock-task[data-step='1'] .subtask:last-child .tick {
  border-color: var(--mark-good);
  background: var(--mark-good);
  color: var(--surface);
}

.mock-task[data-step='1'] .subtask:last-child .subtask-name {
  color: var(--text-muted);
}

.mock-task[data-step='1'] .bar-fill {
  inline-size: 100%;
}

.motion-on .mock-task .tick {
  transition:
    background-color var(--dur-2) var(--ease),
    border-color var(--dur-2) var(--ease),
    color var(--dur-2) var(--ease);
}

.motion-on .mock-task .subtask-name {
  transition: color var(--dur-2) var(--ease);
}

.motion-on .mock-task .bar-fill {
  transition: inline-size var(--dur-3) var(--ease);
}

.motion-on .mock-task[data-step='1'] .subtask:last-child .tick {
  animation: m-pop var(--dur-2) var(--ease-back);
}

/* Features showcase (decision 388) */
/* The first one is in the deep brand color like the first screen's panel and the rest in the page surface */
:root {
  --sc-art-h: 10rem;
  --sc-indent: 1.75rem;
  --sc-ring: 5.5rem;
  --sc-day: 1.5rem;
  --sc-phone-w: 8.5rem;
  --sc-phone-h: 9.5rem;
  --sc-swatch: 2.25rem;
}

.showcase {
  padding-block-start: calc(var(--section-y) * 0.75);
}

/* The title at the start and the features page link at the end on one line */
.section-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-6);
  max-inline-size: none;
}

.bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-4);
}

.sc-tile {
  display: grid;
  grid-template-rows: minmax(var(--sc-art-h), 1fr) auto;
  gap: var(--sp-5);
  padding: var(--sp-5);
  border: var(--line) solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.sc-art {
  display: grid;
  place-items: center;
  padding: var(--sp-5);
  overflow: hidden;
  border-radius: var(--r-lg);
  background-color: var(--surface-sunken);
  background-image: radial-gradient(circle at center, var(--border-strong) var(--line), transparent var(--line-2));
  background-size: var(--grid-dot) var(--grid-dot);
  color: var(--text);
  font-size: var(--fs-xs);
  line-height: var(--lh-ui);
}

.sc-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-black);
  line-height: var(--lh-heading);
}

/* The first card is in the deep brand color and its title is white and its drawing is light cards above it */
.sc-tile--1 {
  border-color: transparent;
  background-color: var(--hero-deep);
  background-image:
    radial-gradient(70% 80% at 100% 0%, var(--hero-glow-1), transparent 70%),
    linear-gradient(160deg, var(--hero-deep), var(--hero-deep-2));
  color: var(--on-deep);
}

.sc-tile--1 .sc-art {
  background-color: var(--on-deep-fill);
  background-image: radial-gradient(circle at center, var(--on-deep-dots) var(--line), transparent var(--line-2));
}

@media (min-width: 40rem) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sc-tile--1,
  .sc-tile--6 {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64rem) {
  .bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--sp-5);
  }

  .sc-tile--1 {
    grid-column: span 4;
  }

  .sc-tile--2,
  .sc-tile--3,
  .sc-tile--4,
  .sc-tile--5 {
    grid-column: span 2;
  }

  /* The last strip has its drawing at the start and its title beside it */
  .sc-tile--6 {
    grid-column: 1 / -1;
    grid-template-rows: none;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
  }
}

/* The task tree: three levels with each level deeper by an offset and a line connecting it to its parent */
.sc-tree {
  display: grid;
  gap: var(--sp-2);
  inline-size: 100%;
  max-inline-size: 30rem;
}

.sc-node {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-2);
}

/* On a narrow screen the name and its mark are enough and the bar is hidden so the name is not clipped */
.sc-node-bar {
  display: none;
}

@media (min-width: 30rem) {
  .sc-node {
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 6rem);
  }

  .sc-node-bar {
    display: block;
  }
}

.sc-node--2 {
  margin-inline-start: var(--sc-indent);
}

.sc-node--2::before {
  content: '';
  position: absolute;
  inset-block-end: 50%;
  inset-inline-start: calc(-1 * var(--sc-indent) / 2 - var(--line));
  inline-size: calc(var(--sc-indent) / 2);
  block-size: calc(100% + var(--sp-2));
  border-block-end: var(--line-2) solid var(--on-deep-muted);
  border-inline-start: var(--line-2) solid var(--on-deep-muted);
  border-end-start-radius: var(--r-sm);
  pointer-events: none;
}

.sc-node-mark {
  display: inline-grid;
  place-items: center;
  inline-size: var(--tile-sm);
  block-size: var(--tile-sm);
  border-radius: var(--r-sm);
  background: var(--primary-soft);
  color: var(--primary-text);
}

.sc-node-name {
  overflow: hidden;
  font-weight: var(--fw-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Assignment: the task box and then the assignees stacked and then their state */
.sc-assign {
  display: grid;
  justify-items: center;
  gap: var(--sp-3);
}

.sc-assign-task {
  display: inline-grid;
  place-items: center;
  inline-size: var(--tile);
  block-size: var(--tile);
  border-radius: var(--r-md);
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-2);
}

.sc-avatars {
  display: inline-flex;
}

.sc-avatars .avatar {
  --avatar: 2.5rem;
  box-shadow: 0 0 0 var(--sp-1) var(--surface-sunken);
}

.sc-avatars .avatar + .avatar {
  margin-inline-start: calc(-1 * var(--sp-3));
}

.avatar--accent {
  background: var(--accent);
  color: var(--on-accent);
}

/* The score: the ring and four bars for its dimensions */
.sc-score {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  inline-size: 100%;
  max-inline-size: 16rem;
}

.sc-ring {
  position: relative;
  flex: none;
  inline-size: var(--sc-ring);
  block-size: var(--sc-ring);
}

.sc-ring-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: var(--fs-xl);
  font-weight: var(--fw-black);
  line-height: var(--lh-flat);
}

.sc-bars {
  display: grid;
  flex: 1;
  gap: var(--sp-3);
}

.sc-bars .bar {
  display: block;
}

/* The calendar */
.sc-cal {
  display: grid;
  grid-template-columns: repeat(7, var(--sc-day));
  gap: var(--sp-2);
}

.sc-day {
  position: relative;
  inline-size: var(--sc-day);
  block-size: var(--sc-day);
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: inset 0 0 0 var(--line) var(--border);
}

.sc-day.is-span {
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 var(--line) var(--primary);
}

.sc-day.is-today {
  background: var(--primary);
  box-shadow: none;
}

.sc-day.is-repeat::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  inline-size: var(--dot);
  block-size: var(--dot);
  border-radius: var(--r-pill);
  background: var(--accent);
}

/* The phone: a dark frame with two completed tasks and a sync pending badge */
.sc-phone {
  display: grid;
  place-items: center;
}

.sc-phone-screen {
  display: grid;
  align-content: start;
  gap: var(--sp-2);
  inline-size: var(--sc-phone-w);
  min-block-size: var(--sc-phone-h);
  padding: var(--sp-4) var(--sp-3);
  border: var(--sp-1) solid var(--device);
  border-block-end: 0;
  border-start-start-radius: var(--r-lg);
  border-start-end-radius: var(--r-lg);
  background: var(--surface);
}

.sc-phone-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.sc-phone-row .tick {
  border-color: var(--mark-good);
  background: var(--mark-good);
  color: var(--surface);
}

.sc-line {
  flex: 1;
  block-size: var(--skel-h);
  border-radius: var(--r-pill);
  background: var(--border-strong);
}

.sc-line--short {
  max-inline-size: 60%;
}

.sc-pending {
  justify-self: center;
  margin-block-start: var(--sp-2);
}

/* Identity: four colors and the two interface languages */
.sc-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
}

.sc-swatches {
  display: inline-flex;
  gap: var(--sp-2);
}

.sc-swatch {
  inline-size: var(--sc-swatch);
  block-size: var(--sc-swatch);
  border-radius: var(--r-pill);
  box-shadow: 0 0 0 var(--sp-1) var(--surface);
}

.sc-swatch--1 {
  background: var(--swatch-brand);
}

.sc-swatch--2 {
  background: var(--swatch-blue);
}

.sc-swatch--3 {
  background: var(--swatch-plum);
}

.sc-swatch--4 {
  background: var(--swatch-clay);
}

.sc-langs {
  display: inline-flex;
  gap: var(--sp-2);
  padding: var(--sp-1);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.sc-lang {
  display: inline-grid;
  place-items: center;
  inline-size: var(--sc-swatch);
  block-size: var(--sc-swatch);
  border-radius: var(--r-pill);
  font-size: var(--fs-md);
  font-weight: var(--fw-black);
  line-height: var(--lh-flat);
}

.sc-lang:first-child {
  background: var(--primary);
  color: var(--on-primary);
}

/* "How it works" slides (decision 351) */
/* The slide duration is the same as data-interval in the template */
:root {
  --carousel-interval: 6.5s;
  --slide-move: 600ms;
  --slide-num: 2.5rem;
  --carousel-dot: 0.625rem;
  --carousel-dot-on: 1.75rem;
  --ill-skin: #f2c6a0;
  --ill-hair: #1f3036;
  --ill-pants: #29434b;
  --ill-shoe: #152a31;
  --ill-shirt: var(--brand-teal);
  --ill-shirt-shade: #146b7b;
  --ill-shirt-deep: #105a68;
}

:root[data-theme='dark'] {
  --ill-skin: #e9b993;
  --ill-hair: #0b1518;
  --ill-pants: #3a5c65;
  --ill-shoe: #0b1518;
  --ill-shirt: #2a9cb2;
  --ill-shirt-shade: #23899d;
  --ill-shirt-deep: #1d7686;
}

.carousel {
  display: grid;
  gap: var(--sp-5);
}

.carousel-viewport {
  overflow: hidden;
  border: var(--line) solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  touch-action: pan-y;
}

/* With no script the slides are all one under the other */
.carousel-track {
  display: grid;
}

.slide {
  display: grid;
  align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-5);
}

.slide + .slide {
  border-block-start: var(--line) solid var(--border);
}

.js .carousel-track {
  display: flex;
  transition: translate var(--slide-move) var(--ease);
}

.js .slide {
  flex: 0 0 100%;
  min-inline-size: 0;
}

.js .slide + .slide {
  border-block-start: 0;
}

/* The visible slide is from its number on the container and in Arabic the strip moves to the right */
.js .carousel[data-index='1'] .carousel-track {
  translate: -100% 0;
}

.js .carousel[data-index='2'] .carousel-track {
  translate: -200% 0;
}

.js .carousel[data-index='3'] .carousel-track {
  translate: -300% 0;
}

.js .carousel[data-index='4'] .carousel-track {
  translate: -400% 0;
}

.js .carousel[data-index='5'] .carousel-track {
  translate: -500% 0;
}

.js[dir='rtl'] .carousel[data-index='1'] .carousel-track {
  translate: 100% 0;
}

.js[dir='rtl'] .carousel[data-index='2'] .carousel-track {
  translate: 200% 0;
}

.js[dir='rtl'] .carousel[data-index='3'] .carousel-track {
  translate: 300% 0;
}

.js[dir='rtl'] .carousel[data-index='4'] .carousel-track {
  translate: 400% 0;
}

.js[dir='rtl'] .carousel[data-index='5'] .carousel-track {
  translate: 500% 0;
}

.slide-art {
  overflow: hidden;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--primary-soft), var(--surface-sunken) 80%);
}

.ill {
  display: block;
  inline-size: 100%;
  block-size: auto;
}

/* The drawing has no text so it is mirrored in Arabic so the person stands at the start side and the panel is after it */
[dir='rtl'] .ill {
  transform: scaleX(-1);
}

/* The step number and its title on one line (decision 394) */
.slide-copy {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.slide-copy .slide-num {
  flex: 0 0 auto;
}

.slide--party .slide-num {
  background: var(--mark-good);
}

.slide-num {
  display: inline-grid;
  place-items: center;
  inline-size: var(--slide-num);
  block-size: var(--slide-num);
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: var(--fw-black);
}

.slide-title {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  font-weight: var(--fw-black);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-heading);
}

/* On desktop the step text is at the start side and the drawing after it */
/* After removing the explanation: a column for the number and the title on one line beside it and the drawing takes most of the width (decision 389) */
@media (min-width: 56rem) {
  .slide {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: var(--sp-8);
    padding: var(--sp-6) var(--sp-8);
  }

  .slide-num {
    --slide-num: 3.25rem;
    font-size: var(--fs-lg);
  }

  .slide-copy {
    order: -1;
  }
}

/* The buttons and the dots when the script works */
.carousel-controls {
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
}

.js .carousel-controls {
  display: flex;
}

.carousel-btn {
  display: inline-grid;
  place-items: center;
  inline-size: var(--touch);
  block-size: var(--touch);
  padding: 0;
  border: var(--line) solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color var(--dur-1) var(--ease),
    color var(--dur-1) var(--ease);
}

.carousel-btn:hover {
  border-color: var(--primary);
  color: var(--primary-text);
}

/* The previous arrow is the reverse of the next in both directions */
.icon--back {
  scale: -1 1;
}

.carousel-play {
  margin-inline-start: var(--sp-2);
}

.carousel-play .icon-play,
.carousel.is-stopped .carousel-play .icon-pause,
.carousel:not(.has-auto) .carousel-play {
  display: none;
}

.carousel.is-stopped .carousel-play .icon-play {
  display: block;
}

.carousel-dots {
  display: flex;
}

.carousel-dot {
  display: grid;
  place-items: center;
  inline-size: var(--touch);
  block-size: var(--touch);
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

/* The step title appears on wide screens alone and on narrow ones the dot is enough */
.dot-label {
  display: none;
}

.dot-bar {
  position: relative;
  overflow: hidden;
  inline-size: var(--carousel-dot);
  block-size: var(--carousel-dot);
  border-radius: var(--r-pill);
  background: var(--border-strong);
  transition:
    inline-size var(--dur-2) var(--ease),
    background-color var(--dur-2) var(--ease);
}

.carousel-dot:hover .dot-bar {
  background: var(--text-muted);
}

.carousel-dot[aria-current] .dot-bar {
  inline-size: var(--carousel-dot-on);
  background: var(--primary-soft);
}

/* The visible step's bar fills with the brand color over the slide duration and stops with it */
.carousel-dot[aria-current] .dot-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--primary);
  transform-origin: left center;
}

[dir='rtl'] .carousel-dot[aria-current] .dot-bar::after {
  transform-origin: right center;
}

.carousel.is-running .carousel-dot[aria-current] .dot-bar::after {
  animation: carousel-progress var(--carousel-interval) linear both;
}

@keyframes carousel-progress {
  from {
    transform: scaleX(0);
  }
}

/* On wide screens the four steps are a row between the two arrows */
@media (min-width: 56rem) {
  .carousel-controls {
    gap: var(--sp-3);
  }

  .carousel-dots {
    display: grid;
    flex: 1;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: var(--sp-3);
  }

  .carousel-dot {
    display: grid;
    place-items: stretch;
    align-content: start;
    gap: var(--sp-3);
    inline-size: auto;
    block-size: auto;
    min-block-size: var(--touch);
    padding-block: var(--sp-2);
    border-radius: var(--r-sm);
  }

  .dot-bar,
  .carousel-dot[aria-current] .dot-bar {
    inline-size: 100%;
    block-size: var(--sp-1);
  }

  .carousel-dot[aria-current] .dot-bar {
    background: var(--primary-soft);
  }

  .dot-label {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
  }

  .dot-num {
    display: inline-grid;
    place-items: center;
    flex: none;
    inline-size: var(--sp-6);
    block-size: var(--sp-6);
    border-radius: var(--r-pill);
    background: var(--chip-bg);
    color: var(--chip-text);
    font-size: var(--fs-2xs);
  }

  .carousel-dot:hover {
    color: var(--text);
  }

  .carousel-dot[aria-current] {
    color: var(--text);
  }

  .carousel-dot[aria-current] .dot-num {
    background: var(--accent);
    color: var(--on-accent);
  }
}

/* Slide drawings */
.ill-blob {
  fill: var(--primary-soft);
}

.ill-ground {
  fill: rgb(var(--shadow-rgb) / 0.12);
}

.ill-panel {
  fill: var(--surface);
  stroke: var(--border);
  stroke-width: 1.5;
}

.ill-dot {
  fill: var(--border-strong);
}

.ill-dot--accent {
  fill: var(--accent);
}

.ill-chip {
  fill: var(--surface-sunken);
  stroke: var(--border);
  stroke-width: 1.5;
}

.ill-pick {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 2.5;
}

.ill-line {
  fill: var(--border-strong);
}

.ill-line--strong {
  fill: var(--text-muted);
}

.ill-card {
  fill: var(--surface);
  stroke: var(--border-strong);
  stroke-width: 1.5;
}

.ill-pill--primary {
  fill: var(--primary-soft);
}

.ill-pill--info {
  fill: var(--info-soft);
}

.ill-points {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 1.5;
}

.ill-check-mark,
.ill-tick-mark,
.ill-done-mark {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ill-done-mark {
  stroke-width: 5;
  stroke-dasharray: 100;
}

.ill-flow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100;
}

.ill-avatar {
  fill: var(--primary-soft);
  stroke: var(--primary);
  stroke-width: 2;
}

.ill-avatar--alt {
  fill: var(--accent-soft);
  stroke: var(--accent);
}

.ill-avatar-head {
  fill: var(--primary);
}

.ill-avatar-body {
  fill: none;
  stroke: var(--primary);
  stroke-width: 4;
  stroke-linecap: round;
}

.ill-check-badge,
.ill-tick,
.ill-done-disc {
  fill: var(--mark-good);
}

.ill-row {
  fill: var(--surface-sunken);
}

.ill-ring-empty {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 2.5;
}

.ill-ring-track {
  fill: none;
  stroke: var(--surface-sunken);
  stroke-width: 8;
}

.ill-ring {
  fill: none;
  stroke: var(--primary);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 86 100;
  rotate: -90deg;
  transform-box: fill-box;
  transform-origin: center;
}

.ill-pop,
.ill-tick,
.ill-tick-mark,
.ill-done-disc {
  transform-box: fill-box;
  transform-origin: center;
}

.ill-skin {
  fill: var(--ill-skin);
}

.ill-hair,
.ill-eye {
  fill: var(--ill-hair);
}

.ill-smile {
  fill: none;
  stroke: var(--ill-hair);
  stroke-width: 2;
  stroke-linecap: round;
}

.ill-pants {
  fill: var(--ill-pants);
}

.ill-shoe {
  fill: var(--ill-shoe);
}

.ill-shirt {
  fill: var(--ill-shirt);
}

.ill-collar {
  fill: none;
  stroke: var(--ill-shirt-deep);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ill-badge {
  fill: var(--accent);
}

.ill-sleeve-back {
  fill: none;
  stroke: var(--ill-shirt-deep);
  stroke-width: 16;
  stroke-linecap: round;
}

.ill-sleeve {
  fill: none;
  stroke: var(--ill-shirt-shade);
  stroke-width: 17;
  stroke-linecap: round;
}

/* The arm rotates around the shoulder and the head around the neck, and each scene has its arm's final pose */
.ill-arm {
  transform-box: view-box;
  transform-origin: 158px 164px;
}

.ill-arm--point {
  rotate: -14deg;
}

.ill-arm--rest {
  rotate: 10deg;
}

.ill-arm--cheer {
  rotate: -62deg;
}

.ill-head {
  transform-box: view-box;
  transform-origin: 132px 126px;
}

/* Elements of the new scenes (decision 389) in their final resting state */
.ill-card--raised {
  filter: drop-shadow(0 6px 10px rgb(var(--shadow-rgb) / 0.14));
}

.ill-chip-dot {
  fill: var(--border-strong);
}

.ill-chip-dot--on,
.ill-prio {
  fill: var(--accent);
}

.ill-date {
  fill: var(--info-soft);
  stroke: var(--mark-info);
  stroke-width: 1.5;
}

.ill-save {
  fill: var(--mark-good);
}

.ill-type {
  transform-box: fill-box;
  transform-origin: left center;
}

.ill-step,
.ill-new,
.ill-task,
.ill-spark,
.ill-mini,
.ill-glow,
.ill-rays,
.ill-conf,
.ill-mini-bar,
.ill-spinner {
  transform-box: fill-box;
  transform-origin: center;
}

.ill-spark {
  fill: var(--accent);
}

.ill-spark--2,
.ill-spark--4 {
  fill: var(--mark-warn);
}

/* The pointer is a white arrow with a dark border and its final position is on the save button */
.ill-cursor {
  fill: #fff;
  stroke: var(--text);
  stroke-width: 1.5;
  stroke-linejoin: round;
  transform-box: fill-box;
  transform-origin: 0 0;
  translate: 496px 244px;
}

.ill-mini {
  stroke: var(--surface);
  stroke-width: 2.5;
}

.ill-mini--1 {
  fill: var(--primary);
}

.ill-mini--2 {
  fill: var(--accent);
}

.ill-mini--3 {
  fill: var(--mark-good);
}

.ill-avatar--good {
  fill: var(--success-soft);
  stroke: var(--mark-good);
}

.ill-avatar-head--alt {
  fill: var(--accent);
}

.ill-avatar-body--alt {
  stroke: var(--accent);
}

.ill-avatar-head--good {
  fill: var(--mark-good);
}

.ill-avatar-body--good {
  stroke: var(--mark-good);
}

.ill-bell {
  transform-box: fill-box;
  transform-origin: 50% 0;
}

.ill-bell-disc {
  fill: var(--accent);
}

.ill-bell-shape {
  fill: #fff;
}

.ill-bell-dot {
  fill: var(--mark-warn);
  stroke: var(--surface);
  stroke-width: 2;
}

.ill-ring--progress {
  stroke-dasharray: 75 100;
}

.ill-ring-core {
  fill: var(--primary-soft);
}

.ill-row--active {
  fill: var(--primary-soft);
}

.ill-spinner {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 18 45;
}

.ill-mini-bar {
  fill: var(--primary-soft);
  transform-origin: center bottom;
}

.ill-mini-bar--accent {
  fill: var(--primary);
}

.ill-blob--party {
  fill: var(--accent-soft);
}

.ill-glow {
  fill: var(--success-soft);
}

.ill-ray {
  fill: none;
  stroke: var(--mark-warn);
  stroke-width: 4;
  stroke-linecap: round;
}

/* The confetti pieces at rest are scattered around the completion mark */
.ill-conf {
  translate: var(--dx) var(--dy);
  rotate: var(--r);
}

.ill-conf:nth-of-type(4n + 1) {
  fill: var(--primary);
}

.ill-conf:nth-of-type(4n + 2) {
  fill: var(--accent);
}

.ill-conf:nth-of-type(4n + 3) {
  fill: var(--mark-warn);
}

.ill-conf:nth-of-type(4n) {
  fill: var(--mark-good);
}

.ill-conf--1 { --dx: -118px; --dy: -96px; --r: 140deg; }
.ill-conf--2 { --dx: -64px; --dy: -118px; --r: -80deg; }
.ill-conf--3 { --dx: -10px; --dy: -124px; --r: 0deg; }
.ill-conf--4 { --dx: 52px; --dy: -112px; --r: 200deg; }
.ill-conf--5 { --dx: 108px; --dy: -88px; --r: -150deg; }
.ill-conf--6 { --dx: 124px; --dy: -30px; --r: 0deg; }
.ill-conf--7 { --dx: 126px; --dy: 28px; --r: 110deg; }
.ill-conf--8 { --dx: 112px; --dy: 84px; --r: -60deg; }
.ill-conf--9 { --dx: 70px; --dy: 110px; --r: 0deg; }
.ill-conf--10 { --dx: 12px; --dy: 118px; --r: 170deg; }
.ill-conf--11 { --dx: -48px; --dy: 112px; --r: -120deg; }
.ill-conf--12 { --dx: -104px; --dy: 92px; --r: 0deg; }
.ill-conf--13 { --dx: -128px; --dy: 40px; --r: 75deg; }
.ill-conf--14 { --dx: -132px; --dy: -20px; --r: -200deg; }
.ill-conf--15 { --dx: -88px; --dy: -60px; --r: 0deg; }
.ill-conf--16 { --dx: 84px; --dy: -58px; --r: 95deg; }
.ill-conf--17 { --dx: 90px; --dy: 52px; --r: -35deg; }
.ill-conf--18 { --dx: -86px; --dy: 58px; --r: 0deg; }

/* The back arm is raised in the celebration scene and rotates around its shoulder and the smile is wider */
.ill-arm-back {
  transform-box: view-box;
  transform-origin: 104px 164px;
  rotate: 145deg;
}

.ill-smile--wide {
  stroke-width: 2.4;
}

.ill-eye {
  transform-box: fill-box;
  transform-origin: center;
}

/* Motion is in the visible slide alone and starts from its beginning whenever it appears */
.motion-on .slide.is-active .ill-eye {
  animation: ill-blink 4.2s ease-in-out 1.2s infinite;
}

.motion-on .slide.is-active .ill-head {
  animation: ill-nod 3.2s ease-in-out 0.8s infinite;
}

/* Create the task */
.motion-on .slide.is-active .ill--create .ill-cursor {
  animation: ill-cursor 3.4s var(--ease) 0.2s both;
}

.motion-on .slide.is-active .ill--create .ill-pick,
.motion-on .slide.is-active .ill--create .ill-chip-dot--on {
  animation: ill-pick 400ms var(--ease) 1.25s both;
}

.motion-on .slide.is-active .ill--create .ill-flow {
  animation: ill-draw 500ms var(--ease) 1.4s both;
}

.motion-on .slide.is-active .ill--create .ill-new {
  animation: ill-pop 600ms var(--ease-back) 1.6s both;
}

.motion-on .slide.is-active .ill--create .ill-type--1 {
  animation: ill-grow-x 600ms steps(8, end) 2s both;
}

.motion-on .slide.is-active .ill--create .ill-type--2 {
  animation: ill-grow-x 500ms steps(6, end) 2.55s both;
}

.motion-on .slide.is-active .ill--create .ill-step--1 {
  animation: ill-pop 400ms var(--ease-back) 1.9s both;
}

.motion-on .slide.is-active .ill--create .ill-step--2 {
  animation: ill-pop 400ms var(--ease-back) 2.9s both;
}

.motion-on .slide.is-active .ill--create .ill-step--3 {
  animation: ill-pop 400ms var(--ease-back) 3.1s both;
}

.motion-on .slide.is-active .ill--create .ill-step--4 {
  animation: ill-save 600ms var(--ease-back) 3.55s both;
}

.motion-on .slide.is-active .ill--create .ill-spark {
  animation: ill-twinkle 1.8s ease-in-out 3.7s infinite both;
}

.motion-on .slide.is-active .ill--create .ill-spark--2 {
  animation-delay: 4s;
}

.motion-on .slide.is-active .ill--create .ill-spark--3 {
  animation-delay: 4.3s;
}

.motion-on .slide.is-active .ill-arm--tap {
  animation: ill-tap 1600ms var(--ease) 1.1s both;
}

/* Assign it */
.motion-on .slide.is-active .ill--assign .ill-task {
  animation: ill-pop 600ms var(--ease-back) 0.2s both;
}

.motion-on .slide.is-active .ill--assign .ill-flow--1 {
  animation: ill-draw 600ms var(--ease) 0.8s both;
}

.motion-on .slide.is-active .ill--assign .ill-flow--2 {
  animation: ill-draw 600ms var(--ease) 1.05s both;
}

.motion-on .slide.is-active .ill--assign .ill-flow--3 {
  animation: ill-draw 600ms var(--ease) 1.3s both;
}

.motion-on .slide.is-active .ill--assign .ill-pop--a {
  animation: ill-pop 500ms var(--ease-back) 1.3s both;
}

.motion-on .slide.is-active .ill--assign .ill-pop--b {
  animation: ill-pop 500ms var(--ease-back) 1.55s both;
}

.motion-on .slide.is-active .ill--assign .ill-pop--c {
  animation: ill-pop 500ms var(--ease-back) 1.8s both;
}

.motion-on .slide.is-active .ill--assign .ill-mini--1 {
  animation: ill-pop 350ms var(--ease-back) 2.2s both;
}

.motion-on .slide.is-active .ill--assign .ill-mini--2 {
  animation: ill-pop 350ms var(--ease-back) 2.35s both;
}

.motion-on .slide.is-active .ill--assign .ill-mini--3 {
  animation: ill-pop 350ms var(--ease-back) 2.5s both;
}

.motion-on .slide.is-active .ill--assign .ill-bell {
  animation:
    ill-pop 400ms var(--ease-back) 2.6s both,
    ill-bell 1.4s ease-in-out 3s 2;
}

.motion-on .slide.is-active .ill-arm--point {
  animation: ill-point 900ms var(--ease) 0.4s both;
}

/* Follow its progress */
.motion-on .slide.is-active .ill--progress .ill-ring--progress {
  animation: ill-ring-75 1.8s var(--ease) 0.4s both;
}

.motion-on .slide.is-active .ill--progress .ill-sub--1 :is(.ill-tick, .ill-tick-mark) {
  animation: ill-pop 450ms var(--ease-back) 1s both;
}

.motion-on .slide.is-active .ill--progress .ill-sub--2 :is(.ill-tick, .ill-tick-mark) {
  animation: ill-pop 450ms var(--ease-back) 1.6s both;
}

.motion-on .slide.is-active .ill--progress .ill-spinner {
  animation: ill-spin 1.2s linear infinite;
}

.motion-on .slide.is-active .ill--progress .ill-mini-bar {
  animation: ill-grow-y 700ms var(--ease) 0.6s both;
}

.motion-on .slide.is-active .ill--progress .ill-mini-bar--2 {
  animation-delay: 0.75s;
}

.motion-on .slide.is-active .ill--progress .ill-mini-bar--3 {
  animation-delay: 0.9s;
}

.motion-on .slide.is-active .ill--progress .ill-mini-bar--4 {
  animation-delay: 1.05s;
}

/* The task is completed: a celebration that repeats while the slide is visible */
.motion-on .slide.is-active .ill--done .ill-done-disc {
  animation: ill-pop 550ms var(--ease-back) 0.15s both;
}

.motion-on .slide.is-active .ill--done .ill-done-mark {
  animation: ill-draw 600ms var(--ease) 0.55s both;
}

.motion-on .slide.is-active .ill--done .ill-glow {
  animation: ill-glow 2.4s ease-in-out 0.6s infinite;
}

.motion-on .slide.is-active .ill--done .ill-rays {
  animation: ill-rays 2.4s var(--ease) 0.7s infinite both;
}

.motion-on .slide.is-active .ill--done .ill-conf {
  animation: ill-confetti 2.4s cubic-bezier(0.15, 0.7, 0.3, 1) 0.7s infinite both;
}

.motion-on .slide.is-active .ill--done .ill-conf:nth-of-type(3n) {
  animation-delay: 0.8s;
}

.motion-on .slide.is-active .ill--done .ill-conf:nth-of-type(3n + 1) {
  animation-delay: 0.9s;
}

.motion-on .slide.is-active .ill--done .ill-spark {
  animation: ill-twinkle 1.6s ease-in-out 0.9s infinite both;
}

.motion-on .slide.is-active .ill--done .ill-spark--2,
.motion-on .slide.is-active .ill--done .ill-spark--4 {
  animation-delay: 1.3s;
}

.motion-on .slide.is-active .ill--done .ill-body {
  animation: ill-jump 1.2s ease-in-out 0.6s infinite;
}

.motion-on .slide.is-active .ill--done .ill-arm--cheer {
  animation:
    ill-cheer 900ms var(--ease) 0.3s both,
    ill-wave 1.2s ease-in-out 1.2s infinite;
}

.motion-on .slide.is-active .ill--done .ill-arm-back {
  animation:
    ill-cheer-back 900ms var(--ease) 0.3s both,
    ill-wave-back 1.2s ease-in-out 1.2s infinite;
}

@keyframes ill-blink {
  0%,
  44%,
  50%,
  100% {
    scale: 1 1;
  }

  47% {
    scale: 1 0.1;
  }
}

@keyframes ill-cursor {
  0% {
    opacity: 0;
    translate: 214px 232px;
  }

  10% {
    opacity: 1;
    translate: 222px 226px;
  }

  32% {
    translate: 304px 140px;
    scale: 1;
  }

  36% {
    translate: 304px 140px;
    scale: 0.8;
  }

  40% {
    translate: 304px 140px;
    scale: 1;
  }

  80% {
    translate: 496px 244px;
    scale: 1;
  }

  85% {
    scale: 0.8;
  }

  90% {
    scale: 1;
  }
}

@keyframes ill-save {
  from {
    opacity: 0;
    scale: 0.3;
  }

  60% {
    scale: 1.25;
  }
}

@keyframes ill-twinkle {
  0%,
  100% {
    scale: 1;
    opacity: 1;
  }

  50% {
    scale: 0.4;
    opacity: 0.4;
  }
}

@keyframes ill-bell {
  0%,
  100% {
    rotate: 0deg;
  }

  15% {
    rotate: 16deg;
  }

  30% {
    rotate: -14deg;
  }

  45% {
    rotate: 10deg;
  }

  60% {
    rotate: -6deg;
  }
}

@keyframes ill-ring-75 {
  from {
    stroke-dasharray: 0 100;
  }
}

@keyframes ill-spin {
  to {
    rotate: 360deg;
  }
}

@keyframes ill-glow {
  0%,
  100% {
    scale: 1;
    opacity: 1;
  }

  50% {
    scale: 1.14;
    opacity: 0.6;
  }
}

@keyframes ill-rays {
  0% {
    scale: 0.6;
    opacity: 0;
  }

  25% {
    opacity: 1;
  }

  60% {
    scale: 1.1;
    opacity: 0;
  }

  100% {
    scale: 1.1;
    opacity: 0;
  }
}

/* The confetti piece leaves the center small and then spreads and rotates and falls a little and disappears to return in the next cycle */
@keyframes ill-confetti {
  0% {
    translate: 0 0;
    rotate: 0deg;
    scale: 0.2;
    opacity: 0;
  }

  12% {
    opacity: 1;
    scale: 1;
  }

  75% {
    opacity: 1;
  }

  100% {
    translate: var(--dx) calc(var(--dy) + 36px);
    rotate: calc(var(--r) + 180deg);
    opacity: 0;
  }
}

@keyframes ill-jump {
  0%,
  100% {
    translate: 0 0;
  }

  40% {
    translate: 0 -18px;
  }

  55% {
    translate: 0 -16px;
  }
}

@keyframes ill-wave {
  0%,
  100% {
    rotate: -62deg;
  }

  50% {
    rotate: -74deg;
  }
}

@keyframes ill-cheer-back {
  from {
    rotate: 0deg;
  }
}

@keyframes ill-wave-back {
  0%,
  100% {
    rotate: 145deg;
  }

  50% {
    rotate: 157deg;
  }
}

@keyframes ill-pick {
  from {
    fill: var(--surface-sunken);
    stroke: var(--border);
  }
}

@keyframes ill-draw {
  from {
    stroke-dashoffset: 100;
  }
}

@keyframes ill-pop {
  from {
    opacity: 0;
    scale: 0.6;
  }
}

@keyframes ill-grow-x {
  from {
    scale: 0 1;
  }
}

@keyframes ill-grow-y {
  from {
    scale: 1 0;
  }
}

@keyframes ill-ring {
  from {
    stroke-dasharray: 0 100;
  }
}

@keyframes ill-tap {
  0% {
    rotate: -6deg;
  }

  25% {
    rotate: 10deg;
  }

  45% {
    rotate: -2deg;
  }

  65% {
    rotate: 8deg;
  }
}

@keyframes ill-point {
  from {
    rotate: 12deg;
  }
}

@keyframes ill-cheer {
  from {
    rotate: 6deg;
  }

  60% {
    rotate: -70deg;
  }
}

@keyframes ill-nod {
  0%,
  100% {
    rotate: 0deg;
  }

  50% {
    rotate: 4deg;
  }
}


/* The drawing is mirrored in Arabic and the check mark is not mirrored */
[dir='rtl'] .ill :is(.ill-done-mark, .ill-tick-mark, .ill-check-mark) {
  transform-box: fill-box;
  transform-origin: center;
  scale: -1 1;
}
